/* Victory+ QC Dashboard — single stylesheet */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-bg:          #f3f4f6;
  --c-surface:     #ffffff;
  --c-surface-alt: #f9fafb;   /* table headers, hover rows */
  --c-surface-2:   #fafafa;   /* exception detail backgrounds */
  --c-border:      #e5e7eb;
  --c-border-soft: #f3f4f6;   /* in-table row separators */
  --c-text:        #111827;
  --c-text-soft:   #374151;   /* secondary text inside tables/cards */
  --c-muted:       #6b7280;
  --c-brand:       #6366f1;
  --c-brand-hover: #4f46e5;

  --c-ok:       #16a34a;
  --c-warn:     #ca8a04;
  --c-fail:     #dc2626;
  --c-high:     #ea580c;
  --c-info:     #0891b2;
  --c-purple:   #7c3aed;

  /* Tinted row backgrounds for fail/warn/missing states */
  --c-row-fail:    #fff8f8;
  --c-row-fail-2:  #fff5f5;
  --c-row-warn:    #fffdf0;
  --c-row-warn-2:  #fffbeb;

  /* Tag pills (stream, tab, restrictions) */
  --c-stream-bg:        #ede9fe;
  --c-stream-text:      #6d28d9;
  --c-tab-bg:           #e0f2fe;
  --c-tab-text:         #0369a1;
  --c-restrictions-bg:  #fef3c7;
  --c-restrictions-text:#92400e;

  /* Historical-mode banner */
  --c-hist-bg:      #fef3c7;
  --c-hist-border:  #f59e0b;
  --c-hist-accent:  #d97706;
  --c-hist-text:    #78350f;
  --c-hist-sub:     #92400e;
  --c-hist-link:    #b45309;

  /* Game alert boxes */
  --c-alert-fail-bg:     #fef2f2;
  --c-alert-fail-border: #fecaca;
  --c-alert-fail-text:   #7f1d1d;
  --c-alert-warn-bg:     #fffbeb;
  --c-alert-warn-border: #fde68a;
  --c-alert-warn-text:   #78350f;
  --c-alert-ok-bg:       #f0fdf4;
  --c-alert-ok-border:   #bbf7d0;
  --c-alert-ok-text:     #14532d;

  /* Form input colors */
  --c-input-bg:     #ffffff;
  --c-input-text:   #111111;
  --c-input-border: #d1d5db;

  /* Open-game-card stronger border */
  --c-border-strong: #d1d5db;

  /* Agent suggestion box — the AI explanation panel beneath failing checks
     and alongside missing-in-cms / missing-in-schedule alerts. Must stand
     out from the surrounding table so it reads as advice, not data. */
  --c-agent-bg:        #eef2ff;
  --c-agent-accent:    #6366f1;
  --c-agent-label-bg:  #c7d2fe;
  --c-agent-label-tx:  #3730a3;
  --c-agent-action:    #4338ca;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
}

[data-theme="dark"] {
  --c-bg:          #0f172a;
  --c-surface:     #1e293b;
  --c-surface-alt: #273449;
  --c-surface-2:   #232f44;
  --c-border:      #334155;
  --c-border-soft: #273449;
  --c-text:        #e5e7eb;
  --c-text-soft:   #cbd5e1;
  --c-muted:       #94a3b8;
  --c-brand:       #818cf8;
  --c-brand-hover: #a5b4fc;

  --c-ok:       #4ade80;
  --c-warn:     #facc15;
  --c-fail:     #f87171;
  --c-high:     #fb923c;
  --c-info:     #22d3ee;
  --c-purple:   #a78bfa;

  --c-row-fail:    #3a1f23;
  --c-row-fail-2:  #3d1f23;
  --c-row-warn:    #3a3019;
  --c-row-warn-2:  #3d3219;

  --c-stream-bg:        #312e81;
  --c-stream-text:      #c4b5fd;
  --c-tab-bg:           #0c4a6e;
  --c-tab-text:         #7dd3fc;
  --c-restrictions-bg:  #3d3219;
  --c-restrictions-text:#fcd34d;

  --c-hist-bg:      #3d3219;
  --c-hist-border:  #b45309;
  --c-hist-accent:  #d97706;
  --c-hist-text:    #fcd34d;
  --c-hist-sub:     #fbbf24;
  --c-hist-link:    #fb923c;

  --c-alert-fail-bg:     #3a1f23;
  --c-alert-fail-border: #5d2a30;
  --c-alert-fail-text:   #fca5a5;
  --c-alert-warn-bg:     #3a3019;
  --c-alert-warn-border: #5d4d27;
  --c-alert-warn-text:   #fcd34d;
  --c-alert-ok-bg:       #1f3d28;
  --c-alert-ok-border:   #2d5d3a;
  --c-alert-ok-text:     #86efac;

  --c-input-bg:     #1e293b;
  --c-input-text:   #e5e7eb;
  --c-input-border: #475569;

  --c-border-strong: #475569;

  --c-agent-bg:        #1e1b4b;
  --c-agent-accent:    #818cf8;
  --c-agent-label-bg:  #3730a3;
  --c-agent-label-tx:  #e0e7ff;
  --c-agent-action:    #c7d2fe;

  color-scheme: dark;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.5;
  padding: 24px 16px;
}

