/* ═══════════════════════════════════════════════════════════════
   Bug Reports — Admin Dashboard
   Prefix: br-*   (matches leader-insights.css style)
   ═══════════════════════════════════════════════════════════════ */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.br-root { padding: 0; max-width: 1600px; margin: 0 auto; }

/* ── Header ── */
.br-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border, rgba(99,102,241,0.1));
}
.br-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.25rem; font-weight: 700;
  color: var(--text, #e8edf5);
}
.br-title .lucide { width: 22px; height: 22px; color: var(--primary, #6366f1); }
.br-subtitle {
  font-size: 0.8125rem; color: var(--text-muted, #8b9dc3);
  margin-top: 4px;
}
.br-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.br-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px;
  border: 1px solid var(--border, rgba(99,102,241,0.1));
  background: var(--bg-card, rgba(22,32,56,0.82));
  color: var(--text, #e8edf5);
  font-family: inherit; font-size: 0.8125rem; font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.br-btn:hover {
  background: rgba(99,102,241,0.08);
  border-color: rgba(99,102,241,0.3);
  color: var(--text, #e8edf5);
}
.br-btn:focus-visible { outline: 2px solid var(--primary, #6366f1); outline-offset: 2px; }
.br-btn .lucide { width: 14px; height: 14px; }
.br-btn-primary { background: var(--primary, #6366f1); color: #fff; border-color: transparent; }
.br-btn-primary:hover { background: var(--primary-dark, #4f46e5); color: #fff; }

/* ── KPI Grid ── */
.br-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px; margin-bottom: 24px;
}
@media (max-width: 1100px) { .br-kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px)  { .br-kpi-grid { grid-template-columns: repeat(2, 1fr); } }

.br-kpi {
  position: relative;
  background: var(--bg-card, rgba(22,32,56,0.82));
  border: 1px solid var(--border, rgba(99,102,241,0.1));
  border-radius: 12px;
  padding: 16px; text-align: left;
  transition: border-color 0.15s, transform 0.15s;
}
.br-kpi:hover { border-color: rgba(99,102,241,0.3); transform: translateY(-1px); }
[data-theme="light"] .br-kpi { background: rgba(255,255,255,0.85); }

.br-kpi-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.br-kpi-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(99,102,241,0.10);
}
.br-kpi-icon .lucide { width: 16px; height: 16px; }
.br-kpi-val {
  font-size: 1.75rem; font-weight: 800; line-height: 1.1;
  color: var(--text, #e8edf5);
}
.br-kpi-label {
  font-size: 0.7rem; font-weight: 600;
  color: var(--text-muted, #8b9dc3);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-top: 4px;
}
.br-kpi[data-accent] .br-kpi-val { color: var(--accent-color, var(--text)); }

/* Accent colors via CSS variable */
.br-kpi.accent-indigo { --accent-color: #818cf8; }
.br-kpi.accent-indigo .br-kpi-icon { background: rgba(129,140,248,0.14); color: #818cf8; }
.br-kpi.accent-amber  { --accent-color: #fbbf24; }
.br-kpi.accent-amber  .br-kpi-icon { background: rgba(251,191,36,0.14);  color: #fbbf24; }
.br-kpi.accent-green  { --accent-color: #4ade80; }
.br-kpi.accent-green  .br-kpi-icon { background: rgba(74,222,128,0.14);  color: #4ade80; }
.br-kpi.accent-primary{ --accent-color: #a78bfa; }
.br-kpi.accent-primary .br-kpi-icon { background: rgba(167,139,250,0.14); color: #a78bfa; }
.br-kpi.accent-teal   { --accent-color: #34d399; }
.br-kpi.accent-teal   .br-kpi-icon { background: rgba(52,211,153,0.14);  color: #34d399; }

/* ── Section (card) ── */
.br-section {
  background: var(--bg-card, rgba(22,32,56,0.82));
  border: 1px solid var(--border, rgba(99,102,241,0.1));
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
}
[data-theme="light"] .br-section { background: rgba(255,255,255,0.85); }

.br-section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.br-section-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.9rem; font-weight: 600;
  color: var(--text, #e8edf5);
}
.br-section-title .lucide { width: 16px; height: 16px; color: var(--primary, #6366f1); }
.br-section-sub {
  font-size: 0.75rem; color: var(--text-muted, #8b9dc3);
  margin-top: 2px;
}

/* ── Issue type pills ── */
.br-type-row {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.br-type {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid;
  background: var(--type-bg, rgba(99,102,241,0.06));
  border-color: var(--type-border, rgba(99,102,241,0.15));
}
.br-type-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--type-icon-bg, rgba(99,102,241,0.14));
  flex-shrink: 0;
}
.br-type-icon .lucide { width: 16px; height: 16px; color: var(--type-color, var(--primary)); }
.br-type-val {
  font-size: 1.25rem; font-weight: 800; line-height: 1;
  color: var(--type-color, var(--text));
}
.br-type-label {
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-muted, #8b9dc3);
  margin-top: 2px;
}

/* ── Time filter pills (trend) ── */
.br-tfilter {
  display: inline-flex; gap: 2px; padding: 3px;
  background: rgba(99,102,241,0.06);
  border: 1px solid var(--border, rgba(99,102,241,0.1));
  border-radius: 8px;
}
.br-tfilter-btn {
  background: transparent; border: none;
  color: var(--text-muted, #8b9dc3);
  font-family: inherit; font-size: 0.72rem; font-weight: 600;
  padding: 5px 10px; border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.br-tfilter-btn:hover { color: var(--text, #e8edf5); background: rgba(99,102,241,0.1); }
.br-tfilter-btn.active { background: var(--primary, #6366f1); color: #fff; }

/* ── Charts grid ── */
.br-chart-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-bottom: 16px;
}
.br-chart-body { height: 220px; }

/* ── Table ── */
.br-table-wrap { overflow-x: auto; }
.br-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.8125rem;
}
.br-table thead th {
  padding: 10px 12px; text-align: left;
  font-size: 0.68rem; font-weight: 700;
  color: var(--text-muted, #8b9dc3);
  text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border, rgba(99,102,241,0.15));
  background: rgba(99,102,241,0.03);
  position: sticky; top: 0;
}
.br-table tbody tr {
  border-bottom: 1px solid var(--border, rgba(99,102,241,0.06));
  transition: background 0.15s;
}
.br-table tbody tr:hover { background: rgba(99,102,241,0.04); }
.br-table tbody tr:last-child { border-bottom: none; }
.br-table td { padding: 10px 12px; vertical-align: middle; }
.br-table td.num { text-align: center; font-variant-numeric: tabular-nums; }
.br-table .br-truncate {
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.br-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(99,102,241,0.08);
  color: var(--text-muted, #8b9dc3);
}

.br-chip {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600;
  white-space: nowrap;
  background: var(--chip-bg, rgba(99,102,241,0.12));
  color: var(--chip-color, #818cf8);
}
.br-chip .lucide { width: 12px; height: 12px; margin-right: 3px; }

.br-bar {
  display: flex; align-items: center; gap: 8px;
}
.br-bar-track {
  flex: 1; height: 6px;
  background: rgba(148,163,184,0.12);
  border-radius: 3px; overflow: hidden;
}
.br-bar-fill {
  height: 100%; border-radius: 3px;
  transition: width 0.4s ease;
}
.br-bar-pct {
  font-size: 0.7rem; color: var(--text-muted, #8b9dc3);
  min-width: 32px; text-align: right;
  font-variant-numeric: tabular-nums;
}

.br-empty {
  padding: 40px 20px; text-align: center;
  color: var(--text-muted, #8b9dc3);
  font-size: 0.85rem;
}

.br-error {
  padding: 40px; text-align: center;
}
.br-error-title {
  font-size: 0.95rem; font-weight: 600; color: #f87171;
  margin-bottom: 6px;
}
.br-error-msg { color: var(--text-muted, #8b9dc3); font-size: 0.85rem; margin-bottom: 16px; }

.br-heatmap-wrap { overflow-x: auto; padding: 4px 0; }

/* ── Alias: bridge old .br-* prefix to shared .ap-* design system ── */
/* (Allows Bug Reports to inherit look & feel from admin-ui.css when needed) */
