/* RoyalCity Bank (DEMO) — mobile-first, desktop shell from 992px */
:root {
  --brand: #00609E;
  --brand-dark: #004a7c;
  --brand-deep: #00355a;
  --brand-mid: #0a5fa5;
  --brand-soft: #e8f1fa;
  --gold: #F2B01E;
  --ink: #0f1f33;
  --muted: #6b7a8c;
  --line: #e6ebf1;
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-a: rgba(255, 255, 255, .94);
  --soft: #f5f8fb;
  --seg: #eef2f7;
  --body: #dfe6ee;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --side-w: 264px;
}
* { -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { color: var(--ink); background: var(--body); -webkit-font-smoothing: antialiased; }
body[data-shell="app"] { overflow: hidden; }
a { color: var(--brand); }
.min-w-0 { min-width: 0; }
button, a, .choice, .pick-row { transition: transform .15s var(--ease), background-color .2s, border-color .2s, box-shadow .2s, color .2s, opacity .2s; }
.press:active, .btn:active, .choice:active, .pick-row:active, .acct-row:active, .tx:active { transform: scale(.985); }

/* ============ Shell ============ */
.shell { display: flex; height: 100vh; height: 100dvh; max-width: 560px; margin: 0 auto; background: var(--surface); box-shadow: 0 0 50px rgba(15, 31, 51, .18); }
.sidebar, .topbar { display: none; }
.stage { flex: 1; min-width: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.viewport { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.page { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; background: var(--surface); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.page.is-flow { display: flex; flex-direction: column; overflow: hidden; }
.is-flow > .sub-header, .is-flow > .demo-footer { flex: none; }
.is-flow > .app-main { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.is-flow > .app-main.has-steps { overflow: hidden; }
.page.is-top { z-index: 3; box-shadow: -14px 0 34px rgba(15, 31, 51, .16); }

.progress-line { position: absolute; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--gold), #ffd877); z-index: 60; opacity: 0; transition: width .4s var(--ease), opacity .3s; border-radius: 0 3px 3px 0; }
.progress-line.on { opacity: 1; }

/* ============ Bottom nav (mobile) ============ */
.bottom-nav { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); max-height: 90px; overflow: hidden; transition: max-height .35s var(--ease), padding .35s var(--ease), opacity .25s, border-color .25s; position: relative; z-index: 30; }
.bottom-nav a { text-align: center; text-decoration: none; color: #7a8796; font-size: .68rem; display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; }
.bottom-nav a .bi { font-size: 1.22rem; transition: transform .25s var(--ease); }
.bottom-nav a.active { color: var(--brand); font-weight: 600; }
.bottom-nav a.active .bi { transform: translateY(-2px) scale(1.08); }
.bottom-nav a.active::after { content: ""; position: absolute; top: -9px; width: 22px; height: 3px; border-radius: 0 0 4px 4px; background: var(--brand); }
body[data-kind="flow"] .bottom-nav { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; border-color: transparent; }

/* ============ Floating support + voice ============ */
.fab-support { position: absolute; left: 14px; bottom: 82px; z-index: 31; background: var(--brand-mid); color: #fff; border: 0; border-radius: 999px; padding: 11px 16px; font-size: .82rem; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; box-shadow: 0 8px 22px rgba(0, 74, 124, .38); transition: transform .2s var(--ease), bottom .35s var(--ease), padding .2s; }
.fab-support:hover { background: var(--brand-dark); }
.fab-support.pulse { animation: pulse 1.4s infinite; }
body[data-kind="flow"] .fab-support { display: none; }
.voice-panel { position: absolute; left: 12px; right: 12px; bottom: 134px; background: var(--surface); border-radius: 18px; padding: 14px 16px; box-shadow: 0 16px 44px rgba(15, 31, 51, .28); border: 1px solid var(--line); z-index: 32; animation: popIn .28s var(--ease); }
body[data-kind="flow"] .voice-panel { bottom: auto; top: 60px; }
.voice-note { font-size: .66rem; color: var(--muted); margin-top: 12px; }
.voice-wave { display: flex; gap: 4px; align-items: center; height: 28px; margin: 12px 0; }
.voice-wave i { width: 4px; height: 6px; border-radius: 4px; background: var(--brand); opacity: .5; }
.voice-wave.speaking i { opacity: 1; animation: wave .9s ease-in-out infinite; }
.voice-wave.speaking i:nth-child(2) { animation-delay: .12s; } .voice-wave.speaking i:nth-child(3) { animation-delay: .24s; }
.voice-wave.speaking i:nth-child(4) { animation-delay: .36s; } .voice-wave.speaking i:nth-child(5) { animation-delay: .48s; }
@keyframes wave { 0%, 100% { height: 6px; } 50% { height: 26px; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 8px 22px rgba(0, 74, 124, .38), 0 0 0 0 rgba(10, 95, 165, .5); } 60% { box-shadow: 0 8px 22px rgba(0, 74, 124, .38), 0 0 0 12px rgba(10, 95, 165, 0); } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

/* ============ Sub header ============ */
.sub-header { position: sticky; top: 0; z-index: 20; background: var(--surface-a); backdrop-filter: blur(8px); display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; height: 56px; flex: none; }
.sub-back, .sub-bell { display: grid; place-items: center; height: 56px; color: var(--ink); text-decoration: none; font-size: 1.2rem; position: relative; }
.sub-title { text-align: center; font-weight: 600; font-size: .95rem; }
.bell-dot { position: absolute; top: 15px; right: 14px; width: 9px; height: 9px; background: #ef4444; border-radius: 50%; border: 2px solid #fff; }

/* ============ Toast ============ */
.toast-wrap { position: sticky; top: 0; height: 0; z-index: 70; display: flex; justify-content: center; pointer-events: none; }
.toast-flash { margin-top: 12px; display: inline-flex; gap: 8px; align-items: center; background: #0f1f33; color: #fff; font-size: .82rem; padding: 10px 16px; border-radius: 999px; box-shadow: 0 10px 28px rgba(15, 31, 51, .3); animation: toastIn .4s var(--ease) both; max-width: calc(100% - 24px); }
.toast-flash.success .bi { color: #4ade80; } .toast-flash.error .bi { color: #fca5a5; }
.toast-flash.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* ============ Hero / dashboard ============ */
.dash-grid { display: grid; gap: 0; }
.hero { background: var(--brand) url('../img/wave.svg') center/cover no-repeat; color: #fff; padding: 18px 16px 26px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 70%); pointer-events: none; }
.hero-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .22); border: 2px solid rgba(255, 255, 255, .6); display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: #fff; text-decoration: none; flex: none; }
.hero-greet { text-align: center; font-weight: 600; font-size: .9rem; }
.hero-greet-lg { display: none; }
.hero-bell { color: #fff; font-size: 1.15rem; position: relative; text-align: right; text-decoration: none; }
.hero-bell .bell-dot { top: -3px; right: -1px; border-color: var(--brand); }
.acct-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .5); color: #fff; border-radius: 999px; padding: 5px 14px; font-size: .78rem; }
.acct-chip:hover { background: rgba(255, 255, 255, .22); }
.balance { font-size: 2.05rem; font-weight: 700; letter-spacing: -.5px; display: inline-flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.cur-badge { width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: #3a2a00; display: inline-grid; place-items: center; font-size: .9rem; font-weight: 700; }
.eye-btn { background: none; border: 0; color: rgba(255, 255, 255, .85); font-size: 1.1rem; padding: 0; }
.hero-meta { font-size: .72rem; opacity: .9; }
.hero-actions { display: flex; justify-content: space-around; margin-top: 22px; position: relative; z-index: 1; }
.hero-actions a { color: #fff; text-decoration: none; text-align: center; font-size: .78rem; }
.hero-actions .circle { width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--brand); display: grid; place-items: center; font-size: 1.15rem; margin: 0 auto 6px; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); transition: transform .25s var(--ease), box-shadow .25s; }
.hero-actions a:hover .circle { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0, 0, 0, .25); }
.hero-actions a:active .circle { transform: scale(.92); }

.sec { padding-bottom: 6px; }
.section-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; padding: 18px 16px 8px; }
.section-title .bi { color: var(--brand); }
.section-title .more { margin-left: auto; font-size: .75rem; font-weight: 600; text-decoration: none; }
.acct-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-decoration: none; color: inherit; border-radius: 12px; }
.acct-row:hover { background: var(--soft); }
.acct-row.current { background: var(--brand-soft); }
.acct-icon { width: 38px; height: 38px; display: grid; place-items: center; font-size: 1.5rem; flex: none; }
.acct-icon.checking { color: var(--brand); } .acct-icon.savings { color: #e7a50f; } .acct-icon.credit { color: #c0392b; }
.acct-name { font-weight: 600; font-size: .9rem; }
.acct-sub { font-size: .75rem; color: var(--muted); }
.acct-bal { margin-left: auto; font-weight: 600; font-size: .85rem; font-variant-numeric: tabular-nums; }
.panel { margin: 0 16px; border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--surface); }
.stat-pill { flex: 1; border-radius: 12px; padding: 10px 12px; }
.stat-in { background: #e9f7ef; color: #146c43; } .stat-out { background: #fdecea; color: #b02a37; }
.stat-pill .lbl { font-size: .7rem; opacity: .85; } .stat-pill .val { font-weight: 700; font-variant-numeric: tabular-nums; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 130px; margin-top: 14px; }
.bar-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; font-size: .68rem; color: var(--muted); }
.bar { width: 100%; max-width: 28px; background: linear-gradient(180deg, #1a86cc, var(--brand)); border-radius: 7px 7px 2px 2px; min-height: 3px; height: 3px; transition: height .7s var(--ease); }
.bar.zero { background: var(--line); }
.skel { background: linear-gradient(90deg, #eef2f7 25%, #f7f9fc 45%, #eef2f7 65%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-state { text-align: center; padding: 22px 12px; color: var(--muted); font-size: .85rem; }
.empty-state .bi { font-size: 2rem; color: var(--brand); opacity: .6; display: block; margin-bottom: 6px; }
.pot { padding: 10px 0; } .pot + .pot { border-top: 1px solid var(--line); }
.progress { height: 8px; border-radius: 99px; } .progress-bar { background: var(--brand); transition: width .8s var(--ease); }

/* ============ Buttons ============ */
.btn-brand { background: var(--brand-mid); color: #fff; border: 0; border-radius: 999px; padding: 13px 20px; font-weight: 600; position: relative; }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-dark); color: #fff; }
.btn-brand:disabled, .btn-brand.disabled { background: #9bbfdc; color: #fff; opacity: 1; }
.btn-brand.loading { color: transparent !important; pointer-events: none; }
.btn-brand.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-outline-brand { border: 1px solid var(--brand); color: var(--brand); border-radius: 999px; background: var(--surface); font-weight: 600; }
.btn-outline-brand:hover, .btn-outline-brand.active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.btn-danger-soft { background: #fdecea; color: #b02a37; border: 0; }
.btn-danger-soft:hover { background: #f9d6d2; color: #b02a37; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Flow screens + steps ============ */
.page-pad { padding: 8px 20px 24px; }
.big-q { font-size: 1.5rem; font-weight: 800; text-align: center; line-height: 1.22; margin: 24px 0 22px; letter-spacing: -.3px; }
.steps { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.step { position: absolute; inset: 0; display: none; flex-direction: column; background: var(--surface); }
.step.active { display: flex; }
.step-body { flex: 1; min-height: 0; min-width: 0; overflow-x: hidden; overflow-y: auto; padding: 6px 20px 16px; }
.cta-bar { flex: none; padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, var(--surface) 28%); }
.choice { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; cursor: pointer; background: var(--surface); position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:hover { border-color: #b9cfe3; }
.choice .bi.main { font-size: 1.35rem; color: var(--brand); }
.choice .t { font-weight: 600; font-size: .9rem; } .choice .s { font-size: .76rem; color: var(--muted); }
.choice .amt { margin-left: auto; font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; }
.choice .tick { margin-left: 10px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #cdd7e2; display: grid; place-items: center; color: #fff; font-size: .8rem; flex: none; transition: all .2s var(--ease); }
.choice .tick .bi { transform: scale(0); transition: transform .25s var(--ease); }
.choice.selected { border-color: var(--brand); background: linear-gradient(180deg, #f2f8fd, var(--brand-soft)); box-shadow: 0 0 0 1px var(--brand) inset, 0 8px 22px rgba(0, 96, 158, .1); }
.choice.selected .tick { background: var(--brand-mid); border-color: var(--brand-mid); }
.choice.selected .tick .bi { transform: scale(1); }
.pick-row { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); cursor: pointer; width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.pick-row .t { font-weight: 600; font-size: .88rem; } .pick-row .s { font-size: .78rem; color: var(--muted); }
.pick-row .chev { margin-left: auto; color: var(--muted); }
.flow-line { width: 1px; height: 38px; background: var(--line); margin: 4px auto; position: relative; }
.flow-line i { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--brand); }
.form-control, .form-select { border-radius: 12px; padding: .72rem .9rem; border-color: #d7dee7; font-size: .92rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .22rem rgba(0, 96, 158, .14); }
.form-label { font-size: .78rem; font-weight: 600; color: #3b4a5c; margin-bottom: 4px; }
.secure-note { text-align: center; font-size: .78rem; color: var(--muted); margin: 18px 0; }
.secure-note .bi { display: block; font-size: 1.1rem; margin-bottom: 4px; color: #3b4a5c; }
.amount-wrap { display: flex; align-items: baseline; justify-content: center; gap: 4px; margin: 6px 0 4px; }
.amount-wrap .cur { font-size: 2rem; font-weight: 700; color: var(--muted); }
.amount-input { font-size: 2.6rem; font-weight: 800; text-align: center; border: 0; border-radius: 0; padding: .2rem; width: 100%; max-width: 260px; background: transparent; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.amount-input:focus { box-shadow: none; }
.amount-line { height: 2px; background: var(--line); max-width: 300px; margin: 0 auto 10px; border-radius: 2px; position: relative; overflow: hidden; }
.amount-line::after { content: ""; position: absolute; inset: 0; background: var(--brand); transform: scaleX(0); transition: transform .35s var(--ease); }
.amount-wrap:focus-within + .amount-line::after { transform: scaleX(1); }
.field-err { color: #b02a37; font-size: .78rem; text-align: center; min-height: 20px; }
.chips { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 16px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-size: .8rem; font-weight: 600; color: #3b4a5c; }
.chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.summary-box { background: var(--soft); border-radius: 14px; padding: 12px 14px; font-size: .82rem; }
.summary-box .r { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.summary-box .r span:first-child { color: var(--muted); }
.wallet-box { background: var(--soft); border: 1px dashed #b8c7d8; border-radius: 12px; padding: 12px; font-size: .78rem; word-break: break-all; }

/* ============ Transactions + receipt ============ */
.tx { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
a.tx:hover { background: var(--soft); }
.tx-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 1rem; flex: none; }
.tx-ico.credit { background: #e9f7ef; color: #146c43; } .tx-ico.debit { background: #fdecea; color: #b02a37; }
.tx .d { font-weight: 600; font-size: .86rem; } .tx .m { font-size: .72rem; color: var(--muted); }
.tx .a { margin-left: auto; font-weight: 700; font-size: .86rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tx .a.credit { color: #146c43; }
.seg { display: flex; background: var(--seg); border-radius: 999px; padding: 4px; margin: 6px 16px 10px; }
.seg a, .seg button { flex: 1; text-align: center; border: 0; background: none; padding: 8px 0; font-size: .82rem; font-weight: 600; border-radius: 999px; color: var(--muted); text-decoration: none; }
.seg .on { background: var(--surface); color: var(--brand); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }

.receipt { text-align: center; padding: 28px 20px 10px; }
.check-anim { width: 84px; height: 84px; margin: 6px auto 14px; }
.check-anim circle { fill: none; stroke: #1fa463; stroke-width: 4; stroke-dasharray: 252; stroke-dashoffset: 252; animation: draw .6s .1s var(--ease) forwards; }
.check-anim path { fill: none; stroke: #1fa463; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .4s .55s var(--ease) forwards; }
.check-anim.plain circle, .check-anim.plain path { animation: none; stroke-dashoffset: 0; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.receipt-amount { font-size: 2.3rem; font-weight: 800; letter-spacing: -1px; margin: 4px 0; font-variant-numeric: tabular-nums; }
.status-chip { display: inline-block; background: #e9f7ef; color: #146c43; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.r-rows { margin: 22px 20px 0; border: 1px solid var(--line); border-radius: 16px; padding: 4px 14px; text-align: left; }
.r-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; font-size: .84rem; }
.r-row + .r-row { border-top: 1px solid var(--line); }
.r-row span:first-child { color: var(--muted); } .r-row span:last-child { font-weight: 600; text-align: right; word-break: break-word; }
.rise > * { animation: rise .55s var(--ease) both; } .rise > *:nth-child(2) { animation-delay: .06s; } .rise > *:nth-child(3) { animation-delay: .12s; } .rise > *:nth-child(4) { animation-delay: .18s; } .rise > *:nth-child(5) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ============ Cards ============ */
.bank-card { aspect-ratio: 1.586; border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; box-shadow: 0 14px 30px rgba(15, 31, 51, .2); border: 1px solid rgba(15, 31, 51, .06); position: relative; overflow: hidden; background-size: cover; }
.bank-card::before { content: ""; position: absolute; inset: 0; background: url('../img/wave.svg') center/cover; opacity: .55; mix-blend-mode: overlay; pointer-events: none; }
.bank-card > * { position: relative; }
.card-brand { font-weight: 700; display: flex; align-items: center; gap: 6px; font-size: 1rem; }
.card-chip { width: 36px; height: 27px; border-radius: 6px; background: linear-gradient(135deg, #e8d28a, #b8932f); margin-top: 14px; opacity: .9; }
.bank-card .card-num { font-size: 1rem; letter-spacing: 2px; font-weight: 600; font-variant-numeric: tabular-nums; }
.card-lbl { font-size: .62rem; opacity: .7; text-transform: uppercase; letter-spacing: .5px; }
.card-holder { font-size: .78rem; }
.bank-card.is-frozen { filter: grayscale(.85) brightness(.95); }
.frozen-tag { position: absolute !important; right: 12px; bottom: 12px; background: rgba(0, 0, 0, .65); color: #fff; font-size: .7rem; padding: 2px 8px; border-radius: 99px; }
.card-carousel { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 14px 0 18px; scrollbar-width: none; }
.card-carousel::-webkit-scrollbar { display: none; }
.card-carousel > * { flex: 0 0 78%; max-width: 340px; scroll-snap-align: center; transition: transform .35s var(--ease), opacity .35s; opacity: .55; transform: scale(.94); }
.card-carousel > .sel { opacity: 1; transform: none; }
.card-carousel > *:first-child { margin-left: max(11%, calc(50% - 170px)); }
.card-carousel > *:last-child { margin-right: max(11%, calc(50% - 170px)); }
.swatches { display: flex; justify-content: center; gap: 14px; margin: 6px 0 14px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; padding: 0; cursor: pointer; box-shadow: 0 0 0 1px #d5dde7; transition: transform .2s var(--ease), box-shadow .2s; }
.swatch:hover { transform: scale(1.1); }
.swatch.sel { box-shadow: 0 0 0 2px var(--brand); transform: scale(1.1); }

.card-intro { text-align: center; padding: 34px 22px 0; }
.card-intro h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.5px; line-height: 1.2; }
.card-intro p { color: #3b4a5c; font-size: .85rem; }
.stack3d { perspective: 1100px; height: 310px; display: grid; place-items: center; margin: 10px 0 0; }
.stack3d-inner { position: relative; width: 250px; height: 158px; transform-style: preserve-3d; transform: rotateX(58deg) rotateZ(-36deg); animation: floaty 5s ease-in-out infinite; }
.stack3d .bank-card { position: absolute; inset: 0; width: 250px; height: 158px; aspect-ratio: auto; font-size: 10px; padding: 10px 14px; box-shadow: 0 24px 40px rgba(15, 31, 51, .28); }
.stack3d .bank-card:nth-child(1) { transform: translateZ(76px); }
.stack3d .bank-card:nth-child(2) { transform: translateZ(0); }
.stack3d .bank-card:nth-child(3) { transform: translateZ(-76px); }
@keyframes floaty { 0%, 100% { transform: rotateX(58deg) rotateZ(-36deg) translateZ(0); } 50% { transform: rotateX(58deg) rotateZ(-36deg) translateZ(18px); } }
.loader-wrap { flex: 1; display: grid; place-items: center; }
.loader-ring { width: 92px; height: 92px; position: relative; display: grid; place-items: center; }
.loader-ring svg.ring { position: absolute; inset: 0; animation: spin 1.1s linear infinite; }
.loader-ring svg.ring circle { fill: none; stroke: #F2B01E; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 48 180; }
.loader-ring::before, .loader-ring::after { content: ""; position: absolute; border-radius: 50%; }
.loader-ring::before { inset: 0; border: 3px solid rgba(0, 96, 158, .15); }
.loader-ring::after { inset: 8px; border: 3px solid transparent; border-top-color: #00609E; animation: spin .8s linear infinite reverse; }
.type-card { display: block; border: 1.5px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 14px; cursor: pointer; position: relative; background: var(--surface); }
.type-card input { position: absolute; opacity: 0; pointer-events: none; }
.type-card:hover { border-color: #b9cfe3; }
.type-card.selected { border-color: var(--brand); background: linear-gradient(180deg, #f6fafe, #eaf3fb); box-shadow: 0 0 0 1px var(--brand) inset, 0 12px 28px rgba(0, 96, 158, .12); transform: translateY(-1px); }
.type-head { display: flex; justify-content: space-between; align-items: flex-start; }
.mini-card { width: 66px; height: 42px; border-radius: 8px; position: relative; box-shadow: 0 4px 10px rgba(15, 31, 51, .15); }
.mini-card::after { content: ""; position: absolute; left: 7px; bottom: 7px; width: 22px; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .6); }
.type-badge { font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; display: inline-flex; gap: 5px; align-items: center; }
.type-badge.gold { background: #fff4d6; color: #8a6100; } .type-badge.blue { background: #dcebf8; color: var(--brand); }
.type-title { font-weight: 700; margin-top: 14px; }
.type-fee { font-size: .85rem; color: #3b4a5c; margin: 2px 0 10px; }
.type-list { list-style: none; padding: 0; margin: 0; }
.type-list li { display: flex; align-items: center; gap: 10px; font-size: .84rem; padding: 4px 0; color: #25364a; }
.type-list .bi { color: #146c43; font-size: 1.05rem; }
.wallet-card + .wallet-card { margin-top: 28px; }
.card-meta { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pill { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); }
.pill.gold { background: #fff4d6; color: #8a6100; }
.is-new .bank-card { animation: cardPop .7s var(--ease) both; }
@keyframes cardPop { from { opacity: 0; transform: translateY(30px) rotate(-3deg) scale(.92); } to { opacity: 1; transform: none; } }

/* ============ Loans / profile helpers ============ */
.badge-ok { background: #e9f7ef; color: #146c43; }
.two-col { display: block; }
.hero-card { margin: 0 16px; padding: 16px; border-radius: 18px; color: #fff; background: var(--brand) url('../img/wave.svg') center/cover; }

/* ============ Footer ============ */
.demo-footer { text-align: center; font-size: .72rem; color: var(--muted); padding: 18px 16px; border-top: 1px solid var(--line); margin-top: 18px; background: var(--soft); }
.demo-footer.compact { margin-top: 0; padding: 6px 12px; border-top: 1px solid var(--line); font-size: .66rem; display: flex; gap: 8px; align-items: center; justify-content: center; }
.demo-footer.compact .demo-pill { margin: 0; font-size: .6rem; padding: 2px 8px; white-space: nowrap; }
.demo-footer:not(.compact) .demo-text { display: block; }
.demo-pill { display: inline-block; background: var(--gold); color: #3a2a00; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; font-size: .68rem; padding: 3px 10px; border-radius: 99px; margin-bottom: 6px; }

/* ============ Offcanvas / modal ============ */
.offcanvas-bottom { max-width: 520px; margin: 0 auto; border-radius: 22px 22px 0 0; height: auto; max-height: 80vh; }
.modal-content { border-radius: 20px; border: 0; }

/* ============ Notifications ============ */
.notif { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; }
.notif .dot { width: 9px; height: 9px; border-radius: 50%; background: transparent; margin-top: 6px; flex: none; }
.notif.unread { background: var(--brand-soft); } .notif.unread .dot { background: var(--brand); }
.notif .t { font-weight: 600; font-size: .88rem; } .notif .b { font-size: .8rem; color: #3b4a5c; } .notif .w { font-size: .7rem; color: var(--muted); margin-top: 2px; }

/* ============ Drawer (desktop) ============ */
.drawer { position: fixed; inset: 0; z-index: 1020; visibility: hidden; transition: visibility 0s .4s; }
.drawer.open { visibility: visible; transition: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(8, 24, 44, .45); opacity: 0; transition: opacity .35s; backdrop-filter: blur(2px); }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(500px, 100%); background: var(--surface); transform: translateX(104%); transition: transform .42s var(--ease); box-shadow: -20px 0 60px rgba(8, 24, 44, .25); }
.drawer.open .drawer-panel { transform: none; }
.drawer-view { position: absolute; inset: 0; overflow: hidden; }
.drawer-view .page { background: var(--surface); }

/* ============ Auth ============ */
.auth-body { overflow: auto; background: var(--surface); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.auth-brand { display: none; }
.auth-main { display: grid; align-items: center; justify-content: center; padding: 28px 22px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-logo, .brand-badge { display: inline-flex; align-items: center; width: auto; height: auto; background: transparent; box-shadow: none; }
.auth-logo { margin-bottom: 16px; }
.logo-mark { display: block; height: 78px; width: auto; max-width: 360px; object-fit: contain; background: #fff; border-radius: 14px; padding: 6px 12px; }
.auth-foot { text-align: center; font-size: .72rem; color: var(--muted); margin-top: 28px; }

/* ============ Desktop (>= 992px) ============ */
@media (min-width: 992px) {
  body[data-shell="app"] { background: var(--bg); }
  .shell { max-width: none; box-shadow: none; background: var(--bg); }
  .sidebar { display: flex; flex-direction: column; width: var(--side-w); flex: none; height: 100vh; height: 100dvh; padding: 22px 16px 16px; color: #fff; position: relative; overflow: hidden; background: linear-gradient(185deg, var(--brand-deep), var(--brand-dark) 45%, var(--brand) 100%); }
  .sidebar::before { content: ""; position: absolute; inset: 0; background: url('../img/wave.svg') center/cover; opacity: .8; pointer-events: none; }
  .sidebar > * { position: relative; }
  .side-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.05rem; letter-spacing: -.2px; padding: 4px 6px 22px; }
  .side-nav { display: flex; flex-direction: column; gap: 4px; }
  .side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: rgba(255, 255, 255, .8); text-decoration: none; font-weight: 500; font-size: .9rem; }
  .side-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .side-nav a.active { background: var(--surface); color: var(--brand); font-weight: 700; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
  .side-nav a .bi { font-size: 1.1rem; }
  .side-actions { margin-top: 26px; display: flex; flex-direction: column; gap: 8px; }
  .side-label { font-size: .68rem; text-transform: uppercase; letter-spacing: 1px; opacity: .65; padding: 0 6px; margin-bottom: 2px; }
  .side-actions a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .28); color: #fff; text-decoration: none; font-size: .86rem; font-weight: 600; }
  .side-actions a:hover { background: rgba(255, 255, 255, .14); transform: translateX(3px); }
  .side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .1); }
  .side-user-name { font-weight: 600; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-signout { font-size: .74rem; color: rgba(255, 255, 255, .75); text-decoration: none; }
  .side-signout:hover { color: #fff; text-decoration: underline; }
  .side-demo { text-align: center; margin-top: 12px; } .side-demo .demo-pill { margin: 0; }

  .topbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 36px 6px; flex: none; }
  .topbar-kicker { font-size: .78rem; color: var(--muted); }
  .topbar h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.5px; margin: 0; }
  .topbar-right { display: flex; align-items: center; gap: 14px; }
  .top-bell { width: 42px; height: 42px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--ink); text-decoration: none; position: relative; box-shadow: 0 2px 8px rgba(15, 31, 51, .08); }
  .top-bell .bell-dot { top: 8px; right: 9px; }
  .topbar .avatar { background: var(--brand); border-color: #fff; width: 42px; height: 42px; box-shadow: 0 2px 8px rgba(15, 31, 51, .15); }
  .bottom-nav { display: none; }

  .page { background: var(--bg); }
  .viewport .is-page .sub-header { display: none; }
  .is-page > .app-main { max-width: 1180px; margin: 0 auto; padding: 10px 36px 36px; }
  .demo-footer { background: transparent; border-top: 0; margin-top: 0; padding: 4px 36px 22px; }

  /* Focused flows opened directly (page refresh) sit in a centred card; normally they roll into the drawer. */
  .viewport .page.is-flow { overflow-y: auto; display: block; padding: 8px 0 24px; }
  .viewport .is-flow > .sub-header { max-width: 540px; margin: 0 auto; background: transparent; }
  .viewport .is-flow > .app-main { max-width: 540px; margin: 0 auto; height: min(740px, calc(100vh - 170px)); background: var(--surface); border-radius: 24px; box-shadow: 0 18px 50px rgba(15, 31, 51, .1); overflow: hidden; }
  .viewport .is-flow > .app-main:not(.has-steps) { overflow-y: auto; }
  .viewport .is-flow > .demo-footer { max-width: 540px; margin: 0 auto; }
  .drawer .is-flow > .app-main { max-width: none; height: auto; border-radius: 0; box-shadow: none; }

  /* Dashboard grid */
  .dash-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; grid-template-areas: "hero hero accounts" "grow grow accounts" "insight insight pots" "bills bills bills" "activity activity activity"; }
  .d-quick { grid-area: quick; }
  .d-hero { grid-area: hero; } .d-accounts { grid-area: accounts; } .d-insight { grid-area: insight; } .d-pots { grid-area: pots; } .d-grow { grid-area: grow; } .d-activity { grid-area: activity; } .d-bills { grid-area: bills; }
  .hero { border-radius: 26px; padding: 30px 32px 30px; display: flex; flex-direction: column; justify-content: center; box-shadow: 0 18px 40px rgba(0, 96, 158, .28); }
  .hero-top { display: none; }
  .hero-greet-lg { display: block; font-size: 1rem; font-weight: 600; opacity: .92; margin-bottom: 14px; }
  .hero .text-center { text-align: left !important; margin-top: 0 !important; }
  .balance { font-size: 3rem; }
  .hero-actions { justify-content: flex-start; gap: 18px; margin-top: 26px; }
  .hero-actions a { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); padding: 8px 18px 8px 8px; border-radius: 999px; font-weight: 600; font-size: .86rem; }
  .hero-actions a:hover { background: rgba(255, 255, 255, .24); }
  .hero-actions .circle { margin: 0; width: 36px; height: 36px; font-size: 1rem; box-shadow: none; }
  .sec { background: var(--surface); border-radius: 22px; border: 1px solid var(--line); padding-bottom: 14px; box-shadow: 0 6px 20px rgba(15, 31, 51, .04); }
  .sec .panel { border: 0; padding: 0 4px; margin: 0 16px; }
  .section-title { padding-top: 20px; }
  .acct-row { margin: 0 8px; }
  .bars { height: 170px; }
  .two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .card-col { background: var(--surface); border-radius: 22px; border: 1px solid var(--line); padding: 18px; box-shadow: 0 6px 20px rgba(15, 31, 51, .04); }
  .tx-card { background: var(--surface); border-radius: 22px; border: 1px solid var(--line); overflow: hidden; box-shadow: 0 6px 20px rgba(15, 31, 51, .04); }
  .fab-support { left: auto; right: 24px; bottom: 24px; }
  .voice-panel { left: auto; right: 24px; bottom: 84px; width: 340px; }
  body[data-kind="flow"] .fab-support { display: inline-flex; }
  body[data-kind="flow"] .voice-panel { top: auto; bottom: 84px; }
  .card-carousel > * { flex-basis: 300px; }

  /* Auth split screen */
  .auth-shell { grid-template-columns: 1.05fr 1fr; }
  .auth-brand { display: grid; align-items: center; padding: 56px; color: #fff; position: relative; overflow: hidden; background: linear-gradient(160deg, var(--brand-deep), var(--brand-dark) 40%, var(--brand)); }
  .auth-brand::before { content: ""; position: absolute; inset: 0; background: url('../img/wave.svg') center/cover; opacity: .9; }
  .auth-brand-inner { position: relative; max-width: 460px; }
  .brand-row { display: flex; align-items: center; gap: 14px; margin-bottom: 56px; }
  .brand-row .brand-badge { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); }
  .brand-name { font-size: 1.3rem; font-weight: 800; letter-spacing: -.3px; }
  .auth-brand h2 { font-size: 2.5rem; font-weight: 800; letter-spacing: -1px; line-height: 1.12; margin-bottom: 28px; }
  .auth-brand ul { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 14px; }
  .auth-brand li { display: flex; gap: 12px; align-items: center; opacity: .95; }
  .auth-brand li .bi { width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .15); display: grid; place-items: center; }
}
@media (min-width: 1400px) { .dash-grid { gap: 24px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============ Additions ============ */
.flow-form { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.flow-form > .step-body { flex: 1; min-height: 0; min-width: 0; overflow-x: hidden; overflow-y: auto; }
.wallet-grid { display: grid; gap: 28px; }
.pay-wrap { padding-bottom: 12px; }
.pay-wrap .tx-card { margin: 0; }
.chip.active { background: var(--brand-soft); }
@media (min-width: 992px) {
  .wallet-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
  .card-intro { max-width: 560px; margin: 24px auto; background: var(--surface); border-radius: 28px; padding: 40px; box-shadow: 0 18px 50px rgba(15, 31, 51, .08); }
  .pay-wrap { max-width: 820px; margin: 0 auto; }
  .tx-card { margin-top: 4px; }
}
button.sub-bell { background: none; border: 0; padding: 0; width: 100%; }
@media (max-width: 991.98px) { .is-page > .demo-footer { padding-bottom: 72px; } }


/* ============ v3: rolling feedback ============ */
.rolling { pointer-events: none; position: relative; }
.btn.rolling, a.btn-brand.rolling { color: transparent !important; }
.btn.rolling::after, .circle.rolling::after { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border: 2px solid var(--brand); border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-brand.rolling::after { border-color: rgba(255, 255, 255, .5); border-top-color: #fff; }
.circle.rolling i { opacity: 0; }
.hero-actions a.rolling, .acct-row.rolling, .tx.rolling, .pick-row.rolling, a.rolling:not(.btn) { opacity: .7; }
.bottom-nav a.rolling .bi, .side-nav a.rolling .bi, .side-actions a.rolling .bi { animation: spin .8s linear infinite; }
.roll-overlay { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; background: rgba(8, 24, 44, .45); backdrop-filter: blur(8px); animation: fadeIn .2s; }
.roll-overlay[hidden] { display: none; }
.roll-card { text-align: center; background: #fff; border-radius: 28px; padding: 28px 32px 24px; box-shadow: 0 24px 60px rgba(8, 24, 44, .28); min-width: 240px; }
.roll-text { margin-top: 14px; font-weight: 700; font-size: .95rem; color: #0b2540; }
.rc-loader { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; height: 14px; }
.rc-loader i { width: 10px; height: 10px; border-radius: 50%; background: #00609E; animation: rcBounce .9s infinite ease-in-out; }
.rc-loader i:nth-child(2) { animation-delay: .15s; background: #F2B01E; }
.rc-loader i:nth-child(3) { animation-delay: .3s; }
@keyframes rcBounce { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-7px); opacity: 1; } }
.dep-wallet { margin: 4px 0 8px; padding: 16px; border-radius: 18px; background: linear-gradient(180deg, #f7fbff, #eef5fb); border: 1px solid #d5e4f2; text-align: center; }
.dep-wallet #depQr { display: inline-flex; justify-content: center; background: #fff; border-radius: 16px; padding: 10px; box-shadow: 0 8px 24px rgba(11, 37, 64, .08); min-height: 220px; min-width: 220px; }
.dep-wallet #depQr canvas { display: none !important; }
.dep-wallet #depQr img { width: 220px !important; height: 220px !important; display: block !important; }
.dep-net { margin-top: 10px; font-weight: 800; letter-spacing: .02em; }
.dep-addr { margin: 6px 0 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; word-break: break-all; color: #334155; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============ v3: PIN pad ============ */
.pin-overlay { position: fixed; inset: 0; z-index: 1150; background: rgba(8, 24, 44, .5); display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(3px); animation: fadeIn .2s; }
.pin-overlay[hidden] { display: none; }
.pin-sheet { width: min(420px, 100%); background: var(--surface); border-radius: 26px 26px 0 0; padding: 26px 22px calc(18px + env(safe-area-inset-bottom)); text-align: center; position: relative; animation: sheetUp .35s var(--ease); }
@media (min-width: 576px) { .pin-overlay { align-items: center; } .pin-sheet { border-radius: 26px; } }
.pin-close { position: absolute; right: 14px; top: 14px; border: 0; background: var(--soft); width: 34px; height: 34px; border-radius: 50%; color: var(--ink); }
.pin-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 1.6rem; margin: 0 auto 10px; }
.pin-sheet h2 { font-size: 1.15rem; font-weight: 800; margin: 0; }
.pin-sheet p { color: var(--muted); font-size: .84rem; margin: 4px 0 16px; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin-bottom: 6px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--brand); transition: all .15s; }
.pin-dots i.on { background: var(--brand); transform: scale(1.12); }
.pin-dots.shake { animation: shake .4s; }
.pin-error { min-height: 20px; color: #d6455a; font-size: .8rem; margin-bottom: 6px; }
.pin-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; margin: 0 auto; }
.pin-keys button { height: 56px; border: 0; border-radius: 16px; background: var(--soft); font-size: 1.35rem; font-weight: 600; color: var(--ink); }
.pin-keys button:active { background: var(--brand-soft); transform: scale(.95); }
.pin-hint { font-size: .72rem; color: var(--muted); margin-top: 14px; }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============ v3: bills, search, categories, quick send ============ */
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; min-width: 0; gap: 12px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px; border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer; font-size: .8rem; font-weight: 600; background: var(--surface); position: relative; text-align: center; }
.cat-tile input { position: absolute; opacity: 0; pointer-events: none; }
.cat-tile .ico { width: 46px; height: 46px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 1.3rem; }
.cat-tile:hover { border-color: #b9cfe3; }
.cat-tile.selected { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; background: var(--brand-soft); }
.search-box { position: relative; margin: 0 16px 10px; }
.search-box .bi { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input { padding-left: 40px; border-radius: 999px; }
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; align-items: center; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-row .chip { white-space: nowrap; }
.cat-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--line); margin: 8px 0 12px; }
.cat-bar i { display: block; height: 100%; width: 0; transition: width .9s var(--ease); }
.cat-legend .row { display: flex; align-items: center; gap: 8px; font-size: .8rem; padding: 4px 0; }
.cat-legend .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.cat-legend .row .amt { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.cat-legend .row .pc { color: var(--muted); width: 38px; text-align: right; }
.quick { display: flex; gap: 14px; overflow-x: auto; padding: 4px 16px 8px; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); font-size: .74rem; min-width: 58px; }
.quick a:hover .q-av { transform: translateY(-3px); }
.q-av { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; font-size: .9rem; transition: transform .25s var(--ease); }
.q-add { background: var(--soft); color: var(--brand); border: 1.5px dashed var(--brand); font-size: 1.2rem; }
.sec.d-quick { padding-bottom: 12px; }
.theme-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ============ v3: dark theme ============ */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e9eff7; --muted: #93a4b8; --line: #23364b; --bg: #0a121c; --surface: #0f1b2a; --surface-a: rgba(15, 27, 42, .92);
  --soft: #14253a; --seg: #162a40; --brand: #4aa8ea; --brand-dark: #0c4f87; --brand-soft: #12314d; --body: #060c14;
}
:root[data-theme="dark"] .hero, :root[data-theme="dark"] .hero-card { background-color: #00609E; }
:root[data-theme="dark"] .stat-in, :root[data-theme="dark"] .tx-ico.credit { background: #10301f; color: #6ee7a0; }
:root[data-theme="dark"] .stat-out, :root[data-theme="dark"] .tx-ico.debit { background: #3a1519; color: #fca5a5; }
:root[data-theme="dark"] .tx .a.credit { color: #6ee7a0; }
:root[data-theme="dark"] .choice.selected, :root[data-theme="dark"] .type-card.selected { background: linear-gradient(180deg, #112a42, #0f3350); }
:root[data-theme="dark"] .skel { background: linear-gradient(90deg, #14253a 25%, #1b3250 45%, #14253a 65%); background-size: 200% 100%; }
:root[data-theme="dark"] .btn-danger-soft { background: #3a1519; color: #fca5a5; }
:root[data-theme="dark"] .btn-danger-soft:hover { background: #4a1b20; color: #fca5a5; }
:root[data-theme="dark"] .status-chip, :root[data-theme="dark"] .badge-ok { background: #10301f; color: #6ee7a0; }
:root[data-theme="dark"] .type-badge.gold, :root[data-theme="dark"] .pill.gold { background: #3a2d0a; color: #f5c04a; }
:root[data-theme="dark"] .type-badge.blue, :root[data-theme="dark"] .pill { background: #12314d; color: #7cc0f2; }
:root[data-theme="dark"] .type-list li { color: #cdd9e6; }
:root[data-theme="dark"] .big-q, :root[data-theme="dark"] .card-intro h1 { color: var(--ink); }
:root[data-theme="dark"] .card-intro p, :root[data-theme="dark"] .form-label { color: #b7c4d4; }
:root[data-theme="dark"] .notif .b, :root[data-theme="dark"] .chip { color: #cdd9e6; }
:root[data-theme="dark"] .check-anim circle, :root[data-theme="dark"] .check-anim path { stroke: #4ade80; }
:root[data-theme="dark"] .toast-flash { background: #e9eff7; color: #0f1f33; }
:root[data-theme="dark"] .sidebar, :root[data-theme="dark"] .auth-brand { filter: none; }
:root[data-theme="dark"] .alert-success { background: #10301f; border-color: #1c5a37; color: #6ee7a0; }
:root[data-theme="dark"] .roll-overlay { background: rgba(6, 12, 20, .74); }
:root[data-theme="dark"] .bottom-nav a { color: #8fa2b8; }
:root[data-theme="dark"] .bottom-nav a.active { color: var(--brand); }
:root[data-theme="dark"] .demo-pill, :root[data-theme="dark"] .type-badge { color: #3a2a00; }
:root[data-theme="dark"] .type-badge.gold { color: #f5c04a; } :root[data-theme="dark"] .type-badge.blue { color: #7cc0f2; }
:root[data-theme="dark"] .modal-content, :root[data-theme="dark"] .offcanvas { background-color: #0f1b2a; }

/* ============ v4: auth wizard, nav groups, alerts ============ */
.auth-card.wide { max-width: 520px; }
.demo-login { background: #fffbea; border: 1px solid #f3dd8a; border-radius: 14px; color: #5b4a00; }
:root[data-theme="dark"] .demo-login { background: #2a2410; border-color: #5b4a12; color: #f5e3a0; }
.wiz-progress { margin: 4px 0 18px; }
.wiz-bar { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; }
.wiz-bar i { display: block; height: 100%; width: 25%; background: linear-gradient(90deg, var(--brand), var(--gold, #F2B01E)); border-radius: 6px; transition: width .45s var(--ease); }
.wiz-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: .72rem; color: var(--muted); font-weight: 600; }
.wiz-labels span.on { color: var(--brand); } .wiz-labels span.cur { color: var(--ink); }
.auth-steps { flex: none; height: 420px; transition: height .32s var(--ease); }
.auth-steps .step { background: transparent; padding: 2px 2px 0; overflow: visible; }
.auth-steps .step-inner { flex: none; width: 100%; padding: 2px 3px 4px; }
.wiz-h { font-size: 1.05rem; font-weight: 700; margin: 0 0 14px; }
.strength { display: flex; gap: 4px; align-items: center; margin-top: 8px; }
.strength i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); transition: background .25s; }
.strength span { font-size: .7rem; color: var(--muted); min-width: 56px; text-align: right; }
.strength[data-s="1"] i:nth-child(-n+1) { background: #dc2626; } .strength[data-s="2"] i:nth-child(-n+2) { background: #f59e0b; }
.strength[data-s="3"] i:nth-child(-n+3) { background: #84cc16; } .strength[data-s="4"] i { background: #16a34a; }
.pin-input { letter-spacing: .35em; text-align: center; font-weight: 700; }
.invalid-feedback { font-size: .76rem; }
.pin-dots { gap: 12px; } .pin-dots i { width: 13px; height: 13px; }
.pin-forgot { color: var(--brand); font-weight: 600; text-decoration: none; } .pin-forgot:hover { text-decoration: underline; }
.site-alert { display: flex; align-items: center; gap: 10px; padding: 9px 14px; font-size: .82rem; font-weight: 500; color: #0b3b60; background: #dff0fc; border-bottom: 1px solid #b9dcf3; flex: none; position: relative; z-index: 5; }
.site-alert > span { flex: 1; min-width: 0; } .site-alert button { background: none; border: 0; color: inherit; opacity: .7; padding: 2px 4px; }
.site-alert.is-warning { background: #fff4d6; color: #6b4a00; border-color: #f1d98b; }
.site-alert.is-danger { background: #fde2e4; color: #7a1020; border-color: #f4b6bd; }
.site-alert.is-success { background: #dcf5e4; color: #0f5130; border-color: #a9e2bd; }
.side-label { margin-top: 14px; }
.side-nav a .side-badge { margin-left: auto; font-style: normal; font-size: .68rem; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 10px; background: var(--gold, #F2B01E); color: #3a2a00; }
.side-nav a .side-badge.warn { background: #ffd2d6; color: #8a1424; }
.side-nav { overflow-y: auto; min-height: 0; flex: 1 1 auto; padding-right: 2px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.3) transparent; }
.side-user { margin-top: 12px; flex: none; }

/* ============ v4: feature components ============ */
.side-nav a { padding: 9px 14px; font-size: .88rem; }
.side-label-m { font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; margin: 6px 2px 8px; }
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); text-decoration: none; text-align: left; font: inherit; position: relative; box-shadow: 0 4px 14px rgba(15, 31, 51, .04); min-width: 0; }
.tile:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 96, 158, .12); color: var(--ink); }
.tile b { font-size: .92rem; } .tile small { color: var(--muted); font-size: .74rem; line-height: 1.35; }
.tile .ti { width: 42px; height: 42px; border-radius: 13px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 1.2rem; margin-bottom: 6px; position: relative; }
.tile-dot { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: #e5173a; color: #fff; font-size: .65rem; font-style: normal; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
@media (min-width: 768px) { .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.menu-user { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.avatar.lg { width: 52px; height: 52px; font-size: 1.1rem; flex: none; }
.kyc-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: #fff6df; border: 1px solid #f1d98b; color: #5b4300; text-decoration: none; }
.kyc-banner > .bi:first-child { font-size: 1.5rem; color: #d98f00; } .kyc-banner span { flex: 1; font-size: .86rem; line-height: 1.35; } .kyc-banner small { opacity: .85; }
:root[data-theme="dark"] .kyc-banner { background: #2a2410; border-color: #5b4a12; color: #f5e3a0; }
.kyc-hero { display: flex; gap: 16px; align-items: center; padding: 20px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); }
.kyc-hero.kyc-verified { background: linear-gradient(135deg, #15803d, #0f5c2c); } .kyc-hero.kyc-pending { background: linear-gradient(135deg, #d98f00, #a86c00); } .kyc-hero.kyc-rejected { background: linear-gradient(135deg, #dc2626, #a11414); }
.kyc-ico { width: 54px; height: 54px; border-radius: 16px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 1.6rem; flex: none; }
.kyc-table th, .kyc-table td { font-size: .82rem; padding: .5rem .4rem; background: transparent; color: var(--ink); } .kyc-table th { color: var(--muted); font-weight: 600; }
.upload-box { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 26px 16px; border: 2px dashed #b9cfe3; border-radius: 18px; background: var(--soft); cursor: pointer; transition: all .2s; }
.upload-box:hover { border-color: var(--brand); background: var(--brand-soft); } .upload-box > .bi { font-size: 2rem; color: var(--brand); } .upload-box small { color: var(--muted); }
.upload-box.has-file { border-style: solid; border-color: #16a34a; } .up-prev { max-width: 100%; max-height: 150px; border-radius: 10px; margin-top: 8px; } .up-name { font-size: .78rem; color: #16a34a; font-weight: 600; word-break: break-all; }
.plan-grid { display: grid; gap: 12px; grid-template-columns: 1fr; } @media (min-width: 768px) { .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plan { display: flex; gap: 14px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); }
a.plan:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 96, 158, .12); color: var(--ink); }
.plan-static { border: 0; background: var(--soft); align-items: center; }
.plan-ico { width: 44px; height: 44px; flex: none; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 1.3rem; }
.plan-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: .76rem; color: var(--muted); } .plan-stats b { color: var(--ink); }
.risk { font-size: .66rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; } .risk-low { background: #dcf5e4; color: #0f5130; } .risk-medium { background: #fff1cc; color: #7a5200; } .risk-high { background: #fde2e4; color: #7a1020; }
.coin { width: 38px; height: 38px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .9rem; flex: none; } .coin.lg { width: 48px; height: 48px; font-size: 1.1rem; }
.tx.market { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; }
.tx.market .spark-wrap { opacity: .95; } @media (max-width: 380px) { .tx.market .spark-wrap { display: none; } .tx.market { grid-template-columns: 38px minmax(0, 1fr) auto; } }
.tx .coin + div { min-width: 0; }
.chg { font-size: .74rem; font-weight: 700; } .chg.up { color: #16a34a; } .chg.down { color: #dc2626; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; margin: 0 4px 0 6px; animation: livepulse 1.6s infinite; }
@keyframes livepulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74,222,128,.6); } 50% { opacity: .6; box-shadow: 0 0 0 6px rgba(74,222,128,0); } }
.asset-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 12px; }
.chart-box { background: var(--soft); border-radius: 16px; padding: 10px; margin-bottom: 10px; } .chart-box .spark { width: 100%; height: auto; display: block; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--seg); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; padding: 10px; border-radius: 11px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--brand); box-shadow: 0 3px 10px rgba(0,0,0,.08); } .seg.sell button.on { color: #dc2626; }
.stmt-sum { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; } @media (min-width: 768px) { .stmt-sum { grid-template-columns: repeat(4, 1fr); } }
.stmt-sum div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; } .stmt-sum small { display: block; color: var(--muted); font-size: .72rem; } .stmt-sum b { font-size: 1.02rem; }
.chat-page { display: flex; flex-direction: column; min-height: 100%; }
.chat { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 4px 0 12px; }
.chat-day { text-align: center; font-size: .72rem; color: var(--muted); margin: 8px 0 2px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 18px; font-size: .9rem; line-height: 1.4; word-break: break-word; }
.bubble small { display: block; font-size: .66rem; opacity: .65; margin-top: 4px; }
.bubble.in { background: var(--soft); border: 1px solid var(--line); border-bottom-left-radius: 6px; align-self: flex-start; }
.bubble.out { background: var(--brand); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.chat-form { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 0 4px; background: linear-gradient(180deg, transparent, var(--surface) 30%); }
.chat-form textarea { resize: none; border-radius: 16px; } .chat-form .btn { width: 48px; flex: none; }
.grow-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 16px 6px; }
.grow-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.grow-tile:hover { border-color: var(--brand); color: var(--ink); transform: translateY(-2px); } .grow-tile .bi { font-size: 1.3rem; color: var(--brand); } .grow-tile b { font-size: .86rem; } .grow-tile small { font-size: .68rem; color: var(--muted); }

.popup-card { border: 0; border-radius: 22px; overflow: hidden; position: relative; } .popup-img { width: 100%; max-height: 190px; object-fit: cover; display: block; }
.popup-x { position: absolute; top: 12px; right: 12px; z-index: 3; background-color: rgba(255,255,255,.9); border-radius: 50%; padding: 8px; }
.status-chip.is-pending, .status-chip.is-processing { background: #fff1cc; color: #7a5200; } .status-chip.is-declined { background: #fde2e4; color: #7a1020; }
.empty-state .bi.text-success { color: #16a34a !important; }
@media (max-width: 991.98px) {
  .page-pad { padding-left: 16px; padding-right: 16px; }
  .app-main .row > [class*="col-"] { min-width: 0; }
}
:root[data-theme="dark"] .risk-low { background: #0f2e1c; color: #8be3ae; } :root[data-theme="dark"] .risk-medium { background: #3a2c08; color: #f5d27a; } :root[data-theme="dark"] .risk-high { background: #3a1018; color: #f5a3ad; }
:root[data-theme="dark"] .upload-box { border-color: #2a4560; } :root[data-theme="dark"] .status-chip.is-pending { background: #3a2c08; color: #f5d27a; }
.flash-up { animation: fup 1s ease-out; } .flash-down { animation: fdown 1s ease-out; }
@keyframes fup { 0% { color: #16a34a; } 100% { color: inherit; } } @keyframes fdown { 0% { color: #dc2626; } 100% { color: inherit; } }

.menu-user .avatar { background: var(--brand); color: #fff; }
@media (max-width: 991.98px) {
  .fab-support { left: auto; right: 14px; bottom: 78px; width: 46px; height: 46px; padding: 0; justify-content: center; }
  .fab-support span { display: none; } .fab-support .bi { font-size: 1.15rem; }
}
.side-nav a { padding: 7px 12px; font-size: .85rem; } .side-brand { padding-bottom: 12px; } .side-label { margin-top: 10px; }
.side-user { padding: 9px 12px; }
@media (min-width: 992px) and (max-height: 940px) { .side-demo { display: none; } .sidebar { padding-top: 16px; } }

/* v5 — dark-mode form controls, never hard-coded white */
:root[data-theme="dark"] .form-control, :root[data-theme="dark"] .form-select, :root[data-theme="dark"] .input-group-text { background-color: #0b1623; color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .form-control::placeholder { color: #5f7389; }
:root[data-theme="dark"] .form-control:disabled, :root[data-theme="dark"] .form-control[readonly] { background-color: #0d1a29; }
:root[data-theme="dark"] .text-muted, :root[data-theme="dark"] .form-text { color: var(--muted) !important; }

/* v5 — markets */
.coin.sm { width: 24px; height: 24px; font-size: .68rem; }
.gold-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; color: #3a2a00; text-decoration: none; background: linear-gradient(135deg, #fde68a, #f5b82e 55%, #d4890b); box-shadow: 0 10px 26px rgba(212, 137, 11, .28); }
.gold-card:hover { color: #3a2a00; transform: translateY(-2px); } .gold-card .chg { background: rgba(255,255,255,.55); border-radius: 99px; padding: 1px 8px; display: inline-block; }
.gold-ico { width: 52px; height: 52px; border-radius: 16px; background: rgba(255,255,255,.55); display: grid; place-items: center; font-size: 1.6rem; flex: none; }
.mover { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; color: var(--ink); text-decoration: none; white-space: nowrap; font-size: .82rem; flex: none; }
.adv-chart { border: 1px solid var(--line); border-radius: 16px; padding: 8px; margin-bottom: 12px; background: var(--surface); }
.ch-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.seg-mini { display: inline-flex; background: var(--seg, #eef2f7); border-radius: 10px; padding: 2px; }
.seg-mini button { border: 0; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 600; padding: 4px 8px; border-radius: 8px; }
.seg-mini button.on { background: var(--surface); color: var(--brand); box-shadow: 0 1px 3px rgba(15,31,51,.12); }
.ch-tip { color: var(--muted); min-height: 1.3em; font-variant-numeric: tabular-nums; font-size: .72rem; }
.ch-wrap { position: relative; } .ch-wrap canvas { width: 100%; height: 330px; display: block; touch-action: pan-y; }
.ch-load { position: absolute; inset: 0; display: none; place-items: center; background: color-mix(in srgb, var(--surface) 70%, transparent); } .adv-chart.loading .ch-load { display: grid; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; } @media (min-width: 576px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-grid > div { background: var(--soft); border-radius: 12px; padding: 8px 10px; } .stat-grid small { display: block; color: var(--muted); font-size: .68rem; } .stat-grid b { font-size: .86rem; font-variant-numeric: tabular-nums; }
.range-bar { display: flex; align-items: center; gap: 8px; font-size: .7rem; color: var(--muted); } .range-bar > span { flex: 1; height: 6px; border-radius: 6px; background: linear-gradient(90deg, #dc2626, #f59e0b, #16a34a); position: relative; } .range-bar i { position: absolute; top: -4px; width: 4px; height: 14px; background: var(--ink); border-radius: 2px; transform: translateX(-50%); }
.book-box { border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; background: var(--surface); } .book-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; font-size: .84rem; }
.book { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .bk-h, .bk-r { display: flex; justify-content: space-between; gap: 8px; font-size: .74rem; font-variant-numeric: tabular-nums; padding: 1px 0; } .bk-h { color: var(--muted); }
.bk-r.bid span:first-child { color: #16a34a; } .bk-r.ask span:first-child { color: #dc2626; } .recent .bk-r span:nth-child(2) { margin-left: auto; margin-right: auto; }
.countdown { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 6px; padding: 5px 12px; border-radius: 99px; background: linear-gradient(90deg, #e0f0ff, #fff1cc); color: #0b4a7a; font-weight: 700; font-variant-numeric: tabular-nums; font-size: .9rem; } .countdown small { font-weight: 500; opacity: .75; }
:root[data-theme="dark"] .countdown { background: linear-gradient(90deg, #12314d, #3a2f10); color: #cfe6fb; }

/* v5 — AI call */
.voice-panel { max-height: min(560px, calc(100vh - 90px)); overflow-y: auto; z-index: 60; }
.vp-av { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #2f9bd8); color: #fff; display: grid; place-items: center; font-size: 1.1rem; }
.voice-log { max-height: 190px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.vl { font-size: .82rem; padding: 6px 10px; border-radius: 12px; max-width: 88%; line-height: 1.35; }
.vl.bot { background: var(--soft); color: var(--ink); align-self: flex-start; border-bottom-left-radius: 4px; }
.vl.me { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.vl.sys { background: #fff1cc; color: #7a4b00; align-self: stretch; max-width: 100%; font-size: .74rem; }
.voice-wave.listening i { opacity: 1; animation: wave 1.6s ease-in-out infinite; background: #16a34a; }

/* v5.1 — dashboard order: grow → insight → bills */
.bill-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 16px 6px; } @media (min-width: 992px) { .bill-row { grid-template-columns: repeat(8, 1fr); } }
.bill-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: .74rem; font-weight: 600; text-align: center; }
.bill-tile span { width: 40px; height: 40px; border-radius: 13px; background: var(--brand-soft, #e8f1fa); color: var(--brand); display: grid; place-items: center; font-size: 1.15rem; }
.bill-tile:hover { border-color: var(--brand); color: var(--ink); transform: translateY(-2px); }
/* Bootstrap's .row was leaking into the insight legend */
.cat-legend .row { flex-wrap: nowrap; margin: 0; --bs-gutter-x: 0; --bs-gutter-y: 0; }
.cat-legend .row > * { width: auto; max-width: none; padding: 0; margin-top: 0; flex-shrink: 1; }
.cat-legend .row > .dot { width: 10px; flex: none; } .cat-legend .row > .pc { width: 38px; flex: none; } .cat-legend .row > .amt { margin-left: auto; flex: none; }

/* v6: tidy scrollbars + flow pages never clip/shift sideways */
.step-body, .flow-form > .step-body { scrollbar-width: thin; scrollbar-color: rgba(120,140,160,.45) transparent; overscroll-behavior: contain; }
.step-body::-webkit-scrollbar { width: 6px; }
.step-body::-webkit-scrollbar-thumb { background: rgba(120,140,160,.45); border-radius: 6px; }
.is-flow .page, .is-flow .step, .flow-form { min-width: 0; max-width: 100%; transform: none; }
