/* Ssekanyike finance — app shell.
   Forest-green side menu with a sun-yellow marker; a mobile-money style transaction feed; tables only where accountants expect them. */
:root{
  --forest:#0D3B33; --forest-2:#145247; --forest-ink:#E9F3EF; --forest-muted:#9CC2B7;
  --sun:#F2B33D; --sun-ink:#2B1D00;
  --bg:#F1F4F2; --surface:#FFFFFF; --sunk:#E7ECE9; --line:#DCE3DF; --line-2:#C9D3CE;
  --ink:#15231F; --muted:#5B6B65;
  --accent:#145247; --accent-ink:#FFFFFF; --accent-soft:#DFEEE8;
  --in:#1D8A5A; --in-soft:#E1F3EA; --out:#B83B5E; --out-soft:#F8E4EA;
  --bar:#1D8A5A; --bar-dim:#BFDCCD;
  --ok:#1D7A4C; --ok-soft:#DDF2E5; --warn:#94590A; --warn-soft:#FBEED6; --bad:#B3261E; --bad-soft:#FBE3E1;
  --s1:#2a78d6; --s2:#eb6834; --s3:#1baf7a; --s4:#eda100; --s5:#e87ba4; --s6:#008300; --s7:#6250d6; --s-other:#9AA6A2;
  --font:"Onest",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --display:var(--font);
  --r-lg:18px; --r-md:12px; --r-sm:8px;
  --shadow:0 1px 2px rgba(13,59,51,.06),0 4px 14px rgba(13,59,51,.06);
  color-scheme:light;
}
@media (prefers-color-scheme: dark){:root{
  --forest:#0A2A24; --forest-2:#103B33; --forest-ink:#E4F0EB; --forest-muted:#8DB3A8;
  --bg:#0F1715; --surface:#16211E; --sunk:#1D2A26; --line:#26352F; --line-2:#33463F;
  --ink:#E6EEEB; --muted:#9DB0A9;
  --accent:#6FCFAE; --accent-ink:#0F1715; --accent-soft:#183A31;
  --in:#5FD39A; --in-soft:#173828; --out:#F08AA6; --out-soft:#3D1D27;
  --bar:#5FD39A; --bar-dim:#2A4A3D;
  --ok:#6FD49C; --ok-soft:#163A29; --warn:#F0B35A; --warn-soft:#3E2E14; --bad:#F2877F; --bad-soft:#44201E;
  --s1:#3987e5; --s2:#d95926; --s3:#199e70; --s4:#c98500; --s5:#d55181; --s6:#2f9e2f; --s7:#9085e9; --s-other:#6E7C77;
  --shadow:0 1px 2px rgba(0,0,0,.3);
  color-scheme:dark}}

*{box-sizing:border-box}
html,body{margin:0}
body{background:var(--bg);color:var(--ink);font-family:var(--font);font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased}
.num{font-variant-numeric:tabular-nums;white-space:nowrap}
.muted{color:var(--muted)} .small{font-size:13px}
.neg{color:var(--bad)}
.ic{width:20px;height:20px;flex:none;display:block}
h1,h2,h3{letter-spacing:-.01em}

