.family-dashboard { color: #102a4c; min-width: 0; }
.dash-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.dash-heading h1 { font-size: clamp(1.5rem, 2.3vw, 2rem); font-weight: 700; margin: 0 0 .3rem; }
.dash-month-filter { display: grid; gap: .3rem; font-size: .875rem; max-width: 100%; }
.dash-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.dash-tabs button { padding: .7rem 1rem; border: 1px solid #adc4de; border-radius: .6rem; background: #fff; color: #173b66; min-height: 44px; }
.dash-tabs button.selected { background: #173b66; color: #fff; border-color: #173b66; }
.family-dashboard :is(button, summary, input):focus-visible { outline: 3px solid #1768cf; outline-offset: 3px; }
.dash-basis { font-size: .875rem; line-height: 1.6; color: #415b7b; }
.dash-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.dash-metrics .commitment-value { white-space: normal; overflow-wrap: anywhere; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.dash-panel { background: #fff; border: 1px solid #d7e3ef; border-radius: .8rem; padding: 1.2rem; min-width: 0; }
.dash-panel h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 .8rem; line-height: 1.4; }
.dash-caption { color: #415b7b; font-size: .85rem; line-height: 1.5; margin: .4rem 0 .8rem; overflow-wrap: anywhere; }
.dash-received { margin: .85rem 0 1rem; }
.dash-empty { padding: 1.5rem .5rem; color: #415b7b; text-align: center; }
.dash-toggle { display: flex; gap: .6rem; align-items: center; font-size: .9rem; min-height: 44px; cursor: pointer; }
.dash-toggle input { width: 1.15rem; height: 1.15rem; }
.dash-comparisons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.dash-compare { min-width: 0; }
.dash-compare h3 { font-size: .9rem; font-weight: 600; min-height: 2.4em; }
.dash-pair { height: 105px; display: flex; align-items: flex-end; gap: .35rem; padding: 0 .4rem; border-bottom: 1px solid #c8d8ec; background: repeating-linear-gradient(to top, transparent 0, transparent 25px, #edf2f8 26px); }
.dash-column { width: 45%; border-radius: 4px 4px 0 0; }
.current { background: #1768cf; }
.previous { background: #a9ccf5; }
.dash-column.negative { background: #b42336; }
.dash-compare dl { margin: .8rem 0 0; }
.dash-compare dt { font-weight: 400; font-size: .75rem; color: #415b7b; }
.dash-compare dd { font-size: .85rem; font-weight: 600; margin: 0 0 .4rem; overflow-wrap: anywhere; }
.dash-negative { color: #b42336 !important; }
.dash-bars { display: grid; gap: .6rem; }
.dash-bar-row, .dash-bar-detail summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem .8rem; padding: .65rem 0; }
.dash-bar-label { font-weight: 600; overflow-wrap: anywhere; }
.dash-value { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.dash-share { font-size: .85rem; color: #415b7b; grid-column: 1 / -1; }
.dash-track { height: .65rem; background: #e9f1fa; border-radius: 4px; grid-column: 1 / -1; overflow: hidden; }
.dash-track > span { display: block; height: 100%; background: #1768cf; }
.dash-bar-detail { border-bottom: 1px solid #d7e3ef; }
.dash-bar-detail summary { cursor: pointer; min-height: 44px; list-style: none; }
.dash-bar-detail summary .dash-bar-label::before { content: '＋ '; color: #1768cf; }
.dash-bar-detail[open] summary .dash-bar-label::before { content: '− '; }
.dash-composition { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; margin: .8rem 0; font-size: .9rem; }
.dash-composition dt { font-weight: 400; }
.dash-composition dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.dash-reserve { margin-top: 1rem; border-top: 1px dashed #adc4de; padding-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; }
.dash-reserve strong { overflow-wrap: anywhere; }
.dash-reserve small { flex-basis: 100%; color: #415b7b; }
.dash-child { display: grid; grid-template-columns: minmax(0, 1fr) 9.5em 5.25em; align-items: baseline; column-gap: .75rem; padding: .6rem 0 .6rem .5rem; font-size: .85rem; }
.dash-child > :first-child { min-width: 0; overflow-wrap: anywhere; }
.dash-child > :nth-child(2), .dash-child > :last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dash-upcoming { list-style: none; margin: 0; padding: 0; }
.dash-upcoming li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #e0e8f1; padding: .75rem 0; font-size: .9rem; }
.dash-upcoming li > div { min-width: 0; overflow-wrap: anywhere; }
.dash-upcoming li > strong { text-align: right; min-width: 5rem; overflow-wrap: anywhere; }
.dash-upcoming small { display: block; color: #415b7b; margin-top: .3rem; }
.dash-insights { margin-top: 1rem; }
.dash-insights ul { display: flex; flex-wrap: wrap; gap: 1rem 2rem; padding-left: 1.2rem; margin-bottom: 0; }
.dash-history-legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; color: #415b7b; font-size: .8rem; }
.dash-history { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; margin-top: 1rem; }
.dash-month { min-width: 0; position: relative; }
.dash-month summary { cursor: pointer; list-style: none; text-align: center; font-size: .7rem; }
.dash-history-bars { height: 125px; display: flex; gap: 3px; align-items: flex-end; border-bottom: 1px solid #adc4de; margin-bottom: .5rem; }
.dash-history-bars > span { flex: 1; border-radius: 3px 3px 0 0; }
.dash-history-bars .result { background: #102a4c; }
.dash-history-bars .negative { background: #b42336; }
.dash-month-values { position: absolute; z-index: 2; left: 0; width: 220px; max-width: calc(100vw - 80px); display: grid; gap: .4rem; font-size: .8rem; padding: .7rem; background: #edf4fc; border: 1px solid #adc4de; box-shadow: 0 4px 12px #102a4c20; overflow-wrap: anywhere; border-radius: .4rem; }
.dash-month:nth-child(n+4) .dash-month-values { left: auto; right: 0; }
.dash-error { border: 1px solid #b42336; border-radius: .6rem; padding: 1rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
@media (min-width: 1700px) { .dash-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 1050px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
    .dash-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .dash-panel { padding: 1rem; }
    .dash-comparisons { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .dash-compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: .4rem 1rem; }
    .dash-compare h3, .dash-compare > p { grid-column: 1 / -1; margin: 0; min-height: 0; }
    .dash-pair { align-self: center; }
    .dash-bar-row, .dash-bar-detail summary { grid-template-columns: minmax(0, 1fr); }
    .dash-value { text-align: left; }
    .dash-composition { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
    .dash-composition dd { text-align: left; margin-bottom: .5rem; }
    .dash-child { column-gap: .35rem; padding-left: .25rem; }
    .dash-upcoming li { flex-wrap: wrap; gap: .4rem; }
    .dash-upcoming li > strong { text-align: left; }
    .dash-history { gap: .3rem; }
    .dash-month summary { font-size: .65rem; }
}
