/* CrestBank – main design system. Mobile-first. */
:root {
  --primary: #0866E8; --primary-dark: #063B78; --primary-light: #EAF3FF;
  --bg: #F5F8FC; --surface: #FFFFFF; --text: #152238; --muted: #718096; --line: #E4ECF6;
  --success: #16A34A; --danger: #DC2626; --warning: #F59E0B;
  --success-bg: #E8F7EE; --danger-bg: #FDECEC; --warning-bg: #FEF3DC; --info-bg: #EAF3FF;
  --shadow: 0 1px 2px rgba(8,38,90,.04), 0 6px 20px rgba(8,38,90,.06);
  --shadow-lg: 0 10px 40px rgba(8,38,90,.16);
  --radius: 18px; --radius-sm: 12px;
  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 68px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
[data-theme="dark"] {
  --bg: #0B1626; --surface: #112038; --text: #E8EEF8; --muted: #93A3BC; --line: #1E3150;
  --primary-light: #14305A; --success-bg: #11301F; --danger-bg: #3A1618; --warning-bg: #3B2C0C; --info-bg: #14305A;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: var(--primary-light); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(8,102,232,.55); outline-offset: 2px; border-radius: 8px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--primary); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip-link:focus { left: 8px; }
.icon { flex: none; }
.muted { color: var(--muted); }
.muted-strong { color: var(--primary); font-weight: 600; }
.center-text { text-align: center; }
.h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; text-align: center; }
.h2 { font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; }
.h3 { font-size: 1.1rem; font-weight: 700; }
.section-title { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.fine-print { font-size: .8rem; color: var(--muted); margin: 14px 4px; }
.pad { padding: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.desktop-only { display: none; }
.sandbox-pill.desktop-only { display: none; }

/* ---------- shell ---------- */
.app { min-height: 100vh; display: block; }
.sidebar { display: none; }
.main-col { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--safe-t)) 16px 10px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.topbar-title { font-size: 1.1rem; font-weight: 700; flex: 1; }
.topbar-logo { flex: 1; display: inline-flex; }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--primary-dark); }
.logo-text { font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; color: var(--primary-dark); }
[data-theme="dark"] .logo-text { color: #fff; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); background: var(--surface); box-shadow: var(--shadow); border: 0; cursor: pointer; }
.icon-btn:hover { text-decoration: none; background: var(--primary-light); }
.notif-badge, .count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.notif-badge { position: absolute; top: -4px; right: -4px; border: 2px solid var(--bg); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.avatar:hover { text-decoration: none; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.sandbox-pill { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; background: var(--warning-bg); color: #92590A; font-size: .78rem; font-weight: 600; padding: 6px 10px; border-radius: 999px; }
.content { padding: 8px 16px calc(var(--nav-h) + var(--safe-b) + 28px); max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; outline: none; }
.bottom-nav { position: fixed; inset: auto 0 0 0; z-index: 30; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); box-shadow: 0 -6px 24px rgba(8,38,90,.06); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: .7rem; font-weight: 600; min-height: 48px; }
.tab:hover { text-decoration: none; }
.tab.active { color: var(--primary); }
.tab.active .icon { stroke-width: 2.3; }

/* ---------- components ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.list { overflow: hidden; }
.list > * + * { border-top: 1px solid var(--line); }
.section { display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; border: 1.5px solid transparent; font: inherit; font-weight: 600; cursor: pointer; transition: transform .12s ease, background .15s ease, box-shadow .15s ease; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(8,102,232,.28); }
.btn-primary:hover { background: #0558CC; }
.btn-secondary { background: var(--primary-light); color: var(--primary); }
.btn-secondary:hover { background: #DCEBFF; }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary-light); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; font-size: 1.02rem; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .88rem; border-radius: 11px; }
.btn[disabled], .btn.is-loading { opacity: .65; cursor: not-allowed; pointer-events: none; }
.btn.is-loading::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.field { display: flex; flex-direction: column; gap: 6px; }
.fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.label { font-size: .86rem; font-weight: 600; color: var(--text); }
.input-wrap { position: relative; }
.input { width: 100%; min-height: 50px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: #A0AEC0; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(8,102,232,.14); }
.input:disabled { background: var(--bg); color: var(--muted); }
.input-lg { min-height: 58px; font-size: 1.25rem; font-weight: 600; }
.textarea { padding: 12px 14px; min-height: 120px; resize: vertical; }
.select { 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='%23718096' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.has-error .input { border-color: var(--danger); }
.error-text { color: var(--danger); font-size: .84rem; }
.help { color: var(--muted); font-size: .8rem; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.input-wrap .input[type="password"], .input-wrap .input[data-pw-visible] { padding-right: 48px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: .92rem; }
.alert .icon { display: inline-block; vertical-align: -3px; margin-right: 6px; }
.alert-error { background: var(--danger-bg); color: #A11919; }
.alert-success { background: var(--success-bg); color: #0F7A38; }
.alert-info { background: var(--info-bg); color: var(--primary-dark); }
[data-theme="dark"] .alert-info, [data-theme="dark"] .alert-error, [data-theme="dark"] .alert-success { color: var(--text); }
.alert-warn { background: var(--warning-bg); color: #92590A; }
.flashes { display: flex; flex-direction: column; gap: 8px; }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.badge-completed, .badge-active, .badge-answered { background: var(--success-bg); color: var(--success); }
.badge-pending, .badge-open { background: var(--warning-bg); color: #B7791F; }
.badge-failed, .badge-cancelled { background: var(--danger-bg); color: var(--danger); }
.sandbox-tag { display: inline-block; background: var(--warning-bg); color: #92590A; font-size: .62rem; font-weight: 800; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; vertical-align: middle; }
.avail { font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.avail-sandbox { background: var(--warning-bg); color: #92590A; }
.avail-live { background: var(--success-bg); color: var(--success); }
.avail-unavailable { background: var(--bg); color: var(--muted); }
.coin { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 700; color: #fff; background: var(--primary); flex: none; }
.coin-btc { background: #F7931A; } .coin-usdt { background: #26A17B; } .coin-usd { background: var(--primary); }
.coin-eur { background: #1E40AF; } .coin-gbp { background: #7C3AED; } .coin-ngn { background: #15803D; }

/* menu rows */
.menu-row, .setting-row, .session-row, .toggle-row, .wallet-row, .notif { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--text); background: transparent; border: 0; width: 100%; text-align: left; font: inherit; cursor: pointer; min-height: 62px; }
a.menu-row:hover, a.notif:hover { background: var(--bg); text-decoration: none; }
.menu-row.disabled { opacity: .6; cursor: not-allowed; }
.menu-row.danger { color: var(--danger); }
.menu-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--primary-light); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.menu-ic.danger, .menu-row.danger .menu-ic { background: var(--danger-bg); color: var(--danger); }
.menu-label { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 600; }
.menu-label small { font-weight: 400; font-size: .8rem; }
.chev { color: var(--muted); }
.wallet-main, .wallet-bal { display: flex; flex-direction: column; }
.wallet-main { flex: 1; min-width: 0; }
.wallet-bal { text-align: right; align-items: flex-end; gap: 2px; }
.toggle-row { justify-content: space-between; padding: 6px 0; min-height: 0; }
.toggle-row > span:first-child { display: flex; flex-direction: column; }
.toggle-row small, .setting-row small { font-weight: 400; }

/* switch */
.switch { position: relative; width: 50px; height: 30px; flex: none; display: inline-block; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.slider { position: absolute; inset: 0; background: #CBD5E1; border-radius: 999px; transition: background .2s; }
.slider::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::after { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 3px solid rgba(8,102,232,.55); outline-offset: 2px; }
.switch input:disabled { cursor: not-allowed; } .switch input:disabled + .slider { opacity: .5; }

/* key/value */
.kv { margin: 0; display: flex; flex-direction: column; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); flex: none; }
.kv dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }
.kv .total { font-size: 1.1rem; }
.kv.compact > div { padding: 9px 0; }
.card .kv + .stack, .card .kv + form, .card .kv + .btn { margin-top: 16px; }

/* segmented / chips */
.segmented { display: flex; gap: 8px; }
.scroll-x, .chips-row { overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.scroll-x::-webkit-scrollbar, .chips-row::-webkit-scrollbar { display: none; }
.seg, .seg-link { flex: none; }
.seg-link { padding: 9px 16px; border-radius: 999px; background: var(--surface); color: var(--muted); font-weight: 600; font-size: .9rem; box-shadow: var(--shadow); white-space: nowrap; }
.seg-link:hover { text-decoration: none; }
.seg-link.active { background: var(--primary); color: #fff; }
.seg { position: relative; flex: 1; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 14px; border: 1.5px solid var(--line); font-weight: 600; background: var(--surface); }
.seg input:checked + span { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.seg input:focus-visible + span { outline: 3px solid rgba(8,102,232,.55); outline-offset: 2px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.chip { border: 1.5px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.option-list { display: flex; flex-direction: column; gap: 10px; }
.option { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--surface); }
.option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.option-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--primary-light); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.option-main { flex: 1; display: flex; flex-direction: column; }
.radio-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #CBD5E1; flex: none; }
.option:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.option:has(input:checked) .radio-dot { border: 7px solid var(--primary); }
.option:has(input:focus-visible) { outline: 3px solid rgba(8,102,232,.55); outline-offset: 2px; }
.option.is-hidden { display: none; }
.amount-input { position: relative; }
.amount-input .input { padding-right: 70px; }
.amount-cur { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); }

/* balance card */
.greeting { padding: 4px 2px; }
.clock { margin: 2px 0 6px; font-size: .95rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.clock .clock-time { color: var(--primary); font-weight: 700; font-size: 1.05rem; letter-spacing: .01em; }
.home-grid { display: flex; flex-direction: column; gap: 16px; }
.balance-card { background: linear-gradient(145deg, #0A6BF2 0%, #0652C4 60%, #063B78 100%); color: #fff; border-radius: 24px; padding: 22px; box-shadow: 0 14px 34px rgba(8,102,232,.32); display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.balance-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.07); }
.balance-card.compact { padding: 18px 20px; }
.balance-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.balance-label { font-size: .92rem; opacity: .92; display: flex; align-items: center; gap: 8px; }
.balance-eye { width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255,255,255,.16); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.balance-amount { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; position: relative; z-index: 1; }
.balance-btc { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 700; position: relative; z-index: 1; }
.balance-btc small { font-weight: 400; opacity: .8; font-size: .8rem; }
.balance-note { font-size: .78rem; opacity: .85; display: flex; align-items: center; gap: 6px; margin-top: 4px; position: relative; z-index: 1; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.quick-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); font-weight: 600; font-size: .9rem; min-height: 96px; transition: transform .12s, box-shadow .15s; }
.quick-btn:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.q-ic { width: 48px; height: 48px; border-radius: 16px; background: var(--primary-light); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.action-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.action-row .btn { padding: 0 8px; }

/* transactions */
.tx-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--text); }
.tx-row:hover { background: var(--bg); text-decoration: none; }
.tx-icon { width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--primary-light); color: var(--primary); }
.tx-received .icon, .tx-deposit .icon { color: var(--success); } .tx-received, .tx-deposit { background: var(--success-bg); }
.tx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tx-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-sub { font-size: .74rem; color: var(--muted); }
.tx-title { font-size: .93rem; }
.tx-amount { font-size: .93rem; }
.tx-side .badge { font-size: .66rem; padding: 1px 7px; }
.tx-day { padding: 8px 14px 6px; font-size: .74rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); background: var(--bg); border-top: 1px solid var(--line); }
.tx-day:first-child { border-top: 0; border-radius: var(--radius) var(--radius) 0 0; }
.tx-compact .tx-row + .tx-row { border-top: 1px solid var(--line); }
.tx-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.tx-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.tx-amount.pos, .pos { color: var(--success); } .tx-amount.neg { color: var(--danger); } .tx-amount.dim { color: var(--muted); text-decoration: line-through; }
.tx-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-bottom: 12px; }
.pager { display: flex; justify-content: center; gap: 10px; }

/* result / empty */
.result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.result .kv { width: 100%; text-align: left; }
.result .stack { width: 100%; }
.result-icon { width: 72px; height: 72px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; animation: pop .35s ease-out; }
.result-icon.ok { background: var(--success-bg); color: var(--success); } .result-icon.bad { background: var(--danger-bg); color: var(--danger); } .result-icon.warn { background: var(--warning-bg); color: var(--warning); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.result-amount { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 36px 24px; }
.empty-icon { width: 68px; height: 68px; border-radius: 22px; background: var(--primary-light); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.empty p { color: var(--muted); max-width: 32ch; }
.feature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; color: var(--muted); }
.feature-list li { display: flex; gap: 10px; align-items: center; }
.feature-list .icon { color: var(--primary); }

/* search / banks */
.searchbar { position: relative; }
.searchbar .icon { position: absolute; left: 14px; top: 16px; color: var(--muted); }
.searchbar .input { padding-left: 42px; }
.bank-mono { width: 44px; height: 44px; border-radius: 14px; color: #fff; font-weight: 800; font-size: .9rem; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.dest-chip { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg); border-radius: 14px; }
.dest-chip span:last-child { display: flex; flex-direction: column; }
.addr { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

/* swap */
.swap-form { position: relative; }
.swap-box { background: var(--bg); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.swap-line { display: flex; gap: 10px; align-items: center; }
.swap-cur { width: 110px; flex: none; font-weight: 700; }
.swap-out { flex: 1; text-align: right; font-size: 1.3rem; font-weight: 700; word-break: break-all; }
.swap-flip { align-self: center; width: 48px; height: 48px; margin: -22px 0; z-index: 2; border-radius: 50%; border: 4px solid var(--surface); background: var(--primary); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform .25s; }
.swap-flip:hover { transform: rotate(180deg); }

/* credit card */
.credit-card { position: relative; aspect-ratio: 1.586; width: 100%; max-width: 420px; margin: 0 auto; padding: 22px; border-radius: 22px; color: #fff; background: linear-gradient(135deg, #0A6BF2 0%, #0652C4 55%, #063B78 100%); box-shadow: 0 16px 36px rgba(8,102,232,.34); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.credit-card::after { content: ""; position: absolute; right: -50px; bottom: -70px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); }
.credit-card.is-locked { filter: grayscale(.8) brightness(.85); }
.cc-top { display: flex; justify-content: space-between; align-items: center; font-weight: 800; position: relative; z-index: 1; }
.cc-network { font-style: italic; font-size: 1.3rem; letter-spacing: .02em; }
.cc-chip { width: 44px; height: 32px; border-radius: 7px; background: linear-gradient(135deg, #F5D27A, #D4A83B); }
.cc-number { font-size: clamp(1.1rem, 5.2vw, 1.5rem); letter-spacing: .12em; font-weight: 600; font-variant-numeric: tabular-nums; position: relative; z-index: 1; }
.cc-bottom { display: flex; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.cc-bottom small { display: block; font-size: .65rem; opacity: .75; text-transform: none; }
.cc-bottom span { font-weight: 700; font-size: .9rem; }
.cc-sandbox { position: absolute; top: 56px; right: 18px; font-size: .6rem; font-weight: 800; letter-spacing: .08em; background: rgba(255,255,255,.2); padding: 3px 8px; border-radius: 6px; z-index: 1; }
.cc-lock { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,.55); padding: 8px 14px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; font-weight: 700; z-index: 2; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* receipt */
.receipt { display: flex; flex-direction: column; gap: 10px; }
.receipt-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-bottom: 8px; border-bottom: 2px dashed var(--line); }
.receipt-title { font-size: .95rem; letter-spacing: .1em; color: var(--primary-dark); }
[data-theme="dark"] .receipt-title { color: #fff; }
.receipt-sandbox { background: var(--warning-bg); color: #92590A; font-weight: 700; font-size: .72rem; padding: 8px 10px; border-radius: 10px; text-align: center; }

/* notifications & misc */
.notif { align-items: flex-start; text-decoration: none; }
.notif.unread { background: var(--info-bg); }
.notif-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex: none; }
.profile-head { display: flex; align-items: center; gap: 16px; }
.thread { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.bubble { padding: 12px 14px; border-radius: 14px; background: var(--bg); max-width: 92%; }
.bubble.user { align-self: flex-end; background: var(--primary-light); }
.bubble p { white-space: pre-wrap; word-break: break-word; }
.faq-item summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 16px; font-weight: 600; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item p { padding: 0 16px 16px; color: var(--muted); }
.legal h3 { margin: 10px 0 0; font-size: 1rem; color: var(--text, inherit); }
.legal ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal { display: flex; flex-direction: column; gap: 12px; color: var(--muted); }
.demo-hint { display: flex; gap: 8px; align-items: flex-start; font-size: .82rem; color: var(--primary-dark); background: var(--info-bg); padding: 10px 12px; border-radius: 12px; }

/* toasts & sheets */
.toast-region { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 80; pointer-events: none; padding: 0 16px; }
.auth-body .toast-region { bottom: calc(16px + var(--safe-b)); }
.toast { background: #152238; color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: .92rem; max-width: 420px; animation: toast-in .25s ease-out; pointer-events: auto; }
.toast.error { background: #A11919; } .toast.success { background: #0F7A38; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(8,20,40,.5); z-index: 90; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; background: var(--surface); border-radius: 24px 24px 0 0; padding: 12px 20px calc(24px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; max-width: 560px; margin: 0 auto; animation: slide-up .28s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow-lg); }
@keyframes slide-up { from { transform: translateY(100%); } }
.sheet-handle { width: 40px; height: 4px; background: var(--line); border-radius: 2px; align-self: center; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
@media print { .sidebar, .topbar, .bottom-nav, .no-print, .toast-region { display: none !important; } body { background: #fff; } .content { padding: 0; max-width: none; } .card { box-shadow: none; } }

/* Bitcoin deposit card */
.deposit-card { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.deposit-title { margin: 0; font-size: 1.25rem; }
.deposit-net { margin: 0; }
.qr-box { position: relative; width: min(260px, 100%); background: #fff; border-radius: 20px; padding: 14px; box-shadow: 0 2px 14px rgba(0,0,0,.08); }
.qr-svg svg { display: block; width: 100%; height: auto; }
.qr-logo { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; border-radius: 50%; padding: 4px; line-height: 0; }
.deposit-addr { width: 100%; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.deposit-addr code { font-size: 1rem; font-weight: 700; word-break: break-all; overflow-wrap: anywhere; }
.deposit-card .btn { max-width: 420px; }


/* Account settings page polish */
.settings-intro{display:flex;align-items:center;gap:14px;padding:18px 20px;margin-bottom:16px;border:1px solid var(--border,#e5e7eb);border-radius:18px;background:var(--surface,#fff)}
.settings-intro-icon{width:46px;height:46px;flex:0 0 46px;display:grid;place-items:center;border-radius:14px;background:rgba(8,102,232,.10);color:#0866e8}
.settings-intro h2{margin:0 0 4px;font-size:1.08rem;font-weight:750}
.settings-intro p,.settings-description{margin:0;color:var(--muted,#667085);font-size:.88rem;line-height:1.55}
.settings-description{margin:-5px 0 14px}
@media(max-width:520px){.settings-intro{padding:15px;align-items:flex-start}.settings-intro-icon{width:40px;height:40px;flex-basis:40px}}
