/* ============================================================
   ALUMNICONNECT — GLOBAL DESIGN SYSTEM
   Clean Light UI · Daffodil Navy + Emerald Teal
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─── CSS VARIABLES ─── */
:root {
  /* Official Daffodil Brand Palette */
  --daffodil-header: #0B3897;
  --daffodil-footer: #1869BD;
  --daffodil-primary: #003F7E;
  --daffodil-primary-hover: #002D5A;
  --daffodil-primary-active: #001F3F;
  --daffodil-primary-disabled: rgba(0, 63, 126, 0.4);

  --bg-deep: #F1F5F9;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --bg-glass: #FFFFFF;
  --bg-glass-hover: #F8FAFC;
  --border-glass: #E2E8F0;
  --border-glow: rgba(11, 56, 151, 0.3);

  --diu-green: #00A859;
  --diu-blue: #0B3897;
  --primary: #003F7E;
  --primary-light: #0B3897;
  --primary-dark: #002D5A;
  --primary-glow: rgba(11, 56, 151, 0.1);

  --teal: #00A88A;
  --teal-light: #00C79E;
  --teal-glow: rgba(0, 168, 138, 0.12);

  --amber: #D97706;
  --amber-glow: rgba(217, 119, 6, 0.14);

  --purple: #9333EA;
  --purple-glow: rgba(147, 51, 234, 0.12);

  --green: #059669;
  --red: #DC2626;

  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;

  --bkash: #E2136E;
  --nagad: #FF6B00;
  --rocket: #8B2FC9;

  --sidebar-w: 250px;
  --topbar-h: 64px;

  /* Daffodil Border Radii Standard */
  --radius-btn: 10px;
  --radius-card: 14px;
  --radius-input: 8px;
  --radius-modal: 16px;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 4px 16px rgba(11, 56, 151, 0.1);
  --shadow-teal: 0 4px 16px rgba(0, 168, 138, 0.1);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── LUCIDE ICONS (replaces emoji glyphs) ─── */
.ui-icon, i[data-lucide], svg.lucide {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  stroke-width: 2;
  flex-shrink: 0;
}
.icon-star-filled { color: var(--amber, #F59E0B); fill: currentColor; }
.icon-star-empty { color: var(--text-muted); fill: none; }

.ui-icon[data-lucide="circle"] { fill: currentColor; stroke: none; }

/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

/* ─── UTILITIES ─── */
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

/* ─── GLASS CARD ─── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  word-break: break-word;
}
.glass-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}
.glass-surface {
  background: var(--bg-deep);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 16px;
}

/* ─── BUTTONS (TOUCH-FRIENDLY MIN 44PX TARGETS) ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-btn);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--daffodil-primary);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px rgba(0, 63, 126, 0.4);
}
.btn-primary:hover {
  background: var(--daffodil-primary-hover);
  box-shadow: 0 6px 20px rgba(0, 63, 126, 0.6);
  color: #FFFFFF;
}
.btn-primary:active {
  background: var(--daffodil-primary-active);
  transform: scale(0.98);
}
.btn-primary:disabled, .btn-primary[disabled] {
  background: var(--daffodil-primary-disabled);
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  background: var(--primary-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--bg-glass); }
.btn-danger {
  background: rgba(248,113,113,0.15);
  color: var(--red);
  border: 1px solid rgba(248,113,113,0.3);
}
.btn-danger:hover { background: rgba(248,113,113,0.25); }

/* ─── DAFFODIL OFFICIAL FOOTER (#1869BD) ─── */
.daffodil-footer {
  background: var(--daffodil-footer);
  color: #FFFFFF;
  padding: 32px 24px 84px 24px; /* extra bottom padding for mobile bottom nav */
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 40px;
  position: relative;
  z-index: 10;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand-logo {
  height: 38px;
  width: auto;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
}
.footer-links a {
  color: #FFFFFF;
  text-decoration: none;
  opacity: 0.9;
  transition: var(--transition);
}
.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  opacity: 0.85;
}
.btn-full { width: 100%; justify-content: center; }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: 12px; }

/* ─── FORMS (16PX MOBILE ZOOM PREVENTION & TOUCH HEIGHT) ─── */
.form-input, .form-select, textarea.form-input {
  width: 100%;
  min-height: 46px;
  background: var(--bg-deep);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px; /* 16px prevents iOS Safari zoom on focus */
  padding: 10px 14px;
  outline: none;
  transition: var(--transition);
  touch-action: manipulation;
}
.form-input:focus, .form-select:focus, textarea.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-card);
}
.form-input::placeholder { color: var(--text-muted); }
.form-select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.form-select option { background: var(--bg-card); color: var(--text-primary); }
.form-select.sm, .form-input.sm { min-height: 38px; padding: 6px 12px; font-size: 13px; width: auto; }

.input-group { margin-bottom: 16px; }
.input-label { display: block; font-size: 11px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── BADGES ─── */
.card-badge {
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
}
.card-badge.teal { background: var(--teal-glow); color: var(--teal); border: 1px solid rgba(0,212,170,0.3); }
.card-badge.indigo { background: var(--primary-glow); color: var(--primary-light); border: 1px solid rgba(11, 56, 151,0.3); }
.card-badge.amber { background: var(--amber-glow); color: var(--amber); border: 1px solid rgba(255,140,66,0.3); }
.card-badge.green { background: rgba(52,211,153,0.15); color: var(--green); }
.badge-count {
  background: var(--primary-glow);
  color: var(--primary-light);
  border: 1px solid rgba(11, 56, 151,0.3);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
}

/* ─── CARD HEADER ─── */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ─── LOGIN SCREEN ─── */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(11, 56, 151,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 56, 151,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.login-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.4;
}
.login-orb-1 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(11, 56, 151,0.4), transparent); top: -100px; left: -100px; animation: floatOrb 8s ease-in-out infinite; }
.login-orb-2 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(0,212,170,0.3), transparent); bottom: -100px; right: -100px; animation: floatOrb 10s ease-in-out infinite reverse; }

@keyframes floatOrb { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(30px,-30px) scale(1.05); } }

.login-container {
  width: 100%;
  max-width: 440px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 1;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.brand-logo-circle {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, rgba(11, 56, 151,0.3), rgba(0,212,170,0.3));
  border: 1px solid rgba(11, 56, 151,0.4);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(11, 56, 151,0.3);
}
.brand-logo-circle.small { width: 36px; height: 36px; border-radius: 10px; }
.brand-name { font-size: 24px; font-weight: 800; background: linear-gradient(135deg, var(--primary-light), var(--teal)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.brand-tag { font-size: 10px; font-weight: 700; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }

.login-card { width: 100%; }
.login-step { display: flex; flex-direction: column; gap: 16px; }
.login-title { font-size: 22px; font-weight: 800; color: var(--text-primary); }
.login-subtitle { font-size: 14px; color: var(--text-secondary); margin-top: -8px; }
.login-footer { font-size: 11px; color: var(--text-muted); text-align: center; }

.otp-sent-badge {
  background: var(--primary-glow);
  border: 1px solid rgba(11, 56, 151,0.3);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  color: var(--primary-light);
  text-align: center;
}
.otp-inputs { display: flex; gap: 10px; justify-content: center; }
.otp-box {
  width: 50px; height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}
.otp-box:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }

.tenant-selector { margin-bottom: 0; }

.sis-match-animation { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px; }
.sis-spinner {
  width: 48px; height: 48px;
  border: 3px solid rgba(11, 56, 151,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sis-text { font-size: 14px; color: var(--text-secondary); }

.sis-result { display: flex; align-items: center; gap: 16px; }
.sis-avatar {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}
.sis-name { font-size: 16px; font-weight: 700; }
.sis-details { font-size: 13px; color: var(--text-secondary); }
.sis-badge { font-size: 11px; font-weight: 700; color: var(--teal); margin-top: 4px; }
.sis-badge.verified::before {
  content: '';
  display: inline-block;
  width: 10px; height: 10px;
  margin-right: 4px;
  vertical-align: -1px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

.login-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.stat-pill {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-glass);
  border-radius: 99px;
  padding: 6px 16px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ─── APP LAYOUT ─── */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ─── SIDEBAR ─── */
.sidebar {
  grid-row: 1 / 3;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-glass);
  box-shadow: 2px 0 16px rgba(11, 56, 151, 0.06);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--border-glass);
}
.sidebar-brand-logo {
  height: 42px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
}
.sidebar-close { display: none; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; }

.tenant-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 12px 4px;
  background: rgba(11, 56, 151,0.1);
  border: 1px solid rgba(11, 56, 151,0.2);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 11px;
  color: var(--primary-light);
  font-weight: 600;
}
.tenant-dot { width: 6px; height: 6px; background: var(--teal); border-radius: 50%; flex-shrink: 0; animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
#active-tenant { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tenant-switch { cursor: pointer; opacity: 0.6; font-size: 14px; }
.tenant-switch:hover { opacity: 1; }

.sidebar-nav {
  padding: 8px 0;
  flex: 1;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  margin: 1px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}
.nav-item:hover { background: rgba(11, 56, 151, 0.06); color: var(--daffodil-primary); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(11, 56, 151,0.2), rgba(11, 56, 151,0.05));
  color: var(--primary-light);
  border: 1px solid rgba(11, 56, 151,0.2);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}
.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-label { flex: 1; }
.nav-badge {
  background: var(--primary);
  color: #fff;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}
.nav-badge.new { background: var(--teal); color: var(--bg-deep); }
.nav-divider { height: 1px; background: var(--border-glass); margin: 8px 16px; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border-glass);
  background: #F8FAFC;
  margin-top: auto;
}
.user-avatar-sm {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { font-size: 11px; color: var(--text-muted); }
.logout-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; padding: 4px; border-radius: 4px; transition: var(--transition); }
.logout-btn:hover { color: var(--red); }

/* ─── SIDEBAR CONTROL DECK (mobile only — see ≤900px block) ─── */
.sidebar-controls {
  display: none;
  padding: 14px 16px;
  margin-top: auto;
  border-top: 1px solid var(--border-glass);
}
.sidebar-controls-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.role-switcher-select.drawer {
  width: 100%;
  min-height: 48px;
  font-size: 14px;
  padding: 0 12px;
}
.sidebar-controls-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.drawer-btn {
  flex: 1;
  min-height: 48px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  touch-action: manipulation;
}
.drawer-btn:active { transform: scale(0.97); }
.drawer-btn:hover { border-color: var(--primary); color: var(--primary-light); }
.offline-status.drawer {
  margin-top: 10px;
  justify-content: center;
  padding: 8px 12px;
  font-size: 12px;
}
.offline-status.drawer .status-text { display: inline; }

/* ─── TOPBAR (DAFFODIL BRAND HEADER #0B3897) ─── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--daffodil-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px rgba(11, 56, 151, 0.4);

  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: var(--topbar-h);
  color: #FFFFFF;
  /* Grid items default to min-width:auto, which sizes the app-layout column to
     this bar's min-content width (~593px) and blows the whole shell out on
     phones. Pinning to 0 lets the column follow the viewport instead. */
  min-width: 0;
}
.topbar-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding-right: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}
.topbar-brand-logo img, .topbar-brand-logo svg {
  height: 34px;
  width: auto;
  object-fit: contain;
}
.hamburger { display: none; background: none; border: none; color: #FFFFFF; font-size: 24px; cursor: pointer; }
.topbar-search { flex: 1; position: relative; max-width: 540px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; color: rgba(255,255,255,0.55); pointer-events: none; }
.topbar-search-input {
  width: 100%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 99px;
  color: #FFFFFF;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  padding: 9px 14px 9px 36px;
  outline: none;
  transition: var(--transition);
}
.topbar-search-input:hover { background: rgba(255,255,255,0.14); }
.topbar-search-input:focus { border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.16); box-shadow: 0 0 0 3px rgba(255,255,255,0.08); }
.topbar-search-input::placeholder { color: rgba(255,255,255,0.55); }

.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; min-width: 0; }

/* Between the mobile breakpoint and full desktop the action cluster (~535px)
   plus the brand no longer fits beside the 280px sidebar, and spills past the
   viewport. Compact the labels through that band instead of overflowing. */
@media (min-width: 901px) and (max-width: 1200px) {
  .topbar { gap: 10px; padding: 0 16px; }
  .topbar-search { min-width: 0; }
  .offline-status .status-text { display: none; }
  .offline-status {
    width: 32px; height: 32px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .role-switcher-select { max-width: 130px; }
}
.offline-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  transition: var(--transition);
}
.offline-status.online { background: rgba(52,211,153,0.12); color: var(--green); border: 1px solid rgba(52,211,153,0.2); }
.offline-status.offline { background: var(--amber-glow); color: var(--amber); border: 1px solid rgba(255,140,66,0.3); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

.topbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 50%;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  position: relative;
}
.topbar-btn:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.3); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.18); }
.alert-btn-label { display: none; }
.notif-count {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--red);
  color: #fff;
  border-radius: 99px;
  font-size: 10px;
  line-height: 16px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-weight: 700;
  border: 2px solid var(--daffodil-header);
}
.topbar-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary-light), var(--teal));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  color: #FFFFFF;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.3);
  transition: var(--transition);
  flex-shrink: 0;
}
.topbar-avatar:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.2); border-color: rgba(255,255,255,0.5); }

/* ─── PAGES CONTAINER ─── */
.pages-container {
  overflow-y: auto;
  padding: 28px 32px;
  background: transparent;
  min-width: 0;
}
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ─── PAGE HEADER ─── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}
.page-title { font-size: 26px; font-weight: 800; color: var(--text-primary); }
.page-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.page-header-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ─── KPI GRID ─── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border-glass);
  transition: var(--transition);
}
.kpi-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.1;
  border-radius: var(--radius);
}
.kpi-card.indigo { background: linear-gradient(135deg, rgba(11, 56, 151,0.15), rgba(11, 56, 151,0.05)); border-color: rgba(11, 56, 151,0.25); }
.kpi-card.indigo::before { background: linear-gradient(135deg, var(--primary), transparent); }
.kpi-card.teal { background: linear-gradient(135deg, rgba(0,212,170,0.12), rgba(0,212,170,0.03)); border-color: rgba(0,212,170,0.2); }
.kpi-card.teal::before { background: linear-gradient(135deg, var(--teal), transparent); }
.kpi-card.purple { background: linear-gradient(135deg, rgba(192,132,252,0.12), rgba(192,132,252,0.03)); border-color: rgba(192,132,252,0.2); }
.kpi-card.purple::before { background: linear-gradient(135deg, var(--purple), transparent); }
.kpi-card.amber { background: linear-gradient(135deg, rgba(255,140,66,0.12), rgba(255,140,66,0.03)); border-color: rgba(255,140,66,0.2); }
.kpi-card.amber::before { background: linear-gradient(135deg, var(--amber), transparent); }
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }

.kpi-icon { font-size: 28px; flex-shrink: 0; }
.kpi-value { font-size: 28px; font-weight: 900; line-height: 1; letter-spacing: -1px; }
.kpi-label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; font-weight: 500; }
.kpi-trend { font-size: 11px; margin-top: 4px; font-weight: 600; }
.kpi-trend.up { color: var(--green); }

