/* Halden prototype: layout + screen-specific pieces (components live in tokens.css) */
html, body, #app { height: 100%; }
body { overflow: hidden; }
@supports (height: 100dvh) { html, body, #app { height: 100dvh; } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100%; }
.side { display: flex; flex-direction: column; gap: 2px; padding: 14px 12px; border-right: 1px solid var(--line); background: var(--bg); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; font-weight: 800; font-size: 17px; letter-spacing: -0.03em; }
.brand svg { width: 26px; height: 26px; }
.org { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-1); margin-bottom: 12px; font-size: 13.5px; font-weight: 700; }
.org .lg { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, #1b2a4a, #3b5bdb); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.org small { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.org .chev { margin-left: auto; color: var(--ink-3); }
.nav-i { position: relative; display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 9px; color: var(--ink-2); font-weight: 650; font-size: 14px; border: 0; background: none; width: 100%; text-align: left; transition: background var(--motion-base), color var(--motion-base); }
.nav-i svg { width: 18px; height: 18px; flex: none; }
.nav-i:hover { background: var(--surface-2); color: var(--ink); }
.nav-i[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.nav-i .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; display: grid; place-items: center; transition: transform var(--motion-slow) var(--ease-spring); }
.nav-i .count.bump { transform: scale(1.25); }
.side-h { font-size: 11.5px; font-weight: 700; color: var(--ink-3); padding: 18px 10px 6px; display: flex; justify-content: space-between; }
.acct-mini { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.acct-mini:hover { background: var(--surface-2); }
.acct-mini b { margin-left: auto; color: var(--ink); font-weight: 700; }
.acct-mini .dot { width: 8px; height: 8px; border-radius: 3px; }
.side .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 700; }
.side .me small { display: block; color: var(--ink-3); font-size: 12px; font-weight: 600; }

.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; height: 100%; }
.topbar { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 28px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); flex: none; }
.search { display: flex; align-items: center; gap: 10px; height: 38px; width: min(420px, 100%); padding: 0 10px 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); font-size: 14px; font-weight: 550; box-shadow: var(--shadow-1); transition: border-color var(--motion-base); }
.search:hover { border-color: var(--line-2); }
.search svg { width: 16px; height: 16px; }
.search .kbd { margin-left: auto; }
.topbar .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink-2); display: grid; place-items: center; position: relative; transition: background var(--motion-base), color var(--motion-base); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .pip { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--neg); box-shadow: 0 0 0 2px var(--bg); }

