:root {
  /* Light mode only (Eric, 2026-10-06). Brand colors from the Viet House logo: gold #f0a000, brown #423009. */
  color-scheme: light;
  --page: #f9f7f2; --surface: #ffffff; --surface-2: #f3f0e8;
  --ink: #0b0b0b; --ink-2: #52514e; --muted: #6f6d68; --axis: #c3c2b7; --grid: #e7e4dc;
  --border: rgba(66,48,9,0.12);
  --brand: #423009; --gold: #f0a000; --gold-pale: #fdf1d6;
  --accent: #8a5a00; --accent-ink: #423009;
  --up: #006300; --down: #b42318; --error-bg: #fdecea; --flash-bg: #e7f2e7;
  --ch-clover: #2a78d6; --ch-doordash: #eb6834; --ch-ubereats: #1baf7a; --ch-grubhub: #eda100; --ch-other: #e87ba4;
  --yr-1: #86b6ef; --yr-2: #5598e7; --yr-3: #256abf; --last-year: #898781;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
code { background: var(--surface-2); padding: 1px 4px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--surface); border-bottom: 3px solid var(--gold); }
.top-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--brand); text-decoration: none; letter-spacing: 0.01em; }
.brand img { width: 40px; height: 40px; }
.brand .sub { font-weight: 500; color: var(--accent); }
nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
nav a, button.link { color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: 8px; font: inherit; background: none; border: 0; cursor: pointer; }
nav a.on { background: var(--gold-pale); color: var(--brand); font-weight: 600; }
form.inline { display: inline; }
main { padding-top: 16px; padding-bottom: 40px; }
h1 { font-size: 22px; margin: 0 0 12px; }
h2 { font-size: 17px; margin: 0 0 8px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.up { color: var(--up); } .down { color: var(--down); }
.flash { background: var(--flash-bg); border-radius: 8px; padding: 8px 12px; }
.error { color: var(--down); }
p.error { background: var(--error-bg); border-radius: 8px; padding: 8px 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.tile-label { color: var(--ink-2); font-size: 13px; }
.tile-value { font-size: 28px; font-weight: 700; margin: 2px 0; }
.tile-sub { font-size: 13px; color: var(--ink-2); }
.chart-box { position: relative; height: 320px; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--grid); text-align: left; vertical-align: top; }
thead th { color: var(--ink-2); font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--axis); }
table.num td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.num thead th:not(:first-child) { text-align: right; }
tfoot th, tfoot td { border-top: 1px solid var(--axis); font-weight: 600; }
table.entry td { font-variant-numeric: tabular-nums; }
input, select { font: inherit; color: var(--ink); background: var(--page); border: 1px solid var(--axis); border-radius: 8px; padding: 8px 10px; width: 100%; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
input.bad { border-color: var(--down); }
table.entry input.amt { max-width: 220px; text-align: right; font-variant-numeric: tabular-nums; }
.chg.big { font-weight: 700; }
.badge { font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--surface-2); padding: 2px 8px; border-radius: 99px; vertical-align: middle; }
.badge.new { color: var(--up); }
.month-pick { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; max-width: 320px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
button.primary, button.danger { font: inherit; font-weight: 600; border: 0; border-radius: 8px; padding: 10px 16px; cursor: pointer; }
button.primary { background: var(--gold); color: var(--accent-ink); }
button.primary:hover { background: #e09500; }
button.danger { background: none; color: var(--down); border: 1px solid var(--down); }
label { display: block; font-size: 13px; color: var(--ink-2); margin: 10px 0 4px; }
table.entry label { margin: 0; font-size: 15px; color: var(--ink); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between select { width: auto; }
.sr { position: absolute; left: -9999px; }
body.center { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login { width: 100%; max-width: 360px; text-align: left; }
.login-logo { display: block; width: 160px; height: 160px; margin: 0 auto 8px; }
.login h1 { text-align: center; color: var(--brand); }
.login button { width: 100%; margin-top: 14px; }
.history td { white-space: nowrap; }
@media (max-width: 600px) { .chart-box { height: 260px; } .tile-value { font-size: 24px; } }
th.group { text-align: center !important; border-bottom: 1px solid var(--grid); }
