/* ==========================================================================
   Monarch Application Hub — design tokens & base
   Rebranded to match the REAL umonarch.ch institutional site (not just
   alumnihub's simplified app palette) — measured via getComputedStyle on
   the live site, not invented: --primary #193F69 is umonarch.ch's hero
   overlay and footer background; --primary-mid #2F5FA7 is the blue used
   on its serif section headings; --accent #FFDA00 is its "Apply Now"
   button fill (navy text, weight 700, 10px radius, verified via DOM
   inspection of the live button). Georgia at weight 400 is umonarch.ch's
   actual display font (h1 and h2 both computed to Georgia/400); Lato is
   its body font, loaded the same way umonarch.ch itself loads it.
   apptrack's dark slate sidebar convention is kept structurally but
   recolored into this same navy family so the logged-in app shell reads
   as one brand with the public pages, per explicit instruction to apply
   this identity everywhere, not just the marketing pages.
   ========================================================================== */

:root {
  /* Brand — measured against the live umonarch.ch, not alumnihub */
  --primary: #193F69;
  --primary-dark: #0D2642;
  --primary-mid: #2F5FA7;
  --accent: #FFDA00;
  --teal: #1abc9c;
  --sidebar-bg: #0D2642;
  --active-accent: #3b82f6;

  /* Semantic */
  --color-success: #16a34a;
  --color-success-bg: #dcfce7;
  --color-danger: #ef4444;
  --color-danger-bg: #fee2e2;
  --color-warning: #f59e0b;
  --color-warning-bg: #fef3c7;
  --color-info: var(--primary);
  --color-info-bg: #eef4fb;

  /* Neutrals (alumnihub's slate scale) */
  --ink-900: #1e293b;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-300: #94a3b8;
  --surface-0: #ffffff;
  --surface-50: #f8fafc;
  --surface-100: #f1f5f9;
  --surface-200: #e2e8f0;
  --border-color: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Typography — Lato body + Georgia display, matching umonarch.ch exactly */
  --font-body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, Cantarell, 'Noto Sans', sans-serif;
  --font-display: Georgia, 'Times New Roman', serif;

  /* Spacing (4px scale) */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 28px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px;

  /* Radius & shadow (alumnihub: buttons 8px, cards 12px) */
  --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px; --radius-full: 999px;
  --shadow-sm: 0 2px 4px rgba(15,23,42,.04), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md: 0 4px 12px rgba(15,23,42,.10);
  --shadow-lg: 0 12px 32px rgba(15,23,42,.16);

  --ease: cubic-bezier(.16,1,.3,1);
  --dur-fast: 150ms;
  --dur-med: 250ms;
  --dur-slow: 400ms;

  --z-nav: 100; --z-dropdown: 200; --z-modal: 500; --z-toast: 900;

  --surface-sunken: #f8fafc;
  --focus-ring: rgba(0,51,102,.16);

  --sidebar-width: 260px;
  --topbar-height: 64px;
  --content-max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--surface-100);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2 { font-family: var(--font-display); font-weight: 400; color: var(--ink-900); line-height: 1.15; margin: 0 0 var(--space-3); letter-spacing: normal; }
h3, h4 { font-family: var(--font-body); font-weight: 700; color: var(--ink-900); line-height: 1.15; margin: 0 0 var(--space-3); letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 2vw, 1.7rem); color: var(--primary-mid); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 var(--space-4); color: var(--ink-700); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-5); }
.narrow { max-width: 640px; }

/* -- Loading / transition state -------------------------------------- */
.page-enter { animation: fadeIn 180ms ease-out both; } /* only where view transitions aren't supported; see end of file */
@keyframes fadeIn { from { opacity: .001; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none; } }
.skeleton { background: linear-gradient(90deg, var(--surface-200) 25%, var(--surface-100) 37%, var(--surface-200) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* -- Public marketing top bar ------------------------------------------ */
.topbar { background: var(--surface-0); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: var(--z-nav); height: 72px; display: flex; align-items: center; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-5); max-width: 1120px; margin: 0 auto; width: 100%; }
.brand { display: flex; align-items: center; gap: var(--space-3); font-weight: 700; color: var(--ink-900); font-size: 1rem; }
.brand:hover { opacity: .85; text-decoration: none; }
.brand-logo { height: 34px; width: auto; display: block; }
.brand-badge { height: 36px; width: auto; display: block; flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: var(--space-6); }
.nav-links a:not(.btn) { color: var(--ink-700); font-weight: 500; font-size: .89rem; }
.nav-links a:not(.btn):hover { color: var(--primary); }

/* -- Buttons (umonarch.ch's real "Apply Now": 10px radius, 15px/30px padding, weight 700) -- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); border: 1px solid transparent; border-radius: 10px; padding: .68rem 1.4rem; font-weight: 700; font-size: .9rem; cursor: pointer; min-height: 42px; transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); box-shadow: var(--shadow-md); transform: translateY(-1px); text-decoration: none; }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { background: var(--ink-300); cursor: not-allowed; box-shadow: none; opacity: .7; }
.btn-gold { background: var(--accent); color: var(--primary-dark); box-shadow: var(--shadow-sm); }
.btn-gold:hover:not(:disabled) { filter: brightness(.96); transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--border-strong); }
.btn-ghost:hover:not(:disabled) { border-color: var(--primary); background: var(--surface-50); text-decoration: none; }
.btn-danger { background: var(--surface-0); color: var(--color-danger); border-color: var(--color-danger); }
.btn-danger:hover:not(:disabled) { background: var(--color-danger); color: #fff; text-decoration: none; }
.btn-block { width: 100%; }
.btn-sm { padding: .5rem 1rem; font-size: .83rem; min-height: 36px; }

/* -- Cards / panels (alumnihub: 12px radius, subtle 2-layer shadow) ---- */
.card { background: var(--surface-0); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: var(--space-8); }
.card-flat { background: var(--surface-0); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: var(--space-5); transition: box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
a.card-flat:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); transform: translateY(-2px); text-decoration: none; }
.card-accent-primary { border-left: 4px solid var(--primary); }
.card-accent-success { border-left: 4px solid var(--color-success); }
.card-accent-danger { border-left: 4px solid var(--color-danger); }
.card-accent-warning { border-left: 4px solid var(--color-warning); }

/* -- Forms ---------------------------------------------------------------- */
.field { margin-bottom: var(--space-5); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-5); }
.field-grid .field[data-full-width] { grid-column: 1 / -1; }
@media (max-width: 640px) { .field-grid { grid-template-columns: 1fr; } }

/* -- Review & submit summary (per-section, with Edit links) ----------------- */
.review-section { border: 1px solid var(--border-color); border-radius: var(--radius-md); margin-bottom: var(--space-4); overflow: hidden; }
.review-section-head { display: flex; justify-content: space-between; align-items: center; padding: var(--space-3) var(--space-5); background: var(--surface-50); border-bottom: 1px solid var(--border-color); }
.review-section-head h4 { margin: 0; font-size: .86rem; font-weight: 700; color: var(--ink-900); }
.review-section-body { padding: var(--space-4) var(--space-5); display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3) var(--space-6); }
.review-item .label { font-size: .74rem; color: var(--ink-500); margin-bottom: 2px; }
.review-item .value { font-size: .88rem; color: var(--ink-900); font-weight: 500; word-break: break-word; }
@media (max-width: 640px) { .review-section-body { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: .85rem; color: var(--ink-900); margin-bottom: var(--space-2); }
.field .help { font-size: .78rem; color: var(--ink-500); margin-top: var(--space-1); }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=date],
.field input[type=password], .field select, .field textarea {
  width: 100%; padding: .68rem .85rem; border: 1px solid var(--border-color); border-radius: var(--radius-md);
  font-size: .92rem; font-family: inherit; background: var(--surface-sunken); color: var(--ink-900);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--border-strong); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); background: var(--surface-0); box-shadow: 0 0 0 3px var(--focus-ring);
}
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right .85rem center; background-size: 16px; padding-right: var(--space-8);
}
.field textarea { resize: vertical; min-height: 100px; }
.field .error-msg { color: var(--color-danger); font-size: .8rem; margin-top: var(--space-1); }
.field.has-error input, .field.has-error select { border-color: var(--color-danger); }
.otp-input { letter-spacing: .5em; font-size: 1.6rem; text-align: center; font-weight: 700; }