.content { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; view-transition-name: content; scroll-behavior: smooth; }
.page { max-width: 1240px; margin: 0 auto; padding: 28px 28px 80px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.page > * { min-width: 0; }
.page-h { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-h h1 { font-size: 26px; letter-spacing: -0.03em; }
.page-h .sub { color: var(--ink-3); font-size: 14px; margin-top: 4px; font-weight: 550; }
.page-h .right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

::view-transition-old(content) { animation: vtOut 160ms var(--ease-out) both; }
::view-transition-new(content) { animation: vtIn 320ms var(--ease-out) both; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-4px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(8px); } }
.enter > * { animation: rise 520ms var(--ease-out) both; }
.enter > *:nth-child(2) { animation-delay: 60ms; } .enter > *:nth-child(3) { animation-delay: 120ms; } .enter > *:nth-child(4) { animation-delay: 180ms; } .enter > *:nth-child(5) { animation-delay: 240ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- home ---------- */
.hero-bal { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.hero-bal .l { padding: 22px 24px 12px; min-width: 0; }
.hero-bal .r { border-left: 1px solid var(--line); padding: 22px 24px; display: grid; gap: 18px; align-content: start; }
.bal-top { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.bal-label { font-size: 13.5px; color: var(--ink-2); font-weight: 650; display: flex; align-items: center; gap: 8px; }
.bal { font-size: clamp(34px, 4vw, 46px); font-weight: 750; letter-spacing: -0.045em; line-height: 1.05; margin-top: 6px; }
.bal .c { color: var(--ink-3); font-size: 0.62em; letter-spacing: -0.02em; }
.bal-delta { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.bal-top .seg { margin-left: auto; }
.chart { position: relative; height: 230px; margin-top: 12px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .tip { position: absolute; top: 0; pointer-events: none; transform: translate(-50%, -8px); background: var(--ink); color: var(--surface); border-radius: 9px; padding: 7px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow-2); opacity: 0; transition: opacity var(--motion-fast); }
.chart .tip small { display: block; font-weight: 600; opacity: 0.65; font-size: 11px; }
.chart .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.1s var(--ease-out) forwards; }
.chart .fade { opacity: 0; animation: fadeIn 800ms 300ms var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
.flow { display: grid; gap: 12px; }
.flow .row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--ink-2); font-weight: 650; }
.flow .row b { font-size: 20px; color: var(--ink); letter-spacing: -0.03em; font-weight: 750; }
.flow .bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.flow .bar i { display: block; height: 100%; border-radius: inherit; transform-origin: left; animation: grow 900ms var(--ease-out) both; }
@keyframes grow { from { transform: scaleX(0); } }
.runway { padding: 14px; border-radius: 12px; background: var(--accent-soft); display: grid; gap: 4px; }
.runway b { font-size: 22px; letter-spacing: -0.03em; color: var(--accent); }
.runway span { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }

.accts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.accts > *, .g2 > *, .hero-bal > *, .cards-layout > * { min-width: 0; }
.acct { padding: 18px 20px; display: grid; gap: 14px; cursor: pointer; transition: transform var(--motion-base) var(--ease-out), box-shadow var(--motion-base); }
.acct:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.acct .t { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; }
.acct .t .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.acct .t .ic svg { width: 16px; height: 16px; }
.acct .t small { display: block; color: var(--ink-3); font-weight: 600; font-size: 12px; }
.acct .v { font-size: 22px; font-weight: 750; letter-spacing: -0.035em; }
.acct .spark { height: 34px; width: 100%; }
.g2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.todo { display: grid; }
.todo-i { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); cursor: pointer; transition: background var(--motion-fast); }
.todo-i:hover { background: var(--surface-2); }
.todo-i .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.todo-i .ic svg { width: 16px; height: 16px; }
.todo-i b { display: block; font-size: 13.5px; font-weight: 700; }
.todo-i small { color: var(--ink-3); font-size: 12.5px; font-weight: 600; }

/* transaction row (shared by home + transactions) */
.tx-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tx-name b { display: block; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-name small { display: block; color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.amt { font-weight: 750; letter-spacing: -0.01em; white-space: nowrap; }
.amt.in { color: var(--pos); }
.rcpt { width: 26px; height: 26px; border-radius: 7px; display: inline-grid; place-items: center; }
.rcpt svg { width: 14px; height: 14px; }
.rcpt.ok { color: var(--pos); background: var(--pos-soft); }
.rcpt.no { color: var(--warn); background: var(--warn-soft); }
.tx-table tbody tr { cursor: pointer; }
.tx-table tr.flash { animation: flash 1.4s var(--ease-out); }
@keyframes flash { 0%, 30% { background: var(--accent-soft); } }
.date-row td { background: var(--bg); font-size: 12px; font-weight: 700; color: var(--ink-3); padding: 8px 20px !important; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.toolbar .input { height: 36px; max-width: 260px; }
.toolbar .right { margin-left: auto; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-3); font-weight: 600; }

/* drawer content */
.dr-h { display: flex; align-items: center; gap: 10px; padding: 16px 16px 16px 20px; border-bottom: 1px solid var(--line); }
.dr-h h3 { font-size: 15px; }
.dr-h .x { margin-left: auto; }
.dr-b { flex: 1; overflow-y: auto; padding: 22px 20px; display: grid; gap: 22px; align-content: start; grid-auto-rows: max-content; }
.dr-b > *, .mv-b > * { min-height: min-content; }
.dr-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.dr-amt { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 8px 0 4px; }
.dr-amt .merchant { width: 52px; height: 52px; border-radius: 15px; font-size: 18px; }
.dr-amt b { font-size: 34px; letter-spacing: -0.045em; font-weight: 750; }
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 20px 1fr auto; gap: 12px; padding-bottom: 14px; position: relative; font-size: 13.5px; font-weight: 650; }
.tl::before { content: ""; position: absolute; left: 9px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl .d { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--pos-soft); color: var(--pos); }
.tl .d svg { width: 12px; height: 12px; }
.tl .d.wait { background: var(--surface-2); color: var(--ink-3); }
.tl .d.now { background: var(--warn-soft); color: var(--warn); }
.tl small { color: var(--ink-3); font-weight: 600; font-size: 12.5px; }
.kvs { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kvs > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 14px; font-size: 13.5px; font-weight: 650; }
.kvs > div + div { border-top: 1px solid var(--line); }
.kvs span { color: var(--ink-3); }
.drop { border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 22px; display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--ink-3); font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color var(--motion-base), background var(--motion-base); }
.drop:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--ink-2); }
.drop svg { width: 22px; height: 22px; }
.receipt { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); overflow: hidden; }
.receipt .paper { height: 80px; border-radius: 6px; background: #fff; box-shadow: var(--shadow-1); padding: 8px 7px; display: grid; gap: 4px; align-content: start; }
.receipt .paper i { display: block; height: 3px; border-radius: 2px; background: #d7dbe0; }
.receipt .scan { position: absolute; left: 12px; top: 12px; width: 64px; height: 3px; background: var(--accent-bright); box-shadow: 0 0 12px var(--accent-bright); animation: scan 1s var(--ease-out) 2; opacity: 0; }
@keyframes scan { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(78px); opacity: 1; } }

/* ---------- cards ---------- */
.cards-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.cc-tile { padding: 14px; display: grid; gap: 12px; cursor: pointer; transition: transform var(--motion-base) var(--ease-out), box-shadow var(--motion-base), border-color var(--motion-base); }
.cc-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.cc-tile.sel { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), var(--shadow-2); }
.cc-tile .m { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; gap: 8px; }
.cc-tile .m small { display: block; color: var(--ink-3); font-weight: 600; font-size: 12px; }

