/* =====================================================================
   iViRTH Saathi — Design System
   Palette: deep trust-blue + warm amber/orange, on a soft "lite" cream
   ground. Rounded, companion-like feel — the brand mark is a book +
   shield + handshake, so curves and a single warm glow motif recur
   through the whole UI instead of generic flat SaaS cards.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,500&display=swap');

:root {
  /* ---- Brand colour tokens ------------------------------------- */
  --navy-900: #0E2A57;
  --navy-800: #143869;
  --navy-700: #1C4788;
  --blue-600: #2F6FE0;
  --blue-500: #4C8DFF;
  --blue-100: #E4EDFF;

  --amber-600: #D9860B;
  --amber-500: #F6A81C;
  --amber-400: #FFC24D;
  --amber-100: #FFEECB;

  --orange-600: #E85B2C;
  --orange-500: #F2653C;
  --orange-100: #FFE1D3;

  --cream-50:  #FFF9F0;
  --cream-100: #FFF3E1;
  --white:     #FFFFFF;

  --ink-900: #16203A;
  --ink-700: #3A465F;
  --ink-500: #6B7690;
  --ink-300: #A8B0C3;
  --ink-100: #E7EAF2;

  --success-600: #1F9D63;
  --success-100: #DFF6EA;
  --danger-600:  #E5484D;
  --danger-100:  #FDE4E4;

  /* ---- Gradients -------------------------------------------------- */
  --grad-hero: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 52%, #2857A8 100%);
  --grad-amber: linear-gradient(135deg, var(--amber-500) 0%, var(--orange-500) 100%);
  --grad-glow: radial-gradient(circle at 30% 20%, rgba(246, 168, 28, .55), transparent 60%);

  /* ---- Elevation (brand-tinted, never flat grey) ------------------- */
  --shadow-sm: 0 2px 8px rgba(14, 42, 87, .08);
  --shadow-md: 0 8px 24px rgba(14, 42, 87, .12);
  --shadow-lg: 0 16px 40px rgba(14, 42, 87, .18);
  --shadow-amber: 0 10px 28px rgba(217, 134, 11, .28);

  /* ---- Radii -------------------------------------------------------- */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* ---- Type ----------------------------------------------------------- */
  --font-display: 'Baloo 2', ui-rounded, 'Segoe UI', sans-serif;
  --font-body: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;

  /* ---- Motion ------------------------------------------------------- */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-fast: 160ms;
  --dur-med: 300ms;
  --dur-slow: 560ms;

  /* ---- App shell metrics ---------------------------------------------- */
  --topbar-h: 60px;
  --bottomnav-h: 72px;
  --max-w: 480px;

  color-scheme: light;
}

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

/* ---------------------------------------------------------------------
   Reset & base
   ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #EDE6D8;
  color: var(--ink-900);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 .35em; color: var(--navy-900); line-height: 1.15; }
p { margin: 0 0 .75em; color: var(--ink-700); line-height: 1.55; }
a { color: var(--blue-600); text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
input, select, textarea { font-family: inherit; font-size: 16px; }

:focus-visible {
  outline: 2.5px solid var(--blue-600);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------------------------------------------------------------
   App shell — phone-frame on desktop, full width on mobile
   ------------------------------------------------------------------- */
.app-shell {
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cream-50);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 1px rgba(14,42,87,.04);
}

@media (min-width: 560px) {
  body { display: flex; justify-content: center; padding: 28px 0; }
  .app-shell {
    min-height: calc(100vh - 56px);
    border-radius: var(--r-xl);
    box-shadow: 0 30px 70px rgba(14,42,87,.22), 0 0 0 10px var(--white), 0 0 0 11px var(--ink-100);
    overflow: hidden;
  }
}

.app-main {
  flex: 1;
  padding: 20px 20px calc(var(--bottomnav-h) + 28px);
  animation: page-in var(--dur-med) var(--ease-out) both;
}
.app-main.no-nav-pad { padding-bottom: 28px; }