/* Mini KPIs */
.kpi-grid.four { grid-template-columns: repeat(4, 1fr); }
.mini-kpi { text-align: center; }
.mini-kpi-value { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.mini-kpi-value.teal { color: var(--teal); }
.mini-kpi-value.indigo { color: var(--primary-light); }
.mini-kpi-value.amber { color: var(--amber); }
.mini-kpi-value.green { color: var(--green); }
.mini-kpi-label { font-size: 12px; color: var(--text-secondary); }

/* ─── DASHBOARD SPLIT ─── */
.dashboard-split {
  display: grid;
  grid-template-columns: 65fr 35fr;
  gap: 20px;
}
.chart-tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.chart-tab {
  padding: 7px 16px;
  background: transparent;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.chart-tab.active { background: var(--primary-glow); color: var(--primary-light); border-color: rgba(11, 56, 151,0.3); }
.chart-tab:hover:not(.active) { color: var(--text-primary); border-color: rgba(255,255,255,0.15); }

.chart-container { padding: 20px; }

/* Funnel */
.funnel-bars { display: flex; flex-direction: column; gap: 12px; }
.funnel-item { display: flex; align-items: center; gap: 12px; }
.funnel-label { font-size: 12px; color: var(--text-secondary); font-weight: 600; width: 50px; }
.funnel-track { flex: 1; height: 28px; background: rgba(11, 56, 151, 0.08); border-radius: 6px; overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 6px; display: flex; align-items: center; padding-left: 10px; font-size: 11px; font-weight: 700; color: #fff; transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }
.funnel-fill.bkash { background: linear-gradient(90deg, #E2136E, #c00d5d); }
.funnel-fill.nagad { background: linear-gradient(90deg, #FF6B00, #e55e00); }
.funnel-fill.rocket { background: linear-gradient(90deg, #8B2FC9, #6d24a0); }
.funnel-fill.card { background: linear-gradient(90deg, #0B3897, #002D5A); }

/* Queue */
.queue-list { display: flex; flex-direction: column; gap: 8px; }
.queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}
.queue-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, rgba(11, 56, 151,0.4), rgba(0,212,170,0.4));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.queue-info { flex: 1; min-width: 0; }
.queue-name { font-size: 13px; font-weight: 600; }
.queue-sub { font-size: 11px; color: var(--text-muted); }
.queue-actions { display: flex; gap: 6px; }
.approve-btn { padding: 4px 10px; border-radius: 5px; border: none; background: rgba(52,211,153,0.15); color: var(--green); font-size: 11px; font-weight: 700; cursor: pointer; transition: var(--transition); font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
.approve-btn:hover { background: rgba(52,211,153,0.3); }
.review-btn { padding: 4px 10px; border-radius: 5px; border: none; background: var(--primary-glow); color: var(--primary-light); font-size: 11px; font-weight: 700; cursor: pointer; transition: var(--transition); font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
.review-btn:hover { background: rgba(11, 56, 151,0.3); }

/* Alerts */
.alerts-list { display: flex; flex-direction: column; gap: 10px; }
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}
.alert-item.critical { background: rgba(248,113,113,0.06); border-color: rgba(248,113,113,0.15); }
.alert-item.warning { background: rgba(255,140,66,0.06); border-color: rgba(255,140,66,0.15); }
.alert-item.info { background: rgba(0,212,170,0.06); border-color: rgba(0,212,170,0.15); }
.alert-item.success { background: rgba(52,211,153,0.06); border-color: rgba(52,211,153,0.15); }
.alert-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.alert-dot.red { background: var(--red); box-shadow: 0 0 8px var(--red); }
.alert-dot.amber { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.alert-dot.teal { background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.alert-dot.green { background: var(--green); box-shadow: 0 0 8px var(--green); }
.alert-title { font-size: 13px; font-weight: 600; }
.alert-sub { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* ─── DIRECTORY ─── */
.ai-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.ai-search-icon { font-size: 20px; flex-shrink: 0; }
.ai-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.ai-search-input::placeholder { color: var(--text-muted); }
.voice-btn { background: var(--primary-glow); border: 1px solid rgba(11, 56, 151,0.3); border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 16px; transition: var(--transition); }
.voice-btn:hover { background: rgba(11, 56, 151,0.3); }
.search-indicator { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--primary-light); }
.typing-dots { display: flex; gap: 3px; }
.typing-dots span { width: 4px; height: 4px; border-radius: 50%; background: var(--primary); animation: typingPulse 1s ease-in-out infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingPulse { 0%,100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.2); } }

.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid var(--border-glass);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.chip.active { background: var(--primary-glow); color: var(--primary-light); border-color: rgba(11, 56, 151,0.3); }
.chip:hover:not(.active) { border-color: rgba(255,255,255,0.2); color: var(--text-primary); }

.directory-stats-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; font-size: 13px; color: var(--text-secondary); }

.alumni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.alumni-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.alumni-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.alumni-card-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.alumni-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  flex-shrink: 0;
  position: relative;
}
.verified-ring { border: 2px solid var(--teal); }
.verified-badge-icon {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 16px; height: 16px;
  background: var(--teal);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
  color: var(--bg-deep);
  font-weight: 900;
}
.alumni-card-info { flex: 1; min-width: 0; }
.alumni-card-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alumni-card-role { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.alumni-card-location { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.alumni-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.alumni-tag {
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
}
.alumni-tag.mentor-tag { background: rgba(11, 56, 151,0.12); color: var(--primary-light); border-color: rgba(11, 56, 151,0.2); }

.alumni-card-actions { display: flex; gap: 8px; }
.connect-btn { flex: 1; padding: 8px; border-radius: 7px; border: 1px solid rgba(11, 56, 151,0.3); background: var(--primary-glow); color: var(--primary-light); font-size: 12px; font-weight: 700; cursor: pointer; transition: var(--transition); font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
.connect-btn:hover { background: rgba(11, 56, 151,0.3); }
.mentor-req-btn { flex: 1; padding: 8px; border-radius: 7px; border: 1px solid var(--daffodil-primary); background: var(--daffodil-primary); color: #FFFFFF; font-size: 12px; font-weight: 700; cursor: pointer; transition: var(--transition); font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
.mentor-req-btn:hover { background: var(--daffodil-primary-hover); }

.load-more-container { text-align: center; padding: 24px; }

/* ─── MENTORSHIP ─── */
.mentorship-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.mentorship-list { display: flex; flex-direction: column; gap: 10px; }
.mentorship-connection {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.mentorship-connection:hover { border-color: var(--border-glow); }
.mentorship-type-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.mentorship-type-badge.mentor { background: rgba(11, 56, 151,0.15); color: var(--primary-light); }
.mentorship-type-badge.mentee { background: var(--teal-glow); color: var(--teal); }
.health-score { font-size: 22px; font-weight: 900; color: var(--green); }

.pending-request {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.expiry-badge { padding: 2px 8px; border-radius: 99px; font-size: 10px; font-weight: 700; background: var(--amber-glow); color: var(--amber); border: 1px solid rgba(255,140,66,0.3); }

.matching-criteria { display: flex; flex-direction: column; gap: 10px; }
.criterion-item { display: flex; align-items: center; gap: 12px; }
.criterion-label { font-size: 12px; color: var(--text-secondary); width: 160px; flex-shrink: 0; font-weight: 500; }
.criterion-bar-track { flex: 1; height: 8px; background: rgba(11, 56, 151, 0.08); border-radius: 99px; overflow: hidden; }
.criterion-bar { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--teal)); display: flex; align-items: center; justify-content: flex-end; padding-right: 4px; font-size: 8px; font-weight: 700; color: #fff; }

.quota-display { display: flex; align-items: center; gap: 16px; }
.quota-ring { position: relative; width: 80px; height: 80px; }
.quota-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; color: var(--primary-light); }
.quota-label { font-size: 14px; font-weight: 600; }
.quota-sub { font-size: 12px; color: var(--text-muted); }

.suggested-mentor-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  transition: var(--transition);
}
.suggested-mentor-card:hover { border-color: var(--border-glow); }
.match-score { font-size: 18px; font-weight: 900; color: var(--teal); flex-shrink: 0; min-width: 48px; text-align: center; }

/* ─── DONATIONS ─── */
.campaigns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.campaign-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.campaign-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); border-color: var(--border-glow); }
.campaign-card-header { padding: 20px 20px 16px; }
.campaign-tag { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 99px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; display: inline-block; }
.campaign-tag.education { background: rgba(11, 56, 151,0.15); color: var(--primary-light); }
.campaign-tag.scholarship { background: var(--teal-glow); color: var(--teal); }
.campaign-tag.infrastructure { background: var(--amber-glow); color: var(--amber); }
.campaign-name { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.campaign-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

.campaign-progress { padding: 0 20px 16px; }
.progress-track { height: 8px; background: rgba(11, 56, 151, 0.08); border-radius: 99px; overflow: hidden; margin: 12px 0 8px; }
.progress-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--daffodil-primary), var(--primary-light)); position: relative; overflow: hidden; transition: width 1s cubic-bezier(0.4,0,0.2,1); }
.progress-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); animation: shimmer 2s linear infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.progress-meta { display: flex; justify-content: space-between; font-size: 12px; }
.progress-raised { font-weight: 700; color: var(--teal); }
.progress-goal { color: var(--text-muted); }

.campaign-footer { padding: 14px 20px; border-top: 1px solid var(--border-glass); display: flex; gap: 8px; align-items: center; }
.gateway-pills { display: flex; gap: 4px; flex: 1; }
.gateway-pill { padding: 2px 8px; border-radius: 5px; font-size: 10px; font-weight: 700; }
.gateway-pill.bkash { background: rgba(226,19,110,0.2); color: #E2136E; }
.gateway-pill.nagad { background: rgba(255,107,0,0.2); color: #FF6B00; }
.gateway-pill.rocket { background: rgba(139,47,201,0.2); color: #8B2FC9; }
.gateway-pill.card { background: var(--primary-glow); color: var(--primary-light); }
.donate-btn { padding: 8px 18px; border-radius: 7px; border: none; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; transition: var(--transition); font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; box-shadow: 0 4px 12px rgba(11, 56, 151,0.3); }
.donate-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(11, 56, 151,0.4); }

/* ─── EVENTS ─── */
.events-tabs { margin-bottom: 20px; }

.planner-event-picker-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.planner-event-picker-row #planner-event-select { width: auto; min-width: 200px; }

.planning-mode-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.planning-mode-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.planning-mode-option input[type="radio"] { margin-top: 3px; accent-color: var(--daffodil-primary); flex-shrink: 0; }
.planning-mode-option strong { display: block; font-size: 13px; margin-bottom: 2px; }
.planning-mode-option span { display: block; font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.planning-mode-option:has(input:checked) { border-color: var(--daffodil-primary); background: var(--primary-glow); }
@media (max-width: 480px) {
  .planning-mode-choice { grid-template-columns: 1fr; }
}
.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.event-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.event-card:hover { transform: translateY(-2px); border-color: var(--border-glow); box-shadow: var(--shadow-glow); }
.event-card-banner {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  position: relative;
}
.event-status {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
}
.event-status.live { background: rgba(248,113,113,0.2); color: var(--red); border: 1px solid rgba(248,113,113,0.3); animation: pulseBadge 1.5s ease-in-out infinite; }
.event-status.upcoming { background: var(--primary-glow); color: var(--primary-light); border: 1px solid rgba(11, 56, 151,0.3); }
.event-status.sold-out { background: rgba(139,156,196,0.1); color: var(--text-muted); border: 1px solid var(--border-glass); }
@keyframes pulseBadge { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
.event-card-body { padding: 16px; }
.event-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.event-meta { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }
.event-capacity-bar { height: 4px; background: rgba(11, 56, 151, 0.08); border-radius: 99px; overflow: hidden; margin: 8px 0; }
.event-capacity-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--teal), var(--primary)); }
.event-footer { padding: 12px 16px; border-top: 1px solid var(--border-glass); display: flex; align-items: center; justify-content: space-between; }
.event-price { font-size: 14px; font-weight: 700; color: var(--teal); }
.event-ticket-btn { padding: 6px 14px; border-radius: 6px; border: none; background: var(--primary-glow); color: var(--primary-light); font-size: 12px; font-weight: 700; cursor: pointer; transition: var(--transition); font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; border: 1px solid rgba(11, 56, 151,0.3); }
.event-ticket-btn:hover { background: rgba(11, 56, 151,0.25); }

/* ─── JOBS ─── */
.alumni-only-banner {
  background: linear-gradient(135deg, rgba(11, 56, 151,0.1), rgba(0,212,170,0.05));
  border: 1px solid rgba(11, 56, 151,0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--primary-light);
  font-weight: 600;
  margin-bottom: 20px;
}
.jobs-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.jobs-filters { display: flex; gap: 10px; margin-bottom: 16px; }
.jobs-filters .form-input { max-width: 300px; }
.jobs-filters .form-select { width: auto; }

.job-card {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  margin-bottom: 12px;
  transition: var(--transition);
  cursor: pointer;
}
.job-card:hover { border-color: var(--border-glow); transform: translateX(3px); }
.job-company-logo {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(11, 56, 151,0.2), rgba(0,212,170,0.2));
  border: 1px solid var(--border-glass);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.job-info { flex: 1; }
.job-title { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.job-company { font-size: 13px; color: var(--primary-light); font-weight: 600; }
.job-meta { display: flex; gap: 12px; margin-top: 6px; }
.job-meta-item { font-size: 11px; color: var(--text-muted); }
.job-tags { display: flex; gap: 5px; margin-top: 8px; }
.job-tag { padding: 2px 8px; border-radius: 99px; font-size: 10px; font-weight: 600; background: var(--bg-glass); border: 1px solid var(--border-glass); color: var(--text-secondary); }
.job-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.job-salary { font-size: 14px; font-weight: 700; color: var(--teal); }
.job-type-badge { padding: 3px 10px; border-radius: 99px; font-size: 10px; font-weight: 700; }
.job-type-badge.fulltime { background: rgba(52,211,153,0.12); color: var(--green); }
.job-type-badge.internship { background: var(--amber-glow); color: var(--amber); }
.job-type-badge.contract { background: var(--primary-glow); color: var(--primary-light); }
.apply-btn { padding: 6px 14px; border-radius: 6px; border: none; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; transition: var(--transition); }
.apply-btn:hover { background: var(--primary-light); }

.resume-upload-zone {
  border: 2px dashed var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.resume-upload-zone:hover { border-color: var(--primary); background: var(--primary-glow); }
.upload-icon { font-size: 28px; margin-bottom: 8px; }
.upload-text { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.upload-sub { font-size: 11px; color: var(--text-muted); }

.internship-item { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--bg-glass); border-radius: var(--radius-sm); margin-bottom: 8px; border: 1px solid var(--border-glass); font-size: 13px; }

/* ─── ANALYTICS ─── */
.analytics-tabs { margin-bottom: 20px; }
.analytics-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.analytics-split-2 { grid-template-columns: 1fr 1fr; }
#analytics-metrics { display: flex; flex-direction: column; gap: 12px; }
.analytics-metric-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--border-glass); }
.analytics-metric-item:last-child { border-bottom: none; }
.analytics-metric-label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.analytics-metric-value { font-size: 20px; font-weight: 800; }
.analytics-metric-change { font-size: 11px; font-weight: 600; }
.analytics-metric-change.up { color: var(--green); }
.analytics-metric-change.down { color: var(--red); }

.geo-heatmap { padding: 16px; }
.geo-countries { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.geo-country-item { display: flex; align-items: center; gap: 10px; }
.geo-country-name { font-size: 12px; color: var(--text-secondary); flex: 1; }
.geo-country-bar-track { width: 80px; height: 6px; background: rgba(11, 56, 151, 0.08); border-radius: 99px; overflow: hidden; }
.geo-country-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--teal)); }
.geo-country-count { font-size: 11px; font-weight: 700; color: var(--teal); min-width: 40px; text-align: right; }

/* ─── CHAPTERS ─── */
.chapters-layout { display: grid; grid-template-columns: 340px 1fr; gap: 20px; }
.chapter-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}
.chapter-node:hover { background: var(--bg-glass); border-color: var(--border-glass); }
.chapter-node.active { background: var(--primary-glow); border-color: rgba(11, 56, 151,0.2); }
.chapter-indent { padding-left: 24px; }
.chapter-icon { font-size: 14px; }
.chapter-name { font-size: 13px; font-weight: 600; flex: 1; }
.chapter-count { font-size: 11px; color: var(--text-muted); }

/* Shown where the interface has nothing real to list — chapter officers, for
   instance, which no table records. Deliberately reads as an absence rather
   than as a styled card, so it cannot be mistaken for content. */
/* Caption under the alumni map. States which countries are drawn and which
   real ones could not be positioned, so a missing pin never reads as zero. */
/* Names the query behind each Key Metrics figure, so the number can be checked
   rather than taken on trust. Replaces the "+8.4% vs last period" captions,
   which compared against a period nothing recorded. */
/* Names the column each mentor-suggestion comparison reads, in place of the
   invented percentage weights the criteria bars used to show. */
/* While an account is still on an issued temporary password, the portal is
   unusable: the navigation and page area are hidden behind the non-dismissable
   change-password modal, so there is nothing to click past it to. */
body.password-change-required .sidebar,
body.password-change-required .pages-container,
body.password-change-required .bottom-nav,
body.password-change-required .topbar-actions {
  visibility: hidden;
  pointer-events: none;
}

/* A plain textual action inside a form — "Forgot your password?" — that must
   read as a link rather than compete with the primary button next to it. */
.link-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 6px 0;
  background: none;
  border: none;
  color: var(--primary-light);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}
.link-btn:hover { color: var(--daffodil-primary); }

/* Neutral status line: used where the same message is shown whether or not an
   action found anything, so it must not look like success or failure. */
.login-note {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.criterion-source {
  font-size: 10px;
  color: var(--text-muted);
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.analytics-metric-source {
  font-size: 10px;
  color: var(--text-muted);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  margin-top: 2px;
  word-break: break-word;
}

.map-note {
  padding: 8px 14px 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
}

.chapter-empty-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  background: var(--bg-glass);
  border: 1px dashed var(--border-glass);
  border-radius: 8px;
  padding: 12px 14px;
}

/* Key/value listing used by the super-admin platform totals panel. */
.totals-list { display: flex; flex-direction: column; gap: 2px; }
.totals-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 8px 10px; border-radius: 6px; font-size: 12px;
}
.totals-row:nth-child(odd) { background: var(--bg-glass); }
.totals-key { color: var(--text-secondary); }
.totals-val { font-weight: 700; color: var(--text-primary); text-align: right; }
.chapter-type { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 99px; }
.chapter-type.regional { background: var(--primary-glow); color: var(--primary-light); }
.chapter-type.batch { background: var(--teal-glow); color: var(--teal); }
.chapter-type.interest { background: var(--amber-glow); color: var(--amber); }

.chapter-detail-content { padding: 0; }
.chapter-detail-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.chapter-detail-icon { font-size: 32px; }
.chapter-detail-title { font-size: 20px; font-weight: 800; }
.chapter-detail-sub { font-size: 13px; color: var(--text-secondary); }
.chapter-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.chapter-stat { text-align: center; padding: 14px; background: var(--bg-glass); border: 1px solid var(--border-glass); border-radius: var(--radius-sm); }
.chapter-stat-val { font-size: 22px; font-weight: 800; color: var(--teal); }
.chapter-stat-lab { font-size: 11px; color: var(--text-muted); }
.chapter-member { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-glass); font-size: 13px; }
.chapter-member:last-child { border-bottom: none; }

/* ─── NEWS ─── */
.news-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.news-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  transition: var(--transition);
}
.news-card:hover { border-color: var(--border-glow); }
.news-banner {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.news-card-body { padding: 18px; }
.news-category { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--primary-light); margin-bottom: 6px; }
.news-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.news-excerpt { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 14px; }
.news-footer { display: flex; align-items: center; justify-content: space-between; }
.news-author { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.news-author-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--teal)); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.news-meta { font-size: 11px; color: var(--text-muted); }
.moderated-badge { padding: 2px 8px; border-radius: 99px; font-size: 10px; font-weight: 700; background: rgba(52,211,153,0.12); color: var(--green); }

.spotlight-card { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--bg-glass); border: 1px solid var(--border-glass); border-radius: var(--radius-sm); margin-bottom: 10px; }
.spotlight-info { flex: 1; }
.spotlight-name { font-size: 13px; font-weight: 700; }
.spotlight-sub { font-size: 11px; color: var(--text-muted); }

/* ─── MAP ─── */
.map-container { padding: 0; overflow: hidden; }
.map-canvas { position: relative; height: 400px; background: linear-gradient(135deg, #0a1a2e, #0d2040); overflow: hidden; }
.map-bg {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 30% 40%, rgba(11, 56, 151,0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(0,212,170,0.08) 0%, transparent 50%);
}
.world-svg { width: 100%; height: 100%; opacity: 0.2; }
.map-clusters { position: absolute; inset: 0; }
.map-cluster {
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  animation: clusterPulse 3s ease-in-out infinite;
  border: 2px solid rgba(255,255,255,0.2);
}
.map-cluster:hover { transform: scale(1.2); z-index: 10; }
.map-cluster.xl { background: rgba(11, 56, 151,0.8); width: 64px; height: 64px; font-size: 14px; box-shadow: 0 0 20px rgba(11, 56, 151,0.6); }
.map-cluster.lg { background: rgba(0,212,170,0.7); width: 48px; height: 48px; font-size: 12px; box-shadow: 0 0 15px rgba(0,212,170,0.5); }
.map-cluster.md { background: rgba(255,140,66,0.7); width: 36px; height: 36px; font-size: 10px; box-shadow: 0 0 12px rgba(255,140,66,0.4); }
.map-cluster.sm { background: rgba(192,132,252,0.7); width: 28px; height: 28px; font-size: 9px; }
@keyframes clusterPulse { 0%,100% { box-shadow: 0 0 10px rgba(11, 56, 151,0.4); } 50% { box-shadow: 0 0 25px rgba(11, 56, 151,0.7); } }

.map-legend { display: flex; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--border-glass); font-size: 12px; color: var(--text-secondary); }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot.large { width: 14px; height: 14px; background: rgba(11, 56, 151,0.7); border-radius: 50%; }
.legend-dot.medium { width: 10px; height: 10px; background: rgba(0,212,170,0.7); border-radius: 50%; }
.legend-dot.small { width: 7px; height: 7px; background: rgba(255,140,66,0.7); border-radius: 50%; }

.map-stats { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; }
.map-stat-item { padding: 16px; border-right: 1px solid var(--border-glass); }
.map-stat-item:last-child { border-right: none; }
.map-stat-val { font-size: 22px; font-weight: 800; color: var(--teal); }
.map-stat-lab { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.location-toggle { display: flex; align-items: center; gap: 10px; }
.toggle-label { font-size: 13px; color: var(--text-secondary); font-weight: 600; }
.toggle-switch { width: 44px; height: 24px; background: rgba(255,255,255,0.1); border-radius: 12px; cursor: pointer; position: relative; transition: var(--transition); border: 1px solid var(--border-glass); }
.toggle-switch.active { background: var(--teal); border-color: var(--teal); }
.toggle-thumb { width: 18px; height: 18px; background: #fff; border-radius: 50%; position: absolute; top: 2px; left: 2px; transition: var(--transition); box-shadow: 0 2px 6px rgba(0,0,0,0.3); }
.toggle-switch.active .toggle-thumb { left: 22px; }

/* ─── PROFILE ─── */
.profile-layout { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.id-card-wrapper { display: flex; flex-direction: column; gap: 16px; }
.digital-id-card {
  width: 100%;
  background: linear-gradient(135deg, #1a1040 0%, #0d1a35 50%, #0a2a1a 100%);
  border: 1px solid rgba(11, 56, 151,0.3);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(11, 56, 151,0.15);
  position: relative;
}
.id-card-header {
  background: linear-gradient(90deg, rgba(11, 56, 151,0.3), rgba(0,212,170,0.2));
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.id-institution { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.id-logo { font-size: 22px; font-weight: 900; background: linear-gradient(135deg, var(--primary-light), var(--teal)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.id-card-body { padding: 20px 18px; display: flex; gap: 16px; align-items: center; }
.id-avatar {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 900;
  border: 3px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
}
.id-name { font-size: 18px; font-weight: 800; }
.id-degree { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.id-batch { font-size: 12px; color: var(--teal); font-weight: 600; margin-top: 2px; }
.id-role-badge { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 99px; background: var(--primary-glow); border: 1px solid rgba(11, 56, 151,0.3); color: var(--primary-light); font-size: 11px; font-weight: 700; }
.id-card-footer { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,0.06); display: flex; gap: 16px; align-items: center; background: rgba(0,0,0,0.2); }
#id-qr-code { width: 70px; height: 70px; background: #fff; border-radius: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
#id-qr-code canvas, #id-qr-code img { width: 70px !important; height: 70px !important; }
.id-number { font-size: 12px; font-weight: 700; font-family: monospace; color: var(--primary-light); }
.id-valid { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.id-verified-badge { font-size: 10px; font-weight: 700; color: var(--teal); margin-top: 4px; }
.id-hologram {
  position: absolute;
  top: 0; right: 0;
  width: 120px; height: 120px;
  background: conic-gradient(from 0deg, transparent, rgba(11, 56, 151,0.1), rgba(0,212,170,0.1), transparent, rgba(192,132,252,0.1), transparent);
  border-radius: 0 20px 0 100%;
  pointer-events: none;
  animation: hologramSpin 6s linear infinite;
}
@keyframes hologramSpin { to { filter: hue-rotate(360deg); } }

.id-wallet-btns { display: flex; flex-direction: column; gap: 8px; }
.wallet-btn { padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border-glass); background: var(--bg-glass); color: var(--text-primary); font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition); font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; text-align: center; }
.wallet-btn.apple:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.wallet-btn.google:hover { border-color: var(--teal); background: var(--teal-glow); color: var(--teal); }

.career-timeline { position: relative; padding-left: 24px; }
.career-timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--primary), var(--teal)); }
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-dot { position: absolute; left: -20px; top: 4px; width: 12px; height: 12px; background: var(--primary); border-radius: 50%; border: 2px solid var(--bg-deep); box-shadow: 0 0 8px var(--primary-glow); }
.timeline-company { font-size: 14px; font-weight: 700; }
.timeline-role { font-size: 12px; color: var(--primary-light); margin-top: 1px; }
.timeline-period { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.dsar-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.6; }
.dsar-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.consent-log { border: 1px solid var(--border-glass); border-radius: var(--radius-sm); overflow: hidden; }
.consent-header { padding: 8px 12px; background: rgba(255,255,255,0.03); font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border-glass); }
.consent-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border-glass); font-size: 12px; }
.consent-item:last-child { border-bottom: none; }
.consent-version { background: var(--primary-glow); color: var(--primary-light); border-radius: 4px; padding: 1px 6px; font-size: 10px; font-weight: 700; flex-shrink: 0; }
.consent-date { color: var(--text-secondary); }

/* ─── ADMIN ─── */
.admin-tabs { margin-bottom: 20px; }
.admin-section { }
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
.rbac-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rbac-table th { padding: 10px 14px; text-align: left; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.rbac-table th.module-col { background: transparent; color: var(--text-secondary); min-width: 180px; }
.rbac-table th.role-col { background: rgba(255,255,255,0.03); color: var(--text-muted); min-width: 100px; text-align: center; border-left: 1px solid var(--border-glass); }
.rbac-table td { padding: 10px 14px; border-top: 1px solid var(--border-glass); white-space: nowrap; }
.rbac-table td.module-name { font-weight: 600; color: var(--text-primary); font-size: 12px; }
.rbac-table td.perm-cell { text-align: center; border-left: 1px solid var(--border-glass); }
.perm-full { color: var(--green); font-weight: 700; font-size: 11px; }
.perm-edit { color: var(--teal); font-weight: 700; font-size: 11px; }
.perm-view { color: var(--text-muted); font-weight: 600; font-size: 11px; }
.perm-none { color: rgba(255,255,255,0.15); font-size: 11px; }
.perm-limited { color: var(--amber); font-weight: 600; font-size: 11px; }
.perm-audit { color: var(--purple); font-weight: 700; font-size: 11px; }
.perm-donate { color: var(--primary-light); font-weight: 600; font-size: 11px; }
.rbac-table tr:hover td { background: rgba(255,255,255,0.02); }

.audit-log-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-glass); }
.audit-log-item:last-child { border-bottom: none; }
.audit-log-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.audit-log-body { flex: 1; }
.audit-log-action { font-size: 13px; font-weight: 600; }
.audit-log-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.audit-log-hash { font-family: monospace; font-size: 10px; color: var(--text-muted); background: rgba(255,255,255,0.04); padding: 2px 6px; border-radius: 4px; }

.compliance-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.compliance-card { background: var(--bg-glass); border: 1px solid var(--border-glass); border-radius: var(--radius); padding: 20px; }
.compliance-icon { font-size: 28px; margin-bottom: 10px; }
.compliance-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.compliance-desc { font-size: 12px; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.5; }
.compliance-status { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.compliance-status.compliant { color: var(--green); }
.compliance-status.partial { color: var(--amber); }
.compliance-status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.tenant-card { background: var(--bg-glass); border: 1px solid var(--border-glass); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; display: flex; gap: 16px; align-items: center; }
.tenant-status { padding: 3px 10px; border-radius: 99px; font-size: 10px; font-weight: 700; }
.tenant-status.active { background: rgba(52,211,153,0.12); color: var(--green); }
.tenant-status.suspended { background: rgba(248,113,113,0.12); color: var(--red); }

/* ─── MODALS ─── */
/* Modal styles live in one place further down (see MODAL). */

/* Payment Gateway Selector */
.gateway-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gateway-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-glass);
  cursor: pointer;
  transition: var(--transition);
}
.gateway-option:hover { border-color: var(--primary); background: var(--primary-glow); }
.gateway-option.selected { border-color: var(--primary); background: var(--primary-glow); }
.gateway-logo { font-size: 22px; }
.gateway-name { font-size: 13px; font-weight: 700; }
.gateway-sub { font-size: 10px; color: var(--text-muted); }

