:root{font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;color:#26353a;background:#f5f6f1;font-size:15px}
*{box-sizing:border-box}body{margin:0;min-height:100vh}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:default}input,select,textarea{background:#fff;border:1px solid #d9e0de;border-radius:11px;padding:12px;min-height:44px;width:100%;color:#243639;outline-color:#56a18b}textarea{min-height:86px;resize:vertical}label{display:flex;flex-direction:column;gap:7px;font-size:.88rem;color:#485e5f;font-weight:650}h1,h2,h3,p{margin-top:0}h1{font-size:1.38rem}h2{font-size:1.17rem}h3{font-size:1rem}a{color:#146f65}
.app-shell{min-height:100vh;max-width:920px;margin:auto;padding:0 16px 100px}.loading-screen{padding:35vh 8px;text-align:center;color:#51716c}
.topbar{padding:20px 1px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{font-size:1.25rem;font-weight:850;color:#183f40;letter-spacing:-.05em}.eyebrow{color:#75918d;font-size:.75rem;font-weight:800;letter-spacing:.02em}.topbar-right{display:flex;align-items:center;gap:8px}.pill{background:#e5eee8;color:#3b6e63;padding:7px 10px;border-radius:20px;font-size:.76rem;font-weight:750}.demo-tag{background:#fff0d2;color:#855810}.card{background:#fff;border:1px solid #e7ebea;border-radius:18px;padding:17px;box-shadow:0 8px 24px rgba(20,55,50,.035);margin-bottom:14px}.hero{background:#183d3e;color:#f2f7f2;border:0;padding:22px;box-shadow:0 12px 26px rgba(19,57,59,.13)}.hero .muted{color:#c9dcd4}.hero-amount{font-size:2.1rem;letter-spacing:-.05em;font-weight:850;margin-top:4px;line-height:1.2}.kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:20px}.kpis>div{background:rgba(255,255,255,.095);border-radius:13px;padding:10px 9px}.kpis strong{font-size:1rem;display:block;margin-top:5px;letter-spacing:-.04em;white-space:nowrap}.kpis small{font-size:.72rem;color:#d0e0db}.header-row{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px}.header-row h2,.header-row h3{margin:0}.month-nav{display:flex;align-items:center;gap:10px}.month-nav button{background:#e7efeb;border:0;border-radius:10px;padding:7px 12px;min-height:36px;font-weight:700}.month-title{font-size:1.08rem;font-weight:800;white-space:nowrap}.muted,.hint{color:#728681;font-size:.86rem}.tiny{font-size:.75rem}.day-strip{display:flex;gap:7px;overflow-x:auto;padding:4px 0 8px;scrollbar-width:thin}.day{border:1px solid #e2e9e5;background:#fff;min-width:51px;display:flex;flex-direction:column;gap:3px;align-items:center;padding:9px 7px;border-radius:12px;color:#435c59}.day b{font-size:1rem}.day small{font-size:.67rem}.day.active{background:#205e5b;color:#fff;border-color:#205e5b}.day.has-entry:after{content:' ';height:4px;width:4px;border-radius:50%;background:#d6a34c}.day.active:after{background:#fff}.filter-row{display:flex;gap:7px;align-items:center;margin:12px 0}.filter-row button,.chip{background:#f3f7f4;border:1px solid #d9e5dd;color:#386a60;border-radius:10px;padding:8px 10px;font-size:.81rem;font-weight:750}.filter-row button.active,.chip.active{background:#205f5b;color:#fff;border-color:#205f5b}.transaction{display:flex;align-items:center;gap:10px;border-top:1px solid #edf0ef;padding:14px 0;cursor:pointer}.transaction:first-child{border-top:0}.transaction:focus-visible{outline:2px solid #398b75}.tx-icon{width:40px;height:40px;background:#edf6f1;border-radius:13px;display:grid;place-items:center;color:#2e7969;font-size:1.05rem;font-weight:800}.tx-detail{flex:1;min-width:0}.tx-detail strong{display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.tx-meta{font-size:.78rem;color:#80918e;margin-top:4px}.tx-amount{font-size:.96rem;font-weight:850;white-space:nowrap}.expense{color:#c76a56}.income{color:#227865}.saving{color:#3e72ac}.transfer{color:#7b7787}.planned{opacity:.7}.planned-label{font-size:.68rem;color:#a46d29;border:1px solid #e9cd8d;border-radius:5px;padding:2px 4px;margin-right:4px}.empty{text-align:center;padding:30px 12px;color:#7c908c;background:#f9fbf9;border-radius:12px}.primary{background:#1c655d;color:white;border:0;border-radius:12px;padding:12px 16px;min-height:44px;font-weight:800}.secondary{background:#ecf3ef;color:#246054;border:1px solid #d4e5dc;border-radius:12px;padding:10px 13px;min-height:42px;font-weight:700}.danger{background:#fff3f0;color:#b24f43;border:1px solid #f3d3cd;border-radius:11px;padding:10px 12px}.link-button{background:none;border:0;padding:6px 4px;color:#327b70;font-weight:750}.button-row{display:flex;gap:8px;flex-wrap:wrap}.button-row>*{flex:1}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.full{grid-column:1/-1}.form-title{margin:12px 0 18px}.segmented{display:flex;gap:5px;background:#eff4f0;border-radius:12px;padding:4px}.segmented button{border:0;background:transparent;border-radius:9px;padding:11px 5px;flex:1;font-size:.85rem;font-weight:800;color:#607771}.segmented button.active{background:#205e5b;color:white}.form-actions{margin-top:22px}.section{margin-bottom:22px}.section-title{display:flex;justify-content:space-between;align-items:center;margin:4px 0 12px}.section-title h2{margin:0}.bottom-nav{position:fixed;bottom:0;left:0;right:0;z-index:20;background:#fff;border-top:1px solid #e1e9e4;display:flex;justify-content:center;gap:1px;padding:8px max(8px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));box-shadow:0 -8px 24px #193d350d}.bottom-nav button{flex:1;max-width:155px;min-height:49px;background:none;border:0;border-radius:10px;color:#8da19b;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:.71rem;font-weight:700}.bottom-nav button .nav-icon{font-size:1.25rem;line-height:1}.bottom-nav button.active{background:#e9f3ed;color:#1b675c}.mode-banner{margin-bottom:12px;border-radius:13px;background:#fff6df;color:#795a29;font-size:.82rem;padding:11px 13px;line-height:1.55}.section-note{background:#f2f6f2;padding:12px;border-radius:12px;color:#576e65;font-size:.82rem;line-height:1.6}.stat-row{padding:12px 0;border-bottom:1px solid #edf1ee}.stat-top{display:flex;justify-content:space-between;gap:12px;margin-bottom:7px}.bar-track{height:9px;background:#edf2ef;border-radius:8px;overflow:hidden}.bar-fill{height:100%;background:#50a38e;border-radius:8px}.stat-child{margin-left:14px;font-size:.85rem}.stat-child .bar-fill{background:#b8d4c8}.rule-row,.category-row{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #edf0ed;gap:10px;padding:12px 0}.rule-row:first-child,.category-row:first-child{border:0}.rule-text{flex:1;min-width:0}.rule-text strong,.rule-text small{display:block}.rule-text small{color:#748b84;margin-top:5px}.category-indent{padding-left:20px}.button-mini{padding:7px 9px;border-radius:8px;font-size:.78rem;border:1px solid #d9e8e1;color:#226458;background:#f3f8f4}.dialog-backdrop{position:fixed;inset:0;background:#162d30b3;z-index:40;display:flex;align-items:flex-end;justify-content:center}.dialog{background:white;border-radius:22px 22px 0 0;padding:21px;max-width:640px;width:100%;max-height:90dvh;overflow-y:auto}.dialog-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.dialog-header h2{margin:0}.dialog-close{border:0;background:#eff3ef;padding:5px 11px;border-radius:8px;font-size:1.25rem}.toast{position:fixed;z-index:80;bottom:90px;left:50%;transform:translateX(-50%);background:#183d3e;color:white;border-radius:13px;padding:12px 20px;min-width:180px;max-width:90vw;text-align:center;font-size:.89rem;opacity:0;pointer-events:none;transition:opacity .2s}.toast.show{opacity:1}.auth-layout{max-width:410px;margin:8vh auto 0}.auth-logo{text-align:center;color:#204947;margin-bottom:22px}.auth-logo .mark{display:inline-grid;place-items:center;font-size:1.5rem;width:66px;height:66px;border-radius:21px;background:#1a4e49;color:white;margin-bottom:12px}.auth-layout .card{padding:24px}.auth-layout form{display:grid;gap:13px}.auth-layout h1{margin-bottom:5px}.auth-switch{display:flex;justify-content:center;gap:8px;margin:13px 0}.small-tag{display:inline-block;background:#e2f3ea;color:#236d5a;border-radius:7px;padding:3px 7px;font-size:.7rem;font-weight:800}.error{background:#fff0ed;color:#b54e3c;padding:12px;border-radius:11px;font-size:.85rem}.total-line{display:flex;justify-content:space-between;font-weight:800;border-top:1px solid #e3eae4;padding-top:12px;margin-top:10px}.numbers{font-variant-numeric:tabular-nums}.stack{display:grid;gap:12px}.pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}.settings-group{margin-bottom:22px}.settings-group h3{margin-bottom:8px}code{background:#e8f0ec;border-radius:6px;padding:3px 5px;overflow-wrap:anywhere}.text-right{text-align:right}
@media(min-width:740px){.app-shell{padding:0 36px 110px}.bottom-nav{left:50%;right:auto;transform:translateX(-50%);width:920px;max-width:100%;border-radius:18px 18px 0 0}.kpis strong{font-size:1.3rem}.hero-amount{font-size:2.4rem}.dialog-backdrop{align-items:center}.dialog{border-radius:20px;max-height:88dvh}}
@media(max-width:390px){.app-shell{padding-left:12px;padding-right:12px}.card{padding:14px}.hero{padding:18px}.kpis{gap:6px}.kpis>div{padding:9px 6px}.kpis strong{font-size:.88rem}.month-title{font-size:1rem}}

.card:not(.hero) .kpis small{color:#657e76}.card:not(.hero) .kpis strong{color:#2b544b}
