:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:#172735;background:#f5f3ec;font-synthesis:none;--ink:#172735;--muted:#697781;--line:#e1e4df;--paper:#fffefa;--teal:#087f79;--teal-dark:#075e5a;--coral:#e77059;--gold:#f6c85f}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;min-height:100vh;background:radial-gradient(circle at 94% 3%,#d9eee6 0,transparent 28%),radial-gradient(circle at 2% 50%,#f8e9dc 0,transparent 27%),#f5f3ec}
button,input,select{font:inherit}
button{cursor:pointer}
button:disabled{opacity:.55;cursor:not-allowed}
button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #49b5a9;outline-offset:2px}
.shell{max-width:1480px;margin:auto;padding:28px clamp(16px,3vw,46px) 24px}
.topbar,.identity,.top-actions,.section-head,.totals,.field-row,.tx-main,.tx-actions{display:flex;align-items:center}
.topbar,.section-head{justify-content:space-between}
.topbar{gap:20px;margin-bottom:26px;padding-bottom:22px;border-bottom:1px solid #dce1da}
.identity{gap:13px;min-width:0}
.identity h1{font-size:23px;letter-spacing:-.05em;margin:0;line-height:1.1}
.identity p{font-size:12px;color:var(--muted);margin:5px 0 0}
.mark{width:49px;height:49px;flex:none;display:grid;place-items:center;background:#172735;color:#f9df99;border-radius:16px 16px 16px 5px;font-weight:900;font-size:25px;letter-spacing:-.1em;box-shadow:5px 5px 0 #b5d8cc}
.top-actions{gap:9px;flex-wrap:wrap;justify-content:flex-end}
#sync-status{display:inline-flex;align-items:center;gap:7px;margin-right:8px;white-space:nowrap}
#sync-status:before{content:"";width:7px;height:7px;background:#46a88b;border-radius:50%;box-shadow:0 0 0 4px #e0f0e7}
.grid{display:grid;grid-template-columns:minmax(290px,.95fr) minmax(290px,.95fr) minmax(330px,1.1fr);gap:20px;align-items:start}
.column{display:flex;flex-direction:column;gap:20px;min-width:0}
.card,.dialog{background:var(--paper);border:1px solid #e2e6df;border-radius:22px;padding:22px;box-shadow:0 10px 32px #263b2d0a,0 2px 4px #263b2d05}
.card h2,.dialog h2{font-size:17px;letter-spacing:-.025em;margin:0;font-weight:780}
.section-head{gap:12px;margin-bottom:15px;min-height:26px}
.section-head h2{margin:0}
.balance-card{position:relative;overflow:hidden;background:#172f35;color:#fff;border-color:#172f35;padding:25px 24px 22px;box-shadow:0 16px 35px #17313928}
.balance-card:before,.balance-card:after{content:"";position:absolute;border:1px solid #ffffff20;border-radius:50%;pointer-events:none}
.balance-card:before{width:240px;height:240px;right:-108px;top:-132px}
.balance-card:after{width:160px;height:160px;right:-79px;top:-93px;background:#ffffff09}
.eyebrow{color:#b7d4d0;margin:0 0 9px;font-size:12px;letter-spacing:.08em;text-transform:uppercase;font-weight:750}
.balance{position:relative;display:block;font-size:clamp(32px,3vw,44px);line-height:1.12;letter-spacing:-.055em;overflow-wrap:anywhere}
.totals{position:relative;border-top:1px solid #ffffff28;margin-top:23px;padding-top:18px;gap:14px}
.totals>div{flex:1;min-width:0}
.totals>div+div{border-left:1px solid #ffffff28;padding-left:14px}
.totals span,.totals strong{display:block}
.totals span{font-size:12px;color:#c7d9d5;margin-bottom:6px}
.totals strong{font-size:18px;letter-spacing:-.03em;overflow-wrap:anywhere}
.income{color:#0c8b71}
.expense{color:#cc624f}
.balance-card .income{color:#76dec0}
.balance-card .expense{color:#ffad9b}
.muted,.field span{color:var(--muted)}
.small{font-size:12px;line-height:1.5}
.field{display:flex;flex-direction:column;gap:7px;flex:1;min-width:0;margin-bottom:14px}
.field span{font-size:12px;font-weight:650}
.field input,.field select,.compact select{width:100%;min-height:44px;background:#fbfcf9;border:1px solid #d8dfd8;border-radius:11px;color:var(--ink);padding:10px 12px;outline:none;transition:border-color .16s,box-shadow .16s}
.field input::placeholder{color:#9ca7a6}
.field input:focus,.field select:focus,.compact select:focus{border-color:#158e85;box-shadow:0 0 0 3px #158e8526}
.field-row{gap:11px;align-items:flex-start}
.segmented{display:grid;grid-template-columns:1fr 1fr;gap:5px;background:#edf1ec;border:1px solid #e3e8e0;border-radius:13px;padding:5px;margin:2px 0 18px}
.segmented label{position:relative;cursor:pointer}
.segmented input{position:absolute;opacity:0}
.segmented span{display:block;text-align:center;padding:10px;border-radius:9px;color:#65736e;font-weight:760;font-size:13px;transition:background .16s,color .16s,transform .16s}
.segmented input:checked+span{background:#d8eee7;color:#087262;box-shadow:0 2px 5px #15372a12}
.segmented label:first-child input:checked+span{background:#ffe8df;color:#b8513f}
.segmented input:focus-visible+span{outline:3px solid #49b5a9}
.button{border:1px solid transparent;border-radius:11px;padding:11px 15px;min-height:42px;font-weight:760;font-size:13px;line-height:1.2;transition:transform .16s,box-shadow .16s,background .16s,color .16s}
.button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 5px 12px #1b30221c}
.button:active:not(:disabled){transform:translateY(0)}
.button.primary{background:var(--teal);color:#fff}
.button.primary:hover:not(:disabled){background:var(--teal-dark)}
.button.gold{background:var(--gold);color:#3d3016;border-color:#e9b94a}
.button.subtle{background:#f7f8f4;border-color:#dce2da;color:#354943}
.button.subtle:hover:not(:disabled){background:#edf4ed}
.full{width:100%}
.text-button{border:0;background:none;color:var(--teal);padding:3px;font-size:12px;font-weight:750}
.compact{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:7px;white-space:nowrap}
.compact select{padding:6px 9px;min-height:32px;width:auto;font-size:12px}
.chart-card{min-height:300px}
.chart-wrap{display:flex;align-items:center;gap:21px;min-height:220px}
.donut{width:170px;height:170px;flex:none;border-radius:50%;background:#e8eeea;display:grid;place-items:center;box-shadow:0 0 0 7px #f3f6f1}
.donut-center{width:108px;height:108px;border-radius:50%;display:grid;place-items:center;text-align:center;background:var(--paper);font-size:13px;font-weight:790;padding:10px;line-height:1.2;overflow-wrap:anywhere}
.legend{display:flex;flex-direction:column;gap:9px;font-size:12px;min-width:0;color:#53635d}
.legend div{display:flex;align-items:center;gap:8px}
.swatch{width:9px;height:9px;flex:none;border-radius:3px}
.badge{font-size:10px;background:#fff0cc;color:#77500c;padding:4px 7px;border-radius:6px;font-weight:850;letter-spacing:.04em}
.stack{display:flex;flex-direction:column;gap:8px;margin:13px 0}
.stack:empty{margin:0}
.row{padding:11px;border-radius:11px;background:#f4f7f2;font-size:13px;display:flex;align-items:center;justify-content:space-between;gap:9px}
.progress{height:7px;background:#dbe4dc;border-radius:9px;overflow:hidden;margin-top:9px}
.progress>span{display:block;height:100%;background:#22a98e;border-radius:9px}
.progress>span.warn{background:#e7ae46}
.progress>span.over{background:#e47866}
.history-card{min-height:425px}
.filters{margin-bottom:6px}
.transaction-list{max-height:500px;overflow:auto;scrollbar-color:#c9d6cf transparent}
.tx{padding:13px 0;border-top:1px solid #edf0e9;display:flex;align-items:center;justify-content:space-between;gap:8px}
.tx-main{gap:10px;min-width:0}
.tx-icon{width:36px;height:36px;display:grid;place-items:center;background:#e5f2ec;color:#13806b;border-radius:11px;flex:none;font-weight:800}
.tx-desc{font-size:13px;font-weight:740;overflow-wrap:anywhere}
.tx-meta{font-size:11px;color:#74827d;margin-top:4px;line-height:1.35;overflow-wrap:anywhere}
.tx-actions{gap:3px;flex:none}
.tx-amount{font-size:13px;font-weight:850;white-space:nowrap;margin-right:3px}
.icon-button{border:0;background:none;color:#77877f;padding:7px;border-radius:8px;min-width:29px;min-height:31px}
.icon-button:hover{background:#e9f1e9;color:#24493d}
.empty{color:#7b8982;font-size:13px;padding:34px 10px;text-align:center;background:#f8faf5;border:1px dashed #dbe4d9;border-radius:13px}
.action-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
footer{text-align:center;color:#86918a;font-size:11px;margin-top:25px}
.message{border-radius:11px;background:#def3e8;color:#17664f;border:1px solid #b6e2cd;padding:12px 14px;margin-bottom:18px;font-size:13px}
.message.error{background:#fff0e9;color:#9d4234;border-color:#f0c1b2}
.dialog{color:var(--ink);width:min(440px,calc(100% - 28px));max-height:90vh;overflow:auto;position:relative;border:1px solid #e4e9df;box-shadow:0 24px 70px #10221a45;padding:28px}
.dialog::backdrop{background:#10251fc2;backdrop-filter:blur(4px)}
.dialog p{line-height:1.5}
.dialog ul{padding-left:20px;line-height:1.9;font-size:14px}
.dialog .close{position:absolute;right:16px;top:15px;border:0;background:#f0f3ed;color:#41564d;font-size:22px;border-radius:50%;width:34px;height:34px}
.crown{font-size:34px;color:#d69d2b}
.price{font-size:22px;display:block;margin:16px 0 2px;letter-spacing:-.03em}
.dialog form:not([method=dialog]){margin-top:18px}
.dialog form[method=dialog]{margin:0}
@media(max-width:1180px){.grid{grid-template-columns:1fr 1fr}.column:last-child{grid-column:1/-1}.history-card{min-height:0}}
@media(max-width:720px){.shell{padding:17px 14px 24px}.topbar{align-items:flex-start;margin-bottom:18px;padding-bottom:18px}.top-actions .small{display:none}.grid{grid-template-columns:1fr;gap:14px}.column{gap:14px}.column:last-child{grid-column:auto}.card{padding:19px}.identity h1{font-size:20px}.identity p{font-size:11px}.mark{width:43px;height:43px;font-size:22px}.top-actions{gap:5px}.top-actions .button{padding:9px 10px;min-height:36px}.chart-wrap{justify-content:center}.legend{flex:1}}
@media(max-width:420px){.topbar{flex-wrap:wrap}.top-actions{width:100%;justify-content:flex-start;padding-left:56px}.chart-wrap{flex-direction:column;align-items:stretch;gap:20px}.donut{align-self:center}.legend{display:grid;grid-template-columns:1fr 1fr}.tx{align-items:flex-start}.tx-actions{flex-wrap:wrap;justify-content:flex-end;max-width:115px}.tx-amount{width:100%;text-align:right}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.button,.segmented span,.field input,.field select,.compact select{transition:none}}
.pro-features{display:grid;gap:9px;margin:20px 0}
.pro-features>div{display:flex;gap:12px;padding:13px;background:#f4f7f2;border:1px solid #e4ebe2;border-radius:13px}
.pro-features strong{font-size:13px}
.pro-features p{font-size:12px;color:#66756e;margin:5px 0 0}
.feature-icon{display:grid;place-items:center;width:34px;height:34px;flex:none;background:#e0eee4;border-radius:10px;color:#087f79;font-size:20px;font-weight:800}
.show-password{display:flex;align-items:center;gap:8px;font-size:12px;color:#53645b;margin:0 0 14px;cursor:pointer}
a{color:#087f79}
a:hover{text-decoration-thickness:2px}
.legal{max-width:800px;margin:32px auto;padding:clamp(22px,5vw,54px);background:#fffefa;border:1px solid #e2e6df;border-radius:23px;box-shadow:0 10px 32px #263b2d0a;line-height:1.65}
.legal h1{font-size:clamp(28px,4vw,40px);letter-spacing:-.05em;margin:8px 0 16px}
.legal h2{font-size:18px;margin:28px 0 8px}
.legal p{color:#3f5047}
.legal .eyebrow{color:#ac6845;margin-top:30px}
footer a{color:#667d71}