@keyframes page-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------------
   Top bar
   ------------------------------------------------------------------- */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: var(--cream-50);
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(14,42,87,.06);
}
.topbar .brand { display: flex; align-items: center; gap: 9px; }
.topbar .brand-mark { width: 30px; height: 30px; }
.topbar .brand-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--navy-900); }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: var(--r-pill);
  display: grid; place-items: center;
  background: var(--white); border: 1px solid var(--ink-100);
  color: var(--navy-900); cursor: pointer; position: relative;
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-fast);
}
.icon-btn:active { transform: scale(.92); }
.icon-btn .dot {
  position: absolute; top: 7px; right: 7px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--orange-500); border: 1.5px solid var(--cream-50);
}

/* ---------------------------------------------------------------------
   Bottom navigation — sliding pill indicator
   ------------------------------------------------------------------- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: var(--max-w);
  margin: 0 auto;
  height: var(--bottomnav-h);
  background: rgba(255, 249, 240, .88);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-top: 1px solid rgba(14,42,87,.07);
  display: flex;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--ink-500); font-size: 11.5px; font-weight: 600;
  position: relative; transition: color var(--dur-fast);
}
.bottom-nav a svg { width: 22px; height: 22px; transition: transform var(--dur-fast) var(--ease-spring); }
.bottom-nav a.active { color: var(--navy-900); }
.bottom-nav a.active svg { transform: translateY(-2px); }
.bottom-nav a .nav-pill {
  position: absolute; top: 2px; width: 34px; height: 4px; border-radius: var(--r-pill);
  background: var(--grad-amber); opacity: 0; transform: scaleX(.4);
  transition: all var(--dur-med) var(--ease-spring);
}
.bottom-nav a.active .nav-pill { opacity: 1; transform: scaleX(1); }

/* ---------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------- */
.btn {
  --btn-h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--btn-h); padding: 0 22px; width: 100%;
  border-radius: var(--r-md); border: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 15.5px;
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-med), filter var(--dur-fast);
  position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad-amber); color: var(--navy-900); box-shadow: var(--shadow-amber); }
.btn-primary:hover { filter: brightness(1.04); }
.btn-navy { background: var(--navy-900); color: var(--white); box-shadow: var(--shadow-md); }
.btn-outline { background: var(--white); color: var(--navy-900); border: 1.5px solid var(--ink-100); }
.btn-outline:hover { border-color: var(--blue-500); }
.btn-ghost { background: transparent; color: var(--blue-600); height: auto; width: auto; padding: 6px 4px; font-weight: 600; }
.btn-sm { --btn-h: 40px; font-size: 13.5px; padding: 0 16px; width: auto; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* Ripple */
.btn .ripple {
  position: absolute; border-radius: 50%; transform: scale(0);
  background: rgba(255,255,255,.55); pointer-events: none;
  animation: ripple 620ms var(--ease-out);
}
.btn-outline .ripple, .btn-ghost .ripple { background: rgba(47,111,224,.18); }
@keyframes ripple { to { transform: scale(3.2); opacity: 0; } }

/* ---------------------------------------------------------------------
   Cards
   ------------------------------------------------------------------- */
.hero-card {
  background: var(--grad-hero);
  background-image: var(--grad-glow), var(--grad-hero);
  border-radius: var(--r-xl);
  padding: 24px 22px;
  color: var(--white);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-card::after {
  content: '';
  position: absolute; right: -30px; bottom: -40px; width: 160px; height: 160px;
  border-radius: 50%; background: rgba(255,255,255,.06);
}
.hero-card .eyebrow { font-size: 13px; color: var(--amber-400); font-weight: 700; margin-bottom: 6px; }
.hero-card h2 { color: var(--white); font-size: 22px; }
.hero-card p { color: rgba(255,255,255,.78); }

.surface-card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(14,42,87,.04);
}

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.quick-card {
  background: var(--white); border-radius: var(--r-lg); padding: 16px 14px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px;
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-fast);
  border: 1px solid rgba(14,42,87,.04);
}
.quick-card:active { transform: scale(.96); box-shadow: var(--shadow-md); }
.quick-card .qc-icon {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  font-size: 20px;
}
.qc-amber { background: var(--amber-100); }
.qc-blue { background: var(--blue-100); }
.qc-orange { background: var(--orange-100); }
.qc-green { background: var(--success-100); }
.quick-card .qc-title { font-weight: 700; color: var(--navy-900); font-size: 14.5px; }
.quick-card .qc-sub { font-size: 12px; color: var(--ink-500); }