.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.amount-option {
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: var(--transition);
  background: transparent;
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.amount-option:hover, .amount-option.selected { background: var(--primary-glow); border-color: rgba(11, 56, 151,0.4); color: var(--primary-light); }

.payment-step { text-align: center; padding: 20px; }
.payment-success { color: var(--green); font-size: 48px; margin-bottom: 12px; }
.payment-success-title { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.payment-success-sub { font-size: 13px; color: var(--text-secondary); }
.receipt-preview { background: var(--bg-glass); border: 1px solid var(--border-glass); border-radius: var(--radius-sm); padding: 14px; margin-top: 16px; text-align: left; }
.receipt-row { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 0; border-bottom: 1px solid var(--border-glass); }
.receipt-row:last-child { border-bottom: none; font-weight: 700; color: var(--teal); }

/* Mentor Request Modal */
.socratic-prompt { background: linear-gradient(135deg, rgba(11, 56, 151,0.1), rgba(0,212,170,0.05)); border: 1px solid rgba(11, 56, 151,0.2); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 16px; }
.socratic-prompt-icon { font-size: 20px; margin-bottom: 6px; }
.socratic-prompt-text { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
textarea.form-input { resize: vertical; min-height: 100px; }

/* ─── NOTIFICATION PANEL ─── */
.notif-panel {
  position: fixed;
  top: 60px;
  right: 0;
  width: 360px;
  height: calc(100vh - 60px);
  background: var(--bg-card);
  border-left: 1px solid var(--border-glass);
  box-shadow: -8px 0 30px rgba(15, 23, 42, 0.12);
  z-index: 500;
  padding: 20px;
  overflow-y: auto;
}
.notif-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.notif-header h3 { font-size: 17px; font-weight: 800; }
.notif-header button { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; }
.notif-item { display: flex; gap: 10px; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-glass); margin-bottom: 8px; transition: var(--transition); }
.notif-item:hover { border-color: var(--border-glow); background: var(--bg-glass); }
.notif-item-icon { font-size: 20px; flex-shrink: 0; }
.notif-item-body { flex: 1; }
.notif-item-title { font-size: 13px; font-weight: 600; }
.notif-item-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.notif-item-unread { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 4px; }

/* ─── BOTTOM NAV ─── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-glass);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
  justify-content: space-around;
  align-items: center;
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  transition: var(--transition);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  min-width: 48px;
  min-height: 48px;
  justify-content: center;
}
.bottom-nav-item.active { color: var(--primary-light); }
.bnav-icon { font-size: 20px; }
.bnav-label { font-size: 10px; }

/* ─── EMPTY STATE ─── */
.empty-state { text-align: center; padding: 40px; }
.empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
.empty-text { font-size: 14px; color: var(--text-muted); }

/* ─── FILTER CHIPS (MOBILE HORIZONTAL TOUCH SCROLL) ─── */
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 6px;
  margin-bottom: 16px;
}
.filter-chips::-webkit-scrollbar { display: none; }
.chip {
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid var(--border-glass);
  background: var(--bg-glass);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition);
  touch-action: manipulation;
}
.chip.active, .chip:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
  color: var(--primary-light);
}

/* ─── MODAL (MOBILE BOTTOM SHEET & DESKTOP CENTER) ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}
.modal-content {
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.3);
  position: relative;
}
.modal-close {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  touch-action: manipulation;
  position: relative;
  z-index: 1;
}
.modal-close:hover { background: rgba(11, 56, 151, 0.1); color: var(--daffodil-primary); }

/* ============================================================
   RESPONSIVE & MOBILE-FIRST BREAKPOINTS
   Complete screen-by-screen mobile optimization
   Breakpoints: 1200px → 900px → 768px → 600px → 480px → 360px
   ============================================================ */

/* ─── SLIDE-UP ANIMATION FOR MOBILE MODALS ─── */
@keyframes slideUpMobile {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ─── LARGE TABLET / SMALL LAPTOP (≤1200px) ─── */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-split { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: 1fr; }
  .analytics-grid .span-2 { grid-column: span 1; }
  .server-health-grid { grid-template-columns: repeat(2, 1fr); }
  .kanban-board-grid { grid-template-columns: repeat(2, 1fr); }
  .planner-metrics-ribbon { grid-template-columns: repeat(2, 1fr); }
  .segment-builder { grid-template-columns: 1fr 1fr; }
  .import-wizard-steps { grid-template-columns: repeat(2, 1fr); }
  .validation-summary-bar { grid-template-columns: repeat(2, 1fr); }
}

/* ─── TABLET / MOBILE MASTER BREAKPOINT (≤900px) ─── */
@media (max-width: 900px) {

  /* ── App Layout ── */
  .app-layout { grid-template-columns: 1fr; }

  /* ── Sidebar: Off-Canvas Drawer ── */
  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    z-index: 1500;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-glass);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .sidebar.open { left: 0; box-shadow: 20px 0 60px rgba(0,0,0,0.6); }
  .sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  /* ── Hamburger ── */
  .hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 20px;
    border-radius: var(--radius-sm);
  }

  /* ── Bottom Navigation Bar ── */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--bg-card);
    border-top: 1px solid var(--border-glass);
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.1);
  }
  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    min-height: 48px;
    transition: var(--transition);
    touch-action: manipulation;
  }
  .bottom-nav-item.active { color: var(--primary-light); }
  .bottom-nav-item.active .bnav-icon { color: var(--primary-light); transform: scale(1.1); }
  .bnav-icon { font-size: 18px; transition: transform 0.2s ease; }

  /* ── Pages Container ── */
  .pages-container {
    padding: 16px;
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }

  /* ── Topbar ──
     Phone topbar carries only: hamburger · brand · notifications · avatar.
     The role switcher, theme toggle, broadcast and DB status move into the
     sidebar drawer (.sidebar-controls) so nothing is lost, and the bar stops
     forcing the app shell wider than the viewport. */
  .topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .topbar-search { display: none; }
  .topbar-brand-logo {
    min-width: 0;
    flex: 0 1 auto;
    overflow: hidden;
    padding-right: 8px;
  }
  .topbar-brand-logo img, .topbar-brand-logo svg {
    height: 28px;
    max-width: 108px;
  }
  .topbar-actions {
    gap: 6px;
    min-width: 0;
    flex: 0 0 auto;
  }
  /* Relocated to the drawer on mobile */
  .topbar-actions .role-switcher-select,
  .topbar-actions #offline-status,
  .topbar-actions .theme-toggle-btn,
  .topbar-actions .alert-btn { display: none; }

  .topbar-btn {
    padding: 0 10px;
    font-size: 12px;
    min-height: 40px;
    min-width: 44px;
    justify-content: center;
  }
  .topbar-avatar { width: 44px; height: 44px; flex: 0 0 auto; }

  /* ── Sidebar drawer control deck ── */
  .sidebar-controls { display: block; }

  /* ── Page Header ── */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }
  .page-title { font-size: 22px; }
  .page-subtitle { font-size: 12px; }
  .page-header-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .page-header-actions .btn {
    flex: 1;
    justify-content: center;
  }
  .page-header-actions .form-select {
    width: 100%;
  }

  /* ── KPI Grid: 2 columns on tablet ── */
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi-card { padding: 14px; gap: 12px; }
  .kpi-icon { font-size: 22px; }
  .kpi-value { font-size: 22px; }
  .kpi-label { font-size: 11px; }

  /* ── Dashboard Split ── */
  .dashboard-split { grid-template-columns: 1fr; gap: 16px; }

  /* ── Chart Tabs: horizontal scroll ── */
  .chart-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    flex-wrap: nowrap;
  }
  .chart-tabs::-webkit-scrollbar { display: none; }
  .chart-tab { flex-shrink: 0; }

  /* ── Directory / Alumni Grid ── */
  .alumni-grid { grid-template-columns: 1fr; gap: 12px; }
  .alumni-card { padding: 16px; }
  .ai-search-bar { flex-wrap: wrap; }
  .directory-stats-bar { flex-direction: column; gap: 8px; align-items: flex-start; }

  /* ── Profile Layout: Stack ID card above content ── */
  .profile-layout { grid-template-columns: 1fr; gap: 16px; }
  .profile-hub-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }
  .profile-hub-tabs::-webkit-scrollbar { display: none; }
  .profile-hub-tab { flex-shrink: 0; }
  .profile-completeness-banner {
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    text-align: center;
  }
  .pc-items { max-width: 100%; justify-content: center; }

  /* ── Digital ID Card ── */
  .id-card-body { flex-direction: column; text-align: center; }
  .id-card-footer { flex-direction: column; text-align: center; gap: 12px; }

  /* ── Field Grids: stack on mobile ── */
  .field-grid-2, .field-grid-3, .field-grid-4 {
    grid-template-columns: 1fr !important;
  }

  /* ── Mentorship Layout ── */
  .mentorship-layout { grid-template-columns: 1fr; gap: 16px; }
  .mentorship-connection { flex-wrap: wrap; }
  .criterion-label { width: 100px; font-size: 11px; }

  /* ── Jobs Layout ── */
  .jobs-layout { grid-template-columns: 1fr; gap: 16px; }
  .jobs-filters { flex-wrap: wrap; }
  .jobs-filters .form-input { max-width: 100%; width: 100%; }
  .jobs-filters .form-select { width: 100%; }
  .job-card { flex-direction: column; gap: 10px; }
  .job-right { align-items: flex-start; flex-direction: row; gap: 12px; }

  /* ── Chapters Layout ── */
  .chapters-layout { grid-template-columns: 1fr; gap: 16px; }
  .chapter-stats-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .chapter-stat { padding: 10px; }
  .chapter-stat-val { font-size: 18px; }

  /* ── News Layout ── */
  .news-layout { grid-template-columns: 1fr; gap: 16px; }
  .news-banner { height: 100px; }

  /* ── Events Grid ── */
  .events-grid { grid-template-columns: 1fr; gap: 12px; }

  /* ── Donations / Campaigns ── */
  .campaigns-grid { grid-template-columns: 1fr; gap: 12px; }
  .campaign-footer { flex-wrap: wrap; }

  /* ── Analytics ── */
  .analytics-grid { grid-template-columns: 1fr !important; gap: 12px; }
  .analytics-grid .span-2 { grid-column: span 1; }
  .analytics-split-2 { grid-template-columns: 1fr !important; }
  .geo-countries { grid-template-columns: 1fr; }

  /* ── INLINE STYLE OVERRIDES ──
     app.js uses inline style="display:grid;grid-template-columns:..."
     which requires !important to override on mobile */
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  /* Exceptions: keep 2-col for very small items */
  .amount-grid[style*="grid-template-columns"],
  .demo-role-grid[style*="grid-template-columns"],
  .broadcast-read-receipts[style*="grid-template-columns"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* Keep alumni-grid 1-col (already class-based) */
  .alumni-grid[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  /* Force form grids to stack */
  form[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* ── Map ── */
  .map-canvas { height: 280px; }
  .map-stats { grid-template-columns: repeat(3, 1fr); }
  .map-stat-item { padding: 10px; }
  .map-stat-val { font-size: 16px; }
  .map-legend { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }

  /* ── Career Tracker ── */
  .career-tracker-layout { grid-template-columns: 1fr; gap: 16px; }
  .career-tracker-banner { flex-direction: column; text-align: center; gap: 10px; }

  /* ── API Layout ── */
  .api-layout { grid-template-columns: 1fr; gap: 16px; }
  .api-enterprise-badge { flex-direction: column; text-align: center; }

  /* ── Admin Panel ── */
  .admin-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    margin-bottom: 16px;
    scrollbar-width: none;
  }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tabs .chart-tab {
    flex-shrink: 0;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 12px;
  }
  .admin-section {
    width: 100%;
    overflow-x: hidden;
  }
  .table-scroll {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
  }
  .rbac-table { min-width: 600px; }
  .compliance-grid { grid-template-columns: 1fr; }
  .tenant-card { flex-direction: column; text-align: center; gap: 10px; }

  /* ── Server Health ── */
  .server-health-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .server-card { padding: 10px; }
  .server-val { font-size: 16px; }

  /* ── Sync Overview ── */
  .sync-overview-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  /* ── Kanban & Planner ── */
  .kanban-board-grid { grid-template-columns: 1fr; gap: 12px; }
  .kanban-column { min-height: 200px; }
  .planner-metrics-ribbon { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  /* ── Import Wizard ── */
  .import-wizard-steps { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .validation-summary-bar { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .segment-builder { grid-template-columns: 1fr; }

  /* ── Broadcast ── */
  .broadcast-read-receipts { grid-template-columns: repeat(3, 1fr); gap: 6px; }

  /* ── Badges Grid ── */
  .alumni-badges-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }

  /* ── Modals: Bottom Sheet ── */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
    background: rgba(0,0,0,0.7);

  }
  .modal-content {
    width: 100%;
    max-height: 88vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 20px;
    animation: slideUpMobile 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.8);
    position: relative;
    overflow-y: auto;
  }
  /* Drag Handle Pill */
  .modal-content::before {
    content: '';
    display: block;
    width: 40px;
    height: 5px;
    background: rgba(255,255,255,0.25);
    border-radius: 99px;
    margin: 0 auto 16px auto;
  }

  /* ── Tables: horizontal scroll ── */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ── Touch Target 44px Enforcer ── */
  .btn, .form-input, .form-select, .chart-tab, .topbar-btn, .modal-close {
    min-height: 44px;
    touch-action: manipulation;
  }

  /* ── Notification Panel: Full-width overlay ── */
  .notif-panel {
    width: 100%;
    right: 0;
    top: 0;
    height: 100vh;
    height: 100dvh;
    z-index: 2000;
    padding: 16px;
    background: var(--bg-card);
  }

  /* ── Funnel Bars ── */
  .funnel-label { width: 40px; font-size: 11px; }

  /* ── Glass Card ── */
  .glass-card { padding: 16px; }
  .glass-surface { padding: 12px; }

  /* ── Queue Actions ── */
  .queue-item { flex-wrap: wrap; gap: 8px; }
  .queue-actions { width: 100%; display: flex; gap: 6px; }
  .queue-actions .approve-btn,
  .queue-actions .review-btn { flex: 1; text-align: center; padding: 6px 8px; }

  /* ── Payment Gateway Grid ── */
  .gateway-grid { grid-template-columns: 1fr; }

  /* ── Login Stats ── */
  .login-stats { gap: 8px; }
  .stat-pill { font-size: 11px; padding: 4px 12px; }

  /* ── Branding Color Grid ── */
  .branding-color-grid { grid-template-columns: 1fr; }

  /* ── Events & Analytics Tabs: Horizontal Scroll ── */
  .events-tabs, .analytics-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
    padding-bottom: 8px;
    flex-wrap: nowrap;
  }
  .events-tabs::-webkit-scrollbar,
  .analytics-tabs::-webkit-scrollbar { display: none; }
  .events-tabs .chart-tab,
  .analytics-tabs .chart-tab { flex-shrink: 0; }

  /* ── Alumni-Only Banner ── */
  .alumni-only-banner {
    font-size: 12px;
    padding: 10px 14px;
    text-align: center;
    line-height: 1.4;
  }

  /* ── Mini KPI Cards (Donations header) ── */
  .kpi-grid.four { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .mini-kpi { padding: 12px; text-align: center; }
  .mini-kpi-value { font-size: 18px; }
  .mini-kpi-label { font-size: 10px; }

  /* ── DSAR / Data Rights Section ── */
  .dsar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .dsar-actions .btn { flex: 1; min-width: 120px; justify-content: center; font-size: 12px; }
  .dsar-desc { font-size: 12px; line-height: 1.5; }

  /* ── Verification Badges Grid ── */
  .verification-badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .verify-pill { font-size: 11px; padding: 4px 10px; }

  /* ── Socratic Prompt (ConnectAI) ── */
  .socratic-prompt {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 12px;
  }
  .socratic-prompt-text { font-size: 13px; }

  /* ── Input Groups ── */
  .input-group { margin-bottom: 12px; }
  .input-label { font-size: 12px; margin-bottom: 4px; }
  .form-input, .form-select { font-size: 16px; } /* Prevents iOS zoom */

  /* ── Spotlight Cards (News sidebar) ── */
  .spotlight-card { padding: 10px; gap: 8px; }
  .spotlight-avatar { width: 36px; height: 36px; font-size: 12px; }
  .spotlight-name { font-size: 12px; }

  /* ── ID Wallet Buttons ── */
  .id-wallet-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
  }
  .wallet-btn { width: 100%; justify-content: center; text-align: center; }

  /* ── Card Badge ── */
  .card-badge { font-size: 10px; padding: 2px 8px; }
  .badge-count { font-size: 10px; }

  /* ── Planner Metric Cards ── */
  .pmetric-card { padding: 10px; }
  .pmetric-val { font-size: 16px; }
  .pmetric-lab { font-size: 10px; }

  /* ── SIS Integration Items ── */
  .sis-integration-item { flex-wrap: wrap; gap: 8px; padding: 10px; }

  /* ── Waitlist Items ── */
  .waitlist-item { flex-wrap: wrap; gap: 8px; font-size: 12px; padding: 10px; }

  /* ── Self-Report Prompt Items ── */
  .self-report-prompt-item { padding: 10px; gap: 8px; }
  .prompt-question { font-size: 12px; }

  /* ── Enrichment Stats ── */
  .enrichment-stat-val { font-size: 14px; }
  .enrichment-stat-label { font-size: 11px; }

  /* ── Broadcast History Items ── */
  .broadcast-history-item { padding: 12px; }

  /* ── Consent Items ── */
  .consent-item { flex-wrap: wrap; gap: 8px; font-size: 11px; }

  /* ── Badge Cards ── */
  .badge-card { padding: 8px; }
  .badge-icon { font-size: 20px; }
  .badge-title { font-size: 10px; }

  /* ── Priority Tags ── */
  .priority-tag { font-size: 10px; padding: 2px 8px; }

  /* ── Sponsor Tier Cards ── */
  .sponsor-tier-card { padding: 10px; }

  /* ── API Log Items ── */
  .api-log-item { flex-wrap: wrap; gap: 6px; font-size: 11px; }
  .api-method { font-size: 9px; }
  .api-log-path { font-size: 10px; word-break: break-all; }

  /* ── API Endpoint Items ── */
  .api-endpoint-item { padding: 8px; }
  .api-endpoint-path { font-size: 11px; word-break: break-all; }
}

