/* ==========================================================================
   Easyrupeeloan customer portal — shared design system (light theme)
   Load after brand.css. The look is www.easyrupeeloan.com's: Inter, dark ink
   text, orange (#FE512F) actions and highlights, grey-filled inputs, white cards
   with a soft shadow. Every brand colour here is a var(--er-*) token from
   brand.css, so changing the palette there re-colours the whole portal.
   Semantic colours (green / amber / red / violet) and the neutrals stay here.
   This file is the BASE for every page: tokens, type, buttons, inputs, cards,
   chips, notes, tables and modals. Page layout lives in each page's own CSS.
   Body classes: .site (customer pages)  ·  .crm / .doc (kept from the demo, unused here)
   ========================================================================== */
:root {
  /* one font everywhere, the site's (no serif display face any more) */
  --font: var(--er-font, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  --font-display: var(--er-font, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* brand: from brand.css (the fallbacks are brand.css's own values, for a page that forgot it) */
  --navy: var(--er-navy, #191C32); --navy-2: var(--er-navy-2, #1D3463); --navy-soft: #EEF0F6;
  --ink: var(--er-ink, #121212); --ink-2: var(--er-ink-2, #3F4B5F); --muted: var(--er-muted, #64666C); --muted-2: #6E7076;
  --line: var(--er-line, #E5E5E5); --line-2: #EFEFEC; --bg: var(--er-page, #F4F7FB); --card: #FFFFFF; --soft: #F8F8F6;
  --input: var(--er-input, #F2F2F0);

  --primary: var(--er-primary, #FE512F); --primary-dk: var(--er-primary-dk, #E23E1D); --primary-soft: var(--er-primary-soft, #FFF1EC);
  /* orange TEXT on white: --er-primary-dk darkened a little, so small text keeps 4.5:1 (#E23E1D alone is 4.25:1) */
  --primary-text: #C7371A;
  --primary-text: color-mix(in srgb, var(--primary-dk) 88%, #000);
  --shadow-rgb: var(--er-shadow-rgb, 18, 18, 18);
  --green: #166534; --green-500: #2E9E6B; --green-soft: #E7F6EE;
  --amber: #B45309; --amber-500: #D97706; --amber-soft: #FEF3C7;
  --red: #B91C1C; --red-500: #DC2626; --red-soft: #FEE2E2;
  --violet: #6D28D9; --violet-soft: #EDE9FE;
  --grey: #4B4D52; --grey-soft: #F0F0EE;

  --radius-sm: 8px; --radius: 12px; --radius-lg: 12px;
  --radius-btn: var(--er-radius, 8px); --radius-pill: var(--er-pill, 48px);
  --shadow-sm: 0 1px 2px rgba(var(--shadow-rgb), .05);
  --shadow: 0 2px 10px rgba(var(--shadow-rgb), .06);
  --shadow-card: 0 1px 2px rgba(var(--shadow-rgb), .04), 0 8px 28px -12px rgba(var(--shadow-rgb), .14);
  --shadow-lg: 0 24px 48px -16px rgba(var(--shadow-rgb), .28);
  --focus: 0 0 0 3px var(--er-focus, rgba(254, 81, 47, .35));
  --gutter: 16px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 16px; font-weight: 500; line-height: 1.55; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* tabular figures only where numbers line up: Inter's tabular set also widens the hyphen, which reads as " - " in text */
.num, .amt, .otp-timer, .table td.num { font-variant-numeric: tabular-nums; }
img, svg { display: block; max-width: 100%; }
.ic { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--ink); letter-spacing: -.01em; font-weight: 700; }
h1 { font-size: 30px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
p { margin: 0 0 8px; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.mono { font-family: var(--mono); font-size: .95em; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
:focus-visible { outline: none; box-shadow: var(--focus); }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
[hidden] { display: none !important; }
/* the site's heading style: bold ink with one word or phrase in orange */
.er-title { font-size: clamp(26px, 3.2vw, 34px); font-weight: 700; line-height: 1.2; color: var(--ink); letter-spacing: -.01em; }
.er-title em, .er-title .hl { font-style: normal; color: var(--primary); }

/* layout utilities */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 16px 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 16px 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.mt-0 { margin-top: 0; } .mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
@media (max-width: 760px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .hide-sm { display: none !important; }
}
@media (min-width: 761px) { .show-sm { display: none !important; } }

/* The demo's 44px platform bar (.platformbar / .pb-*) is gone; in stub mode brand.css's .er-preview ribbon takes its place. */
@media (max-width: 760px) {
  .btn-sm, .icon-btn, .segmented button, .tab, .hstep { min-height: 44px; }
  .icon-btn { width: 44px; }
}

/* ---------- Buttons ----------
   Primary: the site's orange form button (8px radius, bold white text). Secondary (.btn-ghost): a white pill
   with a dark 1px border. Dark (.btn-navy): the site's #1A1A2E action button. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 15px/1.2 var(--font); padding: 11px 22px; border-radius: var(--radius-btn); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  min-height: 44px;
}
.btn:hover { text-decoration: none; }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dk); }
.btn-primary:focus-visible { box-shadow: var(--focus); }
.btn-navy { background: var(--er-dark, #1A1A2E); color: #fff; border-radius: 10px; }
.btn-navy:hover { background: var(--navy-2); }
.btn-success { background: var(--primary); color: #fff; }
.btn-success:hover { background: var(--primary-dk); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--ink); border-radius: var(--radius-pill); }
.btn-ghost:hover { background: var(--soft); border-color: var(--ink); }
.btn-soft { background: var(--primary-soft); color: var(--primary-text); }
.btn-soft:hover { background: color-mix(in srgb, var(--primary) 16%, #fff); }
.btn-danger { background: #fff; color: var(--red); border-color: #F3C6C6; border-radius: var(--radius-pill); }
.btn-danger:hover { background: var(--red-soft); }
.btn-link { background: none; border: 0; color: var(--primary-text); padding: 0; min-height: 0; font-weight: 700; }
.btn-link:hover { text-decoration: underline; }
.btn-sm { font-size: 14px; padding: 8px 14px; min-height: 36px; }
.btn-lg { font-size: 16px; padding: 14px 30px; min-height: 52px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--grey-soft); color: var(--ink); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn .spin, .spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; line-height: 1;
  padding: 5px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent;
}
.chip .ic { width: 12px; height: 12px; }
.t-green { background: var(--green-soft); color: var(--green); }
.t-blue { background: var(--primary-soft); color: var(--primary-text); }
.t-amber { background: var(--amber-soft); color: var(--amber); }
.t-red { background: var(--red-soft); color: var(--red); }
.t-violet { background: var(--violet-soft); color: var(--violet); }
.t-grey { background: var(--grey-soft); color: var(--grey); }
.t-navy { background: var(--navy-soft); color: var(--navy); }
.chip.outline { background: #fff; border-color: var(--line); color: var(--ink-2); }
.chip.vis-none { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.chip.basis-proposed { background: #fff; border: 1px dashed #E3B363; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; background: var(--muted-2); }
.dot.green { background: var(--green-500); } .dot.amber { background: var(--amber-500); } .dot.red { background: var(--red-500); } .dot.blue { background: var(--primary); } .dot.violet { background: var(--violet); }

/* ---------- Cards: white, a soft shadow, 12px corners ---------- */
.card { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-h h3 { font-size: 16px; }
.card-h .sub { color: var(--muted); font-size: 13.5px; }
.card-b { padding: 20px; }
.card-f { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.card.pad { padding: 20px; }
.card.flat { box-shadow: none; }
.card.soft { background: var(--soft); }
.section-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }

/* key–value lists */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 20px; }
.kv > div { min-width: 0; }
.kv dt, .kv .k { font-size: 12.5px; color: var(--muted); font-weight: 500; margin: 0 0 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kv dd, .kv .v { margin: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.kv.tight { gap: 8px 16px; }
.kv-rows { display: flex; flex-direction: column; }
.kv-rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.kv-rows > div:last-child { border-bottom: 0; }
.kv-rows .k { color: var(--muted); }
.kv-rows .v { font-weight: 700; text-align: right; }
.kv-rows .total { font-size: 16px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-card); }
.stat .lab { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat .val { font-size: 24px; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }
.stat .foot { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- Notes / callouts ---------- */
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--primary-soft); color: var(--ink); font-size: 14px; border: 1px solid color-mix(in srgb, var(--primary) 22%, #fff); }
.note .ic { margin-top: 2px; color: var(--primary-text); }
.note b { color: inherit; }
.note.ok { background: var(--green-soft); color: #14532D; border-color: #C8EBD7; }
.note.ok .ic { color: var(--green); }
.note.warn { background: var(--er-warn-bg, #FFFBEB); color: #78350F; border-color: #FDE68A; }
.note.warn .ic { color: var(--amber); }
.note.danger { background: #FEF2F2; color: #7F1D1D; border-color: #FECACA; }
.note.danger .ic { color: var(--red); }
.note.violet { background: #F5F3FF; color: #4C1D95; border-color: #DDD6FE; }
.note.grey { background: var(--soft); color: var(--ink-2); border-color: var(--line); }
.note.grey .ic { color: var(--muted); }

/* ---------- Forms: grey-filled fields, no heavy border, an orange focus ring ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field .label { font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.field .req { color: var(--primary-text); font-weight: 700; }
.field .opt { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.hint { font-size: 13px; color: var(--muted); }
.err { font-size: 13px; color: var(--red); font-weight: 600; display: none; }
.field.invalid .err { display: block; }
.field.invalid .input, .field.invalid .select, .field.invalid .textarea { border-color: var(--red-500); background-color: #FFF7F7; box-shadow: 0 0 0 3px rgba(220, 38, 38, .10); }
/* 8 Oct 2026 (the owner: "the box is completely dark, so the customer can't tell something must be filled in"): every
   field is a white box with a visible outline and a light hint inside, darker on hover and orange while typing; a box
   that cannot be changed stays soft grey, so the two never look alike */
.input, .select, .textarea {
  width: 100%; font: 500 16px/1.3 var(--font); color: var(--ink); background-color: #fff;
  border: 1.5px solid #CDD0D5; border-radius: var(--radius-btn); padding: 12px 16px; min-height: 48px;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.input::placeholder, .textarea::placeholder { color: #9A9DA3; opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: #8F949B; }
.input:focus, .select:focus, .textarea:focus { outline: none; background-color: #fff; border-color: var(--primary); box-shadow: var(--focus); }
.input[readonly], .input:disabled, .select:disabled, .textarea:disabled { background-color: var(--soft); color: var(--ink-2); border-color: var(--line-2); }
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23121212' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.input-group { display: flex; align-items: stretch; border: 1.5px solid #CDD0D5; border-radius: var(--radius-btn); background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.input-group:hover { border-color: #8F949B; }
.input-group:focus-within { background: #fff; border-color: var(--primary); box-shadow: var(--focus); }
.input-group .input { border: 0; box-shadow: none; border-radius: 0; min-width: 0; background: transparent; }
.input-group .input:focus { box-shadow: none; }
.input-group .addon { display: flex; align-items: center; padding: 0 12px 0 16px; margin: 8px 4px 8px 0; border-right: 1px solid #E4E6EA; color: var(--ink-2); background: transparent; font-weight: 600; }
.input-group .btn { border-radius: 0; box-shadow: none; }
.input.upper { text-transform: uppercase; }
.field.invalid .input-group { border-color: var(--red-500); background: #FFF7F7; }

/* choice cards (radio / checkbox look-alikes): grey tiles like the inputs, orange when chosen */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.choice { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid transparent; border-radius: var(--radius-btn); background: var(--input); cursor: pointer; font-weight: 600; transition: border-color .15s, background .15s, box-shadow .15s; min-height: 48px; }
.choice:hover { border-color: #DADAD6; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .mark { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #B4B6BB; background: #fff; flex: 0 0 auto; display: grid; place-items: center; }
.choice input:checked ~ .mark { border-color: var(--primary); background: radial-gradient(circle, var(--primary) 45%, #fff 50%); }
.choice:has(input:checked) { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 1px var(--primary) inset; }
.choice:has(input:focus-visible) { box-shadow: var(--focus); }
.choice .sub { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
/* 8 Oct 2026 (the owner: "not clear where to click ... the colors don't look right"): every answer is a white card with
   a clear outline that lifts and turns orange on hover; the chosen one is unmistakable: an orange outline, a soft
   orange fill and a filled orange tick in place of the empty ring */
.choice { background: #fff; border: 1.5px solid #D9DBE0; box-shadow: 0 1px 2px rgba(18, 18, 18, .05); transition: border-color .15s, box-shadow .15s, background-color .15s; }
.choice:hover { border-color: var(--primary, #FE512F); box-shadow: 0 4px 14px rgba(254, 81, 47, .12); }
.choice .ch-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: #F4F4F1; color: var(--ink-2, #3F4B5F); }
.choice .mark { width: 22px; height: 22px; border: 2px solid #B4B6BB; position: relative; }
.choice input:checked ~ .mark { border-color: var(--primary, #FE512F); background: var(--primary, #FE512F); }
.choice input:checked ~ .mark::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.choice:has(input:checked) { border-color: var(--primary, #FE512F); background: var(--er-primary-soft, #FFF1EC); box-shadow: 0 0 0 1px var(--primary, #FE512F) inset, 0 6px 18px rgba(254, 81, 47, .14); }
.choice:has(input:checked) .ch-ic { background: #fff; color: var(--primary-text, #C7371A); }
.field.invalid .choice:not(:has(input:checked)) { border-color: #F3B4B4; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink); cursor: pointer; line-height: 1.5; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary); flex: 0 0 auto; }
.consent { background: var(--soft); border: 1px solid var(--line-2); border-radius: var(--radius-btn); padding: 12px 14px; }
.consent .check { font-size: 13.5px; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: #CFCFCB; position: relative; transition: background .15s; flex: 0 0 auto; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: var(--focus); }

/* OTP */
.otp { display: flex; gap: 8px; }
.otp input { width: 46px; height: 52px; text-align: center; font: 700 20px var(--font); color: var(--ink); background: #fff; border: 1.5px solid #CDD0D5; border-radius: var(--radius-btn); }   /* white with an outline, like every field (8 Oct 2026) */
.otp input:hover { border-color: #8F949B; }
.otp input:focus { outline: none; background: #fff; border-color: var(--primary); box-shadow: var(--focus); }

/* upload */
.dropzone { border: 1.5px dashed #D3D3CF; border-radius: var(--radius); background: var(--soft); padding: 18px; display: flex; align-items: center; gap: 14px; cursor: pointer; transition: border-color .15s, background .15s; position: relative; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 4%, #fff); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .dz-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--primary-text); border: 1px solid var(--line); flex: 0 0 auto; }
.dropzone .dz-t { font-weight: 700; }
.dropzone .dz-s { font-size: 13px; color: var(--muted); }
.filechip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.filechip .fname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filechip .fsize { font-size: 13px; color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--soft); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover td { background: color-mix(in srgb, var(--primary) 4%, #fff); }
.table tbody tr.selected td { background: color-mix(in srgb, var(--primary) 8%, #fff); }
.table .num { text-align: right; }
.table .cell-strong { font-weight: 700; color: var(--ink); }
.table .cell-sub { font-size: 13px; color: var(--muted); }
.table.compact td { padding: 8px 12px; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty > .ic { margin: 0 auto 10px; color: var(--muted-2); }

/* ---------- Tabs / segmented ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; font: 700 14px var(--font); color: var(--muted); cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--ink); }
.tab.on, .tab[aria-selected=true] { color: var(--primary-text); border-bottom-color: var(--primary); }
.tab .count { background: var(--grey-soft); color: var(--grey); font-size: 11.5px; padding: 2px 7px; border-radius: 999px; }
.tab.on .count, .tab[aria-selected=true] .count { background: var(--primary-soft); color: var(--primary-text); }
.segmented { display: inline-flex; background: var(--input); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; font: 700 13.5px var(--font); color: var(--muted); padding: 7px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.segmented button.on, .segmented button[aria-pressed=true] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.segmented button:focus-visible { box-shadow: var(--focus); position: relative; z-index: 1; }

/* ---------- Steppers: orange for the steps done and the step you are on ---------- */
.progress { height: 6px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width .3s; }

.vsteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.vstep { display: flex; gap: 12px; align-items: flex-start; position: relative; padding: 0 0 14px; }
.vstep:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 2px; width: 2px; background: var(--line); }
.vstep.done:not(:last-child)::before { background: color-mix(in srgb, var(--primary) 45%, #fff); }
.vstep .bullet { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: #fff; border: 2px solid var(--line); color: var(--muted); flex: 0 0 auto; position: relative; z-index: 1; }
.vstep.done .bullet { background: var(--primary); border-color: var(--primary); color: #fff; }
.vstep.current .bullet { border-color: var(--primary); color: var(--primary-text); box-shadow: 0 0 0 4px var(--primary-soft); }
.vstep.crm .bullet { border-style: dashed; }
.vstep .st { padding-top: 4px; min-width: 0; }
.vstep .st-t { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.vstep.upcoming .st-t { color: var(--muted); font-weight: 600; }
.vstep .st-s { font-size: 13px; color: var(--muted); }
.vstep button.st-link { all: unset; cursor: pointer; }
.vstep button.st-link:focus-visible { box-shadow: var(--focus); border-radius: 6px; }

.hsteps { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.hstep { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; padding: 6px 10px 6px 6px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; cursor: pointer; }
.hstep .n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--grey-soft); font-size: 11px; }
.hstep.done { color: var(--primary-text); border-color: color-mix(in srgb, var(--primary) 30%, #fff); background: #fff; }
.hstep.done .n { background: var(--primary); color: #fff; }
.hstep.current { color: var(--primary-text); border-color: color-mix(in srgb, var(--primary) 30%, #fff); background: color-mix(in srgb, var(--primary) 5%, #fff); }
.hstep.current .n { background: var(--primary); color: #fff; }
.hstep.on { box-shadow: 0 0 0 2px var(--primary) inset; }

/* ---------- Modal / drawer / toast ---------- */
.modal-scrim { position: fixed; inset: 0; background: rgba(18, 18, 18, .5); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fadeIn .15s ease; }
.modal-scrim.out { opacity: 0; transition: opacity .18s; }
.modal { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; min-width: 0; max-height: calc(100vh - 32px); display: flex; flex-direction: column; animation: pop .18s ease; overflow: hidden; }
.modal-sm { max-width: 440px; } .modal-md { max-width: 580px; } .modal-lg { max-width: 840px; }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line-2); }
.modal-h h3 { font-size: 18px; font-weight: 700; }
.modal-b { padding: 20px; overflow-y: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line-2); flex-wrap: wrap; background: var(--soft); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }

.toasts { position: fixed; bottom: 16px; right: 16px; left: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 200; pointer-events: none; }
.toast { pointer-events: none; display: flex; gap: 10px; align-items: center; background: var(--er-dark, #1A1A2E); color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: 14px; max-width: 420px; animation: pop .18s ease; }
.toast-ok .ic { color: #7EE2AE; } .toast-danger .ic { color: #FCA5A5; } .toast-info .ic { color: #FFC2B3; }
.toast.out { opacity: 0; transform: translateY(6px); transition: .22s; }

/* ==========================================================================
   CUSTOMER WEBSITE  (body.site)
   The shared header and footer are brand.css's (.er-header / .er-footer, drawn by ER.chrome);
   the demo's .site-header, .site-brand and .site-footer rules are gone with their markup.
   ========================================================================== */
.site { background: #fff; }
.secure { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--green); }
/* a light band at the top of a page, as on the site's inner pages */
.site-hero { background: var(--er-hero, #F5F1F1); }
.site-hero .container { padding-top: 32px; padding-bottom: 28px; }
.site-hero h1 { font-weight: 700; font-size: clamp(26px, 3.4vw, 36px); color: var(--ink); letter-spacing: -.01em; }
.site-hero .lede { color: var(--muted); font-size: 16px; margin-top: 8px; max-width: 64ch; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--primary-text); background: var(--primary-soft); padding: 5px 12px; border-radius: var(--radius-pill); }
.site-main { padding: 24px 0 64px; }
.form-card { background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.form-card + .form-card { margin-top: 16px; }
.form-card .fc-h { display: flex; align-items: center; gap: 12px; padding: 20px 22px 0; }
.form-card .fc-no { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: 0 0 auto; }
.form-card .fc-h h2 { font-size: 19px; }
.form-card .fc-h .sub { font-size: 14px; color: var(--muted); }
.form-card .fc-b { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 18px; }
.form-card .fc-f { padding: 14px 22px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.form-card.locked { opacity: .6; }
.panel { background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-card); }
.panel-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel-h .pi { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); flex: 0 0 auto; }
.panel-h h3 { font-size: 16px; }
.panel-h .sub { font-size: 13px; color: var(--muted); }
.panel.done { border-color: #C8EBD7; }
.panel.done .panel-h .pi { background: var(--green-soft); color: var(--green); }

.selfie-frame { aspect-ratio: 1 / 1; width: 100%; max-width: 260px; margin: 0 auto; border-radius: 50%; overflow: hidden; background: var(--input); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); display: grid; place-items: center; position: relative; }
.selfie-frame video, .selfie-frame img { width: 100%; height: 100%; object-fit: cover; }
.selfie-frame .ph { color: var(--muted-2); text-align: center; font-size: 13px; padding: 20px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--grey-soft); flex: 0 0 auto; display: grid; place-items: center; font-weight: 700; color: var(--grey); overflow: hidden; }
.avatar.lg { width: 96px; height: 96px; font-size: 28px; }
.avatar.xl { width: 120px; height: 120px; font-size: 34px; }

.outcome { text-align: center; padding: 36px 20px; }
.outcome .oi { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; }
.outcome.green .oi { background: var(--green-soft); color: var(--green); }
.outcome.amber .oi { background: var(--amber-soft); color: var(--amber); }
.outcome.red .oi { background: var(--red-soft); color: var(--red); }
.outcome h2 { font-size: 26px; font-weight: 700; color: var(--ink); }
.outcome p { color: var(--muted); max-width: 52ch; margin: 8px auto 0; }

/* the amount band on the offer: the site's navy band */
.offer-hero { border-radius: var(--radius); padding: 26px 24px; color: #fff; background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%); position: relative; overflow: hidden; }
.offer-hero .lab { color: rgba(255, 255, 255, .8); font-weight: 600; }
.offer-hero .amt { font-size: clamp(36px, 7vw, 52px); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; margin: 6px 0; color: #fff; }
.doc-preview { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 24px; font-size: 14px; line-height: 1.65; max-height: 360px; overflow-y: auto; box-shadow: inset 0 -12px 16px -16px rgba(0, 0, 0, .2); }
.doc-preview h4 { font-size: 16px; margin-bottom: 8px; }

/* ==========================================================================
   CRM  (body.crm)
   ========================================================================== */
body.crm { background: var(--bg); font-size: 13.5px; }
.crm-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.crm-side { background: #fff; border-right: 1px solid var(--line); padding: 14px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.crm-side .brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 14px; }
.crm-side .brand .lg { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), var(--navy)); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; }
.crm-side .brand b { display: block; font-size: 14px; }
.crm-side .brand small { color: var(--muted); font-weight: 600; font-size: 11px; }
.nav-group { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); padding: 14px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font: 600 13px var(--font); background: none; border: 0; cursor: pointer; text-align: left; }
.nav-item:hover { background: var(--grey-soft); text-decoration: none; color: var(--ink); }
.nav-item.on { background: var(--primary-soft); color: var(--primary-dk); }
.nav-item .count { margin-left: auto; font-size: 11px; font-weight: 800; background: var(--grey-soft); color: var(--grey); padding: 2px 7px; border-radius: 999px; }
.nav-item.on .count { background: #fff; color: var(--primary-dk); }
.nav-item .count.alert { background: var(--amber-soft); color: var(--amber); }
.crm-main { min-width: 0; display: flex; flex-direction: column; }
.crm-top { display: flex; align-items: center; gap: 12px; padding: 12px 22px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.crm-top .search { flex: 1 1 auto; max-width: 440px; }
.crm-top .me { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.crm-content { padding: 20px 22px 48px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; }
.page-head .sub { color: var(--muted); margin-top: 2px; }
.crm-menu-btn { display: none; }
@media (max-width: 980px) {
  .crm-shell { grid-template-columns: minmax(0, 1fr); }
  .crm-side { position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; width: 260px; z-index: 90; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .crm-side.open { transform: none; }
  .crm-menu-btn { display: inline-grid; }
  .crm-top { padding: 10px var(--gutter); }
  .crm-content { padding: 16px var(--gutter) 40px; }
}

.case-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.case-layout > .profile { position: sticky; top: 72px; }
@media (max-width: 1100px) { .case-layout { grid-template-columns: minmax(0, 1fr); } .case-layout > .profile { position: static; } }
.profile-card { text-align: center; }
.profile-card .avatar { margin: 0 auto 10px; }
.profile-list { text-align: left; margin-top: 12px; border-top: 1px solid var(--line-2); }
.profile-list > div { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.profile-list .ic { color: var(--muted-2); }
.profile-list .pv { margin-left: auto; font-weight: 600; text-align: right; overflow-wrap: anywhere; min-width: 0; }

.sec { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sec + .sec { margin-top: 12px; }
.sec-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); border-top: 3px solid var(--sec-c, var(--primary)); flex-wrap: wrap; }
.sec-h .no { width: 24px; height: 24px; border-radius: 7px; background: var(--grey-soft); display: grid; place-items: center; font-size: 11.5px; font-weight: 800; color: var(--grey); flex: 0 0 auto; }
.sec-h h3 { font-size: 14.5px; }
.sec-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sec-b { padding: 16px; }
.sec.removed-list { border-style: dashed; background: #FFFCFC; }
.removed-item { display: inline-flex; align-items: center; gap: 6px; color: var(--red); text-decoration: line-through; font-size: 12.5px; font-weight: 600; margin: 0 12px 6px 0; }

.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .ci { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.checklist .ci.pass { background: var(--green-soft); color: var(--green); }
.checklist .ci.fail { background: var(--red-soft); color: var(--red); }
.checklist .ci.warn { background: var(--amber-soft); color: var(--amber); }
.checklist .ci.skip { background: var(--grey-soft); color: var(--grey); }
.checklist .cl-t { font-weight: 700; }
.checklist .cl-s { font-size: 12px; color: var(--muted); }
.checklist .cl-v { margin-left: auto; text-align: right; font-weight: 600; white-space: nowrap; }

.meter { height: 8px; border-radius: 999px; background: var(--line-2); position: relative; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--green-500); }
.meter.amber > span { background: var(--amber-500); } .meter.red > span { background: var(--red-500); }
.meter .th { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .55; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 8px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.timeline .tl-a { font-weight: 600; }
.timeline .tl-m { font-size: 12px; color: var(--muted); }

/* ==========================================================================
   DOC pages (overview, visibility matrix)  (body.doc)
   ========================================================================== */
.doc { background: var(--bg); }
.doc-hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; }
.doc-hero .container { padding-top: 34px; padding-bottom: 30px; }
.doc-hero h1 { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 4vw, 40px); letter-spacing: -.02em; }
.doc-hero p { color: rgba(255, 255, 255, .8); font-size: 15px; max-width: 70ch; margin-top: 8px; }
.doc-hero .meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 16px; font-size: 12.5px; color: rgba(255, 255, 255, .68); }
.doc-hero .meta b { display: block; color: #fff; font-size: 14px; }
.doc-main { padding: 24px 0 64px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s; border-top: 4px solid var(--tile-c, var(--primary)); min-height: 170px; }
.tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #D3DCE9; }
.tile .ti { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--tile-soft, var(--primary-soft)); color: var(--tile-c, var(--primary)); }
.tile h3 { font-size: 16px; margin-top: 4px; }
.tile p { color: var(--muted); font-size: 13px; margin: 0; }
.tile .go { margin-top: auto; font-weight: 700; font-size: 13px; color: var(--tile-c, var(--primary)); display: flex; align-items: center; gap: 6px; }
.flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.flow .fn { font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); white-space: nowrap; }
.flow .fn.crm { border-style: dashed; background: var(--violet-soft); color: var(--violet); border-color: #D8CCFB; }
.flow .fn.sys { background: var(--grey-soft); color: var(--grey); }
.flow .fn.cond { border-style: dotted; color: var(--muted); }
@media (max-width: 760px) { .flow .fn { white-space: normal; } }
.flow .fa { color: var(--muted-2); }
.matrix td .lbl { font-weight: 700; color: var(--ink); }
.matrix tr.is-removed td .lbl { text-decoration: line-through; color: var(--red); }
.matrix tr.group td { background: var(--soft); font-weight: 800; font-size: 12px; letter-spacing: .02em; color: var(--ink-2); padding-top: 9px; padding-bottom: 9px; }

@media print {
  .crm-side, .crm-top, .er-header, .toasts { display: none !important; }
  body { background: #fff; }
  .card, .sec, .form-card { box-shadow: none; break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* the bank box as a dropdown (LR.bankCombo, 6 Oct 2026): the list opens under the box, in the flow, and scrolls */
.bank-combo-list { list-style: none; margin: 4px 0 0; padding: 4px 0; max-height: 240px; overflow-y: auto; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 18px rgba(18, 18, 18, .08); }
.bank-combo-list li { padding: 10px 14px; font-size: 15px; cursor: pointer; }
.bank-combo-list li:hover, .bank-combo-list li[aria-selected="true"] { background: var(--soft); }
.bank-combo-list .bank-combo-none { color: var(--muted); cursor: default; font-size: 13.5px; }