.list-row {
  display: flex; align-items: center; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid var(--ink-100);
}
.list-row:last-child { border-bottom: none; }
.list-row .lr-icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--cream-100); flex-shrink: 0; font-size: 18px;
}
.list-row .lr-title { font-weight: 700; color: var(--navy-900); font-size: 14px; }
.list-row .lr-sub { font-size: 12.5px; color: var(--ink-500); }
.list-row .lr-value { font-weight: 700; color: var(--navy-900); font-size: 14px; margin-left: auto; text-align: right; }

/* Category / offer cards */
.category-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border-radius: var(--r-lg); padding: 16px;
  box-shadow: var(--shadow-sm); border: 1.5px solid transparent;
  transition: border-color var(--dur-fast), transform var(--dur-fast) var(--ease-spring);
  margin-bottom: 12px; cursor: pointer;
}
.category-card:active { transform: scale(.98); }
.category-card:hover, .category-card.selected { border-color: var(--amber-500); }
.category-card .cc-icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; flex-shrink: 0; }
.category-card .cc-title { font-weight: 700; color: var(--navy-900); font-size: 15px; }
.category-card .cc-sub { font-size: 12.5px; color: var(--ink-500); }
.category-card .cc-chevron { margin-left: auto; color: var(--ink-300); }

.offer-card {
  background: var(--white); border-radius: var(--r-lg); padding: 18px;
  border: 2px solid var(--ink-100); margin-bottom: 14px; cursor: pointer;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast) var(--ease-spring);
  position: relative;
}
.offer-card.recommended { border-color: var(--amber-500); box-shadow: var(--shadow-amber); }
.offer-card.selected { border-color: var(--blue-600); box-shadow: var(--shadow-md); }
.offer-card:active { transform: scale(.985); }
.offer-card .badge-recommended {
  position: absolute; top: -11px; left: 16px; background: var(--grad-amber); color: var(--navy-900);
  font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: var(--r-pill);
}
.offer-card .offer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.offer-card .offer-partner { font-weight: 800; color: var(--navy-900); font-size: 15.5px; }
.offer-card .offer-rate { color: var(--orange-600); font-weight: 700; font-size: 13px; }
.offer-card .offer-emi { font-family: var(--font-display); font-size: 26px; color: var(--navy-900); font-weight: 700; }
.offer-card .offer-meta { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--ink-500); }

/* ---------------------------------------------------------------------
   Chips, badges, tags
   ------------------------------------------------------------------- */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 9px 16px; border-radius: var(--r-pill); border: 1.5px solid var(--ink-100);
  background: var(--white); font-size: 13.5px; font-weight: 600; color: var(--ink-700);
  cursor: pointer; transition: all var(--dur-fast) var(--ease-spring);
}
.chip.active { background: var(--navy-900); border-color: var(--navy-900); color: var(--white); transform: scale(1.03); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700; }
.badge-success { background: var(--success-100); color: var(--success-600); }
.badge-warn { background: var(--amber-100); color: var(--amber-600); }
.badge-info { background: var(--blue-100); color: var(--blue-600); }
.badge-danger { background: var(--danger-100); color: var(--danger-600); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------------------------------------------------------------------
   Forms
   ------------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--navy-900); margin-bottom: 7px; }
.input-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--white); border: 1.5px solid var(--ink-100); border-radius: var(--r-md);
  padding: 0 14px; height: 52px; transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.input-wrap:focus-within { border-color: var(--blue-600); box-shadow: 0 0 0 4px var(--blue-100); }
.input-wrap.error { border-color: var(--danger-600); box-shadow: 0 0 0 4px var(--danger-100); }
.input-wrap input, .input-wrap select { flex: 1; border: none; outline: none; background: transparent; height: 100%; color: var(--ink-900); }
.input-wrap .prefix { color: var(--ink-500); font-weight: 600; font-size: 14.5px; }
.hint { font-size: 12px; color: var(--ink-500); margin-top: 6px; }
.hint.error-text { color: var(--danger-600); font-weight: 600; }
textarea.input-plain {
  width: 100%; border: 1.5px solid var(--ink-100); border-radius: var(--r-md); padding: 12px 14px;
  min-height: 96px; resize: vertical; outline: none; transition: border-color var(--dur-fast);
}
textarea.input-plain:focus { border-color: var(--blue-600); }

