:root{color-scheme:dark;--bg:#1c2938;--panel:#131f2b;--panel2:#243546;--text:#f4f7fb;--muted:#91a2b3;--line:rgba(174,197,219,.09);--blue:#32a9ed;--green:#4bd7a1;--red:#ff7b87;--amber:#f5c16c;--radius:22px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;font-size:15px;-webkit-tap-highlight-color:transparent}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button{cursor:pointer;border:0;color:inherit;background:none}button:disabled{opacity:.45;cursor:wait}button:focus-visible,a:focus-visible{outline:2px solid var(--blue);outline-offset:3px}a{color:var(--blue);text-decoration:none}h1,h2,h3,p{margin:0}h1{font-size:28px;letter-spacing:-.9px;font-weight:750}h2{font-size:20px;letter-spacing:-.4px}h3{font-size:16px}small{font-size:12px}.muted{color:var(--muted)}.green{color:var(--green)}.red{color:var(--red)}.blue{color:var(--blue)}.amber{color:var(--amber)}.icon{width:22px;height:22px;flex:none;stroke-width:1.8;vertical-align:middle}.app{max-width:560px;margin:auto;min-height:100dvh}.header{padding:22px 22px 0;padding-top:calc(22px + var(--tg-content-safe-area-inset-top,0px))}.brand{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.brand-label{font-size:12px;color:var(--muted);letter-spacing:.2px}.brand-label strong{color:var(--text);display:block;font-size:16px;margin-bottom:3px}.brand-left{display:flex;gap:11px;align-items:center}.brand-mark{width:40px;height:40px;border-radius:13px;background:var(--blue);color:white;display:flex;align-items:center;justify-content:center;font-size:29px;font-weight:800;letter-spacing:-3px;padding-right:4px;box-shadow:0 4px 16px #101b2655}.brand-mark span{font-size:24px;color:#a9e9ff;transform:translateY(5px)}.avatar{height:36px;min-width:36px;border-radius:50%;background:#304558;display:grid;place-items:center;color:#b7d2e5;font-size:13px;font-weight:700}.title-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:22px}.pill{border-radius:30px;padding:11px 14px;background:var(--panel);color:var(--blue);font-size:13px;font-weight:650;display:inline-flex;align-items:center;gap:7px;white-space:nowrap}.pill .icon{width:17px;height:17px}.content{padding:0 20px calc(180px + env(safe-area-inset-bottom,0px))}.section-label{font-size:11px;letter-spacing:1.2px;color:var(--muted);font-weight:650;text-transform:uppercase;margin:25px 5px 10px}.section-heading{display:flex;align-items:center;justify-content:space-between;margin:24px 2px 13px;gap:12px}.section-heading h2{font-size:17px}.card{border-radius:var(--radius);background:var(--panel);overflow:hidden;border:1px solid var(--line)}.pad{padding:22px}.card+.card{margin-top:15px}.totals{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:20px}.total{background:var(--panel);border:1px solid var(--line);border-radius:20px;padding:17px 15px;min-width:0}.total-label{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:7px;margin-bottom:13px}.total-label .icon{width:17px;height:17px}.total-value{font-size:25px;font-weight:700;letter-spacing:-.7px;overflow-wrap:anywhere}.unit{font-size:12px;color:var(--muted);font-weight:450;margin-top:4px}.search{display:flex;align-items:center;gap:10px;background:var(--panel);border:1px solid var(--line);border-radius:15px;padding:0 15px;color:var(--muted);margin-bottom:17px}.search input{width:100%;padding:15px 0;background:transparent;color:var(--text);border:0;outline:0;min-width:0}.search .icon{width:18px}.search:focus-within{border-color:var(--blue)}input::placeholder,textarea::placeholder{color:#73889a}.segments{display:flex;gap:4px;background:var(--panel);border-radius:16px;padding:5px;margin-bottom:18px}.segments button{flex:1;border-radius:12px;padding:12px 4px;color:var(--muted);font-weight:600;font-size:14px}.segments button.active{background:var(--panel2);color:var(--text);box-shadow:0 2px 7px #0002}.segments button.active[data-kind=expense]{color:var(--red)}.segments button.active[data-kind=income]{color:var(--green)}.filters{display:flex;gap:8px;margin:0 0 19px;overflow:auto;scrollbar-width:none}.filters button{border-radius:30px;padding:10px 16px;color:var(--muted);background:var(--panel);font-size:13px;white-space:nowrap}.filters button.active{background:var(--blue);color:white;font-weight:650}.badge{font-size:10px;line-height:17px;background:var(--blue);color:white;border-radius:20px;min-width:17px;display:inline-block;text-align:center;padding:0 4px;margin-left:4px}.hero{padding:23px;border-radius:22px;background:var(--panel);border:1px solid var(--line);position:relative;overflow:hidden}.hero-label{font-size:11px;letter-spacing:1.2px;color:var(--muted);font-weight:650;margin-bottom:12px}.hero-number{font-size:39px;font-weight:750;letter-spacing:-1.5px;overflow-wrap:anywhere}.hero-number small{font-size:16px;font-weight:450;color:var(--muted);letter-spacing:0;display:inline-block;margin-left:7px}.hero-bottom{margin-top:16px;display:flex;justify-content:space-between;gap:12px;align-items:center;font-size:12px;color:var(--muted);border-top:1px solid var(--line);padding-top:14px}.comparison{display:inline-flex;gap:5px;align-items:center}.comparison .icon{width:14px;height:14px}.empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:42px 25px;gap:11px;min-height:260px;justify-content:center}.empty-icon{height:67px;width:67px;border-radius:23px;display:grid;place-items:center;background:#20384a;color:var(--blue);margin-bottom:6px}.empty-icon .icon{width:32px;height:32px;stroke-width:1.5}.empty h2{font-size:18px}.empty p{font-size:13px;color:var(--muted);line-height:1.6;max-width:300px}.empty button{margin-top:8px}.row{display:flex;align-items:center;gap:12px;padding:17px 18px;width:100%;text-align:left;min-height:72px;border-bottom:1px solid var(--line)}.row:last-child{border-bottom:0}.row:hover{background:#fff2}.row-main{flex:1;min-width:0}.row-title{font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.4}.row-sub{font-size:12px;color:var(--muted);margin-top:4px;line-height:1.5}.row-end{text-align:right;flex-shrink:0;font-size:14px;font-weight:650;max-width:45%;overflow-wrap:anywhere}.row-end small{display:block;font-size:10px;font-weight:400;color:var(--muted);margin-top:4px}.row-icon{height:39px;width:39px;border-radius:13px;background:#293747;display:grid;place-items:center;flex-shrink:0;font-size:19px}.row-icon.expense{color:var(--red);background:#ff7b8712}.row-icon.income{color:var(--green);background:#4bd7a112}.row-icon.person{border-radius:50%;font-size:14px;color:#b6d3e8;font-weight:650}.row .chevron{width:16px;height:16px;color:#688094}.date-group{font-size:12px;color:var(--muted);padding:17px 3px 10px}.date-group:first-child{padding-top:0}.transaction-list .card{border-radius:18px}.status-dot{display:inline-block;width:5px;height:5px;border-radius:50%;background:currentColor;margin-right:4px;vertical-align:middle}.floating{position:fixed;bottom:calc(94px + env(safe-area-inset-bottom,0px));right:max(22px,calc((100vw - 560px)/2 + 22px));height:59px;width:59px;border-radius:21px;background:var(--blue);box-shadow:0 8px 26px #07121d66;display:grid;place-items:center;z-index:5;color:white}.floating .icon{width:28px;height:28px;stroke-width:2.5}.floating.expense{background:#e86070}.floating.income{background:#28b886}.bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(560px,100%);display:flex;background:#131f2bf5;backdrop-filter:blur(18px);border-top:1px solid var(--line);padding:9px 12px calc(11px + env(safe-area-inset-bottom,0px));z-index:10}.bottom-nav button{flex:1;display:flex;flex-direction:column;align-items:center;gap:5px;padding:8px 0;color:#7f93a6;font-size:11px;font-weight:550}.bottom-nav button .icon{width:23px;height:23px}.bottom-nav button.active{color:var(--blue)}.bottom-nav button.active .nav-icon{background:#32a9ed16}.nav-icon{padding:4px 17px;border-radius:16px}.primary,.secondary,.danger-button,.success-button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:13px 19px;font-weight:650;border-radius:14px;font-size:14px}.primary{background:var(--blue);color:white}.secondary{background:var(--panel2);color:var(--text)}.danger-button{background:#ff7b8719;color:var(--red)}.success-button{background:#24b885;color:white}.wide{width:100%}.text-button{color:var(--blue);font-size:13px;padding:10px 3px}.help{font-size:12px;line-height:1.65;color:var(--muted);margin-top:12px}.details{display:flex;justify-content:space-between;align-items:baseline;gap:15px;padding:12px 0;border-bottom:1px solid var(--line);font-size:13px}.details:last-child{border:0}.details dt{color:var(--muted)}.details dd{margin:0;text-align:right;overflow-wrap:anywhere;max-width:65%}.amount-display{font-size:35px;font-weight:750;letter-spacing:-1px;text-align:center;padding:12px 0 5px;overflow-wrap:anywhere}.center{text-align:center}.status-pill{display:inline-flex;align-items:center;gap:5px;border-radius:30px;padding:6px 10px;background:#243546;font-size:11px}.status-pill .icon{width:13px;height:13px}.payment-actions{display:grid;gap:10px;margin-top:22px}.setting-select{display:block;background:transparent;color:var(--muted);border:0;text-align:right;max-width:160px;outline:0;font-size:13px}.check{color:var(--blue);height:22px}.language-row{min-height:61px}.privacy{display:flex;align-items:flex-start;gap:8px;padding:18px 7px;color:var(--muted);font-size:12px;line-height:1.6}.privacy .icon{width:15px;height:15px;margin-top:3px}.version{text-align:center;color:#6c8398;font-size:10px;padding:4px}.backdrop{position:fixed;inset:0;background:#050c16b3;backdrop-filter:blur(5px);z-index:30;display:flex;align-items:flex-end;justify-content:center;padding-top:30px}.sheet{background:var(--bg);width:min(560px,100%);border-radius:26px 26px 0 0;max-height:94dvh;overflow-y:auto;overscroll-behavior:contain;border:1px solid var(--line);border-bottom:0;padding:10px 22px calc(25px + env(safe-area-inset-bottom,0px));animation:slide .2s ease-out;scrollbar-width:thin}.handle{width:38px;height:4px;background:#607183;border-radius:10px;margin:0 auto 16px;opacity:.5}.sheet-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;gap:12px}.sheet-title h2{font-size:21px}.close-button{height:33px;width:33px;border-radius:50%;background:var(--panel2);display:grid;place-items:center;flex-shrink:0}.close-button .icon{height:18px;width:18px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field{display:flex;flex-direction:column;gap:8px;margin-bottom:16px;min-width:0}.field label{font-size:12px;color:var(--muted)}.field input,.field select,.field textarea{width:100%;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:13px;min-height:48px;padding:13px 14px;outline:0;min-width:0}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--blue)}.field textarea{resize:vertical;min-height:75px}.amount-field{background:var(--panel);border-radius:17px;display:flex;align-items:baseline;padding:12px 15px;border:1px solid var(--line);margin-bottom:20px}.amount-field input{background:transparent;border:0;color:var(--text);font-size:34px;font-weight:700;outline:0;width:100%;min-width:0;padding:9px 0;letter-spacing:-.7px}.amount-field span{color:var(--muted);font-size:14px;white-space:nowrap}.category-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:10px 0 21px}.category-grid button{display:flex;flex-direction:column;align-items:center;gap:8px;padding:13px 5px;background:var(--panel);border:1px solid transparent;border-radius:13px;font-size:10px;min-width:0}.category-grid button .emoji{font-size:22px}.category-grid button.selected{border-color:var(--blue);background:#32a9ed12;color:#8dd9ff}.category-grid button .category-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.form-error{color:var(--red);font-size:13px;line-height:1.5;margin:12px 0;white-space:pre-line}.form-error:empty{display:none}.sheet-footer{margin-top:21px;display:grid;gap:9px}.sheet .hero{margin:12px 0 17px}.sheet .card{margin-bottom:12px}.progress{height:6px;border-radius:5px;background:var(--panel2);overflow:hidden;margin:12px 0 9px}.progress i{height:100%;display:block;border-radius:5px;background:var(--blue)}.progress i.exceeded{background:var(--red)}.budget-meta{display:flex;justify-content:space-between;gap:10px;font-size:11px;color:var(--muted)}.chart{padding:20px 16px}.chart svg{width:100%;height:155px;overflow:visible}.chart-labels{display:flex;justify-content:space-between;color:var(--muted);font-size:9px;margin-top:9px}.legend{display:flex;justify-content:center;gap:22px;font-size:11px;color:var(--muted);margin-top:15px}.legend i{display:inline-block;width:7px;height:7px;background:var(--green);border-radius:50%;margin-right:5px}.legend i.expense{background:var(--red)}.category-row{padding:15px 20px}.category-row+.category-row{border-top:1px solid var(--line)}.category-top{display:flex;justify-content:space-between;gap:12px;font-size:13px}.category-top b{font-weight:550}.category-row .progress{height:4px;margin-bottom:0}.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:17px 0}.stat-grid>div{background:var(--panel);border-radius:17px;padding:17px;min-width:0}.stat-grid p{color:var(--muted);font-size:11px;margin-bottom:8px}.stat-grid b{font-size:18px;letter-spacing:-.3px;overflow-wrap:anywhere}.boot{min-height:80dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;padding:30px;text-align:center}.boot .brand-mark{width:60px;height:60px;font-size:43px;border-radius:20px;margin-bottom:12px}.boot p{color:var(--muted);font-size:14px;line-height:1.65;max-width:340px}.boot .primary{margin-top:12px}.boot h1{font-size:30px}.spinner{height:23px;width:23px;border-radius:50%;border:2px solid #ffffff20;border-top-color:var(--blue);animation:spin .7s linear infinite}.inline-loader{display:grid;place-items:center;padding:50px}.notice{border-radius:14px;padding:14px;background:#32a9ed0d;border:1px solid #32a9ed25;color:#98bbd2;font-size:12px;line-height:1.6;margin:13px 0}.notice.amber{border-color:#f5c16c30;background:#f5c16c0b;color:var(--amber)}#toast{position:fixed;bottom:calc(98px + env(safe-area-inset-bottom,0px));left:50%;transform:translate(-50%,15px);background:#eaf2f9;color:#152436;box-shadow:0 5px 30px #0003;padding:12px 20px;border-radius:25px;font-size:13px;z-index:60;max-width:85%;text-align:center;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s}#toast.show{opacity:1;transform:translate(-50%,0)}body.modal-open{overflow:hidden}.hidden{display:none!important}@keyframes slide{from{transform:translateY(25px);opacity:.5}to{transform:translateY(0);opacity:1}}@keyframes spin{to{transform:rotate(360deg)}}@media(min-width:700px){body{background:#0e1722}.app{background:var(--bg);box-shadow:0 0 70px #0003}.sheet{border-radius:25px;max-height:90dvh;margin:0 16px 25px}.backdrop{align-items:center}.floating{bottom:112px}.bottom-nav{padding-bottom:14px}.content{padding-bottom:180px}}@media(max-width:360px){.header{padding-left:16px;padding-right:16px}.content{padding-left:14px;padding-right:14px}.total-value{font-size:22px}.title-row h1{font-size:25px}.pill{font-size:11px;padding:10px}.hero-number{font-size:32px}.filters{gap:6px}.filters button{padding:10px 12px}.sheet{padding-left:16px;padding-right:16px}.segments button{font-size:12px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
