/* ADG Cash Manager styles */
:root {
  --bg: #f6f6f1;
  --surface: #ffffff;
  --surface-2: #fafaf6;
  --ink: #1c2230;
  --muted: #667085;
  --line: #e5e5da;
  --line-strong: #d2d2c4;
  --accent: #121410;
  --accent-ink: #ffffff;
  --accent-hover: #2d3022;
  --mark: #868b2c;          /* ADG olive */
  --mark-2: #aabd2f;        /* ADG lime */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --in: #1b7a4b;
  --in-bg: #e6f3ec;
  --out: #b4412f;
  --out-bg: #f9e9e5;
  --xfer: #56677d;
  --xfer-bg: #e9edf2;
  --warn: #b7791f;
  --warn-bg: #fbf0d9;
  --over: #b4412f;
  --focus: #6b7021;
  --shadow: 0 1px 2px rgba(20, 24, 36, .06), 0 8px 24px rgba(20, 24, 36, .08);
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171f;
    --surface: #1b1f2a;
    --surface-2: #171a23;
    --ink: #e8eaf0;
    --muted: #98a2b3;
    --line: #2a2f3d;
    --line-strong: #3a4154;
    --accent: #aabd2f;
    --accent-ink: #11140a;
    --accent-hover: #c3d556;
    --mark: #aabd2f;
    --mark-2: #868b2c;
    --in: #55c58a;
    --in-bg: #16301f;
    --out: #f08a76;
    --out-bg: #3a2019;
    --xfer: #9fb0c7;
    --xfer-bg: #232a38;
    --warn: #e5b158;
    --warn-bg: #36290f;
    --over: #f08a76;
    --focus: #c3d556;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.in { color: var(--in); }
.out { color: var(--out); }
.xfer { color: var(--xfer); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.loading { padding: 80px 20px; text-align: center; color: var(--muted); }

/* ---------- layout ---------- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { display: block; line-height: 0; }
.brand-logo svg { height: 30px; width: auto; display: block; }
.brand-text { font-family: var(--serif); font-weight: 600; font-size: 19px; letter-spacing: -.01em; padding-left: 14px; border-left: 1px solid var(--line-strong); line-height: 1.1; }
.brand-text small { display: block; font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.tabs { display: flex; gap: 4px; margin-left: 8px; }
.tab { background: none; border: 0; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.tab:hover { background: var(--surface-2); color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); background: var(--surface-2); box-shadow: inset 0 -3px 0 var(--mark); border-radius: 8px 8px 0 0; }
.spacer { flex: 1; }
.userbox { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.demo-banner { background: var(--warn-bg); color: var(--ink); border-bottom: 1px solid var(--line); font-size: 13px; }
.demo-banner .wrap { display: flex; gap: 12px; align-items: center; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
main { padding: 20px 0 80px; }

/* ---------- buttons & fields ---------- */
.btn { border: 1px solid var(--line-strong); background: var(--surface); padding: 8px 14px; border-radius: 8px; font-weight: 500; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--out); border-color: var(--out); background: transparent; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.iconbtn { border: 1px solid var(--line-strong); background: var(--surface); width: 34px; height: 34px; border-radius: 8px; display: inline-grid; place-items: center; line-height: 1; }
.iconbtn:hover { background: var(--surface-2); }
.link { background: none; border: 0; padding: 0; color: var(--ink); text-align: left; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.link:hover { text-decoration-color: var(--accent); }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); min-height: 38px;
}
textarea { resize: vertical; }
label.field { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
label.field > input, label.field > select, label.field > textarea { margin-top: 4px; color: var(--ink); font-weight: 400; font-size: 15px; }

/* ---------- toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.monthnav { display: flex; align-items: center; gap: 6px; }
.monthnav h1 { font-family: var(--serif); font-size: 24px; min-width: 200px; text-align: center; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters select { width: auto; min-width: 150px; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 3px 4px 3px 12px; font-size: 13px; }
.pill button { border: 0; background: rgba(128,128,128,.3); color: inherit; border-radius: 999px; width: 20px; height: 20px; line-height: 1; }
.fab { display: none; }

/* ---------- summary cards ---------- */
.cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.page-title { font-family: var(--serif); font-size: 24px; }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.stat { display: flex; flex-direction: column; gap: 1px; padding: 10px 16px; text-align: left; background: none; border: 0; border-right: 1px solid var(--line); border-radius: 0; min-width: 0; }
.stat:last-child { border-right: 0; }
button.stat:hover { background: var(--surface-2); }
.stat .k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 500; }
.stat b { font-size: 21px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.stat .s { font-size: 12px; color: var(--muted); }
.stat.alert { background: var(--out-bg); }
.stat.alert b { color: var(--over); }
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-align: left; }
button.card { cursor: pointer; }
button.card:hover { border-color: var(--line-strong); }
.card .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 500; }
.card .value { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; }
.card .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card.alert { border-color: var(--over); background: var(--out-bg); }
.card.alert .value { color: var(--over); }

