/* THIS IS FLORIDA: Free Budget Planner (additions to app.css) */
.bp-totals { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 .8rem; max-width: 900px; }
.bp-stat { flex: 1 1 150px; border: 1px solid var(--line); border-radius: .6rem; background: var(--card); padding: .6rem .9rem; }
.bp-stat .k { margin: 0; font-size: .92rem; font-weight: 600; color: var(--muted); }
.bp-stat .v { margin: .1rem 0 0; font-size: 1.55rem; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bp-stat.is-short { border-color: var(--bad); background: #fbeeed; }
.bp-stat.is-short .k, .bp-stat.is-short .v { color: var(--bad); }
.bp-msg { margin: 0 0 1rem; padding: .6rem .85rem; border-left: 4px solid var(--brand); background: #e6f2ec; max-width: 70ch; }
.bp-msg.is-short { border-left-color: var(--bad); background: #fbeeed; color: #7a1f1a; font-weight: 700; }
.bp-save { margin: 0 0 1rem; padding: .6rem .85rem; border: 2px solid var(--bad); border-radius: .5rem; background: #fbeeed; color: #7a1f1a; font-weight: 700; max-width: 70ch; }
.bp-layout { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; }
.bp-editor { flex: 999 1 520px; min-width: 0; }
.bp-side { flex: 1 1 300px; min-width: 0; position: sticky; top: .75rem; }
.bp-h2 { font-size: 1.25rem; margin: 1.2rem 0 .4rem; }
.bp-side .bp-h2 { margin-top: .6rem; }
.editor legend { font-size: 1.05rem; }
.bp-ct { font-weight: 600; font-size: .92rem; color: var(--muted); margin-left: .3rem; }
.bp-row { display: flex; flex-wrap: wrap; gap: 0 .7rem; align-items: flex-end; border-top: 1px dashed var(--line); padding: .2rem 0 .3rem; }
.bp-row:first-child { border-top: 0; }
.editor .bp-row label { margin: .35rem 0; font-size: .9rem; }
.bp-name { flex: 3 1 190px; min-width: 0; }
.bp-amt { flex: 1 1 100px; min-width: 0; }
.bp-freq { flex: 1 1 150px; min-width: 0; }
.bp-end { display: flex; align-items: center; gap: .6rem; flex: 1 0 auto; justify-content: space-between; margin: .35rem 0; }
.bp-mo { margin: 0; color: var(--muted); font-size: .9rem; white-space: nowrap; min-width: 9.5em; font-variant-numeric: tabular-nums; }
.bp-mo.is-bad { color: var(--bad); font-weight: 700; }
@media (max-width: 560px) {
  .bp-name { flex: 1 0 100%; }
  .bp-amt { flex: 1 1 90px; }
  .bp-freq { flex: 1.6 1 140px; }
  .bp-end { flex: 1 0 100%; margin: 0 0 .2rem; }
}
.bp-cats { list-style: none; margin: 0; padding: 0; }
.bp-cats li { padding: .45rem 0; border-top: 1px dashed var(--line); }
.bp-cats li:first-child { border-top: 0; }
.bp-cat-top { display: flex; justify-content: space-between; gap: .5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.bp-bar { height: 12px; margin-top: .3rem; border-radius: 999px; background: #e3ebe7; border: 1px solid var(--line); overflow: hidden; }
.bp-bar span { display: block; height: 100%; background: var(--brand); }
.bp-pct { margin: .2rem 0 0; font-size: .88rem; color: var(--muted); }
.bp-all { border-top: 2px solid var(--line) !important; }
.tips h2 { margin-top: 1.4rem; }
.tips ol { padding-left: 1.3rem; }

/* the one-page printed sheet (only shown when printing) */
#print-sheet { display: none; }
.ps { font-family: Arial, Helvetica, sans-serif; color: #111; font-size: 10pt; line-height: 1.3; }
.ps h2 { margin: 0 0 .1rem; font-size: 16pt; }
.ps-d { margin: .1rem 0 .5rem; color: #444; font-size: 8.5pt; }
.ps-sum { border-collapse: collapse; margin: .2rem 0 .3rem; font-size: 11pt; }
.ps-sum th { text-align: left; font-weight: 400; padding: .1rem 1.2rem .1rem 0; }
.ps-sum td { text-align: right; font-weight: 700; padding: .1rem 0; }
.ps-sum .ps-left th, .ps-sum .ps-left td, .ps-sum .ps-short th, .ps-sum .ps-short td { border-top: 2px solid #222; font-weight: 800; }
.ps-short, .ps-short td, .ps-short th { color: #a3302a; }
.ps-msg { margin: .2rem 0 .6rem; font-weight: 700; }
.ps-t { width: 100%; border-collapse: collapse; }
.ps-t th, .ps-t td { border-bottom: 1px solid #ccc; padding: .1rem .35rem; text-align: left; vertical-align: top; }
.ps-t thead th { border-bottom: 2px solid #222; font-size: 8.5pt; text-transform: uppercase; letter-spacing: .04em; }
.ps-t .n { text-align: right; white-space: nowrap; }
.ps-t .ps-l { padding-left: 1rem; }
.ps-cat th, .ps-cat td { background: #eef3f0; font-weight: 700; border-bottom: 1px solid #999; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ps-t tr { break-inside: avoid; }

@media print {
  body[data-print="budget"] #panel-budget, body[data-print="budget"] #print-sheet { display: block !important; }
  body[data-print="budget"] .ps-t thead { display: table-header-group; }
}
