/* ═════════ Reports (js/views/reports.js) ═════════ — tokens only; reuses .ph / .filters / .flt / .seg2 / .tbl / .sec / .btn from ops.css and base.css. */
.rp { --rp-gap: 14px; }
.rp-tabs { display: flex; gap: 0; border: 1.5px solid var(--line-strong); margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.rp-tabs::-webkit-scrollbar { display: none; }
.rp-tab { flex: 1 0 auto; padding: 11px 16px; font: 700 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; text-align: center; border-right: 1.5px solid var(--line-strong); color: var(--ink-2); white-space: nowrap; }
.rp-tab:last-child { border-right: 0; } .rp-tab:hover { color: var(--ink); background: var(--bg-3); }
.rp-tab.is-on { background: var(--hit); color: var(--on-hit); }
.rp-tab:focus-visible { outline: 3px solid var(--blue); outline-offset: -4px; }
.rp-ctl { align-items: flex-end; } .rp-ctl input[type=date] { min-height: 38px; }
.rp-step .seg2__a { padding: 9px 12px; } .rp-cmp__b { display: flex; align-items: center; gap: 6px; min-height: 38px; font-size: 13px; } .rp-cmp__b input { width: 20px; height: 20px; accent-color: var(--hit); }
.rp-acts .btn { padding: 8px 14px; min-height: 38px; }

.rp-sec { border-top: 1.5px solid var(--line-strong); padding: 18px 0 8px; margin-top: 14px; break-inside: auto; }
.rp-sec__h { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; margin-bottom: 12px; }
.rp-sec__t { font: 900 clamp(20px, 2.6vw, 30px)/1 var(--font-display); letter-spacing: -.04em; text-transform: uppercase; }
.rp-sec__e { grid-column: 1; color: var(--ink-2); font-size: 14px; max-width: 70ch; } .rp-aib { grid-row: 1 / span 2; grid-column: 2; padding: 8px 14px; min-height: 38px; }
.rp-ai { border: 1.5px dashed var(--line-strong); padding: 12px 14px; margin: 0 0 14px; background: color-mix(in srgb, var(--bg-3) 55%, transparent); }
.rp-ai__t p { margin: 0 0 8px; max-width: 80ch; line-height: 1.5; } .rp-ai__m { font-size: 10.5px; color: var(--ink-3); letter-spacing: .06em; }
.rp-ai__x { margin: 0; color: var(--ink-2); } .rp-ai__x--budget, .rp-ai__x--error { color: var(--alert); }

.rp-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); border-left: 1.5px solid var(--line-strong); border-top: 1.5px solid var(--line-strong); margin-bottom: 16px; }
.rp-kpi { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-right: 1.5px solid var(--line-strong); border-bottom: 1.5px solid var(--line-strong); min-width: 0; }
.rp-kpi__l { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }
.rp-kpi__v { display: block; font: 900 clamp(26px, 3.2vw, 40px)/1 var(--font-display); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.rp-kpi__a { text-decoration: none; color: var(--ink); align-self: flex-start; } .rp-kpi__a:hover .rp-kpi__v, .rp-kpi__a:focus-visible .rp-kpi__v { background: var(--hit); color: var(--on-hit); }
.rp-kpi__n { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.rp-delta { font-size: 11px; color: var(--ink-2); letter-spacing: .02em; } .rp-delta i { font-style: normal; font-size: 9px; }
.rp-delta.is-good { color: var(--ok); } .rp-delta.is-bad { color: var(--alert); }

.rp-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: var(--rp-gap); margin-bottom: 16px; }
.rp-chart { margin: 0; border: 1.5px solid var(--line); padding: 12px; min-width: 0; break-inside: avoid; }
.rp-chart__h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; font-size: 11px; color: var(--ink-2); letter-spacing: .08em; text-transform: uppercase; }
.rp-tt { font-size: 10.5px; }
.rp-chart__b { overflow-x: auto; }
.rp-svg { display: block; width: 100%; min-width: 320px; height: auto; max-height: 280px; }
.rp-svg--donut { width: 180px; min-width: 0; height: 180px; flex: none; }
.rp-grid { stroke: var(--line); stroke-width: 1; } .rp-ax { fill: var(--ink-3); font: 500 10px var(--font-mono); }
.rp-bar { transition: opacity var(--dur-1); } .rp-svg a:hover .rp-bar, .rp-svg a:focus .rp-bar, .rp-svg a:hover .rp-seg, .rp-svg a:focus .rp-seg { opacity: .7; outline: none; }
.rp-svg a:focus-visible .rp-bar, .rp-svg a:focus-visible .rp-seg, .rp-svg a:focus-visible .rp-pt { stroke: var(--ink); stroke-width: 2; }
.rp-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; } .rp-line--2 { stroke-dasharray: 6 4; }
.rp-pt { stroke: var(--bg); stroke-width: 1.5; } .rp-donut__t { fill: var(--ink); font: 900 22px var(--font-display); }
.rp-donut { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.rp-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; margin: 8px 0 0; padding: 0; font-size: 11px; color: var(--ink-2); }
.rp-legend li { display: flex; align-items: center; gap: 6px; } .rp-legend i { width: 10px; height: 10px; display: inline-block; flex: none; }
.rp-donut .rp-legend { flex-direction: column; margin: 0; } .rp-legend b { color: var(--ink); margin-left: 4px; }
.rp-dtw { margin-top: 10px; } .rp-dt { font-size: 13px; }
.rp-note { font-size: 12.5px; color: var(--ink-3); margin: 6px 0; max-width: 90ch; } .rp-empty { color: var(--ink-3); font-size: 13px; padding: 30px 0; text-align: center; }

