/* ==========================================================================
   ZEBRA FOUNDATION — Student Portal design system
   A warm, welcoming, premium interface for students pursuing study abroad.

   Identity
   --------
   Type      Sora (display) · Plus Jakarta Sans (UI/body)
   Palette   Deep navy ink · Royal blue primary · Sky tints
             Emerald (growth/success) · Soft gold (celebration) · Cool canvas
   Shape     Soft 20px cards, 12px controls, tinted navy shadows
   Motion    Gentle 200–320ms ease-out lifts, staggered reveals
   ========================================================================== */

:root {
  /* Ink (cool navy-tinted grays — one family only) */
  --ink-900: #16213A;
  --ink-700: #35435E;
  --ink-500: #5B6880;
  --ink-400: #8391A8;
  --ink-300: #AFB9CA;

  /* Royal blue — the single primary accent */
  --royal-700: #1D46C2;
  --royal-600: #2A55E0;
  --royal-500: #3D66EC;
  --royal-100: #DBE5FF;
  --royal-050: #EEF3FF;

  /* Supporting functional tones */
  --navy-900: #101E3C;
  --navy-800: #16294F;
  --sky-500:  #4E9DF2;
  --sky-050:  #EAF4FE;
  --emerald-600: #0E8A5F;
  --emerald-500: #17A374;
  --emerald-050: #E7F6F0;
  --gold-600: #B77E1C;
  --gold-500: #E3A63A;
  --gold-050: #FBF3E1;
  --red-600:  #C24138;
  --red-050:  #FBEDEC;

  /* Surfaces */
  --canvas:   #F4F6FB;
  --surface:  #FFFFFF;
  --line:     #E3E8F1;
  --line-soft:#EDF0F6;

  /* Tinted shadows (navy light source from above) */
  --shadow-xs: 0 1px 2px rgba(22, 39, 78, .06);
  --shadow-sm: 0 2px 8px rgba(22, 39, 78, .07);
  --shadow-md: 0 8px 24px rgba(22, 39, 78, .09);
  --shadow-lg: 0 18px 48px rgba(22, 39, 78, .14);
  --ring: 0 0 0 3px rgba(61, 102, 236, .22);

  /* Type */
  --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Sora', var(--font-ui);

  /* Shape */
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  --sidebar-w: 268px;
  --sidebar-w-mini: 80px;
  --topbar-h: 68px;
}

/* ==========================================================================
   NIGHT MODE — scoped to the student portal shell (.sp) only, so the
   auth screens (login/register/reset) keep their fixed light glass look.
   Toggled via [data-theme-toggle] in the topbar; zfms_head() sets
   data-theme on <html> before first paint to avoid a light-mode flash.
   ========================================================================== */

html[data-theme="dark"] .sp {
  --ink-900: #F0F4FC;
  --ink-700: #C7D1E6;
  --ink-500: #94A1C2;
  --ink-400: #7280A0;
  --ink-300: #4B5876;

  --royal-700: #7C9CFF;
  --royal-600: #5B7FFF;
  --royal-500: #6690FF;
  --royal-100: #263258;
  --royal-050: #17213F;

  --sky-500:  #6FB4FF;
  --sky-050:  #132A40;
  --emerald-600: #35D999;
  --emerald-500: #22C58C;
  --emerald-050: #0E2A21;
  --gold-600: #F0B94A;
  --gold-050: #2E2410;
  --red-600:  #FF6B61;
  --red-050:  #33201D;

  --canvas:   #0B1220;
  --surface:  #141E33;
  --line:     #2A3855;
  --line-soft:#1E2A45;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow-sm: 0 3px 10px rgba(0, 0, 0, .5);
  --shadow-md: 0 10px 26px rgba(0, 0, 0, .55);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .6);
  --ring: 0 0 0 3px rgba(91, 127, 255, .35);
}

html[data-theme="dark"] .sp-topbar { background: rgba(11, 18, 32, .78); }
html[data-theme="dark"] .sp .skel {
  background: linear-gradient(90deg, var(--line-soft) 25%, #263255 50%, var(--line-soft) 75%);
  background-size: 200% 100%;
}
html[data-theme="dark"] .sp .alert-success,
html[data-theme="dark"] .sp .track-note.emerald { border-color: #1E4F3C; }
html[data-theme="dark"] .sp .alert-error,
html[data-theme="dark"] .sp .track-note.red { border-color: #6B332E; }
html[data-theme="dark"] .sp .alert-warning { border-color: #6B4F1E; }

/* --------------------------------------------------------------- Base */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-700);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; color: var(--ink-900); font-family: var(--font-display); font-weight: 600; text-wrap: balance; }
p  { margin: 0 0 1em; }
a  { color: var(--royal-600); text-decoration: none; }
a:hover { color: var(--royal-700); }
img { max-width: 100%; }
::selection { background: var(--royal-100); color: var(--navy-900); }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   APP SHELL — sidebar · topbar · content
   ========================================================================== */

.sp { display: flex; min-height: 100dvh; }

/* ------------------------------------------------------------- Sidebar */

.sp-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  z-index: 50;
  transition: width .28s cubic-bezier(.4, 0, .2, 1);
}

.sp-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 18px;
}
.sp-brand img { width: 42px; height: 42px; object-fit: contain; flex-shrink: 0; }
.sp-brand b {
  font-family: var(--font-display); font-size: 15.5px; color: var(--ink-900);
  display: block; line-height: 1.2; white-space: nowrap;
}
.sp-brand span {
  font-size: 11px; color: var(--royal-600); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}

