.budget-workspace{display:grid;gap:18px;min-width:0}.budget-toolbar{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.budget-toolbar label{display:grid;gap:5px}.budget-toolbar input,.budget-toolbar select{max-width:210px}.budget-summary{display:grid;grid-template-columns:1fr 1fr;gap:30px;padding:28px!important;border-top:3px solid var(--accent)!important}.budget-kicker{font-size:.78rem;letter-spacing:.12em;color:var(--muted)}.budget-summary h2{font-size:clamp(1.9rem,4vw,3.1rem);margin:10px 0;line-height:1.2}.budget-numbers{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;align-items:center}.budget-numbers div{display:grid;gap:9px}.budget-numbers strong{font-size:1.2rem}.budget-numbers span,.budget-caption,.budget-entries small{color:var(--muted)}.budget-columns{display:grid;grid-template-columns:minmax(260px,.8fr) minmax(0,1.5fr);gap:18px}.budget-section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.budget-categories{display:grid;gap:20px}.budget-categories article>div{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap}.budget-workspace progress{display:block;width:100%;height:8px;accent-color:var(--accent);margin:10px 0 0}.budget-over{color:var(--text);font-weight:800;text-decoration:underline;text-decoration-color:var(--accent);text-underline-offset:5px}.budget-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:14px 0}.budget-tabs button{padding:8px 12px;border:1px solid var(--line);background:var(--panel);color:var(--text);font:inherit;cursor:pointer}.budget-tabs [aria-pressed=true]{border-color:var(--accent);box-shadow:inset 0 -3px var(--accent)}.budget-entries article{display:flex;justify-content:space-between;gap:15px;border-bottom:1px solid var(--line);padding:16px 0}.budget-entries article>div{display:grid;gap:5px;min-width:0;overflow-wrap:anywhere}.budget-entries article>div:last-child{text-align:right;justify-items:end;flex-shrink:0}.budget-source{font-size:.85rem;text-decoration:underline;color:var(--text)}.budget-help summary{cursor:pointer;font-weight:700}.budget-dialog{width:min(640px,calc(100vw - 24px));max-height:90dvh;padding:0;background:var(--panel);color:var(--text);border:1px solid var(--line);overflow:hidden}.budget-dialog::backdrop{background:#0009;backdrop-filter:blur(4px)}.budget-dialog form{display:flex;flex-direction:column;max-height:inherit}.budget-dialog header,.budget-dialog footer{padding:16px;display:flex;justify-content:space-between;align-items:center;gap:12px;flex-shrink:0}.budget-dialog header h2{margin:0;font-size:1.3rem}.budget-dialog header button,.budget-limit-row button{font:inherit;color:var(--text);background:transparent;border:1px solid var(--line);min-width:36px;min-height:36px;cursor:pointer}.budget-dialog-body{padding:16px;overflow:auto;overscroll-behavior:contain;display:grid;gap:14px;min-height:0}.budget-dialog label{display:grid;gap:6px}.budget-dialog input,.budget-dialog select,.budget-dialog textarea{width:100%;min-width:0;font-size:16px;box-sizing:border-box}.budget-form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.budget-dialog [role=alert]{margin:0}.budget-limit-row{display:grid;grid-template-columns:1fr 120px 36px;gap:8px;margin:8px 0}.budget-dialog .budget-delete{display:flex;align-items:center}.budget-delete input{width:auto}.budget-dialog input[type=checkbox]{accent-color:var(--accent)}
@media(max-width:760px){.budget-summary{grid-template-columns:1fr;padding:18px!important;gap:15px}.budget-numbers{gap:8px}.budget-numbers strong{font-size:1rem;overflow-wrap:anywhere}.budget-numbers span{font-size:.83rem}.budget-columns{grid-template-columns:1fr}.budget-toolbar{display:grid;grid-template-columns:1fr 100px;gap:10px}.budget-toolbar label input,.budget-toolbar select{width:100%;max-width:none;box-sizing:border-box}.budget-toolbar button{min-height:44px}.budget-tabs button{flex:1;min-height:44px}.budget-entries article{gap:10px}.budget-entries article>div:last-child{max-width:45%;flex-shrink:1}.budget-dialog{position:fixed;margin:0 auto;left:0;right:0;top:8px;max-height:calc(100dvh - 16px)}.budget-dialog header,.budget-dialog footer{padding:12px}.budget-dialog footer .button{flex:1}.budget-limit-row{grid-template-columns:1fr 95px 36px}.budget-form-row{grid-template-columns:1fr}.budget-dialog header h2{font-size:1.1rem}}
.budget-wallet-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.budget-wallet-grid article{border:1px solid var(--line);padding:14px;display:grid;gap:10px;min-width:0;overflow-wrap:anywhere}.budget-wallet-grid article>div{display:grid;gap:6px}.budget-wallet-grid small{color:var(--muted)}.budget-wallet-grid .button{justify-self:start}.budget-dialog details{min-width:0}.budget-dialog details summary{cursor:pointer;min-height:36px;display:flex;align-items:center}.budget-dialog input[type=checkbox]{flex-shrink:0}.budget-wallets .budget-caption{line-height:1.6}.budget-dialog [data-split-row] input{min-width:0}
@media(max-width:760px){.budget-wallet-grid{grid-template-columns:1fr}.budget-wallet-grid article{grid-template-columns:minmax(0,1fr) auto;align-items:center}.budget-wallet-grid article .button{grid-column:2;grid-row:2}.budget-wallets h2{font-size:1.2rem}.budget-dialog [data-split-row]{grid-template-columns:minmax(0,1fr) 90px 36px}}
.budget-wallets summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;font-weight:700;flex-wrap:wrap}.budget-wallets summary strong{font-size:.95rem}.budget-wallets summary>span{font-size:1.3rem}.budget-wallets[open] summary>span{transform:rotate(180deg)}
.budget-toolbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.budget-tools{position:relative}.budget-tools summary{cursor:pointer;color:var(--text);font-size:.9rem;min-height:44px;display:flex;align-items:center;padding:0 12px;border:1px solid var(--line)}.budget-tools[open]>div{display:grid;gap:6px;padding:10px;border:1px solid var(--line);background:var(--panel);position:absolute;z-index:5;right:0;min-width:190px;box-shadow:0 10px 30px #0005}.budget-dialog [data-split-total]{margin:8px 0}
@media(max-width:760px){.budget-toolbar-actions{grid-column:1/-1;display:grid;grid-template-columns:1.2fr .9fr 1fr;gap:6px}.budget-toolbar-actions>.button{padding:8px 4px;font-size:.85rem}.budget-tools summary{font-size:.85rem;padding:0 7px;justify-content:center;box-sizing:border-box}.budget-tools[open]>div{max-width:calc(100vw - 40px)}}
.budget-plan-numbers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:14px 0}.budget-plan-numbers>div{display:grid;gap:8px;min-width:0}.budget-plan-numbers span{color:var(--muted);font-size:.9rem}.budget-plan-numbers strong{font-size:1.2rem;overflow-wrap:anywhere}.budget-planned>details{border-top:1px solid var(--line);padding-top:12px;margin-top:14px}.budget-planned summary{cursor:pointer;font-weight:700;min-height:40px;line-height:1.6}.budget-planned .budget-entries article>div:last-child{max-width:48%}.budget-planned .budget-entries button{min-height:40px}.budget-tools[open]>div{max-height:55dvh;overflow:auto;overscroll-behavior:contain}
@media(max-width:760px){.budget-plan-numbers{grid-template-columns:1fr;gap:12px}.budget-plan-numbers>div{grid-template-columns:minmax(0,1fr) auto;align-items:center}.budget-plan-numbers strong{font-size:1rem}.budget-planned .budget-entries article{flex-direction:column}.budget-planned .budget-entries article>div:last-child{max-width:none;display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;text-align:left}.budget-planned .budget-entries article>div:last-child>strong{margin-right:auto}.budget-planned .budget-entries .button{min-height:44px}}
@media(max-width:760px){.budget-planned>.budget-caption,.budget-planned .budget-plan-help .budget-caption{font-size:16px;line-height:1.55}.budget-planned .budget-section-title h2{font-size:1.35rem}.budget-plan-help summary{font-size:16px}}

