/* ======================================================
   DFSPL Loans PWA — Premium Dark Theme
   Delhivery Lava Red on deep-black canvas
   ====================================================== */

:root {
  /* Brand */
  --brand: #FF4A33;            /* Slightly brightened Lava Red for dark BG */
  --brand-2: #FF6A56;           /* hover/light variant */
  --brand-deep: #C9301E;
  --brand-glow: rgba(255, 74, 51, 0.32);
  --brand-soft: rgba(255, 74, 51, 0.10);
  --brand-line: rgba(255, 74, 51, 0.25);

  /* Surfaces (dark) */
  --bg:        #07070A;          /* page */
  --bg-2:      #0B0B0F;          /* device screen */
  --surface:   #111116;          /* card */
  --surface-2: #16161C;          /* elevated card */
  --surface-3: #1C1C24;          /* segmented bg */
  --overlay:   rgba(255,255,255,0.04);

  /* Text */
  --text:      #F5F5F7;
  --text-2:    #D6D6DC;
  --muted:     #9A9AA6;
  --dim:       #6F6F7B;

  /* Lines */
  --line:      rgba(255,255,255,0.07);
  --line-2:    rgba(255,255,255,0.12);
  --line-3:    rgba(255,255,255,0.18);

  /* Semantic */
  --success: #34D399;
  --success-soft: rgba(52,211,153,.14);
  --warning: #F59E0B;
  --warning-soft: rgba(245,158,11,.14);
  --danger:  #F87171;
  --info:    #60A5FA;

  --radius:    14px;
  --radius-lg: 20px;
  --radius-sm: 10px;
  --radius-xl: 26px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow:    0 12px 28px rgba(0,0,0,.45);
  --shadow-lg: 0 30px 80px rgba(0,0,0,.55);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: #050507; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-size: 15px;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(255,74,51,.06), transparent 60%),
    radial-gradient(900px 500px at 100% 110%, rgba(80,80,120,.06), transparent 60%),
    #050507;
}