/* -- Alerts / toasts -------------------------------------------------------- */
.alert { border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); font-size: .88rem; margin-bottom: var(--space-5); }
.alert-success { background: var(--color-success-bg); color: #15803d; }
.alert-danger { background: var(--color-danger-bg); color: #b91c1c; }
.alert-info { background: var(--color-info-bg); color: var(--primary); }
/* Autosave status — in the sticky top bar (see app-shell-start.php) */
.save-status { display: inline-flex; align-items: center; gap: 8px; margin-left: var(--space-4); padding: 5px 12px 5px 10px; border-radius: var(--radius-full); font-size: .78rem; font-weight: 600; color: #15803d; background: #EAF7EE; border: 1px solid #C7E9D2; white-space: nowrap; transition: background-color .2s, color .2s, border-color .2s; }
.save-icon { width: 14px; height: 14px; border-radius: 50%; background: #16a34a; position: relative; flex-shrink: 0; }
.save-icon::after { content: ""; position: absolute; left: 4px; top: 2px; width: 4px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.save-status[data-state="saving"] { color: var(--primary); background: #EEF4FB; border-color: #CFDDF0; }
.save-status[data-state="saving"] .save-icon { background: var(--primary-mid); animation: savePulse 1s ease-in-out infinite; }
.save-status[data-state="saving"] .save-icon::after, .save-status[data-state="offline"] .save-icon::after, .save-status[data-state="error"] .save-icon::after { display: none; }
.save-status[data-state="offline"], .save-status[data-state="error"] { color: #92400e; background: var(--color-warning-bg); border-color: #F6DDA0; }
.save-status[data-state="offline"] .save-icon, .save-status[data-state="error"] .save-icon { background: var(--color-warning); }
@keyframes savePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
@media (max-width: 640px) { .save-status { margin-left: var(--space-2); } .save-status .label { max-width: 110px; overflow: hidden; text-overflow: ellipsis; } }
@media (prefers-reduced-motion: reduce) { .save-status[data-state="saving"] .save-icon { animation: none; } }

/* -- Status rail (legacy — kept for compatibility) ----------------------- */
.status-rail { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-6) 0; }
.status-step { flex: 1 1 120px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); font-size: .76rem; font-weight: 600; text-align: center; background: var(--surface-200); color: var(--ink-500); }
.status-step.applicant.active { background: var(--primary); color: #fff; }
.status-step.admissions.active { background: var(--color-success); color: #fff; }

/* -- Hero (public marketing) ------------------------------------------------ */
.hero { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; padding: var(--space-20) 0 var(--space-16); text-align: center; }
.hero .container { display: flex; flex-direction: column; align-items: center; }
.hero h1 { color: #fff; max-width: 760px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: var(--space-2); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius-full); padding: .45rem 1.1rem; font-size: .78rem; font-weight: 700; color: var(--accent); letter-spacing: .04em; text-transform: uppercase; margin-bottom: var(--space-6); }
.hero p.lede { color: rgba(255,255,255,.82); font-size: 1.05rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-cta-row { display: flex; gap: var(--space-4); flex-wrap: wrap; justify-content: center; }
.hero-badges { display: flex; gap: var(--space-4); flex-wrap: wrap; justify-content: center; margin-top: var(--space-8); }
.hero-badge { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); font-size: .78rem; color: rgba(255,255,255,.85); }

/* -- Footer ------------------------------------------------------------------ */
/* -- Header brand pairing (crest | divider | app badge+name), matching alumnihub -- */
.brand-pair { display: flex; align-items: center; gap: var(--space-4); }
.brand-divider { width: 1px; height: 30px; background: linear-gradient(to bottom, transparent, var(--border-strong), transparent); flex-shrink: 0; }
.brand-sub { display: flex; align-items: center; gap: var(--space-2); }
.brand-sub img { height: 32px; width: auto; }
.brand-sub-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-sub-text strong { font-size: .8rem; font-weight: 800; color: var(--ink-900); letter-spacing: .01em; }
.brand-sub-text span { font-size: .68rem; font-weight: 600; color: var(--ink-500); letter-spacing: .04em; text-transform: uppercase; }

/* -- Rich footer, matching alumnihub's multi-column dark footer -------------- */
.site-footer-rich { background: var(--primary-dark); color: rgba(255,255,255,.65); padding: var(--space-12) 0 var(--space-6); margin-top: var(--space-16); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: var(--space-8); }
.footer-brand p { color: rgba(255,255,255,.55); font-size: .85rem; max-width: 260px; }
.footer-brand-lockup { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.footer-brand-lockup .crest-chip { background: #fff; border-radius: 10px; padding: 6px 10px; display: flex; align-items: center; }
.footer-brand-lockup .crest-chip img { height: 32px; width: auto; display: block; }
.footer-brand-lockup .brand-sub-text strong { color: #fff; display: block; font-size: .8rem; letter-spacing: .02em; }
.footer-brand-lockup .brand-sub-text span { color: rgba(255,255,255,.55); font-size: .7rem; }
.footer-col h4 { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.4); margin-bottom: var(--space-4); }
.footer-col a, .footer-col p { display: block; color: rgba(255,255,255,.7); font-size: .87rem; margin-bottom: var(--space-3); }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: var(--space-8); padding-top: var(--space-5); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-3); font-size: .8rem; color: rgba(255,255,255,.4); }
.footer-rule { text-align: center; color: var(--ink-500); font-style: italic; margin-top: var(--space-6); }

/* ==========================================================================
   Application shell — dark sidebar pattern, matching apptrack's Application
   Portal exactly (the product this replaces), refined with alumnihub-level
   shadow/spacing/typography polish.
   ========================================================================== */

.shell { min-height: 100vh; background: var(--surface-100); }

/* -- Sidebar v2: light, white, navy active pill (umonarch.ch identity, app-shell) -- */
.shell-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-width);
  background: var(--surface-0); border-right: 1px solid var(--border-color);
  display: flex; flex-direction: column; z-index: var(--z-nav);
}
.shell-brand {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-5);
  color: var(--ink-900); font-weight: 700; font-size: .95rem; line-height: 1.25;
  border-bottom: 1px solid var(--border-color);
}
.shell-brand:hover { text-decoration: none; opacity: .85; }
.shell-brand .brand-logo { height: 36px; width: auto; }
.shell-brand small { display: block; font-weight: 500; font-size: .68rem; color: var(--ink-500); letter-spacing: .02em; margin-top: 2px; }

.shell-nav { flex: 1; padding: var(--space-4) var(--space-3); overflow-y: auto; }
.shell-nav-link {
  display: flex; align-items: center; gap: var(--space-3);
  padding: .68rem var(--space-4); margin: 0 0 2px;
  color: var(--ink-700); font-weight: 500; font-size: .88rem; border-radius: 10px;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.shell-nav-link:hover { background: var(--surface-100); color: var(--ink-900); text-decoration: none; }
.shell-nav-link.active { background: var(--primary); color: #fff; font-weight: 600; box-shadow: var(--shadow-sm); }
.shell-nav-link.active .icon { opacity: 1; }
.shell-nav-link .icon { width: 18px; height: 18px; flex-shrink: 0; opacity: .7; }
.shell-nav-section { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-300); padding: var(--space-5) var(--space-4) var(--space-2); }

.shell-user {
  border-top: 1px solid var(--border-color); padding: var(--space-4) var(--space-5);
  display: flex; align-items: center; gap: var(--space-3);
}
.shell-user-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; flex-shrink: 0;
}
.shell-user-info { min-width: 0; flex: 1; }
.shell-user-email { font-size: .8rem; font-weight: 600; color: var(--ink-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shell-user-role { font-size: .72rem; color: var(--ink-500); }
.shell-user-signout { flex-shrink: 0; color: var(--ink-500); }
.shell-user-signout:hover { color: var(--color-danger); }

/* -- Main area -------------------------------------------------------------- */
.shell-main { margin-left: var(--sidebar-width); min-height: 100vh; display: flex; flex-direction: column; }
.shell-topbar {
  height: var(--topbar-height); flex-shrink: 0; background: var(--surface-0);
  border-bottom: 1px solid var(--border-color); display: flex; align-items: center;
  justify-content: space-between; padding: 0 var(--space-8); position: sticky; top: 0; z-index: 50;
}
.shell-topbar-title { font-weight: 700; font-size: 1rem; color: var(--ink-900); }
.shell-menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: var(--space-2); color: var(--ink-900); }
.shell-timer { display: inline-flex; align-items: center; gap: var(--space-2); background: var(--surface-100); border: 1px solid var(--border-color); border-radius: var(--radius-full); padding: .4rem .9rem; font-size: .82rem; font-weight: 600; color: var(--ink-700); }

/* -- Topbar user chip (avatar + name, umonarch.ch reference layout) --------- */
.topbar-user { display: flex; align-items: center; gap: var(--space-3); }
.topbar-user-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .82rem; flex-shrink: 0;
}
.topbar-user-name { font-size: .86rem; font-weight: 600; color: var(--ink-900); line-height: 1.2; }
.topbar-user-role { font-size: .72rem; color: var(--ink-500); }

.shell-content { flex: 1; padding: var(--space-8); max-width: var(--content-max); width: 100%; margin: 0 auto; }
.shell-content-wide { flex: 1; padding: var(--space-8); width: 100%; }

/* -- Welcome hero (apptrack pattern: gradient card atop every tab) -------- */
.welcome-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  border-radius: 14px; padding: var(--space-6) var(--space-8); color: #fff;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.welcome-hero h1 { color: #fff; font-size: 1.4rem; margin-bottom: var(--space-1); }
.welcome-hero p { color: rgba(255,255,255,.75); margin: 0; font-size: .88rem; }
.welcome-hero .btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.welcome-hero .btn-ghost:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); }

/* -- Dashboard hero (photo card, umonarch-reference "Welcome to ..." pattern) -- */
.dashboard-hero {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; align-items: stretch;
  background: var(--primary); border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: var(--space-6); box-shadow: var(--shadow-sm);
}
.dashboard-hero-text { padding: var(--space-8); display: flex; flex-direction: column; justify-content: center; gap: var(--space-3); }
.dashboard-hero-text h1 { color: #fff; font-family: var(--font-body); font-weight: 700; font-size: 1.5rem; margin: 0; }
.dashboard-hero-text p { color: rgba(255,255,255,.78); margin: 0; font-size: .92rem; max-width: 40ch; }
.dashboard-hero-text .btn-gold { align-self: flex-start; margin-top: var(--space-2); }
.dashboard-hero-photo {
  position: relative; min-height: 200px;
  background: linear-gradient(135deg, #FFF6D6 0%, #FFE9A0 100%);
  display: flex; align-items: center; justify-content: center;
}
.dashboard-hero-photo img { height: 100px; width: auto; filter: drop-shadow(0 4px 10px rgba(13,38,66,.18)); }

/* -- Pastel feature tiles (umonarch-reference 4-up row, Monarch palette) ----- */
.tile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); margin-bottom: var(--space-6); }
.tile-card { background: var(--surface-0); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: var(--space-5); }
.tile-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-3); }
.tile-icon.tile-navy { background: #E7EEF6; color: var(--primary); }
.tile-icon.tile-gold { background: #FFF6D6; color: #92720a; }
.tile-icon.tile-teal { background: #DCF5F0; color: #0f766e; }
.tile-icon.tile-success { background: var(--color-success-bg); color: var(--color-success); }
.tile-card h3 { font-size: .92rem; margin-bottom: var(--space-1); }
.tile-card p { font-size: .8rem; color: var(--ink-500); margin: 0; }

/* -- Application card-list (dashboard "Your Applications", replaces bare rows) -- */
.app-card-list { display: flex; flex-direction: column; gap: var(--space-3); }
.app-card-row {
  display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5);
  background: var(--surface-0); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  transition: box-shadow var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.app-card-row:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.app-card-icon { width: 44px; height: 44px; border-radius: 10px; background: #E7EEF6; color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.app-card-body { flex: 1; min-width: 0; cursor: pointer; }
.app-card-body h3 { font-size: .95rem; margin-bottom: 2px; }
.app-card-meta { font-size: .78rem; color: var(--ink-500); }
.app-card-actions { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.app-card-trash {
  width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: var(--ink-300); background: transparent; border: 1px solid transparent; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.app-card-trash:hover { background: var(--color-danger-bg); color: var(--color-danger); }

/* -- Confirm modal (draft deletion, etc.) ------------------------------------ */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(13,38,66,.45); z-index: var(--z-modal); align-items: center; justify-content: center; padding: var(--space-4); }
.modal-overlay.show { display: flex; }
.modal-card { background: var(--surface-0); border-radius: var(--radius-lg); max-width: 400px; width: 100%; padding: var(--space-6); box-shadow: var(--shadow-lg); }
.modal-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--color-danger-bg); color: var(--color-danger); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-4); }
.modal-card h3 { font-size: 1.05rem; margin-bottom: var(--space-2); }
.modal-card p { font-size: .88rem; color: var(--ink-500); margin-bottom: var(--space-5); }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--space-3); }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }

/* -- Submission success page (celebratory, umonarch-reference final step) --- */
.success-page { max-width: 560px; margin: var(--space-10) auto; text-align: center; }
.success-icon { width: 88px; height: 88px; border-radius: 50%; background: var(--color-success-bg); color: var(--color-success); display: flex; align-items: center; justify-content: center; margin: 0 auto var(--space-5); }
.success-page h1 { font-size: 1.5rem; margin-bottom: var(--space-2); }
.success-page > p { color: var(--ink-500); margin-bottom: var(--space-6); }
.success-meta { display: flex; justify-content: center; gap: var(--space-8); background: var(--surface-0); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: var(--space-5); margin-bottom: var(--space-6); }
.success-meta-item .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-500); margin-bottom: 2px; }
.success-meta-item .value { font-size: .92rem; font-weight: 700; color: var(--ink-900); }
.success-actions { display: flex; justify-content: center; gap: var(--space-4); margin-bottom: var(--space-8); }
.success-checklist { text-align: left; background: var(--surface-0); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: var(--space-5) var(--space-6); }
.success-checklist h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-500); margin-bottom: var(--space-3); }
.success-checklist ul { margin: 0; padding: 0; list-style: none; }
.success-checklist li { display: flex; gap: var(--space-2); font-size: .87rem; color: var(--ink-700); margin-bottom: var(--space-2); }

/* -- Progress track (apptrack pattern: gradient bar + stage labels) ------- */
.progress-track-wrap { margin: var(--space-5) 0 var(--space-2); }
.progress-track { height: 10px; border-radius: var(--radius-full); background: var(--surface-200); overflow: hidden; }
.progress-track-fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--primary)); border-radius: var(--radius-full); transition: width var(--dur-slow) var(--ease); }
.progress-stages { display: flex; justify-content: space-between; margin-top: var(--space-3); }
.progress-stage { flex: 1; text-align: center; font-size: .74rem; font-weight: 600; color: var(--ink-300); position: relative; }
.progress-stage.done { color: var(--primary); }
.progress-stage.current { color: var(--ink-900); }
.progress-stage .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); margin: 0 auto var(--space-2); }
.progress-stage.done .dot { background: var(--teal); }
.progress-stage.current .dot { background: var(--primary); box-shadow: 0 0 0 4px var(--focus-ring); }

/* -- Stat cards ------------------------------------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-7); }
.stat-card { background: var(--surface-0); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-sm); }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 800; color: var(--ink-900); line-height: 1.1; }
.stat-card .stat-label { font-size: .8rem; color: var(--ink-500); margin-top: var(--space-1); }
.stat-card.accent-gold { border-top: 3px solid var(--accent); }
.stat-card.accent-success { border-top: 3px solid var(--color-success); }

/* -- Panels (structured content blocks) ------------------------------------ */
.panel { background: var(--surface-0); border: 1px solid var(--border-color); border-radius: var(--radius-lg); margin-bottom: var(--space-6); overflow: hidden; box-shadow: var(--shadow-sm); }
.panel-header { padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.panel-header h2 { font-size: .98rem; margin: 0; font-weight: 700; display: flex; align-items: center; gap: var(--space-2); }
.panel-header .meta { font-size: .78rem; color: var(--ink-500); }
.panel-body { padding: var(--space-6); }
.panel-body-flush { padding: 0; }
.panel-footer { padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border-color); background: var(--surface-50); font-size: .84rem; }