/* OTP boxes */
.otp-row { display: flex; gap: 10px; justify-content: space-between; }
.otp-box {
  width: 46px; height: 56px; text-align: center; font-size: 22px; font-weight: 700;
  border-radius: var(--r-sm); border: 1.5px solid var(--ink-100); background: var(--white);
  color: var(--navy-900); transition: border-color var(--dur-fast), transform var(--dur-fast);
}
.otp-box:focus { border-color: var(--amber-500); outline: none; transform: translateY(-2px); box-shadow: 0 0 0 4px var(--amber-100); }
.otp-box.filled { border-color: var(--blue-500); }
.otp-box.shake { animation: shake 420ms; }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); } 40%, 60% { transform: translateX(5px); }
}

/* Role selector chips (signup) */
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.role-card {
  border: 1.5px solid var(--ink-100); border-radius: var(--r-md); padding: 14px 8px; text-align: center;
  background: var(--white); cursor: pointer; transition: all var(--dur-fast) var(--ease-spring);
}
.role-card .role-icon { font-size: 22px; margin-bottom: 6px; }
.role-card span { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-700); }
.role-card.active { border-color: var(--amber-500); background: var(--amber-100); transform: translateY(-2px); }
.role-card.active span { color: var(--navy-900); }

/* ---------------------------------------------------------------------
   Stepper (loan/insurance status tracker)
   ------------------------------------------------------------------- */
.stepper { display: flex; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.step .step-dot {
  width: 30px; height: 30px; border-radius: 50%; background: var(--ink-100); color: var(--ink-500);
  display: grid; place-items: center; font-weight: 800; font-size: 13px; z-index: 2;
  transition: all var(--dur-med) var(--ease-spring);
}
.step .step-line {
  position: absolute; top: 15px; left: 50%; width: 100%; height: 3px; background: var(--ink-100); z-index: 1;
}
.step:last-child .step-line { display: none; }
.step .step-label { font-size: 11px; margin-top: 8px; color: var(--ink-500); font-weight: 600; text-align: center; }
.step.done .step-dot { background: var(--success-600); color: var(--white); }
.step.done .step-line { background: var(--success-600); }
.step.current .step-dot { background: var(--grad-amber); color: var(--navy-900); box-shadow: 0 0 0 6px var(--amber-100); animation: pulse-dot 1.8s infinite; }
.step.current .step-label { color: var(--navy-900); }
@keyframes pulse-dot { 0%,100% { box-shadow: 0 0 0 6px var(--amber-100); } 50% { box-shadow: 0 0 0 10px var(--amber-100); } }

/* Form wizard progress (top of multi-step pages) */
.wizard-progress { display: flex; gap: 6px; margin-bottom: 22px; }
.wizard-progress span { flex: 1; height: 5px; border-radius: var(--r-pill); background: var(--ink-100); overflow: hidden; }
.wizard-progress span i { display: block; height: 100%; width: 0; background: var(--grad-amber); transition: width var(--dur-slow) var(--ease-out); }
.wizard-progress span.done i, .wizard-progress span.active i { width: 100%; }

/* ---------------------------------------------------------------------
   Tabs (My Dashboard: Loans / Insurance / Scholarship)
   ------------------------------------------------------------------- */
.tabs { display: flex; background: var(--ink-100); border-radius: var(--r-pill); padding: 4px; position: relative; }
.tabs button {
  flex: 1; border: none; background: transparent; padding: 10px 0; font-weight: 700; font-size: 13px;
  color: var(--ink-500); border-radius: var(--r-pill); cursor: pointer; position: relative; z-index: 2;
  transition: color var(--dur-med);
}
.tabs button.active { color: var(--navy-900); }
.tabs .tab-thumb {
  position: absolute; top: 4px; bottom: 4px; border-radius: var(--r-pill); background: var(--white);
  box-shadow: var(--shadow-sm); transition: all var(--dur-med) var(--ease-spring); z-index: 1;
}
.tab-panel { display: none; animation: fade-up var(--dur-med) var(--ease-out) both; }
.tab-panel.active { display: block; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------------------------------------------------------------------
   Sliders (premium / coverage calculator)
   ------------------------------------------------------------------- */
.slider-wrap { margin: 18px 0; }
input[type="range"] {
  -webkit-appearance: none; width: 100%; height: 6px; border-radius: var(--r-pill);
  background: var(--ink-100); outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--grad-amber); box-shadow: var(--shadow-amber); cursor: pointer;
  border: 3px solid var(--white); transition: transform var(--dur-fast) var(--ease-spring);
}
input[type="range"]::-webkit-slider-thumb:active { transform: scale(1.2); }
input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%; background: var(--grad-amber);
  box-shadow: var(--shadow-amber); cursor: pointer; border: 3px solid var(--white);
}