.rp-tbl { margin: 6px 0 18px; } .rp-tbl tbody th { white-space: nowrap; } .rp-tbl__h { display: flex; justify-content: space-between; align-items: center; gap: 10px; } .rp-tbl__h .sec { margin: 10px 0; }
.rp-csv { padding: 6px 12px; min-height: 34px; font-size: 11px; }
.rp-sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.rp-sort:hover { color: var(--ink); } .rp-sort i { font-style: normal; color: var(--hit); } [data-theme='light'] .rp-sort i { color: var(--blue); }
.rp-sort:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.rp-dr { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; } .rp-dr:hover { color: var(--blue-hot); }
.rp-sp { width: 90px; } .rp-spark { width: 80px; height: 22px; display: block; } .rp-spark polyline { fill: none; stroke: var(--blue); stroke-width: 1.6; }
.rp-risk--high { color: var(--alert); font-weight: 700; } .rp-risk--medium { color: var(--s5); font-weight: 700; } .rp-risk--ok { color: var(--ok); }
.rp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--rp-gap); margin: 0 0 16px; }
.rp-card { border: 1.5px solid var(--line); padding: 10px 14px; } .rp-card .sec { margin: 4px 0 8px; } .rp-card__k { font-size: 10px; color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; }
.rp-od, .rp-tg { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; } .rp-od li { display: grid; gap: 2px; } .rp-od span { font-size: 11px; color: var(--ink-3); }
.rp-tg li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 13px; } .rp-tg__bar { grid-column: 1 / -1; height: 4px; background: var(--line); display: block; } .rp-tg__bar i { display: block; height: 100%; background: var(--ok); }
.rp-foot { font-size: 10.5px; color: var(--ink-3); margin: 24px 0 0; letter-spacing: .06em; }
.rp-print-h { display: none; }

/* print view (?print=1) and real printing / "Download PDF" */
.rp--print .rp-ctl, .rp--print .rp-aib, .rp--print .rp-tt, .rp--print .rp-csv { display: none; }
.rp--print .rp-print-h { display: block; font-size: 12px; margin: 0 0 8px; }
@media print {
  @page { margin: 14mm 12mm; }
  html, body { background: #fff !important; color: #000 !important; }
  .rail, .strip, .dossier, .toast, .palette, .modal, .why, .why-pop, .rp-ctl, .rp-tabs, .rp-acts, .rp-aib, .rp-tt, .rp-csv, .rp-step { display: none !important; }
  .app, .stage, .page:not([hidden]) { display: block !important; position: static !important; overflow: visible !important; height: auto !important; padding: 0 !important; margin: 0 !important; grid-template-columns: 1fr !important; }
  [hidden], .lock, .intro { display: none !important; }
  .rp-print-h { display: block; font-size: 11px; margin: 0 0 6px; }
  .rp { --ink: #000; --ink-2: #222; --ink-3: #444; --line: #bbb; --line-strong: #000; --bg: #fff; --bg-3: #f2f2f2; color: #000; }
  .ph__t { font-size: 28px !important; } .rp-sec { break-inside: auto; } .rp-chart, .rp-kpi, .rp-card, .tbl tr { break-inside: avoid; }
  .rp-dtw[hidden] { display: none !important; } .rp-ai[hidden] { display: none !important; }
  .rp-svg { max-height: 220px; } a { color: inherit !important; text-decoration: none !important; }
  .rp-kpi__a:hover .rp-kpi__v { background: none; color: inherit; }
}

@media (max-width: 760px) {
  .rp-sec__h { grid-template-columns: 1fr; } .rp-aib { grid-row: auto; grid-column: 1; justify-self: start; }
  .rp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rp-kpi { padding: 10px 12px; } .rp-kpi__v { font-size: 26px; }
  .rp-ctl .flt { flex: 1 1 140px; min-width: 0; } .rp-ctl input[type=date], .rp-ctl select { width: 100%; }
  .rp-acts { width: 100%; } .rp-acts .btn { flex: 1 1 auto; justify-content: center; }
  .rp-chart { padding: 10px 8px; } .rp-donut { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .rp-bar { transition: none; } }