/* selection */
::selection { background: var(--brand); color: #fff; }

/* ---------- Device frame (desktop demo) ---------- */
.device-frame {
  width: 100%;
  max-width: 414px;
  height: 100vh;
  max-height: 880px;
  background: linear-gradient(180deg, #1B1B22 0%, #0E0E13 100%);
  border-radius: 48px;
  padding: 10px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 0 0 1px rgba(0,0,0,0.6),
    var(--shadow-lg);
  position: relative;
}
.device-frame::before {
  /* dynamic island */
  content: '';
  position: absolute;
  top: 18px; left: 50%; transform: translateX(-50%);
  width: 108px; height: 30px;
  background: #000;
  border-radius: 16px;
  z-index: 10;
}
.device-screen {
  background: var(--bg-2);
  border-radius: 38px;
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
@media (max-width: 480px) {
  body { background: var(--bg); padding: 0; }
  .device-frame { max-width: 100%; height: 100vh; max-height: none; border-radius: 0; padding: 0; box-shadow: none; }
  .device-frame::before { display: none; }
  .device-screen { border-radius: 0; }
}

/* ---------- Faux status bar (desktop demo only) ---------- */
.status-bar {
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px 0 30px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
}
.status-icons { display: inline-flex; align-items: center; gap: 5px; color: var(--text); }
.battery { width: 24px; height: 11px; border: 1px solid var(--text); border-radius: 3px; position: relative; padding: 1px; opacity: .9; }
.battery::after { content: ''; position: absolute; right: -3px; top: 3px; width: 2px; height: 4px; background: var(--text); border-radius: 0 1px 1px 0; }
.battery-level { height: 100%; width: 78%; background: var(--text); border-radius: 1px; }
@media (max-width: 480px) { .status-bar { display: none; } }

/* ---------- App root ---------- */
.app-root {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background:
    radial-gradient(620px 320px at 110% -10%, rgba(255,74,51,.10), transparent 60%),
    radial-gradient(520px 260px at -20% 100%, rgba(120,90,255,.05), transparent 60%);
}
.app-root::-webkit-scrollbar { display: none; }

/* ---------- Screen container & transitions ---------- */
.screen {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  animation: screenIn .32s cubic-bezier(.2,.7,.2,1);
}
@keyframes screenIn {
  from { opacity: 0; transform: translateX(18px); }
  to   { opacity: 1; transform: translateX(0); }
}
.screen.back { animation-name: screenInBack; }
@keyframes screenInBack {
  from { opacity: 0; transform: translateX(-18px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---------- App header ---------- */
.app-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 6px;
  background: transparent;
}
.app-header .icon-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text);
  cursor: pointer;
  transition: background .15s, transform .12s, border-color .15s;
}
.app-header .icon-btn:hover { background: var(--surface-2); border-color: var(--line-2); }
.app-header .icon-btn:active { transform: scale(.96); }
.app-header h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: .01em;
}

.screen-body {
  padding: 18px 22px 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.screen-foot {
  padding: 16px 22px calc(22px + var(--safe-bottom));
  background: linear-gradient(to top, var(--bg-2) 55%, rgba(11,11,15,0));
  position: sticky;
  bottom: 0;
  z-index: 5;
}

/* ---------- Typography ---------- */
.eyebrow {
  font-size: 11px; font-weight: 700; color: var(--brand);
  letter-spacing: .18em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
}
h2.title {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 28px; line-height: 1.12; font-weight: 800;
  color: var(--text); margin: 8px 0 8px; letter-spacing: -.025em;
}
h2.title.lg { font-size: 32px; }
p.lead { color: var(--muted); margin: 0 0 22px; font-size: 14.5px; line-height: 1.55; max-width: 32ch; }

/* ---------- Buttons ---------- */
.btn {
  border: 0;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 16px 18px;
  border-radius: 16px;
  width: 100%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .12s, background .15s, box-shadow .2s, opacity .15s, border-color .15s;
  letter-spacing: -.005em;
}
.btn-primary {
  background: linear-gradient(180deg, #FF5C46 0%, #ED3F28 100%);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255,255,255,.18) inset,
    0 -1px 0 rgba(0,0,0,.35) inset,
    0 10px 26px rgba(255,74,51,.32),
    0 0 0 1px rgba(255,255,255,.04) inset;
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #FF6957 0%, #F5462C 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.22) inset,
    0 -1px 0 rgba(0,0,0,.35) inset,
    0 14px 32px rgba(255,74,51,.42);
}
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-2);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset;
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--line-3); }
.btn-link { background: transparent; color: var(--brand); width: auto; padding: 6px 4px; }
.btn:disabled {
  opacity: .35; cursor: not-allowed;
  box-shadow: none; background: var(--surface-2); color: var(--muted);
}

/* ---------- Inputs ---------- */
.field { margin-bottom: 14px; display: block; }
.field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--muted); margin: 0 0 8px 2px;
  letter-spacing: .04em; text-transform: uppercase;
}
.input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: 14px;
  padding: 0 16px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input-wrap:focus-within {
  border-color: var(--brand);
  background: var(--surface-2);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.input-wrap.error { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(248,113,113,.14); }
.input-wrap .prefix { font-weight: 600; color: var(--text-2); margin-right: 10px; font-size: 15px; }
.input-wrap .suffix { color: var(--muted); margin-left: 10px; font-size: 13px; }
.input-wrap input, .input-wrap select, .input-wrap textarea {
  flex: 1;
  border: 0;
  outline: none;
  padding: 16px 0;
  font-size: 16px;
  background: transparent;
  font-family: inherit;
  color: var(--text);
  width: 100%;
  min-width: 0;
}
.input-wrap input::placeholder { color: var(--dim); }
.help { font-size: 12px; color: var(--muted); margin: 8px 4px 0; line-height: 1.5; }
.help a { color: var(--brand); text-decoration: none; }
.help.error { color: var(--danger); }

/* segmented control */
.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface-3); border-radius: 14px; padding: 5px;
  border: 1px solid var(--line);
}
.segmented button {
  border: 0; background: transparent; padding: 11px 12px; font-weight: 600;
  color: var(--muted); border-radius: 10px; cursor: pointer; font-family: inherit; font-size: 13px;
  letter-spacing: -.005em;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .18s, color .18s, box-shadow .18s;
}
.segmented button.active {
  background: linear-gradient(180deg, #2A2A35 0%, #1F1F28 100%);
  color: var(--text);
  box-shadow:
    0 1px 0 rgba(255,255,255,.08) inset,
    0 6px 14px rgba(0,0,0,.35);
}

/* ---------- OTP boxes ---------- */
.otp-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 10px 0 4px; }
.otp-row input {
  /* prevent iOS/Android from zooming in on focus, and ensure consistent sizing */
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 0;
  height: 58px;
  padding: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  border-radius: 14px;
  font-family: 'Manrope', inherit;
  color: var(--text);
  /* No transform on focus — keeps the cell perfectly stable */
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.otp-row input:focus {
  outline: 0;
  border-color: var(--brand);
  background: var(--surface-2);
  /* Inset-only ring so the box doesn't appear to grow or overlap neighbors */
  box-shadow: 0 0 0 1px var(--brand) inset;
}
.otp-row input.filled { border-color: var(--line-3); background: var(--surface-2); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 1px 2px rgba(0,0,0,.4);
}
.card.tappable { cursor: pointer; transition: border-color .15s, transform .12s, background .15s; }
.card.tappable:hover { border-color: var(--line-2); background: var(--surface-2); }
.card.tappable:active { transform: scale(.99); }
.card.selected {
  border-color: var(--brand);
  background: linear-gradient(180deg, rgba(255,74,51,.08), rgba(255,74,51,.02));
  box-shadow: 0 0 0 1px var(--brand) inset, 0 12px 30px rgba(255,74,51,.15);
}

.loan-card { display: flex; gap: 14px; align-items: center; }
.loan-card .ic {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,74,51,.18), rgba(255,74,51,.06));
  color: var(--brand);
  border: 1px solid var(--brand-line);
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 52px;
  box-shadow: 0 6px 14px rgba(255,74,51,.18), 0 1px 0 rgba(255,255,255,.06) inset;
}
.loan-card .body { flex: 1; }
.loan-card .body h4 {
  margin: 0 0 4px; font-size: 15.5px; font-weight: 700; color: var(--text);
  letter-spacing: -.01em;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.loan-card .body p { margin: 0; color: var(--muted); font-size: 13px; }
.loan-card .chev { color: var(--dim); transition: transform .15s, color .15s; }
.loan-card.tappable:hover .chev { color: var(--text); transform: translateX(2px); }
.loan-card.selected .chev { color: var(--brand); }
.loan-card.disabled { opacity: .5; cursor: not-allowed; }
.loan-card.disabled:hover { border-color: var(--line); background: var(--surface); }
.loan-card.disabled .ic {
  background: var(--surface-3); color: var(--muted); border-color: var(--line-2);
  box-shadow: none;
}

/* badge */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
  letter-spacing: .06em; text-transform: uppercase;
}
.badge.brand { background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-line); }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.muted { background: var(--surface-3); color: var(--muted); border: 1px solid var(--line); }
.badge.warn { background: var(--warning-soft); color: var(--warning); }

