/* dBBank: a calm, modern banking app. Mobile first; on a desktop it sits as a phone-width column. */
:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --text: #14161f;
  --sub: #6b7185;
  --line: #e7e9f0;
  --brand: #6d4aff;
  --brand-2: #22b8cf;
  --good: #12a150;
  --bad: #e5484d;
  --warn: #b7791f;
  --radius: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e0f14; --card: #181a22; --text: #f1f2f6; --sub: #9aa0b4; --line: #262935; --good: #3dd68c; --bad: #ff6369; --warn: #f5c16c; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { image-rendering: pixelated; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.app { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; padding: 0 16px calc(92px + env(safe-area-inset-bottom)); }
.bar { display: flex; align-items: center; justify-content: space-between; padding: 18px 4px 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.brand img { width: 32px; height: 32px; image-rendering: auto; }
.bar-link { color: var(--sub); font-weight: 600; font-size: 13px; padding: 8px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
main { display: grid; gap: 14px; outline: 0; align-content: start; }

/* balance card */
.hero { border-radius: 26px; padding: 22px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 18px 40px -18px rgb(109 74 255 / .7); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgb(255 255 255 / .12); }
.hero small { opacity: .85; font-weight: 600; letter-spacing: .02em; }
.hero .big { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 4px 0 14px; display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.hero .big img { width: 34px; height: 34px; }
.hero .name { font-weight: 600; opacity: .9; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick a { display: grid; justify-items: center; gap: 6px; padding: 14px 6px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; font-weight: 600; font-size: 13px; }
.quick svg { width: 22px; height: 22px; fill: var(--brand); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; }
.card h2 { font-size: 16px; letter-spacing: -0.01em; }
.card h3 { font-size: 14px; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.row span:first-child { color: var(--sub); }
.row b { font-variant-numeric: tabular-nums; }
.dia { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dia img { width: 1em; height: 1em; }
.note { color: var(--sub); font-size: 13px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.PENDING { background: rgb(183 121 31 / .15); color: var(--warn); }
.pill.APPROVED { background: rgb(18 161 80 / .15); color: var(--good); }
.pill.DENIED { background: rgb(229 72 77 / .15); color: var(--bad); }
.alert { border-radius: 16px; padding: 14px 16px; background: rgb(183 121 31 / .12); color: var(--warn); font-weight: 600; font-size: 14px; }

/* transactions */
.tx { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.tx:first-of-type { border-top: 0; }
.tx .dot { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; background: var(--bg); }
.tx .dot.plus { color: var(--good); }
.tx .dot.minus { color: var(--bad); }
.tx .what { font-weight: 600; }
.tx .when { color: var(--sub); font-size: 12.5px; }
.tx .amt { font-weight: 800; font-variant-numeric: tabular-nums; }
.tx .amt.plus { color: var(--good); }

/* forms */
label { display: grid; gap: 6px; font-weight: 600; font-size: 13px; color: var(--sub); }
input, select { width: 100%; height: 50px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); padding: 0 14px; font-size: 16px; color: var(--text); outline: 0; }
input:focus, select:focus { border-color: var(--brand); }
.btn { height: 52px; border: 0; border-radius: 16px; font-weight: 700; font-size: 16px; background: var(--brand); color: #fff; width: 100%; }
.btn:hover { filter: brightness(1.08); }
.btn.soft { background: var(--bg); color: var(--text); border: 1px solid var(--line); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.code-input { text-align: center; font: 800 28px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .3em; height: 64px; }
.error { color: var(--bad); font-weight: 600; font-size: 14px; min-height: 1.4em; }
.steps { padding-left: 20px; margin: 0; display: grid; gap: 6px; color: var(--sub); }
code { background: rgb(109 74 255 / .12); color: var(--brand); padding: 1px 7px; border-radius: 7px; font-size: .95em; }

/* help */
details { border-top: 1px solid var(--line); padding: 12px 0; }
details:first-of-type { border-top: 0; }
summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::after { content: "+"; color: var(--brand); font-weight: 800; }
details[open] summary::after { content: "−"; }
details p, details ul { color: var(--sub); margin: 8px 0 0; }
details ul { padding-left: 20px; display: grid; gap: 4px; }

/* bottom tabs */
.tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); width: min(488px, calc(100vw - 24px)); display: grid; grid-template-columns: repeat(5, 1fr); background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 22px; padding: 8px; box-shadow: 0 12px 30px -12px rgb(0 0 0 / .25); }
.tabs a { display: grid; justify-items: center; gap: 3px; padding: 7px 2px; border-radius: 14px; font-size: 11px; font-weight: 600; color: var(--sub); }
.tabs svg { width: 22px; height: 22px; fill: currentColor; }
.tabs a.active { color: var(--brand); background: rgb(109 74 255 / .1); }
.tabs[hidden] { display: none; }

.toast { position: fixed; z-index: 10; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); color: #fff; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* owner's account switch */
.switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.switch button { height: 42px; border: 0; border-radius: 12px; background: none; font-weight: 700; font-size: 13.5px; color: var(--sub); }
.switch button.on { background: var(--brand); color: #fff; }