.budget-forecast-numbers{display:grid;grid-template-columns:1fr 1fr;gap:12px}.budget-forecast-numbers p{display:grid;gap:8px;border:1px solid var(--line);padding:12px;margin:0;min-width:0;overflow-wrap:anywhere}.budget-forecast-numbers small{color:var(--muted)}.budget-forecast-day{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}@media(max-width:760px){.budget-forecast-numbers{grid-template-columns:1fr}}
.budget-forecast .budget-dialog-body>p{margin:0}.budget-forecast [data-forecast-result]>p{margin:0 0 12px}.budget-forecast-numbers{margin-bottom:12px}.budget-forecast [data-forecast-result] summary{line-height:1.5}

.budget-receipt-item{border:1px solid var(--line);padding:14px;display:grid;gap:10px;margin:12px 0;min-width:0}.budget-receipt [data-receipt-preview]{display:block;max-width:100%;max-height:220px;object-fit:contain;margin:auto}.budget-receipt [data-receipt-preview][hidden]{display:none}.budget-receipt .budget-dialog-body>p{margin:0}.budget-receipt [data-receipt-summary]{padding:12px;border:1px solid var(--line);line-height:1.6}.budget-receipt [data-receipt-cancel][hidden]{display:none}.budget-receipt input[type=file]{max-width:100%;overflow:hidden}.budget-receipt .budget-delete{line-height:1.5}
.budget-receipt-item-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.budget-receipt-item-heading label{min-width:0;flex:1;overflow-wrap:anywhere}.budget-receipt-item-heading strong{white-space:nowrap}.budget-receipt-item-fields{display:grid;gap:12px;padding-top:10px}.budget-receipt-item summary{font-weight:700;cursor:pointer;min-height:40px;display:flex;align-items:center}.budget-receipt-item-fields>.button{justify-self:start}

