/* LabIT Bank — signature component styles.
   Design system: docs/ui-mockups/design-system.html — vermilion accent on white,
   Be Vietnam Pro (display/body) + IBM Plex Mono (numbers, tabular). UI text Vietnamese. */
@import url('fonts.css');   /* self-hosted Be Vietnam Pro + IBM Plex Mono (no Google Fonts CDN) */

:root {
  --brand-600: #E5330B; --brand-700: #C12A08; --brand-900: #7A1B04;
  --brand-50: #FEF0EC; --brand-100: #FDD9CE;
  --ink: #141414; --ink-soft: #44423F; --ink-mute: #6E6A66;
  --paper: #F7F5F3; --line: #E9E5E1; --surface: #ffffff;
  --gold: #C8A24B; --gold-soft: #F3E9D2; --gold-deep: #9A7B2E;
  --ok: #138A6B; --ok-soft: #E7F4EE; --ok-line: #CDE8DC; --ok-deep: #0B6B53;
  --danger: #B42318; --warn-bg: #FEF6E7;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* App pages are WHITE; only Login/Logout use paper (.auth-shell) to float the white form card. */
body { background: var(--surface); color: var(--ink); font-family: "Be Vietnam Pro", system-ui, sans-serif; }
.font-display { font-family: "Be Vietnam Pro", system-ui, sans-serif; }
.tracking-display { letter-spacing: -.025em; }
/* Numbers: money / account no. / reference / dates — IBM Plex Mono, tabular, usually right-aligned. */
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.tnum { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute); font-weight: 700; }
.auth-shell { min-height: 100vh; background: var(--paper); }
svg { display: block; }

/* ---- Brand mark: vermilion "L" tile + LabIT·Bank wordmark ---- */
.lib-mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 13px;
  background: var(--brand-600); color: #fff; font-family: "Be Vietnam Pro", sans-serif;
  font-weight: 800; font-size: 20px; line-height: 1; box-shadow: 0 6px 16px -8px rgba(229,51,11,.45); }
.lib-mark::after { content: "L"; }
.lib-brand { display: inline-flex; align-items: baseline; font-family: "Be Vietnam Pro", sans-serif;
  font-weight: 800; letter-spacing: -.025em; line-height: 1; font-size: 20px; }
.lib-brand .b-lab { color: var(--ink); }
.lib-brand .b-bank { color: var(--brand-600); }

/* product label next to the wordmark (e.g. Teller) */
.lib-tag { color: var(--ink-soft); font-weight: 500; padding-left: 12px; margin-left: 2px;
  border-left: 1px solid var(--line); }

/* equal-sign ledger rule (double-entry motif) */
.eq-rule { display: block; height: 0; border: 0; }
.eq-rule::before, .eq-rule::after { content: ""; display: block; height: 2px; border-radius: 2px; }
.eq-rule::before { width: 100%; background: var(--line); margin-bottom: 3px; }
.eq-rule::after { width: 64%; background: var(--brand-600); opacity: .9; }

/* ---- Card / panel ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }

/* ---- Account card (dashboard / detail) ---- */
.acct-card { position: relative; overflow: hidden; border-radius: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s; }
.acct-card:hover { border-color: var(--ink-mute); box-shadow: 0 1px 2px rgba(20,20,20,.04); }
.acct-balance { font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 700; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums; color: var(--ink); }
.acct-balance b { color: var(--brand-600); font-weight: 700; }
.acct-no { font-family: "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .08em;
  font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.acct-tag { font-size: 11px; font-weight: 700; letter-spacing: .04em; border-radius: 999px;
  padding: 4px 10px; background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); }

/* ---- Form controls ---- */
.lib-label { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; display: block; }
.lib-input { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 13px; font-size: 15px; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.lib-input::placeholder { color: #A7A39E; }
.lib-input:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(229,51,11,.12); }
.lib-input.is-error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180,35,24,.12); }
.field-error { color: var(--danger); font-size: 12.5px; margin-top: 6px; }
.field-hint { color: var(--ink-mute); font-size: 12.5px; margin-top: 6px; }

/* SOTP / OTP — six separate boxes, auto-advance */
.sotp-box { width: 44px; height: 56px; text-align: center; font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 24px; font-weight: 700; border: 2px solid var(--line); border-radius: 12px;
  color: var(--ink); transition: border-color .15s; }
.sotp-box:focus { outline: none; border-color: var(--ink); }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600;
  font-size: 14px; padding: 10px 16px; border-radius: 12px; border: 1px solid transparent;
  transition: background .15s, filter .15s, border-color .15s; cursor: pointer; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled { background: var(--paper); color: var(--ink-mute); cursor: not-allowed; }
