/* =============================================================
   CRAFT — Member Dashboard Styles
   Pairs with: css/style.css (global tokens)
============================================================= */

/* ---- CSS Variables (fallbacks if style.css tokens not yet loaded) ---- */
:root {
  --bg: var(--cream-50, #F7F5F0);
  --surface: #ffffff;
  --border: var(--mist-200, #C7D3E3);
  --text: var(--ink-900, #12181F);
  --text-muted: var(--ink-700, #3A424C);
  --text-heading: var(--navy-950, #0B1A2C);
  --accent: var(--gold-500, #C99A2E);
}

/* ---- Layout ---- */
body {
  background: var(--bg);
  color: var(--text);
}

.member-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-950, #0B1A2C);
  border-bottom: 1px solid rgba(201,154,46,0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  height: 60px;
}

.member-header-brand {
  font-family: var(--font-display, 'IBM Plex Mono', monospace);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.member-header-brand span {
  color: var(--accent);
}

.member-header-right {
  display: flex;
  gap: 16px;
  align-items: center;
}

.member-header-name {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}

.member-dashboard-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .member-dashboard-layout {
    grid-template-columns: 1fr;
    padding: 20px 16px;
  }
  .member-sidebar {
    position: static !important;
  }
}

/* ---- Sidebar Profile ---- */
.member-sidebar {
  position: sticky;
  top: 76px;
  padding-right: 24px;
}

.member-profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 20px 24px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.member-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
}

.member-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  display: block;
}

.member-avatar-initials {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--navy-950, #0B1A2C);
  border: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, monospace);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 auto;
}

.member-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0 0 4px;
}

.member-role {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.member-meta {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.member-sidebar-stats {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sidebar-stat {
  background: rgba(201,154,46,0.06);
  border: 1px solid rgba(201,154,46,0.15);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}

.sidebar-stat-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-heading);
  display: block;
}

.sidebar-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* ---- Main Content Area ---- */
.member-main {
  min-width: 0;
}

/* ---- Tab Navigation ---- */
.member-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.member-tabs::-webkit-scrollbar { display: none; }

.member-tab-btn {
  flex: 1;
  min-width: 120px;
  background: none;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}

.member-tab-btn:hover {
  background: rgba(201,154,46,0.06);
  color: var(--text-heading);
}

.member-tab-btn.is-active {
  background: var(--navy-950, #0B1A2C);
  color: #fff;
}

.member-tab-btn.is-active .tab-icon {
  opacity: 1;
}

.tab-icon {
  display: inline-block;
  margin-right: 5px;
}

/* ---- Tab Panels ---- */
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ---- Summary Stat Cards ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(201,154,46,0.1);
}

.stat-icon {
  font-size: 26px;
  background: rgba(201,154,46,0.08);
  color: var(--accent);
  width: 52px;
  height: 52px;
  min-width: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0;
  line-height: 1;
}

.stat-label {
  color: var(--text-muted);
  font-size: 13px;
  margin: 4px 0 0;
}

/* ---- Digital ID Section ---- */
.digital-id-section {
  background: linear-gradient(135deg, rgba(201,154,46,0.08) 0%, rgba(11,26,44,0.04) 100%);
  border: 1.5px solid rgba(201,154,46,0.28);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.03);
}

.digital-id-content {
  flex: 1;
  min-width: 260px;
}

.digital-id-badge {
  display: inline-block;
  font-family: var(--font-display, monospace);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(201,154,46,0.12);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  border: 1px solid rgba(201,154,46,0.25);
}

.digital-id-content h2 {
  margin: 0 0 10px;
  color: var(--text-heading);
  font-size: 22px;
  font-weight: 800;
}

.digital-id-content p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
}

/* 3D Flip Card Container */
.digital-id-card-wrapper {
  perspective: 1200px;
  width: 360px;
  height: 220px;
  flex-shrink: 0;
  position: relative;
  user-select: none;
}

.id-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: left;
  transition: transform 0.75s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-style: preserve-3d;
  cursor: pointer;
}

.digital-id-card-wrapper:hover .id-card-inner,
.id-card-inner.is-flipped {
  transform: rotateY(180deg);
}

/* Front & Back Base */
.id-card-front, .id-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  padding: 18px 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, #071526 0%, #0d223f 50%, #081629 100%);
  border: 1.5px solid rgba(201,154,46,0.45);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.1);
  overflow: hidden;
}

