/* Family Ledger — mobile-first, self-contained (no external assets) */

:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --hairline: #e1e0d9;
  --baseline: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --accent: #2a78d6;          /* series-1 blue: inflow, buttons, active tab */
  --series-out: #eb6834;      /* series-2 orange: outflow */
  --good: #0ca30c;
  --good-text: #006300;
  --warning: #fab219;
  --critical: #d03b3b;
  --shadow: 0 1px 3px rgba(11, 11, 11, 0.07);
  --sheet-shadow: 0 -8px 32px rgba(11, 11, 11, 0.18);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --hairline: #2c2c2a;
    --baseline: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --accent: #3987e5;
    --series-out: #d95926;
    --good: #0ca30c;
    --good-text: #0ca30c;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --sheet-shadow: 0 -8px 32px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
button, .chip, .chip-btn, .nav-item, .card, .fab, .badge, .att-del, .close-x, .seg {
  -webkit-user-select: none; user-select: none;
}
body {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--page);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); }
img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
}
.brand { font-size: 17px; font-weight: 700; letter-spacing: 0.2px; }
.brand small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }
/* NOTE: flex `gap` needs iOS 14.5+; margins used instead for older iPads. */
.topbar-actions { display: flex; align-items: center; }
.topbar-actions > * + * { margin-left: 6px; }
.chip-btn {
  font-size: 13px; color: var(--ink-2);
  border: 1px solid var(--hairline); border-radius: 999px;
  padding: 4px 12px; background: var(--surface);
}
.chip-btn:active { background: var(--page); }
.chip-btn.active { background: var(--ink); color: var(--page); border-color: var(--ink); }
.role-tag {
  font-size: 11px; color: var(--muted);
  border: 1px solid var(--hairline); border-radius: 999px; padding: 2px 8px;
}

/* ---------- layout ---------- */
.wrap {
  max-width: 760px; margin: 0 auto;
  padding: 12px 14px calc(96px + env(safe-area-inset-bottom));
}

/* ---------- filter row ---------- */
.controls { position: sticky; top: 49px; z-index: 20; background: var(--page); padding: 8px 0 6px; }
.search {
  width: 100%; padding: 9px 14px; margin-bottom: 8px;
  border: 1px solid var(--hairline); border-radius: 10px;
  background: var(--surface);
  font-size: 16px;  /* ≥16px: stops iOS Safari force-zooming on focus */
}
.search::placeholder { color: var(--muted); }
.chips { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.chips > * + * { margin-left: 8px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; font-size: 14px; padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--hairline); background: var(--surface); color: var(--ink-2);
  white-space: nowrap;
}
.chip.active { background: var(--ink); color: var(--page); border-color: var(--ink); font-weight: 600; }