/* ── Theme toggle (fixed top-right, available on every page) ──────────── */

.theme-toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 100;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.theme-toggle:hover {
  background: var(--c-surface-alt);
  border-color: var(--c-brand);
  transform: scale(1.05);
}
.theme-toggle:active {
  transform: scale(0.95);
}
.theme-toggle-icon {
  pointer-events: none;
}

.user-bar {
  position: fixed;
  top: 12px;
  right: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--c-muted);
  z-index: 100;
}
.user-bar-logout {
  font-size: 0.78rem;
  color: var(--c-muted);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: 2px 8px;
}
.user-bar-logout:hover { color: var(--c-text); text-decoration: none; }

a { color: var(--c-brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.85em; }

/* ── Layout ──────────────────────────────────────────────────────────────── */

.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.page-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  flex: 1;
}
.back-link {
  font-size: 0.85rem;
  color: var(--c-brand);
}

.date-picker-form {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}
.date-picker-label {
  color: var(--c-muted);
}
.date-picker-form input[type="date"] {
  font: inherit;
  padding: 4px 8px;
  border: 1px solid var(--c-input-border);
  border-radius: 4px;
  background: var(--c-input-bg);
  color: var(--c-input-text);
  cursor: pointer;
}
.date-picker-form input[type="date"]:hover {
  border-color: var(--c-brand);
}
.date-picker-clear {
  font-size: 0.8rem;
  color: var(--c-brand);
  text-decoration: none;
}
.date-picker-clear:hover {
  text-decoration: underline;
}

.historical-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--c-hist-bg);
  border: 1px solid var(--c-hist-border);
  border-left: 4px solid var(--c-hist-accent);
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 20px;
  color: var(--c-hist-text);
}
.historical-banner-icon {
  font-size: 1.4rem;
  line-height: 1;
}
.historical-banner-sub {
  font-size: 0.82rem;
  margin-top: 4px;
  color: var(--c-hist-sub);
}
.historical-banner-sub a {
  color: var(--c-hist-link);
  text-decoration: underline;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-muted);
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-border);
}

.history-section { border: none; }
.history-summary { cursor: pointer; list-style: none; user-select: none; }
.history-summary::-webkit-details-marker { display: none; }
.history-summary::before { content: "▶  "; font-size: 0.65rem; }
details[open] .history-summary::before { content: "▼  "; }

/* ── Summary tiles ───────────────────────────────────────────────────────── */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.tile {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 16px;
}
.tile-label {
  font-size: 0.75rem;
  color: var(--c-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.tile-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}
.tile-sub {
  font-size: 0.75rem;
  color: var(--c-muted);
  margin-top: 4px;
}

/* ── Run cards ───────────────────────────────────────────────────────────── */

.run-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 12px;
}
.run-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.run-card-meta {
  font-size: 0.82rem;
  color: var(--c-muted);
}
.run-card-counts {
  font-size: 0.85rem;
  margin-left: auto;
}
.run-card-link {
  font-size: 0.8rem;
}
.run-exceptions {
  margin-top: 14px;
  border-top: 1px solid var(--c-border);
  padding-top: 12px;
}

/* ── Exceptions ──────────────────────────────────────────────────────────── */

.exception {
  border-left: 3px solid var(--c-border);
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--c-surface-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.exception-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.exception-fields {
  font-size: 0.78rem;
  color: var(--c-text);
  margin-top: 4px;
}
.exception-fields span.label { color: var(--c-muted); }
.agent-decision {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--c-bg);
  border-radius: var(--r-sm);
  font-size: 0.82rem;
}
.agent-decision p { margin-top: 4px; }

/* ── Badges ──────────────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #fff;
  white-space: nowrap;
}

/* status */
.badge-complete   { background: var(--c-ok); }
.badge-failed     { background: var(--c-fail); }
.badge-triggered,
.badge-fetching,
.badge-comparing  { background: var(--c-info); }
.badge-agent_review { background: var(--c-purple); }