/* -- Data table (matches apptrack: #f8fafc header, 12.8px, uppercase) ------ */
.data-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.data-table th { text-align: left; padding: var(--space-3) var(--space-6); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-700); background: var(--surface-50); border-bottom: 1px solid var(--border-color); }
.data-table td { padding: var(--space-4) var(--space-6); border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.data-table tbody tr { transition: background-color var(--dur-fast) var(--ease); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr.is-linked { cursor: pointer; }
.data-table tbody tr.is-linked:hover { background: var(--surface-50); }
.data-table .cell-muted { color: var(--ink-500); }
.data-table-wrap { overflow-x: auto; }

/* -- Badges ------------------------------------------------------------------ */
.badge { display: inline-flex; align-items: center; gap: .35em; padding: .28rem .65rem; border-radius: var(--radius-full); font-size: .74rem; font-weight: 700; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-applicant { background: #eef4fb; color: var(--primary); }
.badge-admissions { background: var(--color-success-bg); color: #15803d; }
.badge-neutral { background: var(--surface-200); color: var(--ink-500); }
.badge-danger { background: var(--color-danger-bg); color: var(--color-danger); }
.badge-warning { background: var(--color-warning-bg); color: #92400e; }

/* -- Horizontal stepper (apply form wizard, umonarch-reference pattern) ---- */
.apply-layout { display: block; }
.stepper {
  display: flex; align-items: flex-start; gap: 0; background: var(--surface-0);
  border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: var(--space-6) var(--space-6) var(--space-5); margin-bottom: var(--space-6); overflow-x: auto;
}
.stepper-item { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); position: relative; flex: 1; min-width: 84px; }
.stepper-item:not(:last-child)::after {
  content: ''; position: absolute; top: 19px; left: calc(50% + 24px); right: calc(-50% + 24px);
  height: 2px; background: var(--border-color); z-index: 0;
}
.stepper-item.done:not(:last-child)::after { background: var(--teal); }
.stepper-dot {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: .88rem; font-weight: 700; background: var(--surface-100); color: var(--ink-300); border: 2px solid var(--border-strong);
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  position: relative; z-index: 1;
}
.stepper-item.active .stepper-dot { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px var(--focus-ring); }
.stepper-item.done .stepper-dot { background: var(--teal); color: #fff; border-color: var(--teal); }
.stepper-label { font-size: .78rem; font-weight: 600; color: var(--ink-500); text-align: center; }
.stepper-item.active .stepper-label { color: var(--ink-900); }
.stepper-item.done .stepper-label { color: var(--ink-700); }

/* -- Empty state ----------------------------------------------------------------- */
.empty-state { text-align: center; padding: var(--space-16) var(--space-6); }
.empty-state .icon-wrap { width: 52px; height: 52px; border-radius: 50%; background: var(--surface-100); display: flex; align-items: center; justify-content: center; margin: 0 auto var(--space-5); color: var(--ink-300); }
.empty-state h2 { font-size: 1.05rem; margin-bottom: var(--space-2); }
.empty-state p { max-width: 380px; margin-left: auto; margin-right: auto; }

/* -- Auth split layout (login / otp / admin login) -------------------------------- */
/* Auth content section — sits BELOW the normal site header and ABOVE the
   normal site footer (alumnihub's own login page keeps full chrome; a
   completely bare full-viewport split was the mistake here before). */
.auth-split { display: grid; grid-template-columns: 1fr 440px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); margin: var(--space-8) 0; }
.auth-brand-panel { background: linear-gradient(160deg, var(--primary-dark), var(--primary)); color: #fff; padding: var(--space-10); display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-8); }
.auth-brand-panel .pitch h1 { color: #fff; font-size: clamp(1.6rem, 2.4vw, 2.1rem); max-width: 460px; font-weight: 800; }
.auth-brand-panel .pitch p { color: rgba(255,255,255,.78); max-width: 420px; }
.auth-brand-panel .pitch-list { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.auth-brand-panel .pitch-list li { display: flex; gap: var(--space-3); align-items: flex-start; color: rgba(255,255,255,.85); font-size: .88rem; }
.auth-brand-panel .pitch-list .tick { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; margin-top: 1px; font-size: .7rem; }
.auth-feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
.auth-feature { display: flex; align-items: flex-start; gap: var(--space-3); }
.auth-feature .icon-wrap { width: 34px; height: 34px; border-radius: var(--radius-sm); background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--accent); }
.auth-feature strong { display: block; font-size: .85rem; color: #fff; margin-bottom: 2px; }
.auth-feature span { font-size: .78rem; color: rgba(255,255,255,.6); line-height: 1.4; }
.auth-form-panel { display: flex; align-items: center; justify-content: center; padding: var(--space-10) var(--space-8); background: var(--surface-0); }
.auth-form-panel .inner { width: 100%; max-width: 340px; }

/* -- Utilities ---------------------------------------------------------------- */
.stack-2 > * + * { margin-top: var(--space-2); }
.stack-3 > * + * { margin-top: var(--space-3); }
.stack-4 > * + * { margin-top: var(--space-4); }
.cluster { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.text-muted { color: var(--ink-500); }
.text-sm { font-size: .87rem; }
.text-xs { font-size: .77rem; }

/* -- Responsive: shell collapses below 900px --------------------------------------- */
@media (max-width: 900px) {
  .shell-sidebar { transform: translateX(-100%); transition: transform var(--dur-med) var(--ease); box-shadow: var(--shadow-lg); }
  .shell-sidebar.open { transform: translateX(0); }
  .shell-main { margin-left: 0; }
  .shell-menu-toggle { display: inline-flex; align-items: center; }
  .shell-topbar { padding: 0 var(--space-4); }
  .shell-content, .shell-content-wide { padding: var(--space-5); }
  .welcome-hero { padding: var(--space-5); }
  .dashboard-hero { grid-template-columns: 1fr; }
  .dashboard-hero-photo { display: none; }
  .stepper { gap: var(--space-2); }
  .stepper-item { min-width: 64px; }
  .stepper-dot { width: 32px; height: 32px; font-size: .78rem; }
  .stepper-item:not(:last-child)::after { top: 16px; }
  .stepper-label { font-size: .68rem; }
  .auth-split { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .progress-stage { font-size: .64rem; }
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .app-card-row { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .brand-divider, .brand-sub-text span { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
  .footer-brand { grid-column: 1 / -1; }
  .tile-grid { grid-template-columns: 1fr; }
  .success-meta { flex-direction: column; gap: var(--space-4); }
  .footer-brand-lockup { flex-wrap: wrap; }
}

.shell-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 90; }
.shell-backdrop.show { display: block; }

/* -- Action Required banner (apptrack's orange callout, driving the next step) -- */
.action-required { background: var(--color-warning-bg); border: 1px solid #fde68a; border-radius: var(--radius-lg); padding: var(--space-5) var(--space-6); display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-6); }
.action-required .icon-wrap { width: 36px; height: 36px; border-radius: 50%; background: #fef3c7; color: #92400e; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.action-required-text { display: flex; align-items: center; gap: var(--space-4); flex: 1; min-width: 200px; }
.action-required-text strong { display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #92400e; margin-bottom: 2px; }
.action-required-text span { font-size: .9rem; color: #78350f; }

/* -- Flow diagram (vertical process chart) -------------------------------- */
.flow-chart { display: flex; flex-direction: column; align-items: center; padding: var(--space-4) 0; }
.flow-node { width: 100%; max-width: 460px; padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); text-align: center; font-weight: 700; font-size: .92rem; color: #fff; position: relative; }
.flow-node.applicant { background: linear-gradient(135deg, var(--primary), var(--primary-mid)); }
.flow-node.admissions { background: linear-gradient(135deg, #0f766e, var(--teal)); }
.flow-node.start { background: var(--ink-900); }
.flow-node.terminal-refused { background: var(--color-danger); }
.flow-node.terminal-success { background: #15803d; }
.flow-node.here { box-shadow: 0 0 0 4px var(--focus-ring), var(--shadow-md); }
.flow-node .here-badge { position: absolute; right: -8px; top: -10px; background: var(--accent); color: var(--primary-dark); font-size: .68rem; font-weight: 800; padding: .2rem .55rem; border-radius: var(--radius-full); box-shadow: var(--shadow-sm); }
.flow-arrow { color: var(--ink-300); margin: var(--space-2) 0; }
.flow-branch { display: flex; gap: var(--space-6); justify-content: center; width: 100%; margin: var(--space-2) 0; flex-wrap: wrap; }
.flow-branch-col { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 200px; max-width: 300px; }
.flow-legend { display: flex; gap: var(--space-6); flex-wrap: wrap; margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--border-color); }
.flow-legend-item { display: flex; align-items: center; gap: var(--space-2); font-size: .85rem; color: var(--ink-700); }
.flow-legend-swatch { width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; }

/* -- FAQ accordion --------------------------------------------------------- */
.faq-item { border-bottom: 1px solid var(--border-color); }
.faq-item:last-child { border-bottom: 0; }
.faq-question { width: 100%; text-align: left; background: none; border: 0; padding: var(--space-5) var(--space-6); display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); cursor: pointer; font-weight: 700; font-size: .92rem; color: var(--ink-900); }
.faq-question:hover { background: var(--surface-50); }
.faq-question .chev { transition: transform var(--dur-fast) var(--ease); flex-shrink: 0; color: var(--ink-500); }
.faq-item.open .faq-question .chev { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height var(--dur-med) var(--ease); }
.faq-item.open .faq-answer { max-height: 400px; }
.faq-answer-inner { padding: 0 var(--space-6) var(--space-5); font-size: .88rem; color: var(--ink-700); line-height: 1.6; }

/* -- Document dropzone ------------------------------------------------------ */
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); padding: var(--space-8); text-align: center; transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease); cursor: pointer; }
.dropzone:hover, .dropzone.dragover { border-color: var(--primary); background: var(--surface-50); }
.dropzone .icon-wrap { width: 48px; height: 48px; border-radius: 50%; background: var(--surface-100); display: flex; align-items: center; justify-content: center; margin: 0 auto var(--space-4); color: var(--ink-500); }

/* -- Per-field document upload row (apply form's Documents step) ----------- */
.doc-upload-row {
  display: flex; align-items: center; gap: var(--space-3); border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.doc-upload-row:hover, .doc-upload-row.dragover { border-color: var(--primary); background: var(--surface-50); }
.doc-upload-row.is-uploaded { border-style: solid; border-color: var(--color-success); background: var(--color-success-bg); }
.doc-upload-icon { flex-shrink: 0; color: var(--ink-500); display: flex; }
.doc-upload-row.is-uploaded .doc-upload-icon { color: var(--color-success); }
.doc-upload-text { flex: 1; font-size: .87rem; color: var(--ink-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-upload-row.is-uploaded .doc-upload-text { color: var(--ink-900); font-weight: 600; }
.doc-upload-row.is-uploading { opacity: .7; pointer-events: none; }

/* -- Programme picker (card grid, grouped by category) ----------------------- */
.program-category { margin-bottom: var(--space-6); }
.program-category-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-500); margin-bottom: var(--space-3); }
.program-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-3); }
.program-card {
  position: relative; display: flex; align-items: center; gap: var(--space-2);
  border: 1.5px solid var(--border-color); border-radius: var(--radius-md); padding: var(--space-4);
  cursor: pointer; font-size: .88rem; font-weight: 500; color: var(--ink-700);
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.program-card:hover { border-color: var(--border-strong); background: var(--surface-50); }
.program-card.selected { border-color: var(--primary); background: var(--surface-50); color: var(--ink-900); font-weight: 600; }
.program-card-check { display: none; color: var(--primary); flex-shrink: 0; }
.program-card.selected .program-card-check { display: flex; }
@media (max-width: 640px) { .program-card-grid { grid-template-columns: 1fr; } }

/* -- Quick link rows (light-panel context, e.g. sidebar-style links inside a card) -- */
.quick-link { display: flex; align-items: center; gap: var(--space-3); padding: .7rem var(--space-3); border-radius: var(--radius-sm); color: var(--ink-700); font-weight: 500; font-size: .87rem; transition: background-color var(--dur-fast) var(--ease); }
.quick-link:hover { background: var(--surface-50); text-decoration: none; color: var(--primary); }
.quick-link .icon { width: 18px; height: 18px; flex-shrink: 0; opacity: .8; }

@media (max-width: 900px) {
  .track-layout { grid-template-columns: 1fr !important; }
}

/* ==========================================================================
   Marketing page components — richer visual language for public pages
   ========================================================================== */

/* -- Hero with subtle dot-grid texture -------------------------------------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }

/* -- Trust / accreditation bar ------------------------------------------------ */
.trust-bar { background: var(--surface-0); border-bottom: 1px solid var(--border-color); padding: var(--space-6) 0; }
.trust-bar-inner { display: flex; align-items: center; justify-content: center; gap: var(--space-8); flex-wrap: wrap; }
.trust-bar-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-300); }
.trust-mark { font-size: .82rem; font-weight: 700; color: var(--ink-500); letter-spacing: .02em; }

/* -- Section heading (centered, with kicker) --------------------------------- */
.section-kicker { display: block; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); margin-bottom: var(--space-3); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto var(--space-12); }
.section-head p { font-size: 1.02rem; }

/* -- Feature cards (icon + title + description, richer than badges) --------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-6); }
.feature-card { background: var(--surface-0); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: var(--space-7); transition: box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--border-strong); }
.feature-icon { width: 48px; height: 48px; border-radius: var(--radius-md); background: linear-gradient(135deg, var(--primary), var(--primary-mid)); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-5); }
.feature-card h3 { margin-bottom: var(--space-2); font-size: 1.05rem; }
.feature-card p { font-size: .9rem; margin-bottom: 0; }

/* -- Numbered step list (richer than plain badge circles) -------------------- */
.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-5); position: relative; }
.step-card { position: relative; padding-top: var(--space-2); }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; margin-bottom: var(--space-4); box-shadow: var(--shadow-sm); }
.step-card h3 { font-size: 1rem; margin-bottom: var(--space-2); }
.step-card p { font-size: .87rem; margin-bottom: 0; }

/* -- Split feature section (text one side, visual mock the other) ----------- */
.split-feature { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: center; }
.split-feature.reverse { direction: rtl; }
.split-feature.reverse > * { direction: ltr; }
.mock-panel { background: var(--surface-0); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-lg); }

/* -- Quote / trust block ------------------------------------------------------ */
.quote-block { background: var(--surface-0); border-left: 4px solid var(--accent); border-radius: var(--radius-md); padding: var(--space-6) var(--space-8); }
.quote-block p { font-size: 1.05rem; font-style: italic; color: var(--ink-900); margin-bottom: var(--space-3); }
.quote-block cite { font-style: normal; font-size: .84rem; font-weight: 700; color: var(--ink-500); }

/* -- CTA band ------------------------------------------------------------------ */
.cta-band { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); border-radius: var(--radius-lg); padding: var(--space-12) var(--space-8); text-align: center; color: #fff; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.78); max-width: 460px; margin-left: auto; margin-right: auto; }

/* -- Info panel (accent-bordered callout for content pages) ------------------ */
.info-panel { background: var(--color-info-bg); border-radius: var(--radius-md); padding: var(--space-5) var(--space-6); display: flex; gap: var(--space-4); align-items: flex-start; }
.info-panel .icon-wrap { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-0); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.info-panel p { margin: 0; font-size: .87rem; color: var(--primary-dark); }

/* -- Checklist (for requirements-style content) ------------------------------- */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-3); }
.checklist li { display: flex; align-items: flex-start; gap: var(--space-3); font-size: .89rem; color: var(--ink-700); padding: var(--space-3) 0; }
.checklist li .check-icon { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--color-success-bg); color: var(--color-success); display: flex; align-items: center; justify-content: center; margin-top: 1px; }

/* -- Category pill (programme category tags) --------------------------------- */
.category-pill { display: inline-block; background: var(--surface-100); color: var(--ink-500); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: .3rem .7rem; border-radius: var(--radius-full); }

@media (max-width: 900px) {
  .split-feature { grid-template-columns: 1fr; gap: var(--space-8); }
  .split-feature.reverse { direction: ltr; }
}
@media (max-width: 640px) {
  .trust-bar-inner { gap: var(--space-4); }
  .cta-band { padding: var(--space-8) var(--space-5); }
}

/* -- Journey layout (how-to-apply: content + sticky sidebar) ------------------ */
.journey-layout { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-10); align-items: start; }
@media (max-width: 860px) {
  .journey-layout { grid-template-columns: 1fr; }
  .journey-layout > div:last-child { position: static !important; }
}

/* ---- Lifecycle tracker (7 steps) ------------------------------------- */
.tracker { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--space-2); counter-reset: step; }
.tracker-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); text-align: center; font-size: .78rem; color: var(--ink-500); }
.tracker-step::before { content: ""; position: absolute; top: 15px; left: calc(-50% + 18px); right: calc(50% + 18px); height: 3px; background: var(--surface-200); border-radius: 2px; }
.tracker-step:first-child::before { display: none; }
.tracker-step.done::before, .tracker-step.current::before { background: var(--primary); }
.tracker-dot { width: 32px; height: 32px; border-radius: var(--radius-full); display: grid; place-items: center; background: var(--surface-100); border: 2px solid var(--surface-200); font-weight: 700; color: var(--ink-500); position: relative; z-index: 1; }
.tracker-step.done .tracker-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.tracker-step.current .tracker-dot { background: #fff; border-color: var(--accent); color: var(--primary); box-shadow: 0 0 0 4px rgba(255,218,0,.25); }
.tracker-step.current .tracker-label { color: var(--primary); font-weight: 700; }
.tracker.is-halted .tracker-step.done .tracker-dot { background: var(--ink-300); border-color: var(--ink-300); }
@media (max-width: 640px) {
  .tracker { grid-template-columns: 1fr; gap: 0; }
  .tracker-step { flex-direction: row; text-align: left; gap: var(--space-3); padding: var(--space-2) 0; }
  .tracker-step::before { top: auto; bottom: 50%; left: 15px; right: auto; width: 3px; height: 100%; transform: translateY(-16px); }
}

/* ---- Timeline --------------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item { position: relative; display: grid; grid-template-columns: 16px 1fr; gap: var(--space-3); padding-bottom: var(--space-5); }
.timeline-item:not(:last-child)::after { content: ""; position: absolute; left: 7px; top: 16px; bottom: 0; width: 2px; background: var(--surface-200); }
.timeline-dot { width: 16px; height: 16px; border-radius: var(--radius-full); background: #fff; border: 3px solid var(--primary); margin-top: 2px; }
.timeline-item:first-child .timeline-dot { border-color: var(--accent); }
.timeline-title { font-weight: 700; color: var(--ink-900); font-size: .92rem; }
.timeline-msg { font-size: .88rem; color: var(--ink-700); margin-top: 2px; white-space: normal; overflow-wrap: anywhere; }
.timeline-meta { display: block; font-size: .75rem; color: var(--ink-500); margin-top: 4px; }
.timeline-item.is-internal .timeline-dot { border-color: var(--ink-300); border-style: dashed; }
.timeline-item.is-internal .timeline-title::after { content: "Internal"; margin-left: 8px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-500); background: var(--surface-100); padding: 1px 6px; border-radius: var(--radius-sm); }

/* ---- Layout helpers --------------------------------------------------- */
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-6); align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.pay-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-4); }
.pay-row .amount { font-size: 1.6rem; font-weight: 700; color: var(--ink-900); }
.withdraw summary { cursor: pointer; color: var(--color-danger); padding: var(--space-2) 0; }
.withdraw textarea { width: 100%; }