.sp-nav { flex: 1; overflow-y: auto; padding: 4px 14px 14px; scrollbar-width: thin; }

.sp-nav-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-400); padding: 16px 12px 7px; white-space: nowrap;
}

.sp-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-bottom: 2px;
  border-radius: var(--r-sm);
  color: var(--ink-500); font-weight: 600; font-size: 13.5px;
  white-space: nowrap; position: relative;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.sp-nav a i {
  width: 20px; text-align: center; font-size: 14.5px; flex-shrink: 0;
  transition: transform .18s ease;
}
.sp-nav a:hover { background: var(--royal-050); color: var(--royal-700); }
.sp-nav a:hover i { transform: translateX(1px) scale(1.06); }
.sp-nav a.active {
  background: linear-gradient(96deg, var(--royal-600), var(--royal-500) 85%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(42, 85, 224, .28);
}
.sp-nav a.active::before {
  content: ''; position: absolute; left: -14px; top: 22%; bottom: 22%;
  width: 3.5px; border-radius: 0 4px 4px 0; background: var(--royal-600);
}
.sp-nav a .sp-nav-badge {
  margin-left: auto; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: var(--red-600); color: #fff;
  font-size: 10.5px; font-weight: 700; display: inline-flex;
  align-items: center; justify-content: center;
}
.sp-nav a.active .sp-nav-badge { background: rgba(255,255,255,.28); }

/* Profile card at the bottom of the sidebar */
.sp-me {
  margin: 10px 14px 14px;
  padding: 12px;
  border-radius: var(--r-md);
  background: linear-gradient(160deg, var(--royal-050), var(--sky-050));
  border: 1px solid var(--royal-100);
  display: flex; align-items: center; gap: 10px;
}
.sp-me .who { min-width: 0; flex: 1; }
.sp-me .who b { display: block; font-size: 13px; color: var(--ink-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-me .who span { display: block; font-size: 11.5px; color: var(--ink-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-me .logout {
  color: var(--ink-400); width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .18s ease;
}
.sp-me .logout:hover { background: var(--surface); color: var(--red-600); box-shadow: var(--shadow-xs); }

/* Collapsed (desktop) */
@media (min-width: 981px) {
  .sp.mini .sp-sidebar { width: var(--sidebar-w-mini); }
  .sp.mini .sp-brand { justify-content: center; padding-inline: 10px; }
  .sp.mini .sp-brand > div:last-child, .sp.mini .sp-nav-label,
  .sp.mini .sp-nav a > span, .sp.mini .sp-nav a .sp-nav-badge,
  .sp.mini .sp-me .who, .sp.mini .sp-me .logout { display: none; }
  .sp.mini .sp-nav a { justify-content: center; padding: 12px 0; }
  .sp.mini .sp-me { justify-content: center; padding: 10px; }
}

/* Mobile drawer */
.sp-veil {
  display: none; position: fixed; inset: 0; z-index: 49;
  background: rgba(16, 30, 60, .45);
  backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .25s ease;
}
@media (max-width: 980px) {
  .sp-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-104%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    box-shadow: var(--shadow-lg);
  }
  .sp.nav-open .sp-sidebar { transform: translateX(0); }
  .sp.nav-open .sp-veil { display: block; opacity: 1; }
}

/* ------------------------------------------------------------- Main */

.sp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.sp-topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 26px;
  position: sticky; top: 0; z-index: 40;
  background: rgba(244, 246, 251, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.sp-burger {
  display: none;
  width: 40px; height: 40px; border: 0; border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink-700); font-size: 15px;
  box-shadow: var(--shadow-xs); cursor: pointer;
  align-items: center; justify-content: center;
  transition: all .18s ease;
}
.sp-burger:hover { color: var(--royal-600); box-shadow: var(--shadow-sm); }
@media (max-width: 980px) { .sp-burger { display: inline-flex; } }
@media (min-width: 981px) { .sp-burger.desk { display: inline-flex; } }

.sp-crumb { font-size: 13px; color: var(--ink-400); white-space: nowrap; }
.sp-crumb b { color: var(--ink-900); font-weight: 600; }
.sp-crumb i { font-size: 10px; margin: 0 7px; }

.sp-top-spacer { flex: 1; }

.sp-search { position: relative; width: min(320px, 30vw); }
.sp-search i {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--ink-400); font-size: 13px; pointer-events: none;
}
.sp-search input {
  width: 100%; height: 40px; border: 1px solid transparent; border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow-xs);
  padding: 0 14px 0 36px; font: inherit; font-size: 13px; color: var(--ink-900);
  transition: box-shadow .18s ease, border-color .18s ease;
}
.sp-search input::placeholder { color: var(--ink-400); }
.sp-search input:focus { outline: none; border-color: var(--royal-500); box-shadow: var(--ring); }
@media (max-width: 640px) { .sp-search { display: none; } }

.sp-top-ico {
  position: relative;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--surface); color: var(--ink-500);
  box-shadow: var(--shadow-xs);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; transition: all .18s ease;
}
.sp-top-ico:hover { color: var(--royal-600); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.sp-top-ico .pip {
  position: absolute; top: -4px; right: -4px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--red-600); border: 2px solid var(--canvas);
  color: #fff; font-size: 9.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

.sp-top-me { display: flex; align-items: center; gap: 10px; padding-left: 4px; }
.sp-top-me .who { line-height: 1.25; text-align: right; }
.sp-top-me .who b { display: block; font-size: 12.5px; color: var(--ink-900); }
.sp-top-me .who span { font-size: 11px; color: var(--ink-400); }
@media (max-width: 640px) { .sp-top-me .who { display: none; } }

.sp-content {
  flex: 1;
  padding: 28px 26px 48px;
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
}
@media (max-width: 640px) { .sp-content { padding: 20px 16px 40px; } }

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* ------------------------------------------------------------- Page head */

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.page-head h1 { font-size: clamp(21px, 2.6vw, 26px); letter-spacing: -.02em; }
.page-head .sub { color: var(--ink-500); font-size: 13.5px; margin-top: 5px; max-width: 62ch; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--royal-600); background: var(--royal-050);
  padding: 5px 11px; border-radius: 999px; margin-bottom: 10px;
}

/* ------------------------------------------------------------- Hero banner */

.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  background: linear-gradient(112deg, var(--navy-900) 0%, #1B3466 55%, var(--royal-700) 100%);
  color: #fff;
  padding: 30px 34px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-md);
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(520px 300px at 88% -20%, rgba(78, 157, 242, .35), transparent 66%),
    radial-gradient(420px 260px at 70% 130%, rgba(227, 166, 58, .18), transparent 70%);
  pointer-events: none;
}
.hero .hero-img {
  position: absolute; right: 0; top: 0; bottom: 0; width: 46%;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
  opacity: .8;
}
.hero > div { position: relative; z-index: 1; max-width: 58%; }
.hero .hi { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; color: #BFD3F7; }
.hero h1 {
  color: #fff; font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -.02em; line-height: 1.18; margin: 8px 0 10px;
}
.hero p { color: #C9D6EF; font-size: 13.5px; max-width: 52ch; margin: 0 0 18px; }
.hero .hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 780px) {
  .hero { padding: 24px 22px; }
  .hero .hero-img { display: none; }
  .hero > div { max-width: 100%; }
}

/* ------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 42px; padding: 0 20px;
  border: 0; border-radius: 12px; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 700;
  transition: transform .16s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap; text-decoration: none;
}
.btn:active { transform: scale(.975); }
.btn i { font-size: 13px; }

.btn-primary {
  background: linear-gradient(96deg, var(--royal-600), var(--royal-500));
  color: #fff;
  box-shadow: 0 6px 18px rgba(42, 85, 224, .32);
}
.btn-primary:hover { color: #fff; box-shadow: 0 10px 26px rgba(42, 85, 224, .42); transform: translateY(-1px); }

.btn-ghost {
  background: var(--surface); color: var(--ink-700);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover { color: var(--royal-700); border-color: var(--royal-100); background: var(--royal-050); }

.btn-soft { background: var(--royal-050); color: var(--royal-700); }
.btn-soft:hover { background: var(--royal-100); color: var(--royal-700); }

.btn-danger { background: var(--red-600); color: #fff; }
.btn-danger:hover { color: #fff; filter: brightness(1.06); }

.btn-light { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(6px); }
.btn-light:hover { background: rgba(255,255,255,.24); color: #fff; }

.btn-white { background: #fff; color: var(--navy-900); box-shadow: 0 6px 20px rgba(6, 14, 32, .35); }
.btn-white:hover { color: var(--royal-700); transform: translateY(-1px); }

.btn-block { width: 100%; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 12.5px; border-radius: 10px; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 14.5px; border-radius: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none; }

/* Loading spinner inside buttons (data-once) */
.btn .spin { display: none; }
.btn.loading .spin { display: inline-block; animation: sp-rot .8s linear infinite; }
.btn.loading .lbl-ico { display: none; }
@keyframes sp-rot { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------- Cards */

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-soft);
  transition: box-shadow .25s ease, transform .25s ease;
}
.card.lift:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.card-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px;
  padding: 18px 22px 0;
}
.card-head h3 { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.card-head h3 i { color: var(--royal-600); font-size: 13.5px; }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-head .hint { font-size: 12px; color: var(--ink-400); }
.card-pad { padding: 22px; }
.card-head + .card-pad { padding-top: 14px; }
@media (max-width: 480px) {
  .card-head .right { margin-left: 0; width: 100%; }
}

/* ------------------------------------------------------------- Grid */

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main  { grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); align-items: start; }
.grid-tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }

@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 880px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------- Stats */

.stat {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s ease, transform .25s ease;
  position: relative; overflow: hidden;
}
.stat:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.stat > a, .stat > div { display: block; padding: 18px 20px; color: inherit; }
.stat::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--royal-500), var(--sky-500));
  opacity: 0; transition: opacity .25s ease;
}
.stat:hover::before { opacity: 1; }

.stat-top { display: flex; align-items: center; gap: 10px; }
.stat-ico {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--royal-050); color: var(--royal-600); font-size: 15px;
}
.stat.emerald .stat-ico { background: var(--emerald-050); color: var(--emerald-600); }
.stat.gold    .stat-ico { background: var(--gold-050);    color: var(--gold-600); }
.stat.sky     .stat-ico { background: var(--sky-050);     color: var(--sky-500); }
.stat.red     .stat-ico { background: var(--red-050);     color: var(--red-600); }
.stat-label { font-size: 12.5px; font-weight: 600; color: var(--ink-500); }
.stat-value {
  font-family: var(--font-display); font-variant-numeric: tabular-nums;
  font-size: 27px; font-weight: 700; color: var(--ink-900);
  letter-spacing: -.02em; margin-top: 10px; line-height: 1.1;
}
.stat-note { font-size: 12px; color: var(--ink-400); margin-top: 5px; }
.stat-note .up { color: var(--emerald-600); font-weight: 700; }