/* run type */
.badge-daily    { background: #475569; }        /* slate — neutral */
.badge-planning { background: #7c3aed; }        /* purple — forward-looking */

/* severity */
.badge-critical { background: var(--c-fail); }
.badge-high     { background: var(--c-high); }
.badge-medium   { background: var(--c-warn); }
.badge-low      { background: var(--c-ok); }

/* urgency */
.urgency-before_broadcast { color: var(--c-fail); font-weight: 600; }
.urgency-same_day         { color: var(--c-high); font-weight: 600; }
.urgency-low_priority     { color: var(--c-ok);   font-weight: 600; }

/* ── Today's Broadcast Schedule ─────────────────────────────────────────── */

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  font-size: 0.83rem;
  margin-bottom: 20px;
}
.schedule-table th {
  background: var(--c-surface-alt);
  padding: 8px 12px;
  text-align: left;
  font-size: 0.72rem;
  color: var(--c-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--c-border);
}
.sched-row td { padding: 9px 12px; border-bottom: 1px solid var(--c-border-soft); vertical-align: middle; }
.sched-row:last-child td { border-bottom: none; }
.sched-row:hover td { background: var(--c-surface-alt); }
.sched-row-fail td,
.sched-row-missing_in_cms td { background: var(--c-row-fail); }
.sched-row-warn td { background: var(--c-row-warn); }
.sched-icon { font-size: 1rem; width: 30px; text-align: center; }
.sched-time { white-space: nowrap; color: var(--c-muted); font-size: 0.8rem; width: 110px; }
.sched-game { font-weight: 500; }
.sched-stream { width: 130px; }
.sched-status { white-space: nowrap; font-size: 0.8rem; font-weight: 500; }

/* ── Trigger form ────────────────────────────────────────────────────────── */

.trigger-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}
.trigger-form select,
.trigger-form button {
  padding: 7px 14px;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  cursor: pointer;
}
.trigger-form button {
  background: var(--c-brand);
  color: #fff;
  border-color: var(--c-brand);
  font-weight: 600;
}
.trigger-form button:hover { background: var(--c-brand-hover); border-color: var(--c-brand-hover); }
.trigger-form button.btn-danger {
  background: #fff;
  color: var(--c-fail);
  border-color: var(--c-fail);
  font-weight: 600;
}
.trigger-form button.btn-danger:hover { background: var(--c-fail); color: #fff; }

/* ── Run detail — trace table ────────────────────────────────────────────── */

.trace-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  font-size: 0.83rem;
}
.trace-table th {
  background: var(--c-surface-alt);
  padding: 8px 12px;
  text-align: left;
  font-size: 0.72rem;
  color: var(--c-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--c-border);
}
.trace-table td {
  padding: 8px 12px;
  vertical-align: top;
  border-bottom: 1px solid var(--c-border-soft);
}
.trace-table tr.error-row { background: var(--c-row-fail-2); }
.trace-meta {
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--c-text);
  background: var(--c-surface-alt);
  padding: 3px 8px;
  border-radius: var(--r-sm);
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--c-muted);
}
.empty-state p { font-size: 0.9rem; margin-top: 8px; }

/* ── 7-day table ─────────────────────────────────────────────────────────── */

.runs-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  font-size: 0.83rem;
}
.runs-table th {
  background: var(--c-surface-alt);
  padding: 8px 12px;
  text-align: left;
  font-size: 0.72rem;
  color: var(--c-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--c-border);
}
.runs-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border-soft);
  vertical-align: middle;
}
.runs-table tr:last-child td { border-bottom: none; }
.runs-table tr:hover td { background: var(--c-surface-alt); }

/* ── Game cards (expandable per-game rows) ───────────────────────────────── */

.game-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  overflow: hidden;
}
.game-card[open] { border-color: var(--c-border-strong); }

.game-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  flex-wrap: wrap;
  user-select: none;
}
.game-summary::-webkit-details-marker { display: none; }
.game-summary:hover { background: var(--c-surface-alt); }

/* Allow selecting the actual text content while keeping the row non-selectable */
.game-name, .game-cms-id, .game-name a, .game-cms-id a { user-select: text; }

.game-icon { font-size: 1.1rem; flex-shrink: 0; }
.game-name-block { flex: 1; min-width: 140px; }
.game-source-label { font-size: 0.7rem; font-weight: 600; color: var(--c-muted);
                     margin-right: 4px; }
.game-source-label::after { content: " –"; }
.game-name   { display: block; font-weight: 600; font-size: 0.92rem; }
.game-name a { color: inherit; text-decoration: none; }
.game-name a:hover { text-decoration: underline; }
.game-cms-id { display: block; font-size: 0.75rem; color: var(--c-muted); margin-top: 2px; }
.game-cms-id a { color: var(--c-muted); text-decoration: none; }
.game-cms-id a:hover { color: var(--c-brand); text-decoration: underline; }
.vp-player-link { margin-left: 8px; font-size: 0.7rem; font-weight: 600; color: var(--c-brand) !important; }
.game-meta     { font-size: 0.78rem; color: var(--c-muted); white-space: nowrap; }
.stream-tag {
  background: var(--c-stream-bg);
  color: var(--c-stream-text);
  padding: 1px 7px;
  border-radius: var(--r-sm);
  font-weight: 500;
}
.tab-tag {
  background: var(--c-tab-bg);
  color: var(--c-tab-text);
  padding: 1px 7px;
  border-radius: var(--r-sm);
  font-weight: 500;
}
.restrictions-tag {
  background: var(--c-restrictions-bg);
  color: var(--c-restrictions-text);
  padding: 1px 7px;
  border-radius: var(--r-sm);
  font-weight: 500;
  white-space: normal;
}
.game-status-badge {
  font-size: 0.78rem;
  font-weight: 600;
  margin-left: auto;
  white-space: nowrap;
}