/* ---------- Stepper / progress ---------- */
.progress {
  display: flex; align-items: center; gap: 6px; padding: 6px 22px 0;
}
.progress .seg { flex: 1; height: 3px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress .seg .fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--brand) 0%, var(--brand-2) 100%); transition: width .4s ease; }
.progress .seg.done .fill { width: 100%; }
.progress .seg.active .fill { width: 60%; }

/* ---------- Splash / Welcome ---------- */
.splash {
  background:
    radial-gradient(900px 460px at 90% -10%, rgba(255,74,51,.22), transparent 60%),
    radial-gradient(600px 360px at -10% 110%, rgba(120,80,255,.08), transparent 60%),
    var(--bg-2);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 26px calc(28px + var(--safe-bottom));
  position: relative;
  overflow: hidden;
}
.splash::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.045) 1px, transparent 0);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
  opacity: .5;
  pointer-events: none;
}
.splash > * { position: relative; z-index: 1; }

.splash .hero-mark {
  width: 84px; height: 84px; border-radius: 22px;
  background: linear-gradient(180deg, #FF5C46 0%, #C9301E 100%);
  position: relative;
  box-shadow:
    0 1px 0 rgba(255,255,255,.2) inset,
    0 -1px 0 rgba(0,0,0,.3) inset,
    0 24px 40px rgba(255,74,51,.42),
    0 0 0 1px rgba(255,255,255,.05);
  margin-bottom: 28px;
}
.splash .hero-mark::before, .splash .hero-mark::after {
  content: ''; position: absolute; background: #fff; border-radius: 5px;
}
.splash .hero-mark::before { left: 14px; top: 14px; width: 22px; height: 22px; box-shadow: 0 1px 1px rgba(0,0,0,.1); }
.splash .hero-mark::after  { right: 14px; bottom: 14px; width: 22px; height: 22px; }
.splash .hero-mark .corner {
  position: absolute; width: 9px; height: 9px; border-radius: 2px;
  background: rgba(255,255,255,.4);
}
.splash .hero-mark .corner.c1 { right: 14px; top: 14px; }
.splash .hero-mark .corner.c2 { left: 14px; bottom: 14px; }

.splash h1 {
  font-family: 'Manrope', sans-serif;
  font-size: 36px; line-height: 1.04; font-weight: 800;
  color: var(--text); letter-spacing: -.03em; margin: 0 0 12px;
}
.splash h1 em {
  font-style: normal;
  background: linear-gradient(180deg, #FF7A66 0%, #FF4A33 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.splash p { color: var(--muted); font-size: 15.5px; line-height: 1.55; margin: 0; max-width: 320px; }

.splash .perks { display: flex; flex-direction: column; gap: 12px; margin: 30px 0 0; }
.splash .perks .perk {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--text-2); font-size: 14px; font-weight: 500;
}
.splash .perks .perk .dot {
  width: 28px; height: 28px; border-radius: 9px;
  background: linear-gradient(180deg, rgba(255,74,51,.22), rgba(255,74,51,.08));
  color: var(--brand);
  display:inline-flex; align-items:center; justify-content:center;
  border: 1px solid var(--brand-line);
  box-shadow: 0 4px 10px rgba(255,74,51,.18);
}

/* ---------- Info / list rows ---------- */
.info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.info-row:last-child { border-bottom: 0; }
.info-row .k { color: var(--muted); font-size: 13px; }
.info-row .v { color: var(--text); font-size: 14px; font-weight: 600; text-align: right; }
.info-row .v.mono { font-family: 'Manrope', monospace; letter-spacing: .02em; }

/* ---------- Loader / spinner ---------- */
.spinner {
  width: 22px; height: 22px; border: 2.5px solid rgba(255,255,255,.18); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
.spinner.dark { border-color: var(--line); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

.verify-stage {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 30px 26px;
}
.verify-stage .ring {
  width: 96px; height: 96px; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 50% 40%, var(--brand-soft), transparent 70%), var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--brand);
  margin-bottom: 22px;
  border: 1px solid var(--brand-line);
  box-shadow: 0 0 0 6px rgba(255,74,51,.06), 0 14px 32px rgba(255,74,51,.18);
}
.verify-stage .ring.success {
  background: radial-gradient(circle at 50% 40%, var(--success-soft), transparent 70%), var(--surface-2);
  color: var(--success);
  border-color: rgba(52,211,153,.3);
  box-shadow: 0 0 0 6px rgba(52,211,153,.06), 0 14px 32px rgba(52,211,153,.16);
}
.verify-stage .ring.spin::before {
  content: ''; position: absolute; inset: -8px; border-radius: 50%;
  border: 2.5px solid transparent; border-top-color: var(--brand);
  animation: spin 1.1s linear infinite;
}
.verify-stage .ring.success.spin::before { border-top-color: var(--success); }
.verify-stage h3 {
  font-family: 'Manrope', sans-serif; font-size: 22px; font-weight: 800;
  color: var(--text); margin: 0 0 8px; letter-spacing: -.015em;
}
.verify-stage p { color: var(--muted); margin: 0 0 22px; max-width: 290px; line-height: 1.55; font-size: 14.5px; }
.verify-stage .pill {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}

.check-anim path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: dash .5s .12s ease forwards; }
@keyframes dash { to { stroke-dashoffset: 0; } }

/* ---------- Eligibility ---------- */
.amount-display { text-align: center; padding: 24px 0 14px; }
.amount-display .currency {
  font-size: 18px; color: var(--muted); font-weight: 600; vertical-align: top; margin-right: 4px;
  position: relative; top: 10px;
}
.amount-display .value {
  font-family: 'Manrope', sans-serif; font-size: 48px; font-weight: 800;
  color: var(--text); letter-spacing: -.03em;
  background: linear-gradient(180deg, #FFFFFF 30%, #B8B8C2 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.amount-display .cap { display: block; font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.slider-wrap { padding: 14px 4px 0; }
.range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 999px;
  background: linear-gradient(to right,
      var(--brand) 0%, var(--brand-2) var(--pct,50%),
      var(--surface-3) var(--pct,50%), var(--surface-3) 100%);
  outline: none;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
  box-shadow: 0 0 0 4px rgba(255,74,51,.18), 0 6px 14px rgba(255,74,51,.4);
  cursor: pointer;
}
.range::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  border: 3px solid var(--brand); box-shadow: 0 0 0 4px rgba(255,74,51,.18); cursor: pointer;
}
.range-meta {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted); margin-top: 10px;
  font-weight: 500;
}

