:root{color-scheme:light;--bg:#f5f6fa;--surface:#fff;--text:#17213a;--muted:#69748b;--line:#e7eaf1;--accent:#6555d9;--soft:#efedff;--green:#14865d;--green-bg:#e7f6ee;--red:#bd4354;--shadow:0 3px 14px #1e29440a;--radius:19px}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font:14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
button,input,select{font:inherit}button{cursor:pointer;border:0;background:none;color:inherit}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #a99eff;outline-offset:2px}button:disabled{opacity:.55;cursor:wait}svg{display:block;width:21px;height:21px;flex:none;stroke:currentColor;fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
h1,h2,h3,p{margin-top:0}h2{font-size:17px;letter-spacing:-.3px}.muted,.sub,.tiny,.eyebrow{color:var(--muted)}.tiny{font-size:12px}.good{color:var(--green)}.bad{color:var(--red)}.link{color:var(--accent);font-weight:700;padding:4px;text-align:left}.link:hover{text-decoration:underline}
.shell{display:grid;grid-template-columns:224px minmax(0,1fr);min-height:100dvh}.sidebar{position:sticky;top:0;height:100dvh;background:var(--surface);border-right:1px solid var(--line);padding:26px 15px;display:flex;flex-direction:column;gap:25px}.brand{display:flex;align-items:center;gap:11px;font-size:17px;font-weight:800;letter-spacing:-.6px;white-space:nowrap}.brand-icon{width:38px;height:38px;border-radius:12px;background:var(--accent);color:white;display:grid;place-items:center;box-shadow:0 5px 13px #6555d933;font-size:24px}.nav{display:grid;gap:5px}.nav button{display:flex;gap:11px;align-items:center;text-align:left;border-radius:12px;padding:12px 13px;color:var(--muted);font-weight:600}.nav button.active,.nav button:hover{background:var(--soft);color:var(--accent)}.side-foot{margin-top:auto;color:var(--muted);font-size:12px;padding:10px}.main{max-width:1510px;width:100%;margin:auto;padding:30px 32px 38px;min-width:0}.top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.eyebrow{font-size:12px;font-weight:600}.top h1{font-size:29px;letter-spacing:-1.1px;line-height:1.15;margin:5px 0 0}.primary{display:inline-flex;align-items:center;justify-content:center;gap:6px;border-radius:12px;padding:11px 15px;background:var(--accent);color:#fff;font-weight:700;min-height:43px;white-space:nowrap}.primary:hover{background:#5345bf}.secondary{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--line);border-radius:11px;background:var(--surface);padding:9px 13px;color:var(--accent);font-weight:700}.secondary:hover{border-color:var(--accent)}
.toolbar-top{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:15px;min-width:0}.scope{display:flex;align-items:center;gap:3px;background:#e9ebf2;padding:4px;border-radius:13px;overflow-x:auto;min-width:0;scrollbar-width:thin}.scope button{padding:10px 12px;border-radius:10px;color:var(--muted);font-weight:700;white-space:nowrap}.scope button.active{background:var(--surface);color:var(--accent);box-shadow:var(--shadow)}.date-label{display:grid;gap:2px;font-size:11px;color:var(--muted);white-space:nowrap}.date-label input{padding:6px 9px;border:1px solid var(--line);border-radius:8px;max-width:155px;background:var(--surface);color:var(--text)}.status{min-height:1.2em;margin:0 0 12px;color:var(--red);font-size:12px}.status:empty{margin:0;min-height:0}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:20px;box-shadow:var(--shadow)}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:15px}.kpi{display:flex;flex-direction:column;gap:6px;min-height:155px}.kpi .symbol{margin-bottom:2px}.kpi .name{font-size:12px;color:var(--muted);font-weight:700}.kpi strong{font-size:clamp(23px,2.4vw,31px);letter-spacing:-1.1px;line-height:1.1}.kpi small{font-size:11px;color:var(--muted)}.symbol{width:33px;height:33px;border-radius:11px;background:var(--soft);color:var(--accent);display:grid;place-items:center;flex:none}.symbol svg{width:19px;height:19px}.symbol.green{background:var(--green-bg);color:var(--green)}.symbol.blue{background:#e8f0fd;color:#3a87e9}.symbol.gold{background:#fff5e3;color:#b57720}.dashboard{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.section-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:17px}.section-head h2{margin:0}.section-head .link{white-space:nowrap;font-size:12px}.full{grid-column:1/-1}
.donut-wrap{display:flex;align-items:center;gap:22px;min-height:190px}.donut{width:150px;aspect-ratio:1;border-radius:50%;display:grid;place-items:center;flex:none;background:var(--line)}.donut-center{width:70%;height:70%;border-radius:50%;background:var(--surface);display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.donut-center strong{font-size:19px;letter-spacing:-.8px;white-space:nowrap}.donut-center small{color:var(--muted);font-size:11px}.legend{flex:1;min-width:0}.legend-row{display:flex;align-items:center;gap:8px;margin:10px 0;font-size:12px}.legend-row span{flex:1;color:var(--muted)}.legend-row b{white-space:nowrap}.dot{display:inline-block;width:9px;height:9px;border-radius:50%;flex:none}
.budget-row,.list-row{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}.budget-row:last-child,.list-row:last-child{border-bottom:0}.grow{flex:1;min-width:0}.grow b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sub{font-size:12px}.list-row strong,.budget-row strong{white-space:nowrap}.budget-row .amount{text-align:right}.budget-row .amount .sub{display:block}.track{height:6px;border-radius:10px;background:var(--line);overflow:hidden;margin:8px 0}.track i{display:block;height:100%;background:var(--accent);border-radius:10px}.track i.green{background:var(--green)}.empty{text-align:center;padding:25px 10px;color:var(--muted)}.notice{display:flex;align-items:flex-start;gap:10px;background:#fff2e4;color:#835b26;border-radius:12px;padding:12px 15px;margin-bottom:15px;font-size:13px}.notice svg{width:18px;height:18px}.detail-row{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}.detail-row:last-child{border-bottom:0}.big{font-size:28px;font-weight:800;letter-spacing:-1px;margin:5px 0 12px}.page-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.progress{margin-top:15px}.progress-head{display:flex;justify-content:space-between;gap:10px}.progress-meta{display:flex;justify-content:space-between;font-size:12px;color:var(--muted)}.toolbar{display:flex;gap:10px;justify-content:space-between;align-items:center;flex-wrap:wrap;margin-bottom:15px}.search{max-width:300px;width:100%}.tag{border-radius:8px;background:var(--soft);color:var(--accent);font-size:11px;padding:3px 7px;font-weight:700}.footer{margin-top:24px;color:var(--muted);font-size:12px}
input,select{border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:var(--surface);color:var(--text);width:100%;min-width:0}label{display:grid;gap:5px;color:var(--muted);font-size:12px;font-weight:600}.field{margin-bottom:13px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.form-stack{display:grid;gap:14px}.form-error{color:var(--red);min-height:1.1em;font-size:12px}.access{max-width:430px;margin:min(14vh,130px) auto}.access h1{margin-top:22px;font-size:28px;letter-spacing:-.7px}.access p{color:var(--muted)}.access .primary{width:100%}.access .brand{color:var(--text)}.modal{width:min(470px,calc(100% - 24px));max-height:calc(100dvh - 24px);overflow:auto;border:1px solid var(--line);border-radius:20px;padding:0;background:var(--surface);color:var(--text);box-shadow:0 20px 70px #09123b55}.modal::backdrop{background:#16213c88}.modal-inner{padding:23px}.modal-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:15px}.modal-head h2{margin:0;font-size:20px}.close{font-size:25px;line-height:1;padding:2px 6px}.toast{position:fixed;bottom:20px;right:20px;background:var(--text);color:var(--surface);border-radius:12px;padding:12px 17px;z-index:10;box-shadow:0 5px 20px #0003}.toast[hidden],#workspace[hidden],#access[hidden]{display:none}.mobilebar{display:none}
@media(max-width:1150px){.shell{grid-template-columns:190px minmax(0,1fr)}.main{padding:24px 20px}.sidebar{padding:24px 12px}.brand{font-size:15px}.donut-wrap{gap:12px}.donut{width:119px}.donut-center strong{font-size:16px}.card{padding:16px}.cards{gap:10px}.kpi{padding:13px}.dashboard{gap:12px}}
@media(max-width:850px){.shell{display:block}.sidebar{display:none}.main{padding:20px 18px calc(88px + env(safe-area-inset-bottom));max-width:750px}.top h1{font-size:26px}.mobilebar{position:fixed;z-index:5;bottom:0;left:0;right:0;background:var(--surface);border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(5,1fr);padding:7px 4px calc(7px + env(safe-area-inset-bottom));gap:2px}.mobilebar button{display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px 2px;color:var(--muted);font-size:10px;font-weight:650;min-height:48px}.mobilebar button.active{color:var(--accent)}.mobilebar button.active svg{stroke-width:2.5}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard{gap:13px}.toolbar-top{display:block}.date-label{margin:9px 0}.scope{width:100%}.toast{bottom:calc(83px + env(safe-area-inset-bottom))}}
@media(max-width:580px){.main{padding:18px 14px calc(84px + env(safe-area-inset-bottom))}.top{margin-bottom:17px}.top h1{font-size:24px}.eyebrow{font-size:11px}.top .primary{padding:10px 12px}.scope{margin-bottom:10px}.scope button{font-size:12px;padding:8px 9px}.cards{gap:9px;margin-bottom:13px}.card{border-radius:17px;padding:15px}.kpi{gap:5px;min-height:122px}.kpi .symbol{width:31px;height:31px;margin-bottom:2px}.kpi .name{font-size:11px}.kpi strong{font-size:clamp(21px,6.1vw,28px)}.kpi small{font-size:10px;line-height:1.25}.dashboard,.page-grid{grid-template-columns:1fr;gap:12px}.section-head h2{font-size:16px}.section-head{margin-bottom:13px}.donut-wrap{gap:17px;min-height:140px}.donut{width:132px}.legend-row{font-size:12px}.notice{margin-bottom:13px}.modal{margin:auto;max-height:88dvh}.budget-row,.list-row{gap:9px}.list-row .symbol{width:34px;height:34px}.footer{margin-top:16px}.form-grid{grid-template-columns:1fr}}
@media(prefers-color-scheme:dark){:root{color-scheme:dark;--bg:#171a29;--surface:#24283b;--text:#f2f1fc;--muted:#b3b8cc;--line:#3a4055;--accent:#a99aff;--soft:#343057;--green:#7cdbaf;--green-bg:#1d483c;--red:#ff929d;--shadow:0 3px 14px #0002}.scope{background:#313549}.primary{color:#181524;background:#a99aff}.primary:hover{background:#c4baff}.notice{background:#3a3028;color:#ffd9a1}.toast{background:#e6e4f2;color:#1b1a2e}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.mobilebar:empty{display:none}
.status.muted{color:var(--muted)}
.csv-summary{margin:18px 0 10px}.csv-list{max-height:320px;overflow:auto;border:1px solid var(--line);border-radius:11px;margin:12px 0}.csv-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 10px;border-bottom:1px solid var(--line)}.csv-row:last-child{border-bottom:0}.csv-row>span{min-width:0;overflow-wrap:anywhere}.csv-row strong{white-space:nowrap}.checkline{display:flex;align-items:flex-start;gap:9px;margin:15px 0}.checkline input{width:auto;margin:2px 0}
.income,.good{color:var(--green)}.expense{color:var(--red)}.transfer{color:#3a87e9}.capital{color:var(--accent)}
.symbol.transfer{background:#e8f0fd;color:#3a87e9}.symbol.capital{background:var(--soft);color:var(--accent)}.symbol.expense{background:#fcebf0;color:var(--red)}.symbol.income{background:var(--green-bg);color:var(--green)}
.tag{display:inline-block;margin-top:3px}.tag.income{background:var(--green-bg);color:var(--green)}.tag.expense{background:#fcebf0;color:var(--red)}.tag.transfer{background:#e8f0fd;color:#357bcf}.tag.capital{background:var(--soft);color:var(--accent)}
.financial-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:3px 0 17px}.financial-grid>div{display:grid;align-content:start;gap:8px;min-width:0}.financial-grid strong{font-size:20px;letter-spacing:-.4px}.financial-grid .tag{justify-self:start}.section-space{margin:20px 0 12px}.section-space h2{margin:0}.tx-actions{display:grid;gap:2px;justify-items:end}.tx-actions button{white-space:nowrap}
.stacked-chart{height:185px;display:flex;align-items:end;gap:8px;padding:10px 0 0;overflow-x:auto}.stack-column{flex:1;min-width:38px;display:grid;grid-template-rows:150px auto;align-items:end;gap:6px;text-align:center;font-size:11px;color:var(--muted)}.stack-bar{height:150px;width:100%;display:flex;flex-direction:column-reverse;justify-content:flex-start;background:var(--bg);border-radius:8px;overflow:hidden}.stack-segment{min-height:0}.stack-segment.ordinary{background:#3a87e9}.stack-segment.extraordinary{background:#6555d9}.stack-segment.family{background:var(--green)}.stack-segment.unknown{background:#8791a9}
@media(max-width:850px){.financial-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:580px){.list-row:has(.tx-actions){flex-wrap:wrap}.tx-actions{display:flex;justify-content:flex-end;width:100%}.financial-grid strong{font-size:17px}}
[hidden]{display:none!important}
body.viewer .sidebar{display:none}body.viewer .shell{display:block}body.viewer .main{max-width:860px}
.onboard{max-width:860px;padding:clamp(22px,4vw,36px);margin:18px auto;border-color:var(--line);box-shadow:0 12px 35px #1e29440e}.onboard-icon{display:grid;place-items:center;width:54px;height:54px;border-radius:17px;color:var(--accent);background:var(--soft);margin-bottom:20px}.onboard-icon svg{width:26px;height:26px}.onboard h2{font-size:clamp(23px,3vw,32px);line-height:1.2;letter-spacing:-.7px;margin:9px 0}.onboard>.muted{font-size:15px;line-height:1.6;max-width:650px;margin-bottom:22px}.onboard>.primary{font-size:15px;padding:13px 18px}.onboard>a{display:inline-flex;margin:12px 0 0 10px}.onboard-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:27px 0 16px}.onboard-step{display:flex;align-items:center;gap:8px;min-width:0;padding:12px;border:1px solid var(--line);border-radius:12px;color:var(--muted);font-size:12px}.onboard-step span{width:26px;height:26px;flex:none;display:grid;place-items:center;border-radius:50%;background:var(--bg);font-weight:800}.onboard-step.complete{background:var(--green-bg);color:var(--green);border-color:transparent}.onboard-step.complete span{background:var(--surface)}.onboard-step b{font-weight:700}.onboard>.sub{margin:0}.account-advanced{padding:10px 0 15px;border-top:1px solid var(--line);margin-top:8px}.account-advanced summary{cursor:pointer;color:var(--accent);font-weight:700;margin-bottom:12px}.theme-options{display:flex;gap:9px;flex-wrap:wrap}.theme-options [aria-pressed="true"]{background:var(--accent);color:var(--surface)}
:root[data-theme="light"]{color-scheme:light;--bg:#f5f6fa;--surface:#fff;--text:#17213a;--muted:#69748b;--line:#e7eaf1;--accent:#6555d9;--soft:#efedff;--green:#14865d;--green-bg:#e7f6ee;--red:#bd4354;--shadow:0 3px 14px #1e29440a}
:root[data-theme="light"] .scope{background:#e9ebf2}:root[data-theme="light"] .primary{background:#6555d9;color:#fff}:root[data-theme="light"] .notice{background:#fff2e4;color:#835b26}
:root[data-theme="dark"]{color-scheme:dark;--bg:#171a29;--surface:#24283b;--text:#f2f1fc;--muted:#b3b8cc;--line:#3a4055;--accent:#a99aff;--soft:#343057;--green:#7cdbaf;--green-bg:#1d483c;--red:#ff929d;--shadow:0 3px 14px #0002}
:root[data-theme="dark"] .scope{background:#313549}:root[data-theme="dark"] .primary{background:#a99aff;color:#181524}:root[data-theme="dark"] .notice{background:#3a3028;color:#ffd9a1}
@media(max-width:620px){.onboard{margin:12px 0;padding:22px 18px}.onboard>.muted{font-size:14px}.onboard>.primary{width:100%}.onboard>a{margin:12px 0 0;justify-content:center}.onboard-steps{grid-template-columns:1fr;gap:8px;margin:20px 0}.onboard-step{padding:9px 10px}.kpi small{font-size:11px}.kpi .name{font-size:12px}}
@media(max-width:850px){.main{padding-bottom:calc(145px + env(safe-area-inset-bottom))}.theme-options button{scroll-margin-bottom:110px}}
.account-meta,.account-delete-reason{display:block}.account-delete-reason{margin-top:3px}
