:root{--bg: #f5f6f8;--surface: #ffffff;--ink: #0f172a;--ink-2: #334155;--muted: #64748b;--line: #e5e8ee;--brand: #0f766e;--brand-2: #115e59;--brand-soft: #e6f4f2;--pos: #059669;--neg: #e11d48;--warn: #b45309;--warn-bg: #fff8eb;--err-bg: #fff1f2;--ok-bg: #ecfdf5;--radius: 16px;--radius-sm: 10px;--shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .05);--nav-h: 64px;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Noto Sans,sans-serif;color:var(--ink);background:var(--bg);-webkit-font-smoothing:antialiased;font-feature-settings:"tnum" 1}*{box-sizing:border-box}html,body,#root{margin:0;min-height:100%}body{min-height:100vh}h1,h2,h3,h4{margin:0;letter-spacing:-.01em}h1{font-size:1.5rem;font-weight:700}h2{font-size:1rem;font-weight:600}p{margin:.4rem 0;line-height:1.5}code{background:#f1f5f9;padding:1px 6px;border-radius:6px;font-size:.85em}a{color:inherit}button{font:inherit;color:inherit}:focus-visible{outline:2px solid var(--brand);outline-offset:2px}.muted{color:var(--muted)}.muted-inv{color:#ffffffbf}.small{font-size:.82rem}.strong{font-weight:600}.pos{color:var(--pos)}.neg{color:var(--neg)}.right{text-align:right}.center{text-align:center;justify-content:center}.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.mt{margin-top:1rem}.mt-sm{margin-top:.5rem}.grow{flex:1;min-width:0}.spacer{flex:1}.row{display:flex;align-items:center}.row.between,.between{justify-content:space-between}.wrap{flex-wrap:wrap}.gap{gap:1rem}.gap-sm{gap:.5rem}.stack{display:flex;flex-direction:column;gap:1rem}.stack-sm{display:flex;flex-direction:column;gap:.65rem}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}.grid-2-lg{display:grid;grid-template-columns:1fr;gap:1rem}@media (min-width: 900px){.grid-2-lg{grid-template-columns:1fr 1fr}}.shell{min-height:100vh}.sidebar{display:none}.topbar{position:sticky;top:0;z-index:20;display:flex;justify-content:space-between;align-items:center;padding:.75rem 1rem;padding-top:max(.75rem,env(safe-area-inset-top));background:#f5f6f8e6;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:.5rem;font-weight:700;font-size:1.1rem}.brand-lg{font-size:1.5rem}.brand-mark{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:var(--brand);color:#fff;font-size:1rem}.brand-lg .brand-mark{width:40px;height:40px;font-size:1.3rem;border-radius:12px}.content{padding:1rem;padding-bottom:calc(var(--nav-h) + 1.5rem + env(safe-area-inset-bottom));max-width:1180px;margin:0 auto}.bottom-nav{position:fixed;bottom:0;left:0;right:0;z-index:30;display:grid;grid-template-columns:repeat(5,1fr);height:calc(var(--nav-h) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:var(--surface);border-top:1px solid var(--line)}.bottom-link{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:.7rem;color:var(--muted);text-decoration:none;background:none;border:0;cursor:pointer}.bottom-link.active{color:var(--brand);font-weight:600}.bottom-icon{font-size:1.2rem}.more-sheet-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:25;background:#0f172a4d}.more-sheet{position:absolute;left:.75rem;right:.75rem;bottom:calc(var(--nav-h) + .75rem + env(safe-area-inset-bottom));background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);padding:.5rem;display:grid;grid-template-columns:1fr 1fr;gap:.25rem}.more-link{display:flex;align-items:center;gap:.6rem;padding:.85rem;border-radius:var(--radius-sm);text-decoration:none;font-weight:500}.more-link:hover,.more-link.active{background:var(--brand-soft);color:var(--brand-2)}.more-icon{font-size:1.15rem}@media (min-width: 900px){.shell{display:grid;grid-template-columns:240px 1fr}.topbar,.bottom-nav,.more-sheet-backdrop{display:none}.sidebar{display:flex;flex-direction:column;gap:1.5rem;position:sticky;top:0;height:100vh;padding:1.25rem 1rem;background:var(--surface);border-right:1px solid var(--line)}.sidebar nav{display:flex;flex-direction:column;gap:2px;flex:1}.side-link{display:flex;gap:.7rem;align-items:center;padding:.6rem .75rem;border-radius:var(--radius-sm);text-decoration:none;color:var(--ink-2);font-weight:500;font-size:.93rem}.side-link:hover{background:#f1f5f9}.side-link.active{background:var(--brand-soft);color:var(--brand-2);font-weight:600}.sidebar-foot{display:flex;flex-direction:column;gap:.5rem;border-top:1px solid var(--line);padding-top:1rem}.content{padding:2rem;width:100%}}.page-header{display:flex;justify-content:space-between;align-items:flex-end;gap:1rem;flex-wrap:wrap}.page-header p{margin:.15rem 0 0}.page-actions{display:flex;gap:.5rem;flex-wrap:wrap}.month-switch{display:flex;align-items:center;gap:.4rem}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:1rem;box-shadow:var(--shadow);min-width:0}.card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem;gap:.5rem}.hero-card{border-radius:20px;padding:1.25rem;color:#fff;background:radial-gradient(120% 140% at 100% 0%,#14b8a6,#0f766e 45%,#0b3b3a);box-shadow:0 10px 30px #0f766e40}.hero-amount{font-size:2rem;font-weight:700;letter-spacing:-.02em;margin:.25rem 0 .75rem}.hero-row{display:flex;flex-wrap:wrap;gap:.5rem 1.25rem;font-size:.88rem}.hero-row strong{margin-left:.25rem}.dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:4px}.dot-income{background:#6ee7b7}.dot-expense{background:#fda4af}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:.6rem}.stat{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-sm);padding:.75rem;display:flex;flex-direction:column;gap:.2rem;min-width:0}.stat strong{font-size:1.05rem;overflow:hidden;text-overflow:ellipsis}@media (min-width: 600px){.stat strong{font-size:1.3rem}.stat{padding:1rem}}.donut-wrap{display:grid;grid-template-columns:1fr;gap:.5rem;align-items:center}@media (min-width: 520px){.donut-wrap{grid-template-columns:180px 1fr}}.legend{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.45rem}.legend li{display:grid;grid-template-columns:12px 1fr auto 38px;gap:.5rem;align-items:center;font-size:.88rem}.legend-val{font-weight:600}.swatch{width:10px;height:10px;border-radius:3px}.txn-list{list-style:none;margin:0;padding:0}.txn{display:flex;align-items:center;gap:.75rem;padding:.7rem 0;border-bottom:1px solid var(--line)}.txn:last-child{border-bottom:0}.txn.inactive{opacity:.55}.txn-icon{flex:none;width:38px;height:38px;border-radius:12px;display:grid;place-items:center;font-weight:700}.txn-icon.expense{background:#fff1f2;color:var(--neg)}.txn-icon.income{background:#ecfdf5;color:var(--pos)}.txn-main{flex:1;min-width:0}.txn-btn{background:none;border:0;padding:0;text-align:left;cursor:pointer;display:block;min-width:0}.txn-amt{font-weight:600;white-space:nowrap;text-align:right}.plain-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.6rem}.preview-list{background:#f8fafc;border-radius:var(--radius-sm);padding:.75rem}.due-pill{flex:none;width:38px;height:38px;border-radius:12px;display:grid;place-items:center;font-weight:700;font-size:.85rem}.tone-overdue{background:#fff1f2;color:var(--neg)}.tone-soon{background:var(--warn-bg);color:var(--warn)}.tone-later{background:#f1f5f9;color:var(--muted)}.tone-text-overdue{color:var(--neg);font-weight:600}.tone-text-soon{color:var(--warn);font-weight:600}.tone-text-later{color:var(--muted)}.table-wrap{overflow-x:auto}.table{width:100%;border-collapse:collapse;font-size:.88rem}.table th,.table td{padding:.55rem .4rem;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}.table th{color:var(--muted);font-weight:500;font-size:.78rem}.table .num{text-align:right}.form{display:flex;flex-direction:column;gap:.85rem}.field{display:flex;flex-direction:column;gap:.3rem;min-width:0}.field-label{font-size:.82rem;font-weight:500;color:var(--ink-2)}.field-hint{font-size:.75rem;color:var(--muted)}.field-error{font-size:.78rem;color:var(--neg)}input,select,textarea{font:inherit;color:var(--ink);background:#fff;border:1px solid #d5dae2;border-radius:var(--radius-sm);padding:.65rem .75rem;min-height:44px;width:100%;min-width:0}textarea{resize:vertical}input:focus,select:focus,textarea:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px #0f766e26}.input-lg{font-size:1.5rem;font-weight:600}.check{display:flex;align-items:center;gap:.5rem;font-size:.9rem}.check input{width:18px;height:18px;min-height:0}.form-actions{display:flex;gap:.5rem;justify-content:flex-end;align-items:center;margin-top:.25rem}.filters{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}.filters input[type=search]{grid-column:1 / -1}@media (min-width: 900px){.filters{grid-template-columns:2fr 1fr 1fr 1fr 1fr auto}.filters input[type=search]{grid-column:auto}}.segmented{display:inline-flex;background:#eef1f5;border-radius:12px;padding:3px;gap:2px}.segmented button{border:0;background:none;padding:.55rem 1rem;border-radius:9px;cursor:pointer;font-weight:500;color:var(--muted);flex:1}.segmented button.on{background:#fff;color:var(--ink);box-shadow:0 1px 3px #00000014}.segmented button.on.expense{color:var(--neg)}.segmented button.on.income{color:var(--pos)}.form>.segmented{display:flex}.small-seg button{padding:.4rem .8rem;font-size:.85rem}.btn{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;border-radius:var(--radius-sm);border:1px solid transparent;padding:.6rem 1.1rem;font-weight:600;cursor:pointer;text-decoration:none;min-height:42px;transition:background .15s,opacity .15s;white-space:nowrap}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-sm{padding:.4rem .8rem;min-height:36px;font-size:.85rem}.btn-block{width:100%}.btn-primary{background:var(--brand);color:#fff}.btn-primary:hover:not(:disabled){background:var(--brand-2)}.btn-ghost{background:#fff;border-color:#d5dae2;color:var(--ink-2)}.btn-ghost:hover:not(:disabled){background:#f8fafc}.btn-danger{background:var(--neg);color:#fff}.btn-danger-ghost{background:none;color:var(--neg);border-color:#fecdd3}.icon-btn{display:inline-grid;place-items:center;width:36px;height:36px;border-radius:10px;border:1px solid var(--line);background:#fff;cursor:pointer;flex:none}.icon-btn:disabled{opacity:.4;cursor:not-allowed}.icon-btn.danger{border:0;background:none;color:var(--muted);width:30px;height:30px}.icon-btn.danger:hover{color:var(--neg);background:#fff1f2}.link{background:none;border:0;color:var(--brand);font-weight:600;cursor:pointer;text-decoration:none;padding:0}.link:hover{text-decoration:underline}.alert{border-radius:var(--radius-sm);padding:.75rem .9rem;font-size:.9rem;display:flex;flex-direction:column;gap:.25rem;border:1px solid transparent}.alert-error{background:var(--err-bg);color:#9f1239;border-color:#fecdd3;flex-direction:row;justify-content:space-between;align-items:center}.alert-warn{background:var(--warn-bg);color:#78350f;border-color:#fde68a}.alert-ok{background:var(--ok-bg);color:#065f46;border-color:#a7f3d0}.alert-link{text-decoration:none}.empty{text-align:center;padding:1.75rem .5rem}.empty-icon{font-size:2rem;margin-bottom:.35rem}.empty-title{font-weight:600;margin:0 0 .25rem}.spinner-wrap{display:flex;flex-direction:column;align-items:center;gap:.75rem;padding:2.5rem 0}.spinner{width:28px;height:28px;border:3px solid #d1e7e4;border-top-color:var(--brand);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.center-screen{min-height:100vh;display:grid;place-items:center;padding:1rem}.progress{height:8px;background:#edf0f4;border-radius:99px;overflow:hidden}.progress-bar{height:100%;border-radius:99px;transition:width .4s ease}.tone-brand{background:var(--brand)}.tone-good{background:var(--pos)}.tone-warn{background:#f59e0b}.badge{font-size:.72rem;font-weight:700;padding:.2rem .55rem;border-radius:99px}.badge-high{background:#ffe4e6;color:#be123c}.badge-medium{background:#fef3c7;color:#92400e}.flag{background:var(--surface);border:1px solid var(--line);border-left:4px solid #f59e0b;border-radius:var(--radius-sm);padding:.85rem 1rem}.flag-high{border-left-color:var(--neg)}.toasts{position:fixed;left:50%;transform:translate(-50%);bottom:calc(var(--nav-h) + 1rem + env(safe-area-inset-bottom));z-index:60;display:flex;flex-direction:column;gap:.5rem;width:min(92vw,380px)}@media (min-width: 900px){.toasts{bottom:1.5rem}}.toast{padding:.75rem 1rem;border-radius:12px;background:var(--ink);color:#fff;font-size:.9rem;box-shadow:var(--shadow);animation:up .2s ease}.toast-error{background:#9f1239}@keyframes up{0%{transform:translateY(8px);opacity:0}}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;background:#0f172a73;display:flex;align-items:flex-end;justify-content:center}.modal{background:var(--surface);width:100%;max-height:92vh;overflow-y:auto;border-radius:20px 20px 0 0;padding-bottom:env(safe-area-inset-bottom);animation:up .2s ease}@media (min-width: 640px){.modal-backdrop{align-items:center}.modal{max-width:520px;border-radius:20px}}.modal-head{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.1rem .5rem;position:sticky;top:0;background:var(--surface)}.modal-body{padding:.5rem 1.1rem 1.25rem}.auth-screen{min-height:100vh;display:grid;gap:1.5rem;align-content:center;justify-items:center;padding:1.5rem 1rem;background:linear-gradient(180deg,#e6f4f2 0%,var(--bg) 50%)}@media (min-width: 900px){.auth-screen{grid-template-columns:1fr 1fr;justify-items:stretch;padding:3rem 8vw;align-items:center}}.auth-hero{max-width:440px}.auth-tagline{font-size:1.15rem;color:var(--ink-2);margin:1rem 0}.auth-points{list-style:none;padding:0;margin:0;display:none;gap:.5rem;color:var(--ink-2)}@media (min-width: 900px){.auth-points{display:grid}}.auth-card{width:100%;max-width:420px;display:flex;flex-direction:column;gap:.9rem;padding:1.5rem}.auth-switch{display:flex;justify-content:space-between}.dropzone{width:100%;border:2px dashed #b8d9d4;background:var(--brand-soft);border-radius:var(--radius);padding:2.5rem 1rem;display:flex;flex-direction:column;align-items:center;gap:.35rem;cursor:pointer}.dropzone:hover{border-color:var(--brand)}.dropzone-icon{font-size:2.4rem}.receipt-img{width:100%;max-height:420px;object-fit:contain;border-radius:var(--radius-sm);background:#f1f5f9}.goal-grid{display:grid;grid-template-columns:1fr;gap:1rem}@media (min-width: 700px){.goal-grid{grid-template-columns:1fr 1fr}}@media (min-width: 1100px){.goal-grid{grid-template-columns:1fr 1fr 1fr}}.goal-amt{font-size:1.4rem}.chat-page{display:flex;flex-direction:column;gap:.75rem;min-height:calc(100vh - 180px)}.chat-log{flex:1;display:flex;flex-direction:column;gap:.6rem;padding:.25rem 0}.chat-empty{text-align:center;padding:2rem .5rem}.chips{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:center;margin-top:.75rem}.chip{border:1px solid var(--line);background:#fff;border-radius:99px;padding:.5rem .9rem;font-size:.85rem;cursor:pointer}.chip:hover{border-color:var(--brand);color:var(--brand-2)}.bubble{max-width:88%;padding:.7rem .95rem;border-radius:16px;line-height:1.5;font-size:.93rem;overflow-wrap:anywhere}.bubble.user{align-self:flex-end;background:var(--brand);color:#fff;border-bottom-right-radius:4px}.bubble.assistant{align-self:flex-start;background:var(--surface);border:1px solid var(--line);border-bottom-left-radius:4px}.bubble.error{background:var(--err-bg);color:#9f1239;border-color:#fecdd3}.bubble h4{margin:.5rem 0 .25rem;font-size:.95rem}.bubble ul{margin:.25rem 0;padding-left:1.2rem}.bubble p{margin:.25rem 0}.typing{display:flex;gap:4px}.typing span{width:7px;height:7px;border-radius:50%;background:var(--muted);animation:blink 1.2s infinite}.typing span:nth-child(2){animation-delay:.2s}.typing span:nth-child(3){animation-delay:.4s}@keyframes blink{0%,80%,to{opacity:.25}40%{opacity:1}}.chat-input{position:sticky;bottom:calc(var(--nav-h) + .5rem + env(safe-area-inset-bottom));display:flex;gap:.5rem;background:var(--bg);padding:.5rem 0}@media (min-width: 900px){.chat-input{bottom:1rem}}@media (prefers-reduced-motion: reduce){*{animation:none!important;transition:none!important}}