.emi-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-top: 18px;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset;
}

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip {
  border: 1px solid var(--line-2); background: var(--surface);
  padding: 10px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.chip:hover { border-color: var(--line-3); background: var(--surface-2); }
.chip.active {
  border-color: var(--brand);
  background: linear-gradient(180deg, rgba(255,74,51,.16), rgba(255,74,51,.06));
  color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand) inset, 0 6px 14px rgba(255,74,51,.16);
}

.toast {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 100px;
  background: rgba(28,28,36,.95);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--text); padding: 11px 18px;
  border-radius: 14px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--line-2);
  opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s;
  box-shadow: var(--shadow);
  max-width: 80%;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }


/* ---------- Status tracker stepper ---------- */
.tracker { padding: 8px 0 0; }
.tracker .step { display: flex; gap: 14px; align-items: flex-start; position: relative; padding-bottom: 22px; }
.tracker .step:last-child { padding-bottom: 0; }
.tracker .step::before {
  content: ''; position: absolute; left: 14px; top: 30px; bottom: -8px; width: 2px;
  background: var(--line-2);
}
.tracker .step:last-child::before { display: none; }
.tracker .step .dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line-2);
  flex: 0 0 30px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--dim);
}
.tracker .step.done .dot {
  background: var(--success); border-color: var(--success); color: #0F1A14;
  box-shadow: 0 0 0 4px var(--success-soft);
}
.tracker .step.done::before { background: var(--success); }
.tracker .step.active .dot {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 0 0 4px var(--brand-soft), 0 8px 16px rgba(255,74,51,.35);
}
.tracker .step .label { font-size: 14.5px; font-weight: 600; color: var(--text); margin-bottom: 2px; letter-spacing: -.005em; }
.tracker .step .sub { font-size: 12.5px; color: var(--muted); }
.tracker .step.pending .label { color: var(--muted); font-weight: 500; }

/* ---------- Success hero ---------- */
.success-hero {
  background:
    radial-gradient(700px 280px at 50% -10%, rgba(255,74,51,.22), transparent 60%),
    linear-gradient(180deg, #14141B 0%, #0B0B0F 100%);
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding: 32px 26px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.success-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 40%, transparent 100%);
  pointer-events: none;
}
.success-hero > * { position: relative; }
.success-hero .check {
  width: 68px; height: 68px; border-radius: 50%;
  background: linear-gradient(180deg, rgba(52,211,153,.22), rgba(52,211,153,.05));
  border: 1px solid rgba(52,211,153,.32);
  color: var(--success);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 0 0 6px rgba(52,211,153,.06), 0 16px 32px rgba(52,211,153,.18);
}
.success-hero h2 {
  font-family: 'Manrope', sans-serif; font-size: 24px; font-weight: 800;
  margin: 0 0 6px; letter-spacing: -.02em;
}
.success-hero p { margin: 0; color: var(--muted); font-size: 14px; }
.ref-pill {
  display: inline-flex; gap: 8px; align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-2);
  padding: 8px 14px; border-radius: 999px;
  font-size: 12.5px; margin-top: 14px;
  font-weight: 600;
  color: var(--text-2);
  font-family: 'Manrope', monospace;
}
.ref-pill .lbl { color: var(--muted); font-family: 'Inter', sans-serif; }

