/* BankApp · premium black & gold (same identity as BankApp_C++).
   Layout inspired by the French banking apps: tab bar on mobile, sidebar on desktop,
   account lists with balances on the right, quick actions, operations grouped by day.
   Mobile first; the media queries at the end enhance larger screens. */
:root {
  --bg: #070708;
  --surface: #111113;
  --surface-2: #18181b;
  --surface-3: #1f1f23;
  --field: #0b0b0d;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --text: #f4f1ea;
  --muted: #8e8a82;
  --soft: #b9b4aa;
  --gold: #dcc28c;
  --gold-light: #f4e9cc;
  --gold-dark: #b0935c;
  --gold-gradient: linear-gradient(135deg, #f6ecd2 0%, #dcc28c 50%, #b89c66 100%);
  --gold-line: linear-gradient(135deg, rgba(244, 233, 204, .30), rgba(255, 255, 255, .05) 45%, rgba(220, 194, 140, .22));
  --success: #9fd3aa;
  --danger: #ec8f84;
  --radius: 20px;
  --radius-sm: 12px;
  --tabbar-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(120% 55% at 50% -12%, rgba(220, 194, 140, .08), transparent 62%),
    radial-gradient(80% 40% at 100% 100%, rgba(220, 194, 140, .03), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  font: 16px/1.5 system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid rgba(220, 194, 140, .8); outline-offset: 2px; }
h1:focus { outline: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.stack { display: grid; gap: 14px; }
.empty { color: var(--muted); padding: 18px 4px; }
.negative { color: var(--danger) !important; }
.positive { color: var(--success); }

.eyebrow {
  font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
}
.wordmark { font-size: 1.05rem; font-weight: 300; letter-spacing: .5em; margin-right: -.5em; }

/* ---------- Icons ---------- */
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon--xs { width: 15px; height: 15px; }
.icon--lg { width: 30px; height: 30px; }
.icon--chevron { width: 16px; height: 16px; color: var(--muted); }

/* ---------- Brand ---------- */
.monogram {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; padding: 1.5px;
  background: var(--gold-gradient);
  box-shadow: 0 10px 40px rgba(220, 194, 140, .14);
  animation: glow 3.2s ease-in-out infinite alternate;
}
.monogram span {
  width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #26262a, #0b0b0c 70%);
  font: 600 1.6rem/1 Georgia, "Times New Roman", serif; color: var(--gold-light);
}
.monogram--small { width: 38px; height: 38px; animation: none; }
.monogram--small span { font-size: 1rem; }
.boot { min-height: 100dvh; display: grid; place-items: center; }

/* ---------- Surfaces ---------- */
.panel {
  position: relative;
  padding: 22px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background:
    linear-gradient(160deg, var(--surface-2), var(--surface) 60%) padding-box,
    linear-gradient(160deg, var(--line-strong), var(--line) 60%) border-box;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .40);
}
.panel__title { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 500; margin-bottom: 14px; }
.panel__title .icon { color: var(--gold); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 8px; margin-top: 16px; }
.field label, .field__label { font-size: .8rem; color: var(--muted); }
.field__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.field__hint { font-size: .78rem; color: var(--muted); }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select {
  width: 100%;
  padding: 14px;
  font-size: 1.02rem; /* >= 16px: no zoom on iOS */
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
select {
  appearance: none; padding-right: 42px; cursor: pointer; text-overflow: ellipsis;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dcc28c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px;
}
select option { background: var(--surface); }
input:focus, select:focus { outline: none; border-color: rgba(220, 194, 140, .7); box-shadow: 0 0 0 3px rgba(220, 194, 140, .10); }
input:disabled, select:disabled { opacity: .5; cursor: not-allowed; }
input.valid { border-color: rgba(159, 211, 170, .55); }

.amount { position: relative; }
.amount input { padding-right: 44px !important; font-size: 1.3rem !important; font-variant-numeric: tabular-nums; }
.amount__currency { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.1rem; }

.check { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: .88rem; color: var(--soft); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }

.hint { font-size: .85rem; color: var(--muted); }
.message { margin-top: 14px; font-size: .9rem; }
.message--error { color: var(--danger); }
.message--ok { color: var(--success); }
.message--info { color: var(--gold-light); }
.form .btn { margin-top: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 0 20px;
  border: 0; border-radius: 14px;
  font-weight: 600; letter-spacing: .02em;
  cursor: pointer;
  transition: transform .15s, filter .2s, opacity .2s, background .2s;
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--gold {
  color: #1b1408; background: var(--gold-gradient);
  box-shadow: 0 8px 22px rgba(220, 194, 140, .12), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.btn--gold:hover:not(:disabled) { filter: brightness(1.06); }
.btn--ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--text); }
.btn--ghost:hover:not(:disabled) { border-color: rgba(220, 194, 140, .5); }
.btn--danger { background: transparent; border: 1px solid rgba(236, 143, 132, .35); color: var(--danger); }
.btn--small { min-height: 42px; width: auto; justify-self: start; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn--small { width: 34px; height: 34px; border-color: var(--line); background: transparent; }
.icon-btn--small .icon { width: 16px; height: 16px; }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn--gold { transition: transform .3s; }
.icon-btn--gold:active { transform: rotate(180deg); }
.swap .icon { transform: rotate(90deg); }
.swap-row { display: flex; justify-content: center; margin: 12px 0 -4px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--soft);
  font-size: .82rem; cursor: pointer; white-space: nowrap;
}
.chip:hover:not(:disabled) { color: var(--text); border-color: rgba(220, 194, 140, .45); }
.chip:disabled { opacity: .4; cursor: not-allowed; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.tag {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px;
  font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--line-strong); color: var(--soft); vertical-align: middle;
}
.tag--gold { color: #1b1408; background: var(--gold-gradient); border-color: transparent; }
.tag--ok { color: var(--success); border-color: rgba(159, 211, 170, .4); margin-left: 0; }

/* ---------- Sign-in ---------- */
.login {
  min-height: 100dvh; max-width: 440px; margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 18px 28px;
  display: flex; flex-direction: column; justify-content: center; gap: 26px;
}
.brand { display: grid; justify-items: center; gap: 10px; }
.login__panel h1 { font-size: 1.5rem; font-weight: 500; margin-bottom: 4px; }
.login__note { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: .75rem; color: var(--muted); text-align: center; }
.login__form > .btn { margin-top: 22px; }

.code-dots { display: flex; justify-content: center; gap: 14px; padding: 6px 0 4px; }
.code-dot { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--line-strong); transition: background .15s, border-color .15s, transform .15s; }
.code-dot--on { background: var(--gold-gradient); border-color: transparent; transform: scale(1.1); }

.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.keypad__loading { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 0; }
.key {
  min-height: 54px; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #1c1c20, #141417);
  font-size: 1.35rem; font-weight: 400; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background .12s, transform .08s, border-color .12s;
}
.key:hover { border-color: rgba(220, 194, 140, .4); }
.key:active { transform: scale(.96); background: #26262b; }
.key--blank { border: 0; background: none; }
.key--erase { display: grid; place-items: center; color: var(--muted); }

.otp-input {
  text-align: center; letter-spacing: .5em; padding-left: .5em !important;
  font-size: 1.8rem !important; font-variant-numeric: tabular-nums; margin-top: 18px;
}
.otp-input::placeholder { color: rgba(255, 255, 255, .18); }
.otp-badge, .sca__badge { display: grid; place-items: center; color: var(--gold); margin-top: 18px; }
.enroll { display: grid; justify-items: center; gap: 14px; margin-top: 16px; }
.steps { margin: 0; padding-left: 20px; color: var(--soft); font-size: .88rem; justify-self: stretch; }
.steps li + li { margin-top: 4px; }
.qr { border-radius: 14px; background: #fff; padding: 8px; width: 196px; height: 196px; }
.secret {
  font: 500 .95rem/1.4 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .08em;
  padding: 10px 14px; border-radius: 10px; background: var(--field); border: 1px dashed var(--line-strong);
  color: var(--gold-light); text-align: center; word-spacing: .2em; user-select: all; max-width: 100%;
}

/* ---------- Shell ---------- */
/* Mobile: the tab bar is the last item of a full-height column and sticks to the bottom of the
   screen. Unlike position: fixed over the page, it can never end up hidden: at worst it sits at the
   end of the content. Solid background (no backdrop-filter, which some Linux GPU setups fail to paint). */
.shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.view { flex: 1 0 auto; padding: max(18px, env(safe-area-inset-top)) 16px 28px; outline: none; }
.sidebar { display: none; }
.tabbar {
  position: sticky; bottom: 0; z-index: 50; flex-shrink: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: #0a0a0c;
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .55);
}
.tabbar__link {
  display: grid; place-items: center; align-content: center; gap: 3px;
  font-size: .68rem; color: var(--muted); letter-spacing: .02em; position: relative;
}
.tabbar__link[aria-current="page"] { color: var(--gold-light); }
.tabbar__link[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; width: 28px; height: 2px; border-radius: 2px; background: var(--gold-gradient);
}

.page { max-width: 1100px; margin: 0 auto; display: grid; gap: 22px; }
.page--narrow { max-width: 640px; }
.page-head { display: grid; gap: 4px; padding-top: 4px; }
.page-head h1 { font-size: 1.6rem; font-weight: 500; letter-spacing: -.01em; }
.page-head--back { grid-template-columns: auto 1fr; align-items: center; gap: 14px; }
.columns { display: grid; gap: 22px; align-items: start; }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; font-size: .9rem; }
.banner--danger { color: var(--danger); background: rgba(236, 143, 132, .07); border: 1px solid rgba(236, 143, 132, .25); }

/* ---------- Home ---------- */
.hero { text-align: center; padding: 10px 0 4px; }
.hero__amount {
  margin: 8px 0 10px; font-size: 2.6rem; font-weight: 300; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 30%, #cfc8b8); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__split { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; font-size: .82rem; color: var(--muted); }
.hero__split strong { color: var(--soft); font-weight: 500; }
.dot-sep { opacity: .5; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick__item { display: grid; justify-items: center; gap: 8px; font-size: .74rem; color: var(--soft); text-align: center; }
.quick__icon {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: var(--gold);
  border: 1px solid transparent;
  background: linear-gradient(160deg, var(--surface-3), var(--surface)) padding-box, var(--gold-line) border-box;
  transition: transform .2s var(--ease);
}
.quick__item:hover .quick__icon { transform: translateY(-2px); }

.group { display: grid; gap: 10px; }
.group__title { font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 0 4px; }

.list {
  display: grid; margin: 0; padding: 0; list-style: none;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface);
}
.list > * + * { border-top: 1px solid var(--line); }
.panel .list { border: 0; background: transparent; border-radius: 0; margin: 0 -4px; }

.account-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; padding: 16px; transition: background .2s; }
.account-row:hover { background: var(--surface-2); }
.account-row__icon, .row__icon, .tx__icon, .setting__icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(220, 194, 140, .08); color: var(--gold);
}
.account-row__main { display: grid; min-width: 0; }
.account-row__label { font-weight: 500; }
.account-row__meta { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.account-row__meta--soft { color: var(--soft); opacity: .8; }
.account-row__balance { font-size: 1.05rem; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

.cta {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-radius: 14px;
  border: 1px dashed rgba(220, 194, 140, .35); color: var(--gold-light); font-size: .9rem;
}
.cta:hover { background: rgba(220, 194, 140, .05); }

/* ---------- Account details ---------- */
.account-card {
  position: relative; overflow: hidden; padding: 22px; border-radius: var(--radius);
  border: 1px solid transparent; display: grid; gap: 6px;
  background: linear-gradient(145deg, #222225 0%, #0d0d0f 55%, #141312 100%) padding-box, var(--gold-line) border-box;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}
.account-card--savings {
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(220, 194, 140, .08), transparent 60%) padding-box,
    linear-gradient(145deg, #1b1a17 0%, #0d0d0e 65%) padding-box, var(--gold-line) border-box;
}
.account-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 0% 0%, rgba(255, 255, 255, .07), transparent 55%);
}
.account-card__top { display: flex; justify-content: space-between; align-items: center; }
.account-card__balance { margin: 18px 0 2px; font-size: 2.2rem; font-weight: 300; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.account-card__iban { margin-top: 10px; font-size: .82rem; letter-spacing: .12em; color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.account-card__actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.card__label { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.card__chip { width: 38px; height: 28px; border-radius: 6px; background: var(--gold-gradient); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); opacity: .9; }
.card__meta { font-size: .82rem; color: var(--muted); }
.card__meta--gold { color: var(--text); }
.card__lock {
  display: inline-flex; align-items: center; gap: 6px; justify-self: start; margin-top: 6px; padding: 3px 10px 3px 8px;
  font-size: .74rem; color: var(--gold); border: 1px solid rgba(220, 194, 140, .35); border-radius: 999px;
}
.rate { font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; color: #1b1408; background: var(--gold-gradient); white-space: nowrap; }
.gauge { height: 4px; margin: 10px 0 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.gauge__fill { height: 100%; width: 0; border-radius: inherit; background: var(--gold-gradient); transform-origin: left; animation: grow 1s var(--ease) .3s both; }

.history { display: grid; gap: 6px; }
.history__day { font-size: .76rem; font-weight: 500; color: var(--muted); text-transform: capitalize; padding: 12px 4px 4px; }
.tx-list { list-style: none; margin: 0; padding: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.tx { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; }
.tx + .tx { border-top: 1px solid var(--line); }
.tx__icon { width: 36px; height: 36px; border-radius: 10px; }
.tx__icon .icon { width: 17px; height: 17px; }
.tx__icon--SepaIn, .tx__icon--CashDeposit, .tx__icon--Interest { background: rgba(159, 211, 170, .08); color: var(--success); }
.tx__main { display: grid; min-width: 0; }
.tx__label { font-size: .93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx__meta { font-size: .74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx__amounts { display: grid; justify-items: end; }
.tx__amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx__balance { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* RIB */
.rib { display: grid; gap: 4px; }
.rib__row { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rib__label { font-size: .78rem; color: var(--muted); }
.rib__value { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rib__grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.rib__grid .rib__row { grid-template-columns: 64px 1fr 0; }

/* ---------- Tabs (Transfers) ---------- */
.tabs {
  --tab: 0; position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 4px; border-radius: 14px; background: var(--field); border: 1px solid var(--line);
}
.tabs::before {
  content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px) / 3); border-radius: 10px; border: 1px solid transparent;
  background: linear-gradient(180deg, #26262a, #1a1a1d) padding-box, var(--gold-line) border-box;
  transform: translateX(calc(var(--tab) * 100%)); transition: transform .35s var(--ease);
}
.tab {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; border-radius: 10px; color: var(--muted); font-size: .88rem; font-weight: 500; transition: color .2s;
}
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"] .icon { color: var(--gold); }
.tabpanel { animation: fade .3s ease-out; }

.from-account { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--field); border: 1px solid var(--line); font-size: .9rem; }
.beneficiary { display: grid; grid-template-columns: auto auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; }
.beneficiary input { width: 18px; height: 18px; accent-color: var(--gold); }
.beneficiary:has(input:checked) { background: rgba(220, 194, 140, .06); }
.beneficiary__avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--gold-light); font-weight: 600; }
.beneficiary__main { display: grid; min-width: 0; }
.beneficiary__name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.beneficiary__iban { font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Cards ---------- */
.debit-card {
  position: relative; overflow: hidden; aspect-ratio: 1.586; width: 100%; max-width: 420px; justify-self: center;
  padding: 22px 24px; border-radius: 18px; display: grid; grid-template-rows: auto 1fr auto auto; gap: 8px;
  border: 1px solid transparent;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(220, 194, 140, .16), transparent 55%) padding-box,
    linear-gradient(135deg, #26262a 0%, #0c0c0e 60%, #1a1712 100%) padding-box, var(--gold-line) border-box;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .6);
  transition: filter .4s;
}
.debit-card::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .07), transparent);
  transform: translateX(-120%) skewX(-18deg); animation: sheen 1.6s ease-out .4s both;
}
.debit-card__top { display: flex; justify-content: space-between; align-items: center; }
.wordmark--card { font-size: .85rem; color: var(--gold-light); }
.debit-card__contactless { transform: rotate(90deg); color: var(--soft); }
.debit-card .card__chip { width: 46px; height: 34px; align-self: center; }
.debit-card__number { font-size: clamp(1rem, 4.6vw, 1.3rem); letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.debit-card__bottom { display: flex; justify-content: space-between; align-items: end; gap: 12px; font-size: .78rem; letter-spacing: .08em; }
.debit-card__bottom small { display: block; font-size: .58rem; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.debit-card__brand { font-weight: 700; font-style: italic; color: var(--gold); letter-spacing: .12em; }
.debit-card--frozen { filter: saturate(.2) brightness(.8); }
.debit-card__frozen {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px;
  background: rgba(120, 160, 200, .12); backdrop-filter: blur(2px); color: #cfe3f5; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; font-size: .8rem;
}

.settings { padding: 6px 16px; }
.setting { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 0; cursor: pointer; }
.setting + .setting { border-top: 1px solid var(--line); }
.setting__main { display: grid; }
.setting__label { font-weight: 500; }
.setting__desc { font-size: .78rem; color: var(--muted); }
.switch { position: relative; width: 50px; height: 30px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch__track { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-strong); transition: background .2s; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--soft); transition: transform .25s var(--ease), background .2s; }
.switch input:checked + .switch__track { background: rgba(220, 194, 140, .25); border-color: rgba(220, 194, 140, .5); }
.switch input:checked + .switch__track::after { transform: translateX(20px); background: var(--gold-light); }
.switch input:focus-visible + .switch__track { outline: 2px solid rgba(220, 194, 140, .8); outline-offset: 2px; }
.switch input:disabled + .switch__track { opacity: .4; }

.limit { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.limit strong { font-size: 1.3rem; font-weight: 400; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--gold); margin: 6px 0 10px; }
.panel .btn--small { margin-top: 14px; }

/* ---------- Profile ---------- */
.info { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.info:last-of-type { border-bottom: 0; }
.info__label { color: var(--muted); }
.info__value { text-align: right; overflow-wrap: anywhere; }
.row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 4px; }
.row__icon { width: 34px; height: 34px; border-radius: 10px; }
.row__icon .icon { width: 16px; height: 16px; }
.row__icon--danger { background: rgba(236, 143, 132, .08); color: var(--danger); }
.row__main { display: grid; min-width: 0; }
.row__title { font-size: .92rem; }
.row__meta { font-size: .74rem; color: var(--muted); overflow-wrap: anywhere; }
.activity { max-height: 520px; overflow-y: auto; }

/* ---------- Open an account ---------- */
.products { display: grid; gap: 10px; }
.product {
  position: relative; display: grid; gap: 4px; padding: 16px 16px 16px 46px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); transition: border-color .2s, background .2s;
}
.product input { position: absolute; left: 16px; top: 19px; width: 18px; height: 18px; accent-color: var(--gold); }
.product:has(input:checked) { border-color: rgba(220, 194, 140, .5); background: rgba(220, 194, 140, .05); }
.product__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.product__name { font-weight: 500; }
.product__text { font-size: .86rem; color: var(--soft); }
.product__meta { font-size: .76rem; color: var(--muted); }

/* ---------- Modal (dialog) ---------- */
.modal {
  width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 22px 20px; margin: auto;
  color: var(--text); border-radius: var(--radius); border: 1px solid transparent;
  background: linear-gradient(160deg, var(--surface-2), var(--surface) 60%) padding-box, var(--gold-line) border-box;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .7);
}
.modal[open] { animation: pop .25s var(--ease); }
.modal::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(4px); }
.modal__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.modal__head h2 { font-size: 1.15rem; font-weight: 500; }
.modal .btn { margin-top: 6px; }
.sca { display: grid; gap: 10px; text-align: center; }
.sca__badge { margin-top: 0; }
.sca__lead { color: var(--muted); font-size: .9rem; }
.sca__summary { padding: 14px; border-radius: 12px; background: var(--field); border: 1px solid rgba(220, 194, 140, .25); color: var(--gold-light); font-weight: 500; overflow-wrap: anywhere; }
.sca .otp-input { margin-top: 4px; }
.sca__timer { font-size: .75rem; color: var(--muted); }
.countdown { color: var(--gold-light); font-variant-numeric: tabular-nums; }

/* ---------- Toasts, spinner ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px;
  background: rgba(24, 24, 27, .96); border: 1px solid var(--line-strong); box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  font-size: .9rem; animation: rise .3s var(--ease); transition: opacity .4s, transform .4s;
}
.toast--ok .icon { color: var(--success); }
.toast--error .icon { color: var(--danger); }
.toast--out { opacity: 0; transform: translateY(8px); }
.spinner { width: 28px; height: 28px; margin: 60px auto; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--gold); animation: spin .8s linear infinite; }
.noscript { padding: 40px; text-align: center; }

/* ---------- Animations (sober: short, eased, played once) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes glow { from { box-shadow: 0 10px 40px rgba(220, 194, 140, .10); } to { box-shadow: 0 10px 52px rgba(220, 194, 140, .22); } }
@keyframes sheen { from { transform: translateX(-120%) skewX(-18deg); } to { transform: translateX(260%) skewX(-18deg); } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
.reveal { animation: rise .6s var(--ease) both; }
.reveal--1 { animation-delay: 70ms; }
.reveal--2 { animation-delay: 140ms; }
.reveal--3 { animation-delay: 210ms; }
.reveal--4 { animation-delay: 280ms; }
.panel.shake { animation: shake .35s ease-in-out; }

/* ---------- Larger screens ---------- */
@media (min-width: 900px) {
  :root { --tabbar-h: 0px; }
  .tabbar { display: none; }
  .shell { display: grid; grid-template-columns: 240px 1fr; }
  .sidebar {
    position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 30px;
    padding: 28px 16px; border-right: 1px solid var(--line); background: rgba(12, 12, 14, .6);
  }
  .sidebar__brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
  .sidebar__brand .wordmark { font-size: .9rem; letter-spacing: .4em; }
  .sidebar__nav { display: grid; gap: 4px; }
  .sidebar__link {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
    color: var(--muted); border: 1px solid transparent; background: none; cursor: pointer; font-size: .95rem; text-align: left; width: 100%;
  }
  .sidebar__link:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
  .sidebar__link[aria-current="page"] { color: var(--text); background: linear-gradient(180deg, #1f1f23, #18181b) padding-box, var(--gold-line) border-box; }
  .sidebar__link[aria-current="page"] .icon { color: var(--gold); }
  .sidebar__logout { margin-top: auto; }
  .view { padding: 40px 40px 60px; }
  .hero { text-align: left; }
  .hero__amount { font-size: 3.2rem; }
  .hero__split { justify-content: flex-start; }
  .quick { max-width: 520px; }
  .columns { grid-template-columns: 1fr 1fr; }
  .columns--detail { grid-template-columns: minmax(320px, 400px) 1fr; }
  .columns--detail .account-card { position: sticky; top: 40px; }
  .toasts { bottom: 24px; }
}

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

/* ---------- Sign-in / sign-up screens ----------
   Everything scales with the screen height (dvh) so a whole step fits without scrolling, from the
   iPhone SE (375 x 667) up. Short screens then drop the extras: brand tagline, hints, footer note. */
.login {
  gap: clamp(10px, 2.6dvh, 26px);
  padding-block: max(clamp(10px, 2.6dvh, 28px), env(safe-area-inset-top)) clamp(10px, 2.6dvh, 28px);
}
.login .brand { gap: clamp(4px, 1.1dvh, 10px); }
.login .monogram { width: clamp(42px, 6.6dvh, 64px); height: clamp(42px, 6.6dvh, 64px); }
.login .monogram span { font-size: clamp(1.05rem, 2.6dvh, 1.6rem); }
.login .panel { padding: clamp(14px, 2.6dvh, 22px) clamp(16px, 4.5vw, 20px); }
.login__panel h1 { font-size: clamp(1.2rem, 3.2dvh, 1.5rem); }
.login .field { margin-top: clamp(8px, 1.8dvh, 16px); gap: clamp(4px, .8dvh, 8px); }
.login input:not([type="checkbox"]) { padding-block: clamp(9px, 1.6dvh, 14px); }
.login .code-dots { padding: clamp(2px, .6dvh, 6px) 0 clamp(2px, .5dvh, 4px); }
.login .keypad { gap: clamp(5px, .9dvh, 8px); margin-top: clamp(4px, .9dvh, 8px); }
.login .key { min-height: clamp(38px, 5.6dvh, 54px); }
.login .btn { min-height: clamp(44px, 6.2dvh, 52px); }
.login__form > .btn { margin-top: clamp(12px, 2.4dvh, 22px); }
.login .message { margin-top: clamp(8px, 1.4dvh, 14px); }
.login .otp-input { margin-top: clamp(10px, 2dvh, 18px); font-size: clamp(1.4rem, 3.6dvh, 1.8rem) !important; padding-block: clamp(8px, 1.4dvh, 14px); }
.login .otp-badge { margin-top: clamp(8px, 2dvh, 18px); }
.login .enroll { gap: clamp(8px, 1.5dvh, 14px); margin-top: clamp(8px, 1.8dvh, 16px); }
.login .qr { width: clamp(118px, 19dvh, 196px); height: clamp(118px, 19dvh, 196px); padding: 6px; }
.login .secret { padding: clamp(6px, 1.1dvh, 10px) 12px; font-size: .88rem; }

.nowrap { white-space: nowrap; }
.check--inline { margin-top: 0; font-size: .8rem; color: var(--muted); gap: 7px; }
.check--inline input { width: 16px; height: 16px; }
.login__switch { margin-top: clamp(10px, 2dvh, 18px); text-align: center; font-size: .86rem; color: var(--muted); }
.link-btn {
  padding: 6px 2px; border: 0; background: none; cursor: pointer;
  color: var(--gold); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: rgba(220, 194, 140, .4);
}
.link-btn:hover { color: var(--gold-light); }

.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.field-pair .field { min-width: 0; }
/* phone + date of birth side by side only when there is room for the date picker */
/* narrow phones (Galaxy Fold): one per line, the footer note goes to keep the height */
@media (max-width: 359px) {
  .field-pair--wide { grid-template-columns: 1fr; }
  .login__note { display: none; }
}
@media (max-width: 380px) { .login { padding-inline: 12px; } }
.signup-done { display: grid; justify-items: center; text-align: center; gap: 4px; }
.signup-done .steps { text-align: left; margin-top: clamp(8px, 1.8dvh, 16px); font-size: .84rem; }
.signup-done > .btn--gold { margin-top: clamp(12px, 2.4dvh, 22px); }
.signup-done .btn--small { justify-self: center; margin-top: 8px; min-height: 38px; }
.secret--id { font-size: clamp(1.35rem, 3.4dvh, 1.7rem) !important; letter-spacing: .22em; padding: clamp(8px, 1.4dvh, 12px) 20px !important; margin-top: clamp(8px, 1.6dvh, 14px); }
input[type="date"] { color-scheme: dark; min-height: 0; }
/* a date input has a built-in minimum width: let it shrink to its column */
.login input[type="date"] { padding-inline: 12px; min-width: 0; max-width: 100%; }
.login input[type="date"]::-webkit-date-and-time-value { text-align: left; }
@media (max-width: 380px) {
  .login input[type="date"] { padding-inline: 10px; font-size: .95rem; }
  .login input[type="date"]::-webkit-calendar-picker-indicator { margin-left: 0; }
}

/* every phone: no tagline, no hints */
@media (max-height: 960px) {
  .login .brand .eyebrow, .login .field__hint { display: none; }
}
@media (max-height: 740px) {
  /* brand on one line */
  .login .brand { grid-auto-flow: column; align-items: center; justify-content: center; gap: 12px; }
  .login .monogram { width: 38px; height: 38px; animation: none; }
  .login .monogram span { font-size: 1rem; }
  .login__note { display: none; }
  .login__lead { font-size: .88rem; }
}
/* wide but short (landscape tablets, Nest Hub): brand on the left, panel on the right */
@media (min-width: 900px) and (max-height: 820px) {
  .login {
    max-width: 960px; display: grid; grid-template-columns: 1fr 440px; align-items: center;
    column-gap: 56px; padding-inline: 32px;
  }
  .login .brand { grid-auto-flow: row; }
  .login .monogram { width: 64px; height: 64px; }
  .login .monogram span { font-size: 1.6rem; }
  .login .brand .eyebrow { display: block; }
  .login__note { display: flex; grid-column: 2; }
}