.btn-primary { background: var(--brand-600); color: #fff; }
.btn-primary:hover { filter: brightness(.95); }
.btn-gold { background: var(--gold); color: #3A2E0C; }
.btn-gold:hover { filter: brightness(.96); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-mute); }
.btn-block { width: 100%; }

/* ---- Pills / badges ---- */
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  padding: 4px 11px; border-radius: 999px; border: 1px solid transparent; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; }
.pill-ok { background: var(--ok-soft); color: var(--ok-deep); border-color: var(--ok-line); }
.pill-ok .dot { background: var(--ok); }
.pill-warn { background: var(--warn-bg); color: var(--gold-deep); border-color: #F2D89B; }
.pill-warn .dot { background: var(--gold); }
.pill-danger { background: #FDECEA; color: #B42318; border-color: #F4A98F; }
.pill-danger .dot { background: var(--danger); }

/* ---- Success badge (verified, result) ---- */
.ok-circle { background: var(--ok-soft); color: var(--ok-deep); }

/* ---- Banner (verification / alerts) ---- */
.banner { display: flex; gap: 14px; align-items: flex-start; border-radius: 12px; padding: 14px 16px; }
.banner-warn { background: var(--warn-bg); border: 1px solid #F2D89B; color: #6E4B00; }
.banner-warn .banner-ic { color: var(--gold-deep); }

/* ---- Credential / temp-password chip ---- */
.cred { font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 600; letter-spacing: .06em;
  background: var(--brand-50); color: var(--brand-900); border: 1px dashed #F4A98F; border-radius: 12px;
  padding: 12px 14px; font-size: 18px; display: flex; align-items: center; justify-content: space-between; }

/* ---- Transaction ledger rows (money-in teal +, money-out ink −) ---- */
.ledger-row { border-bottom: 1px solid var(--line); }
.ledger-row:last-child { border-bottom: 0; }

/* ---- Topbar (content header inside the shell) ---- */
.topbar { background: rgba(255,255,255,.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.navlink { font-size: 14px; font-weight: 500; color: var(--ink-soft); padding: 8px 12px; border-radius: 10px; }
.navlink:hover { background: var(--paper); color: var(--ink); }
.navlink.active { color: var(--brand-700); background: var(--brand-50); }

/* ---- Sidebar rail nav (left menu) — vermilion-soft active + left indicator bar ---- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 16rem; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--line);
  height: 100vh; position: sticky; top: 0; display: flex; flex-direction: column; }
.rail-link { position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--ink-mute);
  text-decoration: none; transition: background .15s, color .15s; margin-bottom: 2px; }
.rail-link:hover { background: var(--paper); color: var(--ink); }
.rail-link .rail-bar { position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px;
  background: var(--brand-600); opacity: 0; transition: opacity .15s; }
.rail-link.active { background: var(--brand-50); color: var(--brand-600); }
.rail-link.active .rail-bar { opacity: 1; }
.rail-link.is-disabled { color: #B9B4AF; cursor: not-allowed; }
.rail-link.is-disabled:hover { background: transparent; color: #B9B4AF; }
.rail-soon { margin-left: auto; font-size: 10px; font-weight: 600; letter-spacing: .02em;
  color: var(--ink-mute); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; }
/* hoverable list row (search results, account/txn rows) */
.row { border-bottom: 1px solid var(--line); }
.row:hover { background: #FBF9F8; }
.row:last-child { border-bottom: 0; }

/* ---- Language switcher (VI / EN) ---- */
.lang-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.lang-switch a { color: var(--ink-mute); text-decoration: none; padding: 2px 4px; border-radius: 6px; letter-spacing: .02em; }
.lang-switch a:hover { color: var(--ink-soft); }
.lang-switch a.active { color: var(--brand-700); }
.lang-switch .lang-sep { color: var(--line); }

/* ---- Locked / disabled state for gating ---- */
.locked { opacity: .55; filter: grayscale(.2); }

/* ---- Table ---- */
.lib-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.lib-table th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ink-mute); padding: 12px 14px; border-bottom: 1px solid var(--line); }
.lib-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.lib-table tr:hover td { background: #FBF9F8; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---- Financial overview donut (assets vs debt; CSS-only, no chart lib) ---- */
.finance-donut { position: relative; width: 150px; height: 150px; border-radius: 50%;
  background: conic-gradient(var(--brand-600) 0 var(--debt, 0%), var(--ok) var(--debt, 0%) 100%);
  display: grid; place-items: center; }
.finance-donut::before { content: ""; position: absolute; inset: 16px; background: var(--surface); border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(20,20,20,.06); }
.finance-donut-center { position: relative; text-align: center; padding: 0 8px; }
