/* Apex Capital Bank — design system
   Hand written CSS (no build step required) */

:root {
  --ink: #0b1620;
  --navy-900: #0a1b2b;
  --navy-800: #0f2438;
  --navy-700: #16324b;
  --navy-600: #1d4162;
  --gold: #c8a24a;
  --gold-soft: #e6cf95;
  --surface: #f4f6fa;
  --card: #ffffff;
  --line: #e3e8f0;
  --muted: #6b7a90;
  --text: #12212f;
  --green: #12855f;
  --green-soft: #e3f6ee;
  --red: #c02c3c;
  --red-soft: #fbe6e8;
  --amber: #b1741b;
  --amber-soft: #fdf1dd;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(12, 27, 42, .06), 0 12px 32px -18px rgba(12, 27, 42, .35);
  --shadow-lg: 0 24px 60px -28px rgba(12, 27, 42, .45);
  --sans: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy-600); text-decoration: none; }
a:hover { color: var(--navy-800); }

h1, h2, h3, h4 { margin: 0 0 .35em; line-height: 1.2; letter-spacing: -.01em; font-weight: 650; }
h1 { font-size: 1.65rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.02rem; }

p { margin: 0 0 1em; }

.muted { color: var(--muted); }
.small { font-size: .82rem; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.serif { font-family: var(--serif); }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.gold { color: var(--gold); }
.hidden { display: none; }

/* ---------------------------------------------------------------- shell */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 258px;
  flex: 0 0 258px;
  background: linear-gradient(180deg, var(--navy-900) 0%, #08131e 100%);
  color: #cdd8e4;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: 1.25rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.sidebar__brand:hover { color: #fff; }

.mark {
  width: 38px; height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--gold) 0%, #a8812f 100%);
  color: #17263a;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}

.brand-name { font-size: .95rem; font-weight: 650; color: #fff; letter-spacing: .01em; }
.brand-sub { font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: rgba(200,162,74,.85); }

.sidebar__nav { padding: .85rem .7rem 2rem; flex: 1; }

.nav-label {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: #6d8096;
  padding: 1rem .7rem .4rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .62rem .72rem;
  border-radius: var(--radius-sm);
  color: #b9c7d6;
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: 2px;
  transition: background .16s ease, color .16s ease;
}

.nav-link svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: .8; }
.nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-link:hover svg { opacity: 1; }

.nav-link.is-active {
  background: rgba(200, 162, 74, .14);
  color: #fff;
  box-shadow: inset 2px 0 0 var(--gold);
}
.nav-link.is-active svg { opacity: 1; color: var(--gold); }

.nav-badge {
  margin-left: auto;
  background: var(--gold);
  color: #17263a;
  font-size: .68rem;
  font-weight: 700;
  padding: .05rem .4rem;
  border-radius: 999px;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 66px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar__title { font-size: .95rem; font-weight: 600; }
.topbar__spacer { flex: 1; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .6rem;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 600;
  background: #eef2f8;
  color: var(--navy-700);
  white-space: nowrap;
}

.pill--green { background: var(--green-soft); color: var(--green); }
.pill--red { background: var(--red-soft); color: var(--red); }
.pill--amber { background: var(--amber-soft); color: var(--amber); }
.pill--gold { background: rgba(200,162,74,.16); color: #8a6a1c; }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--navy-800);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .02em;
}

.userbox { display: flex; align-items: center; gap: .6rem; }
.userbox__name { font-size: .82rem; font-weight: 600; line-height: 1.1; }
.userbox__meta { font-size: .7rem; color: var(--muted); }

.content { padding: 1.6rem 1.5rem 3rem; max-width: 1320px; width: 100%; }

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card__head {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.05rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.card__head h2, .card__head h3 { margin: 0; }
.card__head .pill { margin-left: auto; }
.card__body { padding: 1.25rem; }
.card__body--flush { padding: 0; }

.grid { display: grid; gap: 1.1rem; }
.grid > * { min-width: 0; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--2-1 { grid-template-columns: 1.6fr 1fr; }

/* ------------------------------------------------------------- balance */
.balance {
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-600) 62%, #245176 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.balance::after {
  content: "";
  position: absolute;
  right: -60px; top: -70px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,162,74,.34) 0%, rgba(200,162,74,0) 68%);
}

.balance__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: #9fb6cd; }
.balance__amount { font-size: 2.25rem; font-weight: 650; letter-spacing: -.02em; margin: .2rem 0 .1rem; }
.balance__amount span { font-size: 1.1rem; color: #9fb6cd; font-weight: 500; }
.balance__acct { font-size: .8rem; color: #b9c7d6; position: relative; z-index: 1; }
.balance__actions { display: flex; gap: .5rem; margin-top: 1.1rem; position: relative; z-index: 1; flex-wrap: wrap; }

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem;
  box-shadow: var(--shadow);
}
.stat__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.stat__value { font-size: 1.35rem; font-weight: 650; margin-top: .18rem; letter-spacing: -.01em; }
.stat__foot { font-size: .76rem; color: var(--muted); margin-top: .2rem; }

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .6rem 1.05rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(15, 36, 56, .8);
}
.btn--primary:hover { color: #fff; box-shadow: 0 12px 24px -12px rgba(15, 36, 56, .9); }

.btn--gold {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #1b2a3d;
  box-shadow: 0 8px 18px -10px rgba(200, 162, 74, .9);
}
.btn--gold:hover { color: #12212f; }

.btn--ghost { background: #fff; border-color: var(--line); color: var(--navy-700); }
.btn--ghost:hover { border-color: #c6d2e0; color: var(--navy-800); }

.btn--light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.22); }
.btn--light:hover { background: rgba(255,255,255,.22); color: #fff; }

.btn--danger { background: var(--red-soft); color: var(--red); }
.btn--danger:hover { color: var(--red); background: #f8d7db; }

.btn--sm { padding: .38rem .7rem; font-size: .76rem; border-radius: 8px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ------------------------------------------------------------- forms */
.field { margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }

.label {
  display: block;
  font-size: .76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: .38rem;
}

.input, .select, .textarea {
  width: 100%;
  padding: .68rem .8rem;
  border: 1px solid #d5dde8;
  border-radius: 10px;
  font-family: inherit;
  font-size: .9rem;
  color: var(--text);
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(29, 65, 98, .12);
}

.textarea { min-height: 90px; resize: vertical; }

.hint { font-size: .76rem; color: var(--muted); margin-top: .3rem; }

.error { color: var(--red); font-size: .78rem; margin-top: .3rem; }

.alert {
  border-radius: 12px;
  padding: .8rem 1rem;
  font-size: .85rem;
  margin-bottom: 1.1rem;
  border: 1px solid transparent;
}

.alert--ok { background: var(--green-soft); color: #0d6849; border-color: #bfe7d7; }
.alert--err { background: var(--red-soft); color: #9c1f2d; border-color: #f2c8cd; }

/* option tiles (radio cards) */
.options { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.option {
  position: relative;
  border: 1px solid #d9e1ec;
  border-radius: 12px;
  padding: .8rem .9rem;
  cursor: pointer;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.option:hover { border-color: #b9c8da; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option__title { font-weight: 600; font-size: .88rem; display: block; }
.option__meta { font-size: .76rem; color: var(--muted); }

.option:has(input:checked) {
  border-color: var(--navy-600);
  background: #f7f9fc;
  box-shadow: 0 0 0 3px rgba(29, 65, 98, .1);
}

/* ------------------------------------------------------------- tables */
.table-wrap { width: 100%; overflow-x: auto; }

table.data { width: 100%; border-collapse: collapse; font-size: .86rem; }

table.data th {
  text-align: left;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  font-weight: 650;
  padding: .8rem 1.25rem;
  background: #f8fafd;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

table.data td {
  padding: .85rem 1.25rem;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}

table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: #fafcff; }

.amount { font-variant-numeric: tabular-nums; font-weight: 620; white-space: nowrap; }
.amount--in { color: var(--green); }
.amount--out { color: var(--text); }
.amount--neg { color: var(--red); }

.tx-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  background: #eef2f8;
  color: var(--navy-700);
}

.tx-icon--in { background: var(--green-soft); color: var(--green); }
.tx-icon--out { background: var(--red-soft); color: var(--red); }
.tx-icon svg { width: 16px; height: 16px; }

.cell-flex { display: flex; align-items: center; gap: .7rem; }
.stack { display: flex; flex-direction: column; }
.stack--tight { line-height: 1.25; }

/* ------------------------------------------------------------- banks card */
.bankcard {
  position: relative;
  border-radius: 18px;
  padding: 1.35rem 1.4rem;
  color: #fff;
  min-height: 186px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, #0d2137 0%, #1d4162 100%);
}

.bankcard--gold { background: linear-gradient(135deg, #6a5220 0%, #c8a24a 100%); color: #1a2433; }
.bankcard--plat { background: linear-gradient(135deg, #2b3542 0%, #7d8a9c 100%); }

.bankcard::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 88% 8%, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 55%);
}

.bankcard__row { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.bankcard__brand { font-family: var(--serif); font-size: 1.05rem; font-weight: 700; letter-spacing: .04em; }
.bankcard__number { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.12rem; letter-spacing: .12em; position: relative; z-index: 1; }
.bankcard__meta { display: flex; gap: 1.4rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; position: relative; z-index: 1; opacity: .9; }
.bankcard__chip { width: 34px; height: 24px; border-radius: 5px; background: linear-gradient(135deg, #e9d9a8, #b8994a); opacity: .95; }

/* ------------------------------------------------------------- misc */
.divider { height: 1px; background: var(--line); margin: 1.1rem 0; }

.empty {
  padding: 2.4rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: .88rem;
}

.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed #e8edf5; font-size: .86rem; }
.kv:last-child { border-bottom: none; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }

.copy {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: #f1f5fa;
  border: 1px dashed #c9d6e4;
  border-radius: 8px;
  padding: .3rem .55rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .78rem;
  cursor: pointer;
}
.copy:hover { background: #e9eff7; }

.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; flex-wrap: wrap; }
.tab { padding: .55rem .85rem; font-size: .83rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
.tab.is-active { color: var(--navy-800); border-bottom-color: var(--gold); }

.pagination { display: flex; gap: .3rem; padding: 1rem 1.25rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0 .5rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: .8rem;
  color: var(--navy-700);
  background: #fff;
}
.pagination .is-current { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.pagination .is-disabled { opacity: .45; }

.progress { height: 6px; border-radius: 999px; background: #e9eef5; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); }

.chartbars { display: flex; align-items: flex-end; gap: .9rem; height: 132px; padding-top: .5rem; }
.chartbars__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .45rem; height: 100%; justify-content: flex-end; }
.chartbars__bars { display: flex; align-items: flex-end; gap: 4px; height: 100%; width: 100%; justify-content: center; }
.chartbars__bar { width: 11px; border-radius: 4px 4px 0 0; min-height: 3px; }
.chartbars__bar--in { background: linear-gradient(180deg, #2f7d63, #12855f); }
.chartbars__bar--out { background: linear-gradient(180deg, #d7a1a8, #c02c3c); }
.chartbars__label { font-size: .68rem; color: var(--muted); }

/* ------------------------------------------------------------- auth */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: #fff;
}

.auth__aside {
  background: linear-gradient(160deg, var(--navy-900) 0%, #102a42 55%, #1d4162 100%);
  color: #dbe6f1;
  padding: 3rem 3.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth__aside::after {
  content: "";
  position: absolute;
  left: -120px; bottom: -160px;
  width: 460px; height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,162,74,.3) 0%, rgba(200,162,74,0) 70%);
}

.auth__headline { font-family: var(--serif); font-size: 2.15rem; line-height: 1.22; margin-bottom: .8rem; color: #fff; }
.auth__lede { color: #a9bccf; max-width: 30rem; }

.auth__points { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .8rem; position: relative; z-index: 1; }
.auth__points li { display: flex; gap: .65rem; font-size: .88rem; color: #c7d6e5; }
.auth__points svg { width: 17px; height: 17px; color: var(--gold); flex: 0 0 17px; margin-top: 3px; }

.auth__panel { display: flex; align-items: center; justify-content: center; padding: 2.5rem 2rem; }
.auth__form { width: 100%; max-width: 390px; }

.auth__title { font-family: var(--serif); font-size: 1.7rem; margin-bottom: .2rem; }

.trust { display: flex; gap: 1.4rem; flex-wrap: wrap; font-size: .74rem; color: #8fa6bd; position: relative; z-index: 1; }

/* ------------------------------------------------------------- admin */
.admin-shell .sidebar { background: linear-gradient(180deg, #0a1420 0%, #050c14 100%); }
.admin-shell .sidebar__brand .mark { background: linear-gradient(145deg, #e6cf95, #b8994a); }
.admin-top-strip { height: 3px; background: linear-gradient(90deg, var(--gold), #245176); }

.admin-shell .topbar { background: #0d1a27; border-bottom-color: rgba(255,255,255,.07); color: #e6eef7; }
.admin-shell .topbar .userbox__name { color: #e6eef7; }
.admin-shell .topbar .userbox__meta { color: #8fa6bd; }
.admin-shell .topbar .pill { background: rgba(255,255,255,.08); color: #cfe0f0; }

/* ------------------------------------------------- mobile app chrome */
.menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--navy-800);
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.menu-btn svg { width: 19px; height: 19px; }
.menu-btn:active { background: #eef2f8; }

.appbar-brand { display: none; align-items: center; gap: .5rem; min-width: 0; }

.appbar-brand .mark {
  width: 30px; height: 30px;
  flex: 0 0 30px;
  font-size: .95rem;
  border-radius: 9px;
}

.appbar-brand .appbar-brand__text {
  font-size: .88rem;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(6, 14, 22, .5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
}

.bottomnav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  padding: .3rem .3rem calc(.3rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px -20px rgba(12, 27, 42, .5);
}

.bottomnav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .18rem;
  padding: .38rem .1rem .3rem;
  border-radius: 12px;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--muted);
  transition: color .16s ease, background .16s ease;
}

.bottomnav__item svg { width: 21px; height: 21px; }
.bottomnav__item:hover { color: var(--navy-700); }
.bottomnav__item.is-active { color: var(--navy-800); background: #eef2f8; }
.bottomnav__item.is-active svg { color: var(--navy-700); }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--2-1 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  /* --- app shell: drawer sidebar instead of a wrapped strip --- */
  .shell { flex-direction: column; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 84%;
    max-width: 306px;
    height: 100%;
    flex: none;
    z-index: 60;
    border-radius: 0 22px 22px 0;
    transform: translateX(-104%);
    transition: transform .3s cubic-bezier(.32, .72, 0, 1);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .nav-open .sidebar {
    transform: none;
    box-shadow: 26px 0 60px -34px rgba(4, 12, 20, .85);
  }

  .nav-open .scrim { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }

  .sidebar__brand { padding: 1.15rem 1.1rem 1rem; }
  .sidebar__nav { display: block; padding: .6rem .65rem 2.5rem; }
  .nav-label { display: block; padding: .9rem .75rem .35rem; }

  .nav-link {
    margin: 0 0 2px;
    padding: .82rem .8rem;
    font-size: .93rem;
    border-radius: 12px;
    gap: .8rem;
  }

  .nav-link svg { width: 20px; height: 20px; flex: 0 0 20px; }
  .nav-link:active { background: rgba(255, 255, 255, .1); }

  /* --- compact app bar --- */
  .menu-btn { display: grid; }
  .appbar-brand { display: flex; }
  .topbar__title { display: none; }

  .topbar {
    height: 60px;
    padding: 0 .85rem;
    gap: .6rem;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }

  .topbar__pill { display: none; }
  .userbox__name, .userbox__meta { display: none; }
  .userbox { gap: .4rem; }

  .content { padding: .85rem .85rem calc(5.8rem + env(safe-area-inset-bottom)); max-width: 100%; }

  .bottomnav { display: grid; }

  /* --- app-like surfaces --- */
  .card { border-radius: 15px; box-shadow: 0 1px 2px rgba(12, 27, 42, .05); }
  .card__head { padding: .9rem 1rem; }
  .card__body { padding: 1rem; }

  .balance { padding: 1.2rem 1.15rem; border-radius: 17px; }
  .balance__amount { font-size: 2rem; }
  .balance__actions { gap: .4rem; }
  .balance__actions .btn { flex: 1 1 0; min-width: 0; padding-left: .5rem; padding-right: .5rem; }
  .balance__actions form { flex: 1 1 auto; min-width: 0; }
  .balance__actions form .btn { width: 100%; }

  .stat { padding: .9rem 1rem; border-radius: 15px; }
  .stat__value { font-size: 1.2rem; }

  .grid--3, .grid--2 { grid-template-columns: minmax(0, 1fr); }
  .grid { gap: .85rem; }

  .auth { grid-template-columns: 1fr; }
  .auth__aside { display: none; }

  table.data th { padding: .7rem 1rem; }
  table.data td { padding: .75rem 1rem; }
  .pagination { padding: .85rem 1rem; }

  .alert { border-radius: 14px; }
}

@media (max-width: 620px) {
  .grid--4 { grid-template-columns: 1fr; }
  .balance__amount { font-size: 1.85rem; }
  .balance__actions { flex-wrap: nowrap; }
  .balance__actions .btn { font-size: .78rem; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tab { white-space: nowrap; }
  .chartbars { gap: .55rem; }
  .option { padding: .7rem .8rem; }
}