/* ---------------------------------------------------------------------
   Skeleton loaders
   ------------------------------------------------------------------- */
.skel { background: linear-gradient(90deg, var(--ink-100) 25%, #F1EFE6 37%, var(--ink-100) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r-sm); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------------------------------------------------------------
   Toast
   ------------------------------------------------------------------- */
#toast-region { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 200; width: calc(100% - 40px); max-width: 440px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  background: var(--navy-900); color: var(--white); padding: 13px 16px; border-radius: var(--r-md);
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px;
  animation: toast-in var(--dur-med) var(--ease-spring) both;
}
.toast.success { background: var(--success-600); }
.toast.error { background: var(--danger-600); }
.toast.hide { animation: toast-out var(--dur-fast) var(--ease-out) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px) scale(.96); } }

/* ---------------------------------------------------------------------
   Bottom sheet / modal
   ------------------------------------------------------------------- */
.sheet-overlay {
  position: fixed; inset: 0; background: rgba(14,32,58,.45); z-index: 90; opacity: 0;
  pointer-events: none; transition: opacity var(--dur-med);
}
.sheet-overlay.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%);
  width: 100%; max-width: var(--max-w); background: var(--white); border-radius: 26px 26px 0 0;
  padding: 10px 22px 26px; z-index: 91; transition: transform var(--dur-med) var(--ease-spring);
  max-height: 82vh; overflow-y: auto;
}
.sheet-overlay.open .sheet { transform: translate(-50%, 0); }
.sheet .sheet-handle { width: 40px; height: 4px; background: var(--ink-100); border-radius: var(--r-pill); margin: 0 auto 16px; }

/* ---------------------------------------------------------------------
   Splash screen
   ------------------------------------------------------------------- */
