:root {
  --bg-dark: #070a13;
  --bg-surface: #0b1120;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.14);
  --border-glow: rgba(99, 102, 241, 0.4);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --cyan: #38bdf8;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --indigo: #818cf8;
  
  --gold: #fbbf24;
  --gold-glow: rgba(251, 191, 36, 0.25);
  --silver: #94a3b8;
  --silver-glow: rgba(148, 163, 184, 0.2);
  --bronze: #d97706;
  --bronze-glow: rgba(217, 119, 6, 0.2);
  
  --state-nj: #10b981;
  --state-md: #f97316;
  --state-va: #38bdf8;
  --state-qe: #a855f7;
  
  --radius: 14px;
  --radius-sm: 8px;
  --radius-full: 9999px;
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
}

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

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(99, 102, 241, 0.16), transparent 75%),
    radial-gradient(ellipse 60% 40% at 90% 30%, rgba(56, 189, 248, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 10% 70%, rgba(16, 185, 129, 0.06), transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Auth Lock Screen Modal ────────────────────────────────────────────── */

.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 10, 19, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.auth-card {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 40px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 35px rgba(99, 102, 241, 0.25);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #f97316, #38bdf8, #a855f7);
}

.auth-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  color: var(--indigo);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.auth-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-desc {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-bottom: 28px;
  line-height: 1.6;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  background: rgba(7, 10, 19, 0.7);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 16px 14px 44px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.auth-btn {
  background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.15s, box-shadow 0.2s;
}

.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

.auth-btn-arrow {
  transition: transform 0.2s;
}

.auth-btn:hover .auth-btn-arrow {
  transform: translateX(4px);
}

.auth-error-msg {
  color: var(--rose);
  font-size: 12.5px;
  margin-top: 14px;
  font-weight: 600;
  min-height: 18px;
}

.auth-hints {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 12px;
  text-align: left;
  color: var(--text-muted);
}

.hint-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hint-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.hint-dot.nj { background: var(--state-nj); }
.hint-dot.md { background: var(--state-md); }
.hint-dot.va { background: var(--state-va); }
.hint-dot.qe { background: var(--state-qe); }

/* ── App Shell ──────────────────────────────────────────────────────────── */

.leaderboard-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top Header ─────────────────────────────────────────────────────────── */

.lb-header {
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 16px;
}

.lb-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-symbol {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-main {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.brand-sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--primary);
}

.scope-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.scope-badge.nj { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.35); color: #34d399; }
.scope-badge.md { background: rgba(249, 115, 22, 0.12); border-color: rgba(249, 115, 22, 0.35); color: #fb923c; }
.scope-badge.va { background: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.35); color: #38bdf8; }
.scope-badge.qe { background: rgba(168, 85, 247, 0.14); border-color: rgba(168, 85, 247, 0.35); color: #c084fc; }
.scope-badge.caller { background: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.35); color: #38bdf8; }
.scope-badge.reviver { background: rgba(168, 85, 247, 0.14); border-color: rgba(168, 85, 247, 0.35); color: #c084fc; }

.scope-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse-ring 2s infinite;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulse-ring 1.8s infinite;
}

.live-text {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--emerald);
}

/* ── Period Selector Tabs ────────────────────────────────────────────────── */

.lb-header-center {
  display: flex;
  justify-content: center;
}

.period-tabs {
  background: rgba(15, 23, 42, 0.7);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  display: flex;
  gap: 4px;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.tab-btn *, .role-pill * {
  pointer-events: none;
}

/* ── Header Right Actions ───────────────────────────────────────────────── */

.lb-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.state-filter-dropdown-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
}

.dropdown-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--state-qe);
  letter-spacing: 0.5px;
}

.state-select {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  font-family: inherit;
}

.state-select option {
  background: var(--bg-surface);
  color: #fff;
}

.shift-info-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
}

.status-dot.off { background: var(--text-dim); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s, color 0.15s;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

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

.lb-main-content {
  flex: 1;
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 28px 60px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Controls Bar ───────────────────────────────────────────────────────── */

.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.role-pills {
  display: flex;
  align-items: center;
  gap: 8px;
}

.role-pill {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.role-pill:hover {
  color: #fff;
  border-color: var(--border-light);
}

.role-pill.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: var(--primary);
  color: #fff;
}

.role-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-size: 11px;
}

.benchmark-info-tag {
  font-size: 12.5px;
  color: var(--text-muted);
}

.benchmark-info-tag strong {
  color: var(--cyan);
}

/* ── State Battle Section (QE View) ──────────────────────────────────────── */

.state-battle-container {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.section-title-wrap {
  margin-bottom: 16px;
}

.section-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
}

.section-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.state-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.state-card {
  background: rgba(11, 17, 32, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.state-card:hover {
  transform: translateY(-2px);
}

.state-card.rank-1 {
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.15);
}

.state-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.state-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.state-flag {
  font-size: 20px;
}

.state-name {
  font-size: 16px;
  font-weight: 800;
}

.state-rank-badge {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
}

.state-rank-badge.gold { background: rgba(251, 191, 36, 0.2); color: var(--gold); border: 1px solid var(--gold); }
.state-rank-badge.silver { background: rgba(148, 163, 184, 0.2); color: var(--silver); border: 1px solid var(--silver); }
.state-rank-badge.bronze { background: rgba(217, 119, 6, 0.2); color: var(--bronze); border: 1px solid var(--bronze); }

.state-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.sm-item {
  display: flex;
  flex-direction: column;
}

.sm-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
}

.sm-value {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.sm-value.highlight { color: var(--gold); }
.sm-value.emerald { color: var(--emerald); }

.state-top-rep {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.state-top-rep strong {
  color: #fff;
}

/* ── Top 3 Podium ────────────────────────────────────────────────────────── */

.podium-section {
  margin: 10px 0 10px 0;
}

.podium-container {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: flex-end;
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
}

.podium-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.podium-card:hover {
  transform: translateY(-4px);
}

.podium-card.first {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 35px var(--gold-glow), 0 20px 30px rgba(0, 0, 0, 0.5);
  padding: 32px 24px;
  z-index: 2;
}

.podium-card.second {
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 0 25px var(--silver-glow);
}

.podium-card.third {
  border-color: rgba(217, 119, 6, 0.35);
  box-shadow: 0 0 25px var(--bronze-glow);
}

.podium-rank-crown {
  font-size: 28px;
  margin-bottom: 4px;
}

.podium-rank-pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.first .podium-rank-pill { background: rgba(251, 191, 36, 0.2); color: var(--gold); border: 1px solid var(--gold); }
.second .podium-rank-pill { background: rgba(148, 163, 184, 0.2); color: var(--silver); border: 1px solid var(--silver); }
.third .podium-rank-pill { background: rgba(217, 119, 6, 0.2); color: var(--bronze); border: 1px solid var(--bronze); }

.podium-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-surface-elevated) 0%, #1e293b 100%);
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.first .podium-avatar {
  width: 74px;
  height: 74px;
  border-color: var(--gold);
  box-shadow: 0 0 20px var(--gold-glow);
  font-size: 26px;
}

.podium-name {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.first .podium-name {
  font-size: 21px;
}

.podium-state-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.podium-metrics {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(7, 10, 19, 0.5);
  padding: 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.pm-item {
  display: flex;
  flex-direction: column;
}

.pm-label {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
}

.pm-val {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.pm-val.gold { color: var(--gold); }
.pm-val.emerald { color: var(--emerald); }

.podium-bench-delta {
  font-size: 12px;
  font-weight: 700;
}

.podium-bench-delta.up { color: var(--emerald); }
.podium-bench-delta.down { color: var(--rose); }

/* ── Benchmark KPI Cards Bar ────────────────────────────────────────────── */

.benchmark-kpi-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
}

.kpi-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.kpi-icon {
  font-size: 14px;
}

.kpi-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.kpi-val {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 4px;
}

.kpi-val.highlight { color: var(--gold); }
.kpi-val.emerald { color: var(--emerald); }
.kpi-val.cyan { color: var(--cyan); }

.kpi-meta {
  font-size: 11.5px;
  color: var(--text-dim);
}

/* ── Table Section ──────────────────────────────────────────────────────── */

.table-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-header-wrap {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.table-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.table-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-dim);
}

.table-meta-right {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.lb-table th {
  background: rgba(11, 17, 32, 0.6);
  padding: 12px 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.lb-table td {
  padding: 16px 18px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  vertical-align: middle;
}

.lb-table tbody tr {
  transition: background 0.15s;
}

.lb-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.rank-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.rank-badge.rank-1 { background: rgba(251, 191, 36, 0.2); color: var(--gold); border: 1px solid var(--gold); }
.rank-badge.rank-2 { background: rgba(148, 163, 184, 0.2); color: var(--silver); border: 1px solid var(--silver); }
.rank-badge.rank-3 { background: rgba(217, 119, 6, 0.2); color: var(--bronze); border: 1px solid var(--bronze); }

.rep-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rep-avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
}

.rep-info {
  display: flex;
  flex-direction: column;
}

.rep-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rep-name {
  font-weight: 700;
  color: #fff;
}

.state-chip-sm {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.state-chip-sm.nj { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.state-chip-sm.md { background: rgba(249, 115, 22, 0.15); color: #fb923c; }
.state-chip-sm.va { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }

.rep-role-sm {
  font-size: 11px;
  color: var(--text-dim);
}

.conv-rate-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 100px;
}

.conv-rate-val {
  font-weight: 700;
  color: #fff;
}

.conv-bar-bg {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.conv-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald) 0%, #34d399 100%);
  border-radius: var(--radius-full);
}

.bench-delta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.bench-delta-tag.up {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald);
}

.bench-delta-tag.down {
  background: rgba(244, 63, 94, 0.12);
  color: var(--rose);
}

.table-loading {
  text-align: center;
  padding: 40px !important;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.lb-footer {
  border-top: 1px solid var(--border);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}

/* ── Toasts ─────────────────────────────────────────────────────────────── */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--emerald);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.3);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slide-toast 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s;
}

@keyframes slide-toast {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

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

@media (max-width: 900px) {
  .lb-header {
    flex-direction: column;
    padding: 12px 16px;
    align-items: stretch;
  }
  .lb-header-center {
    order: 3;
    overflow-x: auto;
  }
  .state-grid {
    grid-template-columns: 1fr;
  }
  .podium-container {
    grid-template-columns: 1fr;
  }
  .podium-card.first {
    order: 1;
  }
  .podium-card.second {
    order: 2;
  }
  .podium-card.third {
    order: 3;
  }
  .benchmark-kpi-bar {
    grid-template-columns: 1fr 1fr;
  }
}


/* ── Passwordless Auth Indicators ── */
.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.user-avatar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}
.auth-icon-spin {
  font-size: 36px;
  margin-bottom: 12px;
  animation: pulse-ring 1.8s infinite;
}
.auth-icon-lock {
  font-size: 36px;
  margin-bottom: 12px;
}
.auth-loading-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 24px;
  position: relative;
}
.auth-loading-indicator {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--cyan) 100%);
  border-radius: var(--radius-full);
  animation: loading-sweep 1.6s infinite ease-in-out;
}
@keyframes loading-sweep {
  0% { left: -40%; width: 40%; }
  50% { left: 30%; width: 50%; }
  100% { left: 100%; width: 40%; }
}