/* ---------- month groups & cards ---------- */
.month-head {
  font-size: 13px; font-weight: 600; color: var(--muted);
  margin: 18px 2px 8px; letter-spacing: 0.3px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.month-head .month-net { font-weight: 400; font-size: 12px; }
.month-net .net { font-weight: 700; color: var(--ink); }
.month-net .net.pos { color: var(--good-text); }
.card {
  display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 8px;
  box-shadow: var(--shadow); cursor: pointer;
  transition: transform 0.06s ease;
}
.card:active { transform: scale(0.985); }
.card-main { flex: 1; min-width: 0; }
.card-name { font-weight: 600; font-size: 15.5px; display: flex; align-items: center; min-width: 0; }
.card-name .clip-ic { margin-left: 6px; }
.card-name .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip-ic { flex: 0 0 auto; color: var(--muted); }
.card-desc { color: var(--ink-2); font-size: 13px; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-dates { color: var(--muted); font-size: 12.5px; margin-top: 3px; display: flex; flex-wrap: wrap; }
.card-dates > span + span { margin-left: 10px; }
.card-side { text-align: right; flex: 0 0 auto; margin-left: 12px; }
.amt { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.amt.in { color: var(--good-text); }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; border-radius: 999px;
  padding: 2px 9px; margin-top: 5px;
}
.badge.paid { color: var(--good-text); background: rgba(12, 163, 12, 0.12); }
.badge.unpaid { color: var(--ink-2); background: transparent; border: 1px solid var(--baseline); }
.badge.overdue { color: #fff; background: var(--critical); }
.badge.duesoon { color: #5c4102; background: rgba(250, 178, 25, 0.25); }
@media (prefers-color-scheme: dark) {
  .badge.duesoon { color: var(--warning); }
}
.tag-pill {
  display: inline-block; font-size: 11px; line-height: 17px;
  color: var(--muted); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 0 8px; vertical-align: 1px;
}
.empty { text-align: center; color: var(--muted); padding: 56px 0; font-size: 15px; }
.empty .big { font-size: 40px; margin-bottom: 10px; }

/* ---------- bottom nav ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around;
  background: var(--surface); border-top: 1px solid var(--hairline);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted); font-size: 11.5px; padding: 4px 0; position: relative;
}
.nav-badge {
  position: absolute; top: 1px; left: calc(50% + 8px);
  background: var(--critical); color: #fff;
  font-size: 10px; font-weight: 700; border-radius: 999px;
  min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px;
  text-align: center; display: none;
}
.nav-item .ic { font-size: 20px; line-height: 22px; height: 22px; font-weight: 600; }
.nav-item svg { display: block; }
.nav-item.active { color: var(--accent); font-weight: 600; }

/* ---------- FAB ---------- */
.fab {
  position: fixed; right: 18px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 29;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 30px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(42, 120, 214, 0.45);
}
.fab:active { transform: scale(0.94); }
body[data-role="viewer"] .fab { display: none; }
body[data-role="viewer"] .admin-only { display: none !important; }

/* ---------- overlay / sheet ---------- */
.overlay {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 40;
  background: rgba(0, 0, 0, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadein 0.15s ease;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  background: var(--surface); width: 100%; max-width: 640px;
  border-radius: 18px 18px 0 0; box-shadow: var(--sheet-shadow);
  max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  animation: slideup 0.2s ease;
  padding-bottom: env(safe-area-inset-bottom);
}
@keyframes slideup { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) {
  .overlay { align-items: center; padding: 24px; }
  .sheet { border-radius: 18px; max-height: 86vh; }
}
.sheet-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 10px; background: var(--surface);
  border-bottom: 1px solid var(--hairline);
}
.sheet-title { font-size: 17px; font-weight: 700; }
.close-x { font-size: 22px; color: var(--muted); padding: 2px 8px; }
.sheet-body { padding: 16px 18px 22px; }

/* ---------- detail ---------- */
.d-amt { font-size: 32px; font-weight: 700; margin-bottom: 2px; }
.d-amt.in { color: var(--good-text); }
.d-sub { color: var(--ink-2); font-size: 14px; margin-bottom: 14px; }
.d-rows { border-top: 1px solid var(--hairline); }
.d-row {
  display: flex; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--hairline); font-size: 14.5px;
}
.d-row .k { color: var(--muted); flex: 0 0 auto; }
.d-row .v { text-align: right; word-break: break-word; margin-left: 12px; }
.att-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.att-item { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--page); }
.att-item img { width: 100%; height: 96px; object-fit: cover; cursor: zoom-in; }
.att-del {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 14px; line-height: 24px; text-align: center;
}
.sheet-actions { display: flex; margin-top: 18px; flex-wrap: wrap; }
.sheet-actions .btn { margin: 0 10px 10px 0; }
.sheet-actions .btn:last-child { margin-right: 0; }
.btn {
  flex: 1; min-width: 120px; text-align: center;
  padding: 12px 16px; border-radius: 11px; font-size: 15.5px; font-weight: 600;
  border: 1px solid var(--hairline); background: var(--surface); color: var(--ink);
}
.btn:active { opacity: 0.8; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--critical); border-color: var(--critical); flex: 0 0 auto; min-width: 0; }
.btn.ghost { color: var(--ink-2); }

/* ---------- form ---------- */
.f-row { margin-bottom: 14px; }
.f-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.f-input, .f-select, .f-textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--baseline); border-radius: 10px;
  background: var(--page); font-size: 16px;
}
.f-input:focus, .f-textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.f-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: flex; border: 1px solid var(--baseline); border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; padding: 10px 0; font-size: 15px; color: var(--ink-2); background: var(--page); }
.seg button.active.dir-in { background: var(--good-text); color: #fff; font-weight: 700; }
.seg button.active.dir-out { background: var(--ink); color: var(--page); font-weight: 700; }
.check-row { display: flex; align-items: center; padding: 4px 0; }
.check-row input { width: 20px; height: 20px; accent-color: var(--accent); margin-right: 10px; }
.upload-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px; border: 1.5px dashed var(--baseline); border-radius: 10px;
  color: var(--ink-2); font-size: 15px; background: var(--page);
}
.preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.preview-grid .att-item img { height: 72px; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 60; background: rgba(0, 0, 0, 0.92);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.lb-close { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 16px; color: #fff; font-size: 30px; z-index: 61; }

/* ---------- dashboard ---------- */
.dash-seg { display: flex; align-items: center; flex-wrap: wrap; margin: 4px 0 8px; }
.dash-seg > * { margin-bottom: 6px; }
.dash-seg .chip + .chip { margin-left: 8px; }
.dash-tools { margin-left: auto; display: flex; }
.dash-tools .chip { font-size: 12.5px; padding: 4px 10px; }
.dash-tools .chip + .chip { margin-left: 6px; }
.dash-tags { margin: -6px 0 14px; }
.form-tags { margin-top: 8px; }
.dash-seg .chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 14px; box-shadow: var(--shadow);
}
.tile .t-label { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.tile .t-value { font-size: 21px; font-weight: 700; }
.tile .t-value.pos { color: var(--good-text); }
.tile .t-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.tile.wide { grid-column: 1 / -1; }
.tile.wide .t-value.big { font-size: 28px; }
.bal-table { width: 100%; border-collapse: collapse; font-size: 13.5px;
  font-variant-numeric: tabular-nums; margin-top: 4px; }
.bal-table th { text-align: right; color: var(--muted); font-weight: 600;
  font-size: 12px; padding: 6px 0 6px 8px; border-bottom: 1px solid var(--hairline); }
.bal-table th:first-child { text-align: left; padding-left: 0; }
.bal-table td { text-align: right; padding: 8px 0 8px 8px;
  border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.bal-table td:first-child { text-align: left; padding-left: 0; color: var(--ink-2); }
.bal-table tr:last-child td { border-bottom: none; }
.bal-table .pos { color: var(--good-text); }
.bal-table td.net { font-weight: 700; }
.bal-table .mut { color: var(--muted); }
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 15px 14px 10px; box-shadow: var(--shadow); margin-bottom: 14px;
}
.panel-title { font-size: 14.5px; font-weight: 700; margin-bottom: 2px; }
.panel-sub { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.chart-box { position: relative; height: 230px; }
.due-list .card { cursor: pointer; box-shadow: none; border-color: var(--hairline); }
.section-gap { height: 4px; }

/* ---------- counterparty history ---------- */
.hist-sums { font-size: 13px; color: var(--ink-2); margin: 2px 0 4px; }
.hist-sums .pos { color: var(--good-text); }
.hist-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--hairline);
  font-size: 14px; cursor: pointer;
}
.hist-amt { font-weight: 600; font-variant-numeric: tabular-nums; }
.hist-amt.pos { color: var(--good-text); }
.hist-unpaid {
  font-size: 11px; font-weight: 400; color: var(--muted);
  border: 1px solid var(--baseline); border-radius: 999px; padding: 0 6px;
}
.hist-more { color: var(--muted); padding: 6px 0; }

/* ---------- spotlight tour ---------- */
.tour-h { font-weight: 700; font-size: 15.5px; margin-bottom: 2px; }
.tour-p { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.tour-link {
  text-align: center; color: var(--muted); font-size: 13px;
  padding: 10px 0 4px; cursor: pointer;
}
.spot-block { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 90; }
.spot {
  position: fixed; z-index: 91; border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  transition: top 0.35s ease, left 0.35s ease, width 0.35s ease, height 0.35s ease;
}
.spot-tip {
  position: fixed; z-index: 92; left: 16px; right: 16px;
  margin: 0 auto; max-width: 420px;
  background: var(--surface); border-radius: 14px; padding: 14px 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  transition: top 0.35s ease;
}
.spot-foot {
  display: flex; justify-content: space-between; align-items: center; margin-top: 12px;
}
.spot-n { color: var(--muted); font-size: 12.5px; }
.spot-btn {
  background: var(--accent); color: #fff; border-radius: 9px;
  padding: 8px 16px; font-size: 14.5px; font-weight: 600; margin-left: 8px;
}
.spot-btn.ghost { background: none; color: var(--muted); font-weight: 400; }

/* ---------- filtered totals ---------- */
.list-summary {
  font-size: 13px; color: var(--ink-2); padding: 2px 2px 8px;
  font-variant-numeric: tabular-nums;
}

/* ---------- pull-to-refresh ---------- */
.ptr {
  position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 50%;
  transform: translate(-50%, -60px); z-index: 80;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--hairline);
  box-shadow: var(--shadow); color: var(--muted);
  font-size: 18px; line-height: 32px; text-align: center;
  transition: transform 0.15s ease, color 0.15s ease; pointer-events: none;
}
.ptr.show { transform: translate(-50%, 0); }
.ptr.ready { color: var(--accent); }
.ptr.spin { animation: ptrspin 0.8s linear infinite; }
@keyframes ptrspin {
  from { transform: translate(-50%, 0) rotate(0deg); }
  to { transform: translate(-50%, 0) rotate(360deg); }
}

/* ---------- 大字 big-text mode ---------- */
body.bigtext { font-size: 17.5px; }
body.bigtext .card-name { font-size: 17px; }
body.bigtext .card-desc { font-size: 14.5px; }
body.bigtext .card-dates { font-size: 14px; }
body.bigtext .amt { font-size: 17.5px; }
body.bigtext .badge { font-size: 13px; }
body.bigtext .month-head { font-size: 14.5px; }
body.bigtext .month-head .month-net { font-size: 13.5px; }
body.bigtext .chip { font-size: 15.5px; }
body.bigtext .d-row { font-size: 16px; }
body.bigtext .d-amt { font-size: 34px; }
body.bigtext .tile .t-label { font-size: 14px; }
body.bigtext .tile .t-value { font-size: 23px; }
body.bigtext .tile.wide .t-value.big { font-size: 30px; }
body.bigtext .tile .t-sub { font-size: 13px; }
body.bigtext .bal-table { font-size: 15px; }
body.bigtext .nav-item { font-size: 13px; }
body.bigtext .panel-title { font-size: 16px; }
body.bigtext .panel-sub { font-size: 13.5px; }
body.bigtext .f-label { font-size: 14.5px; }
body.bigtext .search { font-size: 16.5px; }
body.bigtext .list-summary { font-size: 14.5px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%); z-index: 70;
  background: var(--ink); color: var(--page);
  padding: 10px 18px; border-radius: 999px; font-size: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
  max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; }