.splash {
  position: fixed; inset: 0; background: var(--grad-hero); z-index: 999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  animation: splash-out var(--dur-fast) ease 1.9s forwards;
}
.splash .mark { width: 92px; height: 92px; animation: mark-pop 900ms var(--ease-spring) both; }
.splash .word { font-family: var(--font-display); color: var(--white); font-weight: 700; font-size: 24px; opacity: 0; animation: word-in var(--dur-med) var(--ease-out) 500ms forwards; }
.splash .tag { color: var(--amber-400); font-size: 13px; font-weight: 600; opacity: 0; animation: word-in var(--dur-med) var(--ease-out) 750ms forwards; }
@keyframes mark-pop { from { opacity: 0; transform: scale(.5) rotate(-8deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes word-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }

/* ---------------------------------------------------------------------
   Onboarding carousel
   ------------------------------------------------------------------- */
.onboard-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0; -ms-overflow-style: none; scrollbar-width: none; }
.onboard-track::-webkit-scrollbar { display: none; }
.onboard-slide { flex: 0 0 100%; scroll-snap-align: center; text-align: center; padding: 10px 6px 0; }
.onboard-slide .illus { width: 100%; max-width: 260px; margin: 0 auto 26px; }
.onboard-dots { display: flex; gap: 7px; justify-content: center; margin: 22px 0 26px; }
.onboard-dots span { width: 7px; height: 7px; border-radius: var(--r-pill); background: var(--ink-100); transition: all var(--dur-med) var(--ease-spring); }
.onboard-dots span.active { width: 22px; background: var(--grad-amber); }

/* ---------------------------------------------------------------------
   Success burst (loan/insurance submitted)
   ------------------------------------------------------------------- */
.success-check {
  width: 84px; height: 84px; border-radius: 50%; background: var(--success-100); display: grid; place-items: center;
  margin: 0 auto 18px; position: relative;
}
.success-check svg { width: 40px; height: 40px; stroke: var(--success-600); }
.success-check::before {
  content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 3px solid var(--success-100);
  animation: burst 900ms var(--ease-out) both;
}
@keyframes burst { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.success-check .tick { stroke-dasharray: 48; stroke-dashoffset: 48; animation: draw-tick 500ms var(--ease-out) 200ms forwards; }
@keyframes draw-tick { to { stroke-dashoffset: 0; } }

/* ---------------------------------------------------------------------
   Animated counters
   ------------------------------------------------------------------- */
.counter { font-family: var(--font-display); font-weight: 700; }

/* ---------------------------------------------------------------------
   Misc utilities
   ------------------------------------------------------------------- */
.mt-0{margin-top:0} .mt-1{margin-top:8px} .mt-2{margin-top:16px} .mt-3{margin-top:24px}
.mb-0{margin-bottom:0} .mb-1{margin-bottom:8px} .mb-2{margin-bottom:16px} .mb-3{margin-bottom:24px}
.flex{display:flex} .items-center{align-items:center} .justify-between{justify-content:space-between}
.gap-1{gap:8px} .gap-2{gap:12px}
.text-center{text-align:center}
.text-sm{font-size:12.5px} .text-muted{color:var(--ink-500)}
.section-title{ display:flex; align-items:center; justify-content:space-between; margin: 26px 0 12px; }
.section-title h3{ font-size:16px; color:var(--navy-900); margin:0; font-family: var(--font-display); }
.section-title a{ font-size:12.5px; font-weight:700; }
.empty-state{ text-align:center; padding: 40px 16px; color: var(--ink-500); }
.empty-state .emoji{ font-size: 40px; margin-bottom: 10px; }
.divider{ height:1px; background: var(--ink-100); margin: 18px 0; border:none; }

.auth-wrap{ padding: 30px 4px 10px; }
.auth-logo{ width:56px; height:56px; margin-bottom: 18px; }
.link-row{ text-align:center; margin-top: 18px; font-size: 13.5px; color: var(--ink-500); }
.link-row a{ font-weight: 700; }

.kyc-banner{
  display:flex; align-items:center; gap:12px; background: var(--blue-100); border-radius: var(--r-md);
  padding: 13px 14px; margin-bottom: 18px;
}
.kyc-banner .kyc-icon{ font-size: 20px; }
.kyc-banner strong{ display:block; font-size:13px; color: var(--navy-900); }
.kyc-banner span{ font-size:12px; color: var(--ink-700); }

.mascot-chip{
  display:flex; gap:10px; align-items:flex-start; background: var(--amber-100); border-radius: var(--r-md);
  padding: 12px 14px; margin: 16px 0;
}
.mascot-chip .lamp{ font-size:20px; filter: drop-shadow(0 0 6px rgba(246,168,28,.7)); animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 0%,100%{ filter: drop-shadow(0 0 4px rgba(246,168,28,.5)); } 50%{ filter: drop-shadow(0 0 10px rgba(246,168,28,.9)); } }
.mascot-chip p{ margin:0; font-size:12.5px; color: var(--ink-700); }

.calendar-grid{ display:grid; grid-template-columns: repeat(7,1fr); gap:6px; }
.calendar-grid .cal-cell{ aspect-ratio:1; display:grid; place-items:center; border-radius:10px; font-size:11.5px; font-weight:700; background: var(--white); color:var(--ink-500); border:1px solid var(--ink-100); }
.calendar-grid .cal-cell.paid{ background: var(--success-100); color: var(--success-600); border-color: transparent; }
.calendar-grid .cal-cell.due{ background: var(--amber-100); color: var(--amber-600); border-color: transparent; }
.calendar-grid .cal-cell.late{ background: var(--danger-100); color: var(--danger-600); border-color: transparent; }

.chat-bubble{ max-width: 82%; padding: 11px 14px; border-radius: 16px; font-size:13.5px; margin-bottom:10px; line-height:1.45; }
.chat-bubble.bot{ background: var(--white); border:1px solid var(--ink-100); border-bottom-left-radius:4px; }
.chat-bubble.user{ background: var(--navy-900); color:var(--white); margin-left:auto; border-bottom-right-radius:4px; }