/* ---------- Util classes ---------- */
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.center { text-align: center; }
.mt-auto { margin-top: auto; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--muted); }
.hide { display: none !important; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.kv-card { padding: 4px 18px; }

.callout {
  background: linear-gradient(180deg, rgba(255,74,51,.10), rgba(255,74,51,.03));
  border: 1px solid var(--brand-line);
  border-radius: 14px;
  padding: 14px;
  display: flex; gap: 12px;
}
.callout .ic { color: var(--brand); flex: 0 0 18px; padding-top: 1px; }
.callout .tx { font-size: 13px; color: var(--text-2); line-height: 1.55; }
.callout .tx strong { color: var(--text); font-weight: 600; }

.demo-hint {
  margin-top: 14px;
  background: rgba(245,158,11,.08);
  border: 1px dashed rgba(245,158,11,.4);
  border-radius: 12px;
  padding: 11px 14px;
  color: #FCD34D;
  font-size: 12.5px;
  display: flex; align-items: center; gap: 8px;
}
.demo-hint strong { color: #FDE68A; font-weight: 700; font-family: 'Manrope', monospace; }

/* ---------- Info row (used in summary cards) ---------- */
.info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.info-row:last-child { border-bottom: 0; }
.info-row .k { color: var(--muted); font-size: 13px; }
.info-row .v { color: var(--text); font-size: 14px; font-weight: 600; text-align: right; }
.info-row .v.mono { font-family: 'Manrope', monospace; letter-spacing: .02em; }


/* ---------- Cards (generic) ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 1px 2px rgba(0,0,0,.4);
}
.card.tappable { cursor: pointer; transition: border-color .15s, transform .12s, background .15s; }
.card.tappable:hover { border-color: var(--line-2); background: var(--surface-2); }
.card.tappable:active { transform: scale(.99); }
.card.selected {
  border-color: var(--brand);
  background: linear-gradient(180deg, rgba(255,74,51,.08), rgba(255,74,51,.02));
  box-shadow: 0 0 0 1px var(--brand) inset, 0 12px 30px rgba(255,74,51,.15);
}

.loan-card { display: flex; gap: 14px; align-items: center; }
.loan-card .ic {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,74,51,.18), rgba(255,74,51,.06));
  color: var(--brand);
  border: 1px solid var(--brand-line);
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 52px;
  box-shadow: 0 6px 14px rgba(255,74,51,.18), 0 1px 0 rgba(255,255,255,.06) inset;
}
.loan-card .body { flex: 1; }
.loan-card .body h4 {
  margin: 0 0 4px; font-size: 15.5px; font-weight: 700; color: var(--text);
  letter-spacing: -.01em;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.loan-card .body p { margin: 0; color: var(--muted); font-size: 13px; }
.loan-card .chev { color: var(--dim); transition: transform .15s, color .15s; }
.loan-card.tappable:hover .chev { color: var(--text); transform: translateX(2px); }
.loan-card.selected .chev { color: var(--brand); }
.loan-card.disabled { opacity: .5; cursor: not-allowed; }
.loan-card.disabled:hover { border-color: var(--line); background: var(--surface); }
.loan-card.disabled .ic {
  background: var(--surface-3); color: var(--muted); border-color: var(--line-2);
  box-shadow: none;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
  letter-spacing: .06em; text-transform: uppercase;
}
.badge.brand { background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-line); }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.muted { background: var(--surface-3); color: var(--muted); border: 1px solid var(--line); }
.badge.warn { background: var(--warning-soft); color: var(--warning); }

/* ---------- Inputs ---------- */
.field { margin-bottom: 14px; display: block; }
.field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--muted); margin: 0 0 8px 2px;
  letter-spacing: .04em; text-transform: uppercase;
}
.input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: 14px;
  padding: 0 16px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input-wrap:focus-within {
  border-color: var(--brand);
  background: var(--surface-2);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.input-wrap.error { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(248,113,113,.14); }
.input-wrap .prefix { font-weight: 600; color: var(--text-2); margin-right: 10px; font-size: 15px; }
.input-wrap .suffix { color: var(--muted); margin-left: 10px; font-size: 13px; }
.input-wrap input, .input-wrap select, .input-wrap textarea {
  flex: 1; border: 0; outline: none; padding: 16px 0; font-size: 16px;
  background: transparent; font-family: inherit; color: var(--text);
  width: 100%; min-width: 0;
}
.input-wrap input::placeholder { color: var(--dim); }
.help { font-size: 12px; color: var(--muted); margin: 8px 4px 0; line-height: 1.5; }
.help a { color: var(--brand); text-decoration: none; }
.help.error { color: var(--danger); }

.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface-3); border-radius: 14px; padding: 5px;
  border: 1px solid var(--line);
}
.segmented button {
  border: 0; background: transparent; padding: 11px 12px; font-weight: 600;
  color: var(--muted); border-radius: 10px; cursor: pointer; font-family: inherit; font-size: 13px;
  letter-spacing: -.005em;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .18s, color .18s, box-shadow .18s;
}
.segmented button.active {
  background: linear-gradient(180deg, #2A2A35 0%, #1F1F28 100%);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 6px 14px rgba(0,0,0,.35);
}

/* ---------- OTP boxes ---------- */
.otp-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 10px 0 4px; }
.otp-row input {
  -webkit-appearance: none; appearance: none;
  width: 100%; min-width: 0; height: 58px; padding: 0;
  text-align: center; font-size: 22px; font-weight: 700;
  border: 1.5px solid var(--line-2); background: var(--surface);
  border-radius: 14px; font-family: 'Manrope', inherit; color: var(--text);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.otp-row input:focus {
  outline: 0; border-color: var(--brand); background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--brand) inset;
}
.otp-row input.filled { border-color: var(--line-3); background: var(--surface-2); }