/* ------------------------------------------------------------- Quick tiles */

.tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  color: var(--ink-700); font-weight: 700; font-size: 13px;
  transition: all .22s ease;
}
.tile i {
  width: 38px; height: 38px; border-radius: 11px; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--royal-050); color: var(--royal-600);
  transition: transform .22s ease;
}
.tile span small { display: block; font-weight: 500; font-size: 11.5px; color: var(--ink-400); margin-top: 2px; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--royal-700); border-color: var(--royal-100); }
.tile:hover i { transform: scale(1.08) rotate(-4deg); }
.tile.emerald i { background: var(--emerald-050); color: var(--emerald-600); }
.tile.gold    i { background: var(--gold-050);    color: var(--gold-600); }
.tile.sky     i { background: var(--sky-050);     color: var(--sky-500); }
.tile.red     i { background: var(--red-050);     color: var(--red-600); }

/* ------------------------------------------------------------- Progress */

.progress { display: grid; gap: 6px; }
.progress .p-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; }
.progress .p-top b { color: var(--ink-900); font-weight: 600; }
.progress .p-top span { color: var(--ink-400); font-variant-numeric: tabular-nums; font-weight: 700; }
.progress .p-bar {
  height: 8px; border-radius: 6px; background: var(--line-soft); overflow: hidden;
}
.progress .p-fill {
  display: block; height: 100%; border-radius: 6px; width: 0;
  background: linear-gradient(90deg, var(--royal-600), var(--sky-500));
  transition: width 1s cubic-bezier(.25, .8, .3, 1);
}
.progress.emerald .p-fill { background: linear-gradient(90deg, var(--emerald-600), var(--emerald-500)); }
.progress.gold    .p-fill { background: linear-gradient(90deg, var(--gold-600), var(--gold-500)); }
.progress.red     .p-fill { background: var(--red-600); }

/* ------------------------------------------------------------- Avatar */

.avatar {
  width: 40px; height: 40px; border-radius: 13px; object-fit: cover; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--royal-600), var(--sky-500));
  color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}
.avatar.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 11px; }
.avatar.avatar-lg { width: 84px; height: 84px; border-radius: 24px; font-size: 26px; }

/* ------------------------------------------------------------- Badges */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ink   { background: var(--line-soft); color: var(--ink-500); }
.badge-green { background: var(--emerald-050); color: var(--emerald-600); }
.badge-blue  { background: var(--royal-050); color: var(--royal-600); }
.badge-amber { background: var(--gold-050); color: var(--gold-600); }
.badge-red   { background: var(--red-050); color: var(--red-600); }

/* ------------------------------------------------------------- Alerts */

.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--r-md);
  font-size: 13.5px; font-weight: 500;
  margin-bottom: 16px;
  border: 1px solid;
  animation: alert-in .35s cubic-bezier(.21, 1.02, .55, 1) both;
  box-shadow: var(--shadow-sm);
}
@keyframes alert-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.alert i { font-size: 15px; margin-top: 1px; }
.alert.leaving { animation: alert-out .3s ease forwards; }
@keyframes alert-out { to { opacity: 0; transform: translateY(-6px); } }
.alert-success { background: var(--emerald-050); border-color: #C5EADB; color: var(--emerald-600); }
.alert-error   { background: var(--red-050); border-color: #F2CFCC; color: var(--red-600); }
.alert-info    { background: var(--royal-050); border-color: var(--royal-100); color: var(--royal-700); }
.alert-warning { background: var(--gold-050); border-color: #F1DCB2; color: var(--gold-600); }

/* ------------------------------------------------------------- Forms */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 16px; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
}

.field { display: grid; gap: 7px; }
.field > label { font-size: 12.5px; font-weight: 700; color: var(--ink-700); }
.field .req { color: var(--red-600); }
.field .help { font-size: 12px; color: var(--ink-400); font-weight: 400; }
.field .help a { font-weight: 600; }

.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 13.5px; color: var(--ink-900);
  background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 11px 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-300); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-300); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--royal-500); box-shadow: var(--ring);
}
.field input[readonly] { background: var(--canvas); color: var(--ink-500); }
@media (max-width: 640px) {
  /* Below 16px, iOS Safari auto-zooms the viewport on focus and stays
     zoomed after blur, throwing off alignment of everything below
     (e.g. the Gender radios) until the user manually pinches back out. */
  .field input, .field select, .field textarea { font-size: 16px; }
}

