/* Styles for the reports area (report library, report tables, home dashboard, charts). */

/* ---------- Library ---------- */
.rep-search { margin-bottom: 16px; max-width: 520px; }
.rep-search input { border-radius: var(--r-pill); padding: 10px 16px; }
.rep-lib { columns: 2 380px; column-gap: 14px; }
.rep-lib .rep-cat { break-inside: avoid; margin: 0 0 14px; }
.rep-cat + .rep-lib { margin-top: 14px; }
.rep-cat h2 { margin: 0 0 8px; font-size: 15px; }
.rep-cat ul { list-style: none; margin: 0; padding: 0; }
.rep-cat li { display: flex; align-items: baseline; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rep-cat li:last-child { border-bottom: 0; }
.rep-cat li .muted { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-star-sm { background: none; border: 0; padding: 0 2px; cursor: pointer; color: var(--subtle); font-size: 15px; line-height: 1; }
.rep-star-sm.on, .rep-star.on { color: var(--warn); }
.rep-star { font-size: 16px; min-width: 40px; }

/* ---------- Filters ---------- */
.rep-filters { margin-bottom: 16px; }
.rep-cos { display: grid; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }

/* ---------- Report table ---------- */
.rep-card { overflow: hidden; }
.rep-head { padding: 22px 18px 10px; text-align: center; }
.rep-head h2 { margin: 2px 0; font-size: 18px; }
.rep-co { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.rep-table td { padding: 7px 14px; }
.rep-table td.lvl1 { padding-left: 28px; }
.rep-table td.lvl2 { padding-left: 44px; }
.rep-table td.lvl3 { padding-left: 60px; }
.rep-table tr.r-group td { font-weight: 600; background: var(--surface-2); color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.rep-table tr.r-group.click td { color: var(--brand-text); }
.rep-table tr.r-sub td { font-weight: 600; }
.rep-table tr.r-total td { font-weight: 600; border-top: 1px solid var(--line-strong); background: var(--surface-2); }
.rep-table tr.r-grand td { font-weight: 700; font-size: 14.5px; border-top: 2px solid var(--foreground); }
.rep-table tr.click:hover td { background: color-mix(in srgb, var(--mint) 10%, transparent); }
.rep-table td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rep-notes { padding: 12px 18px 0; font-size: 12.5px; color: var(--muted); display: grid; gap: 4px; }
.rep-foot { padding: 10px 18px 14px; }

/* ---------- Management package ---------- */
.rep-cover { padding: 48px 40px; margin-bottom: 16px; }
.rep-cover h1 { font-size: 30px; font-weight: 300; margin: 6px 0 10px; letter-spacing: -.02em; }
.rep-cover-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--brand-text); font-weight: 700; }
.rep-cover-period { font-size: 16px; color: var(--muted); margin-bottom: 18px; }
.rep-cover-toc { margin: 0 0 18px; padding-left: 20px; line-height: 1.9; }
.rep-page { margin-bottom: 16px; }
.rep-kpi .value { font-weight: 300; }

/* ---------- Home ---------- */
.home-quick h2 { margin: 0 0 10px; }
.home-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.home-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.home-h h2 { margin: 0; }
.home-banks td { padding: 8px 4px; }
.home-split { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 10px 0 6px; }
.home-split b { color: var(--foreground); font-weight: 600; margin-left: 4px; }
.dot-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.home-meter { height: 10px; border-radius: var(--r-pill); overflow: hidden; background: repeating-linear-gradient(-45deg, var(--hatch-muted) 0 1px, transparent 1px 6px); border: 1px solid var(--hatch-muted); }
.home-meter span { display: block; height: 100%; background: var(--brand); border-radius: var(--r-pill); }
.home-inv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.home-inv a { color: inherit; text-decoration: none; padding: 10px 12px; border-radius: var(--r-md); background: var(--raised); }
.home-inv a:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--line-strong); }
.home-inv .label { font-size: 12px; color: var(--muted); }
.home-inv .v { font-size: 20px; font-weight: 300; }
.home-inv .hint { font-size: 11.5px; color: var(--subtle); }
.home-stack { display: flex; height: 10px; border-radius: var(--r-pill); overflow: hidden; margin-top: 12px; background: var(--surface-2); gap: 2px; }
.home-stack .ov { background: var(--danger); }
.home-stack .un { background: var(--brand); }
.home-stack .pd { background: var(--mint); }
.hbars { display: grid; gap: 10px; }
.hb-l { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.hb-l span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-l b { font-weight: 600; white-space: nowrap; }
.hb-t { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); margin-top: 4px; overflow: hidden; }
.hb-t span { display: block; height: 100%; background: var(--brand); border-radius: var(--r-pill); }

/* ---------- Charts (inline SVG) ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .ch-grid { stroke: var(--line); stroke-width: 1; }
.chart .ch-zero { stroke: var(--line-strong); }
.chart .ch-lbl { fill: var(--subtle); font-size: 11px; font-family: var(--font-sans); }

@media (max-width: 720px) {
  .home-inv { grid-template-columns: 1fr; }
  .rep-cover { padding: 28px 20px; }
}

@media print {
  .rep-card { box-shadow: none; border: 0; }
  .rep-page { break-before: page; }
  .rep-cover { min-height: 90vh; }
  .rep-table tr.click:hover td { background: none; }
}