/* ─── TABLET PORTRAIT (≤768px) ─── */
@media (max-width: 768px) {

  /* ── Topbar: Hide text-heavy items ── */
  .topbar-btn .btn-text,
  .topbar-btn span:not(.notif-count) {
    /* Allow buttons to stay icon-only on smaller tablets */
  }
  .topbar { height: 52px; }
  .topbar-search { max-width: 150px; }

  /* ── KPI Grid: 2 columns, more compact ── */
  .kpi-grid { gap: 8px; }
  .kpi-card { padding: 12px; gap: 10px; }

  /* ── Map Stats ── */
  .map-stats { grid-template-columns: repeat(2, 1fr); }
  .map-stat-item:nth-child(odd):last-child { grid-column: span 2; }
  .map-canvas { height: 240px; }

  /* ── Chapter Stats ── */
  .chapter-stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* ── Broadcast Read Receipts ── */
  .broadcast-read-receipts { grid-template-columns: repeat(3, 1fr); }
  .receipt-stat-val { font-size: 14px; }

  /* ── Profile Section Cards ── */
  .profile-section-card { padding: 14px; }
  .profile-section-header { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* ── Quota Display ── */
  .quota-display { flex-direction: column; text-align: center; }
}

/* ─── PHABLET (≤600px) ─── */
@media (max-width: 600px) {

  /* ── Topbar: Minimal mode ── */
  .topbar-search { display: none; }
  .topbar-btn { padding: 6px; }
  .topbar-btn span:not(.notif-count):not(.bnav-icon) {
    display: none;
  }
  .topbar-actions .role-switcher-select { max-width: 110px; font-size: 10px; padding: 4px 6px; }

  /* ── Page Title ── */
  .page-title { font-size: 20px; }
  .page-subtitle { font-size: 11px; }

  /* ── KPI Grid: still 2-col but tighter ── */
  .kpi-grid { gap: 6px; }
  .kpi-card { padding: 10px; gap: 8px; }
  .kpi-icon { font-size: 20px; }
  .kpi-value { font-size: 20px; }
  .kpi-label { font-size: 10px; }
  .kpi-trend { font-size: 10px; }

  /* ── Alumni Card: compact ── */
  .alumni-card { padding: 14px; }
  .alumni-card-name { font-size: 14px; }
  .alumni-card-actions { flex-direction: column; gap: 6px; }
  .connect-btn, .mentor-req-btn, .referral-btn { padding: 10px; font-size: 12px; }

  /* ── Events Card ── */
  .event-card-body { padding: 12px; }
  .event-title { font-size: 14px; }
  .event-footer { padding: 10px 12px; }

  /* ── News Card ── */
  .news-banner { height: 80px; }
  .news-card-body { padding: 14px; }
  .news-title { font-size: 15px; }
  .news-excerpt { font-size: 12px; margin-bottom: 10px; }

  /* ── Campaign Card ── */
  .campaign-card-header { padding: 14px 14px 10px; }
  .campaign-name { font-size: 14px; }
  .campaign-footer { padding: 10px 14px; }

  /* ── Jobs Card ── */
  .job-card { padding: 14px; }
  .job-title { font-size: 14px; }
  .job-meta { flex-wrap: wrap; gap: 6px; }
  .job-tags { flex-wrap: wrap; }

  /* ── Sync Overview ── */
  .sync-overview-grid { grid-template-columns: repeat(2, 1fr); }

  /* ── Map Stats ── */
  .map-stats { grid-template-columns: repeat(2, 1fr); }
  .map-stat-val { font-size: 14px; }
  .map-stat-lab { font-size: 10px; }

  /* ── Server Health ── */
  .server-health-grid { grid-template-columns: repeat(2, 1fr); }

  /* ── Import Wizard ── */
  .import-wizard-steps { grid-template-columns: repeat(2, 1fr); }
  .wizard-step-num { font-size: 14px; }

  /* ── Demo Role Grid ── */
  .demo-role-grid { grid-template-columns: 1fr 1fr; gap: 4px; }
  .demo-role-btn { padding: 6px 8px; font-size: 10px; }

  /* ── Login ── */
  .login-container { padding: 16px; gap: 16px; }
  .login-title { font-size: 18px; }
  .login-card { padding: 16px; }
  .brand-name { font-size: 20px; }

  /* ── OTP Boxes ── */
  .otp-box { width: 44px; height: 48px; font-size: 18px; }
  .otp-inputs { gap: 6px; }

  /* ── Badges Grid ── */
  .alumni-badges-grid { grid-template-columns: repeat(2, 1fr); }

  /* ── Enrichment Stat ── */
  .enrichment-stat-val { font-size: 14px; }

  /* ── Engagement Score ── */
  .score-badge-circle { width: 60px; height: 60px; font-size: 22px; }
  .score-points { font-size: 20px; }
}

/* ─── MOBILE (≤480px) ─── */
@media (max-width: 480px) {

  /* ── Pages Container: tighter padding ── */
  .pages-container { padding: 12px; padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }

  /* ── Page Header ── */
  .page-header { margin-bottom: 14px; gap: 8px; }
  .page-title { font-size: 18px; letter-spacing: -0.3px; }

  /* ── KPI Grid: single column ── */
  .kpi-grid { grid-template-columns: 1fr; gap: 8px; }
  .kpi-card { padding: 12px; flex-direction: row; gap: 12px; }

  /* ── Glass Card ── */
  .glass-card { padding: 12px; border-radius: 12px; }
  .card-header { margin-bottom: 12px; }
  .card-title { font-size: 14px; }

  /* ── Chart ── */
  .chart-container { padding: 10px; }

  /* ── Funnel ── */
  .funnel-track { height: 22px; }
  .funnel-fill { font-size: 10px; }

  /* ── Queue Items ── */
  .queue-avatar { width: 32px; height: 32px; font-size: 11px; }
  .queue-name { font-size: 12px; }

  /* ── Directory: full-bleed cards ── */
  .alumni-grid { gap: 10px; }
  .alumni-avatar { width: 42px; height: 42px; font-size: 14px; }
  .alumni-tags { gap: 4px; }
  .alumni-tag { font-size: 9px; padding: 1px 6px; }

  /* ── Profile: compact ID card ── */
  .id-card-header { padding: 10px 14px; }
  .id-card-body { padding: 14px; }
  .id-avatar { width: 56px; height: 56px; font-size: 18px; }
  .id-name { font-size: 16px; }
  .id-card-footer { padding: 10px 14px; }
  #id-qr-code { width: 56px; height: 56px; }
  #id-qr-code canvas, #id-qr-code img { width: 56px !important; height: 56px !important; }

  /* ── Profile Sections ── */
  .profile-field-row { padding: 8px 10px; }
  .field-label { font-size: 10px; }
  .field-val { font-size: 12px; }
  .privacy-badge { font-size: 10px; padding: 2px 6px; }

  /* ── Career Timeline ── */
  .timeline-company { font-size: 13px; }
  .timeline-role { font-size: 11px; }
  .timeline-period { font-size: 10px; }

  /* ── Mentorship ── */
  .mentorship-connection { padding: 10px; gap: 8px; }
  .health-score { font-size: 18px; }
  .matching-criteria { gap: 8px; }
  .criterion-label { width: 80px; font-size: 10px; }
  .suggested-mentor-card { padding: 10px; gap: 8px; }

  /* ── Jobs ── */
  .job-company-logo { width: 40px; height: 40px; font-size: 16px; }
  .job-salary { font-size: 13px; }
  .resume-upload-zone { padding: 16px; }
  .upload-icon { font-size: 22px; }

  /* ── Events ── */
  .event-card-banner { height: 60px; font-size: 24px; }
  .event-title { font-size: 13px; }
  .event-meta { font-size: 11px; }
  .event-price { font-size: 13px; }

  /* ── Donations / Campaigns ── */
  .campaign-card-header { padding: 12px; }
  .campaign-name { font-size: 13px; }
  .campaign-desc { font-size: 11px; }
  .campaign-progress { padding: 0 12px 12px; }
  .gateway-pills { flex-wrap: wrap; }

  /* ── Analytics ── */
  .analytics-metric-value { font-size: 16px; }
  .geo-country-bar-track { width: 60px; }

  /* ── Chapters ── */
  .chapter-detail-title { font-size: 16px; }
  .chapter-detail-icon { font-size: 24px; }
  .chapter-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .chapter-stat-val { font-size: 16px; }

  /* ── News ── */
  .news-title { font-size: 14px; }
  .news-banner { height: 70px; font-size: 36px; }

  /* ── Map ── */
  .map-canvas { height: 200px; }
  .map-stats { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .map-stat-item { padding: 8px 6px; }
  .map-stat-val { font-size: 14px; }

  /* ── Admin ── */
  .audit-log-item { gap: 8px; padding: 10px 0; }
  .audit-log-icon { width: 28px; height: 28px; font-size: 12px; }
  .audit-log-action { font-size: 12px; }
  .compliance-card { padding: 14px; }
  .compliance-icon { font-size: 22px; }
  .compliance-title { font-size: 13px; }

  /* ── API Page ── */
  .api-app-card { padding: 10px; flex-wrap: wrap; }
  .api-app-icon { width: 36px; height: 36px; font-size: 14px; }
  .webhook-item { flex-wrap: wrap; gap: 8px; }
  .webhook-url { font-size: 10px; }

  /* ── Career Tracker ── */
  .career-registry-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
  }
  .career-registry-avatar { width: 38px; height: 38px; font-size: 13px; margin-top: 2px; }
  .career-registry-name { font-size: 13px; line-height: 1.3; }
  .career-registry-current { font-size: 11px; margin-top: 2px; }
  .career-registry-history { font-size: 10px; }
  .career-registry-action {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--border-glass);
  }
  .career-tracker-banner {
    padding: 14px;
    border-radius: var(--radius-sm);
  }
  .career-tracker-main .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .career-tracker-main .page-header-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .career-tracker-main .page-header-actions .form-select {
    width: 100%;
  }

  /* ── Sync Panel ── */
  .sync-stat-val { font-size: 18px; }
  .sync-queue-item { font-size: 11px; padding: 8px; }

  /* ── Broadcast ── */
  .broadcast-history-header { flex-direction: column; gap: 6px; }
  .broadcast-history-title { font-size: 13px; }
  .broadcast-channels { gap: 4px; }
  .receipt-stat { padding: 6px; }
  .receipt-stat-val { font-size: 14px; }

  /* ── Server Health ── */
  .server-health-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .server-val { font-size: 16px; }

  /* ── Kanban ── */
  .kanban-column { min-height: 150px; padding: 10px; }
  .kanban-card { padding: 10px; }

  /* ── Import Wizard ── */
  .wizard-step-item { padding: 8px; font-size: 10px; }
  .wizard-step-num { font-size: 14px; }
  .validation-summary-bar { grid-template-columns: 1fr 1fr; }
  .vstat-num { font-size: 16px; }

  /* ── Modals ── */
  .modal-content { padding: 16px; }
  .modal-title { font-size: 16px; }

  /* ── Notification Panel ── */
  .notif-panel { padding: 12px; }
  .notif-item { padding: 10px; gap: 8px; }
  .notif-item-title { font-size: 12px; }

  /* ── Leaderboard ── */
  .leaderboard-item { gap: 8px; padding: 8px 0; }
  .leaderboard-name { font-size: 12px; }
  .leaderboard-amount { font-size: 12px; }

  /* ── Poll ── */
  .poll-widget { padding: 14px; }
  .poll-title { font-size: 14px; }
  .poll-question-text { font-size: 13px; }
  .poll-option-btn { padding: 10px 12px; font-size: 12px; }

  /* ── NID Vault ── */
  .nid-vault-card { padding: 12px; }
  .cipher-box { font-size: 10px; padding: 8px 10px; }

  /* ── Segment Builder ── */
  .segment-builder { grid-template-columns: 1fr; }
  .target-val { font-size: 20px; }

  /* ── Dropzone ── */
  .dropzone { padding: 20px; }
  .dropzone-icon { font-size: 28px; }
  .dropzone-title { font-size: 13px; }

  /* ── Onboarding ── */
  .onboarding-header { padding-bottom: 8px; }

  /* ── Amount Grid ── */
  .amount-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .amount-option { padding: 8px; font-size: 12px; }

  /* ── Wallet Buttons ── */
  .wallet-btn { padding: 8px 12px; font-size: 12px; }

  /* ── Consent Log ── */
  .consent-item { padding: 8px 10px; font-size: 11px; gap: 8px; flex-wrap: wrap; }
}

/* ─── ULTRA-SMALL SCREENS (≤360px) ─── */
@media (max-width: 360px) {

  /* ── Even tighter spacing ── */
  .pages-container { padding: 8px; padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }

  /* ── KPI: single column, minimal ── */
  .kpi-grid { grid-template-columns: 1fr; gap: 6px; }
  .kpi-value { font-size: 18px; }
  .kpi-icon { font-size: 18px; }

  /* ── Page Header ── */
  .page-title { font-size: 16px; }

  /* ── Topbar ── */
  .topbar { padding: 0 8px; gap: 4px; }
  .topbar-actions .role-switcher-select { max-width: 90px; font-size: 9px; }

  /* ── Cards ── */
  .glass-card { padding: 10px; border-radius: 10px; }
  .alumni-card { padding: 10px; }

  /* ── Sync ── */
  .sync-overview-grid { grid-template-columns: 1fr; }

  /* ── Admin Tabs ── */
  .admin-tabs .chart-tab { font-size: 11px; padding: 6px 10px; }

  /* ── Map Stats ── */
  .map-stats { grid-template-columns: 1fr; }

  /* ── Chapter Stats ── */
  .chapter-stats-grid { grid-template-columns: 1fr; }

  /* ── Badges ── */
  .alumni-badges-grid { grid-template-columns: repeat(2, 1fr); }

  /* ── Import Wizard: stack ── */
  .import-wizard-steps { grid-template-columns: 1fr; }
  .validation-summary-bar { grid-template-columns: 1fr; }

  /* ── Server Health ── */
  .server-health-grid { grid-template-columns: 1fr; }

  /* ── Demo Logins ── */
  .demo-role-grid { grid-template-columns: 1fr; }
  .demo-role-btn[style*="grid-column"] { grid-column: span 1 !important; }

  /* ── Login ── */
  .login-container { padding: 10px; }
  .login-title { font-size: 16px; }
  .brand-name { font-size: 18px; }
  .otp-box { width: 38px; height: 42px; font-size: 16px; }

  /* ── Bottom Nav ── */
  .bottom-nav-item { font-size: 9px; }
  .bnav-icon { font-size: 16px; }
  .bnav-label { font-size: 9px; }

  /* ── Amount Grid: 2 columns ── */
  .amount-grid { grid-template-columns: repeat(2, 1fr); }

  /* ── Planner Metrics ── */
  .planner-metrics-ribbon { grid-template-columns: 1fr; }
}

/* ─── SSO BUTTONS (REQ-02) ─── */
.sso-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
  margin: 4px 0;
}
.sso-divider::before, .sso-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-glass);
}
.sso-buttons { display: flex; flex-direction: column; gap: 8px; }
.sso-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  width: 100%;
  justify-content: center;
}
.sso-btn.google:hover { border-color: #4285F4; background: rgba(66,133,244,0.08); }
.sso-btn.microsoft:hover { border-color: #00A4EF; background: rgba(0,164,239,0.08); }
.sso-icon {
  width: 22px;
  height: 22px;
  background: var(--primary-glow);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
}

/* ─── TRANSLITERATION BADGE (REQ-03) ─── */
.transliteration-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(192,132,252,0.12), rgba(11, 56, 151,0.06));
  border: 1px solid rgba(192,132,252,0.25);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--purple);
  font-weight: 600;
  margin-bottom: 12px;
  animation: fadeIn 0.3s ease;
}
.tl-latency {
  background: rgba(0,212,170,0.15);
  color: var(--teal);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
}

/* ─── CAREER TRACKER (REQ-08) ─── */
.career-tracker-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(0,212,170,0.08), rgba(11, 56, 151,0.06)) !important;
  border-color: rgba(0,212,170,0.2) !important;
}
.ct-banner-icon { font-size: 32px; flex-shrink: 0; }
.ct-banner-body { flex: 1; }
.ct-banner-title { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.ct-banner-sub { font-size: 12px; color: var(--text-secondary); }

.career-tracker-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
.career-tracker-main {}
.career-tracker-sidebar {}

.career-registry-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-glass);
}
.career-registry-item:last-child { border-bottom: none; }
.career-registry-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  flex-shrink: 0;
}
.career-registry-info { flex: 1; }
.career-registry-name { font-size: 14px; font-weight: 700; }
.career-registry-current { font-size: 12px; color: var(--primary-light); margin-top: 1px; }
.career-registry-history { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.career-update-badge {
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.career-update-badge.ai { background: rgba(0,212,170,0.12); color: var(--teal); border: 1px solid rgba(0,212,170,0.2); }
.career-update-badge.self { background: var(--primary-glow); color: var(--primary-light); border: 1px solid rgba(11, 56, 151,0.2); }
.career-update-badge.pending { background: var(--amber-glow); color: var(--amber); border: 1px solid rgba(255,140,66,0.2); }

.self-report-prompt-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
}
.self-report-prompt-item:hover { border-color: var(--amber); }
.prompt-question { font-size: 13px; font-weight: 600; flex: 1; }
.prompt-name { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.enrichment-stat-item { padding: 10px 0; border-bottom: 1px solid var(--border-glass); display: flex; justify-content: space-between; align-items: center; }
.enrichment-stat-item:last-child { border-bottom: none; }
.enrichment-stat-label { font-size: 12px; color: var(--text-secondary); }
.enrichment-stat-val { font-size: 16px; font-weight: 800; }

/* ─── DEVELOPER API (REQ-18) ─── */
.api-enterprise-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(0,212,170,0.06), rgba(11, 56, 151,0.06)) !important;
  border-color: rgba(0,212,170,0.2) !important;
}
.api-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.api-main {}
.api-sidebar {}

.api-app-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  transition: var(--transition);
}
.api-app-card:hover { border-color: var(--border-glow); }
.api-app-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(11, 56, 151,0.2), rgba(0,212,170,0.2));
  border: 1px solid var(--border-glass);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.api-app-info { flex: 1; }
.api-app-name { font-size: 14px; font-weight: 700; }
.api-app-client { font-family: monospace; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.api-app-scopes { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.scope-tag { padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; background: var(--primary-glow); color: var(--primary-light); }
.api-key-btn { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border-glass); background: transparent; color: var(--text-secondary); font-size: 11px; cursor: pointer; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; transition: var(--transition); }
.api-key-btn:hover { border-color: var(--primary); color: var(--primary-light); }

.webhook-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.webhook-url { font-family: monospace; font-size: 12px; color: var(--text-secondary); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.webhook-events { display: flex; gap: 4px; }
.webhook-event-tag { font-size: 10px; padding: 1px 6px; background: var(--teal-glow); color: var(--teal); border-radius: 4px; font-weight: 600; }
.webhook-status { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.webhook-status.active { background: rgba(52,211,153,0.12); color: var(--green); }

.api-log-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-glass);
  font-size: 12px;
}
.api-log-item:last-child { border-bottom: none; }
.api-method { font-weight: 700; font-size: 10px; padding: 2px 6px; border-radius: 4px; font-family: monospace; }
.api-method.get { background: rgba(52,211,153,0.15); color: var(--green); }
.api-method.post { background: var(--primary-glow); color: var(--primary-light); }
.api-method.del { background: rgba(248,113,113,0.15); color: var(--red); }
.api-log-path { color: var(--text-secondary); flex: 1; font-family: monospace; }
.api-log-status { font-weight: 700; }
.api-log-status.ok { color: var(--green); }
.api-log-status.err { color: var(--red); }
.api-log-time { color: var(--text-muted); font-size: 10px; }

.api-endpoint-item {
  padding: 10px;
  border-bottom: 1px solid var(--border-glass);
  cursor: pointer;
  transition: var(--transition);
}
.api-endpoint-item:last-child { border-bottom: none; }
.api-endpoint-item:hover { background: var(--bg-glass); border-radius: var(--radius-sm); }
.api-endpoint-method { font-size: 10px; font-weight: 700; font-family: monospace; }
.api-endpoint-path { font-size: 12px; font-family: monospace; color: var(--text-secondary); margin-top: 2px; }
.api-endpoint-desc { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.sis-integration-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.sis-integration-icon { font-size: 20px; }
.sis-integration-info { flex: 1; }
.sis-integration-name { font-size: 13px; font-weight: 700; }
.sis-integration-type { font-size: 11px; color: var(--text-muted); }
.sis-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sis-status-dot.connected { background: var(--green); box-shadow: 0 0 6px var(--green); }
.sis-status-dot.pending { background: var(--amber); }

/* ─── OFFLINE SYNC PANEL (REQ-10) ─── */
.offline-sync-panel { display: flex; flex-direction: column; gap: 16px; }
.sync-overview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.sync-stat-card { background: var(--bg-glass); border: 1px solid var(--border-glass); border-radius: var(--radius-sm); padding: 16px; text-align: center; }
.sync-stat-val { font-size: 24px; font-weight: 800; color: var(--teal); }
.sync-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.sync-payload-bar-wrap { margin: 8px 0; }
.sync-payload-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.sync-payload-track { height: 10px; background: rgba(11, 56, 151, 0.08); border-radius: 99px; overflow: hidden; }
.sync-payload-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--teal), var(--primary)); }

