:root{--sidebar-bg:#1f2547;--sidebar-fg:#d8dcf0;--sidebar-muted:#8f96c2;--sidebar-active:#343c6e;--bg:#f6f7fb;--surface:#fff;--fg:#1c1f2e;--muted:#6b7088;--border:#e3e5ee;--row-hover:#f2f4fb;--group-bg:#eef0f8;--accent:#3b5bdb;--pos-bg:#c9f0c4;--pos-fg:#1d5c19;--zero-bg:#e6e8ef;--zero-fg:#5c6178;--neg-bg:#fbd0cb;--neg-fg:#a3241a;--credit-bg:#fde3a7;--credit-fg:#8a5a00;--radius:8px;color:var(--fg);background:var(--bg);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Inter,system-ui,sans-serif;font-size:14px}*{box-sizing:border-box}body{margin:0}h1{margin:0;font-size:22px;font-weight:650}h2{margin:0 0 16px;font-size:18px}button,input,select{font:inherit;color:inherit}.muted{color:var(--muted)}.error,.neg{color:var(--neg-fg)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.money{font-variant-numeric:tabular-nums;white-space:nowrap}.app{grid-template-columns:260px 1fr;min-height:100vh;display:grid}.main{min-width:0}.page{max-width:1200px;padding:24px 32px}.sidebar{background:var(--sidebar-bg);color:var(--sidebar-fg);flex-direction:column;gap:8px;height:100vh;padding:16px 12px;display:flex;position:sticky;top:0;overflow-y:auto}.brand{align-items:center;gap:10px;padding:4px 8px 16px;display:flex}.brand-mark{color:#0f2a16;background:#4cc26a;border-radius:10px;place-items:center;width:36px;height:36px;font-size:20px;font-weight:800;display:grid}.brand-name{color:#fff;font-weight:700}.brand-tag{color:var(--sidebar-muted);font-size:11px}.side-nav{flex-direction:column;gap:2px;margin-bottom:8px;display:flex}.side-nav a,.side-account{color:inherit;border-radius:6px;padding:8px 10px;text-decoration:none}.side-nav a:hover,.side-account:hover{background:#ffffff0f}.side-nav a.active,.side-account.active{background:var(--sidebar-active);color:#fff}.side-section{flex-direction:column;gap:1px;margin-top:4px;display:flex}.side-section-head{text-transform:uppercase;letter-spacing:.06em;color:var(--sidebar-muted);justify-content:space-between;padding:6px 10px;font-size:11px;font-weight:600;display:flex}.side-account{justify-content:space-between;gap:8px;font-size:13px;display:flex}.sidebar .neg{color:#ff9b91}.side-add{border:1px dashed var(--sidebar-muted);color:var(--sidebar-fg);cursor:pointer;background:0 0;border-radius:6px;margin-top:8px;padding:8px}.side-add:hover{background:#ffffff0f}.btn{border:1px solid var(--border);background:var(--surface);cursor:pointer;border-radius:6px;padding:8px 14px}.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn:disabled{opacity:.5;cursor:default}.btn.small{padding:4px 10px;font-size:13px}.link-btn{color:var(--accent);cursor:pointer;background:0 0;border:none;padding:2px 4px;font-size:13px;text-decoration:none}.link-btn:hover{text-decoration:underline}.icon-btn{cursor:pointer;width:28px;height:28px;color:var(--muted);background:0 0;border:none;border-radius:6px;place-items:center;font-size:20px;text-decoration:none;display:inline-grid}.icon-btn:hover{background:var(--row-hover);color:var(--fg)}.icon-btn.danger:hover{color:var(--neg-fg)}.inline-input{border:1px solid var(--accent);border-radius:4px;padding:4px 8px;font-size:13px}input[aria-invalid=true]{border-color:var(--neg-fg)!important}.pill{white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums;border-radius:999px;min-width:96px;padding:2px 10px;font-size:13px;font-weight:600;display:inline-block}.pill.positive{background:var(--pos-bg);color:var(--pos-fg)}.pill.zero{background:var(--zero-bg);color:var(--zero-fg)}.pill.negative{background:var(--neg-bg);color:var(--neg-fg)}.pill.credit{background:var(--credit-bg);color:var(--credit-fg)}.budget-header{justify-content:space-between;align-items:center;gap:24px;margin-bottom:16px;display:flex}.month-nav{align-items:center;gap:8px;display:flex}.month-nav h1{text-align:center;min-width:190px}.rta{border-radius:var(--radius);text-align:center;min-width:260px;padding:10px 20px}.rta-amount{font-variant-numeric:tabular-nums;font-size:22px;font-weight:750}.rta-caption{font-size:12px;font-weight:500}.rta-note{opacity:.8;margin-top:2px;font-size:11px}.rta.positive{background:var(--pos-bg);color:var(--pos-fg)}.rta.zero{background:var(--zero-bg);color:var(--zero-fg)}.rta.negative{background:var(--neg-bg);color:var(--neg-fg)}.toolbar{gap:12px;padding:8px 0;display:flex}.budget-table,.register{border-collapse:collapse;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);width:100%;overflow:hidden}.budget-table th,.budget-table td,.register th,.register td{border-bottom:1px solid var(--border);text-align:left;padding:6px 12px}.budget-table thead th,.register thead th{text-transform:uppercase;letter-spacing:.05em;color:var(--muted);background:var(--surface);font-size:11px;font-weight:600}.budget-table th:not(:first-child),.budget-table td:not(:first-child){text-align:right;width:170px}.group-row th,.group-row td{background:var(--group-bg);font-weight:650}.group-row th{align-items:center;gap:12px;display:flex}.group-row .link-btn{opacity:0;font-weight:400}.group-row:hover .link-btn,.group-row .inline-input{opacity:1}.cat-row:hover td{background:var(--row-hover)}.cat-name{padding-left:24px!important}.cat-note{color:var(--muted);margin-top:1px;font-size:11px}.cat-note.warn{color:var(--credit-fg)}.money-input{text-align:right;font-variant-numeric:tabular-nums;background:0 0;border:1px solid #0000;border-radius:4px;width:140px;padding:4px 8px}.money-input:hover{border-color:var(--border);background:var(--surface)}.money-input:focus{border-color:var(--accent);background:var(--surface);outline:none}.account-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:24px;margin-bottom:16px;display:flex}.balances{align-items:center;gap:14px;display:flex}.balances>div:not(.op){flex-direction:column;align-items:flex-end;display:flex}.balances .money{font-size:16px;font-weight:650}.balances span:not(.money){color:var(--muted);text-transform:uppercase;letter-spacing:.05em;font-size:11px}.balances .op{color:var(--muted);font-size:18px}.balances .working .money{font-size:18px}.register td{font-size:13px}.register tbody tr:hover td{background:var(--row-hover)}.register .num{text-align:right}.new-row td{background:#f8f9ff}.edit-row td{border-top:2px solid var(--accent);border-bottom:2px solid var(--accent);background:#eef2ff}.new-row input,.new-row select,.edit-row input,.edit-row select{border:1px solid var(--border);background:var(--surface);border-radius:4px;width:100%;padding:5px 6px}.new-row input.num,.edit-row input.num{text-align:right}.row-actions{gap:4px;display:flex}.tx-row{cursor:pointer}.tx-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.new-row input.is-transfer,.edit-row input.is-transfer{border-color:var(--accent);color:var(--accent)}.transfer{color:var(--accent)}.uncategorised{color:var(--credit-fg)}.cleared{border:1px solid var(--border);background:var(--surface);width:22px;height:22px;color:var(--muted);cursor:pointer;border-radius:50%;font-size:11px;font-weight:700}.cleared.on{color:#fff;background:#4cc26a;border-color:#4cc26a}.dialog{border:none;border-radius:12px;width:420px;padding:24px;box-shadow:0 20px 60px #00000040}.dialog::backdrop{background:#14183273}.dialog form{flex-direction:column;gap:14px;display:flex}.dialog label{flex-direction:column;gap:6px;font-size:13px;font-weight:600;display:flex}.dialog input,.dialog select{border:1px solid var(--border);border-radius:6px;padding:8px 10px;font-weight:400}.hint{color:var(--muted);margin:0;font-size:12px}.dialog-actions{justify-content:flex-end;gap:8px;margin-top:4px;display:flex}.page.wide{max-width:1500px}.budget-layout{grid-template-columns:minmax(0,1fr) 320px;align-items:start;gap:20px;display:grid}@media (width<=1100px){.budget-layout{grid-template-columns:1fr}}.cat-row{cursor:pointer}.cat-row.selected td{background:#e8ecff!important}.cat-row.selected .cat-name{box-shadow:inset 3px 0 0 var(--accent)}.cat-link{cursor:pointer;text-align:left;background:0 0;border:none;padding:0}.cat-link:hover{color:var(--accent)}.pill-btn{cursor:pointer;background:0 0;border:none;border-radius:999px;padding:0}.pill-btn:hover .pill{box-shadow:0 0 0 2px var(--accent)}.cat-target{align-items:center;gap:8px;margin-top:3px;display:flex}.cat-target .target-bar{width:120px}.target-bar{background:var(--zero-bg);border-radius:999px;height:5px;overflow:hidden}.target-bar>div{background:var(--credit-fg);opacity:.7;border-radius:999px;height:100%}.target-bar.done>div{opacity:1;background:#4cc26a}.inspector{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);flex-direction:column;gap:4px;padding:16px;display:flex;position:sticky;top:16px}.inspector h2{margin:0;font-size:17px}.inspector h3{text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:0 0 8px;font-size:11px}.insp-head{justify-content:space-between;align-items:flex-start;display:flex}.insp-section{border-top:1px solid var(--border);flex-direction:column;gap:6px;margin-top:8px;padding:12px 0 4px;display:flex}.stat{justify-content:space-between;align-items:center;font-size:13px;display:flex}.stat>span:first-child{color:var(--muted)}.small{margin:0;font-size:12px}.btn.block{width:100%}.link-btn.danger{color:var(--neg-fg)}.target-desc{font-size:13px;font-weight:600}.target-form,.move-form{flex-direction:column;gap:8px;display:flex}.target-form label,.move-form label{flex-direction:column;gap:4px;font-size:12px;font-weight:600;display:flex}.target-form input,.move-form input,.move-form select{border:1px solid var(--border);border-radius:6px;padding:6px 8px;font-weight:400}.segmented{border:1px solid var(--border);border-radius:6px;display:flex;overflow:hidden}.segmented button{background:var(--surface);cursor:pointer;border:none;flex:1;padding:6px 4px;font-size:12px}.segmented button+button{border-left:1px solid var(--border)}.segmented button.on{background:var(--accent);color:#fff}.cat-target .cat-note{white-space:nowrap;margin:0}.search{border:1px solid var(--border);background:var(--surface);border-radius:6px;min-width:240px;padding:7px 10px}.payee-help{max-width:720px;margin:-6px 0 12px}.name-input{background:0 0;border:1px solid #0000;border-radius:4px;width:100%;max-width:320px;padding:4px 6px}.name-input:hover{border-color:var(--border);background:var(--surface)}.name-input:focus{border-color:var(--accent);background:var(--surface);outline:none}.combo{position:relative}.combo-list{z-index:50;background:var(--surface);border:1px solid var(--border);border-radius:8px;min-width:300px;max-height:340px;margin:0;padding:4px;list-style:none;position:fixed;overflow-y:auto;box-shadow:0 12px 32px #1418322e}.combo-heading{text-transform:uppercase;letter-spacing:.06em;color:var(--muted);padding:6px 8px 2px;font-size:10px;font-weight:600}.combo-option,.combo-new{cursor:pointer;border-radius:5px;justify-content:space-between;align-items:baseline;gap:12px;padding:6px 8px;font-size:13px;display:flex}.combo-option.active,.combo-new.active{background:#e8ecff}.combo-option mark{color:var(--accent);background:0 0;font-weight:700}.combo-option.transfer .combo-label{color:var(--accent)}.combo-hint{color:var(--muted);white-space:nowrap;font-size:11px}.combo-label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.combo-new{color:var(--muted);border-top:1px solid var(--border);margin-top:2px;font-style:italic}.combo-new kbd{font:inherit;border:1px solid var(--border);border-radius:3px;padding:0 4px;font-size:10px;font-style:normal}.date-cell{min-width:150px}.date-cell .repeat{color:var(--muted);margin-top:4px;font-size:12px}.date-cell .repeat.on{color:var(--accent);border-color:var(--accent)}.date-note{color:var(--accent);margin-top:2px;font-size:11px}.section-row th{text-align:left;background:var(--bg);text-transform:uppercase;letter-spacing:.05em;color:var(--fg);font-size:11px;font-weight:650;padding:8px 12px!important}.section-row .muted{text-transform:none;letter-spacing:0;font-weight:400}.tx-row.upcoming td{color:var(--muted);font-style:italic}.tx-row.upcoming .money,.tx-row.upcoming .transfer{color:var(--muted)}.tx-row.schedule .date-note{font-style:normal}.tx-row.mirrored{cursor:default}.schedule-actions{white-space:nowrap;justify-content:flex-end;align-items:center;gap:0;font-style:normal}.schedule-actions .link-btn{padding:2px 3px;font-size:12px}.table-scroll{border-radius:var(--radius);overflow-x:auto}.sub-line{color:var(--muted);overflow-wrap:anywhere;margin-top:2px;font-size:11px;font-style:normal}.stack-top{margin-bottom:4px}.new-row input.stacked,.edit-row input.stacked{margin-top:4px;font-size:12px}.register.compact th,.register.compact td{padding:6px 8px}.register.compact .date-cell{min-width:128px}.register.compact .num{white-space:nowrap}.register.compact .new-row input.num,.register.compact .edit-row input.num{min-width:72px}@media (width<=1100px){.app{grid-template-columns:210px 1fr}.brand-tag{display:none}.page{padding:20px}.budget-table th:not(:first-child),.budget-table td:not(:first-child){width:130px}.money-input{width:112px}.pill{min-width:84px}}.group-link{font:inherit;cursor:pointer;color:inherit;text-align:left;background:0 0;border:none;padding:0;font-weight:650}.group-link:hover,.group-link.selected{color:var(--accent)}.field{flex-direction:column;gap:4px;font-size:12px;font-weight:600;display:flex}.field input,.field select,.delete-box select,.row-actions input.grow{border:1px solid var(--border);background:var(--surface);border-radius:6px;padding:6px 8px;font-weight:400}.row-actions input.grow{flex:1;min-width:0}.btn.danger{background:var(--neg-fg);border-color:var(--neg-fg);color:#fff}.btn.danger-outline{color:var(--neg-fg);border-color:var(--neg-bg)}.btn.danger-outline:disabled{color:var(--muted)}.delete-box{border:1px solid var(--neg-bg);background:#fff6f5;border-radius:6px;flex-direction:column;gap:8px;padding:10px;display:flex}.delete-box p{margin:0}.hidden-item{justify-content:space-between;align-items:center;gap:8px;font-size:13px;display:flex}.mobile-bar,.drawer-close,.drawer-backdrop,.sheet-backdrop{display:none}.brand-mark.small{border-radius:7px;width:26px;height:26px;font-size:15px;display:inline-grid}@media (width<=760px){input,select,textarea{font-size:16px!important}.app{display:block}.mobile-bar{z-index:30;background:var(--sidebar-bg);color:#fff;padding:calc(env(safe-area-inset-top) + 8px) 12px 8px;align-items:center;gap:12px;font-weight:700;display:flex;position:sticky;top:0}.mobile-brand{align-items:center;gap:8px;display:flex}.menu-btn{cursor:pointer;background:0 0;border:none;gap:4px;padding:8px 6px;display:grid}.menu-btn span{background:#fff;border-radius:2px;width:20px;height:2px;display:block}.sidebar{z-index:60;width:280px;max-width:85vw;height:100dvh;padding-top:calc(env(safe-area-inset-top) + 12px);padding-bottom:calc(env(safe-area-inset-bottom) + 12px);transition:transform .2s;position:fixed;top:0;bottom:0;left:0;transform:translate(-105%);box-shadow:0 0 40px #0000004d}.app.menu-open .sidebar{transform:none}.drawer-backdrop{z-index:55;background:#0a0c1e73;display:block;position:fixed;inset:0}.drawer-close{top:calc(env(safe-area-inset-top) + 10px);color:var(--sidebar-fg);display:grid;position:absolute;right:8px}.brand-tag{display:block}.side-nav a,.side-account{padding:11px 10px}.page{padding:12px 12px calc(env(safe-area-inset-bottom) + 32px)}h1{font-size:20px}.budget-header{flex-direction:column;align-items:stretch;gap:10px}.month-nav{justify-content:center}.month-nav h1{min-width:0}.rta{width:100%;min-width:0;padding:8px 12px}.budget-table{font-size:13px}.budget-table th,.budget-table td{padding:8px 6px}.budget-table th:nth-child(3),.budget-table td:nth-child(3){display:none}.budget-table th:not(:first-child),.budget-table td:not(:first-child){width:auto}.cat-name{padding-left:10px!important}.money-input{width:104px;padding:6px 4px}.pill{min-width:0;padding:2px 8px;font-size:12px}.cat-target .target-bar{width:56px}.group-row .link-btn{display:none}.inspector{position:static}.inspector.has-selection{z-index:70;max-height:85dvh;padding-bottom:calc(env(safe-area-inset-bottom) + 16px);border:none;border-radius:16px 16px 0 0;position:fixed;inset:auto 0 0;overflow-y:auto;box-shadow:0 -10px 40px #0a0c1e40}.inspector.has-selection:before{content:"";background:var(--border);border-radius:4px;width:40px;height:4px;margin:-6px auto 6px;display:block}.sheet-backdrop{z-index:65;background:#0a0c1e59;display:block;position:fixed;inset:0}.account-header{flex-direction:column;align-items:stretch;gap:8px}.balances{justify-content:space-between;gap:6px}.balances .money{font-size:14px}.balances .working .money{font-size:16px}.dialog{width:calc(100vw - 24px);padding:18px}.register.payees th:nth-child(3),.register.payees td:nth-child(3),.register.payees th:nth-child(4),.register.payees td:nth-child(4){display:none}.register.payees td,.register.payees th{padding:6px 8px}.search{width:100%;min-width:0}}.register.mobile,.register.mobile tbody{display:block}.register.mobile thead{display:none}.register.mobile tr{border-bottom:1px solid var(--border);display:grid}.register.mobile td,.register.mobile th{border:none;min-width:0;padding:2px 12px}.register.mobile .section-row,.register.mobile .add-row,.register.mobile .section-row th{display:block}.register.mobile .add-row td{padding:10px 12px;display:block}.register.mobile .tx-row{grid-template-columns:minmax(0,1fr) auto 36px;grid-template-areas:"payee amount clr""date category del";padding:8px 0}.register.mobile .tx-row [data-field=payee]{grid-area:payee;font-size:14px;font-weight:600}.register.mobile .tx-row [data-field=outflow],.register.mobile .tx-row [data-field=inflow]{text-align:right;grid-area:amount;font-weight:600}.register.mobile .tx-row [data-field=inflow] .money{color:#1d7a3a}.register.mobile .tx-row [data-field=inflow] .money:before{content:"+"}.register.mobile .tx-row [data-field=date]{color:var(--muted);grid-area:date;font-size:12px}.register.mobile .tx-row [data-field=category]{text-align:right;color:var(--muted);grid-area:category;font-size:12px}.register.mobile .tx-row .c-clr{grid-area:clr;justify-self:center}.register.mobile .tx-row .c-del{grid-area:del;justify-self:center}.register.mobile .tx-row.schedule{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"payee amount""date category""sactions sactions"}.register.mobile .tx-row .c-sactions{grid-area:sactions}.register.mobile .tx-row .c-sactions .row-actions{justify-content:flex-start;gap:6px}.register.mobile .tx-row .c-sactions .link-btn{padding:4px 8px;font-size:14px}.register.mobile .new-row,.register.mobile .edit-row{grid-template-columns:1fr 1fr;grid-template-areas:"date date""payee payee""cat cat""out in""actions actions";gap:6px 0;padding:10px 0}.register.mobile .c-date{grid-area:date}.register.mobile .c-payee{grid-area:payee}.register.mobile .c-cat{grid-area:cat}.register.mobile .c-out{grid-area:out;padding-right:4px}.register.mobile .c-in{grid-area:in;padding-left:4px}.register.mobile .c-actions{grid-area:actions}.register.mobile .c-actions .row-actions .btn{flex:1;padding:10px;font-size:15px}.register.mobile .date-cell{grid-template-columns:1fr 1fr;gap:6px;min-width:0;display:grid}.register.mobile .date-cell .stack-top{grid-column:1/-1;margin:0}.register.mobile .date-cell .repeat{margin-top:0}.register.mobile .date-cell .date-note{grid-column:1/-1}.register.mobile .new-row td,.register.mobile .edit-row td{padding:0 12px}.register.mobile .edit-row td{border:none!important}.gate{background:var(--sidebar-bg);place-items:center;min-height:100dvh;padding:24px 16px;display:grid}.gate-card{background:var(--surface);border-radius:14px;flex-direction:column;gap:12px;width:100%;max-width:400px;padding:24px;display:flex;box-shadow:0 20px 60px #0000004d}.gate-card h2{margin:4px 0 0}.gate-card p{margin:0}.gate-brand{align-items:center;gap:12px;margin-bottom:4px;display:flex}.gate-title{font-size:18px;font-weight:750}.google-btn{padding:11px;font-size:15px}.btn.block+.btn.block{margin-top:0}code{background:var(--group-bg);border-radius:4px;padding:1px 4px;font-size:12px}.side-footer{border-top:1px solid #ffffff14;flex-direction:column;align-items:flex-start;gap:6px;margin-top:auto;padding:12px 6px 0;display:flex}.side-signout{color:var(--sidebar-muted);padding:0 4px;font-size:12px}.sync-badge{color:var(--sidebar-fg);cursor:default;background:0 0;border:none;border-radius:6px;align-items:center;gap:7px;padding:4px;font-size:12px;display:inline-flex}.sync-badge:not(:disabled){cursor:pointer;text-underline-offset:2px;text-decoration:underline}.sync-badge .dot{background:#4cc26a;border-radius:50%;flex:none;width:8px;height:8px}.sync-badge.busy .dot{background:#f5c451}.sync-badge.warn .dot{background:#ff8a7a}.sync-badge.compact{padding:8px}.mobile-sync{margin-left:auto}.modal-backdrop{z-index:100;background:#0a0c1e80;place-items:center;padding:16px;display:grid;position:fixed;inset:0}.modal{background:var(--surface);border-radius:12px;flex-direction:column;gap:10px;width:100%;max-width:420px;padding:20px;display:flex}.modal h2{margin:0}.modal p{margin:0 0 4px}.muted-on-primary{opacity:.8;font-weight:400}