.cd-panel { padding: 20px; display: grid; gap: 20px; position: sticky; top: 0; }
.limit { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; }
.ring { position: relative; width: 96px; height: 96px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .fg { transition: stroke-dashoffset 1s var(--ease-out); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 17px; font-weight: 800; letter-spacing: -0.03em; }
.ctrl { display: grid; }
.ctrl > div { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 650; }
.ctrl > div small { display: block; color: var(--ink-3); font-weight: 600; font-size: 12.5px; }
.ctrl .switch { margin-left: auto; }

/* ---------- bills ---------- */
.bill-doc { border: 1px solid var(--line); border-radius: 12px; background: #fff; color: #1a1f25; padding: 18px; font-size: 11px; display: grid; gap: 10px; box-shadow: var(--shadow-1); }
.bill-doc .h { display: flex; justify-content: space-between; font-weight: 800; font-size: 13px; }
.bill-doc .ln { display: flex; justify-content: space-between; color: #56606c; border-top: 1px dashed #dde1e6; padding-top: 6px; }
.bill-doc .tot { display: flex; justify-content: space-between; font-weight: 800; font-size: 13px; border-top: 1px solid #1a1f25; padding-top: 8px; }

/* ---------- approvals ---------- */
.appr-list { display: grid; gap: 12px; }
.appr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; transition: opacity 320ms var(--ease-out), transform 420ms var(--ease-out), max-height 420ms var(--ease-out) 120ms, padding 420ms var(--ease-out) 120ms, margin 420ms var(--ease-out) 120ms, border-width 0s 540ms; max-height: 200px; overflow: hidden; }
.appr.gone { opacity: 0; transform: translateX(40px) scale(0.98); max-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: -12px; border-width: 0; }
.appr.gone.decl { transform: translateX(-40px) scale(0.98); }
.appr b { font-size: 14.5px; font-weight: 750; }
.appr .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-3); font-weight: 600; margin-top: 4px; }
.appr .amtb { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; text-align: right; }
.appr .acts { display: flex; gap: 8px; margin-top: 10px; justify-content: flex-end; }
.appr .policy { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 650; color: var(--pos); margin-top: 8px; }
.appr .policy.warn { color: var(--warn); }
.appr .policy svg { width: 14px; height: 14px; }
.done-state { padding: 56px 24px; }
.done-state .ill { width: 72px; height: 72px; border-radius: 50%; background: var(--pos-soft); color: var(--pos); }
.done-state .ill svg { width: 30px; height: 30px; }

/* ---------- transfer modal ---------- */
.mv-h { display: flex; align-items: center; gap: 12px; padding: 18px 18px 0 22px; }
.mv-h h3 { font-size: 17px; }
.steps { display: flex; gap: 6px; padding: 14px 22px 0; }
.steps i { flex: 1; height: 3px; border-radius: 2px; background: var(--surface-3); overflow: hidden; position: relative; }
.steps i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 500ms var(--ease-out); }
.steps i.on::after { transform: none; }
.mv-b { padding: 20px 22px; display: grid; gap: 16px; min-height: 320px; align-content: start; }
.mv-b.slide { animation: slideIn 380ms var(--ease-out); }
.mv-b.slide-back { animation: slideBack 380ms var(--ease-out); }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } }
@keyframes slideBack { from { opacity: 0; transform: translateX(-24px); } }
.mv-f { padding: 14px 22px 20px; display: flex; gap: 8px; justify-content: flex-end; }
.recips { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; margin: 0 -8px; }
.recip { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 12px; border: 0; background: none; text-align: left; width: 100%; transition: background var(--motion-fast); }
.recip:hover, .recip.sel { background: var(--surface-2); }
.recip b { display: block; font-size: 14px; font-weight: 700; }
.recip small { color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.recip .go { margin-left: auto; color: var(--ink-3); }
.big-amt { display: flex; justify-content: center; align-items: baseline; gap: 2px; padding: 8px 0; }
.big-amt span { font-size: 36px; font-weight: 700; color: var(--ink-3); }
.big-amt input { border: 0; background: transparent; outline: none; box-shadow: none !important; font-size: 52px; font-weight: 800; letter-spacing: -0.04em; width: 1.3em; min-width: 0.7em; max-width: 100%; text-align: left; padding: 0; font-variant-numeric: tabular-nums; caret-color: var(--accent); transition: width 120ms var(--ease-out); }
.big-amt input::placeholder { color: var(--ink-3); }
.big-amt.shake { animation: shake 360ms; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.quick { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.methods { display: grid; gap: 8px; }
.method { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); text-align: left; transition: border-color var(--motion-base), box-shadow var(--motion-base); }
.method[aria-checked="true"] { border-color: var(--accent); box-shadow: var(--ring); }
.method .rd { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); transition: border var(--motion-base) var(--ease-spring); }
.method[aria-checked="true"] .rd { border: 6px solid var(--accent); }
.method b { display: block; font-size: 14px; font-weight: 700; }
.method small { color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.method .fee { font-size: 13px; font-weight: 700; }
.success { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 24px 0 8px; }
.check { width: 76px; height: 76px; }
.check circle { stroke-dasharray: 220; stroke-dashoffset: 220; animation: dash 600ms var(--ease-out) forwards; }
.check path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: dash 400ms 450ms var(--ease-out) forwards; }
@keyframes dash { to { stroke-dashoffset: 0; } }
.success h3 { font-size: 22px; letter-spacing: -0.03em; }
.success .t-amt { font-size: 15px; color: var(--ink-2); font-weight: 600; }

/* ---------- command menu ---------- */
.cmdk { top: 14vh; transform: translate(-50%, -6px) scale(0.98); width: min(560px, calc(100vw - 32px)); }
.cmdk.open { transform: translate(-50%, 0) scale(1); }
.cmdk .in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cmdk .in input:focus-visible { box-shadow: none; }
.cmdk .in input { flex: 1; border: 0; background: none; outline: none; font-size: 16px; font-weight: 600; }
.cmdk .in svg { width: 18px; height: 18px; color: var(--ink-3); }
.cmdk .res { max-height: 340px; overflow-y: auto; padding: 8px; }
.cmdk .grp { font-size: 11.5px; font-weight: 700; color: var(--ink-3); padding: 8px 10px 4px; }
.cmdk .it { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 9px; border: 0; background: none; text-align: left; font-size: 14px; font-weight: 650; color: var(--ink-2); }
.cmdk .it svg { width: 16px; height: 16px; }
.cmdk .it.on { background: var(--surface-2); color: var(--ink); }
.cmdk .it .kbd { margin-left: auto; }
.cmdk .foot { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); font-weight: 600; }