/* ── League Arena Badge & Controls Left/Right ──────────────────────────── */
.controls-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.league-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.league-icon {
  font-size: 15px;
}

.league-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #fff;
}

.league-count {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: var(--radius-full);
}

.btn-benchmark-guide {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-full);
  color: #38bdf8;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  margin-left: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-benchmark-guide:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

/* ── Live Inter-State Team War Strip ───────────────────────────────────── */
.state-rivalry-strip {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(10, 15, 30, 0.95) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.srs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.srs-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #fff;
}

.srs-icon {
  font-size: 16px;
}

.srs-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.6px;
}

.srs-callout {
  font-size: 12.5px;
  font-weight: 700;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 6px;
}

.srs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.srs-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.srs-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.srs-card.active-state {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.15);
}

.srs-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.srs-state-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.srs-rank-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.srs-rank-pill.gold { background: rgba(251, 191, 36, 0.2); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.4); }
.srs-rank-pill.silver { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.4); }
.srs-rank-pill.bronze { background: rgba(217, 119, 6, 0.2); color: #f59e0b; border: 1px solid rgba(217, 119, 6, 0.4); }

.srs-stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 2px;
}

.srs-deals {
  font-size: 18px;
  font-weight: 900;
  color: #fbbf24;
}

.srs-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.srs-status-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
  display: inline-block;
  width: fit-content;
}

