/* =========================================================================
 * ABC Bank — Auto Loan DIY journey.
 * Theme adapted from the BusinessNext / VividFlow LAP reference:
 *   warm ivory background, near-black Poppins headings with a deep-teal
 *   italic accent, an orange primary CTA, pink dot-flock logo, pastel tiles.
 * Design tokens live in :root so the whole journey can be re-skinned here.
 * ========================================================================= */
:root {
  --teal:      #14463E;   /* deep teal-green accent (headings emphasis) */
  --teal-600:  #1C5A50;
  --teal-500:  #2C7264;
  --teal-50:   #E9F2EF;
  --orange:    #EF7F1A;   /* primary CTA */
  --orange-600:#DD7012;
  --orange-50: #FDF1E3;
  --pink:      #E0218A;   /* logo / brand accent */
  --ink:       #1A1A1A;
  --ink-2:     #555a5e;
  --muted:     #8a8f93;
  --line:      #ece7dd;
  --bg:        #FBF9F3;   /* warm ivory */
  --white:     #ffffff;
  --green:     #15916a;
  --green-bg:  #e6f5ee;
  --red:       #c8453f;
  --amber:     #e8a13a;
  /* pastel tiles */
  --tile-lav:  #f3e8fb;
  --tile-blue: #e3effb;
  --tile-peach:#fbf0dc;
  --radius:    18px;
  --radius-sm: 11px;
  --shadow:    0 14px 40px rgba(30,30,30,.07);
  --shadow-sm: 0 6px 18px rgba(30,30,30,.05);
  --maxw:      1080px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: "Poppins", system-ui, sans-serif; margin: 0 0 .4em; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(27px, 3.6vw, 42px); font-weight: 800; margin-bottom: .25em; }
h1 em { color: var(--teal); font-style: italic; }
h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }

/* ---------------- Header ---------------- */
.app-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.hd__wrap { max-width: var(--maxw); margin: 0 auto; padding: 9px 20px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 0; background: none; border: 0; cursor: pointer; padding: 0; line-height: 1; }
.brand__flock { display: block; margin-left: -2px; }
.brand__word { display: flex; flex-direction: column; font-family: "Poppins", sans-serif; font-weight: 800; color: var(--ink); font-size: 15px; line-height: .92; letter-spacing: .02em; margin-top: 1px; }
.hd__co { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.hd__co span { color: var(--orange); margin: 0 2px; }

/* ---------------- Stepper ---------------- */
.app-stepper { background: var(--white); border-bottom: 1px solid var(--line); }
.stepper { max-width: var(--maxw); margin: 0 auto; padding: 11px 20px; }
.stepper ol { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; }
.step::before { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.step:first-child::before { display: none; }
.step.done::before, .step.active::before { background: var(--teal-500); }
.step__dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--white); border: 2px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 700; z-index: 1; transition: .2s; }
.step.active .step__dot { border-color: var(--teal-600); color: var(--teal); box-shadow: 0 0 0 4px var(--teal-50); }
.step.done .step__dot { background: var(--teal-600); border-color: var(--teal-600); color: #fff; }
.step__label { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.step.active .step__label, .step.done .step__label { color: var(--ink); }

/* ---------------- Layout ---------------- */
.app-content { max-width: var(--maxw); margin: 0 auto; padding: 14px 20px 28px; }
.screen { animation: fade .3s ease; }
.screen--narrow { max-width: 560px; margin: 0 auto; }
.screen h2 { margin-bottom: .15em; }
.screen > p.muted { margin-bottom: 14px; font-size: 14px; }
.center { text-align: center; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.app-footer { border-top: 1px solid var(--line); background: var(--white); }
.app-footer p { max-width: var(--maxw); margin: 0 auto; padding: 10px 20px; font-size: 12px; color: var(--muted); }

/* ---------------- Cards ---------------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); margin-bottom: 12px; }
.card h3 { margin-bottom: 10px; }

/* ---------------- Buttons ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; cursor: pointer; border: 0; border-radius: 12px; padding: 13px 26px; transition: .15s; text-decoration: none; }
.btn--primary { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(239,127,26,.28); }
.btn--primary:hover { background: var(--orange-600); transform: translateY(-1px); }
.btn--ghost { background: var(--white); color: var(--teal); border: 1.5px solid var(--line); }
.btn--ghost:hover { background: var(--teal-50); border-color: var(--teal-500); }
.btn--sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }
.link { background: none; border: 0; color: var(--teal); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.link:disabled { color: var(--muted); cursor: default; }
.link-arrow { background: none; border: 0; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; padding: 13px 6px; }
.link-arrow:hover { color: var(--teal); }
.actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 6px; }
.actions--split { justify-content: space-between; flex-wrap: wrap; }
.actions--nav { justify-content: space-between; align-items: center; margin-top: 12px; }
.actions__right { display: flex; align-items: center; gap: 12px; }

/* ---------------- Hero + Calculator ---------------- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 32px; align-items: center; margin-bottom: 8px; }
.hero__text p { color: var(--ink-2); font-size: 15px; max-width: 44ch; margin-bottom: 0; }
.pill { display: inline-flex; align-items: center; gap: 7px; background: var(--white); border: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 700; padding: 6px 13px; border-radius: 999px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.pill__tag { color: var(--orange); }
.pill--green { background: var(--green-bg); border-color: transparent; color: var(--green); }
.hero__cta { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.calc-card { margin: 0; padding: 16px; }
.calc__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; color: var(--ink-2); margin-top: 11px; }
.calc__row strong { color: var(--ink); font-size: 15px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; background: var(--teal-50); margin: 6px 0 2px; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--teal-600); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(20,70,62,.4); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--teal-600); border: 3px solid #fff; cursor: pointer; }
.calc__emi { margin: 12px 0 0; padding: 12px 14px; background: var(--teal-50); border-radius: var(--radius-sm); display: flex; flex-direction: column; }
.calc__emi span { font-size: 12.5px; color: var(--ink-2); }
.calc__emi div { font-size: 24px; font-weight: 800; color: var(--teal); font-family: "Poppins"; }

/* ---------------- "Ready to get started" ---------------- */
.ready-card { padding: 13px 18px; margin-bottom: 0; }
.ready { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr; gap: 10px 16px; align-items: center; }
.ready__head h3 { margin-bottom: 2px; font-size: 16px; }
.ready__head p { font-size: 12px; color: var(--muted); margin: 0; }
.ready__item { display: flex; align-items: center; gap: 10px; }
.ready__item div { display: flex; flex-direction: column; }
.ready__item strong { font-size: 13px; }
.ready__item span { font-size: 11.5px; color: var(--muted); }
.tile { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; flex: none; }
.tile--lav { background: var(--tile-lav); }
.tile--blue { background: var(--tile-blue); }
.tile--peach { background: var(--tile-peach); }

/* ---------------- Fields ---------------- */
.field { display: block; margin-bottom: 12px; }
.field__label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field__hint { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; }
input[type="text"], input:not([type]), input[type="tel"], input[type="number"], select, .field input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font: inherit; color: var(--ink); background: var(--white); transition: .15s;
}
input:focus, select:focus { border-color: var(--teal-500); box-shadow: 0 0 0 3px var(--teal-50); outline: none; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); margin: 4px 0 18px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--teal-600); }
.price-note { font-size: 13px; color: var(--ink-2); }
.price-note strong { color: var(--teal); }