/* ---------- desktop / wide layout (also iPad landscape) ---------- */
.top-nav { display: none; }
@media (min-width: 1000px) {
  .topbar { justify-content: flex-start; padding: 12px 28px; }
  .topbar-actions { margin-left: auto; }
  .top-nav { display: flex; margin-left: 28px; }
  .top-nav .nav-link {
    padding: 7px 18px; border-radius: 999px;
    color: var(--ink-2); font-size: 14.5px; font-weight: 600;
    position: relative;
  }
  .top-nav .nav-badge { left: auto; right: -5px; top: -5px; }
  .top-nav .nav-link + .nav-link { margin-left: 6px; }
  .top-nav .nav-link.active { background: var(--accent); color: #fff; }
  .bottom-nav, .fab { display: none !important; }

  .wrap { max-width: 1240px; padding: 26px 32px 56px; }

  /* ledger tabs: list + always-open detail pane */
  #view.split {
    display: grid; grid-template-columns: 430px minmax(0, 1fr);
    grid-column-gap: 26px; align-items: start;
  }
  .list-col { min-width: 0; }
  #view.split .controls { position: static; padding-top: 0; }
  .add-inline { flex: none; width: 100%; margin-bottom: 10px; }
  .card.selected {   /* zero-geometry emphasis: ring via shadow, no size change */
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow);
  }
  .detail-pane {
    position: sticky; top: 84px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; padding: 26px 30px;
    box-shadow: var(--shadow);
    max-height: calc(100vh - 116px); overflow-y: auto;
  }
  .pane-empty { color: var(--muted); text-align: center; padding: 90px 0; font-size: 15px; }
  .detail-pane .att-grid { grid-template-columns: repeat(4, 1fr); }
  .detail-pane .att-item img { height: 120px; }

  /* dashboard: multi-column */
  #view.dashwide {
    display: grid; grid-template-columns: 1fr 1fr;
    grid-column-gap: 22px; align-items: start;
  }
  #view.dashwide > .dash-seg,
  #view.dashwide > .dash-tags,
  #view.dashwide > .tiles,
  #view.dashwide > .due-list,
  #view.dashwide > .tour-link { grid-column: 1 / -1; }
  #view.dashwide .tiles { grid-template-columns: repeat(3, 1fr); }
  #view.dashwide .chart-box { height: 300px; }
}

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 380px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
  padding: 34px 28px; text-align: center;
}
.login-logo {
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 14px;
  background: var(--accent); color: #fff; font-size: 32px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.login-title { font-size: 21px; font-weight: 700; }
.login-sub { color: var(--muted); font-size: 13.5px; margin: 4px 0 22px; }
.login-err { color: var(--critical); font-size: 13.5px; margin-top: 12px; }