/* Receipt review: warnings use words and shape as well as theme colour. */
.budget-receipt-warning:empty{display:none}.budget-receipt-warning{font-size:.9rem;margin:.35rem 0;color:var(--text)}
.budget-receipt-item.needs-review{border-inline-start:4px solid var(--accent,#ffdf32)}
.budget-receipt-allocation{padding:1rem;border:2px solid var(--accent,#ffdf32);border-radius:8px;margin-block:1rem}
.budget-receipt-allocation li{overflow-wrap:anywhere}.budget-receipt-crop{margin-block:1rem}
.budget-receipt [data-receipt-amount][readonly]{opacity:.8}.budget-receipt-item-fields button{margin:.3rem .3rem .3rem 0}

.budget-receipt [aria-invalid="true"]{border:2px solid var(--accent,#ffdf32);outline-offset:2px}

/* Read-only history and reports; all colours follow the active portal theme. */
.budget-reports{display:grid;gap:16px}.budget-reports h3{margin-top:0}.budget-report-filters summary,.budget-reports details>summary{cursor:pointer;font-weight:700;min-height:44px;line-height:1.6}.budget-report-filter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:14px}.budget-report-filter-grid label{display:grid;gap:7px;min-width:0}.budget-report-filter-grid input,.budget-report-filter-grid select{width:100%;min-width:0;box-sizing:border-box;min-height:44px;font:inherit;color:var(--text);background:var(--panel);border:1px solid var(--line);padding:10px}.budget-report-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px}.budget-report-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.budget-report-metrics>div{display:grid;gap:8px;min-width:0}.budget-report-metrics strong{font-size:1.5rem;overflow-wrap:anywhere}.budget-report-metrics small,.budget-report-category small{display:block;color:var(--muted);line-height:1.5}.budget-report-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px}.budget-report-category{display:flex;justify-content:space-between;gap:12px;overflow-wrap:anywhere}.budget-report-category span{min-width:0}.budget-report-category strong{white-space:nowrap}.budget-report-trends{display:grid;gap:12px}.budget-report-trends>div{display:grid;grid-template-columns:75px minmax(50px,1fr) minmax(110px,auto);gap:12px;align-items:center}.budget-report-trends meter{width:100%;height:20px;accent-color:var(--accent,#27c4ee)}.budget-report-trends strong{text-align:right}.budget-report-history .budget-entries small{overflow-wrap:anywhere}.budget-report-history .budget-entries article>div:last-child{max-width:45%}
@media(max-width:760px){.budget-report-filter-grid,.budget-report-columns,.budget-report-metrics{grid-template-columns:1fr}.budget-report-metrics>div{padding-block:8px}.budget-report-metrics strong{font-size:1.35rem}.budget-reports .budget-caption{font-size:16px;line-height:1.55}.budget-report-trends>div{grid-template-columns:65px minmax(30px,1fr) auto;gap:8px;font-size:14px}.budget-report-history .budget-entries article{flex-direction:column;align-items:stretch}.budget-report-history .budget-entries article>div:last-child{max-width:none;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;text-align:left}.budget-report-history .budget-entries button{min-height:44px}.budget-report-history .budget-entries small{font-size:16px}.budget-report-actions{justify-content:space-between}.budget-report-category{flex-wrap:wrap}}

.budget-report-analysis{display:grid;gap:16px}.budget-reports [hidden]{display:none!important}.budget-report-switch{display:flex;gap:10px;flex-wrap:wrap}.budget-report-switch button{min-height:44px}@media(max-width:760px){.budget-report-switch{display:grid;grid-template-columns:1fr 1fr}.budget-report-switch button{font-size:16px;padding:10px;white-space:normal}}

.budget-report-summary,.budget-report-history{scroll-margin-top:90px}@media(max-width:760px){.budget-report-summary .budget-report-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.budget-report-summary .budget-report-metrics>div:last-child{grid-column:1/-1;grid-template-columns:1fr auto;align-items:center}.budget-report-summary .budget-report-metrics strong{font-size:1.2rem}.budget-report-summary .budget-report-metrics small{font-size:14px}}

.budget-report-metrics>div{align-content:start}
.budget-report-trends meter{appearance:none;background:var(--surface-soft,var(--panel));border:1px solid var(--line);border-radius:4px}.budget-report-trends meter::-webkit-meter-bar{background:var(--surface-soft,var(--panel));border:0;border-radius:3px;box-shadow:none}.budget-report-trends meter::-webkit-meter-optimum-value,.budget-report-trends meter::-webkit-meter-suboptimum-value,.budget-report-trends meter::-webkit-meter-even-less-good-value{background:var(--accent);border-radius:3px}.budget-report-trends meter::-moz-meter-bar{background:var(--accent)}.budget-report-trends strong{min-width:0;overflow-wrap:anywhere}@media(max-width:760px){.budget-report-trends>div{grid-template-columns:60px minmax(24px,1fr) minmax(90px,42%)}}

/* Pay-cycle envelope stays compact above the financial summary. */
.budget-period h2{margin:10px 0;font-size:1.4rem;overflow-wrap:anywhere}.budget-period .budget-section-title{align-items:center;gap:12px;flex-wrap:wrap}.budget-period p{margin:8px 0}.budget-period .budget-report-actions{margin:8px 0}.budget-period summary{cursor:pointer;min-height:40px;display:flex;align-items:center}.budget-workspace>.panel>details>summary{cursor:pointer;min-height:40px}.budget-workspace>.panel>details+.button{margin-top:12px}
@media(max-width:760px){.budget-period h2{font-size:1.15rem}.budget-period .budget-section-title>.button{min-height:44px}.budget-period .budget-report-actions{display:grid;grid-template-columns:1fr 1fr}.budget-period .budget-report-actions .button{min-height:44px;font-size:.95rem;white-space:normal}.budget-period p,.budget-period summary{font-size:1rem}.budget-summary h2{overflow-wrap:anywhere}}
@media(max-width:760px){.budget-workspace>.budget-period{padding:16px}.budget-period .budget-section-title{gap:4px}.budget-period .budget-section-title>div{flex:1 1 200px}.budget-period .budget-section-title h2{margin:4px 0}.budget-period .budget-section-title p{margin:4px 0}.budget-period .budget-kicker{font-size:.72rem}.budget-period .budget-section-title>.button{padding:8px 0}.budget-period .budget-report-actions{margin:0;gap:6px}.budget-period details{margin:0}.budget-period summary{min-height:36px}}
.budget-period-history{display:grid;gap:12px;max-height:480px;overflow:auto;padding:12px 0;overscroll-behavior:contain}.budget-period-history article,.budget-period-change,.budget-period-preview{padding:14px;border:1px solid var(--line);min-width:0;overflow-wrap:anywhere}.budget-period-history small{display:block;color:var(--muted);margin-top:6px}.budget-period-history p{margin:8px 0}.budget-period-change{margin:12px 0}.budget-period-management summary,.budget-period-comparison>summary{min-height:44px;cursor:pointer;font-weight:700}.budget-period-comparison summary{display:flex;align-items:center}.budget-period-management .budget-report-actions{flex-wrap:wrap}.budget-period-management .budget-caption{line-height:1.6}
@media(max-width:760px){.budget-period-management .budget-section-title{display:block}.budget-period-management h2{font-size:1.35rem}.budget-period-management .budget-report-actions{display:flex;gap:8px}.budget-period-management .budget-report-actions .button{min-height:44px;flex:1}.budget-period-comparison>summary{font-size:1.05rem}.budget-period-history{max-height:360px}}
.budget-cash-history{display:grid;gap:10px;max-height:350px;overflow:auto;overscroll-behavior:contain}.budget-cash-history article{padding:12px;border:1px solid var(--line);overflow-wrap:anywhere}.budget-cash-history small{display:block;color:var(--muted);margin:6px 0}.finance-cash-dialog [hidden]{display:none!important}.finance-cash-dialog summary{min-height:44px;cursor:pointer}.finance-cash-dialog p{line-height:1.6}

.finance-cash-dialog .budget-dialog-body{align-content:start}.finance-cash-dialog .budget-dialog-body>h3,.finance-cash-dialog .budget-dialog-body>p{margin:0}.finance-cash-dialog .budget-cash-history p{margin:8px 0 0}.finance-cash-dialog [data-cash-editor][open]{display:grid;gap:12px}.finance-cash-dialog summary{display:flex;align-items:center}.finance-cash-dialog .budget-cash-history{margin-top:6px}
.bank-dialog{width:min(860px,calc(100vw - 24px))}.bank-dialog .budget-dialog-body{align-content:start}.bank-dialog .budget-dialog-body>p{margin:0}.bank-dialog [hidden]{display:none!important}.bank-dialog summary{min-height:44px;cursor:pointer;display:flex;align-items:center}.bank-dialog input[type=checkbox]{width:auto}.bank-dialog input[type=file]{max-width:100%;overflow:hidden}.bank-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.bank-actions button{min-height:44px}.bank-row{padding:16px;border:1px solid var(--line);min-width:0;overflow-wrap:anywhere;display:grid;gap:12px;margin:12px 0}.bank-row h3,.bank-row p{margin:0}.bank-row label{min-width:0}.bank-warning{padding:10px;border-left:3px solid var(--accent);color:var(--text);background:var(--surface-soft,var(--panel))}.bank-mapping{display:grid;grid-template-columns:1fr 1fr;gap:12px}.bank-dialog footer{flex-wrap:wrap}.bank-dialog .budget-caption{line-height:1.6}.bank-dialog [data-bank-error]:empty{display:none}.bank-row input,.bank-row select{min-height:44px}.bank-dialog .button{white-space:normal}
@media(min-width:761px){.bank-row[data-bank-row]{grid-template-columns:1fr 1fr}.bank-row[data-bank-row]>h3,.bank-row[data-bank-row]>.bank-warning,.bank-row[data-bank-row]>p,.bank-row[data-bank-row]>details{grid-column:1/-1}}
@media(max-width:760px){.bank-dialog{margin:8px auto;max-height:calc(100dvh - 16px)}.bank-mapping{grid-template-columns:1fr}.bank-dialog .budget-form-row{grid-template-columns:1fr}.bank-dialog footer>.button{flex:1;min-height:44px}.bank-row{padding:12px}.bank-actions{gap:8px}.bank-actions .button{flex:1;font-size:1rem}.bank-dialog h3{font-size:1.15rem}}

.bank-dialog button:disabled{opacity:.5;cursor:not-allowed}
.budget-tools-dialog .budget-dialog-body{align-content:start}.budget-tools-dialog .budget-dialog-body>p,.budget-tools-dialog .budget-dialog-body>h3{margin:0}.budget-tools-dialog [hidden]{display:none!important}.budget-tools-dialog summary,.budget-entry-extra summary{min-height:44px;display:flex;align-items:center;cursor:pointer}.budget-tools-dialog button:disabled{opacity:.5;cursor:not-allowed}.budget-tools-dialog .button{white-space:normal}.budget-tools-dialog input[type=checkbox]{width:auto}.budget-tools-dialog footer{flex-wrap:wrap}.budget-tools-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.budget-tools-actions .button{min-height:44px}.budget-reconcile-history article,.budget-trash-row,.budget-balance-preview{padding:14px;border:1px solid var(--line);overflow-wrap:anywhere;margin:10px 0}.budget-trash-row h3,.budget-reconcile-history p{margin:6px 0}.budget-reconcile-history{max-height:440px;overflow:auto;overscroll-behavior:contain}.budget-reconcile-history small,.budget-trash-row small{color:var(--muted)}.budget-entry-extra[open]{display:grid;gap:12px}.budget-category-mark{display:inline-flex;justify-content:center;align-items:center;width:28px;min-height:28px;border:2px solid var(--line);margin-right:8px;font-size:16px;color:var(--text);background:var(--panel);flex-shrink:0}.budget-category-group{padding:12px;border:1px solid var(--line);display:grid;gap:14px}.budget-category-group h3{margin:0;font-size:1.1rem;overflow-wrap:anywhere}.budget-category-group h3 small{display:block;font:inherit;color:var(--muted);margin:4px 0}.budget-wallet-grid article{flex-wrap:wrap}.budget-wallet-grid article>small{flex:1 1 100%}
@media(max-width:760px){.budget-tools-dialog{margin:0 auto;max-height:calc(100dvh - 16px)}.budget-tools-dialog footer>.button{flex:1;min-height:44px}.budget-tools-actions .button{flex:1;font-size:1rem}.budget-entry-extra label{min-width:0}.budget-category-group{padding:12px}.budget-reconcile-history{max-height:340px}}
.budget-navigation{display:flex;gap:16px;align-items:center;justify-content:space-between;flex-wrap:wrap}.budget-navigation nav{display:flex;gap:6px;flex-wrap:wrap}.budget-navigation nav button{font:inherit;font-weight:700;background:var(--panel);color:var(--text);border:1px solid var(--line);padding:12px 18px;min-height:44px;cursor:pointer}.budget-navigation nav [aria-current=page]{border-color:var(--accent);box-shadow:inset 0 -3px var(--accent)}.budget-privacy-toggle{min-height:44px}.budget-workspace [data-budget-pane][hidden]{display:none!important}.budget-workspace [data-budget-pane]{display:grid;gap:18px;min-width:0}.budget-recent article{display:flex;align-items:start;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--line)}.budget-recent article>div{display:grid;gap:6px;min-width:0;overflow-wrap:anywhere}.budget-recent small{color:var(--muted)}.budget-recent article>strong{white-space:nowrap}.budget-category-overview>summary{cursor:pointer;min-height:44px;font-weight:700}.budget-category-overview .panel{border:0!important;padding:12px 0!important;box-shadow:none!important}.budget-privacy-warning{border-left:3px solid var(--accent);padding:10px;color:var(--text)}
@media(max-width:760px){.budget-navigation{gap:8px}.budget-navigation nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;gap:4px}.budget-navigation nav button{font-size:1rem;padding:10px 4px}.budget-privacy-toggle{margin-left:auto}.budget-recent article{gap:10px}.budget-recent .budget-section-title h2{font-size:1.3rem}}
.budget-tools:not([open])>div{display:none}.budget-tools[open] .button{white-space:normal;max-width:100%}
@media(max-width:760px){.budget-ledger .budget-entries article{flex-direction:column}.budget-ledger .budget-entries article>div:last-child{max-width:none;display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}.budget-ledger .budget-entries article>div:last-child>strong{margin-right:auto}.budget-ledger .budget-entries .button{white-space:normal;min-height:44px;max-width:100%}.budget-tools[open]>div{min-width:220px;max-width:calc(100vw - 40px);box-sizing:border-box}}

/* Calm overview: one main amount and progressive disclosure of advanced tools. */
.budget-add-menu{position:relative;min-width:150px}.budget-add-menu>summary{list-style:none;cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:center}.budget-add-menu>summary::-webkit-details-marker{display:none}.budget-add-options{position:absolute;z-index:30;right:0;top:calc(100% + 8px);width:230px;display:grid;gap:8px;padding:12px;background:var(--panel,var(--bg));color:var(--text);border:1px solid var(--line);box-shadow:0 12px 30px #0003}.budget-add-options .button{width:100%;min-height:44px}.budget-summary .budget-numbers{grid-template-columns:repeat(2,minmax(0,1fr))}.budget-overview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.budget-overview-grid>.panel{min-width:0;margin:0}.budget-summary-explanation{color:var(--muted);font-size:.875rem}.budget-summary-explanation summary,.budget-advanced-overview>summary,.budget-entry-details>summary{cursor:pointer;padding:12px 0;min-height:44px}.budget-recent-amount{display:grid;justify-items:end;gap:6px}.budget-entry-details[open]{display:grid;gap:12px}.budget-entry-details>summary{font-weight:600}.budget-advanced-overview>.finance-center{margin-top:18px}.budget-recent article>div:first-child,.budget-upcoming article>div{min-width:0;overflow-wrap:anywhere}
@media(max-width:760px){.budget-overview-grid{grid-template-columns:minmax(0,1fr);gap:12px}.budget-workspace{gap:12px}.budget-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.65fr);gap:10px}.budget-toolbar label,.budget-toolbar input,.budget-toolbar select{width:100%;max-width:100%;min-width:0}.budget-toolbar-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px}.budget-toolbar-actions>.button,.budget-toolbar-actions>details{flex:1 1 auto}.budget-summary{grid-template-columns:minmax(0,1fr);gap:18px;padding:20px!important}.budget-summary .budget-numbers{gap:16px}.budget-summary .budget-numbers strong{font-size:1.1rem;overflow-wrap:anywhere}.budget-section-title{gap:10px;flex-wrap:wrap}.budget-section-title h2{font-size:1.1rem}.budget-add-menu{width:100%}.budget-add-options{position:static;width:100%;margin-top:8px;box-sizing:border-box;box-shadow:none;grid-template-columns:repeat(2,minmax(0,1fr))}.budget-navigation nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.budget-navigation nav button{min-width:0;min-height:44px;white-space:normal}.budget-dialog input,.budget-dialog select,.budget-dialog textarea{font-size:16px}.budget-entry-details .budget-form-row{grid-template-columns:minmax(0,1fr)}}
/* The old finance overview hid duplicate header actions on phones. The new picker owns them. */
@media(max-width:760px){.page-head .page-actions .budget-add-options [data-budget="receipt"]{display:flex!important;align-items:center;justify-content:center}.budget-add-options .button{white-space:normal}}

/* Everyday views share the compact overview hierarchy. */
.budget-history-search{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:18px 0}.budget-history-search label{display:grid;gap:6px;flex:1 1 240px}.budget-history-search input{width:100%;min-width:0;min-height:44px;box-sizing:border-box}.budget-history-filters>summary,.budget-operation-details>summary,.budget-operation-actions>summary,.budget-wallet-help>summary,.budget-archived-wallets>summary,.budget-wallet-options>summary,.budget-planning-limits>summary{cursor:pointer;min-height:44px;padding:12px 0;box-sizing:border-box}.budget-history-filters .budget-tabs{display:flex;flex-wrap:wrap;gap:6px}.budget-operation-amount{display:grid;gap:8px;justify-items:end;min-width:105px}.budget-operation-details small{display:block;margin-top:6px}.budget-operation-actions[open]{display:grid;gap:8px;justify-items:stretch}.budget-operation-actions>summary{font-size:.85rem;color:var(--muted)}.budget-operation-amount>strong{font-size:1.05rem;white-space:nowrap}.budget-ledger .budget-entries>article{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;padding:16px 0;border:0;border-bottom:1px solid var(--line)}.budget-ledger .budget-entries>article>div{min-width:0;overflow-wrap:anywhere}.budget-wallets .budget-wallet-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:12px;margin-top:16px}.budget-wallets .budget-wallet-grid>article{display:grid;gap:12px;align-content:start;padding:18px;border:1px solid var(--line);background:var(--panel)}.budget-wallet-grid>article>strong{font-size:1.65rem;overflow-wrap:anywhere}.budget-wallet-grid>article>div:first-child{display:grid;gap:5px}.budget-wallet-actions{display:flex;flex-wrap:wrap;gap:8px}.budget-wallet-management .budget-tools-actions{margin:12px 0}.budget-planning-limits>.panel{border:0!important;box-shadow:none!important;padding:12px 0!important}.budget-planned .budget-plan-numbers{gap:12px}.budget-planned .budget-plan-numbers>div{background:var(--panel);border:1px solid var(--line);padding:14px}
@media(max-width:760px){.budget-navigation{gap:8px}.budget-navigation>nav{flex-basis:100%}.budget-history-search{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.budget-history-search label{grid-column:1/-1}.budget-history-search input{font-size:16px}.budget-history-filters .budget-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.budget-history-filters .budget-tabs button{white-space:normal;min-width:0;min-height:44px}.budget-ledger .budget-entries>article{gap:10px}.budget-operation-amount{min-width:85px}.budget-operation-amount .button{min-height:44px;white-space:normal}.budget-operation-amount>strong{font-size:1rem}.budget-planned .budget-plan-numbers{grid-template-columns:minmax(0,1fr)}.budget-planned .budget-plan-numbers>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.budget-planned .budget-plan-numbers span{flex:1;min-width:0}.budget-planned .budget-entries>article{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}.budget-planned .budget-entries>article>div{min-width:0;overflow-wrap:anywhere}.budget-planned .budget-entries>article>div:last-child{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.budget-planned .budget-entries>article>div:last-child>strong{margin-right:auto}.budget-wallets>summary{display:grid;gap:8px}.budget-wallets .budget-wallet-grid{grid-template-columns:minmax(0,1fr)}.budget-wallet-management>.budget-tools-actions{display:grid;grid-template-columns:minmax(0,1fr)}.budget-wallet-options .budget-tools-actions{display:grid;grid-template-columns:minmax(0,1fr)}}
.budget-ledger .budget-entries>article>.budget-operation-amount{display:grid;align-content:start;justify-items:end;gap:6px}.budget-ledger .budget-operation-actions{max-width:150px}.budget-ledger .budget-operation-actions .button{max-width:100%;white-space:normal}
@media(max-width:760px){.budget-ledger .budget-entries>article{grid-template-columns:minmax(0,1fr) minmax(88px,105px)}.budget-ledger .budget-entries>article>.budget-operation-amount{display:grid;gap:4px}.budget-ledger .budget-operation-amount>strong{white-space:normal;text-align:right}.budget-ledger .budget-operation-actions{max-width:105px}.budget-ledger .budget-operation-details{font-size:.85rem}}
.budget-scope-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.budget-scope-actions>[data-budget="household"]{min-height:44px;border-color:var(--accent);color:var(--text)}
@media(max-width:760px){.budget-scope-actions{width:100%;justify-content:space-between}.budget-scope-actions>[data-budget="household"]{flex:1 1 auto}}

/* Task-first chooser. Only configuration lives in Settings. */
.budget-context-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.budget-choice-dialog{width:min(760px,calc(100vw - 32px));max-width:760px}.budget-choice-dialog .budget-dialog-body{display:block}.budget-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.budget-choice-card{position:relative;display:grid;align-content:start;gap:8px;width:100%;min-height:110px;padding:18px 36px 18px 18px;text-align:left;font:inherit;border:1px solid var(--line);background:var(--panel);color:var(--text);cursor:pointer;overflow-wrap:anywhere}.budget-choice-card strong{font-size:1.05rem;line-height:1.4}.budget-choice-card>span:not(.budget-choice-arrow){font-size:.875rem;line-height:1.5;color:var(--muted)}.budget-choice-card:hover,.budget-choice-card:focus-visible{border-color:var(--accent);outline:2px solid var(--accent);outline-offset:2px}.budget-choice-card:disabled{cursor:not-allowed;opacity:.6}.budget-choice-arrow{position:absolute;right:16px;top:17px;color:var(--accent);font-size:1.5rem}.budget-choice-settings{margin-top:16px;border-top:1px solid var(--line);padding-top:16px}.budget-choice-settings .budget-choice-card{min-height:80px}.budget-choice-dialog footer button[type=submit][hidden]{display:none!important}
@media(max-width:760px){.budget-choice-dialog{top:auto!important;bottom:0;left:0;right:0;width:100%;max-width:100vw;margin:0 auto;max-height:90dvh!important;border-bottom:0}.budget-choice-dialog>form{max-height:90dvh}.budget-choice-dialog .budget-dialog-body{padding:16px;overflow-y:auto;overscroll-behavior:contain}.budget-choice-grid{grid-template-columns:minmax(0,1fr);gap:10px}.budget-choice-card{min-height:88px;padding:14px 34px 14px 14px}.budget-choice-settings .budget-choice-card{min-height:76px}.budget-choice-dialog footer{padding-bottom:max(16px,env(safe-area-inset-bottom))}.budget-choice-dialog header h2{font-size:1.15rem}.budget-context-actions{width:100%;gap:6px}.budget-context-actions .button{min-height:44px;white-space:normal;flex:1 1 auto}}

/* Fast entry: reuse private history explicitly; keep both save actions reachable. */
.budget-entry-shortcuts{display:grid;gap:8px}.budget-entry-shortcuts>p{margin:0}.budget-entry-shortcuts summary{cursor:pointer;min-height:44px;display:flex;align-items:center}.budget-entry-templates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.budget-entry-template{display:grid;gap:5px;text-align:left;padding:12px;min-height:64px;min-width:0;overflow-wrap:anywhere;font:inherit;color:var(--text);background:var(--panel);border:1px solid var(--line);cursor:pointer}.budget-entry-template small{color:var(--muted);line-height:1.4}.budget-entry-template:hover,.budget-entry-template:focus-visible{border-color:var(--accent);outline:2px solid var(--accent);outline-offset:1px}.budget-entry-suggestions{display:grid;gap:8px}.budget-entry-suggestions:empty{display:none}.budget-entry-suggestions>.button{white-space:normal;text-align:left;min-height:44px}.budget-entry-suggestions>span{font-size:.85rem;color:var(--muted)}.budget-entry-saved{margin:0;border-left:3px solid var(--accent);padding:10px;color:var(--text)}.budget-quick-entry footer{flex-wrap:wrap}.budget-quick-entry footer .button{min-height:44px;white-space:normal}.budget-quick-entry .budget-template-save{min-height:44px}
@media(max-width:760px){.budget-quick-entry footer{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding-bottom:max(12px,env(safe-area-inset-bottom))}.budget-quick-entry footer>[data-budget-close]{grid-column:1/-1;grid-row:2;min-height:36px}.budget-quick-entry footer>[data-entry-next]{font-size:.85rem;padding:10px}.budget-entry-template{padding:10px;font-size:.9rem}.budget-entry-template small{font-size:.78rem}.budget-quick-entry .budget-dialog-body{scroll-padding:12px}}

.budget-entry-template:only-child{grid-column:1/-1}

/* Guided receipt, review and reports use the same theme variables as the ledger. */
.budget-receipt-start{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.budget-receipt-start .button{min-height:44px;white-space:normal}.budget-receipt [type=file][hidden]{display:none!important}.budget-receipt-choice{display:grid;gap:10px;padding:14px;border:1px solid var(--line);background:var(--panel)}.budget-receipt-choice p{margin:0}.budget-receipt[data-receipt-save-mode=single] [data-receipt-item]:has([data-receipt-selected]:checked) [data-receipt-category-field],.budget-receipt[data-receipt-save-mode=single] [data-receipt-bulk]{display:none}.budget-receipt-review-count{margin:0;border-left:3px solid var(--accent);padding:10px}.budget-receipt .needs-review{border-color:var(--accent)}.budget-receipt [data-receipt-summary]{position:sticky;bottom:0;z-index:1;background:var(--panel);border:1px solid var(--line);padding:12px;margin:0}.budget-receipt .budget-receipt-adjust summary{min-height:44px}.budget-guided-dialog{width:min(880px,calc(100vw - 24px))}.budget-guided-dialog button[type=submit][hidden]{display:none!important}.budget-review-group{border:1px solid var(--line);padding:12px}.budget-review-group>summary{min-height:44px;cursor:pointer;font-weight:700}.budget-review-row{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid var(--line);min-width:0}.budget-review-row>div{display:grid;gap:6px;min-width:0;overflow-wrap:anywhere}.budget-review-row small{color:var(--muted)}.budget-review-row .button{min-height:44px;white-space:normal;flex-shrink:0}.budget-review-duplicate{padding:10px;border-left:3px solid var(--accent);margin:12px 0}.budget-report-insights{padding:18px;border:1px solid var(--line);background:var(--panel)}.budget-insight-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.budget-insight-cards article{display:grid;align-content:start;gap:8px;padding:14px;border:1px solid var(--line);overflow-wrap:anywhere}.budget-insight-cards strong{font-size:1.15rem}.budget-insight-cards small{color:var(--muted);line-height:1.5}.budget-category-changes,.budget-report-goals{margin-top:16px}.budget-category-changes summary,.budget-report-goals summary{min-height:44px;cursor:pointer}.budget-category-changes article,.budget-report-goals article{padding:12px 0;border-top:1px solid var(--line);overflow-wrap:anywhere}.budget-report-goals progress{width:100%;accent-color:var(--accent)}
@media(max-width:760px){.budget-receipt-start{display:grid;grid-template-columns:1fr 1fr}.budget-receipt-start>[data-receipt-manual]{grid-column:1/-1}.budget-receipt-choice{padding:10px}.budget-receipt .budget-dialog-body{padding:12px}.budget-receipt footer .button{min-height:44px;white-space:normal}.budget-guided-dialog .budget-dialog-body{overflow-x:hidden;gap:12px}.budget-review-row{align-items:start;flex-wrap:wrap}.budget-review-row>div{flex:1 1 100%}.budget-review-row .button{max-width:100%}.budget-insight-cards{grid-template-columns:minmax(0,1fr)}.budget-report-insights{padding:12px}.budget-review-group{padding:10px}.budget-receipt [data-receipt-summary]{font-size:.85rem;line-height:1.5}}
.budget-correction-preview{margin:0;padding:12px;border-left:3px solid var(--accent);background:var(--panel);line-height:1.6;overflow-wrap:anywhere}

.budget-payment-context{border-inline-start:3px solid var(--accent);scroll-margin-top:90px;overflow-wrap:anywhere}.budget-payment-context h2{font-size:20px}.budget-payment-context .card-actions{flex-wrap:wrap}.budget-payment-context .button{min-height:44px}
@media(max-width:600px){.budget-payment-context .card-actions>.button{flex:1 1 100%}}

.budget-history-pages { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-top:20px; }
.budget-history-pages button { min-height:44px; }
.budget-history-pages [role="status"] { overflow-wrap:anywhere; }
@media(max-width:600px){.budget-history-pages [role="status"]{order:-1;width:100%;text-align:center}.budget-history-pages button{flex:1;white-space:normal}}
