/* =======================================================
   Orchestrator — Reporting pages
   Overview tiles · Goal Funnels · Pipeline & Forecast
   ======================================================= */

/* ---------- Overview proof tiles ---------- */
.rep-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rep-tile { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rep-tile .tl-top { display: flex; align-items: center; gap: 8px; }
.rep-tile .tl-ic { width: 30px; height: 30px; border-radius: var(--r-md); display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand); flex-shrink: 0; }
.rep-tile .tl-lbl { font-size: 10.5px; font-weight: 600; color: var(--muted); line-height: 1.3; }
.rep-tile .tl-val { font-size: 24px; font-weight: 800; letter-spacing: -0.025em; color: var(--fg-strong); font-variant-numeric: tabular-nums; line-height: 1; }
.rep-tile .tl-val small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.rep-tile .tl-foot { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.rep-tile .tl-delta { font-weight: 700; }
.rep-tile .tl-delta.up { color: var(--ok); }
.rep-tile .tl-delta.dn { color: var(--alert); }
.rep-tile .tl-sub { color: var(--muted); }
/* sparkline */
.spark-svg { width: 100%; height: 34px; display: block; }
.spark-svg path.line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark-svg path.area { fill: var(--brand-soft); stroke: none; }

.rep-row2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: 14px; align-items: start; }
.rep-bars { display: flex; flex-direction: column; gap: 13px; }
.rep-bar-row { display: grid; grid-template-columns: 130px 1fr 48px; gap: 12px; align-items: center; }
.rep-bar-row .nm { font-size: 12px; color: var(--fg); }
.rep-bar-row .track { height: 10px; border-radius: 5px; background: var(--sunken); overflow: hidden; }
.rep-bar-row .track i { display: block; height: 100%; border-radius: 5px; background: var(--brand); }
.rep-bar-row .v { font-family: var(--mono); font-size: 12px; font-weight: 700; text-align: right; color: var(--fg-strong); }

.rep-leaders { display: flex; flex-direction: column; }
.rep-leader { display: grid; grid-template-columns: 22px 24px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--hairline); }
.rep-leader:last-child { border-bottom: none; }
.rep-leader:hover .nm { color: var(--brand); }
.rep-leader .rk { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--dim); }
.rep-leader .nm { font-size: 12.5px; font-weight: 600; color: var(--fg-strong); }
.rep-leader .meta { font-size: 11px; color: var(--muted); }
.rep-leader .val { font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: var(--fg-strong); }

/* ---------- Goal Funnels ---------- */
.funnel { display: flex; flex-direction: column; gap: 6px; }
.fn-stage { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; }
.fn-stage .lbl { text-align: right; }
.fn-stage .lbl .nm { font-size: 12.5px; font-weight: 600; color: var(--fg-strong); }
.fn-stage .lbl .pct { font-size: 9.5px; color: var(--muted); font-family: var(--mono); }
.fn-bar-wrap { position: relative; height: 32px; display: flex; align-items: center; }
.fn-bar { height: 32px; border-radius: var(--r-sm); display: flex; align-items: center; padding: 0 16px;
  background: var(--ai);
  color: #fff; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; min-width: 70px;
  transition: width .5s cubic-bezier(.4,0,.2,1); }
.fn-bar .count { font-size: 13px; font-family: var(--mono); }
.fn-drop { margin-left: 12px; font-size: 9.5px; color: var(--alert); font-weight: 700; white-space: nowrap; }
.fn-drop.ok { color: var(--ok); }
.fn-conn { font-size: 11px; color: var(--dim); padding: 2px 0 2px 166px; }

.fn-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.fn-meta .m { padding: 14px 16px; }
.fn-meta .m .k { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.fn-meta .m .v { font-size: 18px; font-weight: 700; color: var(--fg-strong); margin-top: 4px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---------- Pipeline & Forecast ---------- */
.pf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pf-card { padding: 16px 18px; }
.pf-card .k { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.pf-card .v { font-size: 24px; font-weight: 800; color: var(--fg-strong); letter-spacing: -0.025em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.pf-card .sub { font-size: 11px; color: var(--muted); margin-top: 6px; }
.pf-card.accent { background: var(--ai-bg); border-color: color-mix(in oklch, var(--ai) 25%, white); }
.pf-card.accent .v { color: var(--ai); }

.pf-row2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; margin-top: 14px; align-items: start; }
.pf-stagebars { display: flex; flex-direction: column; gap: 14px; }
.pf-sb { display: grid; grid-template-columns: 110px 1fr 90px; gap: 12px; align-items: center; }
.pf-sb .nm { font-size: 11px; color: var(--fg); }
.pf-sb .track { height: 10px; border-radius: var(--r-xs); background: var(--sunken); overflow: hidden; display: flex; }
.pf-sb .track i { height: 100%; }
.pf-sb .track i.weighted { background: var(--brand); }
.pf-sb .track i.rest { background: var(--sunken); }
.pf-sb .v { font-family: var(--mono); font-size: 12px; font-weight: 700; text-align: right; color: var(--fg-strong); }

.forecast-box { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; background: var(--ai-bg); border-color: color-mix(in oklch, var(--ai) 25%, white); }
.forecast-box .fc-line { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
.forecast-box .fc-line .k { color: var(--muted); }
.forecast-box .fc-line .v { font-family: var(--mono); font-weight: 700; color: var(--fg-strong); }
.forecast-box .fc-line.ai .v { color: var(--ai); }
.forecast-box .fc-input { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); }
.forecast-box .fc-input .cur { color: var(--muted); font-family: var(--mono); }
.forecast-box .fc-input input { border: none; outline: none; font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--fg-strong); width: 100%; background: transparent; }
.sect-h.ai { color: var(--ai); }
.orch-card.pad > .ai-receipt, .forecast-box > .ai-receipt { margin-top: 14px; }
