:root{--bg:#f3f6f5;--card:#fff;--text:#13201c;--muted:#64746f;--line:#e3e9e7;--primary:#0f9d76;--primary-ink:#fff;--primary-soft:#e3f5ef;--pos:#0f9d76;--neg:#e2483d;--warn:#d98a06;--hero-a:#0b7a5c;--hero-b:#12b386;--shadow:0 1px 2px #1028200f, 0 4px 14px #1028200d;--radius:16px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root{--bg:#0d1412;--card:#16201d;--text:#e8efec;--muted:#93a39e;--line:#25322e;--primary:#23c495;--primary-ink:#04221a;--primary-soft:#133a2f;--pos:#2ccf9d;--neg:#ff6b5f;--warn:#f2b13b;--hero-a:#0a5a45;--hero-b:#0e8a68;--shadow:none;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}*{box-sizing:border-box}html,body{margin:0}body{background:var(--bg);color:var(--text);-webkit-tap-highlight-color:transparent;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:15px;line-height:1.45}body.noscroll{overflow:hidden}button,input,select,textarea{font:inherit;color:inherit}input,select,textarea{font-size:16px}button{cursor:pointer;background:0 0;border:0;padding:0}h1,h2,h3,h4{margin:0;line-height:1.25}h3{font-size:16px}.app{max-width:560px;min-height:100dvh;padding-bottom:calc(76px + env(safe-area-inset-bottom));margin:0 auto}.loading{min-height:100dvh;color:var(--muted);place-items:center;display:grid}.topbar{z-index:5;padding:calc(10px + env(safe-area-inset-top)) 16px 10px;background:color-mix(in srgb, var(--bg) 88%, transparent);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);justify-content:space-between;align-items:center;display:flex;position:sticky;top:0}.topbar h1{font-size:20px}.brand{letter-spacing:.04em;align-items:center;gap:8px;display:flex}.brand-mark{background:var(--primary);width:30px;height:30px;color:var(--primary-ink);border-radius:9px;place-items:center;font-size:17px;display:grid}.icon-btn{border-radius:12px;place-items:center;width:40px;height:40px;font-size:18px;display:grid}.icon-btn:active{background:var(--line)}.page{flex-direction:column;gap:14px;padding:4px 16px 24px;display:flex}.card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);flex-direction:column;gap:10px;padding:16px;display:flex}.card-head{justify-content:space-between;align-items:center;gap:8px;display:flex}.hero{color:#fff;background:linear-gradient(135deg, var(--hero-a), var(--hero-b));border-radius:20px;padding:18px}.hero-label{opacity:.85;margin:0;font-size:13px}.hero-value{letter-spacing:-.01em;margin:2px 0 14px;font-size:28px;font-weight:750}.hero-grid{grid-template-columns:1fr 1fr;gap:10px 14px;display:grid}.hero-grid span{opacity:.8;font-size:12px;display:block}.hero-grid b{font-size:14px}.neg-light{color:#ffd9d5}.wallets{grid-template-columns:repeat(3,1fr);gap:10px;display:grid}.wallet{background:var(--card);box-shadow:var(--shadow);text-align:left;border-radius:14px;flex-direction:column;gap:2px;min-width:0;padding:12px 10px;display:flex}.wallet-icon{font-size:20px}.wallet-label{color:var(--muted);white-space:nowrap;text-overflow:ellipsis;font-size:12px;overflow:hidden}.wallet b{font-size:15px}.totals{grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:10px;display:grid}.totals span{color:var(--muted);font-size:12px;display:block}.totals b{font-size:15px}.totals.compact{background:var(--card);box-shadow:var(--shadow);border-radius:14px;padding:12px 16px}.pos{color:var(--pos)}.neg{color:var(--neg)}.warn-text{color:var(--warn)}.muted{color:var(--muted)}.small{font-size:13px}.center{text-align:center}.pad{margin:0;padding:12px 16px}p{margin:0}.alerts{gap:4px;padding:10px 12px}.alert-row{text-align:left;border-bottom:1px solid var(--line);padding:8px 4px;font-size:13.5px}.alert-row:last-child{border-bottom:0}.pie-wrap{grid-template-columns:130px 1fr;align-items:center;gap:14px;display:grid}.pie{height:130px}.legend{flex-direction:column;gap:6px;min-width:0;margin:0;padding:0;font-size:13px;list-style:none;display:flex}.legend li{grid-template-columns:10px 1fr auto;align-items:center;gap:8px;display:grid}.legend span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.legend i,.dot{border-radius:3px;width:10px;height:10px;display:inline-block}.legend-inline{color:var(--muted);align-items:center;gap:5px;font-size:12px;display:flex}.pos-bg{background:var(--pos)}.neg-bg{background:var(--neg)}.bars{height:190px}.recharts-tooltip-wrapper{font-size:13px}.recharts-default-tooltip{border-radius:10px;background:var(--card)!important;border-color:var(--line)!important}.recharts-text{fill:var(--muted)}.progress{background:var(--line);border-radius:99px;flex-shrink:0;height:8px;overflow:hidden}.progress-fill{border-radius:99px;height:100%;transition:width .3s}.progress-fill.ok{background:var(--pos)}.progress-fill.warn{background:var(--warn)}.progress-fill.bad{background:var(--neg)}.segmented{background:var(--line);border-radius:12px;gap:2px;padding:3px;display:flex}.segmented button{color:var(--muted);border-radius:9px;flex:1;padding:8px 6px;font-size:13px;font-weight:550}.segmented button.on{background:var(--card);color:var(--text);box-shadow:var(--shadow)}.search,.field input,.field select,.sheet-body>select,.page select{border:1px solid var(--line);background:var(--card);border-radius:12px;outline:none;width:100%;min-height:46px;padding:12px 14px}.search:focus,.field input:focus,.field select:focus,select:focus{border-color:var(--primary)}.month-nav{justify-content:space-between;align-items:center;display:flex}.month-nav b{font-size:16px}.txn-group{flex-direction:column;gap:6px;display:flex}.txn-group h4{color:var(--muted);padding-left:4px;font-size:13px;font-weight:600}.list{gap:0;padding:4px 0}.list-row{text-align:left;border-bottom:1px solid var(--line);align-items:center;gap:12px;width:100%;padding:11px 16px;display:flex}.list-row:last-child{border-bottom:0}.list-row.static{border:0}.list-row>b{white-space:nowrap;font-size:14.5px}.row-icon{background:var(--primary-soft);border-radius:11px;flex-shrink:0;place-items:center;width:38px;height:38px;font-size:18px;display:grid}.row-main{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.row-main b{white-space:nowrap;text-overflow:ellipsis;font-weight:600;overflow:hidden}.row-main small{color:var(--muted);white-space:nowrap;text-overflow:ellipsis;font-size:12.5px;overflow:hidden}.budget-row .row-main{gap:5px}.total-card>span{color:var(--muted);font-size:13px}.total-card>b{font-size:24px}.goal{gap:8px}.goal-head{text-align:left;justify-content:space-between;align-items:center;display:flex}.goal-amount b{font-size:20px}.history{margin:0;padding:0;font-size:13px;list-style:none}.history li{border-bottom:1px dashed var(--line);justify-content:space-between;padding:6px 0;display:flex}.info h3{margin-bottom:2px}.btn{border-radius:12px;min-height:46px;padding:12px 16px;font-weight:650}.btn.small{min-height:0;padding:6px 12px;font-size:13px}.btn.primary{background:var(--primary);color:var(--primary-ink)}.btn.ghost{background:var(--primary-soft);color:var(--primary)}.btn.danger{color:var(--neg);border:1px solid var(--neg);background:0 0}.btn:disabled{opacity:.5;cursor:default}.btn.block{width:100%}.btn.grow{flex:1}.btn:active:not(:disabled){transform:scale(.98)}.row-actions{flex-wrap:wrap;gap:10px;display:flex}.row-actions .btn{flex:1}.stack{flex-direction:column;gap:8px;display:flex}.link{color:var(--primary);text-align:left;font-weight:600}.fab{right:max(18px,50% - 262px);bottom:calc(86px + env(safe-area-inset-bottom));z-index:6;background:var(--primary);width:58px;height:58px;color:var(--primary-ink);border-radius:18px;font-size:30px;line-height:1;position:fixed;box-shadow:0 8px 20px #0f9d7666}.tabbar{z-index:7;background:var(--card);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom);justify-content:center;display:flex;position:fixed;bottom:0;left:0;right:0}.tabbar button{min-width:0;max-width:100px;color:var(--muted);flex-direction:column;flex:1;align-items:center;gap:1px;padding:8px 0 9px;font-size:11px;font-weight:550;display:flex}.tabbar button span{filter:grayscale();opacity:.7;font-size:20px}.tabbar button.on{color:var(--primary)}.tabbar button.on span{filter:none;opacity:1}.overlay{z-index:20;background:#00000073;justify-content:center;align-items:flex-end;animation:.15s fade;display:flex;position:fixed;inset:0}.sheet{background:var(--bg);border-radius:22px 22px 0 0;flex-direction:column;width:100%;max-width:560px;max-height:92dvh;animation:.2s ease-out up;display:flex}.sheet-head{justify-content:space-between;align-items:center;padding:14px 12px 6px 18px;display:flex}.sheet-head h2{font-size:18px}.sheet-body{padding:6px 18px calc(18px + env(safe-area-inset-bottom));flex-direction:column;gap:14px;display:flex;overflow-y:auto}@keyframes up{0%{opacity:0;transform:translateY(40px)}}@keyframes fade{0%{opacity:0}}.field{flex-direction:column;gap:6px;display:flex}.field-label{color:var(--muted);font-size:13px;font-weight:600}.field-hint{color:var(--muted);font-size:12.5px}.two-col{grid-template-columns:1fr 1fr;gap:10px;display:grid}.two-col.narrow-first{grid-template-columns:84px 1fr}.amount-input{background:var(--card);border:1px solid var(--line);border-radius:12px;align-items:center;gap:8px;padding:0 14px;display:flex}.amount-input:focus-within{border-color:var(--primary)}.amount-input span{color:var(--muted);font-weight:700}.field .amount-input input{background:0 0;border:0;padding:12px 0;font-size:22px;font-weight:700}.check{align-items:center;gap:10px;font-size:14px;display:flex}.check input{width:20px;height:20px;accent-color:var(--primary)}.error{color:var(--neg);background:color-mix(in srgb, var(--neg) 10%, transparent);border-radius:10px;padding:8px 12px;font-size:13.5px;font-weight:600}.cat-grid{flex-wrap:wrap;gap:8px;display:flex}.cat-chip{background:var(--card);border:1px solid var(--line);border-radius:99px;align-items:center;gap:6px;padding:8px 12px;font-size:13px;display:flex}.cat-chip.on{border-color:var(--primary);background:var(--primary-soft);color:var(--primary);font-weight:650}.chat-list{padding:4px 16px calc(96px + env(safe-area-inset-bottom));flex-direction:column;gap:10px;display:flex}.chat-pair{flex-direction:column;gap:6px;display:flex}.bubble{max-width:88%;box-shadow:var(--shadow);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:18px;flex-direction:column;gap:6px;padding:10px 14px;display:flex}.bubble.me{background:var(--primary);color:var(--primary-ink);border-bottom-right-radius:6px;align-self:flex-end}.bubble.bot{background:var(--card);white-space:normal;border-bottom-left-radius:6px;align-self:flex-start}.chips{flex-wrap:wrap;gap:6px;display:flex}.chat-txn{border-bottom:1px dashed var(--line);flex-direction:column;gap:6px;padding-bottom:6px;display:flex}.chat-txn:last-child{border-bottom:0;padding-bottom:0}.chat-txn.gone{color:var(--muted);font-size:13px}.chat-txn.err{color:var(--warn);font-size:13px}.chat-actions{gap:6px;display:flex}.center-self{align-self:center}.chat-input{left:0;right:0;bottom:calc(58px + env(safe-area-inset-bottom));z-index:6;background:color-mix(in srgb, var(--bg) 92%, transparent);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);align-items:flex-end;gap:8px;max-width:560px;margin:0 auto;padding:8px 12px;display:flex;position:fixed}.chat-input textarea{resize:none;border:1px solid var(--line);background:var(--card);border-radius:22px;outline:none;flex:1;max-height:120px;padding:11px 16px;line-height:1.4}.chat-input textarea:focus{border-color:var(--primary)}.send{background:var(--primary);width:46px;height:46px;color:var(--primary-ink);border-radius:50%;flex-shrink:0;font-size:18px}.send:disabled{opacity:.4}.empty{text-align:center;color:var(--muted);padding:28px 16px}.empty-icon{margin-bottom:6px;font-size:40px}@media (width<=360px){.pie-wrap{grid-template-columns:1fr}.pie{height:150px}.hero-value{font-size:24px}}
