:root{--bg: #f6f7fb;--surface: #ffffff;--border: #e4e7ee;--text: #1c2333;--text-muted: #7a8299;--accent: #3554d1;--accent-soft: #eaeefc;--green: #1e9e6a;--red: #d64545;--red-soft: #fdecec;--amber: #c47a12;--amber-soft: #fff6e6;--radius: 10px;--budget-label-col: 210px;font-family:Inter,system-ui,-apple-system,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-size:14px;overflow-x:clip}button{font-family:inherit;cursor:pointer}input{font-family:inherit;font-size:14px}.page-loading{display:grid;place-items:center;min-height:60vh;color:var(--text-muted)}.btn{border:none;border-radius:8px;padding:9px 16px;font-size:14px;font-weight:600}.btn-primary{background:var(--accent);color:#fff}.btn-primary:hover{background:#2a44b8}.btn-primary:disabled{opacity:.6;cursor:default}.btn-ghost{background:transparent;color:var(--text-muted)}.btn-ghost:hover{color:var(--text);background:var(--border)}.btn-danger{background:var(--red);color:#fff}.btn-danger:hover{background:#b93838}.btn-danger:disabled{opacity:.6;cursor:default}.auth-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(160deg,#eef1fb,#f6f7fb 60%);padding:24px}.auth-card{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:36px;width:100%;max-width:400px;box-shadow:0 20px 50px #1c233314}.auth-brand{text-align:center;margin-bottom:24px}.auth-logo-img{display:block;width:min(220px,70%);height:auto;margin:0 auto 12px}.auth-tagline{color:var(--text-muted);margin:0;font-size:13px}.auth-tabs{display:flex;background:var(--bg);border-radius:10px;padding:4px;margin-bottom:20px}.auth-tabs button{flex:1;border:none;background:transparent;padding:8px;border-radius:8px;font-weight:600;color:var(--text-muted)}.auth-tabs button.active{background:var(--surface);color:var(--text);box-shadow:0 1px 4px #1c23331a}.auth-form{display:flex;flex-direction:column;gap:14px}.auth-form label{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:13px}.auth-form input,.modal-field input{border:1px solid var(--border);border-radius:8px;padding:10px 12px;outline:none}.auth-form input:focus,.modal-field input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.auth-error{background:var(--red-soft);color:var(--red);border-radius:8px;padding:10px 12px;font-size:13px}.auth-demo-hint{margin:20px 0 0;text-align:center;color:var(--text-muted);font-size:12px}.app{max-width:1600px;margin:0 auto;padding:0 20px 24px}.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:24px;padding:14px 0;border-bottom:1px solid var(--border);margin-bottom:20px;background:var(--bg);flex-wrap:wrap}.brand{display:flex;align-items:center}.brand-logo-img{display:block;height:22px;width:auto}.year-tabs{display:flex;gap:6px;flex:1;flex-wrap:wrap}.year-tab{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--border);background:var(--surface);border-radius:8px;padding:7px 14px;font-weight:600;color:var(--text-muted)}.year-tab.active{background:var(--accent);border-color:var(--accent);color:#fff}.year-lock{width:12px;height:12px;flex-shrink:0;opacity:.85}.year-tab-remove{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-left:2px;border-radius:4px;font-size:14px;font-weight:700;line-height:1;color:inherit;opacity:.55}.year-tab-remove:hover{opacity:1;background:#1c23331a}.year-tab.active .year-tab-remove:hover{background:#ffffff38}.year-tab-new{border-style:dashed}.user-menu{display:flex;align-items:center;gap:8px;flex-shrink:0;position:relative;z-index:2;margin-left:auto}.user-name{font-weight:600;color:var(--text-muted)}.user-name-btn{font-weight:600;color:var(--text-muted);text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px}.user-name-btn:hover{color:var(--accent);text-decoration-color:var(--accent)}.settings-page{display:grid;grid-template-columns:240px minmax(0,1fr);gap:28px;max-width:960px;margin:28px auto 48px;padding:0 20px;align-items:start}.settings-nav h1{margin:0 0 16px;font-size:22px}.settings-menu{display:flex;flex-direction:column;gap:4px}.settings-menu-item{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;text-align:left;border:1px solid transparent;background:transparent;border-radius:10px;padding:10px 12px;color:var(--text)}.settings-menu-item:hover{background:#3554d10d}.settings-menu-item.active{background:var(--accent-soft);border-color:#3554d11f}.settings-menu-label{font-size:14px;font-weight:700}.settings-menu-desc{font-size:12px;color:var(--text-muted);font-weight:500;line-height:1.35}.settings-main-header{margin-bottom:16px}.settings-main-header h2{margin:0 0 4px;font-size:20px}.settings-main-header p{margin:0;color:var(--text-muted);font-size:13px}.settings-card-title{margin:0 0 14px;font-size:14px;font-weight:700}.profile-section-lead{margin:0 0 14px;font-size:13px;color:var(--text-muted);font-weight:500}@media(max-width:720px){.settings-page{grid-template-columns:1fr;gap:18px}.settings-menu{flex-direction:row;flex-wrap:wrap}.settings-menu-item{flex:1 1 140px}.settings-menu-desc{display:none}}.threshold-table-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:8px}.threshold-table{width:100%;border-collapse:collapse;font-size:13px}.threshold-table th,.threshold-table td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--border);vertical-align:middle}.threshold-table th{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--text-muted);background:#f8f9fc}.threshold-table tbody tr:last-child td{border-bottom:none}.threshold-table th:nth-child(2),.threshold-table td:nth-child(2),.threshold-table th:nth-child(3),.threshold-table td:nth-child(3){text-align:right;width:1%;white-space:nowrap}.threshold-name{display:inline-flex;align-items:center;gap:8px;color:var(--text);font-weight:600;font-size:13px}.threshold-input-cell{display:inline-flex;align-items:center;justify-content:flex-end;gap:8px}.threshold-max-label{font-size:11px;font-weight:600;color:var(--text-muted);white-space:nowrap}.threshold-table input{width:13ch;min-width:168px;box-sizing:border-box;border:1px solid var(--border);border-radius:8px;padding:7px 12px;font:inherit;color:var(--text);background:var(--bg);text-align:right;font-variant-numeric:tabular-nums}.threshold-table input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.threshold-preview{color:var(--amber);font-weight:600;font-variant-numeric:tabular-nums}.profile-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:20px 22px 22px;margin-bottom:16px}.profile-card h2{margin:0 0 16px;font-size:15px;font-weight:700}.profile-form{display:flex;flex-direction:column;gap:14px}.profile-form label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;color:var(--text-muted)}.profile-form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.profile-form input{width:100%;box-sizing:border-box;padding:10px 12px;border:1px solid var(--border);border-radius:8px;color:var(--text);background:var(--bg);transition:border-color .15s ease,box-shadow .15s ease}.profile-form input:hover:not(:disabled){border-color:#c8cedc}.profile-form input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);background:var(--surface)}.profile-form input:disabled{background:#eef0f5;color:var(--text-muted);cursor:not-allowed}.profile-form .btn{align-self:flex-start;margin-top:4px}@media(max-width:560px){.profile-form-row{grid-template-columns:1fr}}.profile-ok{color:var(--green);font-size:13px;font-weight:600}.profile-card-danger{border-color:#f0c4c4}.profile-card-danger h2{color:var(--red)}.profile-danger-copy{margin:0 0 14px;color:var(--text-muted);font-size:13px;line-height:1.45}.profile-danger-actions{display:flex;gap:8px;align-items:center}.empty-state{text-align:center;max-width:460px;margin:80px auto;color:var(--text-muted)}.empty-state h2{color:var(--text)}.empty-state .btn{margin-top:12px}.summary-bar{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 28px;margin-bottom:12px;padding:4px 0 14px;border-bottom:1px solid var(--border)}.trends-panel{min-width:1100px;border:1px solid var(--border);border-radius:14px;background:var(--surface);box-shadow:0 1px 2px #1c23330a}.trends-toggle{display:flex;align-items:center;gap:10px;width:100%;padding:10px 14px;border:none;background:transparent;color:var(--text);text-align:left}.trends-toggle:hover{background:var(--bg)}.trends-toggle-label{font-size:13px;font-weight:650;letter-spacing:-.01em}.trends-chevron{margin-left:auto;color:var(--text-muted);font-size:12px}.trends-body{padding:0 0 10px;border-top:1px solid var(--border)}.trends-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:12px 14px 8px}.trends-tabs{display:inline-flex;flex-wrap:wrap;gap:4px;padding:3px;border-radius:8px;background:var(--bg)}.trends-tab{appearance:none;border:none;background:transparent;color:var(--text-muted);font-size:12px;font-weight:600;padding:6px 10px;border-radius:6px}.trends-tab:hover{color:var(--text)}.trends-tab.active{background:var(--surface);color:var(--accent);box-shadow:0 0 0 1px var(--border)}.trends-overlay{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-bottom:8px;padding:0 14px;min-height:30px;box-sizing:border-box}.trends-overlay.is-placeholder{visibility:hidden;pointer-events:none}.trends-overlay-label{font-size:12px;color:var(--text-muted);font-weight:500}.trends-year-chips{display:inline-flex;flex-wrap:wrap;gap:6px}.trends-year-chip{appearance:none;border:1px solid var(--border);background:var(--bg);color:var(--text-muted);font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;padding:4px 9px;border-radius:6px}.trends-year-chip:hover:not(:disabled){border-color:var(--accent);color:var(--text)}.trends-year-chip.selected{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}.trends-year-chip:disabled{opacity:.45;cursor:not-allowed}.trends-overlay-note{font-size:11px;color:var(--text-muted)}.trends-loading{font-size:12px;color:var(--text-muted);margin-bottom:6px;padding:0 14px;min-height:18px;box-sizing:border-box}.trends-loading.is-placeholder{visibility:hidden}.trends-chart-slot{min-height:272px}.chart-frame{width:100%;min-height:240px}.aligned-chart{width:100%}.aligned-chart-table{background:transparent}.aligned-chart-table .row-head.aligned-chart-y{vertical-align:top;padding:0 8px 0 14px;font-weight:500;border-bottom:none}.aligned-chart-y-scale{position:relative;width:100%}.aligned-chart-y-tick{position:absolute;right:0;transform:translateY(-50%);font-size:11px;color:var(--text-muted);font-variant-numeric:tabular-nums;white-space:nowrap;line-height:1}.aligned-chart-plot{padding:0!important;vertical-align:top;border-bottom:none!important}.aligned-chart-legend{display:flex;flex-wrap:wrap;align-items:center;gap:12px 16px;padding:4px 14px 0;font-size:12px;color:var(--text-muted);min-height:28px;box-sizing:border-box}.aligned-chart-legend.is-placeholder{visibility:hidden}.aligned-chart-legend-item{display:inline-flex;align-items:center;gap:6px}.aligned-chart-legend-item i{display:block;width:8px;height:8px;border-radius:2px}.month-line-plot,.month-bar-plot{position:relative;width:100%}.month-line-plot-band,.month-bar-plot-band{position:absolute;left:0;right:0}.month-line-plot-svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.month-line-plot-cols{position:absolute;inset:0;display:grid;grid-template-columns:repeat(12,minmax(0,1fr))}.month-line-plot-col,.month-bar-plot-col{position:relative;min-width:0}.month-line-plot-dot-wrap{position:absolute;left:50%;transform:translate(-50%,-50%);z-index:1;cursor:default}.month-line-plot-dot{display:block;width:8px;height:8px;border-radius:50%;border:2px solid;box-sizing:border-box}.month-line-plot-dot.red{width:10px;height:10px}.month-line-plot-labels{position:absolute;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(12,minmax(0,1fr));align-items:center;font-size:12px;color:var(--text-muted);text-align:center}.month-line-plot-tooltip{position:absolute;z-index:3;transform:translate(-50%,calc(-100% - 10px));min-width:120px;padding:8px 10px;border-radius:8px;border:1px solid var(--border);background:var(--surface);box-shadow:0 4px 14px #1c23331f;font-size:12px;pointer-events:none;white-space:nowrap}.month-line-plot-tooltip-label{font-weight:650;margin-bottom:4px;color:var(--text)}.month-line-plot-tooltip-row{display:flex;align-items:center;gap:6px;color:var(--text-muted)}.month-line-plot-tooltip-row i{width:8px;height:8px;border-radius:2px;flex:none}.month-line-plot-tooltip-row strong{margin-left:auto;color:var(--text);font-variant-numeric:tabular-nums;font-weight:650}.month-bar-plot-col{display:flex;align-items:flex-end;justify-content:center;height:100%}.month-bar-pair{display:flex;align-items:flex-end;justify-content:center;gap:3px;width:70%;max-width:36px;height:100%}.month-bar-stack{display:flex;flex-direction:column;justify-content:flex-end;width:45%;height:100%}.month-bar{width:100%;min-height:0;border-radius:3px 3px 0 0}.month-bar.income{width:45%;background:#1e9e6a}.month-bar.general{background:#9aa3b5;border-radius:0}.month-bar.major{background:#d64545;border-radius:3px 3px 0 0}.month-bar-stack .month-bar.general:last-child{border-radius:0}.month-bar-tooltip{left:50%;bottom:100%;top:auto;transform:translate(-50%,-8px)}.trends-caption{margin:6px 0 0;padding:0 14px;font-size:12px;color:var(--text-muted);line-height:1.4;min-height:2.8em}.summary-stat{display:inline-flex;align-items:baseline;gap:8px;min-width:0}.summary-primary .summary-value{color:var(--accent)}.summary-warning .summary-value{color:var(--amber, #c47a12)}.summary-label{font-size:12px;color:var(--text-muted);font-weight:500}.summary-value{font-size:15px;font-weight:700;letter-spacing:-.01em}.summary-opening-edit{appearance:none;border:none;background:transparent;padding:0;margin:0;font-size:15px;font-weight:700;letter-spacing:-.01em;font-family:inherit;color:inherit;cursor:pointer;border-bottom:1px dashed transparent}.summary-opening-edit:hover{border-bottom-color:var(--text-muted)}.money-input{display:inline-flex;align-items:center;gap:4px;min-width:0;width:100%;box-sizing:border-box}.money-input-currency{flex:none;color:var(--text-muted);font-weight:600;font-variant-numeric:tabular-nums;line-height:1}.money-input input{flex:1 1 auto;min-width:0;width:100%;box-sizing:border-box;border:1px solid var(--border);border-radius:8px;padding:7px 10px;font:inherit;color:var(--text);background:var(--bg);outline:none;font-variant-numeric:tabular-nums}.money-input input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.summary-opening-money{width:auto}.summary-opening-money input{width:7.5rem;border:1px solid var(--accent);border-radius:6px;padding:2px 6px;font-size:15px;font-weight:700;box-shadow:none}.summary-opening-money input:focus{box-shadow:none}.summary-opening-money .money-input-currency{font-size:15px;font-weight:700;color:var(--text)}.threshold-money{width:auto}.threshold-money input{width:13ch;min-width:120px;text-align:right}.summary-error,.summary-value.neg{color:var(--red)}.summary-note{font-size:12px;color:var(--text-muted)}.grid-toolbar{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-bottom:10px;flex-wrap:wrap}.scenario-controls{display:inline-flex;align-items:center;gap:6px;margin-right:auto}.select-menu{position:relative;display:inline-flex;align-items:stretch;min-width:0}.select-menu.is-full{display:flex;width:100%}.select-menu-trigger{display:inline-flex;align-items:center;gap:0;width:100%;min-width:0;border:1px solid var(--border);background:var(--surface);border-radius:8px;color:var(--text);padding:0;margin:0;font:inherit;cursor:pointer;transition:border-color .12s ease,background .12s ease,color .12s ease,box-shadow .12s ease}.profile-form .select-menu-trigger{background:var(--bg);padding-top:1px;padding-bottom:1px}.select-menu:hover .select-menu-trigger,.select-menu.is-open .select-menu-trigger{border-color:color-mix(in srgb,var(--accent) 35%,var(--border))}.select-menu.is-open .select-menu-trigger{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);background:var(--surface)}.select-menu.is-accent .select-menu-trigger{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 45%,var(--border));color:var(--accent)}.select-menu-leading,.select-menu-chevron{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;pointer-events:none;color:var(--text-muted)}.select-menu.is-accent .select-menu-leading,.select-menu.is-accent .select-menu-chevron{color:var(--accent)}.select-menu-leading{padding-left:10px}.select-menu-chevron{padding-right:10px;transition:transform .12s ease}.select-menu.is-open .select-menu-chevron{transform:rotate(180deg)}.select-menu-leading svg,.select-menu-chevron svg{width:14px;height:14px;display:block}.select-menu-value{flex:1;min-width:0;font-size:13px;font-weight:600;line-height:1.2;padding:9px 8px 9px 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;color:inherit}.select-menu.is-compact .select-menu-value{padding:7px 6px 7px 8px;min-width:7.5rem;max-width:14rem;flex:0 1 auto;color:var(--text-muted)}.select-menu.is-compact.is-accent .select-menu-value,.select-menu.is-compact.is-open .select-menu-value{color:inherit}.select-menu.is-compact .select-menu-leading{padding-left:10px}.select-menu.is-compact .select-menu-chevron{padding-right:8px}.select-menu-list{position:absolute;top:calc(100% + 6px);left:0;z-index:40;min-width:max(100%,12rem);max-width:min(22rem,90vw);margin:0;padding:6px;list-style:none;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:0 10px 28px #1c23331f,0 2px 6px #1c23330f}.select-menu-option{display:flex;align-items:center;gap:8px;width:100%;border:none;background:transparent;border-radius:7px;padding:8px 10px;margin:0;font:inherit;font-size:13px;font-weight:600;color:var(--text);text-align:left;cursor:pointer}.select-menu-option:hover{background:var(--bg)}.select-menu-option.is-selected{background:var(--accent-soft);color:var(--accent)}.select-menu-check{width:12px;flex-shrink:0;font-size:12px;line-height:1;text-align:center}.select-menu-empty{padding:8px 10px;font-size:12px;color:var(--text-muted)}.scenario-save-btn{padding:7px 10px;font-size:13px}.scenario-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:0 0 12px;padding:10px 14px;border:1px solid var(--border, #d8d4cc);border-radius:8px;background:color-mix(in srgb,var(--accent, #2f6fed) 8%,transparent)}.scenario-banner-text{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;min-width:0}.scenario-banner-label{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--text-muted)}.scenario-banner-hint{font-size:13px;color:var(--text-muted)}.scenario-banner-actions{display:inline-flex;align-items:center;gap:6px}.modal-lead{margin:0 0 14px;font-size:14px;color:var(--text-muted);line-height:1.4}.form-error{margin:0 0 10px;font-size:13px;color:var(--red)}.history-controls{display:inline-flex;align-items:center;gap:4px}.history-btn{display:inline-flex;align-items:center;gap:6px;padding-inline:8px}.history-btn:disabled{opacity:.45;cursor:default}.history-icon{width:14px;height:14px;flex-shrink:0}.history-count{min-width:1.25em;font-variant-numeric:tabular-nums;font-size:11px;font-weight:700;color:var(--text-muted)}.history-btn:disabled .history-count{color:inherit}.edit-mode-switch{display:inline-flex;align-items:center;gap:5px;cursor:pointer;-webkit-user-select:none;user-select:none}.edit-mode-switch input{position:absolute;opacity:0;width:0;height:0}.edit-mode-switch .switch-label{font-size:12px;font-weight:600;color:var(--text-muted)}.edit-mode-switch input:checked+.switch-track{background:var(--accent)}.edit-mode-switch input:checked+.switch-track .switch-thumb{transform:translate(8px)}.edit-mode-switch input:checked~.switch-label{color:var(--accent)}.edit-mode-switch input:focus-visible+.switch-track{outline:2px solid var(--accent);outline-offset:2px}.budget-board{display:flex;flex-direction:column;gap:14px}.budget-board-scroll{display:flex;flex-direction:column;gap:14px;overflow-x:auto}.budget-card{border:1px solid var(--border);border-radius:14px;overflow:hidden;box-shadow:0 1px 2px #1c23330a;min-width:1100px}.budget-card-neutral{background:#fff;border-color:#e6e9f0}.budget-card-income{background:#f3faf5;border-color:#d7eadc}.budget-card-expenses{background:#fdf6f6;border-color:#eddede}.budget-card-balance{background:#f3f6fc;border-color:#d9e2f2}.grid{border-collapse:collapse;width:100%;table-layout:fixed}.grid .col-label{width:var(--budget-label-col, 210px)}.grid .col-month{width:calc((100% - var(--budget-label-col, 210px)) / 12)}.grid th,.grid td{border-bottom:1px solid rgba(28,35,51,.06);padding:0;text-align:center;min-width:0}.grid th:not(.row-head),.grid td:not(.row-head){border-left:1px solid rgba(28,35,51,.07)}.grid th.current,.grid td.current,.grid th.current+th,.grid td.current+td{border-left-color:transparent}.grid tr:last-child>th,.grid tr:last-child>td{border-bottom:none}.grid .row-head{position:sticky;left:0;text-align:left;padding:6px 14px;width:var(--budget-label-col, 210px);min-width:var(--budget-label-col, 210px);max-width:var(--budget-label-col, 210px);min-height:40px;height:auto;font-weight:600;z-index:1;vertical-align:middle;overflow:hidden;box-sizing:border-box}.budget-card-neutral .row-head,.budget-card-neutral .month-head{background:#fff}.budget-card-income .row-head{background:#f3faf5}.budget-card-expenses .row-head{background:#fdf6f6}.budget-card-balance .row-head,.budget-card-balance .month-head{background:#f3f6fc}.month-head{position:relative;padding:8px 6px 18px;height:52px;box-sizing:border-box;vertical-align:middle;text-align:center}.month-head .month-name{display:block;font-weight:700;font-size:13px;letter-spacing:.04em;line-height:18px;min-height:18px;text-align:center;text-transform:uppercase;color:var(--text-muted)}.month-head.current .month-name{color:var(--accent)}.month-head.red .month-name{color:var(--red)}.month-head.red{background:#fdecec}.month-head.current.red .month-name{color:var(--red)}.month-state{position:static;left:auto;bottom:auto;transform:none;display:inline-flex;align-items:center;justify-content:center;gap:5px;height:12px;font-size:9px;text-transform:uppercase;letter-spacing:.06em;font-weight:700}.month-state.closed{color:var(--green)}.month-state.open{color:var(--text-muted)}.month-foot{position:absolute;left:50%;bottom:2px;transform:translate(-50%);display:inline-flex;align-items:center;justify-content:center;gap:4px;height:12px;white-space:nowrap}.close-switch{position:static;left:auto;bottom:auto;transform:none;display:inline-flex;align-items:center;justify-content:center;gap:4px;height:12px;cursor:pointer;-webkit-user-select:none;user-select:none}.close-switch input{position:absolute;opacity:0;width:0;height:0}.switch-track{position:relative;width:20px;height:12px;border-radius:999px;background:#c6cddd;transition:background .15s ease;flex:none}.switch-thumb{position:absolute;top:2px;left:2px;width:8px;height:8px;border-radius:50%;background:#fff;transition:transform .15s ease}.close-switch input:checked+.switch-track{background:var(--green)}.close-switch input:checked+.switch-track .switch-thumb{transform:translate(8px)}.close-switch input:focus-visible+.switch-track{box-shadow:0 0 0 2px var(--accent-soft)}.switch-label{font-size:9px;text-transform:uppercase;letter-spacing:.06em;font-weight:700;color:var(--text-muted)}.close-switch input:checked~.switch-label{color:var(--green)}.grid td.current,.grid th.current{background:#fff!important;position:relative;z-index:4;box-shadow:inset 1.5px 0 0 0 var(--accent),inset -1.5px 0 0 0 var(--accent),0 8px 22px #3554d124}.budget-card-balance thead th.current{box-shadow:inset 1.5px 0 0 0 var(--accent),inset -1.5px 0 0 0 var(--accent),inset 0 1.5px 0 0 var(--accent),0 8px 22px #3554d124}.budget-card-expenses tbody tr:last-child td.current{box-shadow:inset 1.5px 0 0 0 var(--accent),inset -1.5px 0 0 0 var(--accent),inset 0 -1.5px 0 0 var(--accent),0 8px 22px #3554d124}.grid td.current:has(>.cell-editable):hover{background:#f5f7ff!important}.section-title-row .section-title{position:relative;height:40px;padding:0 14px;font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;border-bottom:1px solid rgba(28,35,51,.06)}.section-title-row .section-title-total{border-bottom:1px solid rgba(28,35,51,.06);height:40px;font-weight:800}.section-title-row .section-title-total.current{background:#fff!important}.section-title-row .section-title-total .cell{height:40px}.section-title-label{display:inline-flex;align-items:center;gap:8px}.section-title-icon{font-size:12px;line-height:1}.section-title-income .section-title,.section-title-income .section-title-icon,.section-title-income .section-title-total .cell-value{color:#1e9e6a}.section-title-expenses .section-title,.section-title-expenses .section-title-icon,.section-title-expenses .section-title-total .cell-value{color:#d64545}.section-title-balance .section-title,.section-title-balance .section-title-icon{color:#3554d1}.row-sub{display:block;font-size:10px;font-weight:500;color:var(--text-muted);letter-spacing:0;text-transform:none;line-height:1.2}.add-row-btn,.add-row-btn-inline{border:none;background:transparent;color:var(--accent);font-weight:700;font-size:12px;padding:0}.add-category-row .row-head{height:32px}.cell{height:40px;padding:3px 8px;display:flex;flex-direction:column;align-items:center;justify-content:center}.grid td:has(>.cell-editable):hover{background:#3554d10f;cursor:text}.cell-editable{cursor:text}.cell-has-fill{position:relative}.cell-fill-btn{position:absolute;top:1px;right:1px;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:4px;background:#ffffffeb;color:var(--text-muted);opacity:0;cursor:pointer;z-index:1}.cell-has-fill:hover .cell-fill-btn,.cell-fill-btn:focus-visible{opacity:1}.cell-fill-btn:hover{color:var(--accent);background:#fff;box-shadow:0 0 0 1px #3554d140}.cell-fill-btn:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.cell-fill-btn:disabled{cursor:wait}.cell-has-fill:hover .cell-fill-btn:disabled,.cell-fill-btn:disabled:focus-visible{opacity:.55}.cell-fill-icon{width:14px;height:14px;display:block}.cell-disabled{width:100%;box-sizing:border-box;cursor:default}.cell-editing .money-input{width:100%;height:22px;border:1px solid var(--accent);border-radius:6px;padding:0 4px;background:#fff;box-sizing:border-box}.cell-editing .money-input-currency{font-size:11px}.cell-editing .money-input input{height:20px;border:none;border-radius:0;padding:0 2px;background:transparent;text-align:center;box-shadow:none;font-size:13px}.cell-editing .money-input input:focus{border:none;box-shadow:none}.cell-editing input{width:100%;min-width:0;box-sizing:border-box;height:22px;border:1px solid var(--accent);border-radius:6px;padding:0 6px;text-align:center;outline:none}.cell-value{height:22px;line-height:22px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums;font-size:13px}.cell-empty{color:#c3c9d6;font-size:12px}.projected-mark{margin-left:1px;font-size:11px;font-weight:700;color:var(--text-muted)}.derived{color:#8b6b6b;font-weight:600}.balance-row td,.balance-row .row-head{font-weight:800}.balance-row .row-head,.balance-row .cell-value{color:#3554d1}.balance.red .cell-value{color:var(--red)}.grid th.closed-col,.grid td.closed-col{background:#1c233309}.budget-card-income td.closed-col,.budget-card-income th.closed-col{background:#1e9e6a0f}.budget-card-expenses td.closed-col{background:#d645450d}.budget-card-balance td.closed-col{background:#3554d10d}.grid td.closed-col:has(>.cell-editable):hover{background:#1c233312}.grid th.current,.grid td.current,.budget-card-income td.current.closed-col,.budget-card-income th.current.closed-col,.budget-card-expenses td.current.closed-col,.budget-card-balance td.current.closed-col{background:#fff!important}.grid th.month-head.current.red{background:#fdecec!important}.grid td:has(>.cell-disabled){background:#dde3ee}.budget-card-income td:has(>.cell-disabled){background:#d5efdf}.budget-card-expenses td:has(>.cell-disabled){background:#f3dede}.budget-card-balance td:has(>.cell-disabled){background:#d9e1f8}.budget-card-balance td:has(>.cell-disabled.balance.red){background:#f8d4d4}.budget-card-balance td:has(>.below-threshold){background:var(--amber-soft)}.budget-card-balance .below-threshold .cell-value{color:var(--amber);font-weight:700}.grid td.current:has(>.cell-disabled){background:#dde3ee!important}.budget-card-income td.current:has(>.cell-disabled){background:#d5efdf!important}.budget-card-expenses td.current:has(>.cell-disabled){background:#f3dede!important}.budget-card-balance td.current:has(>.cell-disabled){background:#d9e1f8!important}.budget-card-balance td.current:has(>.cell-disabled.balance.red){background:#f8d4d4!important}.budget-card-balance td.current:has(>.below-threshold){background:var(--amber-soft)!important}.row-name{cursor:default}.row-actions{position:absolute;right:4px;top:50%;transform:translateY(-50%);opacity:0;background:inherit;padding-left:4px}.row-head:hover .row-actions{opacity:1}.row-actions button{border:none;background:transparent;color:var(--text-muted);font-size:12px;padding:1px 3px;line-height:1}.row-actions button:hover{color:var(--text)}.row-actions button:disabled{opacity:.35;cursor:default}.archived-strip{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:4px 0}.archived-strip-label{font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted)}.archived-strip-item{appearance:none;border:1px solid var(--border);background:var(--bg);border-radius:999px;padding:2px 8px;font-size:11px;color:var(--text-muted);cursor:pointer;display:inline-flex;align-items:center;gap:4px}.archived-strip-item:hover{color:var(--text);border-color:#c8cedc}.archived-row .row-name{color:var(--text-muted)}.archived-badge{margin-left:6px;font-size:10px;background:var(--border);border-radius:4px;padding:1px 5px;color:var(--text-muted);font-weight:600}.default-badge{margin-left:6px;font-size:10px;background:var(--accent-soft);border-radius:4px;padding:1px 5px;color:var(--accent);font-weight:700;text-transform:uppercase;letter-spacing:.04em}.new-row-input{width:100%;border:1px solid var(--accent);border-radius:6px;padding:5px 8px;outline:none}.modal-backdrop{position:fixed;inset:0;background:#1c233373;display:grid;place-items:center;z-index:20}.modal{background:var(--surface);border-radius:14px;padding:28px;width:100%;max-width:420px;box-shadow:0 30px 70px #1c233340}.modal h2{margin:0 0 18px}.mode-switch{display:flex;background:var(--bg);border-radius:10px;padding:4px;margin-bottom:16px}.mode-switch button{flex:1;border:none;background:transparent;padding:8px;border-radius:8px;font-weight:600;color:var(--text-muted)}.mode-switch button.active{background:var(--surface);color:var(--text);box-shadow:0 1px 4px #1c23331a}.modal-field{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:13px;margin-bottom:14px}.modal-hint{color:var(--text-muted);font-size:12px;margin:0 0 14px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:8px}.modal-actions-stack{flex-direction:column;align-items:stretch}.modal-actions-stack .btn{width:100%;justify-content:center}.lock-modal{max-width:480px}.lock-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:12px 0 18px;padding:12px;background:var(--bg);border-radius:10px}.lock-summary>div{display:flex;flex-direction:column;gap:4px;font-variant-numeric:tabular-nums}.lock-label{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted);font-weight:600}.lock-balances{display:flex;flex-direction:column;gap:10px}.lock-total,.lock-general{display:flex;justify-content:space-between;align-items:baseline;margin-top:14px;padding-top:12px;border-top:1px solid var(--border);font-variant-numeric:tabular-nums}.lock-general{flex-direction:column;align-items:flex-start;gap:4px}.lock-general .neg{color:var(--red)}.month-correct-btn{appearance:none;border:none;background:transparent;padding:0;margin:0;display:inline-flex;align-items:center;justify-content:center;width:12px;height:12px;color:var(--text-muted);cursor:pointer;border-radius:3px;flex:none}.month-correct-btn:hover{color:var(--accent)}.month-correct-btn:focus-visible{outline:1px solid var(--accent);outline-offset:1px}.month-correct-icon{width:10px;height:10px;display:block}.correct-backdrop{position:fixed;inset:0;background:#1c233347;z-index:20}.correct-popover{--correct-label-col: 240px;background:var(--bg);border-radius:12px;padding:14px 14px 12px;width:min(480px,calc(100vw - 24px));max-height:calc(100vh - 32px);display:flex;flex-direction:column;box-shadow:0 18px 48px #1c233338;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);gap:10px}.correct-header h2{margin:0;font-size:1.05rem;flex:none}.correct-body{overflow-y:auto;overflow-x:hidden;flex:1 1 auto;min-height:0;overscroll-behavior:contain}.correct-board{display:flex;flex-direction:column;gap:8px}.correct-card.budget-card{margin:0;min-width:0;overflow:visible}.correct-grid{width:100%;table-layout:fixed}.correct-card.budget-card-balance th.closed-col{background:#3554d10d}.correct-card.budget-card-expenses th.closed-col,.correct-card.budget-card-expenses .section-title-total.closed-col{background:#d645450d}.correct-card.budget-card-income .section-title-total.closed-col{background:#1e9e6a0f}.correct-col-label{width:var(--correct-label-col)}.correct-col-value{width:calc(100% - var(--correct-label-col))}.correct-grid .row-head{width:var(--correct-label-col);min-width:var(--correct-label-col);max-width:var(--correct-label-col);position:static;overflow:visible;white-space:normal;word-break:break-word;line-height:1.25}.correct-grid .row-name{display:inline;white-space:normal}.correct-grid .month-head{height:44px;padding-bottom:16px}.correct-grid .derived.neg{color:var(--red)}.correct-impact{padding-top:2px;flex:none}.correct-cascade{margin:0;font-size:12px;color:var(--text-muted)}.correct-popover .modal-actions{margin-top:0;flex:none}@media(max-width:640px){.correct-popover{--correct-label-col: min(180px, 48vw);inset:16px 12px;width:auto;max-height:none;height:auto;transform:none}}
