.family-report-dialog{width:min(980px,calc(100% - 32px));max-height:94vh;overflow:auto;border:1px solid #454043;background:#171516}
.family-report-shell{padding:clamp(20px,3vw,34px)}
.family-report-heading{position:sticky;z-index:5;top:0;margin:-34px -34px 0;padding:30px 34px 20px;background:linear-gradient(180deg,#171516 84%,transparent)}
.family-report-subtitle{max-width:620px;margin:7px 0 0;color:var(--muted);font-size:13px;line-height:1.5}
.family-report-controls{display:grid;grid-template-columns:minmax(160px,1.2fr) minmax(145px,.8fr) minmax(105px,.55fr) auto auto;align-items:end;gap:10px;margin-bottom:4px;padding:18px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(135deg,#242122,#1c1a1b)}
.family-report-controls label{display:grid;gap:6px;color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.family-report-controls input,.family-report-controls select{width:100%;min-height:43px;padding:10px 12px;border:1px solid var(--line);border-radius:11px;outline:none;background:#171516;color:var(--text);text-transform:none}
.family-report-controls input:focus,.family-report-controls select:focus{border-color:var(--green);box-shadow:0 0 0 3px rgb(69 200 129 / 12%)}
.family-report-save{grid-column:4;padding:10px 12px;white-space:nowrap}.family-report-run{grid-column:5;grid-row:1;padding:12px 18px;white-space:nowrap}
.family-report-controls button:disabled{cursor:wait;opacity:.55}
.family-report-message{min-height:34px;padding:10px 3px 6px;color:var(--muted);font-size:13px}.family-report-message:empty{padding-top:4px}.family-report-message.success{color:var(--green)}.family-report-message.error{color:#ff938e}.family-report-message.loading{color:var(--gold)}
.family-report-result{display:grid;gap:16px}
.family-report-empty{display:grid;place-items:center;min-height:280px;padding:40px;border:1px dashed var(--line);border-radius:18px;color:var(--muted);text-align:center}.family-report-empty>span{display:grid;place-items:center;width:54px;height:54px;margin-bottom:10px;border-radius:17px;background:var(--green-soft);color:var(--green);font-size:25px}.family-report-empty strong{color:var(--text);font-size:18px}.family-report-empty p{margin:6px 0 0;font-size:13px}
.family-report-hero{display:flex;align-items:end;justify-content:space-between;gap:18px;padding:22px 24px;border:1px solid #4e432f;border-radius:18px;background:radial-gradient(circle at 90% 10%,rgb(232 188 104 / 16%),transparent 34%),linear-gradient(135deg,#29231b,#201d1c)}
.family-report-kicker{display:block;margin-bottom:5px;color:var(--gold);font-size:10px;font-weight:900;letter-spacing:.13em}.family-report-hero h3{margin:0;font-size:clamp(24px,4vw,34px)}
.family-report-count{padding:7px 11px;border:1px solid rgb(232 188 104 / 25%);border-radius:999px;background:rgb(232 188 104 / 9%);color:#efd094;font-size:12px;font-weight:800;white-space:nowrap}
.family-report-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.family-report-metric{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:start;gap:13px;padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}.family-report-metric-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;font-size:20px;font-weight:900}.family-report-metric small,.family-report-metric strong,.family-report-metric div>span{display:block}.family-report-metric small{color:var(--muted);font-size:11px;font-weight:750}.family-report-metric strong{margin:5px 0 3px;font-size:clamp(18px,2.4vw,25px);white-space:nowrap}.family-report-metric div>span{color:var(--muted);font-size:10px}.family-report-metric.income .family-report-metric-icon{background:var(--green-soft);color:var(--green)}.family-report-metric.income strong{color:var(--green)}.family-report-metric.expense .family-report-metric-icon{background:var(--red-soft);color:var(--red)}.family-report-metric.expense strong{color:#ff817b}.family-report-metric.net .family-report-metric-icon{background:#302b1e;color:var(--gold)}.family-report-metric.net strong{color:var(--gold)}
.family-report-section{overflow:hidden;border:1px solid var(--line);border-radius:18px;background:var(--surface)}.family-report-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 20px;border-bottom:1px solid var(--line);font-weight:800}.family-report-section-heading span{color:var(--muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}
.family-report-categories{display:grid;grid-template-columns:1fr 1fr;gap:0 28px;padding:8px 20px 14px}.family-report-category{padding:11px 0}.family-report-category>div{display:flex;justify-content:space-between;gap:14px;margin-bottom:8px;font-size:12px}.family-report-category strong{white-space:nowrap}.family-report-category-track{display:block;overflow:hidden;height:6px;border-radius:8px;background:#302c2e}.family-report-category-track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#d74d48,#f08a62)}
.family-report-originals{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;padding:14px}.family-report-original{padding:14px;border:1px solid var(--line);border-radius:13px;background:#1b191a}.family-report-original>strong{display:block;margin-bottom:10px;color:var(--gold);font-size:15px}.family-report-original div{display:flex;justify-content:space-between;gap:12px;padding:4px 0;font-size:12px}.family-report-original span{color:var(--muted)}
.family-report-alert{display:grid;grid-template-columns:40px 1fr;gap:13px;padding:17px 18px;border:1px solid;border-radius:16px}.family-report-alert>span{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;font-weight:900}.family-report-alert strong{font-size:14px}.family-report-alert p{margin:4px 0 0;color:#c3bdc1;font-size:12px;line-height:1.5}.family-report-alert.warning{border-color:#68423e;background:#2d1d1c}.family-report-alert.warning>span{background:var(--red-soft);color:#ff8a84}.family-report-alert.provisional{border-color:#5f4d2e;background:#29231a}.family-report-alert.provisional>span{background:#3a301d;color:var(--gold)}
.family-report-chips{display:flex;flex-wrap:wrap;gap:8px;padding:14px}.family-report-chips span{padding:7px 10px;border-radius:999px;background:var(--red-soft);color:#ffaaa6;font-size:11px;font-weight:750}
.family-report-rates{overflow:hidden;border:1px solid var(--line);border-radius:16px;background:#191718}.family-report-rates summary{display:flex;align-items:center;justify-content:space-between;padding:16px 19px;cursor:pointer;font-weight:800;list-style:none}.family-report-rates summary::-webkit-details-marker{display:none}.family-report-rates summary:after{content:"⌄";margin-left:10px;color:var(--green);font-size:18px}.family-report-rates[open] summary:after{transform:rotate(180deg)}.family-report-rates summary small{margin-left:auto;color:var(--muted);font-weight:600}.family-report-rate-list{border-top:1px solid var(--line)}.family-report-rate{display:grid;grid-template-columns:minmax(130px,.6fr) minmax(0,1.4fr);gap:18px;padding:13px 19px;border-bottom:1px solid var(--line)}.family-report-rate:last-child{border-bottom:0}.family-report-rate strong,.family-report-rate small{display:block}.family-report-rate strong{font-size:12px}.family-report-rate small{margin-top:3px;color:var(--muted);font-size:10px;overflow-wrap:anywhere}.family-report-rate>div:last-child{text-align:right}
@media(max-width:800px){.family-report-controls{grid-template-columns:1fr 1fr}.family-report-controls .wide{grid-column:1/-1}.family-report-save{grid-column:1}.family-report-run{grid-column:2;grid-row:auto}.family-report-metrics{grid-template-columns:1fr}.family-report-categories{grid-template-columns:1fr}}
@media(max-width:520px){.family-report-dialog{width:100%;max-height:100vh;border-radius:0}.family-report-shell{padding:16px}.family-report-heading{top:0;margin:-16px -16px 0;padding:20px 16px 16px}.family-report-controls{grid-template-columns:1fr;padding:14px}.family-report-controls .wide,.family-report-save,.family-report-run{grid-column:1}.family-report-run{width:100%}.family-report-hero{align-items:flex-start;flex-direction:column;padding:18px}.family-report-count{white-space:normal}.family-report-rate{grid-template-columns:1fr}.family-report-rate>div:last-child{text-align:left}}