.srs-status-tag.leader {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.srs-status-tag.chaser {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* ── Crown Chase Badges on Podium ──────────────────────────────────────── */
.crown-chase-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
}

.crown-chase-badge.leader {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.25) 0%, rgba(245, 158, 11, 0.25) 100%);
  border: 1px solid #fbbf24;
  color: #fbbf24;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

.crown-chase-badge.chaser {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.25) 0%, rgba(249, 115, 22, 0.25) 100%);
  border: 1px solid #f97316;
  color: #fb923c;
  animation: pulse-ring 2s infinite;
}

.crown-chase-badge.contender {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid #818cf8;
  color: #a5b4fc;
}

.podium-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}

.badge-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-pill.gold { background: rgba(251, 191, 36, 0.15); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.35); }
.badge-pill.emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35); }
.badge-pill.cyan { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.35); }
.badge-pill.blue { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.35); }
.badge-pill.purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.35); }
.badge-pill.amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.35); }

/* ── Table Chase Gap Column & Pacing ───────────────────────────────────── */
.th-chase {
  min-width: 170px;
}

.gap-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.gap-pill.leader {
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fbbf24;
}

.gap-pill.strike {
  background: rgba(249, 115, 22, 0.2);
  border: 1px solid rgba(249, 115, 22, 0.5);
  color: #fb923c;
  animation: pulse-ring 2s infinite;
}