.id-card-front::before {
  content: '';
  position: absolute;
  top: -60%; left: -60%;
  width: 220%; height: 220%;
  background: radial-gradient(circle, rgba(201,154,46,0.18) 0%, transparent 60%);
  animation: id-glow 6s infinite alternate;
  pointer-events: none;
}

@keyframes id-glow {
  0% { transform: scale(0.85); opacity: 0.4; }
  100% { transform: scale(1.15); opacity: 0.8; }
}

/* Front Card Elements */
.id-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1;
}

.id-brand {
  font-family: var(--font-display, monospace);
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.id-brand .brand-mark {
  color: var(--accent);
}

.id-chip-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(201,154,46,0.12);
  border: 1px solid rgba(201,154,46,0.3);
  padding: 3px 8px;
  border-radius: 6px;
}

.id-chip-badge span {
  font-family: var(--font-display, monospace);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.id-card-profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 0;
  z-index: 1;
}

.id-card-photo-box {
  width: 58px;
  height: 58px;
  min-width: 58px;
  border-radius: 12px;
  border: 2px solid var(--accent);
  background: #06111f;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.id-card-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.id-card-photo-initials {
  font-family: var(--font-display, monospace);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.id-card-main-info {
  flex: 1;
  min-width: 0;
}

.id-card-name {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}

.id-card-roll {
  margin: 0;
  font-family: var(--font-display, monospace);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.5px;
}

.id-card-dept {
  margin: 2px 0 0;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.id-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(201,154,46,0.2);
  z-index: 1;
}

.id-number-pill {
  font-family: var(--font-display, monospace);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}

/* ---- Editable Member ID ---- */
.id-number-pill-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.id-edit-btn,
.id-save-btn {
  background: rgba(201,154,46,0.15);
  border: 1px solid rgba(201,154,46,0.4);
  border-radius: 4px;
  color: var(--accent, #C99A2E);
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
  padding: 2px 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.id-edit-btn:hover,
.id-save-btn:hover {
  background: rgba(201,154,46,0.3);
}
.id-save-btn {
  background: rgba(34,197,94,0.15);
  border-color: rgba(34,197,94,0.4);
  color: #22c55e;
  font-weight: 700;
  font-size: 11px;
}
.id-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.id-number-edit-input {
  font-family: var(--font-display, monospace);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(201,154,46,0.6);
  border-radius: 4px;
  padding: 2px 6px;
  width: 110px;
  outline: none;
  letter-spacing: 0.5px;
}
.id-number-edit-input:focus {
  border-color: #C99A2E;
  background: rgba(201,154,46,0.1);
}


.id-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display, monospace);
  font-size: 10px;
  font-weight: 700;
  color: #22c55e;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.3);
  padding: 2px 8px;
  border-radius: 100px;
}

.id-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

/* Back Card (QR) Elements */
.id-card-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #071526 0%, #0d223f 50%, #081629 100%);
  align-items: center;
  text-align: center;
  justify-content: space-between;
}

.id-back-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display, monospace);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.8px;
  border-bottom: 1px solid rgba(201,154,46,0.2);
  padding-bottom: 6px;
}

.id-qr-frame {
  background: #ffffff;
  padding: 8px;
  border-radius: 10px;
  border: 2px solid var(--accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  display: inline-block;
  margin: 4px 0;
}

.id-qr-frame img {
  width: 96px;
  height: 96px;
  display: block;
}

.id-back-footer {
  width: 100%;
}

.id-back-instruction {
  margin: 0 0 2px;
  font-weight: 600;
  font-size: 11px;
  color: rgba(255,255,255,0.9);
}

.id-back-sub {
  font-size: 9.5px;
  color: rgba(255,255,255,0.5);
  font-family: var(--font-display, monospace);
}

.id-card-hint {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  font-family: var(--font-display, monospace);
}

/* ---- Dashboard Sections (shared) ---- */
.dashboard-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}

.dashboard-section h3 {
  margin: 0 0 20px;
  color: var(--text-heading);
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.section-empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
}

.section-empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.section-empty p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* ---- List Items (shared) ---- */
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.list-item:last-child { border-bottom: none; }

.list-item-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  font-size: 14px;
}

.list-item-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---- Event Cards (My Events tab) ---- */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.event-card-poster {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--navy-950, #0B1A2C);
  display: block;
}

.event-card-poster-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #0B1A2C, #162d4f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.event-card-body {
  padding: 16px;
}

.event-card-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-heading);
  margin: 0 0 6px;
}

.event-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.5;
}

