/* ============================================================
   GoldenVisaX — Premium Light Theme (Blue)
   ============================================================ */

:root {
  /* Core palette */
  --primary:       #1565C0;
  --primary-dark:  #0D47A1;
  --primary-light: #1976D2;
  --primary-pale:  #E3F2FD;
  --primary-pale2: #BBDEFB;
  --accent:        #0288D1;
  --accent2:       #29B6F6;

  /* Neutrals */
  --bg:         #F7F9FC;
  --bg2:        #EEF2F8;
  --surface:    #FFFFFF;
  --surface2:   #F0F4F8;
  --border:     #DDE3EC;
  --border2:    #C5D0E0;

  /* Text */
  --text:       #1A2035;
  --text2:      #3D4F6B;
  --muted:      #6B7A99;
  --muted2:     #9AAEC8;

  /* Semantic */
  --success:    #2E7D32;
  --success-bg: #E8F5E9;
  --warn:       #E65100;
  --warn-bg:    #FFF3E0;
  --danger:     #C62828;
  --danger-bg:  #FFEBEE;
  --info:       #01579B;
  --info-bg:    #E1F5FE;

  /* Stage colors */
  --stage-complete: #1565C0;
  --stage-active:   #0288D1;
  --stage-pending:  #B0BEC5;

  /* Typography */
  --serif: 'Georgia', 'Times New Roman', serif;
  --sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  --mono:  'SFMono-Regular', Consolas, monospace;

  /* Sizing */
  --radius:   8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow:   0 1px 4px rgba(21,101,192,.10), 0 2px 12px rgba(21,101,192,.06);
  --shadow-md: 0 4px 20px rgba(21,101,192,.12), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 32px rgba(21,101,192,.16), 0 2px 8px rgba(0,0,0,.06);

  /* Transitions */
  --t: .18s ease;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-weight: 600; line-height: 1.25; color: var(--text); }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
p { margin-bottom: .8rem; }
a { color: var(--primary); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--primary-dark); }
strong { font-weight: 600; }
em { font-style: italic; color: var(--primary); }
code { font-family: var(--mono); font-size: .88em; background: var(--surface2); border-radius: 4px; padding: 1px 5px; }

/* ── Layout Shell ────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: 260px;
  background: var(--primary-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 200;
  transition: transform var(--t);
}
.sidebar-logo {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-logo .logo-text {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
}
.sidebar-logo .logo-sub {
  font-size: 11px;
  color: rgba(255,255,255,.5);
  margin-top: 2px;
}
.sidebar-section {
  padding: 12px 12px 4px;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  font-weight: 600;
}
.sidebar-nav {
  padding: 4px 8px;
  flex: 1;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: rgba(255,255,255,.75);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--t);
  margin-bottom: 2px;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.sidebar-nav a .nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.sidebar-nav a .nav-badge {
  margin-left: auto;
  background: #29B6F6;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}
.sidebar-footer {
  padding: 12px 8px 16px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: rgba(255,255,255,.55);
  font-size: 13px;
  transition: all var(--t);
}
.sidebar-footer a:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.85); }

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top Bar ─────────────────────────────────────────────── */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(21,101,192,.06);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.notif-bell {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--t);
  font-size: 16px;
}
.notif-bell:hover { background: var(--primary-pale); border-color: var(--primary-pale2); }
.notif-badge {
  position: absolute;
  top: -3px; right: -3px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--surface);
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  transition: all var(--t);
}
.user-chip:hover { border-color: var(--primary-pale2); background: var(--primary-pale); }
.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

/* ── Page Content ────────────────────────────────────────── */
.page-content {
  padding: 28px;
  flex: 1;
}
.page-header {
  margin-bottom: 24px;
}
.page-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
}
.page-header .breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.page-header .breadcrumb a { color: var(--primary); }
.page-header .breadcrumb span { color: var(--muted2); }

/* ── Stage Progress Bar ──────────────────────────────────── */
.stage-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.stage-bar-title {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 14px;
}
.stage-steps {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}
.stage-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 60px;
  position: relative;
  cursor: default;
}
.stage-step::before {
  content: '';
  position: absolute;
  top: 14px;
  left: calc(-50% + 14px);
  right: calc(50% + 14px);
  height: 2px;
  background: var(--border2);
  z-index: 0;
}
.stage-step:first-child::before { display: none; }
.stage-step.done::before  { background: var(--primary); }
.stage-step.active::before { background: linear-gradient(to right, var(--primary), var(--accent2)); }

