/* QAlity report (Tests -> QAlity report); reuses .e2e-kpi, .e2e-manual, .e2e-link, .e2e-empty from e2e-runs.css */
.qa-controls { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.qa-controls label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-secondary); }
.qa-controls select {
  background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-color);
  border-radius: 8px; padding: 7px 10px; font-size: 13px; min-width: 220px; max-width: 420px;
}
.qa-export { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.qa-export a { text-decoration: none; }
.qa-export a.disabled { opacity: 0.4; pointer-events: none; }

.qa-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.qa-head h3 { font-family: var(--font-head); font-size: 17px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.qa-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.qa-big {
  display: flex; flex-direction: column; align-items: center; padding: 10px 18px; border-radius: 12px;
  background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3);
}
.qa-big b { font-family: var(--font-head); font-size: 28px; color: #fca5a5; font-variant-numeric: tabular-nums; }
.qa-big span { font-size: 12px; color: var(--text-secondary); }
.qa-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 16px; }
.qa-source { margin-top: 12px; }
.qa-source code { font-size: 11px; }
.qa-warn { color: #fbbf24; }

.qa-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.qa-chip {
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-color); border-radius: 999px;
  padding: 6px 12px; font-size: 12px; color: var(--text-secondary); cursor: pointer;
}
.qa-chip b { color: var(--text-primary); margin-right: 4px; font-variant-numeric: tabular-nums; }
.qa-chip.active { border-color: var(--brand-primary); color: var(--text-primary); background: rgba(99, 102, 241, 0.15); }
.qa-chip-manual.active { border-color: #f87171; background: rgba(239, 68, 68, 0.12); }
.qa-chip:disabled { opacity: 0.4; cursor: default; }

.qa-table td { vertical-align: top; }
.qa-test { min-width: 240px; }
.qa-test div { font-size: 13px; margin-top: 2px; }
.qa-state {
  display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.4px; white-space: nowrap; background: rgba(100, 116, 139, 0.2); color: var(--text-secondary);
}
.qa-state-passed { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.qa-state-failed { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.qa-state-not-run { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.qa-state-unknown, .qa-auto-unknown { color: #fbbf24; }
.qa-change { font-size: 12px; font-weight: 600; white-space: nowrap; }
.qa-change-newly-failing { color: #f87171; }
.qa-change-newly-passing { color: #34d399; }
.qa-change-newly-not-run { color: #fbbf24; }
.qa-auto { font-size: 12px; white-space: nowrap; }
.qa-auto-automated, .qa-auto-contract { color: #34d399; }
.qa-auto-partial, .qa-auto-quarantined { color: #fbbf24; }
.qa-auto-skeleton, .qa-auto-none { color: var(--text-muted); }
.qa-why { font-size: 12px; color: var(--text-secondary); max-width: 520px; }
.qa-why details summary { cursor: pointer; margin-top: 4px; }
.qa-why ul { padding-left: 16px; margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.qa-why code { font-size: 11px; color: var(--text-muted); }

@media (max-width: 760px) {
  .qa-controls select { min-width: 0; width: 100%; }
  .qa-controls label { width: 100%; }
  .qa-export { margin-left: 0; }
}

/* base cycle result column and the "not in the base" table */
.qa-h { font-family: var(--font-head); font-size: 15px; }
.qa-base { font-size: 12px; font-weight: 600; white-space: nowrap; }
.qa-base-passed { color: #34d399; }
.qa-base-failed { color: #f87171; }
.qa-base-not-run { color: var(--text-muted); }
