.budget-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:2rem; margin:2.5rem 0 1.5rem; }
.budget-heading h1 { margin:.15rem 0 .5rem; font-size:clamp(2.25rem,6vw,4.5rem); line-height:.95; }
.budget-panel { margin-bottom:3rem; background:#f7f4ed; border:1px solid #dfd9cc; border-radius:28px; box-shadow:0 20px 50px rgba(45,42,34,.08); overflow:hidden; }
.budget-toolbar { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1.1rem 1.25rem; background:#fff; border-bottom:1px solid #e5e0d5; }
.budget-toolbar>div { display:flex; flex-direction:column; gap:.25rem; }
#budget-status { color:#39715f; font-size:.86rem; }
#budget-status.error { color:#a33c36; }
.budget-add,.budget-save,.budget-delete,.budget-dialog button { min-height:42px; border:0; border-radius:999px; padding:.65rem 1rem; font:inherit; font-weight:800; cursor:pointer; }
.budget-add,.budget-save { background:#2e7764; color:#fff; }
.budget-delete { background:#fae4e1; color:#983a34; }
.budget-rows { display:grid; gap:1rem; padding:1rem; }
.budget-row { padding:1.15rem; background:#fff; border:1px solid #e1ddd3; border-radius:20px; }
.budget-row-heading { display:flex; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.budget-row-heading strong { font-size:1.15rem; }
.budget-row-heading span { padding:.25rem .6rem; border-radius:999px; background:#e7f2ed; color:#306b5a; font-size:.78rem; }
.budget-row[data-saved="false"] .budget-row-heading span { background:#f1eee7; color:#706a5f; }
.budget-grid { display:grid; grid-template-columns:repeat(5,minmax(140px,1fr)); gap:.8rem; }
.budget-field { display:grid; gap:.35rem; min-width:0; }
.budget-field span { color:#6a655a; font-size:.72rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.budget-field input,.budget-calculated strong { box-sizing:border-box; width:100%; min-height:44px; padding:.65rem .75rem; border:1px solid #d8d3c8; border-radius:11px; background:#fbfaf7; color:#25231e; font:inherit; }
.budget-calculated strong { display:flex; align-items:center; background:#eef5f1; border-color:#d5e7df; color:#245d4d; }
.budget-actions { display:flex; justify-content:flex-end; gap:.65rem; margin-top:1rem; }
.budget-loading { min-height:260px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.5rem; text-align:center; padding:2rem; color:#666055; }
.budget-loading[hidden] { display:none; }
.budget-loading.error { color:#983a34; background:#fff5f3; }
.budget-spinner { width:30px; height:30px; border:3px solid #d8d2c6; border-top-color:#2e7764; border-radius:50%; animation:budget-spin .8s linear infinite; }
.budget-dialog { width:min(440px,calc(100vw - 2rem)); border:0; border-radius:22px; padding:1.4rem; color:#27241f; box-shadow:0 25px 70px rgba(40,30,30,.3); }
.budget-dialog::backdrop { background:rgba(30,27,24,.45); }
.budget-dialog h2 { margin-top:0; }
.budget-dialog form>div { display:flex; justify-content:flex-end; gap:.65rem; margin-top:1.2rem; }
.budget-dialog button { background:#eeeae2; color:#49443c; }
.budget-dialog button.danger { background:#b8443c; color:#fff; }
@keyframes budget-spin { to { transform:rotate(360deg); } }
@media (max-width:1050px) { .budget-grid { grid-template-columns:repeat(3,minmax(140px,1fr)); } }
@media (max-width:700px) {
  .budget-heading { align-items:flex-start; flex-direction:column; gap:1rem; }
  .budget-toolbar { align-items:stretch; flex-direction:column; }
  .budget-add { width:100%; }
  .budget-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:440px) {
  .budget-grid { grid-template-columns:1fr; }
  .budget-actions { flex-direction:column; }
  .budget-actions button { width:100%; }
}
