/* PH-80 — Figma G33 « Rapports TI » (230:40036): filters, three KPI cards, weekly
   volume, deadlines met per priority, frequent topics, backlog banner.
   Design tokens only (colors_and_type.css). Chart colours: G33 series 1 = sage-600,
   series 2 = slate-500, topics = sage-300 (« chart-series-1/2/6 » in Figma). */

.rpt-page { display: flex; flex-direction: column; gap: 24px; }

.rpt-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.rpt-header h1 { margin: 0; font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -0.022em; color: var(--text-primary); }
.rpt-header p { margin: 8px 0 0; font-size: 16px; line-height: 24px; letter-spacing: -0.006em; color: var(--text-secondary); }

.rpt-filters { display: flex; gap: 12px; flex-wrap: wrap; }
.rpt-filter { width: 240px; }

/* The report under its blocks; while a month loads it stays in place, dimmed (G33 388:10521). */
.rpt-body { display: flex; flex-direction: column; gap: 24px; }
.rpt-body--loading { opacity: 0.6; pointer-events: none; }

.rpt-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rpt-kpi {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 20px;
  background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
}
.rpt-kpi__label { font-size: 13px; line-height: 16px; font-weight: 500; letter-spacing: -0.003em; color: var(--text-secondary); }
.rpt-kpi__value {
  font-size: 40px; line-height: 44px; font-weight: 600; letter-spacing: -0.035em;
  color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.rpt-kpi__sub { font-size: 13px; line-height: 18px; letter-spacing: -0.003em; color: var(--text-secondary); }

.rpt-row { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; align-items: stretch; }

.rpt-card {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 20px;
  background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
}
.rpt-card--chart { gap: 14px; }
.rpt-card h2, .rpt-card__title {
  margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; letter-spacing: -0.008em; color: var(--text-primary);
}
.rpt-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rpt-card__head > span { font-size: 13px; line-height: 18px; color: var(--text-secondary); }
.rpt-card__note { margin: 0; font-size: 13px; line-height: 18px; letter-spacing: -0.003em; color: var(--text-secondary); }

.rpt-legend { display: flex; gap: 12px; font-size: 12px; line-height: 16px; color: var(--text-secondary); }
.rpt-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.rpt-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.rpt-swatch--received, .rpt-bar--received { background: var(--sage-600); }
.rpt-swatch--resolved, .rpt-bar--resolved { background: var(--slate-500); }

.rpt-bars {
  display: flex; align-items: flex-end; justify-content: space-between; height: 170px;
  margin: 0; padding: 0 24px; list-style: none; border-bottom: 1px solid var(--border-subtle);
}
.rpt-bars__week { display: flex; align-items: flex-end; height: 100%; }
.rpt-bars__pair { display: flex; align-items: flex-end; gap: 4px; height: 100%; }
.rpt-bar { display: block; width: 18px; min-height: 2px; border-radius: 2px; }
.rpt-bars__axis {
  display: flex; justify-content: space-between; padding: 0 16px;
  font-size: 12px; line-height: 16px; color: var(--text-secondary); text-align: center;
}
.rpt-bars__axis > span { width: 56px; }

.rpt-card--table { padding: 0; gap: 0; overflow: hidden; }
.rpt-card--table .rpt-card__title { padding: 18px 20px 10px; }
.rpt-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 18px; color: var(--text-primary); }
.rpt-table thead th {
  padding: 8px 6px; background: var(--bg-sunken); text-align: left;
  font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-secondary);
}
.rpt-table th:first-child, .rpt-table td:first-child { padding-left: 20px; }
.rpt-table th:last-child, .rpt-table td:last-child { padding-right: 20px; }
.rpt-table tbody th, .rpt-table tbody td { padding: 12px 6px; border-top: 1px solid var(--border-subtle); text-align: left; font-weight: 400; }
.rpt-table tbody td { white-space: nowrap; }
.rpt-table__rate { font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap; }
.rpt-table__rate--warning { color: var(--text-warning); }
.rpt-alert {
  display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 12px 20px;
  font-size: 12px; line-height: 16px; color: var(--text-secondary);
}
.rpt-alert svg { flex: none; color: var(--text-warning); }

.rpt-topics { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rpt-topic { display: grid; grid-template-columns: 170px minmax(40px, 1fr) auto; align-items: center; gap: 12px; }
.rpt-topic__label { font-size: 13px; line-height: 18px; color: var(--text-primary); overflow-wrap: anywhere; }
.rpt-topic__track { display: block; height: 8px; border-radius: 4px; background: var(--bg-sunken); }
.rpt-topic__fill { display: block; height: 100%; border-radius: 4px; background: var(--sage-300); }
.rpt-topic__pct { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-primary); white-space: nowrap; }

.rpt-backlog {
  display: flex; align-items: center; gap: 12px; padding: 16px;
  border-radius: var(--radius-md); background: var(--bg-sunken); color: var(--text-primary);
}
.rpt-backlog svg { flex: none; color: var(--text-secondary); }
.rpt-backlog p { flex: 1; margin: 0; font-size: 13px; line-height: 18px; }

@media (max-width: 1100px) {
  .rpt-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .rpt-kpis { grid-template-columns: minmax(0, 1fr); }
  .rpt-topic { grid-template-columns: minmax(0, 1fr) auto; }
  .rpt-topic__track { grid-column: 1 / -1; grid-row: 2; }
  .rpt-backlog { flex-wrap: wrap; }
}