.event-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ---- Status Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge--attended {
  background: rgba(34,197,94,0.12);
  color: #16a34a;
  border: 1px solid rgba(34,197,94,0.25);
}

.badge--registered {
  background: rgba(59,130,246,0.1);
  color: #2563eb;
  border: 1px solid rgba(59,130,246,0.2);
}

.badge--absent {
  background: rgba(239,68,68,0.1);
  color: #dc2626;
  border: 1px solid rgba(239,68,68,0.2);
}

.badge--upcoming {
  background: rgba(201,154,46,0.1);
  color: #92650a;
  border: 1px solid rgba(201,154,46,0.25);
}

.badge--past {
  background: rgba(156,163,175,0.12);
  color: #6b7280;
  border: 1px solid rgba(156,163,175,0.25);
}

/* ---- Attendance Tab ---- */
.attendance-summary-bar {
  background: rgba(201,154,46,0.06);
  border: 1px solid rgba(201,154,46,0.2);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.attendance-rate-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0% var(--pct, 0%), rgba(201,154,46,0.12) var(--pct, 0%) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.attendance-rate-inner {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-heading);
}

.attendance-summary-stats {
  flex: 1;
}

.attendance-summary-stats p {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--text-muted);
}

.attendance-summary-stats strong {
  color: var(--text-heading);
}

.attendance-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.attendance-list-item:last-child { border-bottom: none; }

.attendance-event-info {
  flex: 1;
  min-width: 0;
}

.attendance-event-title {
  font-weight: 600;
  color: var(--text-heading);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attendance-event-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---- Certificates Tab ---- */
.cert-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cert-card:last-child { margin-bottom: 0; }

.cert-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border-color: rgba(201,154,46,0.35);
}

.cert-thumbnail-wrap {
  width: 110px;
  height: 76px;
  min-width: 110px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #faf6ec;
  border: 1px solid #e2d9c2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cert-zoom-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 22, 46, 0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(2px);
}

.cert-thumbnail-wrap:hover .cert-zoom-overlay {
  opacity: 1;
}

.cert-icon {
  width: 54px;
  height: 54px;
  min-width: 54px;
  border-radius: 10px;
  background: rgba(201,154,46,0.1);
  border: 1px solid rgba(201,154,46,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.cert-info {
  flex: 1;
  min-width: 0;
}

.cert-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.cert-title {
  font-weight: 700;
  font-size: 15.5px;
  color: var(--text-heading);
  margin: 0;
}

.cert-badge-type {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(201,154,46,0.12);
  color: var(--accent);
  border: 1px solid rgba(201,154,46,0.25);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cert-event {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 4px;
}

.cert-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.cert-code-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(201,154,46,0.06);
  border: 1px solid rgba(201,154,46,0.18);
  padding: 3px 8px;
  border-radius: 6px;
}

.cert-code-val {
  font-family: var(--font-display, monospace);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
}

.cert-copy-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 12px;
  opacity: 0.75;
  transition: opacity 0.15s ease;
}
.cert-copy-btn:hover { opacity: 1; }

.cert-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

@media (max-width: 680px) {
  .cert-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .cert-thumbnail-wrap {
    width: 100%;
    height: 140px;
  }
  .cert-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 4px;
  }
}

/* ---- Registration Table ---- */
.reg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.reg-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}

.reg-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}

.reg-table tr:last-child td { border-bottom: none; }

.reg-table tr:hover td { background: rgba(201,154,46,0.03); }

.reg-poster-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--navy-950, #0B1A2C);
}

.reg-poster-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: linear-gradient(135deg, #0B1A2C, #162d4f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* ---- Deletion Request ---- */
.deletion-section {
  margin-top: 32px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.deletion-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.deletion-header h2 {
  margin: 0;
  font-size: 16px;
  color: #ef4444;
  display: flex;
  align-items: center;
  gap: 8px;
}

.deletion-body {
  padding: 24px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 640px) {
  .form-grid-2 { grid-template-columns: 1fr; }
  .digital-id-card-wrapper { width: 100%; }
  .events-grid { grid-template-columns: 1fr; }
  .reg-table { display: block; overflow-x: auto; }
  .attendance-summary-bar { flex-direction: column; align-items: flex-start; }
  .member-tab-btn { font-size: 12px; padding: 8px 10px; min-width: 90px; }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

.form-field input[readonly] {
  background: #f9fafb;
  color: #6b7280;
  pointer-events: none;
}

/* ---- Loading overlay ---- */
.member-loading {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  z-index: 999;
}

.member-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(201,154,46,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.member-loading p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}
