/* Reports only: fixed chart areas, local palettes and measured footer clearance. */
#view-reports{--rp-ink:#e6edf9;--rp-muted:#adbed7;display:flex;flex-direction:column;gap:17px;min-width:0;padding-bottom:calc(var(--rs-reports-footer-clearance,140px) + env(safe-area-inset-bottom,0px));color:var(--rp-ink)}
#view-reports.hidden{display:none!important}#view-reports [hidden]{display:none!important}
#view-reports .rs-reports-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:15px;padding:8px 0}
#view-reports .rs-reports-eyebrow{color:#a5b4fc;letter-spacing:.14em;font-size:10px;font-weight:750}
#view-reports .rs-reports-heading h2{margin:7px 0;font-size:25px;font-weight:750;color:var(--rp-ink);position:static;padding:0;border:0;background:none}
#view-reports .rs-reports-heading h2::before,#view-reports .rs-reports-heading h2::after{display:none}
#view-reports .rs-reports-heading p,#view-reports .rs-reports-basis{color:var(--rp-muted);font-size:11px;line-height:1.8;margin:0}
#view-reports .rs-reports-business{border:1px solid var(--rs-report-accent,#a78bfa);color:var(--rs-report-accent,#c4b5fd);padding:8px 13px;border-radius:999px;background:#64748b0b;font-size:12px;font-weight:650;max-width:100%;overflow-wrap:anywhere}
#view-reports .rs-reports-filters{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;padding:17px;border:1px solid #818cf83a;border-radius:18px;background:linear-gradient(120deg,#6366f114,#14b8a60a)}
#view-reports .rs-reports-filters label{display:flex;flex:1 1 160px;flex-direction:column;gap:7px;font-size:11px;font-weight:650;color:var(--rp-muted)}
#view-reports .rs-reports-filters input,#view-reports .rs-reports-filters select{width:100%;min-height:43px;border:1px solid #a5b4fc44;border-radius:11px;padding:10px 12px;color:var(--rp-ink);background:#132238;font-size:12px;color-scheme:dark;box-sizing:border-box}
#view-reports #rsReportsClearDates{min-height:43px;padding:9px 14px;border:1px solid #2dd4bf44;border-radius:11px;background:#14b8a617;color:#99f6e4;cursor:pointer;font-size:12px}
#view-reports #rsReportsScope{flex-basis:100%;color:var(--rp-muted);font-size:11px;margin:0;line-height:1.8}
#view-reports .rs-reports-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
#view-reports .rs-reports-tabs button{--rp-accent:#c4b5fd;display:flex;align-items:flex-start;gap:11px;text-align:left;min-width:0;padding:17px 14px;border:1px solid #a78bfa50;border-radius:18px;background:linear-gradient(130deg,#4c1d9545,#1c2337ee);color:var(--rp-ink);box-shadow:inset 0 1px 0 #ffffff0d;cursor:pointer;transition:transform .15s ease,border-color .15s ease}
#view-reports .rs-reports-tabs button[data-tone=teal]{--rp-accent:#5eead4;background:linear-gradient(130deg,#065f4645,#172c37ee);border-color:#2dd4bf50}
#view-reports .rs-reports-tabs button[data-tone=blue]{--rp-accent:#93c5fd;background:linear-gradient(130deg,#1e3a8a45,#17273bee);border-color:#60a5fa50}
#view-reports .rs-reports-tabs button[data-tone=amber]{--rp-accent:#fcd34d;background:linear-gradient(130deg,#78350f45,#2c2634ee);border-color:#fbbf2450}
#view-reports .rs-reports-tabs button[aria-selected=true]{outline:2px solid var(--rp-accent);outline-offset:2px}
#view-reports .rs-reports-tabs button:hover{transform:translateY(-2px)}
#view-reports .rs-reports-tab-icon{display:grid;place-items:center;flex:0 0 35px;height:35px;border-radius:11px;background:#94a3b817;font-size:20px}
#view-reports .rs-reports-tabs strong{display:block;font-size:12px;line-height:1.6;color:var(--rp-accent)}
#view-reports .rs-reports-tabs small{display:block;color:var(--rp-muted);font-size:10px;line-height:1.8;margin-top:5px}
#view-reports button:focus-visible,#view-reports input:focus-visible,#view-reports select:focus-visible{outline:2px solid #67e8f9;outline-offset:3px}
#view-reports #rsReportsStatus{font-size:12px;color:#fde68a;border:1px solid #fbbf2440;background:#f59e0b0b;border-radius:12px;padding:11px 14px;line-height:1.8;margin:0}
#view-reports #rsReportsStatus:empty{display:none}
#view-reports .rs-reports-root{display:block;min-width:0}
#view-reports #reportsRoot>.grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:15px;min-width:0}
#view-reports #reportsRoot[data-tab=invoices]>.grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
#view-reports #reportsRoot>.grid>.rs-reports-card{grid-column:auto!important}
#view-reports .rs-reports-card{min-width:0;padding:17px!important;border:1px solid #a78bfa38;border-radius:18px!important;background:linear-gradient(125deg,#24233cdd,#142334dd)!important;overflow:hidden;box-shadow:inset 0 1px 0 #ffffff09}
#view-reports .rs-reports-card:nth-child(2n){background:linear-gradient(125deg,#142e37dd,#182438dd)!important;border-color:#2dd4bf38}
#view-reports .rs-reports-card:nth-child(3n){background:linear-gradient(125deg,#253147dd,#142538dd)!important;border-color:#60a5fa38}
#view-reports .rs-reports-card:nth-child(4n){background:linear-gradient(125deg,#34273bdd,#20243add)!important;border-color:#fbbf2438}
#view-reports .rs-reports-card h3,#view-reports .rs-reports-card>.font-semibold{display:block!important;font-size:14px!important;line-height:1.6;color:var(--rp-ink)!important;margin:0 0 11px!important;background:none!important;border:0!important;padding:0!important;position:static!important}
#view-reports .rs-reports-card h3::before,#view-reports .rs-reports-card h3::after{display:none!important}
#view-reports .rs-reports-chart{position:relative;width:100%;height:260px;max-height:260px;min-width:0;margin-top:10px}
#view-reports .rs-reports-chart>canvas{position:absolute!important;inset:0;width:100%!important;height:100%!important;max-height:100%!important}
#view-reports #reportsRoot[data-tab=invoices] .rs-reports-chart{height:230px;max-height:230px}
#view-reports .rs-reports-chart-note{font-size:10px;color:var(--rp-muted);line-height:1.8;margin:12px 0 0}
#view-reports .rs-reports-table-scroll{max-height:420px;overflow:auto;border:1px solid #94a3b82a;border-radius:12px;margin-top:12px;-webkit-overflow-scrolling:touch}
#view-reports table{width:100%;min-width:520px;border-collapse:collapse;font-size:11px}
#view-reports th{position:sticky;top:0;z-index:1;padding:12px 10px;background:#202f47;color:#a5b4fc;text-align:left;white-space:nowrap;font-size:10px}
#view-reports td{padding:12px 10px;border-bottom:1px solid #94a3b81a;color:var(--rp-ink);line-height:1.7}
#view-reports td:first-child{color:var(--rs-row-accent,#c4b5fd);font-weight:650}
#view-reports tbody tr:nth-child(even){background:#818cf809}
#view-reports .rs-reports-empty{padding:24px;border:1px solid #94a3b833;border-radius:15px;background:#64748b0b;color:var(--rp-muted);font-size:12px;line-height:1.8}
body.theme-minimal #view-reports{--rp-ink:#172554;--rp-muted:#475569}
body.theme-minimal #view-reports .rs-reports-tabs button{background:linear-gradient(125deg,#ede9fe,#faf5ff)}
body.theme-minimal #view-reports .rs-reports-tabs button[data-tone=teal]{background:linear-gradient(125deg,#ccfbf1,#f0fdfa);--rp-accent:#0f766e}
body.theme-minimal #view-reports .rs-reports-tabs button[data-tone=blue]{background:linear-gradient(125deg,#dbeafe,#eff6ff);--rp-accent:#1d4ed8}
body.theme-minimal #view-reports .rs-reports-tabs button[data-tone=amber]{background:linear-gradient(125deg,#fef3c7,#fffbeb);--rp-accent:#92400e}
body.theme-minimal #view-reports .rs-reports-tabs button[data-tone=violet]{--rp-accent:#6d28d9}
body.theme-minimal #view-reports .rs-reports-card{background:linear-gradient(125deg,#fff,#f1f5ff)!important}
body.theme-minimal #view-reports .rs-reports-filters input,body.theme-minimal #view-reports .rs-reports-filters select{background:#fff;color:var(--rp-ink);color-scheme:light}
body.theme-minimal #view-reports th{background:#e0e7ff;color:#334155}
body.theme-minimal #view-reports td:first-child{color:#6d28d9}
body.theme-minimal #view-reports #rsReportsClearDates{color:#0f766e}
body.theme-minimal #view-reports #rsReportsStatus{color:#92400e}
@media(max-width:1100px){#view-reports .rs-reports-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}#view-reports #reportsRoot>.grid,#view-reports #reportsRoot[data-tab=invoices]>.grid{grid-template-columns:minmax(0,1fr)!important}}
@media(max-width:760px){#view-reports .rs-reports-heading h2{font-size:22px}#view-reports .rs-reports-tabs{gap:10px}#view-reports .rs-reports-tabs button{padding:13px;flex-direction:column;gap:8px}#view-reports .rs-reports-filters{padding:13px}#view-reports .rs-reports-filters label{flex-basis:100%}#view-reports .rs-reports-filters input,#view-reports .rs-reports-filters select{font-size:16px}#view-reports #rsReportsClearDates{width:100%}#view-reports .rs-reports-chart,#view-reports #reportsRoot[data-tab=invoices] .rs-reports-chart{height:220px;max-height:220px}#view-reports .rs-reports-card{padding:14px!important}}
@media(prefers-reduced-motion:reduce){#view-reports .rs-reports-tabs button{transition:none}}
body.theme-minimal #view-reports .rs-reports-business{color:#334155}

/* CLV and collection-risk values only; amounts and calculations are unchanged. */
#view-reports .rs-reports-metric-pill{display:inline-flex;align-items:center;justify-content:center;min-width:42px;padding:5px 11px;border-radius:999px;border:1px solid #a78bfa55;background:#8b5cf61c;color:#ddd6fe;font-size:11px;font-weight:700;line-height:1.6;white-space:nowrap;font-variant-numeric:tabular-nums;box-sizing:border-box}
#view-reports .rs-reports-metric-pill[data-tone=teal]{color:#5eead4;background:#14b8a61c;border-color:#2dd4bf55}
#view-reports .rs-reports-metric-pill[data-tone=blue]{color:#93c5fd;background:#3b82f61c;border-color:#60a5fa55}
#view-reports .rs-reports-metric-pill[data-tone=amber]{color:#fde68a;background:#f59e0b1c;border-color:#fbbf2455}
#view-reports .rs-reports-metric-pill[data-tone=pink]{color:#f9a8d4;background:#ec48991c;border-color:#f472b655}
#view-reports .rs-reports-metric-pill[data-tone=orange]{color:#fdba74;background:#f973161c;border-color:#fb923c55}
#view-reports .rs-reports-metric-pill[data-tone=rose]{color:#fda4af;background:#f43f5e1c;border-color:#fb718555}
body.theme-minimal #view-reports .rs-reports-metric-pill{color:#6d28d9;background:#ede9fe;border-color:#c4b5fd}
body.theme-minimal #view-reports .rs-reports-metric-pill[data-tone=teal]{color:#0f766e;background:#ccfbf1;border-color:#5eead4}
body.theme-minimal #view-reports .rs-reports-metric-pill[data-tone=blue]{color:#1d4ed8;background:#dbeafe;border-color:#93c5fd}
body.theme-minimal #view-reports .rs-reports-metric-pill[data-tone=amber]{color:#92400e;background:#fef3c7;border-color:#fcd34d}
body.theme-minimal #view-reports .rs-reports-metric-pill[data-tone=pink]{color:#9d174d;background:#fce7f3;border-color:#f9a8d4}
body.theme-minimal #view-reports .rs-reports-metric-pill[data-tone=orange]{color:#9a3412;background:#ffedd5;border-color:#fdba74}
body.theme-minimal #view-reports .rs-reports-metric-pill[data-tone=rose]{color:#be123c;background:#ffe4e6;border-color:#fda4af}

/* Decision summaries: no new charts or changes to existing chart sizes. */
#view-reports .rs-reports-summaries{display:flex;flex-direction:column;gap:14px;min-width:0}
#view-reports .rs-reports-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;min-width:0}
#view-reports .rs-report-summary-card{min-width:0;border:1px solid #a78bfa44;border-radius:17px;padding:17px;background:linear-gradient(125deg,#4c1d9528,#182238e8);overflow:hidden}
#view-reports .rs-report-summary-card[data-tone=teal]{border-color:#2dd4bf44;background:linear-gradient(125deg,#065f4628,#162a37e8)}
#view-reports .rs-report-summary-card[data-tone=amber]{border-color:#fbbf2444;background:linear-gradient(125deg,#78350f28,#292338e8)}
#view-reports .rs-report-summary-card h3,#view-reports .rs-report-summary-card summary{display:block;font-size:14px;font-weight:700;line-height:1.7;color:var(--rp-ink);margin:0 0 10px;padding:0;background:none;border:0;position:static}
#view-reports .rs-report-summary-card h3::before,#view-reports .rs-report-summary-card h3::after{display:none}
#view-reports .rs-report-summary-card summary{display:list-item;cursor:pointer;list-style-position:inside;color:#c4b5fd}
#view-reports .rs-report-summary-card[data-tone=teal] summary{color:#5eead4}
#view-reports .rs-report-summary-card[data-tone=amber] summary{color:#fde68a}
#view-reports .rs-report-summary-card summary span{display:inline-block;font-size:10px;font-weight:500;color:var(--rp-muted);margin-left:7px}
#view-reports .rs-report-summary-note,#view-reports #rsReportsComparisonScope{font-size:10px;color:var(--rp-muted);line-height:1.9;margin:9px 0}
#view-reports .rs-report-summary-scroll{overflow:auto;max-height:330px;border:1px solid #94a3b828;border-radius:12px;margin:12px 0;-webkit-overflow-scrolling:touch}
#view-reports .rs-report-summary-scroll table{min-width:620px;font-size:11px}
#view-reports #rsReportsServicePerformance table{min-width:740px}
#view-reports #rsReportsDiscountInvoices table{min-width:700px}
#view-reports .rs-report-summary-scroll td small{display:block;font-size:10px;line-height:1.8;color:var(--rp-muted);margin-top:4px}
#view-reports .rs-report-summary-scroll td:first-child{color:var(--rp-ink)}
#view-reports .rs-report-summary-metrics{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-top:8px}
#view-reports .rs-report-summary-metrics>span{font-size:10px;line-height:2.7;color:var(--rp-muted)}
#view-reports .rs-report-summary-invoice{display:inline-block;padding:5px 9px;border:1px solid #a78bfa55;border-radius:999px;color:#c4b5fd;background:#8b5cf61c;font-size:11px;font-weight:650;white-space:nowrap;cursor:pointer}
#view-reports .rs-report-summary-empty{color:var(--rp-muted);text-align:center;padding:22px}
#view-reports .rs-report-summary-invoice:focus-visible,#view-reports .rs-report-summary-card summary:focus-visible{outline:2px solid #67e8f9;outline-offset:3px}
body.theme-minimal #view-reports .rs-report-summary-card{background:linear-gradient(125deg,#fff,#f5f3ff)}
body.theme-minimal #view-reports .rs-report-summary-card[data-tone=teal]{background:linear-gradient(125deg,#fff,#f0fdfa)}
body.theme-minimal #view-reports .rs-report-summary-card[data-tone=amber]{background:linear-gradient(125deg,#fff,#fffbeb)}
body.theme-minimal #view-reports .rs-report-summary-card summary,body.theme-minimal #view-reports .rs-report-summary-invoice{color:#6d28d9}
body.theme-minimal #view-reports .rs-report-summary-card[data-tone=teal] summary{color:#0f766e}
body.theme-minimal #view-reports .rs-report-summary-card[data-tone=amber] summary{color:#92400e}
@media(max-width:1100px){#view-reports .rs-reports-summary-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:760px){#view-reports .rs-report-summary-card{padding:13px}#view-reports .rs-report-summary-scroll{max-height:300px}}

/* Summary reports have their own category panel below the report navigation. */
#view-reports .rs-reports-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}
#view-reports .rs-reports-tabs button[data-tone=pink]{--rp-accent:#f9a8d4;background:linear-gradient(130deg,#83184345,#2b2238ee);border-color:#f472b650}
body.theme-minimal #view-reports .rs-reports-tabs button[data-tone=pink]{--rp-accent:#9d174d;background:linear-gradient(125deg,#fce7f3,#fdf2f8)}
@media(max-width:1100px){#view-reports .rs-reports-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}#view-reports .rs-reports-tabs button[data-report=summaries]{grid-column:1/-1}}