/* ---------------- OTP ---------------- */
.badge { display: inline-block; background: var(--teal-50); color: var(--teal); font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; margin-bottom: 16px; }
.badge--aadhaar { background: #fff3e6; color: #c9781a; }
.otp { display: flex; gap: 10px; justify-content: center; margin: 8px 0 4px; }
.otp__box { width: 48px; height: 56px; text-align: center; font-size: 22px; font-weight: 700; border: 1.5px solid var(--line); border-radius: 12px; }
.otp__box:focus { border-color: var(--teal-500); box-shadow: 0 0 0 3px var(--teal-50); outline: none; }
.otp-hint { text-align: center; font-size: 13px; color: var(--ink-2); background: var(--orange-50); border: 1px dashed #f0c478; padding: 8px; border-radius: 8px; margin: 14px 0; }
.otp-hint strong { color: var(--orange-600); letter-spacing: 2px; }
.otp__resend { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.consent { font-size: 12px; color: var(--muted); margin: 14px 0 0; }

/* ---------------- Option cards ---------------- */
.qsection { margin-bottom: 14px; }
.qsection h3 { margin-bottom: 8px; }
.opts { display: grid; gap: 10px; }
.opts--2 { grid-template-columns: 1fr 1fr; }
.opt { text-align: left; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; transition: .15s; }
.opt:hover { border-color: var(--teal-500); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.opt.is-selected { border-color: var(--teal-600); background: var(--teal-50); box-shadow: 0 0 0 3px var(--teal-50); }
.opt__icon { font-size: 20px; line-height: 1; }
.opt__title { font-weight: 700; font-size: 14.5px; }
.opt__sub { font-size: 12.5px; color: var(--muted); }

/* ---------------- Grid + dealer ---------------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.chip { display: inline-block; font-size: 12px; font-weight: 600; color: var(--teal); background: var(--teal-50); padding: 5px 10px; border-radius: 999px; }
.chip--muted { color: var(--muted); background: #f1efe8; }
.dealer-filter { margin-bottom: 12px; }
.dealer-search { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 14px; }
.dealer-list { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow: auto; }
.dealer { text-align: left; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; cursor: pointer; position: relative; transition: .15s; }
.dealer:hover { border-color: var(--teal-500); }
.dealer.is-selected { border-color: var(--teal-600); background: var(--teal-50); box-shadow: 0 0 0 3px var(--teal-50); }
.dealer strong { font-size: 14px; }
.dealer__brand { font-size: 12px; color: var(--teal); margin-left: 8px; font-weight: 600; }
.dealer__meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.dealer__rate { position: absolute; top: 12px; right: 14px; font-size: 12px; color: var(--amber); font-weight: 700; }

/* ---------------- Documents / financials ---------------- */
.doc { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0; }
.doc__info { display: flex; flex-direction: column; gap: 2px; }
.doc__info strong { font-size: 14px; }
.doc__file { font-size: 12px; color: var(--green); font-weight: 600; margin-top: 4px; }
.req { color: var(--red); }
.btn input[type="file"], .btn--ghost input[type="file"] { display: none; }
.fin-action { margin-top: 14px; }

/* ---------------- Offer ---------------- */
.offer-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.offer-hero { background: linear-gradient(135deg, var(--teal), var(--teal-500)); border: 0; color: #fff; }
.offer-hero h3 { color: #fff; }
.offer-max { text-align: center; padding: 6px 0; }
.offer-max span { font-size: 13px; }
.offer-hero .offer-max span { color: rgba(255,255,255,.85); }
.offer-max__amt { font-size: 32px; font-weight: 800; font-family: "Poppins"; letter-spacing: -.02em; }
.offer-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.offer-stats > div { background: var(--teal-50); border-radius: var(--radius-sm); padding: 10px; text-align: center; }
.offer-hero .offer-stats > div { background: rgba(255,255,255,.14); }
.offer-stats span { display: block; font-size: 12px; color: var(--ink-2); }
.offer-hero .offer-stats span { color: rgba(255,255,255,.85); }
.offer-stats strong { font-size: 17px; }
.offer-vehicle { margin-top: 16px; font-size: 13px; }
.offer-hero .offer-vehicle { color: rgba(255,255,255,.9); }

/* ---------------- Success + timeline ---------------- */
.success-ic { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; background: var(--green-bg); color: var(--green); font-size: 38px; display: grid; place-items: center; }
.timeline { list-style: none; padding: 0; margin: 8px 0 0; text-align: left; }
.timeline li { position: relative; padding: 8px 0 8px 28px; font-size: 14px; color: var(--muted); }
.timeline li::before { content: "○"; position: absolute; left: 0; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { content: "✓"; color: var(--green); font-weight: 700; }
.timeline li.active { color: var(--teal); font-weight: 600; }
.timeline li.active::before { content: "●"; color: var(--teal-600); }

/* ---------------- Returning next steps ---------------- */
.nsteps { list-style: none; padding: 0; margin: 0; }
.nstep { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.nstep:last-child { border-bottom: 0; }
.nstep__tick { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-50); color: var(--muted); font-weight: 700; flex: none; }
.nstep.done .nstep__tick { background: var(--green-bg); color: var(--green); }
.nstep__label { flex: 1; font-size: 14px; }
.nstep.done .nstep__label { color: var(--muted); text-decoration: line-through; }
.nstep.is-locked { opacity: .6; }
.nstep__locked { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.banner { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 12px; }
.banner--green { background: var(--green-bg); color: var(--green); }
.disb { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 14px; }
.disb__row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); padding: 9px 0; border-top: 1px solid var(--line); }
.disb__row:first-child { border-top: 0; }
.disb__row strong { color: var(--ink); font-weight: 600; }

.offer-note { font-size: 12.5px; text-align: center; margin: 4px 0 10px; }

/* ---------------- Account Aggregator modal ---------------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(20,20,20,.55); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .2s ease; }
.modal { background: var(--white); border-radius: var(--radius); width: 100%; max-width: 440px; max-height: 92vh; overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.aa__bar { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: linear-gradient(135deg, #2b2f6b, #4a3aa8); color: #fff; }
.aa__bar strong { display: block; font-size: 15px; }
.aa__bar span { font-size: 11.5px; opacity: .85; }
.aa__logo { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.aa__x { margin-left: auto; background: none; border: 0; color: #fff; font-size: 16px; cursor: pointer; opacity: .85; }
.aa__body { padding: 18px; }
.aa__req { font-size: 14px; color: var(--ink-2); margin-bottom: 16px; }
.aa__req strong { color: var(--ink); }
.aa__acct { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--teal-500); background: var(--teal-50); border-radius: var(--radius-sm); padding: 12px; margin: 4px 0 12px; }
.aa__acct-ic { font-size: 20px; }
.aa__acct strong { display: block; font-size: 13.5px; }
.aa__acct span { font-size: 12px; color: var(--muted); }
.aa__tick { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--green); }
.aa__consent { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 14px; margin-top: 6px; }
.aa__consent-h { font-size: 12px; font-weight: 700; color: var(--ink-2); padding: 8px 0 4px; text-transform: uppercase; letter-spacing: .04em; }
.aa__row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); padding: 6px 0; border-top: 1px solid var(--line); }
.aa__row strong { color: var(--ink); font-weight: 600; }
.aa__foot { display: flex; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); }
.aa__foot .btn { flex: 1; }

/* ---------------- Toast ---------------- */
#toast-host { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); transition: .25s; max-width: 90vw; }
.toast--in { opacity: 1; transform: none; }
.toast--success { background: var(--green); }
.toast--error { background: var(--red); }
.toast--info { background: var(--teal); }

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .hero { gap: 22px; }
  .ready { grid-template-columns: 1fr 1fr 1fr; gap: 12px 16px; }
  .ready__head { grid-column: 1 / -1; }
  .grid-2 { grid-template-columns: 1fr; }
  .step__label { display: none; }
  .hd__co { display: none; }
}
@media (max-width: 540px) {
  .app-content { padding: 16px 14px 36px; }
  .hero { grid-template-columns: 1fr; }
  .opts--2 { grid-template-columns: 1fr; }
  .ready { grid-template-columns: 1fr; }
  .ready__item { gap: 10px; }
  .dealer-search { grid-template-columns: 1fr; }
  .offer-stats { grid-template-columns: 1fr; }
  .otp__box { width: 42px; height: 50px; font-size: 19px; }
  .actions, .actions--split { flex-direction: column-reverse; }
  .actions .btn, .actions--split .btn { width: 100%; }
  .actions__right { flex-direction: column-reverse; width: 100%; gap: 10px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
}