.game-body {
  border-top: 1px solid var(--c-border);
  padding: 12px 16px 16px;
}

/* ── Check table (field-by-field comparison) ─────────────────────────────── */

.check-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  margin-bottom: 4px;
}
.check-table th {
  text-align: left;
  font-size: 0.72rem;
  color: var(--c-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px 8px;
  border-bottom: 1px solid var(--c-border);
}
.check-row td { padding: 7px 8px; border-bottom: 1px solid var(--c-border-soft); vertical-align: middle; }
.check-row:last-of-type td { border-bottom: none; }
.check-row.check-fail { background: var(--c-row-fail-2); }
.check-row.check-warn { background: var(--c-row-warn-2); }
.check-label { font-weight: 500; color: var(--c-text); width: 200px; }
.check-val { color: var(--c-text-soft); font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.8rem; }
.check-icon { text-align: center; font-size: 1rem; width: 32px; }

.agent-row td { padding: 4px 8px 12px; }
.agent-suggestion {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--c-agent-bg);
  border-left: 3px solid var(--c-agent-accent);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  line-height: 1.45;
}
.agent-suggestion-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--c-agent-label-bg);
  color: var(--c-agent-label-tx);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.agent-suggestion-body { flex: 1; min-width: 220px; color: var(--c-text); }
.agent-suggestion-body strong { display: block; font-weight: 600; margin-bottom: 4px; }
.agent-suggestion-action {
  display: block;
  color: var(--c-agent-action);
  font-weight: 500;
  font-size: 0.82rem;
}
.agent-suggestion-action::before {
  content: "→ ";
  color: var(--c-agent-accent);
  font-weight: 700;
}

/* ── Alert boxes (missing_in_cms / missing_in_schedule / clean) ──────────── */

.game-alert {
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 0.85rem;
  line-height: 1.6;
}
.game-alert-fail { background: var(--c-alert-fail-bg); border: 1px solid var(--c-alert-fail-border); color: var(--c-alert-fail-text); }
.game-alert-warn { background: var(--c-alert-warn-bg); border: 1px solid var(--c-alert-warn-border); color: var(--c-alert-warn-text); }
.game-alert-ok   { background: var(--c-alert-ok-bg);   border: 1px solid var(--c-alert-ok-border);   color: var(--c-alert-ok-text); }
.game-alert-meta { margin-top: 6px; font-size: 0.8rem; opacity: 0.85; }

/* ── Acknowledgment UI ───────────────────────────────────────────────────── */

.check-row.check-acked { background: var(--c-alert-ok-bg); }
.check-action { width: 200px; vertical-align: middle; padding: 4px 8px; }

.ack-details { display: inline-block; }
.ack-details summary { list-style: none; }
.ack-details summary::-webkit-details-marker { display: none; }

.ack-btn {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--c-muted);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  background: var(--c-surface);
  transition: color 0.12s, border-color 0.12s;
  user-select: none;
}
.ack-btn:hover { color: var(--c-brand); border-color: var(--c-brand); }

.ack-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding: 10px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  min-width: 220px;
}
.ack-note {
  font-size: 0.8rem;
  padding: 6px 8px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  background: var(--c-surface-alt);
  color: var(--c-text);
  resize: none;
  font-family: inherit;
}
.ack-submit {
  align-self: flex-end;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: var(--c-ok);
  border: none;
  border-radius: 4px;
  padding: 4px 14px;
  cursor: pointer;
  transition: opacity 0.12s;
}
.ack-submit:hover { opacity: 0.85; }

.ack-badge {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--c-ok);
  font-weight: 600;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.ack-reverse-form { display: inline; margin-left: 4px; }
.ack-reverse-btn {
  font-size: 0.68rem;
  color: var(--c-muted);
  background: none;
  border: 1px solid var(--c-border);
  border-radius: 3px;
  padding: 1px 6px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.ack-reverse-btn:hover { color: var(--c-fail); border-color: var(--c-fail); }

.acked-alert { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  body { padding: 16px 12px; }
  .page-header h1 { font-size: 1.2rem; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .run-card-counts { margin-left: 0; width: 100%; }
  .trace-table th:first-child,
  .trace-table td:first-child { display: none; }
}