/* ---------- Splash ---------- */
.splash {
  background:
    radial-gradient(900px 460px at 90% -10%, rgba(255,74,51,.22), transparent 60%),
    radial-gradient(600px 360px at -10% 110%, rgba(120,80,255,.08), transparent 60%),
    var(--bg-2);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 26px calc(28px + var(--safe-bottom));
  position: relative;
  overflow: hidden;
}
.splash::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.045) 1px, transparent 0);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
  opacity: .5;
  pointer-events: none;
}
.splash > * { position: relative; z-index: 1; }

.splash .hero-mark {
  width: 84px; height: 84px; border-radius: 22px;
  background: linear-gradient(180deg, #FF5C46 0%, #C9301E 100%);
  position: relative;
  box-shadow:
    0 1px 0 rgba(255,255,255,.2) inset,
    0 -1px 0 rgba(0,0,0,.3) inset,
    0 24px 40px rgba(255,74,51,.42),
    0 0 0 1px rgba(255,255,255,.05);
  margin-bottom: 28px;
}
.splash .hero-mark::before, .splash .hero-mark::after {
  content: ''; position: absolute; background: #fff; border-radius: 5px;
}
.splash .hero-mark::before { left: 14px; top: 14px; width: 22px; height: 22px; box-shadow: 0 1px 1px rgba(0,0,0,.1); }
.splash .hero-mark::after  { right: 14px; bottom: 14px; width: 22px; height: 22px; }
.splash .hero-mark .corner {
  position: absolute; width: 9px; height: 9px; border-radius: 2px;
  background: rgba(255,255,255,.4);
}
.splash .hero-mark .corner.c1 { right: 14px; top: 14px; }
.splash .hero-mark .corner.c2 { left: 14px; bottom: 14px; }

.splash h1 {
  font-family: 'Manrope', sans-serif;
  font-size: 36px; line-height: 1.04; font-weight: 800;
  color: var(--text); letter-spacing: -.03em; margin: 0 0 12px;
}
.splash h1 em {
  font-style: normal;
  background: linear-gradient(180deg, #FF7A66 0%, #FF4A33 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.splash p { color: var(--muted); font-size: 15.5px; line-height: 1.55; margin: 0; max-width: 320px; }
.splash .perks { display: flex; flex-direction: column; gap: 12px; margin: 30px 0 0; }
.splash .perks .perk { display: inline-flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.splash .perks .perk .dot {
  width: 28px; height: 28px; border-radius: 9px;
  background: linear-gradient(180deg, rgba(255,74,51,.22), rgba(255,74,51,.08));
  color: var(--brand);
  display:inline-flex; align-items:center; justify-content:center;
  border: 1px solid var(--brand-line);
  box-shadow: 0 4px 10px rgba(255,74,51,.18);
}

/* ---------- Progress segments ---------- */
.progress { display: flex; align-items: center; gap: 6px; padding: 6px 22px 0; }
.progress .seg { flex: 1; height: 3px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress .seg .fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--brand) 0%, var(--brand-2) 100%); transition: width .4s ease; }
.progress .seg.done .fill { width: 100%; }
.progress .seg.active .fill { width: 60%; }

/* spinner */
.spinner {
  width: 22px; height: 22px; border: 2.5px solid rgba(255,255,255,.18); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Verify stage shell (rings, ic shown earlier) ---------- */
.verify-stage {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 30px 26px;
}
.verify-stage .ring {
  width: 96px; height: 96px; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 50% 40%, var(--brand-soft), transparent 70%), var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--brand);
  margin-bottom: 22px;
  border: 1px solid var(--brand-line);
  box-shadow: 0 0 0 6px rgba(255,74,51,.06), 0 14px 32px rgba(255,74,51,.18);
}
.verify-stage .ring.success {
  background: radial-gradient(circle at 50% 40%, var(--success-soft), transparent 70%), var(--surface-2);
  color: var(--success);
  border-color: rgba(52,211,153,.3);
  box-shadow: 0 0 0 6px rgba(52,211,153,.06), 0 14px 32px rgba(52,211,153,.16);
}


/* ======================================================
   Tabbed shell — bottom nav for inside pages
   ====================================================== */
.screen.tabbed { padding-bottom: 0; }
.screen.tabbed .screen-body { padding-bottom: 18px; }

.tab-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px 12px calc(10px + var(--safe-bottom));
  background: rgba(11, 11, 15, 0.78);
  backdrop-filter: saturate(150%) blur(22px);
  -webkit-backdrop-filter: saturate(150%) blur(22px);
  border-top: 1px solid var(--line);
}
.tab-bar .tab {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  padding: 9px 4px 7px;
  border: 0; background: transparent;
  font-family: inherit; font-size: 10.5px; font-weight: 600;
  letter-spacing: .02em;
  color: var(--muted);
  cursor: pointer;
  border-radius: 14px;
  transition: color .15s, background .15s, transform .12s;
}
.tab-bar .tab:hover { color: var(--text-2); }
.tab-bar .tab:active { transform: scale(.96); }
.tab-bar .tab .ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  color: var(--dim);
  transition: color .18s, transform .18s;
}
.tab-bar .tab.active { color: var(--brand); }
.tab-bar .tab.active .ic { color: var(--brand); transform: translateY(-1px); }