.gap-pill.chase {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}

.dials-pacing-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pacing-bar-bg {
  width: 90px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.pacing-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #10b981 100%);
  border-radius: var(--radius-full);
}

.pacing-label {
  font-size: 9.5px;
  color: var(--text-dim);
}

/* ── Benchmark Explainer Modal ─────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 10, 19, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

.modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.modal-card {
  background: linear-gradient(180deg, rgba(20, 27, 45, 0.98) 0%, rgba(12, 17, 30, 0.98) 100%);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 20px;
  padding: 32px;
  max-width: 620px;
  width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 35px rgba(99, 102, 241, 0.2);
  position: relative;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title-wrap h3 {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.guide-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.gc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.gc-icon {
  font-size: 16px;
}

.gc-header h4 {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.guide-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.guide-card code {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  color: #38bdf8;
  font-family: inherit;
  font-size: 11px;
}

/* ── Completed Relationships & QE Modals ───────────────────────────────── */
.btn-hdr-completed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.28));
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
}
.btn-hdr-completed:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(217, 119, 6, 0.45));
  border-color: #fbbf24;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.btn-completed-rep-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-size: 14px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-completed-rep-pill:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  color: #fff;
  transform: scale(1.04);
}
.btn-completed-rep-pill--zero {
  opacity: 0.6;
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
}

.btn-ni-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-ni-pill:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
  transform: scale(1.04);
}

.btn-timeline-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-timeline-pill:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #fff;
  transform: scale(1.04);
}

.pool-sort-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.pool-sort-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}
.pool-sort-btn--active {
  background: #6366f1 !important;
  border-color: #818cf8 !important;
  color: #fff !important;
}

.modal-card--lg {
  max-width: 900px !important;
  width: 95% !important;
}

.data-table th, .data-table td {
  padding: 8px 12px;
  font-size: 12px;
}
.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.badge-method {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-method--dispo {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-method--tag {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