.sync-queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 12px;
}
.sync-queue-type { padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.sync-queue-type.mutation { background: var(--primary-glow); color: var(--primary-light); }
.sync-queue-type.checkin { background: var(--teal-glow); color: var(--teal); }
.sync-queue-type.conflict { background: rgba(248,113,113,0.15); color: var(--red); }

/* ─── BROADCAST HISTORY (REQ-12) ─── */
.broadcast-history-item {
  padding: 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  transition: var(--transition);
}
.broadcast-history-item:hover { border-color: var(--border-glow); }
.broadcast-history-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.broadcast-history-title { font-size: 14px; font-weight: 700; }
.broadcast-history-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.broadcast-channels { display: flex; gap: 6px; margin-bottom: 12px; }
.channel-badge { padding: 2px 8px; border-radius: 99px; font-size: 10px; font-weight: 700; }
.channel-badge.sms { background: rgba(52,211,153,0.12); color: var(--green); }
.channel-badge.push { background: var(--primary-glow); color: var(--primary-light); }
.channel-badge.email { background: var(--teal-glow); color: var(--teal); }
.broadcast-read-receipts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.receipt-stat { text-align: center; padding: 8px; background: rgba(255,255,255,0.03); border-radius: var(--radius-sm); }
.receipt-stat-val { font-size: 18px; font-weight: 800; }
.receipt-stat-label { font-size: 10px; color: var(--text-muted); }

/* ─── REFERRAL BUTTON (REQ-07) ─── */
.referral-btn {
  flex: 1;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid rgba(0,212,170,0.3);
  background: var(--teal-glow);
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  white-space: nowrap;
}
.referral-btn:hover { background: rgba(0,212,170,0.2); }

/* ─── CAMPAIGN REAL-TIME TICKER (REQ-05) ─── */
.campaign-live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: 4px;
}
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  animation: livePulse 1s ease-in-out infinite;
}
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ─── TENANT BRANDING EDITOR (REQ-01) ─── */
.tenant-branding-editor {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
}
.branding-editor-title { font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.branding-color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.color-field { display: flex; align-items: center; gap: 8px; }
.color-swatch { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--border-glass); cursor: pointer; }
.color-label { font-size: 12px; color: var(--text-secondary); }




/* ─── PROFILE COMPLETENESS & GAMIFICATION ─── */
.profile-completeness-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(11, 56, 151,0.1), rgba(0,212,170,0.06)) !important;
  border-color: rgba(11, 56, 151,0.3) !important;
  padding: 16px 20px;
}
.pc-left { flex: 1; }
.pc-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.pc-track { height: 8px; background: rgba(11, 56, 151, 0.1); border-radius: 99px; overflow: hidden; margin-bottom: 6px; }
.pc-fill { height: 100%; background: linear-gradient(90deg, var(--daffodil-primary), var(--primary-light)); border-radius: 99px; transition: width 0.5s ease; }
.pc-sub { font-size: 12px; color: var(--text-secondary); }
.pc-score-ring { position: relative; width: 70px; height: 70px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pc-ring-val { position: absolute; font-size: 15px; font-weight: 800; color: var(--primary-light); }
.pc-items { display: flex; flex-wrap: wrap; gap: 8px; max-width: 280px; }
.pc-item { font-size: 11px; padding: 3px 8px; border-radius: 99px; font-weight: 600; }
.pc-item.done { background: var(--teal-glow); color: var(--teal); border: 1px solid rgba(0,212,170,0.2); }
.pc-item.missing { background: rgba(255,255,255,0.04); color: var(--text-muted); border: 1px solid var(--border-glass); }

.engagement-score-display { text-align: center; padding: 12px 0; }
.score-badge-circle {
  width: 72px; height: 72px; margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,140,66,0.2), rgba(11, 56, 151,0.2));
  border: 2px solid var(--amber);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.score-points { font-size: 24px; font-weight: 900; color: var(--amber); }
.score-level { font-size: 12px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }

.alumni-badges-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.badge-card {
  text-align: center; padding: 10px;
  background: var(--bg-glass); border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm); transition: var(--transition);
}
.badge-card:hover { border-color: var(--border-glow); transform: translateY(-2px); }
.badge-icon { font-size: 24px; margin-bottom: 4px; }
.badge-title { font-size: 11px; font-weight: 700; color: var(--text-primary); }
.badge-desc { font-size: 9px; color: var(--text-muted); margin-top: 2px; }

/* ─── LEADERBOARD ─── */
.leaderboard-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border-glass);
}
.leaderboard-item:last-child { border-bottom: none; }
.rank-badge {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.rank-badge.rank-1 { background: #FFD700; color: #000; }
.rank-badge.rank-2 { background: #C0C0C0; color: #000; }
.rank-badge.rank-3 { background: #CD7F32; color: #fff; }
.rank-badge.rank-other { background: rgba(255,255,255,0.08); color: var(--text-muted); }
.leaderboard-info { flex: 1; }
.leaderboard-name { font-size: 13px; font-weight: 700; }
.leaderboard-sub { font-size: 11px; color: var(--text-muted); }
.leaderboard-amount { font-size: 13px; font-weight: 800; color: var(--teal); }

/* ─── POLL WIDGET ─── */
.poll-widget { padding: 18px; margin-bottom: 20px; border-color: rgba(11, 56, 151,0.3) !important; }
.poll-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.poll-title { font-size: 15px; font-weight: 700; }
.poll-meta { font-size: 11px; color: var(--teal); font-weight: 600; }
.poll-question-text { font-size: 14px; font-weight: 600; margin-bottom: 14px; color: var(--text-primary); }
.poll-options { display: flex; flex-direction: column; gap: 10px; }
.poll-option-btn {
  position: relative; overflow: hidden;
  padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass); background: rgba(255,255,255,0.03);
  color: var(--text-primary); font-size: 13px; font-weight: 600;
  text-align: left; cursor: pointer; transition: var(--transition);
  display: flex; justify-content: space-between; align-items: center;
}
.poll-option-btn:hover { border-color: var(--primary); background: rgba(11, 56, 151,0.08); }
.poll-option-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: rgba(11, 56, 151,0.18); border-right: 2px solid var(--primary);
  transition: width 0.6s ease; pointer-events: none;
}
.poll-option-text { position: relative; z-index: 1; }
.poll-option-pct { position: relative; z-index: 1; font-weight: 800; font-size: 12px; color: var(--primary-light); }

.trending-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.trending-tag { font-size: 11px; padding: 4px 10px; border-radius: 99px; background: var(--bg-glass); border: 1px solid var(--border-glass); color: var(--text-secondary); cursor: pointer; transition: var(--transition); }
.trending-tag:hover { border-color: var(--primary); color: var(--primary-light); }

/* ─── NID/BRC VAULT (REQ-14) ─── */
.nid-vault-card { padding: 16px; background: var(--bg-glass); border: 1px solid var(--border-glass); border-radius: var(--radius-sm); margin-bottom: 12px; }
.vault-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.vault-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.cipher-box {
  font-family: monospace; font-size: 11px; color: var(--teal);
  background: rgba(0,0,0,0.4); padding: 10px 14px; border-radius: 6px;
  border: 1px dashed rgba(0,212,170,0.3); word-break: break-all; margin: 8px 0;
}
.vault-meta { display: flex; gap: 16px; font-size: 11px; color: var(--text-muted); }

/* ─── BULK IMPORT ─── */
.dropzone {
  border: 2px dashed var(--border-glow); border-radius: var(--radius-sm);
  padding: 32px; text-align: center; background: rgba(11, 56, 151,0.03);
  cursor: pointer; transition: var(--transition); margin-bottom: 16px;
}
.dropzone:hover { border-color: var(--primary); background: rgba(11, 56, 151,0.08); }
.dropzone-icon { font-size: 36px; margin-bottom: 8px; }
.dropzone-title { font-size: 14px; font-weight: 700; }
.dropzone-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ─── SEGMENTATION ENGINE ─── */
.segment-builder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.segment-target-counter {
  padding: 16px; background: linear-gradient(135deg, rgba(0,212,170,0.1), rgba(11, 56, 151,0.05));
  border: 1px solid rgba(0,212,170,0.25); border-radius: var(--radius-sm);
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;
}
.target-val { font-size: 24px; font-weight: 900; color: var(--teal); }
.target-label { font-size: 12px; color: var(--text-secondary); }

/* ─── EVENT WAITLIST ─── */
.waitlist-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px; background: var(--bg-glass); border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 13px;
}

/* ─── DEMO ROLE LOGIN BUTTONS ─── */
.demo-logins-container {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-glass);
}
.demo-logins-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  text-align: center;
}
.demo-role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.demo-role-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  justify-content: flex-start;
  touch-action: manipulation;
}
.demo-role-btn:hover {
  border-color: var(--diu-green);
  background: rgba(0, 168, 89, 0.12);
  color: var(--text-primary);
}
.demo-role-icon { font-size: 14px; }

/* ─── ROLE BADGE PILL IN TOPBAR ─── */
.role-switcher-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(0, 168, 89, 0.15);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300A859' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  border: 1px solid rgba(0, 168, 89, 0.3);
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  border-radius: 99px;
  padding: 4px 28px 4px 12px;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}
.role-switcher-select:hover {
  background-color: rgba(0, 168, 89, 0.25);
  border-color: var(--teal);
}
/* The dropdown list is native chrome — background/color on <option> is the
   only part browsers reliably let us style. Without this the options
   inherited the pill's white text and vanished against the list's own
   white background. */
.role-switcher-select option {
  background: #FFFFFF;
  color: var(--text-primary);
  font-weight: 600;
  padding: 10px 12px;
}

/* Topbar sits on the navy header — the green pill reads better in white here. */
.topbar-actions .role-switcher-select {
  height: 38px;
  padding: 0 30px 0 14px;
  background-color: rgba(255,255,255,0.12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  border-color: rgba(255,255,255,0.18);
  color: #FFFFFF;
}
.topbar-actions .role-switcher-select:hover {
  background-color: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.35);
}

/* ─── SERVER HEALTH CARDS (SUPER ADMIN) ─── */
.server-health-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.server-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}
.server-val { font-size: 20px; font-weight: 800; color: var(--teal); }
.server-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ─── 10-SECTION ENHANCED PROFILE HUB ─── */
.profile-hub-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-glass);
  scrollbar-width: thin;
}
.profile-hub-tab {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-hub-tab:hover, .profile-hub-tab.active {
  background: rgba(0, 168, 89, 0.15);
  border-color: var(--diu-green);
  color: var(--text-primary);
}

.profile-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.profile-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-glass);
}
.profile-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
}
.privacy-badge.public { color: var(--teal); border-color: rgba(0, 212, 170, 0.3); background: rgba(0, 212, 170, 0.1); }
.privacy-badge.alumni { color: var(--diu-green); border-color: rgba(0, 168, 89, 0.3); background: rgba(0, 168, 89, 0.1); }
.privacy-badge.private { color: var(--red); border-color: rgba(248, 113, 113, 0.3); background: rgba(248, 113, 113, 0.1); }

.verification-badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.verify-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 168, 89, 0.15);
  border: 1px solid rgba(0, 168, 89, 0.3);
  color: var(--primary-light);
}

.field-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.field-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.profile-field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
}
.field-label { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.field-val { font-size: 13px; color: var(--text-primary); font-weight: 600; margin-top: 2px; }

/* ─── BULK IMPORT 4-STEP WIZARD ─── */
.import-wizard-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.wizard-step-item {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
}
.wizard-step-item.active {
  background: rgba(0, 168, 89, 0.15);
  border-color: var(--diu-green);
  color: var(--teal);
}
.wizard-step-num {
  font-size: 16px;
  font-weight: 800;
  display: block;
  margin-bottom: 2px;
}

.validation-summary-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.vstat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}
.vstat-num { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.vstat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.duplicate-strategy-box {
  background: rgba(255, 140, 66, 0.1);
  border: 1px solid rgba(255, 140, 66, 0.3);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin: 14px 0;
}

.progress-bar-container {
  height: 8px;
  background: var(--bg-surface);
  border-radius: 99px;
  overflow: hidden;
  margin: 12px 0;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--diu-green), var(--teal));
  width: 0%;
  transition: width 0.3s ease;
}

/* ─── FIRST LOGIN ONBOARDING MODAL ─── */
.onboarding-wizard {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.onboarding-header {
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-glass);
}
/* ─── EVENT MANAGEMENT PLANNER WORKSPACE CSS ─── */
.planner-metrics-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.pmetric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 14px;

}
.pmetric-val { font-size: 22px; font-weight: 800; color: var(--text-primary); }
.pmetric-lab { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; margin-top: 2px; }

.kanban-board-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}
.kanban-column {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-glass);
  font-weight: 700;
  font-size: 13px;
}
.kanban-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: grab;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.kanban-card:hover {
  transform: translateY(-2px);
  border-color: var(--teal);
}
.priority-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.priority-tag.critical { background: rgba(248,113,113,0.2); color: var(--red); }
.priority-tag.high { background: rgba(251,191,36,0.2); color: var(--amber); }
.priority-tag.medium { background: rgba(0,168,89,0.2); color: var(--teal); }
.priority-tag.low { background: rgba(148,163,184,0.2); color: var(--text-secondary); }

.sponsor-tier-card {
  border-left: 4px solid var(--teal);
}
.sponsor-tier-card.title-tier { border-left-color: #ffd700; }
.sponsor-tier-card.gold-tier { border-left-color: #fbbf24; }
.sponsor-tier-card.silver-tier { border-left-color: #cbd5e1; }
.sponsor-tier-card.bronze-tier { border-left-color: #cd7f32; }



/* ─── SHARED LOADING / EMPTY / ERROR STATES ─── */
@keyframes skeletonPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.85; }
}
.skeleton-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md, 14px);
  padding: 18px;
  margin-bottom: 12px;
  animation: skeletonPulse 1.4s ease-in-out infinite;
}
.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  margin-bottom: 10px;
}
.skeleton-line:last-child { margin-bottom: 0; }
.skeleton-line-lg { height: 18px; width: 65%; }
.skeleton-line-sm { width: 40%; }

