:root{--ink:#1d2940;--muted:#8791a5;--line:#edf0f5;--paper:#f5f6fa;--card:#fff;--navy:#263d67;--blue:#5579b8;--blue-soft:#edf3ff;--orange:#f29a57;--orange-soft:#fff3e9;--green:#319c78;--green-soft:#eaf7f2;--red:#e47770;--shadow:0 10px 30px rgba(34,52,82,.055);--safe-bottom:env(safe-area-inset-bottom,0px)}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--paper);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;-webkit-font-smoothing:antialiased}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid rgba(85,121,184,.2);outline-offset:2px}.app-shell{width:100%;max-width:560px;min-height:100dvh;margin:0 auto;padding-bottom:calc(88px + var(--safe-bottom));position:relative}.topbar{height:76px;padding:15px 22px 10px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:11px}.brand-mark{width:42px;height:42px}.brand-mark svg{width:100%;height:100%}.brand-kicker,.section-eyebrow{font-size:9px;letter-spacing:1.65px;color:#9ba4b5;font-weight:800}.brand h1{font-size:20px;line-height:1.15;margin:3px 0 0;font-weight:800;letter-spacing:1px}.icon-button,.plain-icon,.close-button{border:0;background:transparent;color:var(--ink);display:grid;place-items:center}.icon-button{width:40px;height:40px;border-radius:14px;background:#fff;box-shadow:var(--shadow)}.icon-button svg,.plain-icon svg,.search-box svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}main{padding:0 18px}.page{display:none;animation:fadeIn .18s ease}.page.active{display:block}@keyframes fadeIn{from{opacity:.5;transform:translateY(4px)}to{opacity:1;transform:none}}.month-switch{height:47px;display:flex;align-items:center;justify-content:center;gap:24px}.plain-icon{width:32px;height:32px;border-radius:50%;color:#71809a}.month-label{border:0;background:transparent;color:#5c6980;font-weight:700;font-size:14px;letter-spacing:.2px}.balance-card{position:relative;overflow:hidden;border-radius:23px;padding:22px 22px 18px;color:#fff;background:linear-gradient(122deg,#263d67 0%,#344e7d 55%,#496a9a 100%);box-shadow:0 14px 28px rgba(38,61,103,.18);min-height:177px}.balance-head{display:flex;justify-content:space-between;align-items:center;color:rgba(255,255,255,.72);font-size:12px;position:relative;z-index:1}.privacy-pill{font-size:10px;color:rgba(255,255,255,.8);display:flex;align-items:center;gap:6px;background:rgba(255,255,255,.11);border-radius:20px;padding:6px 9px}.privacy-pill i{width:5px;height:5px;background:#83d4b5;border-radius:50%}.balance-number{font-size:34px;line-height:1.2;letter-spacing:-.8px;font-weight:750;margin:12px 0 17px;position:relative;z-index:1;font-variant-numeric:tabular-nums}.balance-foot{display:flex;gap:38px;position:relative;z-index:1}.balance-foot div{display:flex;flex-direction:column;gap:4px}.balance-foot span{font-size:10px;color:rgba(255,255,255,.58)}.balance-foot strong{font-size:14px;font-weight:650;font-variant-numeric:tabular-nums}.balance-decoration{position:absolute;width:180px;height:180px;border-radius:50%;right:-68px;top:38px;border:1px solid rgba(255,255,255,.09)}.balance-decoration:before,.balance-decoration:after{content:"";position:absolute;border:1px solid rgba(255,255,255,.08);border-radius:50%;inset:18px}.balance-decoration:after{inset:38px}.budget-card{margin-top:14px;background:var(--card);border:1px solid #edf0f5;border-radius:18px;padding:15px 16px 13px;box-shadow:var(--shadow)}.budget-top,.budget-values,.budget-foot{display:flex;align-items:center;justify-content:space-between}.budget-top>div{display:flex;flex-direction:column;gap:3px}.budget-top strong{font-size:13px}.text-button{border:0;background:var(--blue-soft);color:var(--blue);font-size:11px;font-weight:700;border-radius:9px;padding:7px 12px}.budget-values{justify-content:flex-start;gap:6px;margin:12px 0 8px}.budget-values strong{font-size:19px;font-variant-numeric:tabular-nums}.budget-values span{font-size:11px;color:var(--muted)}.progress-track{height:6px;background:#f0f2f6;border-radius:9px;overflow:hidden}.progress-fill{height:100%;width:0;background:linear-gradient(90deg,#6c91d0,#8eacd9);border-radius:9px;transition:width .25s}.progress-fill.over{background:linear-gradient(90deg,#ef9a67,#e47770)}.budget-foot{margin-top:8px;font-size:10px;color:#9aa3b3}.quick-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:15px 0 24px}.quick-action{height:61px;border:0;border-radius:16px;display:flex;align-items:center;justify-content:center;gap:9px;font-size:12px;font-weight:750;box-shadow:0 5px 15px rgba(34,52,82,.035)}.expense-action{background:var(--orange-soft);color:#c57a42}.income-action{background:var(--green-soft);color:#318e70}.transfer-action{background:var(--blue-soft);color:#5476b2}.quick-icon{width:25px;height:25px;border-radius:9px;background:rgba(255,255,255,.75);display:grid;place-items:center;font-size:18px;font-weight:500}.section-heading{display:flex;justify-content:space-between;align-items:end;margin:0 2px 11px}.section-heading h2,.page-title-row h2,.sheet-heading h2{font-size:17px;margin:4px 0 0;font-weight:800;letter-spacing:.1px}.subtle-link{border:0;background:transparent;color:#8792a5;font-size:11px;padding:5px 0}.subtle-link span{font-size:17px;vertical-align:-1px;margin-left:3px}.chart-card,.stats-card{background:#fff;border:1px solid #edf0f5;border-radius:18px;padding:15px 15px 12px;box-shadow:var(--shadow)}.chart-summary{display:flex;justify-content:space-between;align-items:center}.chart-summary div{display:flex;flex-direction:column;gap:4px}.chart-summary span{font-size:10px;color:#9ba4b5}.chart-summary strong{font-size:17px;font-variant-numeric:tabular-nums}.chart-caption{align-self:center}.week-chart{height:105px;display:flex;align-items:end;justify-content:space-around;gap:8px;padding:12px 3px 0}.week-column{height:100%;flex:1;display:flex;align-items:center;justify-content:end;flex-direction:column;gap:6px;min-width:0}.week-bar-track{height:72px;width:100%;display:flex;align-items:end;justify-content:center}.week-bar{width:min(22px,70%);min-height:3px;border-radius:7px 7px 3px 3px;background:#dce6f7;transition:height .25s}.week-bar.today{background:linear-gradient(180deg,#86a6d8,#5279b9)}.week-column span{font-size:9px;color:#a1a9b8}.recent-heading{margin-top:24px}.record-list{display:flex;flex-direction:column}.card-list{background:#fff;border:1px solid #edf0f5;border-radius:18px;box-shadow:var(--shadow);overflow:hidden}.record-row{display:flex;align-items:center;padding:12px 14px;gap:11px;min-height:66px;border-bottom:1px solid #f1f3f7}.record-row:last-child{border-bottom:0}.record-icon{width:38px;height:38px;flex:none;border-radius:13px;display:grid;place-items:center;font-size:18px;background:#f4f6fa}.record-icon.expense{background:#fff2e9}.record-icon.income{background:#eaf7f2}.record-icon.transfer{background:#edf3ff}.record-main{flex:1;min-width:0}.record-title-line{display:flex;align-items:center;gap:6px}.record-title{font-size:12px;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.record-note{font-size:10px;color:#a0a8b7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:4px}.record-meta{font-size:9px;color:#a0a8b7;margin-top:4px}.record-amount{font-size:13px;font-weight:750;white-space:nowrap;font-variant-numeric:tabular-nums}.record-amount.expense{color:#d88652}.record-amount.income{color:#319c78}.record-amount.transfer{color:#6382b8}.empty-state{padding:32px 18px;text-align:center;color:#a1a9b8;font-size:12px;line-height:1.8}.empty-illustration{width:48px;height:48px;border-radius:16px;background:#f4f6fa;color:#aab3c2;display:grid;place-items:center;font-size:22px;margin:0 auto 10px}.page-title-row{display:flex;justify-content:space-between;align-items:center;margin:11px 2px 17px}.page-title-row h2{font-size:21px}.primary-small{border:0;background:var(--navy);color:#fff;border-radius:11px;padding:10px 13px;font-size:11px;font-weight:700;box-shadow:0 5px 12px rgba(38,61,103,.15)}.search-box{height:43px;background:#fff;border:1px solid #edf0f5;border-radius:13px;display:flex;align-items:center;gap:9px;padding:0 12px;box-shadow:var(--shadow)}.search-box svg{width:17px;height:17px;color:#a0a8b7}.search-box input{border:0;outline:0;min-width:0;flex:1;font-size:12px;color:var(--ink);background:transparent}.filter-row{display:flex;align-items:center;gap:7px;margin:13px 0 14px;overflow:auto;scrollbar-width:none}.filter-row::-webkit-scrollbar{display:none}.filter-chip,.filter-month{border:1px solid #e9edf3;background:#fff;color:#8993a4;border-radius:20px;padding:7px 12px;font-size:10px;white-space:nowrap}.filter-chip.active{background:var(--navy);border-color:var(--navy);color:#fff}.filter-month{margin-left:auto;color:#596982}.filter-month span{margin-left:4px}.stats-month{display:flex;align-items:center;gap:10px;color:#64728a;font-size:11px;font-weight:700}.stats-month button{border:0;background:#fff;width:26px;height:26px;border-radius:9px;color:#64728a;font-size:18px}.stats-total-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.stats-total{padding:15px;border-radius:16px;display:flex;flex-direction:column;gap:9px}.stats-total span{font-size:10px;color:#8e9aab}.stats-total strong{font-size:18px;font-variant-numeric:tabular-nums}.income-total{background:#eaf7f2}.income-total strong{color:#318e70}.expense-total{background:#fff2e9}.expense-total strong{color:#d88652}.stats-section-heading{margin-top:23px}.stats-card{padding:17px}.donut-wrap{display:flex;justify-content:center;padding:3px 0 18px}.donut{width:158px;height:158px;border-radius:50%;background:conic-gradient(#e9edf4 0 100%);display:grid;place-items:center;position:relative}.donut-hole{width:105px;height:105px;border-radius:50%;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}.donut-hole span{font-size:10px;color:#9aa4b4}.donut-hole strong{font-size:17px}.category-breakdown{display:flex;flex-direction:column;gap:12px}.breakdown-row{display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:8px;align-items:center}.breakdown-dot{width:8px;height:8px;border-radius:3px}.breakdown-name{font-size:11px;color:#67758c}.breakdown-value{text-align:right;font-size:11px;font-weight:700}.breakdown-percent{font-size:9px;color:#9ca5b4;margin-left:5px;font-weight:500}.income-breakdown{display:flex;flex-direction:column;gap:12px}.income-row{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:9px;align-items:center}.income-icon{width:30px;height:30px;border-radius:10px;background:#eaf7f2;display:grid;place-items:center}.income-name{font-size:11px;font-weight:700}.income-bar{height:4px;background:#eef4f1;border-radius:6px;margin-top:6px;overflow:hidden}.income-bar i{display:block;height:100%;background:#77bda4;border-radius:6px}.income-value{font-size:11px;font-weight:700;color:#318e70}.insight-note{display:flex;gap:10px;padding:14px 13px;margin:14px 0;background:#eef3fb;border-radius:14px}.note-icon{width:26px;height:26px;border-radius:9px;background:#fff;color:#6585bd;display:grid;place-items:center;flex:none}.insight-note strong{font-size:11px}.insight-note p{margin:5px 0 0;font-size:10px;color:#7e8ba2;line-height:1.6}.profile-hero{background:linear-gradient(120deg,#263d67,#456797);border-radius:19px;padding:19px;color:#fff;display:flex;align-items:center;gap:12px;box-shadow:0 10px 22px rgba(38,61,103,.14)}.profile-avatar{width:48px;height:48px;border-radius:15px;background:rgba(255,255,255,.14);display:grid;place-items:center}.profile-avatar svg{width:30px;height:30px;color:#fff}.profile-hero>div:nth-child(2){display:flex;flex-direction:column;gap:5px}.profile-hero strong{font-size:13px}.profile-hero span{font-size:10px;color:rgba(255,255,255,.67)}.local-badge{margin-left:auto;border:1px solid rgba(255,255,255,.25);border-radius:20px;padding:5px 7px;font-size:8px!important;letter-spacing:1px}.settings-group{background:#fff;border:1px solid #edf0f5;border-radius:17px;margin-top:14px;padding:8px 13px;box-shadow:var(--shadow)}.settings-label{font-size:10px;color:#9ca6b5;font-weight:750;padding:8px 1px 5px}.setting-row{width:100%;display:flex;align-items:center;gap:10px;text-align:left;border:0;background:transparent;padding:11px 0;border-bottom:1px solid #f1f3f6;color:var(--ink)}.setting-row:last-child{border-bottom:0}.setting-icon{width:33px;height:33px;border-radius:11px;display:grid;place-items:center;font-size:16px;flex:none}.setting-icon.blue{background:#edf3ff;color:#5579b8}.setting-icon.purple{background:#f2efff;color:#8a77c6}.setting-icon.green{background:#eaf7f2;color:#319c78}.setting-icon.orange{background:#fff3e9;color:#db945e}.setting-icon.pink{background:#fff0f4;color:#d37b9c}.setting-icon.teal{background:#eaf6f6;color:#579b9c}.setting-icon.red{background:#fff0ef;color:#d97870}.setting-row>span:nth-child(2){display:flex;flex-direction:column;gap:4px;flex:1}.setting-row strong{font-size:11px}.setting-row small{font-size:9px;color:#9ba4b4}.setting-row>b{font-size:19px;font-weight:400;color:#b1b9c6}.danger-group{padding:2px 13px}.privacy-card{display:flex;gap:10px;align-items:flex-start;margin:16px 2px 0;padding:13px;background:#edf6f2;border-radius:14px}.privacy-shield{width:26px;height:26px;border-radius:9px;background:#d8eee5;color:#319c78;display:grid;place-items:center;flex:none;font-weight:800}.privacy-card strong{font-size:11px;color:#397d67}.privacy-card p{font-size:9px;line-height:1.65;color:#77968a;margin:5px 0 0}.version-label{text-align:center;color:#b0b7c3;font-size:9px;margin:19px 0 6px}.version-label span{padding:0 4px}.tabbar{position:fixed;z-index:10;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:560px;height:calc(70px + var(--safe-bottom));padding:8px 17px calc(8px + var(--safe-bottom));display:grid;grid-template-columns:repeat(4,1fr);background:rgba(255,255,255,.96);border-top:1px solid #edf0f5;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}.tab{border:0;background:transparent;color:#a2aaba;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:9px;font-weight:650}.tab-icon{width:28px;height:25px;display:grid;place-items:center}.tab-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.tab.active{color:var(--navy)}.tab.active .tab-icon{background:#edf2fa;border-radius:9px;width:39px}.modal-overlay{position:fixed;z-index:30;inset:0;background:rgba(19,29,48,.42);display:flex;align-items:end;justify-content:center;padding-top:22px}.modal-overlay[hidden]{display:none}.bottom-sheet,.simple-dialog{width:100%;max-width:560px;background:#fff;border-radius:24px 24px 0 0;padding:9px 20px calc(20px + var(--safe-bottom));max-height:92dvh;overflow:auto;box-shadow:0 -10px 35px rgba(19,29,48,.14);animation:sheetUp .22s ease}.simple-dialog{border-radius:23px;margin:auto;width:calc(100% - 36px);max-width:430px;padding:20px;max-height:85dvh;animation:fadeIn .18s ease}@keyframes sheetUp{from{transform:translateY(35px);opacity:.7}to{transform:none;opacity:1}}.sheet-handle{width:36px;height:4px;background:#e4e8ef;border-radius:5px;margin:0 auto 16px}.sheet-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.sheet-heading h2{font-size:18px}.close-button{font-size:26px;color:#a4adbb;width:32px;height:32px;border-radius:10px}.type-switch{display:grid;grid-template-columns:repeat(3,1fr);background:#f3f5f8;border-radius:12px;padding:4px;margin-bottom:18px}.type-switch button{border:0;background:transparent;color:#929bad;border-radius:9px;padding:9px;font-size:12px;font-weight:700}.type-switch button.selected{background:#fff;color:var(--navy);box-shadow:0 2px 8px rgba(30,45,70,.08)}.field-label{display:block;font-size:11px;color:#6f7c91;font-weight:700;margin:13px 0 7px}.amount-input-wrap{display:flex;align-items:center;gap:8px;border-bottom:1px solid #e9edf3;padding:0 0 8px;margin-bottom:14px}.amount-input-wrap span{font-size:22px;color:#9aa4b4}.amount-input-wrap input{border:0;outline:0;width:100%;font-size:30px;font-weight:750;color:var(--ink);background:transparent;font-variant-numeric:tabular-nums}.amount-input-wrap input::placeholder{color:#d5dae3}.category-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:9px 0 14px}.category-option{border:1px solid #edf0f5;background:#fff;border-radius:12px;min-height:58px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:#78849a;font-size:9px}.category-option .category-emoji{font-size:18px}.category-option.selected{border-color:#9db2d7;background:#f1f5fb;color:#385781;font-weight:750}.bottom-sheet input:not([type=number]),.bottom-sheet select,.simple-dialog input{width:100%;height:42px;border:1px solid #e9edf3;border-radius:11px;background:#fbfcfe;padding:0 11px;color:#42516a;font-size:11px;min-width:0}.bottom-sheet input[type=date]{color-scheme:light}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.form-actions{display:flex;gap:10px;margin-top:20px}.save-button{flex:1;border:0;background:var(--navy);color:#fff;border-radius:13px;height:47px;font-size:13px;font-weight:750;box-shadow:0 7px 15px rgba(38,61,103,.16)}.delete-button{border:1px solid #f1d7d4;background:#fff7f6;color:#d47770;border-radius:13px;padding:0 18px;font-size:12px}.simple-dialog h2{font-size:18px}.simple-dialog p{font-size:11px;color:#7e899b;line-height:1.7}.simple-dialog input{margin:8px 0 4px}.simple-actions{display:flex;gap:9px;margin-top:18px}.simple-actions button{flex:1;border:0;border-radius:11px;height:42px;font-size:12px;font-weight:700}.secondary-action{background:#f1f3f7;color:#748096}.primary-action{background:var(--navy);color:#fff}.category-manager-list{display:flex;flex-direction:column;gap:7px;max-height:260px;overflow:auto}.category-manager-row{display:flex;align-items:center;gap:9px;padding:9px;background:#f7f8fb;border-radius:10px;font-size:11px}.category-manager-row span:nth-child(2){flex:1}.category-manager-row button{border:0;background:transparent;color:#d47770;font-size:10px}.toast{position:fixed;z-index:50;bottom:calc(83px + var(--safe-bottom));left:50%;transform:translate(-50%,12px);background:rgba(29,41,64,.92);color:#fff;border-radius:20px;padding:10px 15px;font-size:11px;opacity:0;pointer-events:none;transition:all .2s;max-width:calc(100% - 40px);text-align:center;white-space:normal}.toast.show{opacity:1;transform:translate(-50%,0)}.simple-dialog .hint-box{background:#f2f6fc;border-radius:11px;padding:11px;margin-top:10px}.simple-dialog .hint-box strong{display:block;color:#526f9f;font-size:11px;margin-bottom:4px}.simple-dialog .hint-box p{margin:0;font-size:10px}.empty-inline{padding:18px 10px;text-align:center;color:#a2aaba;font-size:10px}.mini-badge{font-size:8px;background:#f2f4f8;color:#929bad;padding:3px 5px;border-radius:5px}@media(min-width:561px){body{padding:16px 0}.app-shell{min-height:calc(100dvh - 32px);border-radius:25px;overflow:hidden;background:var(--paper);box-shadow:0 15px 60px rgba(35,49,75,.09)}.tabbar{bottom:16px;border-radius:0 0 25px 25px}.modal-overlay{align-items:center}.bottom-sheet{border-radius:24px;max-height:85dvh}.sheet-handle{display:none}}
