@font-face{font-family:Geologica;src:url('/fonts/geologica.ttf') format('truetype');font-weight:100 900;font-display:swap}
:root{color-scheme:dark;--bg:#101013;--card:#1a1a1f;--line:#303036;--text:#f5f4ef;--muted:#aaa9b2;--yellow:#ffd54e;--safe-top:calc(env(safe-area-inset-top,0px) + var(--tg-content-safe-area-inset-top,0px))}
*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:var(--bg);color:var(--text);font:400 16px/1.5 Geologica,Arial,sans-serif}button,input,select{font:inherit;color:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:wait}button,a,input,select{touch-action:manipulation}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--yellow);outline-offset:3px}.shell{max-width:660px;margin:auto;padding:calc(30px + var(--safe-top)) 24px calc(40px + env(safe-area-inset-bottom))}header{display:flex;align-items:center;justify-content:space-between;margin-bottom:32px}h1{font-size:30px;letter-spacing:-1.2px;font-weight:650;margin:0}h2{font-size:20px;font-weight:550;letter-spacing:-.4px;margin:0}nav{display:flex;gap:8px}.quiet{border:0;background:none;padding:10px 8px;color:var(--muted);font-size:14px;min-height:44px}.quiet:hover{color:var(--text)}.select-wrap{position:relative;margin-bottom:18px}.select-wrap select{width:100%;appearance:none;background:none;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:12px 35px 14px 0;font-size:22px;font-weight:500;letter-spacing:-.5px}.select-wrap span{position:absolute;right:8px;top:10px;color:var(--muted);pointer-events:none}.budget-card{background:var(--card);border-radius:18px;padding:22px}.budget-top{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:14px;min-height:32px}.budget-top .quiet{padding:0;min-height:32px}.budget{font-size:clamp(30px,7vw,44px);font-weight:500;letter-spacing:-1.7px;margin:8px 0 22px;font-variant-numeric:tabular-nums}.progress{height:4px;background:#333338;border-radius:4px;overflow:hidden;margin-bottom:22px}.progress div{height:100%;background:var(--yellow);transition:width .2s}.totals{display:grid;grid-template-columns:1fr 1fr;gap:12px}.totals>div{display:flex;flex-direction:column;gap:5px}.totals span{font-size:14px;color:var(--muted)}.totals strong{font-size:20px;font-weight:450;font-variant-numeric:tabular-nums}.section-head{display:flex;align-items:center;justify-content:space-between;margin:26px 0 8px}.add{font-size:30px;line-height:1;width:44px;height:44px;border:0;border-radius:50%;background:var(--yellow);color:#151517}.transaction{display:flex;align-items:center;justify-content:space-between;width:100%;gap:15px;text-align:left;border:0;border-bottom:1px solid var(--line);background:none;padding:17px 0}.transaction:hover{background:#ffffff04}.transaction .left{min-width:0}.transaction .title{display:block;font-size:16px;overflow-wrap:anywhere}.transaction .meta{display:block;font-size:14px;color:var(--muted);margin-top:3px}.transaction .amount{white-space:nowrap;font-size:16px;font-weight:450;font-variant-numeric:tabular-nums}.empty{color:var(--muted);padding:30px 0}.date{font-size:14px;color:var(--muted);margin:22px 0 0}dialog{width:min(100% - 24px,500px);max-height:calc(100dvh - 32px);padding:24px;background:#1a1a1f;color:var(--text);border:1px solid var(--line);border-radius:20px;overflow-y:auto}dialog::backdrop{background:#000a}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.close{width:40px;height:40px;border:0;background:none;color:var(--muted);font-size:28px}form{display:flex;flex-direction:column;gap:16px}label{display:flex;flex-direction:column;gap:7px;font-size:14px;color:var(--muted)}input,form select{width:100%;border:1px solid #3c3c44;border-radius:10px;padding:12px;background:#222228;font-size:16px;color:var(--text);min-height:48px}form select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23aaa9b2' fill='none'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;padding-right:36px}.primary{background:var(--yellow);color:#151517;border:0;border-radius:10px;padding:13px 18px;min-height:48px;font-weight:550}.danger{border:0;background:none;color:#ff9393;padding:10px;min-height:44px}.error{font-size:14px;color:#ffaaaa;margin:0}.error:empty{display:none}.category-row{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);gap:12px;padding:8px 0}.category-row .quiet{flex-shrink:0}.category-add{margin-top:18px}#login{background:var(--card);border-radius:18px;padding:24px}#login h2{margin-bottom:20px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--text);color:var(--bg);padding:12px 20px;border-radius:12px;font-size:14px;z-index:10}.negative{color:#ffaaaa!important}@media(max-width:380px){.shell{padding-inline:16px}.budget-card{padding:18px}.totals strong{font-size:18px}nav{gap:0}.transaction{gap:10px}.transaction .amount{font-size:15px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