.state-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  border: 1px dashed var(--border-glass);
  border-radius: var(--radius-md, 14px);
  background: var(--bg-glass);
}
.state-icon { font-size: 34px; margin-bottom: 12px; line-height: 1; }
.state-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.state-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 6px; max-width: 42ch; }
.state-retry { margin-top: 16px; min-height: 44px; padding: 0 20px; }
.state-error { border-color: rgba(248,113,113,0.35); background: rgba(248,113,113,0.06); }
.state-error .state-title { color: var(--red, #F87171); }

.notif-item { cursor: pointer; transition: var(--transition); }
.notif-item:hover { background: var(--bg-glass); }
.notif-item.unread { background: rgba(11, 56, 151,0.06); }

@media (max-width: 900px) {
  .state-panel { padding: 32px 18px; }
  .state-icon { font-size: 30px; }
}

.notif-header-actions { display: flex; align-items: center; gap: 8px; }
.notif-readall {
  background: none;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  min-height: 36px;
  cursor: pointer;
  transition: var(--transition);
}
.notif-readall:hover { border-color: var(--primary); color: var(--primary-light); }
@media (max-width: 900px) { .notif-readall { min-height: 44px; } }

/* ─── LOGIN ERROR BANNER ─── */
.login-error {
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.35);
  border-radius: var(--radius-sm);
  color: var(--red, #F87171);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 14px;
  margin-bottom: 14px;
  text-align: center;
}
.login-error.hidden { display: none; }
#login-submit-btn:disabled { opacity: 0.6; cursor: progress; }

.field-unset { color: var(--text-muted); font-style: italic; font-weight: 400; }

/* ─── v2 COMPONENTS (vault, broadcasts, custom fields, tickets, polls) ─── */
.vault-banner {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.vault-banner.ok   { background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.3); color: var(--green, #34D399); }
.vault-banner.warn { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.35); color: var(--red, #F87171); }

.vault-row, .custom-field-row, .broadcast-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.vault-icon { font-size: 20px; flex-shrink: 0; }
.custom-field-form {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 16px;
}

/* Poll: mark the option the viewer chose */
.poll-option-btn.voted { border-color: var(--teal); }
.poll-option-btn.voted .poll-option-text { font-weight: 800; color: var(--teal); }

/* Mentor match score pill */
.match-score-badge {
  background: rgba(0,168,89,0.15);
  border: 1px solid rgba(0,168,89,0.3);
  color: var(--teal);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  flex-shrink: 0;
}

/* Event card action row */
.event-card-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.event-card-actions .btn { flex: 1; min-width: 0; }

/* Danger button (account deletion) */
.btn-danger {
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.4);
  color: var(--red, #F87171);
}
.btn-danger:hover { background: rgba(248,113,113,0.2); }

.mt-8 { margin-top: 8px; }

/* Compliance card states — the pill reflects real system state */
.compliance-card.at_risk { border-color: rgba(248,113,113,0.35); }
.compliance-status.at_risk { background: rgba(248,113,113,0.15); color: var(--red, #F87171); }
.compliance-status.pending { background: rgba(255,140,66,0.15); color: var(--amber, #FF8C42); }

/* ─── MOBILE: v2 components ─── */
@media (max-width: 900px) {
  .vault-row, .custom-field-row, .broadcast-entry {
    flex-wrap: wrap;
    padding: 14px;
    gap: 10px;
  }
  .broadcast-entry > div:last-child { text-align: left; width: 100%; }
  .vault-row .btn, .custom-field-row .btn { min-height: 44px; }
  .event-card-actions { flex-direction: column; }
  .event-card-actions .btn { width: 100%; min-height: 46px; }
  .custom-field-form { padding: 14px; }
  .amount-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .amount-btn { min-height: 48px; font-size: 14px; }
  .gateway-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gateway-option { min-height: 68px; }
  .otp-box { width: 46px; height: 52px; font-size: 20px; }
  .poll-option-btn { min-height: 48px; }
  .job-card { flex-direction: column; align-items: stretch; }
  .job-right { align-items: stretch; margin-top: 12px; }
  .job-right .apply-btn, .job-right .referral-btn { min-height: 46px; width: 100%; }
  .mentorship-connection, .pending-request, .suggested-mentor-card {
    flex-wrap: wrap;
    gap: 10px;
  }
  .pending-request .btn, .suggested-mentor-card .btn { min-height: 44px; flex: 1; }
  .donor-row { padding: 12px 10px; }
}

/* ─── PLANNER TABLES → MOBILE CARDS (Phase 7) ─── */
/* .planner-table replaced by .ev-table in the v5 event module. */

/* Timeline */
.timeline-track { display: flex; flex-direction: column; gap: 4px; }
.timeline-item { display: flex; gap: 14px; padding: 4px 0; }
.timeline-dot {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; margin-top: 16px;
  background: var(--bg-surface); border: 3px solid var(--border-glass);
}
.timeline-item.done .timeline-dot { border-color: var(--teal); background: var(--teal); }
.timeline-item.in_progress .timeline-dot { border-color: var(--primary); }
.timeline-item.delayed .timeline-dot { border-color: var(--amber, #FF8C42); }
.timeline-body {
  flex: 1; min-width: 0;
  background: var(--bg-glass); border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm); padding: 14px;
}
.timeline-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.timeline-desc { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.timeline-meta { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* Analytics blocks */
.analytics-block {
  background: var(--bg-glass); border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm); padding: 16px;
}
.analytics-block-title { font-size: 13px; font-weight: 800; margin-bottom: 10px; }
.analytics-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border-glass);
}
.analytics-row:last-child { border-bottom: none; }
.analytics-row span { color: var(--text-secondary); }

@media (max-width: 900px) {
  .timeline-item { gap: 10px; }
  .timeline-body { padding: 12px; }
  .analytics-block { padding: 14px; }
  .planner-metrics-ribbon { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
}

/* ============================================================
   PHASE 7 — MOBILE UX PASS
   Applies platform touch-target minimums (44px, 48px for primary
   actions) and a 12px floor on body text across every page.
   ============================================================ */
@media (max-width: 900px) {

  /* ── Touch targets ──
     Chips, tabs, pills and small selects were 27–40px tall. */
  .chip,
  .chart-tab,
  .profile-hub-tab,
  .analytics-tabs .chart-tab,
  .admin-tabs .chart-tab,
  .events-tabs .chart-tab,
  .api-key-btn,
  .voice-btn,
  .form-select.sm,
  .btn.btn-sm,
  .filter-chip,
  .segment-chip {
    min-height: 44px;
    padding-top: 0;
    padding-bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }

  .chip, .filter-chip, .segment-chip { padding-left: 14px; padding-right: 14px; }
  .chart-tab, .profile-hub-tab { padding-left: 16px; padding-right: 16px; }
  .api-key-btn { padding: 0 12px; font-size: 12px; }
  .voice-btn { width: 44px; }

  /* Primary actions get the full 48px from the PRD. */
  .btn.btn-primary, .btn.btn-full, .donate-btn, .apply-btn,
  .connect-btn, .mentor-req-btn, .referral-btn, .drawer-btn {
    min-height: 48px;
  }

  /* Form controls are thumb-sized and use a 16px font so iOS does not
     zoom the viewport on focus. */
  .form-input, .form-select, input[type="text"], input[type="email"],
  input[type="password"], input[type="number"], input[type="date"],
  input[type="time"], input[type="url"], input[type="tel"], textarea, select {
    min-height: 48px;
    font-size: 16px;
  }
  textarea.form-input { min-height: 96px; padding-top: 12px; }
  input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; }

  /* ── Typography floor ──
     Nothing below 12px; secondary metadata sits at 12px, not 9–10px. */
  body { font-size: 15px; }
  .job-meta-item, .event-meta, .news-meta, .audit-meta, .donor-tier,
  .alumni-card-location, .chapter-count, .pmetric-lab, .compliance-desc,
  .notif-item-time, .field-label, .state-subtitle, .timeline-meta,
  .spotlight-sub, .progress-goal, .card-badge, .job-tag, .alumni-tag,
  .verify-pill, .expiry-badge, .match-score-badge, .gateway-pill {
    font-size: 12px !important;
    line-height: 1.45;
  }
  .page-subtitle, .card-title, .modal-section-title { line-height: 1.4; }
  .alumni-card-name, .job-title, .event-title, .news-title, .campaign-name {
    font-size: 16px;
    line-height: 1.35;
  }

  /* ── Spacing & hierarchy ── */
  .glass-card { padding: 16px; border-radius: 14px; }
  .card-header { flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
  .card-header .btn { width: 100%; }
  .modal-content, .modal-box { padding: 18px; }
  .field-grid-2 { grid-template-columns: 1fr; gap: 0; }
  .planner-metrics-ribbon { gap: 8px; }

  /* Horizontal tab strips scroll inside themselves, never the page. */
  .analytics-tabs, .admin-tabs, .events-tabs, .profile-hub-tabs, .chip-row, .filter-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }
  .analytics-tabs::-webkit-scrollbar, .admin-tabs::-webkit-scrollbar,
  .events-tabs::-webkit-scrollbar, .profile-hub-tabs::-webkit-scrollbar,
  .chip-row::-webkit-scrollbar, .filter-chips::-webkit-scrollbar { display: none; }
  .analytics-tabs > *, .admin-tabs > *, .events-tabs > *,
  .profile-hub-tabs > *, .chip-row > *, .filter-chips > * {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  /* ── RBAC matrix: table → one card per role (Phase 7) ── */
  .table-scroll { overflow-x: visible; }
  /* An earlier mobile rule pins min-width:600px, which pushed the permission
     values off-screen once the rows became cards. */
  .rbac-table { width: 100%; min-width: 0; max-width: 100%; display: block; border-collapse: separate; }
  .rbac-table thead { display: none; }
  .rbac-table tbody { display: flex; flex-direction: column; gap: 10px; }
  .rbac-table tr {
    display: block;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
  }
  .rbac-table td {
    display: flex;
    white-space: normal;
    min-width: 0;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: none;
    padding: 7px 0;
    font-size: 13px;
    text-align: right;
  }
  .rbac-table td + td { border-top: 1px solid var(--border-glass); }
  .rbac-table td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-align: left;
    flex-shrink: 0;
  }
  /* First cell is the row heading, not a label/value pair. */
  .rbac-table td:first-child {
    justify-content: flex-start;
    font-weight: 800;
    font-size: 15px;
    text-align: left;
    padding-bottom: 10px;
  }
  .rbac-table td:first-child::before { content: none; }

  /* Modals become bottom sheets — reachable in the thumb zone. */
  .modal-overlay { align-items: flex-end; }
  .modal, .modal-content, .modal-box {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    overflow-y: auto;
  }
  .modal-close { min-width: 44px; min-height: 44px; }
}

/* Very small phones */
@media (max-width: 380px) {
  .planner-metrics-ribbon { grid-template-columns: 1fr !important; }
  .amount-grid { grid-template-columns: repeat(2, 1fr); }
  .glass-card { padding: 14px; }
}

/* Many templates set font sizes inline (font-size:9px/10px/11px). Only an
   !important rule in the stylesheet can raise those on mobile, so match the
   inline declarations directly and lift them to the 12px floor. */
@media (max-width: 900px) {
  [style*="font-size:9px"],  [style*="font-size: 9px"],
  [style*="font-size:10px"], [style*="font-size: 10px"],
  [style*="font-size:11px"], [style*="font-size: 11px"] {
    font-size: 12px !important;
    line-height: 1.45 !important;
  }
  [style*="font-size:12px"], [style*="font-size: 12px"] { line-height: 1.45 !important; }

  .wallet-btn { min-height: 44px; padding: 0 14px; }
}

/* Remaining class-based sub-11px sizes lifted to the mobile 12px floor.
   Icon-only badges (counts, check marks, nav labels) keep their size because
   they carry no reading text. */
@media (max-width: 900px) {
  .alumni-tag, .api-endpoint-method, .api-log-path, .api-log-time, .api-method,
  .audit-log-hash, .badge-desc, .badge-title, .brand-tag,
  .campaign-live-indicator, .campaign-tag, .card-badge,
  .career-registry-history, .career-update-badge, .channel-badge,
  .chapter-type, .cipher-box, .consent-version, .criterion-label,
  .demo-role-btn, .event-status, .expiry-badge, .field-label, .gateway-pill,
  .gateway-sub, .id-verified-badge, .job-tag, .job-type-badge, .kpi-label,
  .kpi-trend, .map-stat-lab, .mentorship-type-badge, .mini-kpi-label,
  .moderated-badge, .news-category, .pmetric-lab, .priority-tag,
  .privacy-badge, .receipt-stat-label, .scope-tag, .sync-queue-type,
  .tenant-status, .timeline-period, .tl-latency, .webhook-event-tag,
  .webhook-status, .webhook-url, .wizard-step-item {
    font-size: 12px !important;
    line-height: 1.45;
  }
  /* Tag-style pills need a little more room once the text grows. */
  .alumni-tag, .job-tag, .scope-tag, .webhook-event-tag, .card-badge,
  .chapter-type, .priority-tag, .gateway-pill { padding: 4px 9px; }
}

/* ============================================================
   MOBILE: EXECUTIVE ANALYTICS REDESIGN
   The analytics grid stayed a 2fr/1fr desktop split on phones, so the
   chart rendered in a ~137px column (canvas 106px wide, 584px tall) and
   was unreadable. On mobile the page becomes a single vertical stack:
   KPI metrics first, then a properly proportioned chart.
   ============================================================ */
@media (max-width: 900px) {

  .analytics-grid,
  #analytics-panel-main,
  #analytics-panel-mentorship,
  #analytics-panel-eventROI {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }
  /* Column spans are meaningless in a single-column stack. */
  .span-2, .span-3 { grid-column: auto !important; }

  /* Key Metrics reads before the chart on a phone — the numbers are the
     answer, the chart is the supporting detail. */
  .analytics-metrics-card { order: -1; }

  /* Chart gets a fixed, readable height instead of stretching to fill an
     unconstrained parent (Chart.js runs with maintainAspectRatio:false). */
  .analytics-grid canvas,
  #analytics-chart,
  #dashboard-chart,
  .chart-container canvas {
    height: 260px !important;
    max-height: 260px !important;
    width: 100% !important;
  }
  .analytics-chart-card { padding: 14px 12px; }

  /* Metric rows become scannable cards with room to breathe. */
  #analytics-metrics { gap: 0; }
  .analytics-metric-item {
    padding: 14px 0;
    gap: 4px;
  }
  .analytics-metric-item .metric-label,
  .analytics-metric-item > :first-child { font-size: 12px !important; letter-spacing: 0.04em; }
  .analytics-metric-item .metric-value,
  .analytics-metric-item > :nth-child(2) { font-size: 26px !important; line-height: 1.1; }

  /* Export buttons stack full width and stay thumb-sized. */
  #page-analytics .page-header-actions { display: flex; gap: 8px; width: 100%; }
  #page-analytics .page-header-actions .btn { flex: 1; min-height: 48px; }

  .geo-heatmap { padding: 10px 0; }

  /* ── Remaining desktop grids that never got a mobile override ── */
  .career-tracker-layout { grid-template-columns: 1fr !important; gap: 14px; }
  .server-health-grid    { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .alumni-badges-grid    { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .import-wizard-steps   { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .branding-color-grid   { grid-template-columns: 1fr !important; }
  .sync-overview-grid    { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .segment-builder       { grid-template-columns: 1fr !important; gap: 10px; }
}

@media (max-width: 400px) {
  .server-health-grid, .alumni-badges-grid,
  .import-wizard-steps, .sync-overview-grid { grid-template-columns: 1fr !important; }
  .analytics-grid canvas, #analytics-chart { height: 220px !important; max-height: 220px !important; }
}

/* Chart frame gives Chart.js a bounded box to fill. Without it the canvas
   stretches to whatever height the card happens to have, because the charts
   run with maintainAspectRatio:false. */
.chart-frame { position: relative; width: 100%; height: 320px; }
.chart-frame canvas { width: 100% !important; height: 100% !important; }
@media (max-width: 900px) { .chart-frame { height: 260px; } }
@media (max-width: 400px) { .chart-frame { height: 220px; } }

/* Catch-all touch-target floor. Earlier rules named individual classes and
   missed the verification-queue actions (.approve-btn / .review-btn rendered
   at 25px) — mis-taps there approve or reject a real profile. */
@media (max-width: 900px) {
  #pages button,
  #pages a[onclick],
  #pages [role="button"] {
    min-height: 44px;
    touch-action: manipulation;
  }
  /* Small inline actions still get a comfortable target without stretching
     their visual box awkwardly. */
  .approve-btn, .review-btn, .reject-btn, .connect-btn, .mentor-req-btn,
  .apply-btn, .referral-btn, .donate-btn, .api-key-btn, .kanban-move-btn {
    min-height: 44px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  /* Icon-only buttons stay square rather than becoming wide slabs. */
  .modal-close, .logout-btn, .sidebar-close, .btn-ghost.icon-only {
    min-width: 44px;
    padding: 0 10px;
  }
}

/* ─── BULK IMPORT: COLUMN MAPPING ─── */
.mapping-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.mapping-row {
  display: grid;
  grid-template-columns: 1fr 24px 1.1fr;
  align-items: center;
  gap: 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.mapping-row.excluded { opacity: 0.55; border-style: dashed; }
.mapping-col { min-width: 0; }
.mapping-header { font-weight: 700; font-size: 13px; overflow-wrap: anywhere; }
.mapping-sample { font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; margin-top: 2px; }
.mapping-arrow { text-align: center; color: var(--text-muted); }
.mapping-row .form-select { min-height: 40px; font-size: 13px; }

@media (max-width: 900px) {
  .mapping-row { grid-template-columns: 1fr; gap: 8px; padding: 14px; }
  .mapping-arrow { display: none; }
  .mapping-row .form-select { min-height: 48px; font-size: 16px; }
  .mapping-list { max-height: none; }
}

/* ─── SIGN-UP / SIGN-IN TOGGLE ─── */
.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth-tab {
  flex: 1;
  min-height: 44px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.auth-tab.active { background: var(--primary-glow); border-color: var(--primary); color: var(--primary-light); }
.auth-hint { font-size: 12px; color: var(--text-muted); margin-top: 10px; text-align: center; line-height: 1.5; }
@media (max-width: 900px) { .auth-tab { min-height: 48px; } }

/* ============================================================
   BRANDING SYSTEM
   Daffodil International College is the primary identity; Nimikh is
   credited as the technology partner. Both marks keep their official
   colours by sitting on a white plate wherever the background would
   compromise contrast.
   ============================================================ */

/* ─── DIC MARK — responsive sizing ───
   The lockup is ~4.2:1, so height drives the layout and width follows.
   Sizes step down at each breakpoint so the mark never dominates a phone
   header but still reads with authority on desktop. */
.topbar-brand-logo img,
.topbar-brand-logo svg {
  height: 38px;
  width: auto;
  max-width: 210px;
  object-fit: contain;
  display: block;
}

.sidebar-brand-logo {
  height: 42px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.login-brand-logo {
  height: 62px;
  width: auto;
  max-width: 320px;
  object-fit: contain;
  margin-bottom: 10px;
}

/* Footer sits on DIC blue (#1869BD); the navy wordmark would disappear. */
.footer-brand-logo {
  height: 40px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  background: #FFFFFF;
  border-radius: 10px;
  padding: 8px 14px;
}

/* ─── BUILT BY NIMIKH ─── */
.built-by-nimikh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 7px;
  text-decoration: none;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: var(--transition);
  min-height: 28px;              /* comfortable touch target */
  -webkit-tap-highlight-color: transparent;
}
.built-by-nimikh:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}
.built-by-nimikh:active { transform: translateY(0); }
.built-by-nimikh:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}
.built-by-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.95;
  white-space: nowrap;
}
/* The Nimikh mark is black-on-transparent, so it needs a light plate on
   every dark surface this app uses. */
.nimikh-logo {
  height: 50px;
  width: auto;
  max-width: 188px;
  object-fit: contain;
  display: block;
  background: #FFFFFF;
  border-radius: 4px;
  padding: 1px 2px;
}

.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* ─── TABLET ─── */
@media (max-width: 1024px) {
  .topbar-brand-logo img, .topbar-brand-logo svg { height: 34px; max-width: 180px; }
  .footer-brand-logo { height: 36px; }
  .login-brand-logo { height: 56px; }
}

/* ─── MOBILE ─── */
@media (max-width: 900px) {
  /* Header space is scarce: the mark shrinks but stays sharp and legible. */
  .topbar-brand-logo img, .topbar-brand-logo svg { height: 28px; max-width: 132px; }
  .sidebar-brand-logo { height: 36px; max-width: 168px; }
  .login-brand-logo { height: 48px; max-width: 250px; padding: 8px 14px; }
  .footer-brand-logo { height: 34px; max-width: 200px; }

  /* Footer stacks and centres so nothing crowds on a phone. */
  .daffodil-footer { padding: 26px 18px calc(96px + env(safe-area-inset-bottom, 0px)) 18px; }
  .footer-top { flex-direction: column; align-items: center; text-align: center; gap: 18px; }
  .footer-links { justify-content: center; gap: 10px 18px; }
  .footer-links a { min-height: 44px; display: inline-flex; align-items: center; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
  .footer-legal { align-items: center; }

  .built-by-nimikh { padding: 4px 6px; min-height: 22px; }
  .nimikh-logo { height: 39px; max-width: 145px; padding: 1px 2px; }
}

/* ─── SMALL PHONES ─── */
@media (max-width: 380px) {
  .topbar-brand-logo img, .topbar-brand-logo svg { height: 26px; max-width: 108px; }
  .login-brand-logo { height: 42px; max-width: 210px; }
  .footer-brand-logo { height: 30px; max-width: 176px; }
  .built-by-nimikh { width: 100%; justify-content: center; }
  .nimikh-logo { height: 32px; max-width: 115px; }
}

/* Print: drop the plates and let the marks render on paper. */
@media print {
  .built-by-nimikh { background: none; border: none; color: #000; }
  .nimikh-logo, .footer-brand-logo, .login-brand-logo {
    background: none; padding: 0; box-shadow: none;
  }
}

/* ─── DIC MARK ON DARK / COLOURED SURFACES ───
   The lockup's "Daffodil" wordmark is navy (#0B3897). On the blue topbar and
   the dark sidebar it dropped out entirely, leaving only "International
   College" legible. The mark is designed for a white field, so it is given
   one on every dark surface rather than being recoloured — recolouring a
   supplied logo would break the brand. */
.topbar-brand-logo {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 5px 10px;
  border-right: none;                 /* the plate replaces the divider rule */
  height: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}
.topbar-brand-logo img,
.topbar-brand-logo svg { height: 30px; }

.sidebar-brand {
  align-items: center;
}
.sidebar-brand-logo {
  height: auto;
  max-height: 52px;
}

@media (max-width: 1024px) {
  .topbar-brand-logo img, .topbar-brand-logo svg { height: 28px; }
}
@media (max-width: 900px) {
  .topbar-brand-logo { padding: 4px 8px; border-radius: 7px; }
  .topbar-brand-logo img, .topbar-brand-logo svg { height: 24px; max-width: 116px; }
  .sidebar-brand-logo { max-height: 46px; }
}
@media (max-width: 380px) {
  .topbar-brand-logo { padding: 4px 7px; }
  .topbar-brand-logo img, .topbar-brand-logo svg { height: 22px; max-width: 100px; }
}

/* ─── DIC MARK — sizing after the viewBox crop ───
   The source SVG declared a 420x100 box while the artwork occupied only
   262.6x86 of it, leaving 35% dead space on the right. With the viewBox
   cropped to the content the aspect is ~3:1, so heights are raised and the
   plate padding tightened — the mark now fills its plate instead of floating
   in it. */
.topbar-brand-logo {
  padding: 5px 9px;
}
.topbar-brand-logo img,
.topbar-brand-logo svg {
  height: 34px;
  max-width: 118px;
}

.sidebar-brand-logo {
  height: 46px;
  max-width: 150px;
  padding: 6px 10px;
  max-height: none;
}

.footer-brand-logo {
  height: 44px;
  max-width: 145px;
  padding: 7px 11px;
}

.login-brand-logo {
  height: 58px;
  max-width: 190px;
  padding: 9px 13px;
}

@media (max-width: 1024px) {
  .topbar-brand-logo img, .topbar-brand-logo svg { height: 31px; max-width: 106px; }
  .footer-brand-logo { height: 40px; max-width: 132px; }
  .login-brand-logo  { height: 52px; max-width: 172px; }
}

@media (max-width: 900px) {
  .topbar-brand-logo { padding: 4px 8px; border-radius: 7px; }
  .topbar-brand-logo img, .topbar-brand-logo svg { height: 28px; max-width: 94px; }
  .sidebar-brand-logo { height: 40px; max-width: 132px; padding: 5px 9px; }
  .footer-brand-logo  { height: 38px; max-width: 126px; padding: 6px 10px; }
  .login-brand-logo   { height: 46px; max-width: 152px; padding: 8px 12px; }
}

@media (max-width: 380px) {
  .topbar-brand-logo { padding: 3px 7px; }
  .topbar-brand-logo img, .topbar-brand-logo svg { height: 26px; max-width: 86px; }
  .footer-brand-logo { height: 34px; max-width: 114px; }
  .login-brand-logo  { height: 42px; max-width: 138px; }
}

/* ============================================================
   EVENTS & TICKETS — v5
   Light only. White surfaces, DIC blue as the single action colour,
   subtle borders, soft shadows. No dark panels anywhere in this module.
   ============================================================ */

:root {
  --ev-surface: #FFFFFF;
  --ev-surface-sunken: #F8FAFC;
  --ev-border: #E2E8F0;
  --ev-border-strong: #CBD5E1;
  --ev-ink: #0F172A;
  --ev-ink-soft: #475569;
  /* #64748B measured 4.34:1 on the page's grey background — just under the
     4.5:1 AA floor for normal text. #5B6B7F clears it on both the grey and
     white surfaces this token is used on. */
  --ev-ink-muted: #5B6B7F;
  --ev-brand: #0B3897;
  --ev-brand-soft: rgba(11, 56, 151, 0.08);
  --ev-success: #047857;
  --ev-success-soft: #ECFDF5;
  --ev-warn: #B45309;
  --ev-warn-soft: #FFFBEB;
  --ev-danger: #B91C1C;
  --ev-danger-soft: #FEF2F2;
  --ev-info-soft: #EFF6FF;
  --ev-radius: 14px;
  --ev-radius-sm: 10px;
  --ev-shadow: 0 1px 2px rgba(15,23,42,.05), 0 4px 12px rgba(15,23,42,.05);
  --ev-focus: 0 0 0 3px rgba(11,56,151,.28);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Visible focus everywhere in the module. */
#page-events :focus-visible,
#modal-overlay :focus-visible {
  outline: 2px solid var(--ev-brand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ─── Toolbar: search + status filters ─── */
.ev-toolbar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px;
}
.ev-search { position: relative; flex: 1 1 260px; min-width: 0; }
.ev-search .form-input { width: 100%; min-width: 0; }
.ev-search .ev-search-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--ev-ink-muted); font-size: 17px; pointer-events: none;
}
.ev-search .form-input { padding-left: 40px; }

.ev-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.ev-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px;
  background: var(--ev-surface); color: var(--ev-ink-soft);
  border: 1px solid var(--ev-border); border-radius: 999px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.ev-chip:hover { background: var(--ev-surface-sunken); border-color: var(--ev-border-strong); }
.ev-chip.active {
  background: var(--ev-brand); border-color: var(--ev-brand); color: #fff;
}
.ev-chip-count {
  background: rgba(15,23,42,.08); border-radius: 999px;
  padding: 1px 7px; font-size: 11px; font-weight: 700;
}
.ev-chip.active .ev-chip-count { background: rgba(255,255,255,.22); }

.ev-viewswitch {
  display: inline-flex; background: var(--ev-surface-sunken);
  border: 1px solid var(--ev-border); border-radius: 999px; padding: 3px;
}
.ev-viewswitch-btn {
  min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ev-ink-soft);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.ev-viewswitch-btn.active { background: var(--ev-surface); color: var(--ev-brand); box-shadow: var(--ev-shadow); }

/* ─── Event cards ─── */
.ev-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}
.ev-card {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--ev-surface); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius); padding: 18px; box-shadow: var(--ev-shadow);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.ev-card:hover { border-color: var(--ev-border-strong); box-shadow: 0 4px 18px rgba(15,23,42,.08); }
.ev-card-top { display: flex; align-items: flex-start; gap: 12px; }
.ev-card-icon {
  display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0;
  background: var(--ev-brand-soft); color: var(--ev-brand);
  border-radius: var(--ev-radius-sm); font-size: 21px;
}
.ev-card-headings { flex: 1; min-width: 0; }
.ev-card-title {
  font-size: 16px; font-weight: 700; color: var(--ev-ink);
  margin: 0 0 2px; line-height: 1.35; overflow-wrap: anywhere;
}
.ev-card-type { margin: 0; font-size: 12px; color: var(--ev-ink-muted); font-weight: 600; }
.ev-card-desc {
  margin: 0; font-size: 13px; line-height: 1.6; color: var(--ev-ink-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ev-card-meta { display: flex; flex-direction: column; gap: 7px; margin: 0; }
.ev-card-meta > div { display: flex; align-items: flex-start; gap: 9px; }
.ev-card-meta dt { color: var(--ev-ink-muted); font-size: 15px; line-height: 1.4; flex-shrink: 0; }
.ev-card-meta dd {
  margin: 0; font-size: 13px; color: var(--ev-ink-soft); line-height: 1.4; overflow-wrap: anywhere;
}
.ev-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }

/* ─── Status pills ─── */
.ev-pill {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .01em;
  background: var(--ev-info-soft); color: var(--ev-brand);
  border: 1px solid rgba(11,56,151,.18);
}
.ev-pill.success { background: var(--ev-success-soft); color: var(--ev-success); border-color: rgba(4,120,87,.22); }
.ev-pill.warn    { background: var(--ev-warn-soft);    color: var(--ev-warn);    border-color: rgba(180,83,9,.22); }
.ev-pill.danger  { background: var(--ev-danger-soft);  color: var(--ev-danger);  border-color: rgba(185,28,28,.22); }
.ev-pill.muted   { background: var(--ev-surface-sunken); color: var(--ev-ink-muted); border-color: var(--ev-border); }

/* ─── Capacity meter ─── */
.ev-capacity { display: flex; flex-direction: column; gap: 6px; }
.ev-capacity-track {
  height: 7px; border-radius: 999px; background: #E9EEF5; overflow: hidden;
}
.ev-capacity-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--ev-brand), #2563EB);
  transition: width .3s ease;
}
.ev-capacity-meta {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 11.5px; color: var(--ev-ink-muted); font-weight: 600;
}

/* ─── Workspace shell ─── */
.ev-back {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 0 12px 0 8px; margin-bottom: 14px;
  background: none; border: 0; border-radius: var(--ev-radius-sm);
  color: var(--ev-brand); font-size: 13px; font-weight: 700; cursor: pointer;
}
.ev-back:hover { background: var(--ev-brand-soft); }

.ev-context {
  background: var(--ev-surface); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius); padding: 20px; margin-bottom: 16px;
  box-shadow: var(--ev-shadow);
}
.ev-context-main { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.ev-context-icon {
  display: grid; place-items: center; width: 54px; height: 54px; flex-shrink: 0;
  background: var(--ev-brand-soft); color: var(--ev-brand);
  border-radius: var(--ev-radius-sm); font-size: 26px;
}
.ev-context-text { flex: 1; min-width: 220px; }
.ev-context-title {
  font-size: 22px; font-weight: 800; color: var(--ev-ink);
  margin: 0 0 8px; line-height: 1.25; overflow-wrap: anywhere;
}
.ev-context-line {
  display: flex; align-items: center; gap: 8px; margin: 0 0 5px;
  font-size: 13.5px; color: var(--ev-ink-soft); overflow-wrap: anywhere;
}
.ev-context-line .ui-icon { color: var(--ev-ink-muted); flex-shrink: 0; }
.ev-context-status {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right;
}
.ev-context-count { font-size: 13px; font-weight: 700; color: var(--ev-ink); }
.ev-context-sub { font-size: 11.5px; color: var(--ev-ink-muted); }
.ev-context-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ev-border);
}
.btn.ev-danger { color: var(--ev-danger); }
.btn.ev-danger:hover { background: var(--ev-danger-soft); }

/* ─── Tabs ─── */
.ev-tabs {
  display: flex; gap: 4px; margin-bottom: 18px; padding-bottom: 2px;
  border-bottom: 1px solid var(--ev-border);
  overflow-x: auto; scrollbar-width: none;
}
.ev-tabs::-webkit-scrollbar { display: none; }
.ev-tab {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  min-height: 46px; padding: 0 15px;
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--ev-ink-muted); font-size: 13.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.ev-tab:hover { color: var(--ev-ink); background: var(--ev-surface-sunken); }
.ev-tab.active { color: var(--ev-brand); border-bottom-color: var(--ev-brand); font-weight: 700; }

/* ─── Panels ─── */
.ev-panel {
  background: var(--ev-surface); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius); padding: 20px; margin-bottom: 16px;
  box-shadow: var(--ev-shadow);
}
.ev-panel-title { font-size: 16px; font-weight: 700; color: var(--ev-ink); margin: 0 0 4px; }
.ev-panel-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.ev-panel-head .ev-panel-title { margin: 0; }
.ev-panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ev-panel-actions.right { justify-content: flex-end; margin-bottom: 12px; }
.ev-subhead {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; font-weight: 700; color: var(--ev-ink-soft);
  margin: 20px 0 10px; text-transform: uppercase; letter-spacing: .04em;
}
.ev-subhead:first-child { margin-top: 0; }
.ev-prose { font-size: 14px; line-height: 1.65; color: var(--ev-ink-soft); margin: 0 0 14px; }
.ev-muted { font-size: 13px; color: var(--ev-ink-muted); margin: 8px 0; }
.ev-muted.small { font-size: 12px; }
.ev-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--ev-ink-muted); }

/* ─── Stats ─── */
.ev-stats {
  display: grid; gap: 12px; margin-bottom: 16px;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
}
.ev-stat {
  display: flex; align-items: center; gap: 12px;
  background: var(--ev-surface); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-sm); padding: 14px; box-shadow: var(--ev-shadow);
}
.ev-stat-icon {
  display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 10px; font-size: 19px;
  background: var(--ev-surface-sunken); color: var(--ev-ink-muted);
}
.ev-stat-icon.info    { background: var(--ev-info-soft);    color: var(--ev-brand); }
.ev-stat-icon.success { background: var(--ev-success-soft); color: var(--ev-success); }
.ev-stat-icon.warn    { background: var(--ev-warn-soft);    color: var(--ev-warn); }
.ev-stat-icon.danger  { background: var(--ev-danger-soft);  color: var(--ev-danger); }
.ev-stat-value { font-size: 20px; font-weight: 800; color: var(--ev-ink); line-height: 1.15; }
.ev-stat-label { font-size: 11.5px; color: var(--ev-ink-muted); font-weight: 600; margin-top: 2px; }

/* ─── Definition lists ─── */
.ev-deflist {
  display: grid; gap: 12px; margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.ev-deflist.compact { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.ev-deflist dt {
  font-size: 11px; font-weight: 700; color: var(--ev-ink-muted);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px;
}
.ev-deflist dd { margin: 0; font-size: 13.5px; color: var(--ev-ink); overflow-wrap: anywhere; }

/* ─── Banners & callouts ─── */
.ev-banner {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 11px 14px; border-radius: var(--ev-radius-sm); margin: 0 0 14px;
  font-size: 13px; font-weight: 600; line-height: 1.5;
  background: var(--ev-info-soft); color: var(--ev-brand); border: 1px solid rgba(11,56,151,.18);
}
.ev-banner .ui-icon { flex-shrink: 0; margin-top: 1px; }
.ev-banner.success { background: var(--ev-success-soft); color: var(--ev-success); border-color: rgba(4,120,87,.22); }
.ev-banner.warn    { background: var(--ev-warn-soft);    color: var(--ev-warn);    border-color: rgba(180,83,9,.22); }
.ev-banner.danger  { background: var(--ev-danger-soft);  color: var(--ev-danger);  border-color: rgba(185,28,28,.22); }

.ev-callout {
  display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap;
  background: var(--ev-surface-sunken); border: 1px dashed var(--ev-border-strong);
  border-radius: var(--ev-radius-sm); padding: 16px; margin-top: 14px;
}
.ev-callout > .ui-icon { font-size: 22px; color: var(--ev-brand); flex-shrink: 0; }
.ev-callout > div { flex: 1; min-width: 190px; }
.ev-callout strong { display: block; font-size: 14px; color: var(--ev-ink); margin-bottom: 3px; }
.ev-callout p { margin: 0; font-size: 13px; color: var(--ev-ink-soft); line-height: 1.55; }
.ev-callout-plain {
  display: flex; align-items: flex-start; gap: 9px;
  background: var(--ev-surface-sunken); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-sm); padding: 13px 15px; margin: 0 0 16px;
  font-size: 13px; color: var(--ev-ink-soft); line-height: 1.55;
}
.ev-callout-plain .ui-icon { color: var(--ev-brand); flex-shrink: 0; margin-top: 1px; }

/* ─── Starter actions ─── */
.ev-starters { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.ev-starter {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--ev-surface); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-sm); padding: 14px; cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.ev-starter:hover { border-color: var(--ev-brand); background: var(--ev-brand-soft); }
.ev-starter-icon {
  display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0;
  background: var(--ev-info-soft); color: var(--ev-brand); border-radius: 10px; font-size: 19px;
}
.ev-starter-text { flex: 1; min-width: 0; }
.ev-starter-text strong { display: block; font-size: 13.5px; color: var(--ev-ink); margin-bottom: 2px; }
.ev-starter-text span { font-size: 12px; color: var(--ev-ink-muted); line-height: 1.45; }
.ev-starter-chevron { color: var(--ev-ink-muted); flex-shrink: 0; }

/* ─── Task list ─── */
.ev-tasklist { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ev-task { margin: 0; }
.ev-task-main {
  display: flex; align-items: flex-start; gap: 14px; width: 100%; text-align: left;
  background: var(--ev-surface); border: 1px solid var(--ev-border);
  border-left: 3px solid var(--ev-border);
  border-radius: var(--ev-radius-sm); padding: 14px; cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.ev-task-main:hover { border-color: var(--ev-border-strong); box-shadow: var(--ev-shadow); }
.ev-task.overdue .ev-task-main { border-left-color: var(--ev-danger); }
.ev-task-status {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 74px; flex-shrink: 0; font-size: 19px;
}
.ev-task-status.muted   { color: var(--ev-ink-muted); }
.ev-task-status.info    { color: var(--ev-brand); }
.ev-task-status.danger  { color: var(--ev-danger); }
.ev-task-status.success { color: var(--ev-success); }
.ev-task-status-label { font-size: 10.5px; font-weight: 700; text-align: center; line-height: 1.2; }
.ev-task-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ev-task-title { font-size: 14px; font-weight: 700; color: var(--ev-ink); line-height: 1.4; overflow-wrap: anywhere; }
.ev-task-meta { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.ev-tag {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  background: var(--ev-surface-sunken); border: 1px solid var(--ev-border);
  font-size: 11px; font-weight: 600; color: var(--ev-ink-soft); text-transform: capitalize;
}
.ev-tag.prio-critical { background: var(--ev-danger-soft); color: var(--ev-danger); border-color: rgba(185,28,28,.2); }
.ev-tag.prio-high     { background: var(--ev-warn-soft);   color: var(--ev-warn);   border-color: rgba(180,83,9,.2); }
.ev-task-due { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ev-ink-muted); font-weight: 600; }
.ev-task-due.danger  { color: var(--ev-danger); }
.ev-task-due.success { color: var(--ev-success); }
.ev-task-blocked {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 12px; color: var(--ev-danger); line-height: 1.45;
}
.ev-task-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.ev-progress { display: flex; align-items: center; gap: 8px; }
.ev-progress-track { width: 74px; height: 6px; border-radius: 999px; background: #E9EEF5; overflow: hidden; }
.ev-progress-fill { display: block; height: 100%; border-radius: 999px; background: var(--ev-brand); }
.ev-progress-num { font-size: 11.5px; font-weight: 700; color: var(--ev-ink-soft); min-width: 30px; text-align: right; }
.ev-task-avatars { display: flex; align-items: center; gap: -4px; }
.ev-task-avatars > * { margin-left: -6px; }
.ev-task-avatars > *:first-child { margin-left: 0; }
.ev-unassigned { font-size: 11.5px; color: var(--ev-ink-muted); font-style: italic; margin-left: 0 !important; }

/* ─── Avatars ─── */
.ev-avatar {
  display: inline-grid; place-items: center; border-radius: 50%;
  object-fit: cover; flex-shrink: 0; border: 2px solid var(--ev-surface);
  background: var(--ev-surface-sunken);
}
.ev-avatar-initials { background: var(--ev-brand); color: #fff; font-weight: 700; }
.ev-avatar-more { background: var(--ev-surface-sunken); color: var(--ev-ink-soft); font-size: 10px; font-weight: 700; }

/* ─── People rows ─── */
.ev-people { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ev-person {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--ev-surface); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-sm); padding: 12px 14px;
}
.ev-person-text { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 2px; }
.ev-person-text strong { font-size: 13.5px; color: var(--ev-ink); }
.ev-person-text span { font-size: 12px; color: var(--ev-ink-muted); overflow-wrap: anywhere; }
.ev-person-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.ev-contact-btn {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 36px; padding: 0 11px;
  background: var(--ev-surface); border: 1px solid var(--ev-border);
  border-radius: 8px; color: var(--ev-ink-soft);
  font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.ev-contact-btn:hover { border-color: var(--ev-brand); color: var(--ev-brand); background: var(--ev-brand-soft); }
.ev-contact-btn.wa:hover { border-color: #128C7E; color: #128C7E; background: #F0FDF9; }
.ev-contact-btn.danger:hover { border-color: var(--ev-danger); color: var(--ev-danger); background: var(--ev-danger-soft); }

.ev-icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0;
  background: transparent; border: 1px solid transparent; border-radius: 8px;
  color: var(--ev-ink-muted); cursor: pointer; font-size: 15px;
}
.ev-icon-btn:hover { background: var(--ev-surface-sunken); border-color: var(--ev-border); color: var(--ev-ink); }
.ev-icon-btn.danger:hover { background: var(--ev-danger-soft); border-color: rgba(185,28,28,.2); color: var(--ev-danger); }

/* ─── Forms ─── */
.ev-form { display: flex; flex-direction: column; }
.ev-field { margin-bottom: 16px; }
.ev-field-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 7px; flex-wrap: wrap; }
.ev-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ev-ink); margin-bottom: 6px; }
.ev-label .req { color: var(--ev-danger); }
.ev-help { display: block; font-size: 11.5px; color: var(--ev-ink-muted); margin-top: 5px; line-height: 1.45; }
.ev-help.inline { display: inline; margin: 0 0 0 8px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.ev-grid2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.ev-fieldset { border: 0; padding: 0; margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.ev-fieldset legend { padding: 0; margin-bottom: 2px; }

.ev-radio {
  display: flex; align-items: flex-start; gap: 11px; cursor: pointer;
  background: var(--ev-surface); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-sm); padding: 13px 14px;
  transition: border-color .18s ease, background .18s ease;
}
.ev-radio:hover { border-color: var(--ev-border-strong); }
.ev-radio input { margin-top: 2px; accent-color: var(--ev-brand); width: 17px; height: 17px; flex-shrink: 0; }
.ev-radio span { display: block; }
.ev-radio strong { display: block; font-size: 13.5px; color: var(--ev-ink); margin-bottom: 2px; }
.ev-radio span span { font-size: 12px; color: var(--ev-ink-muted); line-height: 1.45; }
.ev-radio:has(input:checked) { border-color: var(--ev-brand); background: var(--ev-brand-soft); }

.ev-switch {
  display: flex; align-items: flex-start; gap: 11px; cursor: pointer;
  background: var(--ev-surface-sunken); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-sm); padding: 13px 14px; margin-bottom: 16px;
}
.ev-switch input { margin-top: 2px; accent-color: var(--ev-brand); width: 17px; height: 17px; flex-shrink: 0; }
.ev-switch strong { display: block; font-size: 13.5px; color: var(--ev-ink); margin-bottom: 2px; }
.ev-switch span span { font-size: 12px; color: var(--ev-ink-muted); line-height: 1.45; }

/* ─── Segmented controls & progress steps ─── */
.ev-segrow { display: flex; gap: 6px; flex-wrap: wrap; }
.ev-seg {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 42px; padding: 0 13px;
  background: var(--ev-surface); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-sm); color: var(--ev-ink-soft);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.ev-seg:hover { border-color: var(--ev-border-strong); background: var(--ev-surface-sunken); }
.ev-seg.active { border-width: 1.5px; font-weight: 700; }
.ev-seg.active.muted   { border-color: var(--ev-ink-muted); color: var(--ev-ink); background: var(--ev-surface-sunken); }
.ev-seg.active.info    { border-color: var(--ev-brand);   color: var(--ev-brand);   background: var(--ev-info-soft); }
.ev-seg.active.danger  { border-color: var(--ev-danger);  color: var(--ev-danger);  background: var(--ev-danger-soft); }
.ev-seg.active.success { border-color: var(--ev-success); color: var(--ev-success); background: var(--ev-success-soft); }

.ev-progress-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.ev-progress-step {
  min-height: 42px; min-width: 58px; padding: 0 12px;
  background: var(--ev-surface); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-sm); color: var(--ev-ink-soft);
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.ev-progress-step:hover { border-color: var(--ev-border-strong); background: var(--ev-surface-sunken); }
.ev-progress-step.active { background: var(--ev-brand); border-color: var(--ev-brand); color: #fff; }

/* ─── Checklist & notes ─── */
.ev-checklist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ev-checklist li { display: flex; align-items: center; gap: 8px; }
.ev-check { display: flex; align-items: center; gap: 9px; flex: 1; cursor: pointer; font-size: 13px; color: var(--ev-ink-soft); padding: 7px 0; }
.ev-check input { accent-color: var(--ev-brand); width: 17px; height: 17px; flex-shrink: 0; }
.ev-check input:checked + span { text-decoration: line-through; color: var(--ev-ink-muted); }

.ev-notes { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ev-notes li { background: var(--ev-surface-sunken); border: 1px solid var(--ev-border); border-radius: var(--ev-radius-sm); padding: 11px 13px; }
.ev-note-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.ev-note-head strong { font-size: 12.5px; color: var(--ev-ink); }
.ev-note-head span { font-size: 11px; color: var(--ev-ink-muted); }
.ev-notes p { margin: 0; font-size: 13px; color: var(--ev-ink-soft); line-height: 1.5; overflow-wrap: anywhere; }
.ev-note-form { display: flex; gap: 8px; }
.ev-note-form .form-input { flex: 1; }

/* ─── Modal footer ─── */
.ev-modal-footer {
  display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--ev-border);
}
.ev-modal-footer.sticky {
  position: sticky; bottom: 0; background: var(--ev-surface);
  margin: 16px -4px -4px; padding: 14px 4px 4px;
}
.ev-taskmodal { display: flex; flex-direction: column; }

/* ─── Wizard ─── */
.ev-stepper {
  display: flex; gap: 6px; list-style: none; margin: 0 0 20px; padding: 0;
  border-bottom: 1px solid var(--ev-border); padding-bottom: 14px;
}
.ev-stepper li { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.ev-stepper-num {
  display: grid; place-items: center; width: 27px; height: 27px; flex-shrink: 0;
  border-radius: 50%; background: var(--ev-surface-sunken);
  border: 1px solid var(--ev-border); color: var(--ev-ink-muted);
  font-size: 12.5px; font-weight: 700;
}
.ev-stepper-label {
  font-size: 12.5px; font-weight: 600; color: var(--ev-ink-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ev-stepper li.current .ev-stepper-num { background: var(--ev-brand); border-color: var(--ev-brand); color: #fff; }
.ev-stepper li.current .ev-stepper-label { color: var(--ev-ink); font-weight: 700; }
.ev-stepper li.done .ev-stepper-num { background: var(--ev-success-soft); border-color: rgba(4,120,87,.3); color: var(--ev-success); }
.ev-stepper li.done .ev-stepper-label { color: var(--ev-ink-soft); }

.ev-tickettypes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.ev-tt-head, .ev-tt-row {
  display: grid; grid-template-columns: 2fr 1fr 1fr 40px; gap: 8px; align-items: center;
}
.ev-tt-head span {
  font-size: 11px; font-weight: 700; color: var(--ev-ink-muted);
  text-transform: uppercase; letter-spacing: .04em;
}

.ev-review { display: flex; flex-direction: column; }
.ev-review-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.ev-review-head h3 { margin: 0 0 2px; font-size: 17px; font-weight: 700; color: var(--ev-ink); overflow-wrap: anywhere; }
.ev-review-head p { margin: 0; font-size: 12.5px; color: var(--ev-ink-muted); }
.ev-review-tickets { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.ev-review-tickets li {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; align-items: center;
  background: var(--ev-surface-sunken); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-sm); padding: 11px 13px; font-size: 13px; color: var(--ev-ink-soft);
}
.ev-review-tickets strong { color: var(--ev-ink); }

.ev-createdby {
  display: flex; align-items: center; gap: 12px;
  background: var(--ev-surface-sunken); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-sm); padding: 13px 15px; margin: 18px 0 14px;
}
.ev-createdby > .ui-icon { font-size: 21px; color: var(--ev-brand); flex-shrink: 0; }
.ev-createdby .ev-label { margin-bottom: 2px; }
.ev-createdby strong { display: block; font-size: 13.5px; color: var(--ev-ink); }
.ev-createdby > div > span:last-child { font-size: 12px; color: var(--ev-ink-muted); }

/* ─── Directory picker ─── */
.ev-picker { display: flex; flex-direction: column; }
.ev-picker-selected { min-height: 26px; margin-bottom: 10px; }
.ev-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.ev-selchip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ev-brand-soft); border: 1px solid rgba(11,56,151,.2);
  border-radius: 999px; padding: 4px 6px 4px 5px;
  font-size: 12.5px; font-weight: 600; color: var(--ev-brand);
}
.ev-selchip button {
  display: grid; place-items: center; width: 22px; height: 22px;
  background: rgba(11,56,151,.12); border: 0; border-radius: 50%;
  color: var(--ev-brand); cursor: pointer; font-size: 12px;
}
.ev-selchip button:hover { background: rgba(11,56,151,.24); }

.ev-picker-results {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 46vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--ev-border); border-radius: var(--ev-radius-sm); padding: 8px;
  background: var(--ev-surface-sunken);
}
.ev-picker-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--ev-surface); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-sm); padding: 10px 12px; cursor: pointer; min-height: 56px;
}
.ev-picker-row:hover:not(.disabled) { border-color: var(--ev-brand); background: var(--ev-brand-soft); }
.ev-picker-row.selected { border-color: var(--ev-brand); background: var(--ev-brand-soft); }
.ev-picker-row.disabled { opacity: .55; cursor: not-allowed; }
.ev-picker-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ev-picker-text strong { font-size: 13.5px; color: var(--ev-ink); }
.ev-picker-text span { font-size: 11.5px; color: var(--ev-ink-muted); overflow-wrap: anywhere; }
.ev-picker-contact {
  display: flex; gap: 4px 12px; align-items: center; flex-wrap: wrap;
}
/* Keep each number intact — a phone number broken across two lines is unreadable. */
.ev-picker-contact > span { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.ev-picker-mark { display: flex; align-items: center; gap: 5px; font-size: 17px; color: var(--ev-brand); flex-shrink: 0; }
.ev-picker-row:not(.selected):not(.disabled) .ev-picker-mark { color: var(--ev-ink-muted); }

/* ─── Ticket types & tickets ─── */
.ev-ticketlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ev-ticketrow {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--ev-surface); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-sm); padding: 13px 14px;
}
.ev-ticketrow-main { display: flex; flex-direction: column; gap: 2px; min-width: 130px; flex: 1; }
.ev-ticketrow-main strong { font-size: 13.5px; color: var(--ev-ink); }
.ev-ticketrow-price { font-size: 13px; font-weight: 700; color: var(--ev-brand); }
.ev-ticketrow-quota { flex: 2; min-width: 160px; display: flex; flex-direction: column; gap: 5px; }
.ev-ticketrow-quota span { font-size: 11.5px; color: var(--ev-ink-muted); font-weight: 600; }

.ev-checkin { display: flex; gap: 9px; flex-wrap: wrap; margin: 12px 0; }
.ev-checkin .form-input { flex: 1; min-width: 200px; }

.ev-ticketchoices { display: flex; flex-direction: column; gap: 9px; }
.ev-ticketchoice {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%;
  background: var(--ev-surface); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-sm); padding: 15px; cursor: pointer; min-height: 62px; text-align: left;
}
.ev-ticketchoice:hover:not(:disabled) { border-color: var(--ev-brand); background: var(--ev-brand-soft); }
.ev-ticketchoice:disabled { opacity: .5; cursor: not-allowed; }
.ev-ticketchoice-name { display: flex; flex-direction: column; gap: 2px; }
.ev-ticketchoice-name strong { font-size: 14px; color: var(--ev-ink); }
.ev-ticketchoice-name span { font-size: 12px; color: var(--ev-ink-muted); }
.ev-ticketchoice-price { font-size: 16px; font-weight: 800; color: var(--ev-brand); }

.ev-ticket { text-align: center; padding: 6px 0; }
.ev-ticket-event { display: flex; flex-direction: column; gap: 3px; margin-bottom: 16px; }
.ev-ticket-event strong { font-size: 15px; color: var(--ev-ink); }
.ev-ticket-event span { font-size: 12.5px; color: var(--ev-ink-muted); }
.ev-ticket-qr { display: flex; justify-content: center; margin-bottom: 14px; min-height: 40px; }
.ev-ticket-qr img, .ev-ticket-qr canvas { border: 1px solid var(--ev-border); border-radius: 8px; padding: 8px; background: #fff; }
.ev-ticket-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px; font-weight: 700; letter-spacing: .05em; color: var(--ev-brand); margin: 0 0 6px;
}
.ev-ticket-status { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--ev-ink-soft); margin: 0 0 4px; }
.ev-preview { margin: 14px 0; }

/* ─── Advanced tables ─── */
.ev-table { display: flex; flex-direction: column; gap: 3px; margin-top: 10px; }
.ev-table-head, .ev-table-row {
  display: grid; grid-template-columns: repeat(var(--ev-cols, 6), minmax(0, 1fr));
  gap: 10px; align-items: center; padding: 11px 13px;
}
.ev-table-head {
  font-size: 10.5px; font-weight: 800; color: var(--ev-ink-muted);
  text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--ev-border);
}
.ev-table-row {
  background: var(--ev-surface); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-sm); font-size: 13px; color: var(--ev-ink-soft);
}
.ev-table-row > div { min-width: 0; overflow-wrap: anywhere; }
.ev-table-row strong { color: var(--ev-ink); }