/* ======================================================
   Home / dashboard
   ====================================================== */
.page-header {
  padding: 22px 22px 4px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.page-header .greeting {
  display: flex; align-items: center; gap: 12px; min-width: 0;
}
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  color: var(--brand);
  font-weight: 800; font-family: 'Manrope', sans-serif; font-size: 15px;
  border: 1px solid var(--line-2);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 6px 12px rgba(0,0,0,.3);
  flex: 0 0 42px;
}
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.greet-text { min-width: 0; }
.greet-text .hi { font-size: 12px; color: var(--muted); margin-bottom: 1px; }
.greet-text .nm { font-family: 'Manrope', sans-serif; font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bell-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2);
  cursor: pointer;
  position: relative;
  flex: 0 0 40px;
}
.bell-btn .dot {
  position: absolute; top: 9px; right: 10px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 2px var(--surface);
}

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 22px 0 10px;
}
.section-head h3 {
  margin: 0; font-family: 'Manrope', sans-serif; font-size: 16px;
  font-weight: 700; color: var(--text); letter-spacing: -.01em;
}
.section-head a {
  font-size: 12.5px; color: var(--brand); font-weight: 600; text-decoration: none;
}

.feature-card {
  position: relative;
  background:
    radial-gradient(500px 220px at 90% -20%, rgba(255,74,51,.22), transparent 60%),
    linear-gradient(180deg, #16161E 0%, #0E0E14 100%);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-xl);
  padding: 18px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 20px 40px rgba(0,0,0,.4);
}
.feature-card::before {
  content: '';
  position: absolute; right: -40px; top: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,74,51,.18) 0%, transparent 60%);
  pointer-events: none;
}
.feature-card .row-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 14px;
}
.feature-card .label {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 12px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
}
.feature-card .label .ic {
  color: var(--brand); width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
}
.feature-card .amt {
  font-family: 'Manrope', sans-serif;
  font-size: 30px; font-weight: 800;
  color: var(--text); letter-spacing: -.025em; margin: 0;
}
.feature-card .amt .cur { font-size: 18px; color: var(--muted); margin-right: 4px; vertical-align: top; position: relative; top: 6px; }
.feature-card .meta { display: flex; gap: 14px; margin: 10px 0 14px; font-size: 12.5px; color: var(--muted); }
.feature-card .meta strong { color: var(--text-2); font-weight: 600; }
.feature-card .actions { display: flex; gap: 10px; margin-top: 4px; }
.feature-card .actions .btn { width: auto; padding: 11px 16px; font-size: 13.5px; }

.qa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.qa-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .12s;
}
.qa-tile:hover { background: var(--surface-2); border-color: var(--line-2); }
.qa-tile:active { transform: scale(.97); }
.qa-tile .ic {
  width: 38px; height: 38px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(255,74,51,.16), rgba(255,74,51,.04));
  color: var(--brand);
  border: 1px solid var(--brand-line);
}
.qa-tile .lbl { font-size: 11.5px; font-weight: 600; color: var(--text-2); text-align: center; line-height: 1.2; }

.offer-card {
  position: relative;
  background:
    radial-gradient(600px 200px at 110% 50%, rgba(120,90,255,.10), transparent 60%),
    linear-gradient(135deg, #1A1422 0%, #100E18 100%);
  border: 1px solid rgba(167,139,250,.20);
  border-radius: var(--radius-xl);
  padding: 18px;
  overflow: hidden;
}
.offer-card .badge.purple {
  background: rgba(167,139,250,.14);
  color: #C4B5FD;
  border: 1px solid rgba(167,139,250,.28);
  margin-bottom: 10px;
}
.offer-card h4 {
  margin: 0 0 4px; font-family: 'Manrope', sans-serif;
  font-size: 17px; font-weight: 800; color: var(--text); letter-spacing: -.015em;
}
.offer-card p { margin: 0 0 14px; font-size: 13px; color: var(--muted); line-height: 1.5; }

.activity-list { display: flex; flex-direction: column; }
.activity-row {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.activity-row:last-child { border-bottom: 0; }
.activity-row .ic {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2);
  background: var(--surface-3);
  border: 1px solid var(--line);
}
.activity-row .ic.brand { color: var(--brand); background: var(--brand-soft); border-color: var(--brand-line); }
.activity-row .ic.success { color: var(--success); background: var(--success-soft); border-color: rgba(52,211,153,.3); }
.activity-row .txt { flex: 1; min-width: 0; }
.activity-row .txt .ttl { font-size: 13.5px; color: var(--text); font-weight: 600; }
.activity-row .txt .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.activity-row .when { font-size: 11.5px; color: var(--dim); flex: 0 0 auto; }


/* ======================================================
   Applications page
   ====================================================== */
.filter-chips { display: flex; gap: 8px; padding: 4px 0 12px; overflow-x: auto; }
.filter-chip {
  border: 1px solid var(--line-2); background: var(--surface);
  padding: 8px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.filter-chip.active {
  border-color: var(--text); background: var(--text); color: var(--bg);
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.app-card:hover { border-color: var(--line-2); background: var(--surface-2); }
.app-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.app-card .ttl { display: flex; align-items: center; gap: 10px; }
.app-card .ic {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,74,51,.16), rgba(255,74,51,.04));
  color: var(--brand);
  border: 1px solid var(--brand-line);
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 38px;
}
.app-card .ic.muted { background: var(--surface-3); color: var(--muted); border-color: var(--line); }
.app-card h4 { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--text); letter-spacing: -.005em; }
.app-card .ref { font-size: 11.5px; color: var(--muted); margin-top: 2px; font-family: 'Manrope', monospace; }
.app-card .meta-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); padding-top: 10px; border-top: 1px dashed var(--line); }
.app-card .meta-row .v { color: var(--text-2); font-weight: 600; font-family: 'Manrope', monospace; }