/* ---------- auth ---------- */
.auth { position: fixed; inset: 0; z-index: 80; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--bg); transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); overflow-y: auto; }
.auth.leaving { opacity: 0; transform: scale(1.02); pointer-events: none; }
.auth .pane { display: flex; flex-direction: column; padding: 28px clamp(20px, 5vw, 64px); }
.auth .box { width: 100%; max-width: 380px; margin: auto; display: grid; gap: 20px; padding-block: 40px; }
.auth h1 { font-size: 30px; letter-spacing: -0.035em; }
.auth .art { position: relative; overflow: hidden; background: radial-gradient(90% 80% at 80% 10%, #1f4d40, #0b1512 70%); display: grid; place-items: center; padding: 48px; }
.auth .art .stack { position: relative; width: min(380px, 80%); aspect-ratio: 1.586; }
.auth .art .ccard { position: absolute; inset: 0; }
.auth .art .ccard:nth-child(1) { transform: rotate(-12deg) translate(-18%, -6%); opacity: 0.55; }
.auth .art .ccard:nth-child(2) { transform: rotate(-4deg) translate(-6%, 4%); opacity: 0.8; }
.auth .art .ccard:nth-child(3) { transform: rotate(6deg) translate(8%, 14%); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: rotate(5deg) translate(8%, 11%); } }
.auth .art p { position: absolute; left: 48px; right: 48px; bottom: 44px; color: #d9efe8; font-family: var(--font-display); font-size: 26px; line-height: 1.25; font-weight: 400; letter-spacing: -0.01em; }
.otp { display: flex; gap: 8px; }
.otp input { width: 100%; min-width: 0; height: 54px; text-align: center; font-size: 22px; font-weight: 800; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow-1); transition: border-color var(--motion-base), box-shadow var(--motion-base), transform var(--motion-fast) var(--ease-spring); }
.otp input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.otp input.filled { transform: scale(1.04); }
.otp.ok input { border-color: var(--pos); background: var(--pos-soft); }
.auth .demo { font-size: 12.5px; color: var(--ink-3); font-weight: 600; text-align: center; }
.auth .demo b { color: var(--ink); font-family: var(--font-mono); letter-spacing: 0.1em; }

/* ---------- mobile ---------- */
.tabbar { display: none; }
@media (max-width: 1100px) {
  .hero-bal { grid-template-columns: minmax(0, 1fr); }
  .hero-bal .r { border-left: 0; border-top: 1px solid var(--line); grid-template-columns: 1fr 1fr; }
  .cards-layout, .g2 { grid-template-columns: minmax(0, 1fr); }
  .cd-panel { position: static; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .topbar { padding: 0 16px; }
  .topbar .search { display: none; }
  .page { padding: 20px 16px 110px; }
  .accts { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth .art { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); }
  .tabbar button { position: relative; display: grid; justify-items: center; gap: 3px; border: 0; background: none; font-size: 10.5px; font-weight: 700; color: var(--ink-3); padding: 6px 0; }
  .tabbar button svg { width: 20px; height: 20px; }
  .tabbar button[aria-current="page"] { color: var(--ink); }
  .tabbar .count { position: absolute; top: 2px; left: 55%; min-width: 16px; height: 16px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 10px; display: grid; place-items: center; padding: 0 4px; }
  .hide-m { display: none !important; }
  .hero-bal .r { grid-template-columns: minmax(0, 1fr); }
  .toasts { bottom: 84px; }
}
@media (min-width: 861px) { .show-m { display: none !important; } }
@media (max-width: 860px) {
  .toolbar .right { margin-left: 0; width: 100%; }
  .toolbar .right .input-wrap, .toolbar .right .input { width: 100%; max-width: none; }
  .page-h .right .btn-secondary { display: none; }
}

/* Phones: solid surfaces instead of blur, no blend-mode texture, calmer scrolling */
@media (max-width: 860px), (hover: none) {
  .topbar { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .tabbar { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .scrim { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .ccard .face::before { display: none; }
  .ccard .face::after { display: none; }
  .content { scroll-behavior: auto; }
  .acct, .cc-tile { transition: none; }
}