.stage-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid var(--border2);
  background: var(--surface);
  color: var(--muted2);
  position: relative;
  z-index: 1;
  transition: all var(--t);
}
.stage-step.done  .stage-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.stage-step.active .stage-dot { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--primary-pale); }
.stage-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted2);
  margin-top: 5px;
  text-align: center;
  white-space: nowrap;
}
.stage-step.done  .stage-label { color: var(--primary); }
.stage-step.active .stage-label { color: var(--accent); font-weight: 600; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--primary-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* ── Stat Grid ───────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.stat-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
}
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  display: block;
  width: 100%;
  padding: 10px 13px;
  font-size: 14px;
  font-family: var(--sans);
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21,101,192,.12);
}
.form-input::placeholder { color: var(--muted2); }
.form-select { cursor: pointer; }
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Radio / Checkbox options */
.opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.opt-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--t);
  background: var(--surface);
}
.opt-item:hover { border-color: var(--primary-pale2); background: var(--primary-pale); }
.opt-item.selected { border-color: var(--primary); background: var(--primary-pale); }
.opt-item input { margin-top: 2px; accent-color: var(--primary); }
.opt-label { font-size: 14px; font-weight: 500; }
.opt-sub { font-size: 12px; color: var(--muted); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--sans);
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--t);
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; box-shadow: 0 4px 14px rgba(21,101,192,.35); }
.btn-secondary { background: var(--surface); color: var(--primary); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-pale); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #b71c1c; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-ghost { background: transparent; color: var(--primary); border-color: transparent; }
.btn-ghost:hover { background: var(--primary-pale); }
.btn-sm { padding: 6px 13px; font-size: 12px; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-block { width: 100%; display: flex; }
.btn-icon { padding: 8px; }

/* ── Badges / Status ─────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}
.badge-primary { background: var(--primary-pale); color: var(--primary); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warn    { background: var(--warn-bg); color: var(--warn); }
.badge-danger  { background: var(--danger-bg); color: var(--danger); }
.badge-info    { background: var(--info-bg); color: var(--info); }
.badge-muted   { background: var(--surface2); color: var(--muted); }
.badge-stage   { background: var(--primary-pale2); color: var(--primary-dark); }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-info     { background: var(--info-bg);    color: var(--info);    border: 1px solid var(--primary-pale2); }
.alert-success  { background: var(--success-bg); color: var(--success); border: 1px solid #A5D6A7; }
.alert-warn     { background: var(--warn-bg);    color: var(--warn);    border: 1px solid #FFCC80; }
.alert-danger   { background: var(--danger-bg);  color: var(--danger);  border: 1px solid #EF9A9A; }
.hidden { display: none !important; }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table thead th {
  background: var(--surface2);
  color: var(--text2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--t); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--primary-pale); }
.data-table td { padding: 11px 14px; color: var(--text); vertical-align: middle; }

/* ── Messaging ───────────────────────────────────────────── */
.msg-thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 500px;
  overflow-y: auto;
  padding: 4px 0;
}
.msg-bubble {
  max-width: 72%;
  padding: 11px 15px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.55;
  position: relative;
}
.msg-bubble.from-client {
  background: var(--primary-pale);
  border: 1px solid var(--primary-pale2);
  color: var(--text);
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}
.msg-bubble.from-agent {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.msg-meta {
  font-size: 11px;
  color: var(--muted2);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.msg-compose {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-top: 12px;
}
.msg-compose textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 120px;
}

/* ── File Upload Zone ────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t);
  background: var(--surface);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-pale);
}
.upload-zone .upload-icon { font-size: 2.5rem; margin-bottom: 8px; }
.upload-zone .upload-title { font-size: 15px; font-weight: 600; color: var(--text2); }
.upload-zone .upload-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── Document List ───────────────────────────────────────── */
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--t);
}
.doc-item:hover { border-color: var(--primary-pale2); background: var(--primary-pale); }
.doc-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--primary-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.doc-status { display: flex; align-items: center; gap: 8px; }

/* ── Appointment Calendar ────────────────────────────────── */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day {
  aspect-ratio: 1;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--t);
  padding: 4px;
}
.cal-day.available { background: var(--primary-pale); color: var(--primary); border-color: var(--primary-pale2); }
.cal-day.available:hover { background: var(--primary-pale2); }
.cal-day.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.cal-day.past, .cal-day.unavailable { color: var(--muted2); cursor: default; }
.cal-day.today { border-color: var(--accent); }