/* ---- Admin: tabs, filters, detail --------------------------------------- */
.tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--border-color); margin-bottom: var(--space-4); overflow-x: auto; }
.tab { padding: var(--space-3) var(--space-4); color: var(--ink-500); font-weight: 600; font-size: .88rem; border-bottom: 3px solid transparent; white-space: nowrap; text-decoration: none; }
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--accent); }
.tab-count { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: var(--radius-full); background: var(--surface-100); color: var(--ink-500); font-size: .72rem; text-align: center; }
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-bottom: var(--space-4); }
.filter-bar input[type=search] { min-width: 220px; flex: 1 1 220px; }
.filter-bar select, .filter-bar input { max-width: 100%; }
.cell-muted { color: var(--ink-500); }
.admin-detail { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--space-6); align-items: start; }
@media (max-width: 1000px) { .admin-detail { grid-template-columns: 1fr; } }
.action-box { border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--surface-0); }
.action-box > summary { cursor: pointer; padding: var(--space-3) var(--space-4); font-weight: 700; color: var(--ink-900); list-style: none; }
.action-box > summary::-webkit-details-marker { display: none; }
.action-box > summary::after { content: "▸"; float: right; color: var(--ink-300); }
.action-box[open] > summary::after { content: "▾"; }
.action-box > form { padding: 0 var(--space-4) var(--space-4); }
.action-box.action-primary { border-left: 4px solid var(--primary); }
.action-box.action-danger { border-left: 4px solid var(--color-danger); }
.action-box textarea, .action-box input[type=text] { width: 100%; }
.answers { display: grid; grid-template-columns: minmax(140px, 38%) 1fr; gap: var(--space-2) var(--space-4); margin: 0 0 var(--space-5); font-size: .9rem; }
.answers dt { color: var(--ink-500); }
.answers dd { margin: 0; color: var(--ink-900); overflow-wrap: anywhere; }
.answers.compact { grid-template-columns: 90px 1fr; margin: 0; }
.answers-heading { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--primary); margin: var(--space-2) 0 var(--space-3); padding-bottom: var(--space-2); border-bottom: 1px solid var(--border-color); }
@media (max-width: 560px) { .answers { grid-template-columns: 1fr; gap: 0 0; } .answers dd { margin-bottom: var(--space-3); } }
.inline-review summary { cursor: pointer; color: var(--primary); }
.inline-review form { margin-top: var(--space-2); min-width: 220px; }
fieldset { border: 0; padding: 0; margin: 0; }
.email-frame { width: 100%; height: 72vh; border: 0; display: block; background: #eae8e1; }
.data-table tr.is-selected td { background: var(--color-info-bg); }
.template-list { display: flex; flex-direction: column; padding: var(--space-2); }
.template-item { display: flex; justify-content: space-between; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--ink-700); text-decoration: none; font-size: .9rem; }
.template-item:hover { background: var(--surface-100); }
.template-item.active { background: var(--color-info-bg); color: var(--primary); font-weight: 700; }
textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }

/* ---- Attendance plans --------------------------------------------------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }
.plan-card { position: relative; display: flex; flex-direction: column; gap: var(--space-1); border: 2px solid var(--border-color); border-radius: var(--radius-lg); padding: var(--space-4); cursor: pointer; background: var(--surface-0); }
.plan-card:hover { border-color: var(--primary-mid); }
.plan-card:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 4px var(--focus-ring); }
.plan-card input { position: absolute; top: var(--space-4); right: var(--space-4); }
.plan-name { font-weight: 700; color: var(--ink-900); padding-right: var(--space-6); }
.plan-amount { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.plan-note { font-size: .78rem; color: var(--ink-500); }
.plan-lines { width: 100%; font-size: .75rem; color: var(--ink-500); margin-top: var(--space-2); border-top: 1px solid var(--border-color); }
.plan-lines td { padding: 3px 0; vertical-align: top; }
.plan-lines td:last-child { text-align: right; white-space: nowrap; padding-left: var(--space-2); }
.scholarship-optin { border: 1px solid var(--accent); background: #fffbe6; border-radius: var(--radius-md); padding: var(--space-4); margin-top: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); }
.scholarship-optin legend { font-weight: 700; color: var(--primary); padding: 0 var(--space-2); display: flex; align-items: center; gap: var(--space-2); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-2); }

/* ---- Dashboard & reports ------------------------------------------------ */
.queue-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-5); }
.queue-card { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-lg); background: var(--surface-0); border: 1px solid var(--border-color); text-decoration: none; color: var(--ink-500); }
.queue-card.has-items { border-color: var(--accent); background: #fffbe6; color: var(--ink-900); }
.queue-n { font-size: 1.6rem; font-weight: 700; color: var(--primary); min-width: 2ch; }
.queue-label { font-size: .88rem; font-weight: 600; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: var(--space-6); }
.chart { margin: 0; }
.chart-svg { width: 100%; height: auto; max-height: 420px; display: block; font-family: var(--font-body); }
.chart-table { margin-top: var(--space-3); }
.chart-table summary { cursor: pointer; font-size: .78rem; color: var(--ink-500); }
.chart-table table { margin-top: var(--space-2); font-size: .82rem; }
.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; }
.report-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: var(--radius-full); background: var(--surface-0); border: 1px solid var(--border-color); color: var(--ink-700); font-size: .82rem; font-weight: 600; text-decoration: none; }
.chip:hover { border-color: var(--primary-mid); color: var(--primary); }
.chip-saved { border-color: var(--accent); }

/* ---- Thank-you pop-up ---------------------------------------------------- */
.thanks-dialog { position: fixed; inset: 0; margin: auto; z-index: calc(var(--z-modal) + 1); width: min(92vw, 420px); height: fit-content; border: 0; border-radius: var(--radius-lg); padding: var(--space-8) var(--space-6) var(--space-6); text-align: center; box-shadow: var(--shadow-lg); background: var(--surface-0); }
.thanks-dialog h2 { font-family: var(--font-display); color: var(--primary); margin: var(--space-3) 0 var(--space-2); }
.thanks-dialog p { color: var(--ink-700); margin: 0 0 var(--space-5); }
.thanks-icon { color: var(--color-success); display: flex; justify-content: center; }
.thanks-backdrop { position: fixed; inset: 0; background: rgba(13,38,66,.45); z-index: var(--z-modal); }
.thanks-dialog:not([open]) + .thanks-backdrop { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
details.faq-item > summary { list-style: none; cursor: pointer; }
details.faq-item > summary::-webkit-details-marker { display: none; }
details.faq-item[open] .chev { transform: rotate(180deg); }
details.faq-item .faq-answer-inner { padding: 0 var(--space-6) var(--space-5); color: var(--ink-700); font-size: .92rem; }
.field-editor > form, .field-editor .field-form { margin-top: var(--space-3); min-width: min(560px, 80vw); } .publish-bar { position: sticky; top: calc(var(--topbar-height) + 8px); z-index: 5; border: 1px solid var(--accent); }

/* Full logos in the portal/admin sidebars */
.shell-brand.shell-brand-full { flex-direction: column; align-items: flex-start; gap: 10px; }
.shell-brand-full .brand-portal-full { height: 40px; width: auto; max-width: 100%; }
.shell-brand-full .brand-school-row { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border-color); width: 100%; }
.shell-brand-full .brand-school-row img { height: 26px; width: auto; }
.shell-brand-full .brand-school-row small { margin: 0; font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; }
.app-switcher { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); background: var(--surface-0); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-6); } .app-switcher label { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; color: var(--ink-500); } .app-switcher select { flex: 1; min-width: 240px; max-width: 520px; }
.prefill-note { display: flex; gap: var(--space-3); align-items: flex-start; }