/* Floating-label variant (auth pages) */
.ffield { position: relative; }
.ffield input {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink-900);
  background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 13px;
  padding: 24px 15px 9px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.ffield label {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 13.5px; color: var(--ink-400); pointer-events: none;
  transition: all .16s ease;
}
.ffield input:focus, .ffield input:not(:placeholder-shown) { border-color: var(--royal-500); }
.ffield input:focus { box-shadow: var(--ring); outline: none; }
.ffield input:focus + label, .ffield input:not(:placeholder-shown) + label {
  top: 13px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--royal-600);
}
.ffield input::placeholder { color: transparent; }

/* Password wrap + eye */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 9px;
  background: transparent; color: var(--ink-400); cursor: pointer;
  transition: all .16s ease;
}
.pw-eye:hover { background: var(--royal-050); color: var(--royal-600); }

/* Password strength meter */
.pw-meter { height: 5px; border-radius: 4px; background: var(--line-soft); overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; border-radius: 4px; transition: width .35s ease, background .35s ease; }

/* Choice chips (radio rows) */
.choice-row { display: flex; gap: 10px; flex-wrap: wrap; }
.choice-row label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--ink-500);
  white-space: nowrap; flex: 0 0 auto;
  cursor: pointer; transition: all .18s ease;
}
.choice-row label:hover { border-color: var(--royal-100); color: var(--royal-700); }
.choice-row input { accent-color: var(--royal-600); margin: 0; width: 15px; height: 15px; flex-shrink: 0; }
.choice-row label:has(input:checked) {
  border-color: var(--royal-500); background: var(--royal-050); color: var(--royal-700);
}

/* Filter chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  height: 34px; padding: 0 15px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink-500);
  font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  transition: all .18s ease;
}
.chip:hover { border-color: var(--royal-100); color: var(--royal-700); }
.chip.on { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

/* File drop + preview */
.file-drop {
  position: relative;
  border: 2px dashed var(--line); border-radius: var(--r-md);
  background: var(--canvas);
  padding: 22px; text-align: center;
  font-size: 12.5px; color: var(--ink-400);
  transition: all .2s ease;
}
.file-drop:hover, .file-drop.drag { border-color: var(--royal-500); background: var(--royal-050); }
.file-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop .fd-ico { font-size: 22px; color: var(--royal-500); display: block; margin-bottom: 8px; }
.file-drop .fd-name { font-weight: 700; color: var(--emerald-600); display: none; margin-top: 6px; word-break: break-all; }
.file-drop.has-file { border-style: solid; border-color: var(--emerald-500); background: var(--emerald-050); }
.file-drop.has-file .fd-name { display: block; }
.file-drop img.fd-preview {
  display: none; width: 76px; height: 76px; border-radius: 16px; object-fit: cover;
  margin: 0 auto 8px; box-shadow: var(--shadow-sm);
}
.file-drop.has-img img.fd-preview { display: block; }
.file-drop.has-img .fd-ico { display: none; }

/* ------------------------------------------------------------- Tables */

.table-wrap { overflow-x: auto; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 13.5px; }
.table thead th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; padding: 13px 18px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-400); background: var(--canvas);
  border-bottom: 1px solid var(--line-soft);
}
.table td { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); color: var(--ink-700); }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: var(--royal-050); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }
.table .cell-main { font-weight: 700; color: var(--ink-900); }
.table .cell-sub { font-size: 12px; color: var(--ink-400); }

.who-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }

/* ------------------------------------------------------------- Empty states */

.empty { text-align: center; padding: 46px 24px; }
.empty-ico {
  width: 72px; height: 72px; margin: 0 auto 16px;
  border-radius: 24px;
  background: linear-gradient(140deg, var(--royal-050), var(--sky-050));
  color: var(--royal-500); font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  animation: empty-float 3.4s ease-in-out infinite;
}
@keyframes empty-float { 50% { transform: translateY(-6px); } }
.empty b { display: block; font-family: var(--font-display); font-size: 15.5px; color: var(--ink-900); }
.empty p { font-size: 13px; color: var(--ink-400); max-width: 40ch; margin: 6px auto 0; }

/* ------------------------------------------------------------- Skeletons */