/* ---------- shell ---------- */
.shell{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:100vh}
.side{background:var(--forest);color:var(--forest-ink);position:sticky;top:0;height:100vh;display:flex;flex-direction:column;padding:20px 14px 16px;gap:22px}
.brand{display:flex;align-items:center;gap:11px;padding:0 6px}
.logo-mark{width:38px;height:38px;border-radius:11px;background:var(--sun);color:var(--sun-ink);display:grid;place-items:center;font-weight:800;font-size:19px;flex:none}
.brand h1{font-size:15px;line-height:1.25;margin:0;font-weight:700;color:#fff}
.brand small{display:block;color:var(--forest-muted);font-size:12.5px}
.nav{display:flex;flex-direction:column;gap:2px}
.nav-i{display:flex;align-items:center;gap:12px;width:100%;border:0;background:none;color:var(--forest-muted);font:inherit;font-weight:500;font-size:14.5px;padding:10px 12px;border-radius:10px;cursor:pointer;text-align:left;position:relative}
.nav-i:hover{background:rgba(255,255,255,.06);color:#fff}
.nav-i[aria-current="page"]{background:rgba(255,255,255,.1);color:#fff;font-weight:600}
.nav-i[aria-current="page"]::before{content:"";position:absolute;left:-14px;top:9px;bottom:9px;width:4px;border-radius:0 4px 4px 0;background:var(--sun)}
.nav-i[aria-current="page"] .ic{color:var(--sun)}
.side .me{margin-top:auto;display:flex;align-items:center;gap:10px;padding:10px 8px 0;border-top:1px solid rgba(255,255,255,.1)}
.avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font-weight:700;font-size:13px;flex:none;background:var(--accent-soft);color:var(--accent)}
.side .avatar{background:rgba(255,255,255,.12);color:#fff}
.me-t{display:flex;flex-direction:column;min-width:0;line-height:1.25;flex:1}
.me-t b{font-size:13.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.me-t small{color:var(--forest-muted);font-size:12px}
.icon-btn{border:0;background:none;color:inherit;padding:8px;border-radius:10px;cursor:pointer;display:grid;place-items:center}
.icon-btn:hover{background:rgba(127,127,127,.14)}
.side .icon-btn{color:var(--forest-muted)}

.content{min-width:0;display:flex;flex-direction:column}
.topbar{display:flex;align-items:center;gap:12px;padding:22px 32px 6px;max-width:1240px;width:100%;margin:0 auto}
.topbar .m-brand{display:none}
.topbar h1{font-size:26px;font-weight:700;margin:0;line-height:1.2}
.topbar .sub{color:var(--muted);font-size:14px;margin:2px 0 0}
.page-actions{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
main{padding:16px 32px 64px;max-width:1240px;width:100%;margin:0 auto}
.bottom{display:none}

/* ---------- controls ---------- */
button,.btn{font:inherit;font-weight:600;font-size:14px;border-radius:10px;padding:9px 15px;border:1px solid var(--line-2);background:var(--surface);color:var(--ink);cursor:pointer;display:inline-flex;align-items:center;gap:7px;text-decoration:none;line-height:1.2}
button:hover,.btn:hover{border-color:var(--accent)}
button .ic,.btn .ic{width:17px;height:17px}
button.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
button.primary:hover{filter:brightness(1.08)}
button.sun{background:var(--sun);border-color:var(--sun);color:var(--sun-ink)}
button.ghost{background:none;border-color:transparent;color:var(--muted);padding:7px 9px}
button.ghost:hover{color:var(--ink);background:var(--sunk)}
button.danger{color:var(--bad);border-color:var(--bad-soft);background:var(--surface)}
button.danger.solid{background:var(--bad);border-color:var(--bad);color:#fff}
button.small{padding:6px 11px;font-size:13px}
button.big{padding:13px 18px;font-size:15.5px;justify-content:center}
button:disabled{opacity:.6;cursor:default}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
input,select,textarea{font:inherit;font-size:15px;color:var(--ink);background:var(--surface);border:1px solid var(--line-2);border-radius:10px;padding:10px 12px;min-width:0;width:100%}
input:focus,select:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 3px var(--accent-soft)}
input[type=checkbox]{width:18px;height:18px;accent-color:var(--accent)}
label.f{display:flex;flex-direction:column;gap:6px;font-size:13.5px;font-weight:600;color:var(--muted);min-width:0}
label.f input,label.f select{font-weight:400;color:var(--ink)}
.check{display:flex;gap:10px;align-items:flex-start;font-size:14px}
.err{color:var(--bad);background:var(--bad-soft);padding:9px 12px;border-radius:10px;margin:0;font-size:14px}
.pill-select{width:auto;border-radius:999px;padding:8px 34px 8px 14px;font-weight:600;font-size:14px;background-color:var(--surface)}

.filters{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:16px}
.filters .search{position:relative;flex:1 1 220px;max-width:340px}
.filters .search input{border-radius:999px;padding-left:38px}
.filters .search .ic{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--muted);width:18px;height:18px}
.seg,.subtabs{display:inline-flex;gap:2px;background:var(--sunk);padding:3px;border-radius:999px;flex-wrap:wrap}
.seg button,.subtabs button{border:0;background:none;border-radius:999px;padding:7px 14px;font-size:13.5px;color:var(--muted)}
.seg button[aria-pressed="true"],.subtabs button[aria-pressed="true"]{background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}

/* ---------- surfaces ---------- */
.panel{background:var(--surface);border-radius:var(--r-lg);margin-bottom:20px;min-width:0;box-shadow:var(--shadow)}
.panel-h{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;padding:16px 20px 8px}
.panel-h h2{font-size:16.5px;font-weight:700;margin:0}
.panel-h .sub{color:var(--muted);font-size:13.5px}
.panel-h .right{margin-left:auto;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.pad{padding:16px 20px}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:20px;margin-bottom:20px;align-items:start}
.grid2 > .panel{margin:0}
.col{display:flex;flex-direction:column;gap:20px;min-width:0}
.hint{font-size:13px;color:var(--muted);padding:4px 20px 16px;margin:0}
.empty{padding:40px 16px;text-align:center;color:var(--muted);display:flex;flex-direction:column;align-items:center;gap:12px}
.notice{padding:12px 16px;border-radius:12px;background:var(--warn-soft);color:var(--warn);font-size:14px;margin-bottom:16px}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:var(--ink);color:var(--bg);padding:11px 18px;border-radius:12px;font-weight:600;z-index:80;box-shadow:0 8px 24px rgba(0,0,0,.2);animation:pop .18s ease-out}
@keyframes pop{from{opacity:0;transform:translate(-50%,8px)}}
.chip{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:999px;font-size:12.5px;font-weight:600;white-space:nowrap}
.chip .ic{width:14px;height:14px}
.chip.ok{background:var(--ok-soft);color:var(--ok)} .chip.warn{background:var(--warn-soft);color:var(--warn)} .chip.bad{background:var(--bad-soft);color:var(--bad)} .chip.plain{background:var(--sunk);color:var(--muted)}

/* ---------- home ---------- */
.hero{background:var(--forest);color:var(--forest-ink);border-radius:22px;padding:26px 28px;margin-bottom:20px;display:flex;flex-direction:column;gap:20px;position:relative;overflow:hidden}
.hero::after{content:"";position:absolute;right:-90px;bottom:-140px;width:360px;height:360px;border-radius:50%;border:56px solid rgba(242,179,61,.10);pointer-events:none}
.hero-top{display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px 16px;position:relative;z-index:1}
.hero-k{margin:0;color:var(--forest-muted);font-size:14.5px;font-weight:500}
.hero h2{font-size:clamp(30px,4.4vw,44px);line-height:1.08;margin:4px 0 0;font-weight:700;color:#fff;letter-spacing:-.025em}
.hero h2 .cur{font-size:.5em;font-weight:600;color:var(--forest-muted);margin-right:6px;letter-spacing:0;vertical-align:.35em}
.hero h2.loss{color:#FFC9C4}
.hero .pill-select{margin-left:auto;background:rgba(255,255,255,.1);color:#fff;border-color:rgba(255,255,255,.2)}
.hero .pill-select option{color:#15231F}
.hero-story{margin:0;max-width:68ch;font-size:15.5px;color:var(--forest-ink);opacity:.92;position:relative;z-index:1}
.hero-story b{color:#fff;font-weight:600}
.tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;position:relative;z-index:1}
.tile{border-radius:14px;padding:14px 16px;display:flex;flex-direction:column;gap:2px;min-width:0;background:rgba(255,255,255,.07)}
.tile .k{font-size:13px;color:var(--forest-muted);font-weight:500}
.tile .v{font-size:22px;font-weight:700;font-variant-numeric:tabular-nums;color:#fff;line-height:1.25}
.tile .s{font-size:12.5px;color:var(--forest-muted)}
.tile svg{width:100%;height:30px;display:block;margin-top:6px;color:var(--sun)!important}
.tile.loss .v{color:#FFC9C4}

.ytd{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--shadow);margin-bottom:20px}
.ytd > div{padding:16px 20px;display:flex;flex-direction:column;gap:2px;min-width:0}
.ytd > div + div{border-left:1px solid var(--line)}
.ytd .k{font-size:13px;color:var(--muted)}
.ytd .v{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums}
.ytd .s{font-size:12.5px;color:var(--muted)}
.ytd-h{font-size:14px;color:var(--muted);margin:0 0 8px 4px;font-weight:500}

.rows{list-style:none;margin:0;padding:4px 8px 10px}
.rows li{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:12px}
.rows li + li{border-top:1px solid var(--line)}
.rows .grow{flex:1;min-width:0}
.rows .t{font-weight:600;font-size:14.5px}
.rows .d{font-size:13px;color:var(--muted)}
.dot{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;flex:none}
.dot .ic{width:18px;height:18px}
.dot.ok{background:var(--ok-soft);color:var(--ok)} .dot.warn{background:var(--warn-soft);color:var(--warn)}
.meter{height:8px;border-radius:999px;background:var(--sunk);overflow:hidden;margin-top:6px}
.meter span{display:block;height:100%;border-radius:999px;background:var(--in)}

/* ---------- money in / out feed ---------- */
.strip{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:18px}
.strip > div{background:var(--surface);border-radius:14px;padding:12px 16px;box-shadow:var(--shadow);display:flex;flex-direction:column;min-width:140px;flex:1 1 140px}
.strip span{font-size:13px;color:var(--muted)}
.strip b{font-size:19px;font-weight:700;font-variant-numeric:tabular-nums}
.strip .in b{color:var(--in)} .strip .out b{color:var(--out)}
.group{margin-bottom:22px}
.group-h{display:flex;align-items:baseline;gap:10px;padding:0 6px 8px}
.group-h h3{font-size:15px;font-weight:700;margin:0}
.group-h span{margin-left:auto;font-size:13.5px;color:var(--muted)}
.feed{list-style:none;margin:0;padding:6px;background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--shadow)}
.feed li + li{border-top:1px solid var(--line)}
.txn{display:flex;align-items:center;justify-content:flex-start;gap:14px;width:100%;padding:12px;border:0;border-radius:12px;background:none;text-align:left;font:inherit;color:inherit;font-weight:400;cursor:default}
button.txn{cursor:pointer}
button.txn:hover{background:var(--bg)}
.txn .av{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;flex:none;font-weight:700;font-size:14px}
.txn .av .ic{width:20px;height:20px}
.av.in{background:var(--in-soft);color:var(--in)} .av.out{background:var(--out-soft);color:var(--out)}
.av.u1{background:#E3EEFB;color:#1F5FAE} .av.u2{background:#FCEBDD;color:#A2480F} .av.u3{background:#EDE7FB;color:#5A40B5} .av.u4{background:#FDF3D3;color:#8A6400}
@media (prefers-color-scheme: dark){.av.u1{background:#183049;color:#9EC5F4}.av.u2{background:#3D2717;color:#F4B98C}.av.u3{background:#2A2448;color:#C2B9F5}.av.u4{background:#3A2F12;color:#F3D27A}}
.txn .main{flex:1;min-width:0;display:flex;flex-direction:column}
.txn .t{font-weight:600;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.txn .d{font-size:13px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.txn .amt{text-align:right;display:flex;flex-direction:column;align-items:flex-end;flex:none}
.txn .amt b{font-size:15.5px;font-weight:700;font-variant-numeric:tabular-nums}
.txn .amt small{font-size:12.5px;color:var(--muted);font-variant-numeric:tabular-nums}
.amt.in b{color:var(--in)} .amt.out b{color:var(--ink)}
.txn .chev{color:var(--line-2);width:18px;height:18px}

/* ---------- cards (loans, items, people) ---------- */
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:16px;margin-bottom:24px}
.card{background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--shadow);padding:18px 20px;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:10px;border:0;text-align:left;font:inherit;font-weight:400;color:inherit;width:100%}
button.card{cursor:pointer} button.card:hover{box-shadow:0 0 0 2px var(--accent-soft),var(--shadow)}
.card-top{display:flex;align-items:flex-start;gap:10px}
.card h3{font-size:16px;margin:0;font-weight:700}
.card .d{font-size:13px;color:var(--muted)}
.card .big{font-size:24px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.2}
.card .big small{font-size:13px;font-weight:500;color:var(--muted);display:block}
.card .facts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;border-top:1px solid var(--line);padding-top:10px;margin-top:2px}
.card .facts div{display:flex;flex-direction:column;font-size:12.5px;color:var(--muted)}
.card .facts b{font-size:14px;color:var(--ink);font-variant-numeric:tabular-nums;font-weight:600}
.status{margin-left:auto}
.card > .chip{align-self:flex-start}
.section-h{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;margin:8px 4px 12px}
.section-h h2{font-size:18px;margin:0;font-weight:700}
.section-h .sub{color:var(--muted);font-size:13.5px}
.section-h .right{margin-left:auto;display:flex;gap:8px}
details.panel > summary{list-style:none;cursor:pointer;padding:16px 20px;font-weight:700;font-size:15.5px;display:flex;align-items:center;gap:10px}
details.panel > summary::-webkit-details-marker{display:none}
details.panel > summary .ic{transition:transform .15s;color:var(--muted)}
details.panel[open] > summary .ic{transform:rotate(90deg)}
details.panel > summary .sub{font-weight:400;color:var(--muted);font-size:13.5px}

.form{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;padding:16px 20px 20px;align-items:end}
.fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;padding:8px 20px 18px}
.fields .warnlbl{color:var(--warn);font-weight:500;font-size:12.5px}

/* ---------- tables (reports & statements only) ---------- */
.tablewrap{overflow-x:auto;padding:0 8px 8px}
table{width:100%;border-collapse:collapse;font-size:14px}
th{text-align:left;font-size:13px;color:var(--muted);font-weight:600;padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap;background:var(--surface)}
td{padding:9px 12px;border-bottom:1px solid var(--line);vertical-align:top}
tr:last-child td{border-bottom:0}
td.r,th.r{text-align:right}
tr.total td{font-weight:700;border-top:1.5px solid var(--ink)}
tr.sec td{font-weight:700;font-size:13.5px;color:var(--accent);padding-top:18px;border-bottom:1px solid var(--line-2)}
tr.key td{font-weight:700;background:var(--accent-soft)}
tr.key td:first-child{border-radius:8px 0 0 8px} tr.key td:last-child{border-radius:0 8px 8px 0}
.stmt td:first-child,.stmt th:first-child{position:sticky;left:0;min-width:250px;background:var(--surface)}
.stmt tr.key td:first-child{background:var(--accent-soft)}

/* ---------- charts ---------- */
.chart{padding:4px 14px 14px}
.chart svg{width:100%;height:auto;display:block}
.chart text{fill:var(--muted);font-family:var(--font);font-size:11px}
.tip{position:fixed;pointer-events:none;background:var(--ink);color:var(--bg);font-size:12.5px;padding:6px 9px;border-radius:8px;z-index:90;white-space:nowrap}
.legend{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:13px;color:var(--muted);padding:0 20px 6px}
.legend span{display:inline-flex;align-items:center;gap:6px}
.legend i{display:inline-block;width:12px;height:12px;border-radius:3px}
.legend i.ln{height:3px;border-radius:2px;width:16px}
.donut-wrap{display:grid;grid-template-columns:minmax(150px,200px) 1fr;gap:18px;align-items:center;padding:8px 20px 20px}
.donut-wrap svg{width:100%;height:auto;max-width:210px;justify-self:center}
.dlist{display:flex;flex-direction:column;gap:7px;min-width:0}
.dlist div{display:grid;grid-template-columns:12px 1fr auto;gap:8px;align-items:center;font-size:13.5px}
.dlist i{width:12px;height:12px;border-radius:4px}

/* ---------- modal / sheet ---------- */
.modal-bg{position:fixed;inset:0;background:rgba(8,24,20,.48);z-index:60;display:flex;align-items:center;justify-content:center;padding:16px;animation:fade .15s ease-out}
@keyframes fade{from{opacity:0}}
.modal{background:var(--surface);border-radius:22px;width:min(560px,100%);max-height:92vh;overflow:auto;box-shadow:0 24px 60px rgba(0,0,0,.3)}
.m-head{display:flex;align-items:center;gap:12px;padding:18px 20px 4px;position:sticky;top:0;background:var(--surface);z-index:1}
.m-head h2{font-size:19px;margin:0;font-weight:700}
.m-head .icon-btn{margin-left:auto;color:var(--muted)}
.m-head .av{width:38px;height:38px;border-radius:12px;display:grid;place-items:center}
.m-foot{grid-column:1/-1;display:flex;gap:8px;justify-content:space-between;flex-wrap:wrap;align-items:center;margin-top:4px}
.m-foot .go{display:flex;gap:8px;margin-left:auto;flex-wrap:wrap}
.amount-in input{font-size:22px;font-weight:700;padding:12px 14px;font-variant-numeric:tabular-nums}
.confirm{display:inline-flex;gap:8px;align-items:center;font-size:14px;flex-wrap:wrap}
.sheet-list{list-style:none;margin:0;padding:8px 12px 16px}
.sheet-list button{width:100%;border:0;background:none;display:flex;align-items:center;gap:14px;padding:13px 10px;border-radius:12px;font-size:16px;font-weight:500;text-align:left}
.sheet-list button:hover{background:var(--bg)}
.sheet-list .dot{background:var(--sunk);color:var(--ink)}
.pick{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:12px 20px 22px}
.pick button{flex-direction:column;align-items:flex-start;gap:10px;padding:18px;border-radius:16px;border:0;font-size:16px;text-align:left}
.pick button small{font-weight:400;font-size:13px;opacity:.8}
.pick .p-in{background:var(--in-soft);color:var(--in)} .pick .p-out{background:var(--out-soft);color:var(--out)}
.pick .ic{width:26px;height:26px}

/* ---------- report ---------- */
.report{max-width:900px;margin:0 auto}
.report h3{font-size:16.5px;margin:26px 0 8px;color:var(--accent);font-weight:700}
.report .lead p{margin:0 0 8px;max-width:75ch}
.report .logo-mark{background:var(--forest);color:var(--sun)}
.role{font-size:13px;color:var(--muted)}
.sign{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:24px;margin-top:28px}
.sign div{border-top:1px solid var(--ink);padding-top:6px;font-size:13px;color:var(--muted)}

/* ---------- sign in ---------- */
body.auth{min-height:100vh;display:grid;place-items:center;padding:24px 16px;background:var(--forest)}
.auth-card{background:var(--surface);border-radius:22px;padding:30px 26px;width:min(420px,100%);display:flex;flex-direction:column;gap:16px;box-shadow:0 24px 60px rgba(0,0,0,.3)}
.auth-brand{display:flex;gap:12px;align-items:center}
.auth-brand h1{font-size:20px;margin:0;font-weight:700}
.auth-card p{margin:0}
.stack{display:flex;flex-direction:column;gap:14px}
button[aria-busy="true"]{cursor:progress;opacity:.85}
.spin{display:inline-block;width:1em;height:1em;vertical-align:-.15em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------- phones & tablets ---------- */
@media (max-width:900px){
  .shell{grid-template-columns:1fr}
  .side{display:none}
  .topbar{position:sticky;top:0;z-index:20;background:var(--bg);padding:12px 16px 10px;gap:10px}
  .topbar .m-brand{display:grid}
  .topbar .m-brand.logo-mark{width:34px;height:34px;font-size:17px;border-radius:10px}
  .topbar h1{font-size:20px}
  .topbar .sub{display:none}
  .page-actions .wide-only{display:none}
  main{padding:8px 16px 110px}
  .bottom{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:0;right:0;bottom:0;z-index:30;background:var(--surface);border-top:1px solid var(--line);padding:6px 6px calc(6px + env(safe-area-inset-bottom))}
  .bottom.four{grid-template-columns:repeat(4,1fr)}
  .bottom button{border:0;background:none;flex-direction:column;gap:3px;font-size:11.5px;font-weight:500;color:var(--muted);padding:6px 2px;border-radius:12px}
  .bottom button .ic{width:22px;height:22px}
  .bottom button[aria-current="page"]{color:var(--accent);font-weight:700}
  .bottom .fab{align-self:center;justify-self:center;width:54px;height:54px;border-radius:18px;background:var(--sun);color:var(--sun-ink);margin-top:-22px;box-shadow:0 6px 16px rgba(242,179,61,.45);padding:0;display:grid;place-items:center}
  .bottom .fab .ic{width:26px;height:26px}
  .tiles,.ytd{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ytd > div:nth-child(3){border-left:0}
  .ytd > div:nth-child(n+3){border-top:1px solid var(--line)}
  .hero{padding:20px 18px;border-radius:20px}
  .modal-bg{align-items:flex-end;padding:0}
  .modal{border-radius:22px 22px 0 0;max-height:94vh;width:100%;padding-bottom:env(safe-area-inset-bottom)}
  .grid2{grid-template-columns:1fr}
  .toast{bottom:96px}
}
@media (max-width:560px){
  .hide-sm{display:none}
  .donut-wrap{grid-template-columns:1fr}
  .tile .v{font-size:19px}
  .txn{gap:12px;padding:11px 8px}
  .txn .av{width:38px;height:38px}
  .strip > div{min-width:0;flex-basis:calc(50% - 5px)}
  .form,.fields{grid-template-columns:1fr 1fr!important;padding-inline:16px}
  .form > *{grid-column:1/-1}
  .form > label.half{grid-column:auto}
  .filters .search{max-width:none}
}

/* ---------- install banner ---------- */
.banner{display:flex;align-items:center;gap:12px;background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--shadow);padding:12px 12px 12px 16px;margin-bottom:16px;border-left:4px solid var(--sun)}
.banner .dot{background:var(--sun);color:var(--sun-ink)}
.banner .grow{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.35}
.banner .grow span{font-size:13px;color:var(--muted)}
.banner .icon-btn{color:var(--muted)}
.steps{margin:0;padding-left:22px;display:flex;flex-direction:column;gap:10px;font-size:15px}

/* ---------- repeat payments ---------- */
.rp-months{display:flex;align-items:flex-end;gap:10px}
.rp-months label{flex:1}
.rp-arrow{padding-bottom:11px;color:var(--muted);font-size:18px}
.rp-tools{display:flex;align-items:center;gap:4px;margin:16px 0 6px}
.rp-tools .small.muted{margin-right:auto}
.rp-list{list-style:none;margin:0;padding:0;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.rp-list li{display:flex;align-items:center;gap:10px;padding:8px 10px;background:var(--surface)}
.rp-list li + li{border-top:1px solid var(--line)}
.rp-list li:not(.on){opacity:.6}
.rp-list li:not(.on) .rp-amt{background:var(--bg)}
.rp-main{display:flex;align-items:center;gap:10px;flex:1;min-width:0;cursor:pointer}
.rp-main .av{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;flex:none}
.rp-main .av .ic{width:17px;height:17px}
.rp-main .grow{display:flex;flex-direction:column;min-width:0}
.rp-main .t{font-weight:600;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rp-main .d{font-size:12.5px;color:var(--muted)}
.rp-amt{width:118px;flex:none;text-align:right;font-variant-numeric:tabular-nums;padding:8px 10px;font-size:14px}
.rp-foot{position:sticky;bottom:0;background:var(--surface);border-top:1px solid var(--line);padding:12px 20px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.rp-foot .go{margin-left:auto;display:flex;gap:8px}

/* ---------- history ---------- */
.txn.hist{align-items:flex-start}
.txn.hist .chip{font-size:12px;padding:1px 8px;vertical-align:1px}
.changes{display:flex;flex-direction:column;gap:2px;margin-top:6px;font-size:13px;color:var(--muted);background:var(--bg);border-radius:10px;padding:8px 10px}
.changes s{color:var(--muted)} .changes b{color:var(--ink);font-weight:600}
@media (max-width:900px){
  .topbar{padding-top:calc(12px + env(safe-area-inset-top))}
}
@media (max-width:560px){ .rp-amt{width:100px} .rp-foot{padding:12px 16px} }
@media (prefers-reduced-motion: reduce){*{animation:none!important;transition:none!important}}
@media print{
  .side,.topbar,.bottom,.no-print,#toastRoot,.notice,.filters{display:none!important}
  .shell{display:block}
  body{background:#fff!important;color:#000}
  .panel{box-shadow:none}
  main{padding:0;max-width:none}
  .report{max-width:none}
  @page{size:A4;margin:14mm}
}
