/* Use the existing Finbond typography, navy palette and page-heading pattern. */
.budget-page { --bc-ink: #28415b; --bc-muted: #626b73; --bc-line: #dce1e6; --bc-accent: #003366; background: #f5f5f5; color: #333; padding: 0 0 80px; }
.budget-page * { box-sizing: border-box; }
.bc-intro { background: #28415b; padding: 140px 0 28px; }
.bc-intro .mbr-section-title { color: #fff; margin: 0 0 14px; }
.bc-intro p { color: #fff; margin: 0; font-size: 18px; line-height: 1.6; }
.bc-shell { margin: 0 auto; }
.bc-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0; }
.bc-back { color: #003366; font-size: 15px; }
.bc-intro-meta { display: flex; align-items: center; gap: 10px; color: #626b73; font-size: 14px; }
.bc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 365px; gap: 28px; align-items: start; margin: 0; }
.bc-card { background: #fff; border: 1px solid var(--bc-line); border-radius: 4px; box-shadow: 0 3px 10px #28415b08; }
.bc-income { padding: 26px; border-top: 3px solid #003366; }
.bc-card-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 24px; }
.bc-section-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; background: #edf1f5; border-radius: 4px; font-size: 26px; color: var(--bc-accent); font-weight: 400; }
.budget-page h2 { margin: 0; color: var(--bc-ink); font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: normal; }
.bc-card-heading p, .bc-expenses-heading p, .bc-breakdown > p { font-size: 13px; color: var(--bc-muted); margin: 5px 0 0; line-height: 1.6; }
.bc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; }
.bc-field { display: flex; flex-direction: column; margin: 0; font-size: 13px; line-height: 1.5; font-weight: 600; min-width: 0; }
.bc-field > span:first-child { min-height: 18px; margin-bottom: 8px; }
.bc-money-input { display: flex; align-items: center; border: 1px solid #cdd4db; background: #fafafa; border-radius: 3px; padding: 0 12px; height: 48px; gap: 8px; color: #626b73; transition: border-color .15s, box-shadow .15s; }
.bc-money-input:focus-within { background: #fff; border-color: #003366; box-shadow: 0 0 0 3px #00336618; }
.bc-money-input input { font: inherit; font-size: 18px; line-height: 1.5; font-variant-numeric: tabular-nums; width: 100%; min-width: 0; color: var(--bc-ink); background: transparent; border: 0; outline: none; padding: 10px 0; border-radius: 0; margin: 0; box-shadow: none; height: auto; }
.bc-money-input input::placeholder { color: #8a939d; font-weight: 400; opacity: 1; }
.bc-unit { flex-shrink: 0; font-size: 13px; color: #69737d; font-weight: 400; }
.bc-field:has([aria-invalid="true"]) .bc-money-input { border-color: #b8443c; background: #fff8f6; }
.bc-field-error { color: #a6352f; font-size: 12px; font-weight: 500; }
.bc-field-error:empty { display: none; }
.bc-help { font-size: 12px; line-height: 1.7; margin: 17px 0 0; color: var(--bc-muted); }
.bc-expenses-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 16px; }
.bc-expenses-heading > span { font-size: 12px; white-space: nowrap; color: var(--bc-muted); background: #e8ebee; padding: 5px 9px; border-radius: 20px; }
.bc-groups { display: grid; gap: 12px; }
.bc-group summary { display: flex; list-style: none; cursor: pointer; padding: 21px 22px; align-items: center; gap: 12px; border-radius: 4px; }
.bc-group summary::-webkit-details-marker { display: none; }
.budget-page :is(a, button, summary):focus-visible { outline: 3px solid #003366; outline-offset: 4px; }
.bc-group-number { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 3px; background: #edf1f5; color: #536b83; font-size: 12px; font-weight: 600; }
.bc-group-title { font-family: Raleway, sans-serif; font-size: 14px; font-weight: 700; flex: 1; line-height: 1.5; }
.bc-group-title small { display: block; font-size: 12px; margin-top: 3px; color: var(--bc-muted); font-weight: 400; }
.bc-group-total { font-size: 13px; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.bc-chevron { width: 7px; height: 7px; border-right: 1.5px solid #536b83; border-bottom: 1.5px solid #536b83; transform: rotate(45deg); margin: 0 2px 4px 6px; flex-shrink: 0; }
.bc-group[open] .bc-chevron { transform: rotate(225deg); margin-bottom: -3px; }
.bc-group[open] summary { border-bottom: 1px solid #e9edf0; border-radius: 4px 16px 0 0; }
.bc-group-body { padding: 22px; }
.bc-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.bc-reset.btn { margin: 0; padding: 12px 18px; }
.bc-actions > span { font-size: 12px; color: var(--bc-muted); }
.bc-summary { position: sticky; top: 106px; display: grid; gap: 18px; }
.bc-balance-card { color: #fff; background: #28415b; border-radius: 4px; padding: 27px; box-shadow: 0 12px 28px #28415b12; }
.bc-summary-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #d5dfe8; font-size: 12px; font-weight: 600; letter-spacing: 1.2px; }
.bc-live { display: flex; align-items: center; gap: 5px; font-size: 13px; letter-spacing: 0; background: #ffffff10; border: 1px solid #ffffff18; border-radius: 20px; padding: 4px 8px; color: #fff; }
.bc-live i { height: 5px; width: 5px; border-radius: 50%; background: #fff; }
.bc-balance-label { margin-top: 28px; font-size: 12px; color: #dce5ed; }
.bc-balance { display: block; font-family: "Titillium Web", sans-serif; font-size: clamp(28px, 3vw, 39px); font-weight: 500; letter-spacing: -1.2px; color: #fff; margin-top: 8px; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bc-status { color: #dce5ed; font-size: 13px; line-height: 1.65; margin: 13px 0 0; min-height: 37px; }
.bc-balance-card[data-state="shortfall"] .bc-balance { color: #ffb6a6; }
.bc-balance-card[data-state="invalid"] .bc-balance { color: #ffe0ac; }
.bc-balance-divider { height: 1px; background: #ffffff20; margin: 22px 0 18px; }
.bc-totals { margin: 0; }
.bc-totals > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.bc-totals dt { font-size: 12px; font-weight: 400; color: #dce5ed; }
.bc-totals dd { font-size: 12px; font-weight: 500; white-space: nowrap; margin: 0; font-variant-numeric: tabular-nums; }
.bc-allocation-track { display: flex; height: 7px; background: #ffffff20; border-radius: 6px; overflow: hidden; margin-top: 23px; }
.bc-allocation-track span { width: 0; transition: width .2s; }
#bc-spent-bar { background: #8ca9c5; }
#bc-saved-bar { background: #d0dce8; }
.bc-allocation-caption { font-size: 13px; line-height: 1.5; margin: 9px 0 0; color: #dce5ed; }
.bc-breakdown { padding: 24px; }
.bc-breakdown ul { list-style: none; padding: 0; margin: 22px 0; }
.bc-breakdown li { display: flex; align-items: center; gap: 9px; margin-bottom: 17px; font-size: 12px; }
.bc-breakdown li > span:nth-child(2) { flex: 1; color: #4e5f70; }
.bc-breakdown li strong { font-size: 13px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bc-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: #003366; }
.bc-dot-living { background: #6c849c; }.bc-dot-transport { background: #92a9bd; }.bc-dot-finance { background: #626d79; }.bc-dot-saving { background: #bccbd8; }
.bc-mini-note { display: flex; align-items: start; gap: 10px; border-top: 1px solid var(--bc-line); padding-top: 17px; }
.bc-mini-note > span { color: #003366; font-size: 15px; }
.bc-mini-note p { font-size: 12px; line-height: 1.75; color: var(--bc-muted); margin: 0; }
.bc-guide { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 3px 5px; color: #003366; font-size: 13px; font-weight: 600; }
.bc-guide small { display: block; font-size: 12px; font-weight: 400; color: var(--bc-muted); margin-top: 5px; }
.bc-guide > span:last-child { font-size: 22px; }
.bc-mobile-summary { display: none; }
#budget-summary { scroll-margin-top: 108px; }
@media (max-width: 959px) { .bc-layout { grid-template-columns: minmax(0, 1fr) 315px; gap: 18px; }.bc-balance-card, .bc-breakdown { padding: 21px; }.bc-group-title small { display: none; }.bc-fields { grid-template-columns: 1fr; }.bc-summary { top: 100px; } }
@media (max-width: 719px) { .budget-page { padding-bottom: 48px; }.bc-intro { padding: 120px 0 26px; }.bc-intro .mbr-section-title { font-size: 30px; line-height: 1.2; }.bc-intro p { font-size: 16px; }.bc-toolbar { align-items: flex-start; flex-direction: column; gap: 8px; margin: 23px 0; }.bc-intro-meta { font-size: 13px; }.bc-layout { grid-template-columns: 1fr; }.bc-summary { position: static; }.bc-income { padding: 21px; }.bc-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px 13px; }.bc-field > span:first-child { min-height: 32px; }.bc-group summary { padding: 19px 16px; gap: 9px; }.bc-group-body { padding: 20px 17px; }.bc-group-title { font-size: 13px; }.bc-group-total { font-size: 12px; }.bc-actions { margin-bottom: 10px; }.bc-actions > span { max-width: 150px; text-align: right; }.bc-balance { font-size: 39px; }.bc-summary-top { font-size: 13px; }.bc-totals dt { font-size: 13px; }.bc-totals dd { font-size: 13px; }.bc-breakdown li { font-size: 12px; }.bc-breakdown li strong { font-size: 12px; } }
@media (max-width: 379px) { .bc-fields { grid-template-columns: 1fr; }.bc-field > span:first-child { min-height: 0; }.bc-group-number { width: 27px; flex-basis: 27px; }.bc-intro .mbr-section-title { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { .budget-page * { transition: none !important; } }
@media (max-width: 719px) {
  .bc-field { font-size: 14px; }
  .bc-group-title { font-size: 14px; }
  .bc-mobile-summary { display: flex; position: fixed; z-index: 1030; bottom: 12px; left: 16px; right: 16px; align-items: center; justify-content: space-between; gap: 12px; color: #fff; background: #28415b; border: 1px solid #62788d; border-radius: 4px; padding: 12px 17px; box-shadow: 0 5px 25px #28415b30; }
  .bc-mobile-summary > span:first-child { font-size: 13px; color: #dce5ed; }
  .bc-mobile-summary strong { display: block; font-size: 18px; font-weight: 500; color: #fff; margin-top: 3px; }
  .bc-mobile-summary > span:last-child { font-size: 12px; color: #fff; }
  .budget-page { padding-bottom: 108px; }
}