/* ─── Light toast ─── */
.toast-stack {
  position: fixed; bottom: 92px; right: 20px; z-index: 3000;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 9px; max-width: 340px; pointer-events: auto;
  background: var(--ev-surface); color: var(--ev-ink);
  border: 1px solid var(--ev-border); border-left: 3px solid var(--ev-brand);
  border-radius: var(--ev-radius-sm); padding: 12px 16px;
  font-size: 13px; font-weight: 600; line-height: 1.45;
  box-shadow: 0 8px 26px rgba(15,23,42,.14);
  animation: slideInRight .28s ease; transition: opacity .25s ease;
}
.toast-icon { color: var(--ev-brand); font-size: 17px; flex-shrink: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .ev-grid { grid-template-columns: 1fr; }
  .ev-context-main { flex-direction: column; }
  .ev-context-status { align-items: flex-start; text-align: left; }
  .ev-context-title { font-size: 19px; }
  .ev-context-actions .btn { flex: 1 1 auto; min-height: 44px; }

  /* Tables become labelled cards — no horizontal scrolling. */
  .ev-table-head { display: none; }
  .ev-table { gap: 9px; }
  .ev-table-row { grid-template-columns: 1fr; gap: 7px; padding: 14px; }
  .ev-table-row > div[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    display: block; font-size: 10px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .04em;
    color: var(--ev-ink-muted); margin-bottom: 2px;
  }

  /* Task rows stack; progress and people move under the title. */
  .ev-task-main { flex-wrap: wrap; gap: 10px; padding: 13px; }
  .ev-task-status { flex-direction: row; min-width: 0; gap: 6px; font-size: 16px; }
  .ev-task-status-label { font-size: 11.5px; }
  .ev-task-body { flex: 1 1 100%; order: 2; }
  .ev-task-right { flex: 1 1 100%; order: 3; flex-direction: row; align-items: center; justify-content: space-between; }

  .ev-stepper-label { display: none; }
  .ev-stepper li { flex: 0 0 auto; }
  .ev-stepper { justify-content: center; gap: 12px; }

  .ev-tt-head { display: none; }
  .ev-tt-row { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px;
               background: var(--ev-surface-sunken); border: 1px solid var(--ev-border);
               border-radius: var(--ev-radius-sm); }
  .ev-tt-row input:first-child { grid-column: 1 / -1; }

  .ev-review-tickets li { grid-template-columns: 1fr; gap: 3px; }

  /* Picker becomes a full-height sheet with a single scroll region. */
  .ev-picker-results { max-height: none; flex: 1; border: 0; padding: 0; background: transparent; }
  .ev-picker { min-height: 60vh; }

  .ev-person { gap: 10px; }
  .ev-person-actions { flex: 1 1 100%; }
  /* Four actions across a 360px card left each about 70px wide, which wrapped
     the "WhatsApp" label onto a second line. Give them a floor so they reflow
     onto two rows instead of squeezing. */
  .ev-contact-btn {
    flex: 1 1 auto;
    min-width: 104px;
    justify-content: center;
    min-height: 44px;
  }

  .ev-modal-footer .btn { flex: 1; min-height: 46px; }
  .toast-stack { left: 12px; right: 12px; bottom: 84px; }
  .toast { max-width: none; }
}