.empty {
  text-align: center; padding: 40px 24px;
  display: flex; flex-direction: column; align-items: center;
}
.empty .ic {
  width: 64px; height: 64px; border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted);
  margin-bottom: 14px;
}
.empty h4 { margin: 0 0 4px; font-size: 15px; color: var(--text); font-weight: 700; }
.empty p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; max-width: 260px; }

/* ======================================================
   Profile page
   ====================================================== */
.profile-hero {
  text-align: center;
  padding: 26px 22px 18px;
  background: radial-gradient(500px 200px at 50% -20%, rgba(255,74,51,.16), transparent 60%);
}
.profile-hero .avatar { margin: 0 auto 12px; }
.profile-hero h2 {
  font-family: 'Manrope', sans-serif; font-size: 19px; font-weight: 800;
  margin: 0 0 4px; color: var(--text); letter-spacing: -.015em;
}
.profile-hero .sub { color: var(--muted); font-size: 13px; }
.profile-hero .sub .dot { display: inline-block; width: 3px; height: 3px; background: var(--dim); border-radius: 50%; margin: 0 7px; vertical-align: middle; }

.list-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.list-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--surface-2); }
.list-row .ic {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2);
  flex: 0 0 36px;
}
.list-row .body { flex: 1; min-width: 0; }
.list-row .body .ttl { font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: -.005em; }
.list-row .body .sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.list-row .end { color: var(--dim); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.list-row.danger .body .ttl { color: var(--danger); }
.list-row.danger .ic { color: var(--danger); background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.2); }

.section-label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  letter-spacing: .12em; text-transform: uppercase;
  margin: 22px 4px 8px;
}

/* ======================================================
   File upload cards (Documents / Existing Loans)
   ====================================================== */
.upload-card {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  margin-bottom: 10px;
}
.upload-card:hover { border-color: var(--line-3); background: var(--surface-2); }
.upload-card.uploaded {
  background: linear-gradient(180deg, rgba(52,211,153,.08), rgba(52,211,153,.02));
  border-color: rgba(52,211,153,.32);
}
.upload-card.is-busy {
  pointer-events: none;
  opacity: 0.78;
}
.upload-card.is-busy .body .sub { color: var(--muted); }
.upload-card .uic {
  width: 40px; height: 40px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--muted);
  flex: 0 0 40px;
  transition: all .15s;
}
.upload-card.uploaded .uic {
  background: var(--success-soft);
  border-color: rgba(52,211,153,.32);
  color: var(--success);
}
.upload-card .body { flex: 1; min-width: 0; }
.upload-card .body .ttl { font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: -.005em; }
.upload-card .body .sub { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-card.uploaded .body .sub { color: var(--success); }
.upload-card .action {
  color: var(--brand); font-size: 12.5px; font-weight: 600;
  flex: 0 0 auto;
}
.upload-card.uploaded .action { color: var(--danger); }
.upload-card input[type="file"] { display: none; }
.upload-card.optional .body .ttl::after {
  content: " · Optional";
  color: var(--muted);
  font-weight: 500;
}

.add-slot-btn {
  border: 1px dashed var(--line-2);
  background: transparent;
  color: var(--brand);
  border-radius: 14px;
  padding: 13px;
  width: 100%;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s, border-color .15s;
  margin-top: 4px;
}
.add-slot-btn:hover { background: rgba(255,74,51,.06); border-color: var(--brand); }

.use-samples {
  font-size: 12px; color: var(--brand); font-weight: 600;
  background: transparent; border: 0; padding: 8px 0; cursor: pointer;
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 4px;
}
.use-samples:hover { color: var(--brand-2); }

/* Yes/No big cards for existing-loans */
.yn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 18px; }
.yn-card {
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.yn-card:hover { border-color: var(--line-3); background: var(--surface-2); }
.yn-card.active {
  border-color: var(--brand);
  background: linear-gradient(180deg, rgba(255,74,51,.10), rgba(255,74,51,.03));
  box-shadow: 0 0 0 1px var(--brand) inset;
}
.yn-card .yic {
  width: 44px; height: 44px; border-radius: 12px;
  margin: 0 auto 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--text-2);
}
.yn-card.active .yic {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand);
}
.yn-card .lbl { font-size: 14.5px; font-weight: 700; color: var(--text); }
.yn-card .desc { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