/* ---- Programme picker ------------------------------------------------------ */
.picker { display: grid; gap: var(--space-6); }
.picker-legend { display: flex; align-items: center; gap: var(--space-3); font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--ink-900); margin-bottom: var(--space-4); padding: 0; }
.picker-num { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font: 700 .85rem/1 var(--font-body); }
.picker-levels { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--space-3); }
.picker-levels .picker-legend { grid-column: 1 / -1; }
.level-card { position: relative; cursor: pointer; }
.level-card input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.level-body { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: var(--space-4); border: 1.5px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface-0); transition: border-color .15s, box-shadow .15s, background-color .15s; }
.level-card:hover .level-body { border-color: var(--primary-mid); }
.level-card input:checked + .level-body { border-color: var(--primary); background: #eef4fb; box-shadow: 0 0 0 3px var(--focus-ring); }
.level-card input:focus-visible + .level-body { outline: 3px solid var(--accent); outline-offset: 2px; }
.level-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--primary); color: var(--accent); }
.level-title { font-weight: 700; color: var(--ink-900); }
.level-desc { font-size: .82rem; color: var(--ink-500); line-height: 1.45; }
.level-meta { margin-top: auto; font-size: .78rem; font-weight: 700; color: var(--primary); padding-top: 6px; }
.picker-programs { background: var(--surface-0); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: var(--space-5); }
.picker-legend-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.picker-legend-row .picker-legend { margin: 0; }
.picker-search { max-width: 280px; }
.picker-hint, .picker-none { color: var(--ink-500); font-size: .9rem; margin: var(--space-2) 0; }
.picker:not(.js) .picker-hint, .picker:not(.js) .picker-search { display: none; }
.program-group { display: grid; gap: var(--space-2); margin-top: var(--space-2); }
.program-group-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-500); margin: var(--space-3) 0 0; }
.prog-option { position: relative; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1.5px solid var(--border-color); border-radius: var(--radius-md); cursor: pointer; }
.prog-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.prog-option:hover { border-color: var(--primary-mid); }
.prog-option:has(input:checked) { border-color: var(--primary); background: #eef4fb; }
.prog-option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.prog-body { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.prog-name { font-weight: 700; color: var(--ink-900); }
.prog-facts { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .8rem; color: var(--ink-500); }
.prog-facts span { display: inline-flex; align-items: center; gap: 4px; }
.prog-sch { color: #8a6a00; }
.prog-check { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; color: transparent; flex-shrink: 0; }
.prog-option:has(input:checked) .prog-check { background: var(--primary); border-color: var(--primary); color: #fff; }
.picker-footer { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.prog-option[hidden], .program-group[hidden], .program-group-title[hidden], .picker-hint[hidden], .picker-none[hidden] { display: none; }
.chip-options { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip-option { position: relative; cursor: pointer; }
.chip-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip-option span { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-full); font-size: .88rem; font-weight: 600; color: var(--ink-700); background: var(--surface-0); transition: border-color .15s, background-color .15s; }
.chip-option:hover span { border-color: var(--primary-mid); }
.chip-option input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-option input:checked + span::before { content: "✓"; font-weight: 700; }
.chip-option input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.picker-search { font: inherit; font-size: .9rem; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-full); width: 100%; background: var(--surface-0); }
.shell-brand-full img.brand-school-mini { height: 26px; width: auto; } .shell-brand-full img.brand-portal-full { height: 40px; width: auto; }

/* ==========================================================================
   Applicant portal theme (2026): school logo, soft gradients, one header.
   ========================================================================== */
html { scrollbar-gutter: stable; }                 /* no side-to-side shift between short and long pages */
.shell-sidebar { background: linear-gradient(180deg, #FFFFFF 0%, #F3F6FB 100%); }
.portal-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 20px 20px; border-bottom: 1px solid var(--border-color); text-decoration: none; }
.portal-brand:hover { text-decoration: none; }
.portal-brand-logo { height: 58px; width: auto; }
.portal-brand-label { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #9A7B0A; display: flex; align-items: center; gap: 8px; }
.portal-brand-label::before, .portal-brand-label::after { content: ""; width: 18px; height: 1px; background: #E2C766; }
.shell-nav-link { font-size: .9rem; line-height: 1.3; }
.shell-nav-link.active { background: linear-gradient(135deg, #0E2F66 0%, #2A5BA8 100%); box-shadow: inset 3px 0 0 #F4C20D, 0 6px 16px rgba(14, 47, 102, .22); }
.shell-nav-link[href$="new=1"]:not(.active) { background: linear-gradient(135deg, #FFF8DC 0%, #FDEFB8 100%); color: #5C4700; font-weight: 700; }
.shell-nav-link[href$="new=1"]:not(.active) .icon { opacity: 1; color: #8A6A00; }
.shell-nav-link[href$="new=1"]:not(.active):hover { background: #FBE7A1; }
.shell-main { background: linear-gradient(180deg, #E9EFF8 0%, #F4F6FA 280px, #F4F6FA 100%); }
.shell-topbar { position: sticky; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 0; box-shadow: 0 1px 0 var(--border-color); }
.shell-topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: linear-gradient(90deg, #0E2F66 0%, #2A5BA8 55%, #F4C20D 100%); }

/* One header for every portal tab */
.portal-hero { position: relative; overflow: hidden; isolation: isolate; display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-5); flex-wrap: wrap;
  background: linear-gradient(125deg, #0A2350 0%, #16407F 55%, #2A5BA8 100%); color: #fff; border-radius: 18px; padding: 32px 36px; margin-bottom: var(--space-6); box-shadow: 0 14px 34px rgba(10, 35, 80, .18); }
.portal-hero::before { content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(244, 194, 13, .30) 0%, rgba(244, 194, 13, 0) 70%); z-index: -1; }
.portal-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, #F4C20D, rgba(244, 194, 13, 0)); }
.portal-hero-text { max-width: 720px; }
.portal-eyebrow { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #F4C20D; margin-bottom: 8px; }
.portal-hero h1 { color: #fff; font-family: var(--font-display); font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.2; margin: 0 0 6px; }
.portal-hero p { color: rgba(255, 255, 255, .8); margin: 0; font-size: .95rem; max-width: 64ch; }
.portal-hero-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.btn-glass { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .35); color: #fff; border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: .88rem; text-decoration: none; }
.btn-glass:hover { background: rgba(255, 255, 255, .22); color: #fff; text-decoration: none; }
.portal-hero .btn-gold { border-radius: 999px; }
@media (max-width: 640px) { .portal-hero { padding: 24px 20px; border-radius: 14px; } }

/* Programme picker slides */
.slide-steps { list-style: none; margin: 0 0 var(--space-5); padding: 0; display: flex; gap: var(--space-2); flex-wrap: wrap; }
.slide-steps li { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--surface-0); border: 1px solid var(--border-color); font-size: .82rem; font-weight: 700; color: var(--ink-500); }
.slide-steps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-100); font-size: .75rem; }
.slide-steps li.current { color: var(--primary); border-color: var(--primary); }
.slide-steps li.current span { background: var(--primary); color: #fff; }
.slide-steps li.done { color: #1D5E33; }
.slide-steps li.done span { background: #DCFCE7; color: #15803d; }
.slide-in { animation: slideIn .35s var(--ease) both; }
@keyframes slideIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .slide-in { animation: none; } }
.level-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-4); }
.level-card-link { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 20px; background: var(--surface-0); border: 1.5px solid var(--border-color); border-radius: 16px; text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .15s; }
.level-card-link:hover { border-color: var(--primary-mid); box-shadow: 0 12px 28px rgba(14, 47, 102, .14); transform: translateY(-2px); text-decoration: none; }
.level-card-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.level-card-link .level-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #0E2F66, #2A5BA8); color: #F4C20D; }
.level-card-link .level-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--ink-900); }
.level-card-link .level-desc { font-size: .86rem; color: var(--ink-500); line-height: 1.5; }
.level-card-link .level-meta { margin-top: auto; padding-top: 8px; font-size: .8rem; font-weight: 700; color: var(--primary); }
.level-go { position: absolute; top: 22px; right: 20px; color: var(--ink-300); transition: transform .15s, color .15s; }
.level-card-link:hover .level-go { color: var(--primary); transform: translateX(3px); }
.slide-note { margin-top: var(--space-5); font-size: .9rem; color: var(--ink-500); }
.picker-card { background: var(--surface-0); border: 1px solid var(--border-color); border-radius: 16px; padding: var(--space-5); box-shadow: var(--shadow-sm); display: grid; gap: var(--space-4); }
.picker-card-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.program-list { display: grid; gap: var(--space-2); }

/* In-portal content pages share the portal header look */
.in-portal .page-hero { background: linear-gradient(125deg, #0A2350 0%, #16407F 55%, #2A5BA8 100%); border-radius: 18px; box-shadow: 0 14px 34px rgba(10, 35, 80, .18); overflow: hidden; isolation: isolate; }
.in-portal .page-hero::before { content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(244, 194, 13, .30) 0%, rgba(244, 194, 13, 0) 70%); z-index: -1; }
.in-portal .page-hero::after { height: 3px; background: linear-gradient(90deg, #F4C20D, rgba(244, 194, 13, 0)); }
.in-portal .page-hero .wrap { padding: 32px 36px; }
.in-portal .page-hero h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 6px; }
.in-portal .page-hero .lead { font-size: .95rem; }
.portal-brand { padding: 20px 20px 14px; gap: 8px; }
.portal-brand-logo { height: 50px; }
.shell-nav { padding: var(--space-3) var(--space-3); }
.shell-nav-link { padding: .58rem var(--space-4); }
.shell-nav-section { padding: var(--space-4) var(--space-4) var(--space-1); }
.level-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.in-portal .page-hero h1 { max-width: none; font-family: var(--font-display); }
.in-portal .page-hero .lead { max-width: 64ch; }
.in-portal h2 { font-family: var(--font-display); font-size: clamp(1.3rem, 2vw, 1.6rem); }
.in-portal .family-head h2 { font-size: 1.45rem; }


/* ==========================================================================
   Page transitions (cross-document View Transitions).
   The chrome — portal sidebar + top bar, public header — is named, so it
   stays perfectly still between pages; only the content cross-fades. The
   programme picker slides left/right between its two steps.
   ========================================================================== */
@view-transition { navigation: auto; }
.shell-sidebar { view-transition-name: portal-sidebar; }
.shell-topbar { view-transition-name: portal-topbar; }
.site-header { view-transition-name: site-header; }
.utility { view-transition-name: site-utility; }
.slide { view-transition-name: picker-slide; }

::view-transition-group(portal-sidebar), ::view-transition-group(portal-topbar),
::view-transition-group(site-header), ::view-transition-group(site-utility) { animation: none; }
::view-transition-old(portal-sidebar), ::view-transition-new(portal-sidebar),
::view-transition-old(portal-topbar), ::view-transition-new(portal-topbar),
::view-transition-old(site-header), ::view-transition-new(site-header),
::view-transition-old(site-utility), ::view-transition-new(site-utility) { animation: none; mix-blend-mode: normal; }

::view-transition-old(root) { animation: vt-out 200ms cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in 320ms cubic-bezier(.2, .8, .2, 1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-4px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

::view-transition-group(picker-slide) { animation-duration: 380ms; }
::view-transition-old(picker-slide) { animation: vt-slide-out-left 320ms cubic-bezier(.4, 0, .2, 1) both; }
::view-transition-new(picker-slide) { animation: vt-slide-in-right 380ms cubic-bezier(.2, .8, .2, 1) both; }
html:active-view-transition-type(back)::view-transition-old(picker-slide) { animation-name: vt-slide-out-right; }
html:active-view-transition-type(back)::view-transition-new(picker-slide) { animation-name: vt-slide-in-left; }
@keyframes vt-slide-out-left { to { opacity: 0; transform: translateX(-60px); } }
@keyframes vt-slide-in-right { from { opacity: 0; transform: translateX(60px); } }
@keyframes vt-slide-out-right { to { opacity: 0; transform: translateX(60px); } }
@keyframes vt-slide-in-left { from { opacity: 0; transform: translateX(-60px); } }

/* Where view transitions work, the per-page entrance animations would double up. */
@supports (view-transition-name: none) {
  .page-enter, .slide-in { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .page-enter, .slide-in { animation: none; }
}
[data-field-wrap][hidden] { display: none !important; } [data-show-if]:not([hidden]) { animation: fadeUp .25s var(--ease) both; }

/* ==========================================================================
   Applicant dashboard (2026): attention first, rich application cards,
   side column with dates, activity, scholarship and help.
   ========================================================================== */
.dash-section { margin-bottom: var(--space-6); }
.dash-h { display: flex; align-items: center; gap: 10px; font-family: var(--font-body); font-size: 1rem; font-weight: 700; color: var(--ink-900); margin: 0 0 var(--space-3); }
.dash-h svg { color: var(--primary-mid); }
.dash-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--surface-0); border: 1px solid var(--border-color); display: inline-grid; place-items: center; font-size: .72rem; color: var(--ink-500); }

.attention-list { display: grid; gap: var(--space-2); }
.attention-card { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); background: var(--surface-0); border: 1px solid var(--border-color); border-left: 4px solid #F4C20D; border-radius: 14px; box-shadow: var(--shadow-sm); }
.attention-card.is-top { background: linear-gradient(90deg, #FFFBEB 0%, #FFFFFF 70%); border-color: #F5DD8A; border-left-color: #F4C20D; }
.att-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #FFF4CC; color: #8A6A00; flex-shrink: 0; }
.att-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.att-body strong { color: var(--ink-900); font-size: .94rem; }
.att-body span { color: var(--ink-500); font-size: .8rem; }
@media (max-width: 640px) { .attention-card { flex-wrap: wrap; } .attention-card .btn { width: 100%; justify-content: center; } }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-6); align-items: start; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.app-cards { display: grid; gap: var(--space-4); }
.app-card2 { background: var(--surface-0); border: 1px solid var(--border-color); border-radius: 16px; padding: var(--space-5) var(--space-5) var(--space-4); box-shadow: var(--shadow-sm); transition: box-shadow .15s, border-color .15s; }
.app-card2:hover { border-color: #CBD8EA; box-shadow: 0 10px 26px rgba(14, 47, 102, .10); }
.app-card2.is-closed { background: #FAFBFC; }
.app-card2-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-4); }
.app-id { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; color: #8A6A00; background: #FFF6D6; border-radius: 6px; padding: 3px 8px; margin-bottom: 8px; }
.app-card2-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.2rem; line-height: 1.3; }
.app-card2-head h3 a { color: var(--ink-900); text-decoration: none; }
.app-card2-head h3 a:hover { color: var(--primary); }
.app-card2-head .badge { flex-shrink: 0; }
.mini-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.mini-steps li { height: 6px; border-radius: 999px; background: var(--surface-200); }
.mini-steps li.done { background: linear-gradient(90deg, #0E2F66, #2A5BA8); }
.mini-steps li.current { background: #F4C20D; box-shadow: 0 0 0 3px rgba(244, 194, 13, .25); }
.is-closed .mini-steps li.done { background: var(--ink-300); }
.mini-steps-label { margin: 8px 0 0; font-size: .8rem; font-weight: 700; color: var(--primary); }
.is-closed .mini-steps-label { color: var(--ink-500); }
.draft-progress { display: flex; align-items: center; gap: var(--space-3); }
.draft-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-200); overflow: hidden; }
.draft-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2A5BA8, #F4C20D); }
.draft-pct { font-size: .8rem; font-weight: 700; color: var(--ink-700); white-space: nowrap; }
.app-card2-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--border-color); }
.app-updated { display: inline-flex; align-items: center; gap: 5px; }

.dash-side { display: grid; gap: var(--space-4); }
.side-card { background: var(--surface-0); border: 1px solid var(--border-color); border-radius: 16px; padding: var(--space-5); box-shadow: var(--shadow-sm); }
.side-card p { margin: 0 0 var(--space-3); color: var(--ink-700); }
.side-h { display: flex; align-items: center; gap: 8px; font-family: var(--font-body); font-size: .92rem; font-weight: 700; color: var(--ink-900); margin: 0 0 var(--space-3); }
.side-h svg { color: var(--primary-mid); }
.date-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.date-list a { display: flex; align-items: center; gap: var(--space-3); padding: 6px; margin: -6px; border-radius: 10px; color: inherit; text-decoration: none; }
.date-list a:hover { background: var(--surface-100); }
.date-chip { width: 46px; flex-shrink: 0; text-align: center; border-radius: 10px; overflow: hidden; border: 1px solid var(--border-color); font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: linear-gradient(180deg, #0E2F66, #2A5BA8); padding: 4px 0 3px; }
.date-chip strong { display: block; font-size: 1.1rem; letter-spacing: 0; line-height: 1.1; color: #fff; }
.date-text { display: flex; flex-direction: column; font-size: .85rem; }
.activity { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--surface-200); display: grid; gap: var(--space-3); }
.activity li { position: relative; }
.activity li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--primary-mid); }
.activity li:first-child::before { border-color: #F4C20D; background: #FFF4CC; }
.activity a { display: flex; flex-direction: column; color: inherit; text-decoration: none; font-size: .86rem; }
.activity a:hover strong { color: var(--primary); }
.side-award { background: linear-gradient(135deg, #0A2350 0%, #2A5BA8 100%); border: 0; color: #fff; }
.side-award .side-h, .side-award p { color: #fff; }
.side-award p { opacity: .85; }
.side-award a { color: #F4C20D; font-weight: 700; }
.dash-onboard { background: var(--surface-0); border: 1px solid var(--border-color); border-radius: 18px; padding: var(--space-8); box-shadow: var(--shadow-sm); }
.dash-onboard h2 { font-family: var(--font-display); margin: 0 0 6px; }
.onboard-steps { list-style: none; margin: var(--space-5) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.onboard-steps li { display: flex; gap: var(--space-3); padding: var(--space-4); border-radius: 14px; background: var(--surface-50); border: 1px solid var(--border-color); font-size: .88rem; color: var(--ink-700); }
.onboard-steps li strong { display: block; color: var(--ink-900); margin-bottom: 2px; }
.onboard-steps span { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: linear-gradient(135deg, #0E2F66, #2A5BA8); color: #fff; font-weight: 700; }
@media (max-width: 800px) { .onboard-steps { grid-template-columns: 1fr; } }
.sync-panel .panel-header form { margin: 0; } .held-change { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-warning-bg); }

/* ---- Application switcher (replaces the plain dropdown) ------------------ */
.app-switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; background: var(--surface-0); border: 1px solid var(--border-color); border-radius: 16px; padding: var(--space-4) var(--space-5); margin-bottom: var(--space-6); box-shadow: var(--shadow-sm); }
.app-switch-current { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.app-switch-kicker { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-500); }
.app-switch-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--ink-900); }
.app-switch-meta { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.app-switch-meta .app-id { margin: 0; }
.app-switch-menu { position: relative; }
.app-switch-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.app-switch-menu > summary::-webkit-details-marker { display: none; }
.app-switch-menu[open] > summary { background: var(--surface-100); border-color: var(--primary-mid); }
.app-switch-menu[open] > summary svg:last-child { transform: rotate(180deg); }
.app-switch-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: min(460px, 86vw); max-height: 60vh; overflow-y: auto; background: var(--surface-0); border: 1px solid var(--border-color); border-radius: 14px; box-shadow: 0 18px 40px rgba(14, 47, 102, .18); padding: 6px; animation: fadeUp .16s var(--ease) both; }
.app-switch-item { display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; align-items: center; gap: var(--space-3); padding: 10px 12px; border-radius: 10px; color: inherit; text-decoration: none; }
.app-switch-item:hover, .app-switch-item:focus-visible { background: var(--surface-100); text-decoration: none; outline: none; }
.app-switch-item.is-current { background: #EEF4FB; }
.app-switch-item-main { display: flex; flex-direction: column; min-width: 0; }
.app-switch-item-main strong { font-size: .9rem; color: var(--ink-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-switch-tick { color: var(--primary); display: grid; place-items: center; }
@media (max-width: 640px) { .app-switch-panel { left: 0; right: auto; } .app-switch-item { grid-template-columns: minmax(0, 1fr) 20px; } .app-switch-item .badge { grid-column: 1; justify-self: start; } }
/* Header can host pop-out menus: glow drawn as a background layer, not a clipped pseudo-element */
.portal-hero { overflow: visible; z-index: 5; background: radial-gradient(circle at 92% -20%, rgba(244, 194, 13, .30) 0%, rgba(244, 194, 13, 0) 38%), linear-gradient(125deg, #0A2350 0%, #16407F 55%, #2A5BA8 100%); }
.portal-hero::before { display: none; }
.portal-hero::after { border-radius: 0 0 18px 18px; }
.app-switch-menu.on-hero > summary { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .35); color: #fff; border-radius: 999px; padding: 10px 18px; font-weight: 700; }
.app-switch-menu.on-hero > summary:hover, .app-switch-menu.on-hero[open] > summary { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .5); color: #fff; }
.app-switch-menu.on-hero .dash-count { background: rgba(255, 255, 255, .2); border-color: transparent; color: #fff; }
.app-switch-menu.on-hero .app-switch-panel { color: var(--ink-900); text-align: left; }

/* ==========================================================================
   Admin console — one light, consistent look for every admin page.
   Controls are styled here once (inside or outside a .field) so no page
   shows a bare browser dropdown again.
   ========================================================================== */
.admin-shell .shell-main { background: #F4F6FA; }
.admin-shell :where(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=range]):not([type=color]), select, textarea) {
  font: inherit; font-size: .88rem; color: var(--ink-900); background-color: #fff; border: 1px solid var(--border-strong);
  border-radius: 10px; padding: .5rem .8rem; min-height: 40px; max-width: 100%;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.admin-shell :where(input, select, textarea):hover:not(:focus):not([type=checkbox]):not([type=radio]) { border-color: #94A3B8; }
.admin-shell :where(input, select, textarea):focus-visible { outline: none; border-color: var(--primary-mid); box-shadow: 0 0 0 3px rgba(47, 95, 167, .18); }
.admin-shell :where(select) {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 2.2rem;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right .7rem center; background-size: 16px;
}
.admin-shell :where(textarea) { width: 100%; min-height: 84px; line-height: 1.5; resize: vertical; }
.admin-shell :where(input[type=checkbox], input[type=radio]) { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; vertical-align: -3px; cursor: pointer; }
.admin-shell :where(input[type=number]) { font-variant-numeric: tabular-nums; }
.admin-shell :where(input:disabled, select:disabled, textarea:disabled) { background-color: var(--surface-100); color: var(--ink-500); cursor: not-allowed; }
.admin-shell .field :is(input, select, textarea) { background-color: #fff; border-color: var(--border-strong); border-radius: 10px; }

/* Sidebar badges (work waiting) */
.nav-badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: #F4C20D; color: #0D2642; font-size: .7rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.shell-nav-link.active .nav-badge { background: #fff; }

/* Top bar search */
.topbar-search { position: relative; flex: 0 1 420px; margin: 0 var(--space-4); display: flex; align-items: center; }
.topbar-search svg { position: absolute; left: 12px; color: var(--ink-500); pointer-events: none; }
.admin-shell .topbar-search input[type=search] { width: 100%; padding-left: 36px; padding-right: 36px; border-radius: 999px; background: var(--surface-100); border-color: transparent; min-height: 38px; }
.admin-shell .topbar-search input[type=search]:focus { background: #fff; border-color: var(--primary-mid); }
.topbar-search kbd { position: absolute; right: 10px; font: 600 .7rem/1 var(--font-body); color: var(--ink-500); border: 1px solid var(--border-strong); border-radius: 5px; padding: 3px 6px; background: #fff; }
@media (max-width: 900px) { .topbar-search { display: none; } }

/* Page header: title left, actions right */
.admin-shell .page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-6); }
.admin-shell .page-header h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.55rem, 2.3vw, 2rem); color: var(--primary-dark); margin: 0 0 4px; line-height: 1.2; }
.admin-shell .page-header p { margin: 0; color: var(--ink-500); font-size: .92rem; }
.page-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 700; color: var(--ink-500); margin-bottom: var(--space-3); }
.back-link:hover { color: var(--primary); text-decoration: none; }

/* Panels & stats */
.admin-shell .panel { border-radius: 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .04); }
.admin-shell .panel-header { padding: var(--space-4) var(--space-5); }
.admin-shell .panel-header h2 { font-family: var(--font-body); font-size: .95rem; color: var(--primary-dark); }
.admin-shell .panel-body { padding: var(--space-5); }
.admin-shell .stat-card { border-radius: 14px; box-shadow: none; position: relative; overflow: hidden; }
.admin-shell .stat-card .stat-value { font-size: 1.65rem; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.admin-shell a.stat-card { display: block; color: inherit; transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.admin-shell a.stat-card:hover { border-color: var(--primary-mid); transform: translateY(-1px); text-decoration: none; }

/* Tabs → segmented control */
.admin-shell .tabs { display: flex; width: fit-content; max-width: 100%; gap: 4px; padding: 4px; background: #E7ECF3; border: 0; border-radius: 12px; margin-bottom: var(--space-4); }
.admin-shell .tab { border: 0; border-radius: 9px; padding: 7px 14px; color: var(--ink-700); display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; }
.admin-shell .tab:hover { background: rgba(255, 255, 255, .65); color: var(--primary-dark); text-decoration: none; }
.admin-shell .tab.active { background: #fff; color: var(--primary-dark); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.admin-shell .tab-count { background: rgba(25, 63, 105, .09); color: var(--ink-700); font-weight: 700; line-height: 20px; }
.admin-shell .tab.active .tab-count { background: var(--primary); color: #fff; }

/* Filter toolbar */
.admin-shell .filter-bar { background: #fff; border: 1px solid var(--border-color); border-radius: 14px; padding: 10px; gap: 8px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.admin-shell .filter-bar input[type=search] { flex: 1 1 240px; padding-left: 2.2rem; background-repeat: no-repeat; background-position: .75rem center; background-size: 16px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='11' cy='11' r='8'/%3e%3cpath d='m21 21-4.34-4.34'/%3e%3c/svg%3e"); }
.admin-shell .filter-bar select { flex: 0 1 190px; min-width: 140px; }
.admin-shell .filter-bar label { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--ink-500); }
.filter-more { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 10px; border-top: 1px dashed var(--border-color); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 var(--space-4); }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px; background: #E8EFF9; color: var(--primary-dark); font-size: .78rem; font-weight: 700; }
.filter-chip a { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; align-items: center; justify-content: center; color: var(--primary); }
.filter-chip a:hover { background: #fff; }

/* Tables */
.admin-shell .data-table th { padding: 10px var(--space-5); font-size: .7rem; color: var(--ink-500); background: #F8FAFC; white-space: nowrap; }
.admin-shell .data-table td { padding: 12px var(--space-5); }
.admin-shell .data-table tbody tr:hover { background: #F7FAFF; }
.admin-shell tr[data-href] { cursor: pointer; }
.nowrap { white-space: nowrap; }
.ref-code { font-variant-numeric: tabular-nums; font-size: .84rem; font-weight: 700; color: var(--primary); white-space: nowrap; letter-spacing: -.01em; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person-avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #16407F, #2A5BA8); }
.person-name { font-weight: 700; color: var(--ink-900); }
.person .text-xs { overflow: hidden; text-overflow: ellipsis; }
.empty-state { text-align: center; padding: var(--space-10) var(--space-6); color: var(--ink-500); }
.empty-state svg { color: var(--ink-300); margin-bottom: var(--space-2); }
.empty-state strong { display: block; color: var(--ink-900); margin-bottom: 4px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }

/* Buttons used across admin */
.btn-success { background: #15803D; color: #fff; box-shadow: var(--shadow-sm); }
.btn-success:hover:not(:disabled) { background: #166534; color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn-danger-soft { background: #fff; color: #B91C1C; border-color: #FECACA; }
.btn-danger-soft:hover:not(:disabled) { background: #FEF2F2; border-color: #F87171; color: #991B1B; text-decoration: none; }
.btn-icon { width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 10px; background: transparent; border: 1px solid transparent; color: var(--ink-500); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.btn-icon:hover { background: var(--surface-100); color: var(--ink-900); }

/* Pop-up menu (More actions) — same pattern as the applicant switcher */
.menu { position: relative; display: inline-block; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 250px; background: #fff; border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 16px 40px rgba(13, 38, 66, .18); padding: 6px; display: grid; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; background: none; border: 0; font: inherit; font-size: .87rem; font-weight: 600; color: var(--ink-900); cursor: pointer; }
.menu-item:hover { background: var(--surface-100); text-decoration: none; }
.menu-item svg { color: var(--ink-500); flex: none; }
.menu-item.is-danger { color: #B91C1C; }
.menu-item.is-danger svg { color: #EF4444; }
.menu-sep { height: 1px; background: var(--border-color); margin: 4px 6px; }

/* Modal dialogs for actions */
.modal { border: 0; padding: 0; border-radius: 16px; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: #fff; color: var(--ink-900); box-shadow: 0 24px 64px rgba(13, 38, 66, .3); }
.modal[open] { display: flex; flex-direction: column; animation: modal-in .18s var(--ease); }
.modal::backdrop { background: rgba(13, 38, 66, .45); backdrop-filter: blur(2px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.modal > form { display: flex; flex-direction: column; min-height: 0; margin: 0; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); padding: 18px 22px 14px; border-bottom: 1px solid var(--border-color); }
.modal-head h2 { font-family: var(--font-body); font-size: 1.08rem; font-weight: 800; color: var(--primary-dark); margin: 0 0 4px; }
.modal-head p { margin: 0; font-size: .84rem; color: var(--ink-500); line-height: 1.5; }
.modal-body { padding: 18px 22px; display: grid; gap: 16px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 14px 22px; background: #F8FAFC; border-top: 1px solid var(--border-color); border-radius: 0 0 16px 16px; }
.modal-foot .modal-foot-note { margin-right: auto; }
.form-label { display: block; font-weight: 700; font-size: .84rem; color: var(--ink-900); margin-bottom: 6px; }
.form-label .opt { font-weight: 500; color: var(--ink-500); }
.hint { font-size: .78rem; color: var(--ink-500); margin: 6px 0 0; line-height: 1.45; }
.choice-list { display: grid; gap: 8px; }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border-color); border-radius: 12px; padding: 11px 14px; cursor: pointer; font-size: .88rem; transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease); }
.choice:hover { border-color: var(--border-strong); }
.choice:has(input:checked) { border-color: var(--primary-mid); background: #F3F7FD; box-shadow: inset 0 0 0 1px var(--primary-mid); }
.choice input { margin-top: 2px; }
.choice strong { display: block; }
.choice .inline-input { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; }
.admin-shell .choice .inline-input input { width: 90px; min-height: 34px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; font-size: .8rem; line-height: 1.45; background: #F1F5F9; color: var(--ink-700); }
.notice svg { flex: none; margin-top: 1px; }
.notice-mail { background: #FFF8E1; color: #6B5300; }
.notice-warn { background: #FEF3C7; color: #92400E; }

/* Application record */
.record-head { background: #fff; border: 1px solid var(--border-color); border-radius: 16px; padding: 20px 24px; margin-bottom: var(--space-5); box-shadow: 0 1px 3px rgba(15, 23, 42, .05); display: grid; gap: 18px; }
.record-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.record-avatar { flex: none; width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #0A2350 0%, #2A5BA8 100%); }
.record-title { flex: 1 1 280px; min-width: 0; }
.record-title h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.4rem, 2.2vw, 1.8rem); color: var(--primary-dark); margin: 0 0 4px; line-height: 1.2; }
.record-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .86rem; color: var(--ink-500); }
.id-chip { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; font-size: .8rem; letter-spacing: .02em; font-weight: 700; color: var(--primary-dark); background: #EEF3FA; border: 1px solid #DCE5F2; border-radius: 8px; padding: 3px 4px 3px 8px; }
.id-chip button { border: 0; background: none; color: var(--ink-500); cursor: pointer; display: inline-flex; padding: 3px; border-radius: 5px; }
.id-chip button:hover { background: #fff; color: var(--primary); }
.record-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.record-progress { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.record-progress li { list-style: none; font-size: .72rem; font-weight: 700; color: var(--ink-300); display: grid; gap: 6px; }
.record-progress li::before { content: ""; height: 6px; border-radius: 999px; background: var(--surface-200); }
.record-progress li.done { color: var(--ink-500); }
.record-progress li.done::before { background: linear-gradient(90deg, #0E2F66, #2A5BA8); }
.record-progress li.current { color: var(--primary-dark); }
.record-progress li.current::before { background: #F4C20D; box-shadow: 0 0 0 3px rgba(244, 194, 13, .22); }
.record-progress.is-halted li.done::before { background: var(--ink-300); }
.record-progress ol, ol.record-progress { margin: 0; padding: 0; }
.record-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; }
.record-fact { padding: 10px 14px; border-right: 1px solid var(--border-color); background: #FBFCFE; min-width: 0; }
.record-fact:last-child { border-right: 0; }
.record-fact span { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 2px; }
.record-fact strong { font-size: .9rem; color: var(--ink-900); overflow-wrap: anywhere; }
.next-step { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: linear-gradient(135deg, #F3F7FD, #FFFFFF); border: 1px solid #DCE5F2; }
.next-step-icon { flex: none; width: 38px; height: 38px; border-radius: 10px; background: #fff; border: 1px solid #DCE5F2; color: var(--primary); display: flex; align-items: center; justify-content: center; }
.next-step strong { display: block; color: var(--primary-dark); }
.next-step p { margin: 2px 0 0; font-size: .85rem; color: var(--ink-700); }
.doc-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.doc-actions form { margin: 0; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 0; font-size: .86rem; }
.kv dt { color: var(--ink-500); font-weight: 600; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.link-list a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: .85rem; color: var(--ink-900); }
.link-list a:hover { background: var(--surface-100); text-decoration: none; }
.answers-toggle > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-weight: 800; color: var(--primary-dark); border-bottom: 1px solid var(--border-color); }
.answers-toggle > summary::-webkit-details-marker { display: none; }
.answers-toggle > summary svg { transition: transform var(--dur-fast) var(--ease); color: var(--ink-500); }
.answers-toggle[open] > summary svg { transform: rotate(180deg); }
.answers-toggle > dl { padding-top: 10px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; gap: 10px; align-items: flex-start; max-width: min(440px, calc(100vw - 40px)); padding: 12px 14px; border-radius: 12px; font-size: .88rem; font-weight: 600; box-shadow: 0 16px 40px rgba(13, 38, 66, .22); animation: modal-in .2s var(--ease); }
.toast-success { background: #0F5132; color: #fff; }
.toast-danger { background: #991B1B; color: #fff; }
.toast button { background: none; border: 0; color: inherit; opacity: .75; cursor: pointer; padding: 0; margin-left: auto; }
@media (max-width: 720px) {
  .record-head { padding: 16px; }
  .record-progress { grid-template-columns: repeat(7, 1fr); }
  .record-progress li { font-size: 0; }
  .record-fact { border-right: 0; border-bottom: 1px solid var(--border-color); }
}
/* Dashboard work queue */
.admin-shell .queue-card { gap: 12px; padding: 14px 16px; border-radius: 14px; color: var(--ink-500); transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.admin-shell .queue-card:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(13, 38, 66, .08); text-decoration: none; }
.admin-shell .queue-card.has-items { border-color: #F4C20D; background: linear-gradient(135deg, #FFFBEA, #fff); }
.queue-icon { flex: none; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--surface-100); color: var(--ink-500); }
.has-items .queue-icon { background: #0D2642; color: #F4C20D; }
.admin-shell .queue-n { display: block; font-size: 1.45rem; line-height: 1.1; font-weight: 800; color: var(--primary-dark); }
.admin-shell .queue-label { display: block; font-size: .8rem; font-weight: 700; }
.queue-go { margin-left: auto; color: var(--ink-300); flex: none; }
/* Inline editors (Manage, Edit, Add question) → a button that opens a floating card */
.admin-shell .inline-review { position: relative; display: inline-block; }
.admin-shell .inline-review > summary, .admin-shell details.field-editor > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; color: var(--primary); font-weight: 700; font-size: .8rem; cursor: pointer; white-space: nowrap; }
.admin-shell .inline-review > summary::-webkit-details-marker, .admin-shell details.field-editor > summary::-webkit-details-marker { display: none; }
.admin-shell .inline-review > summary:hover, .admin-shell details.field-editor > summary:hover { border-color: var(--primary-mid); }
.admin-shell .inline-review[open] > summary { background: #EEF3FA; border-color: var(--primary-mid); }
.admin-shell .inline-review > :not(summary) { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(420px, 86vw); max-height: 70vh; overflow: auto; margin: 0; padding: 16px; background: #fff; border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 16px 40px rgba(13, 38, 66, .18); text-align: left; }
.admin-shell details.panel-footer.field-editor { background: #fff; }
.admin-shell details.panel-footer.field-editor[open] > summary { margin-bottom: 14px; }
.admin-shell .action-box > summary { padding: 14px 18px; }
.admin-shell .data-table tr.is-selected { background: #EEF3FA; box-shadow: inset 3px 0 0 var(--primary-mid); }
/* Compact admin sidebar so every item fits without scrolling on a laptop */
.admin-shell .shell-nav { padding: 10px 12px; }
.admin-shell .shell-nav-link { padding: 8px 12px; font-size: .88rem; min-height: 38px; }
.admin-shell .shell-nav-section { padding: 14px 12px 4px; }
.admin-shell .portal-brand { padding: 16px 20px 12px; }
.admin-shell .portal-brand-logo { height: 44px; }
.admin-shell .field :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) { width: 100%; }
/* Master list (templates, letters) */
.admin-shell .template-list { gap: 2px; padding: 6px; }
.admin-shell .template-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; font-size: .87rem; font-weight: 600; color: var(--ink-900); }
.admin-shell .template-item:hover { background: var(--surface-100); text-decoration: none; }
.admin-shell .template-item.active { background: #EEF3FA; color: var(--primary-dark); box-shadow: inset 3px 0 0 var(--primary-mid); }
.modal-wide { width: min(760px, calc(100vw - 32px)); }
.modal .field-form { margin: 0; }
.admin-shell details.field-editor > summary { margin: 0; }

/* Back links — on every portal page */
.hero-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; padding: 4px 12px 4px 8px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .92); font-size: .8rem; font-weight: 700; text-decoration: none; transition: background-color var(--dur-fast) var(--ease); }
.hero-back:hover { background: rgba(255, 255, 255, .22); color: #fff; text-decoration: none; }
.portal-hero-text .hero-back + .portal-eyebrow { display: block; }
.page-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--space-4); font-size: .84rem; font-weight: 700; color: var(--ink-500); text-decoration: none; }
.page-back:hover { color: var(--primary); text-decoration: none; }

/* Final-stretch journey card (invoice paid → onboarding) */
.journey-card { position: relative; overflow: hidden; border-radius: 18px; padding: 26px 28px; margin-bottom: var(--space-6); background: #fff; border: 1px solid var(--border-color); box-shadow: 0 1px 3px rgba(15, 23, 42, .05); }
.journey-card.is-paid { background: linear-gradient(135deg, #F0FAF4 0%, #FFFFFF 60%); border-color: #BBE5C8; }
.journey-card.is-paid::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(244, 194, 13, .22), rgba(244, 194, 13, 0) 70%); pointer-events: none; }
.journey-head { display: flex; gap: 18px; align-items: flex-start; }
.journey-icon { flex: none; width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: #EEF3FA; color: var(--primary); }
.is-paid .journey-icon { background: #15803D; color: #fff; box-shadow: 0 8px 20px rgba(21, 128, 61, .25); }
.journey-card h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.25rem, 2.2vw, 1.55rem); color: var(--primary-dark); margin: 0 0 6px; }
.journey-card p { margin: 0; color: var(--ink-700); max-width: 62ch; line-height: 1.6; }
.journey-steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.journey-steps li { position: relative; display: flex; flex-direction: column; gap: 8px; font-size: .76rem; font-weight: 700; color: var(--ink-300); }
.journey-steps li::before { content: ""; position: absolute; top: 11px; left: 26px; right: -4px; height: 2px; background: var(--surface-200); }
.journey-steps li:last-child::before { display: none; }
.journey-steps li.done::before { background: #15803D; }
.journey-dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--surface-200); background: #fff; display: flex; align-items: center; justify-content: center; }
.journey-steps li.done { color: var(--ink-700); }
.journey-steps li.done .journey-dot { background: #15803D; border-color: #15803D; color: #fff; }
.journey-steps li.current { color: var(--primary-dark); }
.journey-steps li.current .journey-dot { border-color: #F4C20D; box-shadow: 0 0 0 4px rgba(244, 194, 13, .25); animation: journey-pulse 1.8s ease-in-out infinite; }
.journey-steps em { font-style: normal; font-weight: 600; color: #9A7B0A; }
@keyframes journey-pulse { 50% { box-shadow: 0 0 0 7px rgba(244, 194, 13, .08); } }
@media (prefers-reduced-motion: reduce) { .journey-steps li.current .journey-dot { animation: none; } }
.journey-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
@media (max-width: 640px) {
  .journey-card { padding: 20px; }
  .journey-head { flex-direction: column; }
  .journey-steps { grid-template-columns: 1fr; gap: 10px; }
  .journey-steps li { flex-direction: row; align-items: center; }
  .journey-steps li::before { display: none; }
}

/* Invoice page: payment options sit on top, above the document */
.inv-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 24px; background: #fff; border-bottom: 1px solid var(--border-color); }
.pay-panel { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 16px; align-items: stretch; margin-bottom: var(--space-6); padding: 16px; border-radius: 18px; background: #fff; border: 1px solid var(--border-color); box-shadow: 0 8px 24px rgba(13, 38, 66, .08); }
.pay-summary { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 18px 20px; border-radius: 12px; color: #fff; background: radial-gradient(circle at 100% 0%, rgba(244, 194, 13, .28), rgba(244, 194, 13, 0) 55%), linear-gradient(135deg, #0A2350, #2A5BA8); }
.pay-label { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #F4C20D; }
.pay-amount { font-size: 2rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.pay-due { font-size: .85rem; color: rgba(255, 255, 255, .8); }
.pay-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay-option { position: relative; display: flex; flex-direction: column; gap: 6px; justify-content: space-between; margin: 0; padding: 16px; border-radius: 12px; border: 1px solid var(--border-color); background: #FBFCFE; }
.pay-option strong { display: flex; align-items: center; gap: 8px; color: var(--primary-dark); font-size: 1rem; }
.pay-option .btn { margin-top: 8px; }
.pay-option.is-recommended { border: 2px solid #F4C20D; background: #FFFCF0; }
.pay-tag { position: absolute; top: -10px; right: 12px; padding: 2px 10px; border-radius: 999px; background: #F4C20D; color: #0D2642; font-size: .7rem; font-weight: 800; letter-spacing: .04em; }
@media (max-width: 820px) { .pay-panel { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .pay-options { grid-template-columns: 1fr; } }

/* Confirmation of Attendance: pace + frequency cards, live first-invoice summary */
.step-num { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; background: var(--primary); color: #fff; font-size: .78rem; font-weight: 800; margin-right: 4px; }
.choice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.choice-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 2px solid var(--border-color); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease); }
.choice-card:hover { border-color: var(--primary-mid); }
.choice-card:has(input:checked) { border-color: var(--primary); background: #F5F8FD; box-shadow: 0 0 0 4px var(--focus-ring); }
.choice-card input { position: absolute; top: 18px; right: 18px; width: 18px; height: 18px; accent-color: var(--primary); }
.cc-top { display: flex; align-items: center; gap: 8px; min-height: 32px; padding-right: 28px; }
.cc-icon { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: #EEF3FA; color: var(--primary); }
.cc-tag { padding: 2px 10px; border-radius: 999px; background: var(--primary); color: #fff; font-size: .7rem; font-weight: 800; }
.cc-tag-alt { background: #FEF3C7; color: #92400E; }
.cc-name { font-size: 1.02rem; color: var(--primary-dark); }
.cc-text { font-size: .86rem; color: var(--ink-500); line-height: 1.5; }
.cc-price { margin-top: 4px; font-size: 1.35rem; font-weight: 800; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.cc-price small { font-size: .8rem; font-weight: 600; color: var(--ink-500); }
.cc-alt { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-500); }
.quote-box { display: none; border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; }
.quote-lines { width: 100%; border-collapse: collapse; font-size: .9rem; }
.quote-lines td { padding: 10px 14px; border-bottom: 1px solid var(--border-color); }
.quote-lines td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.quote-lines tr.is-discount td { color: #15803D; }
.quote-lines tr.quote-total td { border-bottom: 0; background: #0D2642; color: #fff; font-weight: 800; font-size: 1.05rem; }
.att-form:has(#pw-standard:checked):has(#t-monthly:checked) .quote-box[data-plan="monthly:standard"],
.att-form:has(#pw-standard:checked):has(#t-quarterly:checked) .quote-box[data-plan="quarterly:standard"],
.att-form:has(#pw-extended:checked):has(#t-monthly:checked) .quote-box[data-plan="monthly:extended"],
.att-form:has(#pw-extended:checked):has(#t-quarterly:checked) .quote-box[data-plan="quarterly:extended"] { display: block; }
.pace-fixed { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--border-color); border-radius: 12px; background: #F8FAFC; }
.pace-fixed strong { color: var(--primary-dark); }

/* ==========================================================================
   Calm palette (portal + admin). Same layout, fewer competing colours:
   white surfaces, navy as the single strong colour, gold kept only for the
   main call-to-action. Later rules intentionally override earlier accents.
   ========================================================================== */
.shell-main, .admin-shell .shell-main { background: #F5F7FA; }
.shell-sidebar { background: #fff; }
.shell-topbar { background: rgba(255, 255, 255, .96); box-shadow: 0 1px 0 var(--border-color); }
.shell-topbar::after { display: none; }
.portal-brand-label { color: var(--ink-500); }
.portal-brand-label::before, .portal-brand-label::after { background: var(--border-strong); }

/* Navigation: one flat navy for the current page, no gradients or gold edges */
.shell-nav-link.active { background: #193F69; box-shadow: none; }
.shell-nav-link[href$="new=1"]:not(.active) { background: transparent; color: var(--primary); font-weight: 700; }
.shell-nav-link[href$="new=1"]:not(.active) .icon { color: var(--primary); }
.shell-nav-link[href$="new=1"]:not(.active):hover { background: var(--surface-100); }
.nav-badge { background: #E8EEF6; color: #193F69; }
.shell-nav-link.active .nav-badge { background: rgba(255, 255, 255, .2); color: #fff; }
.shell-user-avatar, .topbar-user-avatar { background: #E8EEF6; color: #193F69; }

/* Page header: a white card instead of a dark gradient banner */
.portal-hero { background: #fff; color: var(--ink-900); border: 1px solid var(--border-color); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); padding: 26px 30px; }
.portal-hero::before, .portal-hero::after { display: none; }
.portal-eyebrow { color: var(--ink-500); letter-spacing: .1em; }
.portal-hero h1 { color: var(--primary-dark); }
.portal-hero p { color: var(--ink-500); }
.hero-back { background: var(--surface-100); color: var(--ink-700); }
.hero-back:hover { background: var(--surface-200); color: var(--primary-dark); }
.btn-glass { background: #fff; border: 1px solid var(--border-strong); color: var(--primary); }
.btn-glass:hover { background: var(--surface-50); border-color: var(--primary); color: var(--primary-dark); }
.app-switch-menu.on-hero > summary { background: #fff; border-color: var(--border-strong); color: var(--primary); }
.app-switch-menu.on-hero > summary:hover, .app-switch-menu.on-hero[open] > summary { background: var(--surface-50); border-color: var(--primary); color: var(--primary-dark); }
.app-switch-menu.on-hero .dash-count { background: var(--surface-100); color: var(--ink-700); }

/* "Action required": a white card with a thin amber edge, not a yellow band */
.action-required { background: #fff; border: 1px solid var(--border-color); border-left: 3px solid #D97706; }
.action-required .icon-wrap { background: #FFF7ED; color: #B45309; }
.action-required-text strong { color: #B45309; }
.action-required-text span { color: var(--ink-700); }
.attention-card, .attention-card.is-top { background: #fff; border-color: var(--border-color); border-left: 3px solid #D97706; }

/* Payment + journey: navy and white only */
.pay-summary { background: #193F69; }
.pay-label { color: #C9D6E8; }
.pay-option.is-recommended { border: 2px solid #193F69; background: #fff; }
.pay-tag { background: #193F69; color: #fff; }
.journey-card.is-paid { background: #fff; border-color: #BBE5C8; }
.journey-card.is-paid::after { display: none; }

/* Admin: queue cards and tabs without gold fills */
.admin-shell .queue-card.has-items { border-color: #B8C7DB; background: #fff; }
.has-items .queue-icon { background: #193F69; color: #fff; }
.empty-state p strong { display: inline; margin: 0; }
/* Calm palette: content pages inside the portal get the same white header */
.site.in-portal .page-hero { background: #fff; color: var(--ink-900); border: 1px solid var(--border-color); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.site.in-portal .page-hero::before, .site.in-portal .page-hero::after { display: none; }
.site.in-portal .page-hero h1 { color: var(--primary-dark); }
.site.in-portal .page-hero .lead, .site.in-portal .page-hero p { color: var(--ink-500); }
.site.in-portal .page-hero .crumbs, .site.in-portal .page-hero .crumbs a, .site.in-portal .page-hero .eyebrow { color: var(--ink-500); }
.app-id { color: var(--primary); background: #EEF3FA; }
/* Journey message inside the tracker panel */
.journey-card.is-inline { margin: var(--space-6) 0 0; padding: 16px 18px; border-radius: 12px; box-shadow: none; background: #F8FAFC; }
.journey-card.is-inline.is-paid { background: #F0FAF4; }
.journey-card.is-inline .journey-icon { width: 42px; height: 42px; border-radius: 12px; }
.journey-card.is-inline h2 { font-family: var(--font-body); font-weight: 800; font-size: 1rem; margin-bottom: 2px; }
.journey-card.is-inline p { font-size: .9rem; }
.journey-card.is-inline .journey-head { flex-direction: row; gap: 14px; }
.action-required.is-inline { margin: var(--space-6) 0 0; box-shadow: none; }

/* Signed-in footer: one quiet line at the bottom of every page */
.shell-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px 24px; flex-wrap: wrap; margin-top: auto; padding: 18px var(--space-8); border-top: 1px solid var(--border-color); background: #fff; font-size: .8rem; color: var(--ink-500); }
.shell-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.shell-footer a { color: var(--ink-500); text-decoration: none; }
.shell-footer a:hover { color: var(--primary); text-decoration: underline; }
@media (max-width: 640px) { .shell-footer { padding: 16px var(--space-5); flex-direction: column; align-items: flex-start; } .shell-footer nav { gap: 14px; } }

/* Printing the invoice page gives the invoice only — no portal chrome, buttons or payment panels */
@media print {
  @page { size: A4; margin: 14mm 16mm; }
  body:has(.inv-sheet) { background: #fff !important; }
  body:has(.inv-sheet) :is(.shell-sidebar, .shell-backdrop, .shell-topbar, .shell-footer, .portal-hero, .pay-panel, #wire, .journey-card, .alert, .thanks-dialog, .inv-topbar, .toast) { display: none !important; }
  body:has(.inv-sheet) .shell-main { margin: 0 !important; background: #fff !important; }
  body:has(.inv-sheet) .shell-content, body:has(.inv-sheet) main { padding: 0 !important; max-width: none !important; }
  body:has(.inv-sheet) .shell-content > p, body:has(.inv-sheet) main > p { display: none !important; }
  .inv-sheet { border: 0 !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; }
  .inv-sheet * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Invoice: pay by bank transfer — details card + "I've sent it" form */
.wire .panel-header .meta { font-size: .8rem; }
.wire-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.wire-step { padding: 22px 24px; }
.wire-step + .wire-step { border-left: 1px solid var(--border-color); background: #FBFCFE; }
.wire-step-h { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--primary-dark); margin-bottom: 14px; }
.wire-card { margin: 0 0 14px; border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; }
.wire-card > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--border-color); }
.wire-card > div:last-child { border-bottom: 0; }
.wire-card dt { font-size: .8rem; color: var(--ink-500); font-weight: 600; }
.wire-card dd { margin: 0; font-size: .92rem; color: var(--ink-900); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wire-card dd span { flex-basis: 100%; font-size: .78rem; color: var(--ink-500); }
.wire-mono { font-variant-numeric: tabular-nums; letter-spacing: .03em; font-weight: 700; }
.wire-ref { background: #F3F7FD; }
.wire-copy { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border-color); background: #fff; color: var(--ink-500); cursor: pointer; }
.wire-copy:hover { color: var(--primary); border-color: var(--primary-mid); }
.wire-copy.is-copied { color: #15803D; border-color: #86C79A; background: #F0FAF4; }
.wire-help { margin: -6px 0 16px; font-size: .86rem; color: var(--ink-500); }
.wire-form .field { margin-bottom: 14px; }
.wire-form .field label .opt { font-weight: 500; color: var(--ink-500); }
.wire-form .field :is(input, textarea) { width: 100%; background: #fff; border: 1px solid var(--border-strong); border-radius: 10px; padding: .6rem .8rem; font: inherit; font-size: .92rem; min-height: 42px; }
.wire-form .field textarea { min-height: 64px; resize: vertical; }
.wire-form .field :is(input, textarea):focus { outline: none; border-color: var(--primary-mid); box-shadow: 0 0 0 3px rgba(47, 95, 167, .18); }
.wire-form .field-grid { gap: 0 14px; }
.wire-form .btn { margin-top: 4px; }
@media (max-width: 860px) {
  .wire-grid { grid-template-columns: 1fr; }
  .wire-step + .wire-step { border-left: 0; border-top: 1px solid var(--border-color); }
  .wire-card > div { grid-template-columns: 1fr; gap: 2px; }
}
.side-award .portal-eyebrow { color: #F4C20D; } /* readable on the tile's navy background */

/* Admin: site status bar (not live) */
.site-mode-bar { display: flex; align-items: center; gap: 10px; padding: 9px var(--space-8); font-size: .86rem; background: #FFF7E6; color: #7A4B00; border-bottom: 1px solid #F5D9A0; }
.site-mode-bar.is-maintenance { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.site-mode-bar a { margin-left: auto; font-weight: 800; color: inherit; text-decoration: underline; }