@media (max-width: 600px) {
  .ev-grid2 { grid-template-columns: 1fr; }
  .ev-stats { grid-template-columns: repeat(2, 1fr); }
  .ev-starters { grid-template-columns: 1fr; }
  .ev-viewswitch { width: 100%; }
  .ev-viewswitch-btn { flex: 1; }
  .ev-toolbar { flex-direction: column; align-items: stretch; }
  /* In a column flex container flex-basis sizes the HEIGHT, so `flex: 1 1 260px`
     made the search box 260px tall with its icon stranded in the middle. */
  .ev-toolbar .ev-search { flex: 0 0 auto; width: 100%; }
  .ev-filters { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 2px; }
  .ev-filters::-webkit-scrollbar { display: none; }
  .ev-chip { flex-shrink: 0; }
  .ev-checkin .form-input { min-width: 0; }
  .ev-checkin .btn { width: 100%; }
}

@media (max-width: 400px) {
  .ev-stats { grid-template-columns: 1fr; }
  .ev-tt-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ev-card, .ev-chip, .ev-tab, .ev-starter, .ev-capacity-fill, .toast { transition: none; animation: none; }
}

/* The global ≤900px rule stretches every header button to fill the row, which
   made "New Event" tower over the Manage / Public view switch beside it. In
   this module the switch and the button should sit side by side. */
@media (max-width: 900px) {
  #ev-list-view .page-header-actions {
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
  }
  /* The switch sizes to its two labels; it must not stretch to fill the row. */
  #ev-list-view .page-header-actions .ev-viewswitch { flex: 0 0 auto; width: auto; }
  #ev-list-view .page-header-actions .btn {
    flex: 0 0 auto;
    width: auto;
    min-height: 44px;
    padding-left: 18px;
    padding-right: 18px;
  }
}
@media (max-width: 520px) {
  #ev-list-view .page-header-actions .ev-viewswitch,
  #ev-list-view .page-header-actions .btn { flex: 1 1 100%; width: 100%; }
  #ev-list-view .page-header-actions .ev-viewswitch-btn { flex: 1; }
}

/* ─── MODAL HEADER ───
   These lived in the duplicated .modal-overlay block that v5 removed; the
   surviving block only redefined .modal-overlay / .modal-content / .modal-close.
   Restored here, light, with the close button pinned to the right of the title. */
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.modal-title {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}
.modal-title .ui-icon { color: var(--daffodil-primary); flex-shrink: 0; }
.modal-header .modal-close { flex-shrink: 0; }
.modal-section { margin-bottom: 20px; }
.modal-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* Ticket-type rows: the header row supplies the column names on wide screens,
   so the per-field labels are hidden there and shown once the grid stacks. */
.ev-tt-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ev-tt-label {
  font-size: 11px; font-weight: 700; color: var(--ev-ink-muted);
  text-transform: uppercase; letter-spacing: .04em;
}
@media (min-width: 901px) {
  .ev-tt-label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}
@media (max-width: 900px) {
  .ev-tt-row { grid-template-columns: 1fr 1fr; align-items: end; }
  .ev-tt-row > .ev-tt-cell:first-child { grid-column: 1 / -1; }
  .ev-tt-row > .ev-icon-btn { grid-column: 1 / -1; justify-self: end; margin-top: 2px; }
}
@media (max-width: 400px) {
  .ev-tt-row { grid-template-columns: 1fr; }
}

/* A notification that links somewhere reads as actionable. */
.notif-item.linked { cursor: pointer; }
.notif-item.linked:hover { background: var(--ev-brand-soft, rgba(11,56,151,.08)); }
.notif-item.linked:focus-visible { outline: 2px solid var(--daffodil-primary); outline-offset: -2px; }

/* Large currency figures (a whole event's procurement, for instance) were
   running past the edge of their stat card. */
.ev-stat > div { min-width: 0; flex: 1; }
.ev-stat-value {
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 900px) {
  .ev-stat-value { font-size: 18px; }
}

/* A disabled primary button kept white text on a washed-out blue, which
   measured 1:1 — the label vanished. Give disabled buttons a readable
   grey-on-grey treatment instead. */
.btn:disabled,
.btn[disabled] {
  background: #E2E8F0 !important;
  border-color: #CBD5E1 !important;
  color: #475569 !important;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 1;
}
.btn:disabled:hover,
.btn[disabled]:hover { background: #E2E8F0 !important; }

/* ============================================================
   EVENTS — POLISH PASS
   Compact toolbar, restrained view switch, external-people UI.
   ============================================================ */

/* ─── Toolbar: search and filters share one row on desktop ─── */
.ev-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

/* Compact, quiet search. It sits beside the filters rather than owning a row. */
.ev-search {
  position: relative;
  flex: 0 1 320px;
  min-width: 0;
  display: flex;
  align-items: center;
}
.ev-search .ev-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ev-ink-muted);
  font-size: 15px;
  pointer-events: none;
}
.ev-search-input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 12px 0 34px;
  background: var(--ev-surface);
  border: 1px solid var(--ev-border);
  border-radius: 8px;
  color: var(--ev-ink);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ev-search-input::placeholder { color: var(--ev-ink-muted); }
.ev-search-input:hover { border-color: var(--ev-border-strong); }
.ev-search-input:focus {
  border-color: var(--ev-brand);
  box-shadow: 0 0 0 3px rgba(11, 56, 151, .12);
}
.ev-search-input::-webkit-search-cancel-button { cursor: pointer; }
.ev-search.boxed { flex: 1 1 auto; }

.ev-toolbar .ev-filters { flex: 0 1 auto; justify-content: flex-end; }

/* Filter chips: smaller and calmer than before. */
.ev-toolbar .ev-chip,
#ev-picker-tabs .ev-chip {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 8px;
}
.ev-chip.active {
  background: rgba(11, 56, 151, .10);
  border-color: rgba(11, 56, 151, .42);
  color: var(--ev-brand);
  font-weight: 700;
}
.ev-chip.active .ev-chip-count { background: rgba(11, 56, 151, .14); color: var(--ev-brand); }

/* ─── Manage / Public view: a navigation control, not a decorative chip ─── */
.ev-viewswitch {
  display: inline-flex;
  background: var(--ev-surface);
  border: 1px solid var(--ev-border);
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}
.ev-viewswitch-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ev-ink-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  /* Deliberately short and flat: a colour change, no movement, no bounce. */
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.ev-viewswitch-btn .ui-icon { font-size: 15px; opacity: .9; }
.ev-viewswitch-btn:hover { background: var(--ev-surface-sunken); color: var(--ev-ink); }
.ev-viewswitch-btn.active {
  background: var(--ev-brand-soft);
  border-color: rgba(11, 56, 151, .28);
  color: var(--ev-brand);
  font-weight: 700;
  box-shadow: none;
}

/* Placeholder shown while the session is still being confirmed. */
.ev-chrome-skeleton {
  display: inline-block;
  width: 210px;
  height: 40px;
  border-radius: 9px;
  background: linear-gradient(90deg, #EEF2F7 25%, #E4EAF2 37%, #EEF2F7 63%);
  background-size: 400% 100%;
  animation: evShimmer 1.3s ease infinite;
}
@keyframes evShimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }

/* ─── Registration window ─── */
.ev-regwindow { gap: 18px; }
.ev-regrow { display: flex; flex-direction: column; gap: 6px; }
.ev-reglabel { font-size: 12.5px; font-weight: 700; color: var(--ev-ink); }
.ev-regpair { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.ev-regcell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ev-sublabel {
  font-size: 11px; font-weight: 700; color: var(--ev-ink-muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.ev-inline-error {
  display: flex; align-items: flex-start; gap: 7px;
  margin: 4px 0 0; padding: 9px 12px;
  background: var(--ev-danger-soft);
  border: 1px solid rgba(185, 28, 28, .22);
  border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--ev-danger);
}
.ev-inline-error.hidden { display: none; }

/* ─── Wizard stepper ─── */
.ev-stepper-compact { display: none; }
.ev-stepper-count {
  font-size: 11px; font-weight: 700; color: var(--ev-ink-muted);
  text-transform: uppercase; letter-spacing: .05em;
}
.ev-stepper-current { display: block; font-size: 15px; font-weight: 700; color: var(--ev-ink); margin-top: 2px; }

/* ─── Person type badges ─── */
.ev-person-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ev-typebadge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .01em;
  white-space: nowrap;
}
.ev-typebadge .ui-icon { font-size: 12px; }
.ev-typebadge.dic {
  background: var(--ev-info-soft); color: var(--ev-brand); border: 1px solid rgba(11, 56, 151, .2);
}
.ev-typebadge.external {
  background: #FFF7ED; color: #9A3412; border: 1px solid rgba(154, 52, 18, .22);
}
.ev-person-role { font-size: 12.5px; font-weight: 600; color: var(--ev-ink-soft); }
.ev-notset { color: var(--ev-ink-muted); font-style: italic; }
.ev-grouplabel {
  margin: 12px 0 6px; font-size: 12px; font-weight: 700;
  color: var(--ev-ink-soft);
}
.ev-stats.compact { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 4px; }

.ev-stackav { display: inline-block; }
.ev-stackav.external .ev-avatar-initials { background: #9A3412; }

/* ─── Source chooser (DIC directory vs external person) ─── */
.ev-sourcechoice { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.ev-source {
  display: flex; align-items: flex-start; gap: 13px; width: 100%; text-align: left;
  background: var(--ev-surface); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-sm); padding: 16px; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.ev-source:hover { border-color: var(--ev-brand); background: var(--ev-brand-soft); }
.ev-source-icon {
  display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0;
  background: var(--ev-info-soft); color: var(--ev-brand);
  border-radius: 10px; font-size: 20px;
}
.ev-source-text { flex: 1; min-width: 0; }
.ev-source-text strong { display: block; font-size: 14px; color: var(--ev-ink); margin-bottom: 3px; }
.ev-source-text span { display: block; font-size: 12.5px; color: var(--ev-ink-muted); line-height: 1.5; }
.ev-source-chevron { color: var(--ev-ink-muted); flex-shrink: 0; margin-top: 10px; }

/* ─── Picker extras ─── */
#ev-picker-tabs { margin-bottom: 12px; }
#ev-picker-searchbox.hidden { display: none; }
.ev-picker-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 26px 16px; text-align: center; color: var(--ev-ink-muted);
}
.ev-picker-empty > .ui-icon { font-size: 26px; }
.ev-picker-empty p { margin: 0; font-size: 13px; }
.ev-picker-addnew {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; min-height: 44px; margin-top: 4px;
  background: var(--ev-surface); border: 1px dashed var(--ev-border-strong);
  border-radius: var(--ev-radius-sm); color: var(--ev-brand);
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.ev-picker-addnew:hover { background: var(--ev-brand-soft); border-color: var(--ev-brand); }
.ev-selchip.external {
  background: #FFF7ED; border-color: rgba(154, 52, 18, .25); color: #9A3412;
}
.ev-selchip.external button { background: rgba(154, 52, 18, .12); color: #9A3412; }
.ev-selchip.external button:hover { background: rgba(154, 52, 18, .22); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  /* Stepper: three labels do not fit, so show the step and its name instead. */
  .ev-stepper { display: none; }
  .ev-stepper-compact {
    display: block; margin: 0 0 18px; padding-bottom: 14px;
    border-bottom: 1px solid var(--ev-border);
  }

  .ev-regpair { grid-template-columns: 1fr 1fr; }

  .ev-source { padding: 14px; }
  .ev-source-chevron { display: none; }
}

@media (max-width: 760px) {
  .ev-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .ev-toolbar .ev-search { flex: 0 0 auto; width: 100%; }
  .ev-toolbar .ev-filters {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .ev-toolbar .ev-filters::-webkit-scrollbar { display: none; }
  .ev-toolbar .ev-chip { flex-shrink: 0; min-height: 40px; }
  .ev-search-input { height: 44px; font-size: 16px; } /* 16px avoids iOS zoom */
}

@media (max-width: 520px) {
  .ev-viewswitch { width: 100%; }
  .ev-viewswitch-btn { flex: 1; justify-content: center; min-height: 42px; }
  .ev-regpair { grid-template-columns: 1fr; }
  .ev-typebadge { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .ev-viewswitch-btn, .ev-search-input, .ev-source { transition: none; }
  .ev-chrome-skeleton { animation: none; }
}

/* The creation wizard shows three step labels in a row; 540px clipped
   "Tickets & Registration". Only this dialog widens — the rest stay compact. */
.modal-content.modal-wide { max-width: 720px; }

.ev-stepper li { min-width: 0; }
.ev-stepper-label {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}
@media (max-width: 900px) {
  .modal-content.modal-wide { max-width: 540px; }
}

/* Role is displayed, not selected. This replaces .role-switcher-select, which
   was a dropdown that re-authenticated as any role from the browser. */
.role-display {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-btn);
  background: var(--bg-deep);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.role-display.drawer { width: 100%; justify-content: center; }
