:root{color-scheme:light;--surface:#fff;--bg:#f4f4ee;--ink:#172624;--muted:#4b625c;--line:#d6e0d9;--brand:#075e50;--accent:#d5f5a6;--hero:#143e37}
:root[data-theme=dark]{color-scheme:dark;--surface:#172c27;--bg:#0e1e1b;--ink:#eff8ed;--muted:#b3cbc0;--line:#36534a;--brand:#b6ed94;--accent:#c2f19d;--hero:#1d443b}
*{box-sizing:border-box}
body{margin:0 auto;min-height:100vh;max-width:760px;background:var(--bg);color:var(--ink);font:16px/1.7 Tahoma,Arial,sans-serif}
header,nav{position:sticky;z-index:1;display:flex;align-items:center;gap:12px;background:var(--surface);padding:12px 16px}
header{top:0;border-bottom:1px solid var(--line)}
nav{bottom:0;justify-content:space-between;border-top:1px solid var(--line);padding-bottom:max(12px,env(safe-area-inset-bottom))}
nav button{flex:1;padding:8px 4px;white-space:nowrap}
nav [aria-current=page]{background:var(--accent);color:#163a2c}
main{padding:18px 16px 30px;min-height:calc(100vh - 128px)}
.mark{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--accent);color:#163a2c;font-weight:bold}
#theme{margin-inline-start:auto}
h1,h2,h3,p{margin:0 0 10px}
h1{font-size:25px}h2{font-size:20px}h3{font-size:17px}
p{white-space:pre-line}
small,.muted{color:var(--muted)}
.hero,.card{border-radius:18px;padding:17px;margin-bottom:12px}
.hero{background:var(--hero);color:#f6fff1}
.card,dialog{background:var(--surface);border:1px solid var(--line);color:var(--ink)}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px}
.grid .card{margin:0;text-align:start}
button{border:0;border-radius:10px;padding:9px 13px;font:inherit;cursor:pointer;background:var(--surface);color:var(--ink)}
.action{background:var(--accent);color:#163a2c;font-weight:bold}
.secondary{border:1px solid var(--line)}
.row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
dl{margin:12px 0}
dt{color:var(--muted)}
dd{margin:0 0 10px;overflow-wrap:anywhere}
dialog{border-radius:18px;width:min(92vw,460px);padding:18px}
dialog::backdrop{background:#071813a0}


:root{--surface:#fffefa;--bg:#f4f1e8;--line:#deded1;--accent:#d9f799;--hero:#143831;--shadow:0 10px 24px #1328240b}
:root[data-theme=dark]{--surface:#182927;--bg:#10201e;--line:#334b44;--hero:#1a3b33;--shadow:none}
header{min-height:64px;background:var(--bg);border-bottom-color:transparent}
header strong{letter-spacing:-.03em}
nav{margin:0 10px 8px;padding:8px;gap:4px;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow)}
nav button{font-size:.87rem}
.hero{padding:24px 20px;background:linear-gradient(125deg,var(--hero),#075747);box-shadow:var(--shadow)}
.hero h1{margin-bottom:14px}
.hero .row{margin-top:16px}
.card{box-shadow:var(--shadow)}
.grid{gap:12px}
.grid .card{min-height:118px;padding:14px}
.grid .card p{margin:5px 0 0;font-size:.87rem}
.category-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--accent);color:#163a2c;margin-bottom:8px}
.search{width:100%;margin-bottom:14px;padding:10px 13px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit}
.invoice-total{padding:12px;border-radius:12px;background:var(--accent);color:#163a2c;font-weight:bold}
#review form{margin-top:12px}
button:focus-visible,input:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
button:disabled{opacity:.55;cursor:wait}