/* ── Progress bar ───────────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--primary), var(--accent2));
  border-radius: 999px;
  transition: width .4s ease;
}

/* ── Risk indicator ─────────────────────────────────────── */
.risk-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.risk-clear   { background: var(--success-bg); color: var(--success); }
.risk-low     { background: #FFF9C4; color: #827717; }
.risk-medium  { background: var(--warn-bg); color: var(--warn); }
.risk-high    { background: var(--danger-bg); color: var(--danger); }
.risk-critical { background: #880E4F; color: #fff; }

/* ── Cost breakdown table ───────────────────────────────── */
.cost-table {
  width: 100%;
  border-collapse: collapse;
}
.cost-table td {
  padding: 10px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.cost-table tr:last-child td { border-bottom: none; }
.cost-table .total-row td {
  font-weight: 700;
  font-size: 16px;
  color: var(--primary);
  background: var(--primary-pale);
  border-radius: 0 0 var(--radius) var(--radius);
}
.cost-table td:last-child { text-align: right; font-weight: 600; }

/* ── OTP inputs ─────────────────────────────────────────── */
.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}
.otp-digit {
  width: 52px;
  height: 60px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  color: var(--primary);
  background: var(--surface);
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
}
.otp-digit:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21,101,192,.14);
}

/* ── Login page layout ──────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #E3F2FD 0%, #F0F4F8 50%, #EDE7F6 100%);
  padding: 20px;
}
.auth-box {
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo .logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--primary);
  border-radius: 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(21,101,192,.3);
}
.auth-logo .logo-mark svg { width: 28px; height: 28px; fill: #fff; }
.auth-logo .name { font-size: 1.35rem; font-weight: 700; color: var(--text); }
.auth-logo .tagline { font-size: 13px; color: var(--muted); }
.auth-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.auth-title { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.auth-sub { font-size: 13px; color: var(--muted); margin-bottom: 22px; }

/* ── Dropdowns ───────────────────────────────────────────── */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 999;
  padding: 6px;
  display: none;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--t);
}
.dropdown-item:hover { background: var(--primary-pale); color: var(--primary); }
.dropdown-sep { height: 1px; background: var(--border); margin: 4px 0; }

/* ── Country/program cards ───────────────────────────────── */
.program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.program-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: all var(--t);
  background: var(--surface);
  position: relative;
}
.program-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.program-card.selected { border-color: var(--primary); background: var(--primary-pale); }
.program-flag { font-size: 2.2rem; margin-bottom: 8px; }
.program-name { font-size: 15px; font-weight: 700; color: var(--text); }
.program-type { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.program-stats { display: flex; gap: 12px; margin-top: 10px; }
.program-stat { font-size: 12px; color: var(--muted2); }
.program-stat strong { color: var(--text2); }
.program-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.program-card.selected .program-check { display: flex; }

/* ── Notification panel ─────────────────────────────────── */
.notif-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 999;
  max-height: 420px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.notif-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notif-list { overflow-y: auto; flex: 1; }
.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t);
}
.notif-item:hover { background: var(--primary-pale); }
.notif-item.unread { background: var(--info-bg); }
.notif-item-title { font-size: 13px; font-weight: 600; color: var(--text); }
.notif-item-body  { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-item-time  { font-size: 11px; color: var(--muted2); margin-top: 3px; }

/* ── Mobile toggle ───────────────────────────────────────── */
.mobile-menu-btn {
  display: none;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface2);
  align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-260px); }
  .sidebar.open { transform: none; box-shadow: 4px 0 24px rgba(0,0,0,.18); }
  .main-content { margin-left: 0; }
  .mobile-menu-btn { display: flex; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .program-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .otp-inputs { gap: 6px; }
  .otp-digit { width: 42px; height: 52px; font-size: 1.4rem; }
}

/* ── Utility ─────────────────────────────────────────────── */
.text-primary { color: var(--primary); }
.text-muted   { color: var(--muted); }
.text-danger  { color: var(--danger); }
.text-success { color: var(--success); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.fw-bold      { font-weight: 700; }
.fw-semibold  { font-weight: 600; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.p-0  { padding: 0; }
.w-full { width: 100%; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Loader ──────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--primary-pale2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(255,255,255,.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

/* ── Fade animations ─────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.fade-up { animation: fadeUp .3s ease both; }