/* ---------- calendar ---------- */
.calendar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dow, .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dow { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.dow div { padding: 8px 10px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 500; }
.grid { gap: 1px; background: var(--line); }
.day, .day-empty { background: var(--surface); min-height: 118px; }
.day-empty { background: var(--surface-2); }
.day { display: flex; flex-direction: column; gap: 4px; padding: 6px 7px 6px; text-align: left; border: 0; border-radius: 0; position: relative; min-width: 0; }
.day:hover { background: var(--surface-2); }
.day.today .dnum { background: var(--accent); color: var(--accent-ink); }
.day.selected { box-shadow: inset 0 0 0 2px var(--mark); }
.dnum { align-self: flex-start; font-size: 13px; font-weight: 500; min-width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 12px; padding: 0 6px; }
.day .od-dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--over); }
.chips { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.chip { display: flex; align-items: center; gap: 5px; font-size: 12px; line-height: 1.25; padding: 2px 6px; border-radius: 5px; border: 1px solid transparent; min-width: 0; }
.chip .cl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.chip b { font-weight: 600; white-space: nowrap; }
.chip.in { background: var(--in-bg); color: var(--in); }
.chip.out { background: var(--out-bg); color: var(--out); }
.chip.transfer { background: var(--xfer-bg); color: var(--xfer); }
.chip.expected { background: transparent; border-color: currentColor; opacity: .92; }
.chip.overdue { background: transparent; border: 1px dashed var(--over); color: var(--over); }
.chip .tick { font-size: 10px; }
.more { font-size: 11.5px; color: var(--muted); padding-left: 6px; }
.dtot { margin-top: auto; display: flex; justify-content: space-between; gap: 6px; font-size: 12px; font-weight: 500; padding-top: 2px; }
.dots { display: none; gap: 3px; flex-wrap: wrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot.in { background: var(--in); }
.dot.out { background: var(--out); }
.dot.transfer { background: var(--xfer); }
.legend { font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.legend summary { cursor: pointer; width: max-content; }
.legend-body { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 22px; height: 12px; border-radius: 4px; }
.legend .l-paid { background: var(--out-bg); }
.legend .l-exp { border: 1px solid var(--out); }
.legend .l-od { border: 1px dashed var(--over); }

/* ---------- drawer ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(15, 20, 32, .38); z-index: 40; }
.backdrop.enter { animation: fade .15s ease; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--surface); z-index: 41; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.drawer.enter { animation: slide .18s ease; }
.drawer > header { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.drawer h2 { font-family: var(--serif); font-size: 20px; }
.drawer .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 12px; }
.drawer > footer { padding: 14px 20px; border-top: 1px solid var(--line); }
.drawer > footer .btn { width: 100%; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 6px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .row-main { background: none; border: 0; text-align: left; padding: 0; min-width: 0; }
.r-title { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-sub { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-amt { font-weight: 600; white-space: nowrap; }
.row.paid .r-title { color: var(--muted); }
.badge { display: inline-block; font-size: 11px; font-weight: 500; padding: 1px 6px; border-radius: 999px; background: var(--xfer-bg); color: var(--xfer); margin-left: 6px; vertical-align: 1px; }
.badge.od { background: var(--out-bg); color: var(--over); }
.chk { position: relative; width: 26px; height: 26px; display: inline-block; }
.chk input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.chk span { position: absolute; inset: 2px; border: 2px solid var(--line-strong); border-radius: 7px; background: var(--surface); display: grid; place-items: center; color: transparent; font-size: 13px; }
.chk input:checked + span { background: var(--in); border-color: var(--in); color: #fff; }
.chk input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }

/* ---------- modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal-wrap .backdrop { z-index: 0; }
.modal { position: relative; z-index: 1; background: var(--surface); width: min(580px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 14px; box-shadow: var(--shadow); animation: pop .15s ease; }
.modal > header { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 8px; }
.modal h2 { font-family: var(--serif); font-size: 21px; }
.modal .body { padding: 8px 22px 6px; display: grid; gap: 14px; }
.modal > footer { display: flex; gap: 8px; padding: 16px 22px 20px; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.seg label { text-align: center; padding: 7px 4px; border-radius: 7px; cursor: pointer; font-weight: 500; color: var(--muted); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg label:has(input:checked).s-in { color: var(--in); }
.seg label:has(input:checked).s-out { color: var(--out); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--focus); }
.opts { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.opts label { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: var(--ink); }
.opts input { width: auto; min-height: 0; }
.box { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--surface-2); display: grid; gap: 10px; }
.box .title { font-size: 13px; font-weight: 500; color: var(--muted); }
.hint { font-size: 12.5px; color: var(--muted); }
.hidden { display: none !important; }
.err { color: var(--over); font-size: 13px; min-height: 18px; }

/* ---------- tables ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.panel > h2, .panel > .panel-head { font-family: var(--serif); padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 16px; display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.panel-body { padding: 14px 16px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
th.num { text-align: right; }
td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.archived td { opacity: .55; }
.table-scroll { overflow-x: auto; }
.bud { width: 104px; text-align: right; padding: 5px 8px; min-height: 32px; }
.mini { border: 0; background: none; color: var(--muted); padding: 2px 4px; }
.mini:hover { color: var(--ink); }
.barcell { min-width: 190px; }
.track { position: relative; height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; display: flex; }
.track .sp { background: var(--in); height: 100%; }
.track .cm { height: 100%; background: repeating-linear-gradient(45deg, var(--in) 0 3px, transparent 3px 6px); opacity: .55; }
.track .mark { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); opacity: .7; }
tr.state-warn .sp { background: var(--warn); }
tr.state-warn .cm { background: repeating-linear-gradient(45deg, var(--warn) 0 3px, transparent 3px 6px); }
tr.state-over .sp { background: var(--over); }
tr.state-over .cm { background: repeating-linear-gradient(45deg, var(--over) 0 3px, transparent 3px 6px); }
tr.state-unbudgeted .sp { background: var(--xfer); }
tr.state-unbudgeted .cm { background: repeating-linear-gradient(45deg, var(--xfer) 0 3px, transparent 3px 6px); }
.pct { font-size: 12.5px; color: var(--muted); display: block; margin-top: 3px; }
tr.state-over .pct, tr.state-over .rem { color: var(--over); font-weight: 500; }
tr.state-warn .pct { color: var(--warn); font-weight: 500; }
tr.total td { font-weight: 600; background: var(--surface-2); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.setrow { display: grid; grid-template-columns: 1fr 120px auto; gap: 8px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.setrow.simple { grid-template-columns: 1fr auto; }
.setrow:last-child { border-bottom: 0; }
.setrow.archived { opacity: .6; }
.setrow .acts { display: flex; gap: 4px; }
.addrow { display: flex; gap: 8px; padding: 12px 16px; background: var(--surface-2); border-top: 1px solid var(--line); }
.addrow input { flex: 1; }
.colhead { display: grid; grid-template-columns: 1fr 120px auto; gap: 8px; padding: 8px 16px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.notice { background: var(--warn-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-logo { display: block; margin: 0 auto 4px; line-height: 0; }
.login-logo svg { height: 52px; width: auto; }
.login-title { text-align: center; }
.login-title h1 { font-family: var(--serif); font-size: 26px; }
.login-title p { margin: 2px 0 0; color: var(--muted); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.login .box-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; width: min(380px, 100%); box-shadow: var(--shadow); display: grid; gap: 14px; }

/* ---------- toasts ---------- */
#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); font-size: 14px; animation: pop .15s ease; }
.toast.error { background: var(--over); color: #fff; }

.print-head { display: none; }
@media (prefers-color-scheme: dark) { .adg-a { stroke: #4a5166; stroke-width: 1.5; } }
/* ---------- committed cash timeline ---------- */
.outlook .panel-head { flex-wrap: wrap; }
.outlook .panel-head .hint { margin: 0; }
.outlook .panel-body { padding: 14px 16px 16px; }
.timeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bucket { text-align: left; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--line-strong); border-radius: var(--radius); padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bucket:hover { box-shadow: var(--shadow); }
.bucket.now { border-top-color: var(--over); }
.bucket.week { border-top-color: var(--warn); }
.bucket.month { border-top-color: var(--mark); }
.b-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.b-title { font-weight: 600; font-size: 15px; }
.b-range { font-size: 12px; color: var(--muted); }
.b-main { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin-top: 6px; }
.b-sub { display: block; font-size: 17px; font-weight: 500; }
.b-main small, .b-sub small { font-size: 12.5px; font-weight: 400; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.b-net { display: block; font-size: 13px; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.b-top { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.b-top li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: baseline; }
.b-top .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-top .d { color: var(--muted); font-size: 12px; }
.bucket .hint { margin-top: 8px; }
.share { display: flex; height: 8px; border-radius: 6px; overflow: hidden; margin: 14px 0 8px; background: var(--line); }
.share .now { background: var(--over); }
.share .week { background: var(--warn); }
.share .month { background: var(--mark); }
.b-total { font-size: 13.5px; color: var(--muted); }
@media (max-width: 900px) { .timeline { grid-template-columns: 1fr; } }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }

/* ---------- responsive ---------- */
@media (max-width: 1050px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .wrap { padding: 0 12px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card .value { font-size: 20px; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 8px 12px; border-bottom: 1px solid var(--line); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
  .stat b { font-size: 18px; }
  .tabs { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .topbar .wrap { gap: 8px; padding-top: 8px; }
  .userbox .email { display: none; }
  .brand-logo svg { height: 24px; }
  .brand-text { font-size: 16px; padding-left: 10px; }
  .brand-text small { display: none; }
  .brand { gap: 10px; }
  .day, .day-empty { min-height: 58px; }
  .chips, .dtot { display: none; }
  .dots { display: flex; }
  .dow div { padding: 6px 2px; text-align: center; font-size: 11px; letter-spacing: 0; }
  .day { padding: 4px; align-items: center; }
  .dnum { align-self: center; }
  .day .od-dot { top: 4px; right: 4px; }
  .grid2, .split { grid-template-columns: 1fr; }
  .monthnav h1 { font-size: 18px; min-width: 150px; }
  .btn.add-desktop { display: none; }
  .fab { display: grid; position: fixed; right: 18px; bottom: 18px; width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 28px; place-items: center; box-shadow: var(--shadow); z-index: 30; }
  .setrow { grid-template-columns: 1fr auto; }
  .setrow .budfield, .colhead span:nth-child(2) { display: none; }
  .colhead { grid-template-columns: 1fr auto; }
}
@media print {
  .print-head { display: flex; align-items: center; gap: 18px; margin: 0 0 14px; }
  .print-head svg { height: 44px; width: auto; }
  .print-head h2 { font-family: var(--serif); font-size: 22px; margin: 0; }
  .print-head p { margin: 0; color: #555; }
  .topbar, .toolbar .filters, .fab, .legend, .demo-banner, #toasts, .monthnav .iconbtn, .monthnav .btn { display: none !important; }
  :root {
    color-scheme: light;
    --bg: #fff; --surface: #fff; --surface-2: #f4f4ef; --ink: #111; --muted: #555;
    --line: #ddd; --line-strong: #bbb; --in: #1b7a4b; --in-bg: #e6f3ec;
    --out: #b4412f; --out-bg: #f9e9e5; --xfer: #56677d; --xfer-bg: #e9edf2;
    --over: #b4412f; --accent: #121410; --accent-ink: #fff; --mark: #868b2c;
  }
  .adg-a { stroke: none; }
  body { background: #fff; color: #000; }
  .day, .day-empty { min-height: 96px; }
  main { padding: 0; }
}
