/* Alieza by RTC — calm, elegant finance UI: soft neutral canvas, white cards, deep navy actions, gold from the logo as the only accent.
   Layout: white sidebar on desktop, top bar + scrolling tabs on phones; location screen is one mobile column. */
:root {
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #f9fafb; --sunken: #f1f3f6;
  --ink: #000000; --ink-2: #16191f; --ink-3: #4a5160; --line: #e6e8ec; --line-2: #d3d7de;
  --brand: #13294b; --brand-2: #1d3a66; --brand-soft: #eef2f8; --brand-ink: #ffffff;
  --gold: #b48d50; --gold-soft: #f7f1e6; --gold-ink: #8a672c; --word-filter: none;
  --in: #0f8a5f; --in-soft: #e8f5ef; --out: #c8432f; --out-soft: #fcefec;
  --warn: #a8690a; --warn-soft: #fbf3e2; --info: #2c5aa0; --info-soft: #ecf2fb;
  --c-blue: #2c5aa0; --c-blue-soft: #ecf2fb; --c-violet: #6d4bc1; --c-violet-soft: #f2eefb; --c-gold: #a87a2e; --c-gold-soft: #f8f1e4; --c-rose: #c8432f; --c-rose-soft: #fcefec; --c-green: #0f8a5f; --c-green-soft: #e8f5ef;
  --chart-in: #2f9e74; --chart-out: #d77a5f; --grid: #eef0f4; --scrim: rgba(15, 27, 45, .42); --toast: #13294b; --toast-ink: #ffffff;
  --shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 2px 8px rgba(15, 27, 45, .04);
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0d1320; --surface: #141c2b; --surface-2: #182132; --sunken: #111827;
  --ink: #e8ecf3; --ink-2: #b3bccc; --ink-3: #7d889c; --line: #232d3f; --line-2: #2e3a4f;
  --brand: #d4b27a; --brand-2: #e0c290; --brand-soft: #1d2638; --brand-ink: #111827;
  --gold: #d4b27a; --gold-soft: #2a2416; --gold-ink: #e0c290; --word-filter: invert(1) hue-rotate(180deg) brightness(1.1);
  --in: #4cc79a; --in-soft: #142c24; --out: #f08a73; --out-soft: #36201c; --warn: #f0bd5c; --warn-soft: #30270f; --info: #8db2ee; --info-soft: #1a2740;
  --c-blue: #8db2ee; --c-blue-soft: #1a2740; --c-violet: #b9a3f2; --c-violet-soft: #241d3b; --c-gold: #d4b27a; --c-gold-soft: #2a2416; --c-rose: #f08a73; --c-rose-soft: #36201c; --c-green: #4cc79a; --c-green-soft: #142c24;
  --chart-in: #43b98c; --chart-out: #e2876c; --grid: #1f2839; --scrim: rgba(0, 0, 0, .6); --toast: #e8ecf3; --toast-ink: #0d1320;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0d1320; --surface: #141c2b; --surface-2: #182132; --sunken: #111827;
  --ink: #e8ecf3; --ink-2: #b3bccc; --ink-3: #7d889c; --line: #232d3f; --line-2: #2e3a4f;
  --brand: #d4b27a; --brand-2: #e0c290; --brand-soft: #1d2638; --brand-ink: #111827;
  --gold: #d4b27a; --gold-soft: #2a2416; --gold-ink: #e0c290; --word-filter: invert(1) hue-rotate(180deg) brightness(1.1);
  --in: #4cc79a; --in-soft: #142c24; --out: #f08a73; --out-soft: #36201c; --warn: #f0bd5c; --warn-soft: #30270f; --info: #8db2ee; --info-soft: #1a2740;
  --c-blue: #8db2ee; --c-blue-soft: #1a2740; --c-violet: #b9a3f2; --c-violet-soft: #241d3b; --c-gold: #d4b27a; --c-gold-soft: #2a2416; --c-rose: #f08a73; --c-rose-soft: #36201c; --c-green: #4cc79a; --c-green-soft: #142c24;
  --chart-in: #43b98c; --chart-out: #e2876c; --grid: #1f2839; --scrim: rgba(0, 0, 0, .6); --toast: #e8ecf3; --toast-ink: #0d1320;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01", "tnum"; letter-spacing: -.005em; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--info); }
.num, td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.neg { color: var(--out) !important; }
.pos { color: var(--in) !important; }
h1 { font-size: 24px; line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: 15.5px; margin: 0; font-weight: 700; letter-spacing: -.005em; }
h3 { font-size: 12px; margin: 0; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { display: block; height: auto; }
.logo .mark { height: 36px; width: auto; }
.logo .word { height: 25px; width: auto; filter: var(--word-filter); }
.logo.lg { flex-direction: column; gap: 14px; }
.logo.lg .mark { height: 92px; }
.logo.lg .word { height: 48px; }
.logo.sm .mark { height: 28px; }
.logo.sm .word { height: 19px; }
#print-area .logo .word, .print-preview .logo .word, .print-logo img, .voucher img { filter: none !important; }

/* shell */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100%; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.side .logo { padding: 0 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav .grp { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); padding: 14px 12px 6px; }
.nav button { all: unset; cursor: pointer; padding: 8px 12px; border-radius: 8px; color: var(--ink); font-weight: 500; position: relative; }
.nav button:hover { background: var(--sunken); color: var(--ink); }
.nav button.on { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.nav button.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.nav button:focus-visible { outline: 2px solid var(--gold); }
.side .me { margin-top: auto; border-top: 1px solid var(--line); padding: 14px 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side .me b { display: block; font-size: 14px; }
.main { padding-block: 30px 72px; padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); max-width: 1360px; width: 100%; }
.topbar { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head .sub { color: var(--ink-2); margin-top: 4px; font-size: 14px; }

/* blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* KPI cards: white, a small tinted icon, colour only in the icon */
.kpi { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; text-align: left; font: inherit; color: inherit; display: flex; flex-direction: column; }
button.kpi { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
button.kpi:hover { border-color: var(--line-2); box-shadow: 0 4px 16px rgba(15, 27, 45, .07); }
.kpi .top { display: flex; align-items: center; gap: 10px; }
.kpi .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.kpi .ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kpi .lbl { font-size: 13px; color: var(--ink); font-weight: 600; flex: 1; }
.kpi .go { color: var(--ink-3); font-size: 18px; line-height: 1; }
.kpi .val { font-size: 27px; font-weight: 700; margin-top: 14px; font-variant-numeric: tabular-nums; letter-spacing: -.025em; line-height: 1.15; }
.kpi .foot { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; font-variant-numeric: tabular-nums; }
.t-blue .ico { background: var(--c-blue-soft); color: var(--c-blue); }
.t-purple .ico { background: var(--c-violet-soft); color: var(--c-violet); }
.t-yellow .ico { background: var(--c-gold-soft); color: var(--c-gold); }
.t-coral .ico { background: var(--c-rose-soft); color: var(--c-rose); }
.t-green .ico { background: var(--c-green-soft); color: var(--c-green); }
.kpi.hero { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.kpi.hero .lbl, .kpi.hero .foot, .kpi.hero .go { color: var(--brand-ink); opacity: .78; }
.kpi.hero .ico { background: rgba(255, 255, 255, .12); color: var(--gold); }

.btn { border: 1px solid var(--line-2); background: var(--surface); padding: 8px 15px; border-radius: 9px; cursor: pointer; font-weight: 600; line-height: 1.25; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--sunken); }
.btn.danger { color: var(--out); }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 12px 18px; font-size: 15px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

input, select, textarea { border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 11px; background: var(--surface); min-width: 0; }
select { padding-right: 28px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand); }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.form { display: grid; gap: 14px; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.in { background: var(--in-soft); color: var(--in); }
.pill.out { background: var(--out-soft); color: var(--out); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.grey { background: var(--sunken); color: var(--ink-2); }
.pill.brand { background: var(--gold-soft); color: var(--gold-ink); }

.seg { display: inline-flex; background: var(--sunken); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { all: unset; cursor: pointer; padding: 6px 13px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 27, 45, .1); }
.seg button:focus-visible { outline: 2px solid var(--gold); }
.range { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.range select { font-weight: 600; }
.range .dates { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.range .dates input { padding: 6px 9px; font-size: 13px; }

.note { background: var(--info-soft); color: var(--ink); border-radius: 10px; padding: 12px 14px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.note.warn { background: var(--warn-soft); }

/* figures row inside a card */
.figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.figs > div { padding: 14px 16px; border-right: 1px solid var(--line); min-width: 0; }
.figs > div:last-child { border-right: 0; }
.figs .k { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.figs .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-top: 2px; }
.figs .s { font-size: 12px; color: var(--ink-3); }

/* tables */
.tbl { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
th { background: var(--surface-2); font-size: 12px; color: var(--ink-2); font-weight: 700; position: sticky; top: 0; z-index: 1; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--line-2); border-bottom: 0; }
tr.locked td:not(.cr):not(.dr) { color: var(--ink); }
tr.removed td { background: var(--sunken); }
tr.removed td.desc, tr.removed td.num { text-decoration: line-through; text-decoration-color: var(--out); color: var(--ink-3); }
tr.susp td { background: var(--warn-soft); }
td.desc { min-width: 220px; max-width: 360px; word-break: break-word; }
td.cr { color: var(--in); font-weight: 700; }
td.dr { color: var(--out); font-weight: 700; }
.bar { height: 6px; background: var(--sunken); border-radius: 4px; overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }

.pick { width: 240px; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 9px; padding: 7px 10px; cursor: pointer; }
.pick.sug { border-color: var(--in); background: var(--in-soft); }
.pick.empty { color: var(--ink-3); }
.pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop { position: fixed; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(15, 27, 45, .18); width: 380px; max-height: 460px; display: flex; flex-direction: column; }
.pop input { margin: 10px; }
.pop .list { overflow: auto; padding: 0 6px 8px; }
.pop .sec { font-size: 11px; text-transform: uppercase; color: var(--ink-3); padding: 8px 8px 4px; letter-spacing: .07em; font-weight: 700; }
.pop .it { padding: 8px 9px; border-radius: 8px; cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.pop .it:hover { background: var(--brand-soft); }
.pop .it .why { display: block; font-size: 12px; color: var(--ink-3); }

.modal-bg { position: fixed; inset: 0; background: var(--scrim); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 16px; max-width: 540px; width: 100%; max-height: 88vh; overflow: auto; padding: 24px; box-shadow: 0 24px 60px rgba(15, 27, 45, .25); }
.modal.wide { max-width: 760px; }
.modal h2 { margin-bottom: 10px; font-size: 18px; }
.modal ul { padding-left: 18px; }
.modal .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.toast { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); background: var(--toast); color: var(--toast-ink); padding: 11px 18px; border-radius: 10px; z-index: 100; max-width: calc(100vw - 32px); font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.err { background: var(--out); color: #fff; }
.big-pin { font-size: 34px; letter-spacing: 10px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.cred { background: var(--sunken); border-radius: 10px; padding: 14px; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 15px; }

/* login */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.login .box { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 36px 30px 30px; width: 100%; max-width: 400px; box-shadow: 0 10px 40px rgba(15, 27, 45, .08); display: flex; flex-direction: column; gap: 18px; border-top: 3px solid var(--gold); }
.login .box .logo { align-self: center; }
.login .pin { font-size: 22px; letter-spacing: 8px; text-align: center; }
.login .hint { text-align: center; color: var(--ink-3); font-size: 13px; margin: 0; }

.dir { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.arrow { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; font-weight: 800; flex-shrink: 0; }
.arrow.positive { background: var(--in-soft); color: var(--in); }
.arrow.negative { background: var(--out-soft); color: var(--out); }
.arrow.none { background: var(--sunken); color: var(--ink-3); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.chart svg { width: 100%; height: auto; display: block; }
.mapping { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }

.typing td { padding: 4px; }
.typing input { width: 100%; padding: 7px 8px; border-radius: 6px; }
.typing input.amt { text-align: right; font-variant-numeric: tabular-nums; }
.typing td.chk { font-size: 13px; white-space: nowrap; padding: 10px 8px; }

/* location app */
.sup { max-width: 560px; margin: 0 auto; padding-block: 0 80px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 16px; }
.sup-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 0 4px; }
.balance-card { position: relative; overflow: hidden; background: var(--brand); color: var(--brand-ink); border-radius: 18px; padding: 22px; }
.balance-card.negative { background: var(--out); color: #fff; }
.balance-card .lbl { opacity: .8; font-weight: 600; }
.balance-card .val { font-size: 38px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.balance-card .foot { display: flex; gap: 18px; margin-top: 10px; opacity: .85; font-size: 13.5px; flex-wrap: wrap; }
.amount-input { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 12px 14px; }
.ledger-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ledger-item:last-child { border-bottom: 0; }
.ledger-item .amt { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.ledger-item .meta { font-size: 13px; color: var(--ink-3); }

/* demo banner */
.demo-bar { background: var(--gold-soft); color: var(--ink); font-size: 13px; padding-block: 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--line); }
.demo-bar b { color: var(--gold-ink); }
.demo-bar code { font-family: inherit; font-weight: 700; }
.demo-bar button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 7px; padding: 3px 9px; cursor: pointer; font-size: 12px; font-weight: 600; }
.demo-only { display: none !important; }
body.demo .demo-only { display: revert !important; }
body.demo .real-only { display: none !important; }

/* print */
#print-area { display: none; }
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block; color: #000; font-family: var(--font); font-size: 12px; }
  #print-area .voucher { page-break-inside: avoid; }
  #print-area .voucher:nth-child(2n) { page-break-after: always; }
  @page { size: A4; margin: 1.2cm; }
}

/* phones */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .topbar { display: flex; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; }
  body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 31; background: var(--surface); }
  .topbar .bar1 { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-block: 10px 6px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .topbar .logo .mark { height: 28px; }
  .topbar .logo .word { height: 19px; }
  .topbar .tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-block: 0 8px; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .topbar .tabs::-webkit-scrollbar { display: none; }
  .topbar .tabs button { all: unset; cursor: pointer; padding: 6px 12px; border-radius: 99px; font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
  .topbar .tabs button.on { background: var(--brand); color: var(--brand-ink); }
  .main { padding-block: 20px 72px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .kpi .val { font-size: 23px; }
  .figs { grid-template-columns: 1fr; }
  .figs > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .figs > div:last-child { border-bottom: 0; }
  .pick { width: 200px; }
  .pop { left: 12px !important; right: 12px; width: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* added: FY switch, owner app, verify layout, day groups */
.fy-switch { display: flex; align-items: center; gap: 8px; padding: 0 10px; }
.fy-switch select { flex: 1; font-weight: 700; }
.split { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.loc-list { display: flex; flex-direction: column; gap: 6px; }
.loc-list button { all: unset; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.loc-list button:hover { border-color: var(--line-2); }
.loc-list button.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.loc-list button:focus-visible { outline: 2px solid var(--gold); }
.day { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.day-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.day-head b { font-size: 15px; }
.owner { max-width: 620px; margin: 0 auto; padding-block: 0 60px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 16px; }
.owner .total { font-size: 34px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.acct { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; font: inherit; color: inherit; }
.acct:last-child { border-bottom: 0; }
.acct b.num { font-size: 18px; }
.flowrow { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.flowrow:last-child { border-bottom: 0; }
.flowrow .amt { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } .fy-top { display: flex; } }

table.entries { table-layout: fixed; width: 100%; }
table.entries td, table.entries th { padding: 12px 14px; }
table.entries td.desc { word-break: break-word; }
table.entries input.who, table.entries select { padding: 7px 9px; font-size: 13.5px; }

select.head.auto{box-shadow:0 0 0 3px rgba(31,157,85,.35);transition:box-shadow .3s}