.skel {
  border-radius: 8px;
  background: linear-gradient(90deg, var(--line-soft) 25%, #F7F9FD 50%, var(--line-soft) 75%);
  background-size: 200% 100%;
  animation: skel 1.3s ease-in-out infinite;
}
@keyframes skel { to { background-position: -200% 0; } }

/* ------------------------------------------------------------- Timeline */

.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--royal-100), var(--line-soft));
}
.timeline li { position: relative; padding: 0 0 18px; }
.timeline li:last-child { padding-bottom: 4px; }
.timeline .t-dot {
  position: absolute; left: -22px; top: 5px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--royal-500); border: 2.5px solid var(--surface);
  box-shadow: 0 0 0 2px var(--royal-100);
}
.timeline li.gold .t-dot { background: var(--gold-500); box-shadow: 0 0 0 2px var(--gold-050); }
.timeline li.ink  .t-dot { background: var(--ink-300); box-shadow: 0 0 0 2px var(--line-soft); }
.timeline li.emerald .t-dot { background: var(--emerald-500); box-shadow: 0 0 0 2px var(--emerald-050); }
.timeline li.red .t-dot { background: var(--red-600); box-shadow: 0 0 0 2px var(--red-050); }
.timeline .t-title { font-weight: 700; font-size: 13px; color: var(--ink-900); }
.timeline .t-meta { font-size: 12.5px; color: var(--ink-400); margin-top: 2px; }

/* ------------------------------------------------------------- Application form */

.app-steps { display: flex; gap: 8px; margin: -4px 0 22px; }
.app-steps a {
  flex: 1; display: grid; gap: 7px; text-align: left;
  font-size: 11px; font-weight: 700; color: var(--ink-400); text-decoration: none;
}
.app-steps a::before { content: ''; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s ease; }
.app-steps a span { transition: color .25s ease; }
.app-steps a:hover span { color: var(--royal-600); }
.app-steps a.on { color: var(--royal-700); }
.app-steps a.on::before { background: linear-gradient(90deg, var(--royal-600), var(--sky-500)); }
.app-steps a.done { color: var(--emerald-600); }
.app-steps a.done::before { background: var(--emerald-500); }

.app-section {
  display: flex; align-items: center; gap: 12px;
  scroll-margin-top: 88px;
}
.app-section:not(:first-child) { margin-top: 8px; padding-top: 16px; border-top: 1px dashed var(--line-soft); }
.app-section-ico {
  width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0;
  background: var(--royal-050); color: var(--royal-600);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
}
.app-section-title { font-weight: 800; font-size: 13.5px; color: var(--ink-900); }
.app-section-sub { font-size: 12px; color: var(--ink-400); }
.app-section-line { flex: 1; height: 1px; background: var(--line-soft); }

