.budget-targets { display: grid; gap: 16px; }
.budget-filters { display: flex; flex-wrap: wrap; gap: 16px; }
.budget-filters label { display: grid; gap: 6px; min-width: 130px; }
.budget-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 14px; }
.budget-summary article { display: grid; align-content: start; gap: 8px; }
.budget-summary strong { font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.budget-summary small, .budget-grid small { color: var(--muted); }
.budget-grid { overflow: auto; }
.budget-grid table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.budget-grid td, .budget-grid th { white-space: nowrap; text-align: left; }
.budget-grid :is(td, th) small { display: block; }
.budget-grid td.budget-note { white-space: normal; min-width: 90px; max-width: 240px; overflow-wrap: anywhere; }
.budget-source { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.7; }
.budget-detail { width: min(1050px, calc(100vw - 30px)); max-height: 90vh; padding: 22px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel, #fff); color: var(--text, #182132); }
.budget-detail::backdrop { background: rgb(10 22 42 / 55%); }
.budget-detail-heading, .budget-detail-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.budget-detail h2, .budget-detail p { margin: 0 0 10px; }
.budget-detail-footer { margin-top: 14px; }
.budget-detail td input { width: 110px; }
.budget-detail td input[name="note"] { width: 190px; }
.budget-active-month th { border-inline-start: 3px solid var(--accent, #3673c7); }

.budget-totals :is(th, td) { border-top: 1px solid var(--line); padding-top: 12px; font-weight: 700; }
.budget-totals small { font-weight: 400; }