.app-hero { position: relative; height: 130px; overflow: hidden; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.app-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,30,60,.08), rgba(16,30,60,.7));
}
.app-hero b { position: absolute; left: 16px; bottom: 12px; z-index: 1; color: #fff; font-family: var(--font-display); font-size: 15px; }

.app-tips { padding: 22px; font-size: 13px; color: var(--ink-500); }
.app-tips h3 { font-size: 14.5px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.app-tips h3 i { color: var(--gold-500); }

/* ------------------------------------------- Application status tracking */

.card-head h3.wrap { white-space: normal; min-width: 0; }

.track-meta {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-size: 12.5px; color: var(--ink-500); margin-bottom: 20px;
}
.track-meta span { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.track-meta i { color: var(--ink-300); font-size: 11.5px; }

.track-rail { list-style: none; display: flex; margin: 2px 0 4px; padding: 0; }
.track-step {
  flex: 1; min-width: 0; position: relative;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 0 4px;
}
.track-step::before {
  content: ''; position: absolute; top: 13px; height: 2px; border-radius: 2px;
  left: calc(-50% + 18px); right: calc(50% + 18px);
  background: var(--line);
}
.track-step:first-child::before { display: none; }
.track-step.done::before, .track-step.now::before { background: var(--emerald-500); }
.track-step.halt::before { background: var(--red-600); }
.track-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--surface); border: 2px solid var(--line); color: var(--ink-400);
  position: relative; z-index: 1;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.track-step.done .track-dot { background: var(--emerald-500); border-color: var(--emerald-500); color: #fff; }
.track-step.now  .track-dot { background: var(--royal-600); border-color: var(--royal-600); color: #fff; box-shadow: 0 0 0 5px var(--royal-050); }
.track-step.halt .track-dot { background: var(--red-600); border-color: var(--red-600); color: #fff; box-shadow: 0 0 0 5px var(--red-050); }
.track-lbl { margin-top: 9px; font-size: 11px; font-weight: 600; line-height: 1.35; color: var(--ink-400); }
.track-step.done .track-lbl { color: var(--emerald-600); }
.track-step.now  .track-lbl { color: var(--royal-700); font-weight: 700; }
.track-step.halt .track-lbl { color: var(--red-600); font-weight: 700; }
.track-rail-compact { display: none; }
@media (max-width: 680px) {
  .track-rail { display: none; }
  .track-rail-compact { display: block; margin: 2px 0 4px; }
}

.track-note {
  display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center;
  border: 1px solid; border-radius: var(--r-md);
  padding: 15px 16px; margin-top: 16px;
}
.track-note .ico {
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 14px;
  background: var(--surface); box-shadow: var(--shadow-xs);
}
.track-note .txt { flex: 1; min-width: 180px; }
.track-note .txt b { display: block; font-size: 13.5px; color: var(--ink-900); margin-bottom: 2px; }
.track-note .txt p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink-700); }
.track-note .act { flex-shrink: 0; }
.track-note.royal   { background: var(--royal-050); border-color: var(--royal-100); }
.track-note.royal .ico   { color: var(--royal-600); }
.track-note.emerald { background: var(--emerald-050); border-color: #C5EADB; }
.track-note.emerald .ico { color: var(--emerald-600); }
.track-note.red     { background: var(--red-050); border-color: #F2CFCC; }
.track-note.red .ico     { color: var(--red-600); }

.track-facts { display: grid; gap: 9px; }
.track-facts .row { display: flex; justify-content: space-between; gap: 14px; font-size: 12.5px; }
.track-facts .row span { color: var(--ink-400); flex-shrink: 0; }
.track-facts .row b { color: var(--ink-700); font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }

.hr-soft { border: 0; border-top: 1px solid var(--line-soft); margin: 18px 0 16px; }
.app-tips ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; }

@media (max-width: 640px) {
  .app-steps { display: none; }
}

/* ------------------------------------------------------------- Mini calendar */

.mini-cal { width: 100%; border-collapse: collapse; font-size: 12.5px; text-align: center; }
.mini-cal th {
  color: var(--ink-400); font-weight: 700; padding: 6px 0;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
}
.mini-cal td { padding: 8px 0; color: var(--ink-500); border-radius: 10px; position: relative; font-weight: 600; }
.mini-cal td.dim { color: transparent; }
.mini-cal td.today { background: var(--royal-600); color: #fff; box-shadow: 0 4px 12px rgba(42,85,224,.3); }
.mini-cal td.evt::after {
  content: ''; position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold-500);
}
.mini-cal td.evt { cursor: help; }

/* ------------------------------------------------------------- Messages / chat */

.msg-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; }
.msg-item + .msg-item { border-top: 1px solid var(--line-soft); }
.msg-bubble {
  background: var(--canvas);
  border: 1px solid var(--line-soft);
  border-radius: 4px 16px 16px 16px;
  padding: 11px 14px;
  font-size: 13.5px; color: var(--ink-700);
  overflow-wrap: anywhere;
}
.msg-bubble.me {
  background: linear-gradient(120deg, var(--royal-050), var(--sky-050));
  border-color: var(--royal-100);
  border-radius: 16px 4px 16px 16px;
}
.msg-meta { font-size: 11.5px; color: var(--ink-400); margin-top: 5px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.msg-meta b { color: var(--ink-700); }

/* ------------------------------------------------------------- Stars */

.stars { color: var(--gold-500); font-size: 12px; letter-spacing: 2.5px; white-space: nowrap; }

/* Star rating picker (right-to-left trick) */
.rate-pick { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rate-pick input { position: absolute; opacity: 0; pointer-events: none; }
.rate-pick label {
  font-size: 24px; color: var(--line); cursor: pointer;
  transition: transform .15s ease, color .15s ease;
}
.rate-pick label:hover { transform: scale(1.18); }
.rate-pick label:hover, .rate-pick label:hover ~ label,
.rate-pick input:checked ~ label { color: var(--gold-500); }

/* ------------------------------------------------------------- Modal */

.modal-veil {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(16, 30, 60, .5); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-veil.open { display: flex; animation: veil-in .2s ease; }
@keyframes veil-in { from { opacity: 0; } }
.modal {
  background: var(--surface); border-radius: var(--r-lg);
  width: min(430px, 100%);
  box-shadow: var(--shadow-lg);
  animation: modal-in .28s cubic-bezier(.21, 1.02, .55, 1);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.modal-head { padding: 20px 24px 0; }
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 12px 24px 4px; font-size: 13.5px; color: var(--ink-500); }
.modal-foot { padding: 18px 24px 22px; display: flex; gap: 10px; justify-content: flex-end; }

/* ==========================================================================
   AUTH — full-screen scene + glass card
   ========================================================================== */

.auth-scene {
  min-height: 100dvh;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(430px, 1fr);
}
.auth-scene .scene-bg {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover; background-position: center 30%;
}
.auth-scene .scene-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(11, 22, 46, .88) 0%, rgba(13, 28, 60, .62) 46%, rgba(11, 22, 46, .38) 100%),
    radial-gradient(900px 460px at 12% 108%, rgba(42, 85, 224, .38), transparent 60%);
}

/* Left story panel */
.auth-story {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(26px, 4.5vw, 58px);
  color: #fff;
  min-height: 100dvh;
}
.auth-story .as-brand { display: flex; align-items: center; gap: 13px; }
.auth-story .as-brand img {
  width: 48px; height: 48px; object-fit: contain;
  background: rgba(255,255,255,.94); border-radius: 14px; padding: 6px;
  box-shadow: 0 8px 24px rgba(4, 10, 24, .4);
}
.auth-story .as-brand b { display: block; font-family: var(--font-display); font-size: 16px; }
.auth-story .as-brand span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #A8C2EE; font-weight: 700; }

.auth-story h1 {
  color: #fff; font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.14; letter-spacing: -.02em; max-width: 15ch;
  text-shadow: 0 2px 24px rgba(4, 10, 24, .35);
}
.auth-story .as-copy { color: #C4D3EE; font-size: 14.5px; max-width: 46ch; margin-top: 14px; }

.auth-story .as-points { list-style: none; display: grid; gap: 12px; padding: 0; margin: 26px 0 0; }
.auth-story .as-points li {
  display: flex; align-items: center; gap: 12px;
  font-size: 13.5px; color: #DCE6F8; font-weight: 500;
}
.auth-story .as-points i {
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  color: #F4C566; font-size: 14px; backdrop-filter: blur(6px);
}
.auth-story .as-foot { font-size: 12px; color: #8FA5CB; }

/* Right form panel */
.auth-panel {
  display: flex; align-items: center; justify-content: center;
  padding: clamp(20px, 4vw, 48px);
}
.auth-card {
  width: min(430px, 100%);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 24px 70px rgba(6, 14, 32, .45), inset 0 1px 0 rgba(255,255,255,.9);
  border-radius: 26px;
  padding: clamp(24px, 3.4vw, 38px);
  animation: card-rise .5s cubic-bezier(.21, 1.02, .55, 1) both;
}
@keyframes card-rise { from { opacity: 0; transform: translateY(22px) scale(.985); } }
.auth-card.wide { width: min(560px, 100%); }
.auth-card h2 { font-size: 22px; letter-spacing: -.02em; }
.auth-card .auth-sub { color: var(--ink-500); font-size: 13.5px; margin: 6px 0 22px; }
.auth-card form { display: grid; gap: 15px; }
.auth-card .form-grid { gap: 15px 13px; }

.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.auth-row .remember { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-500); font-weight: 600; cursor: pointer; }
.auth-row .remember input { accent-color: var(--royal-600); width: 15px; height: 15px; margin: 0; }
.auth-row a { font-weight: 700; }

.alt-link { text-align: center; font-size: 13px; color: var(--ink-500); margin: 18px 0 0; }
.alt-link a { font-weight: 700; }

.auth-mobile-brand { display: none; }

@media (max-width: 940px) {
  .auth-scene { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-panel { min-height: 100dvh; align-items: flex-start; padding-top: clamp(24px, 8vh, 64px); }
  .auth-mobile-brand {
    display: flex; align-items: center; gap: 11px; margin-bottom: 20px; color: #fff;
  }
  .auth-mobile-brand img {
    width: 40px; height: 40px; background: rgba(255,255,255,.94);
    border-radius: 12px; padding: 5px; object-fit: contain;
  }
  .auth-mobile-brand b { font-family: var(--font-display); font-size: 15px; }
  .auth-mobile-brand span { display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #A8C2EE; font-weight: 700; }
}

/* Registration steps indicator */
.steps { display: flex; gap: 8px; margin-bottom: 20px; }
.steps .step {
  flex: 1; display: grid; gap: 7px; text-align: left;
  font-size: 11px; font-weight: 700; color: var(--ink-400);
}
.steps .step::before { content: ''; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s ease; }
.steps .step.on { color: var(--royal-700); }
.steps .step.on::before { background: linear-gradient(90deg, var(--royal-600), var(--sky-500)); }
.steps .step.done { color: var(--emerald-600); }
.steps .step.done::before { background: var(--emerald-500); }

/* ------------------------------------------------------------- Scholarship cards */

.sch-card { overflow: hidden; display: flex; flex-direction: column; }
.sch-img { position: relative; height: 168px; overflow: hidden; }
.sch-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.25,.8,.3,1); }
.sch-card:hover .sch-img img { transform: scale(1.06); }
.sch-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(13, 24, 48, .55));
}
.sch-img .badge { position: absolute; left: 14px; bottom: 12px; z-index: 2; box-shadow: var(--shadow-sm); }
.sch-img .sch-fallback {
  height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(130deg, var(--navy-800), var(--royal-700));
}
.sch-img .sch-fallback i { font-size: 40px; color: rgba(255,255,255,.3); }

.sch-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.sch-body h3 { font-size: 15.5px; line-height: 1.3; }
.sch-meta { display: flex; gap: 15px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-400); font-weight: 600; }
.sch-meta i { color: var(--royal-500); margin-right: 5px; }
.sch-desc { font-size: 13px; color: var(--ink-500); flex: 1; }
.sch-foot { display: flex; align-items: center; gap: 10px; padding-top: 13px; border-top: 1px solid var(--line-soft); }

/* ------------------------------------------------------------- Reveal motion */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s cubic-bezier(.21, .8, .35, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .07s; }
.reveal.d2 { transition-delay: .14s; }
.reveal.d3 { transition-delay: .21s; }
.reveal.d4 { transition-delay: .28s; }

/* ------------------------------------------------------------- Utilities */

.mb  { margin-bottom: 18px; }
.mb-lg { margin-bottom: 26px; }
.muted { color: var(--ink-400); }
.center { text-align: center; }
