/* ==========================================================================
   FUTURISTIC HIGH-TECH THEME (Inspired by ScorePulse, Loud, and Modern Dashboards)
   Russian Championship FINAL 2026: Spartans Moscow (Gold) vs Motors Kazan (Green)
   ========================================================================== */

:root {
  /* Core Colors */
  --bg-deep: #080b11;
  --bg-canvas: #0b0f19;
  --bg-surface: #101626;
  --bg-card: rgba(18, 26, 44, 0.72);
  --bg-card-subtle: rgba(23, 33, 56, 0.5);
  --border-light: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 189, 248, 0.35);

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-hero: 'Montserrat', sans-serif;

  /* Team Palettes */
  --gold-primary: #f59e0b;
  --gold-light: #fbbf24;
  --gold-dark: #b45309;
  --gold-glow: rgba(245, 158, 11, 0.28);

  --green-primary: #10b981;
  --green-light: #34d399;
  --green-dark: #047857;
  --green-glow: rgba(16, 185, 129, 0.28);

  /* Accents */
  --accent-blue: #38bdf8;
  --accent-indigo: #6366f1;
  --accent-red: #ef4444;
  --text-primary: #f8fafc;
  --text-body: #cbd5e1;
  --text-muted: #64748b;

  /* Dimensions */
  --sidebar-w: 250px;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 12% 15%, rgba(99, 102, 241, 0.07), transparent 35%),
    radial-gradient(circle at 88% 85%, rgba(16, 185, 129, 0.07), transparent 35%),
    radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.04), transparent 50%);
  background-attachment: fixed;
}

/* ==========================================================================
   APP LAYOUT (Sidebar Dock on Left + Main Viewport on Right)
   ========================================================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ==========================================================================
   SIDEBAR DOCK (Futuristic Vertical Navigation)
   ========================================================================== */
.sidebar-dock {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: rgba(11, 16, 28, 0.88);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
}

.sidebar-brand {
  padding: 20px 18px 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
}

.brand-icon-box {
  width: 38px;
  height: 38px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-hero);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #fff;
  line-height: 1.1;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-blue);
  letter-spacing: 0.08em;
}

/* Sidebar Nav Buttons */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.nav-item i {
  font-size: 1.25rem;
  color: #718096;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}

.nav-item:hover i {
  color: var(--accent-blue);
}

.nav-item.active {
  background: rgba(56, 189, 248, 0.12);
  color: #fff;
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.15);
}

.nav-item.active i {
  color: var(--accent-blue);
}

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.2);
}

.match-pill-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #cbd5e1;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-red);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-red);
}

/* ==========================================================================
   MAIN VIEWPORT
   ========================================================================== */
.main-viewport {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.content-scrollable {
  flex: 1;
  padding: 20px 28px 40px 28px;
  max-width: 1600px;
  width: 100%;
}

/* ==========================================================================
   FUTURISTIC MATCH HEADER BANNER (ScorePulse Style)
   ========================================================================== */
.futuristic-match-header {
  padding: 18px 28px;
  background: rgba(14, 20, 34, 0.65);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
}

.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.league-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.04em;
}

.match-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.match-teams-display {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.team-block {
  display: flex;
  align-items: center;
  gap: 18px;
}

.team-home {
  justify-content: flex-end;
  text-align: right;
}

.team-away {
  justify-content: flex-start;
  text-align: left;
}

.team-city {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.team-name {
  font-family: var(--font-hero);
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  margin: 2px 0;
}

.team-sub {
  font-size: 0.75rem;
  color: #94a3b8;
}

.team-logo-frame {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gold-glow {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 20px var(--gold-glow);
}

.green-glow {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 20px var(--green-glow);
}

.team-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Score Center Box */
.score-center-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 24px;
  background: rgba(10, 14, 24, 0.7);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.final-score {
  font-family: var(--font-hero);
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.score-num.gold {
  color: var(--gold-light);
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.score-num.green {
  color: var(--green-light);
  text-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.score-divider {
  color: var(--text-muted);
  font-weight: 400;
}

.final-status-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.quarter-breakdown-bar {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.q-cell {
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.q-cell span {
  font-size: 0.6rem;
  color: var(--text-muted);
}

.q-cell strong {
  color: #cbd5e1;
}

/* ==========================================================================
   PANELS & CARDS (Dark Glassmorphic StatMuse High-Tech)
   ========================================================================== */
.statmuse-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  margin-bottom: 24px;
}

.panel-header {
  padding: 14px 20px;
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.header-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-header h3 {
  font-family: var(--font-hero);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.panel-body {
  padding: 20px;
}

.tab-content-panel {
  display: none;
}

.tab-content-panel.active {
  display: block;
  animation: fadeIn 0.25s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   WORKBENCH LAYOUT (PLAYER ON LEFT, PBP ON RIGHT)
   ========================================================================== */
.workbench-layout-rev {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 22px;
  align-items: start;
}

@media (max-width: 1150px) {
  .workbench-layout-rev {
    grid-template-columns: 1fr;
  }
}

.workbench-stage-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.video-frame-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.video-frame-box iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-link-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-xs);
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-link-action:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #fff;
}

/* Quick Scoring Moments Chips (STRICTLY UNDER THE PLAYER) */
.quick-moments-wrap {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(14, 20, 34, 0.6);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.quick-moments-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.moment-btn {
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.moment-btn .t {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 5px;
  border-radius: 3px;
}

.moment-btn:hover {
  border-color: var(--accent-blue);
  color: #fff;
  transform: translateY(-1px);
}

.moment-btn.sp {
  border-left: 3px solid var(--gold-primary);
}

.moment-btn.mot {
  border-left: 3px solid var(--green-primary);
}

/* Tactical Pitch Viewport */
.field-viewport {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: #000;
}

.field-svg {
  width: 100%;
  height: auto;
  display: block;
}

.play-summary-card {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.tag-badge {
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
}

.tag-badge.sp {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--gold-light);
}

.tag-badge.mot {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--green-light);
}

.tag-badge.td {
  background: rgba(245, 158, 11, 0.25);
  border-color: var(--gold-primary);
  color: #fff;
  font-weight: 800;
}

.play-desc-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #e2e8f0;
  margin-bottom: 10px;
}

.meta-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 0.78rem;
}

.meta-stats-row .item span {
  color: var(--text-muted);
  display: block;
  font-size: 0.7rem;
}

/* ==========================================================================
   WORKBENCH PLAY-BY-PLAY SIDEBAR (RIGHT COLUMN)
   ========================================================================== */
.workbench-pbp-column {
  display: flex;
  flex-direction: column;
}

.pbp-sidebar-panel {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 100%;
}

.pbp-sidebar-filters {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
}

.quarter-filter-pill {
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.quarter-filter-pill:hover,
.quarter-filter-pill.active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
}

.workbench-pbp-list {
  flex: 1;
  overflow-y: visible;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.workbench-drive-group {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: var(--bg-surface);
}

.workbench-drive-header {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border-light);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #cbd5e1;
}

.workbench-play-card {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.workbench-play-card:last-child {
  border-bottom: none;
}

.workbench-play-card:hover {
  background: rgba(56, 189, 248, 0.08);
}

.workbench-play-card.active {
  background: rgba(56, 189, 248, 0.16);
  border-left: 4px solid #38bdf8;
}

.workbench-play-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.workbench-play-down {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.workbench-play-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.workbench-play-desc {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-body);
}

.workbench-play-penalty {
  margin-top: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #fca5a5;
}

/* ==========================================================================
   TRENCH CARDS (OL & DL HIGH-TECH CARDS)
   ========================================================================== */
.trench-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.lineman-slot-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
}

.lineman-slot-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.lineman-slot-card.grade-elite {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: inset 0 2px 0 var(--gold-primary);
}

.lineman-slot-card.grade-good {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: inset 0 2px 0 var(--green-primary);
}

.lineman-slot-card.grade-weak {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: inset 0 2px 0 var(--accent-red);
}

.slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.slot-pos-badge {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}

.slot-player-name {
  font-family: var(--font-hero);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.slot-metrics {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
}

.metric-line {
  display: flex;
  justify-content: space-between;
  color: var(--text-body);
}

.metric-line.highlight {
  font-weight: 700;
  color: #fff;
}

.metric-line.danger {
  color: #fca5a5;
  font-weight: 700;
}

.slot-notes {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 10px;
  border-radius: var(--radius-xs);
}

.pressure-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.pressure-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ==========================================================================
   TABLES & METRICS (StatMuse Style)
   ========================================================================== */
.statmuse-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
}

.statmuse-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}

.statmuse-table th {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-light);
}

.statmuse-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-body);
}

.statmuse-table tr:last-child td {
  border-bottom: none;
}

.statmuse-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.metrics-strip {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.btn-toggle-group {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  padding: 3px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-light);
}

.btn-toggle {
  padding: 5px 12px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-toggle.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ==========================================================================
   2D QB PASS MATRIX
   ========================================================================== */
.matrix-layout-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .matrix-layout-grid {
    grid-template-columns: 1fr;
  }
}

.matrix-grid-table {
  display: grid;
  grid-template-columns: 140px repeat(3, 1fr);
  gap: 8px;
}

.matrix-col-header {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  padding: 8px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.matrix-row-label {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #cbd5e1;
  display: flex;
  align-items: center;
}

.matrix-cell {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.matrix-cell.gold-hot {
  background: rgba(245, 158, 11, 0.18);
  border-color: var(--gold-primary);
}

.matrix-cell.green-hot {
  background: rgba(16, 185, 129, 0.18);
  border-color: var(--green-primary);
}

.matrix-cell.int-cell {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--accent-red);
}

.matrix-cell .stat-big {
  font-family: var(--font-hero);
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.matrix-cell .sub-stat {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-body);
  margin-top: 3px;
}

.matrix-cell .targets-list {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 6px;
}

/* ==========================================================================
   MVP PODIUM & DISCREPANCIES
   ========================================================================== */
.podium-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.podium-box-statmuse {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  position: relative;
}

.podium-box-statmuse.rank-1 {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.2);
}

.podium-avatar-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-hero);
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}

.podium-name {
  font-family: var(--font-hero);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.podium-score {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 900;
  margin-top: 6px;
}

/* Discrepancy Callout */
.discrepancy-callout-box {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-xs);
  padding: 14px 18px;
  margin-bottom: 20px;
}

.callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #fca5a5;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.callout-desc {
  font-size: 0.84rem;
  line-height: 1.5;
  color: #e2e8f0;
}

/* ==========================================================================
   MOBILE & RESPONSIVE OPTIMIZATION
   ========================================================================== */
@media (max-width: 980px) {
  .app-layout {
    flex-direction: column;
  }

  .sidebar-dock {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }

  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 10px;
  }

  .nav-item {
    padding: 8px 12px;
    width: auto;
  }

  .sidebar-footer {
    display: none;
  }

  .match-teams-display {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
  }

  .team-home, .team-away {
    justify-content: center;
    text-align: center;
  }

  .content-scrollable {
    padding: 14px;
  }

  .workbench-layout-rev {
    grid-template-columns: 1fr;
  }

  .pbp-sidebar-panel {
    height: auto;
  }
}


/* ================= COLLAPSIBLE DRIVE ACCORDION ================= */
.workbench-drive-group {
  margin-bottom: 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: var(--bg-surface);
  transition: border-color 0.2s ease;
}

.workbench-drive-group.expanded {
  border-color: rgba(56, 189, 248, 0.4);
}

.workbench-drive-header {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s ease;
  border-bottom: 1px solid transparent;
}

.workbench-drive-header:hover {
  background: rgba(255, 255, 255, 0.08);
}

.workbench-drive-group.expanded .workbench-drive-header {
  border-bottom: 1px solid var(--border-light);
  background: rgba(56, 189, 248, 0.08);
}

.workbench-drive-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-hero);
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
}

.drive-arrow {
  font-size: 1.15rem;
  color: var(--accent-blue);
  transition: transform 0.2s ease;
}

.workbench-drive-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.drive-plays-count {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
}

.drive-badge-team.sp {
  color: var(--gold-primary);
  font-weight: 800;
}

.drive-badge-team.mot {
  color: var(--green-primary);
  font-weight: 800;
}

.workbench-play-penalty {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  border-radius: var(--radius-xs);
  padding: 3px 8px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  margin-top: 6px;
}

/* ================= DISCREPANCIES TABLE & METHODOLOGY ================= */
.methodology-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.methodology-step-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  padding: 12px;
}

.step-title {
  font-family: var(--font-hero);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-blue);
  margin-bottom: 6px;
}

.step-desc {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.discrepancies-table-wrap {
  overflow-x: auto;
}

.discrepancies-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.discrepancies-table th {
  background: rgba(255, 255, 255, 0.04);
  padding: 11px 14px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-light);
}

.discrepancies-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.table-metric-cell {
  color: #fff;
  font-family: var(--font-hero);
  font-size: 0.84rem;
}

.table-num-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.84rem;
}

.fafr-val {
  color: var(--gold-light);
  text-align: center;
}

.cv-val {
  color: var(--green-light);
  text-align: center;
}

.delta-val {
  color: #f1f5f9;
  text-align: center;
}

.table-comment-cell {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.metric-severity-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.badge-exact {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-minor {
  background: rgba(245, 158, 11, 0.15);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-critical {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.5);
}


/* ================= EXPERIMENTAL DISCLAIMER BANNER ================= */
.experimental-disclaimer-banner {
  background: rgba(239, 68, 68, 0.09);
  border-bottom: 1px solid rgba(239, 68, 68, 0.3);
  padding: 9px 24px;
  position: relative;
  z-index: 50;
}

.disclaimer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1600px;
  margin: 0 auto;
}

.disclaimer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.disclaimer-text {
  font-family: var(--font-hero);
  font-size: 0.84rem;
  color: #fca5a5;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.disclaimer-text strong {
  color: #f87171;
  font-weight: 800;
}

.disclaimer-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 9px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  border-radius: var(--radius-xs);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ================= MODERN PBP FILTERS & SEARCH BOX ================= */
.pbp-modern-controls {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  padding: 14px 16px;
}

.pbp-search-box-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input-group {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-input-group .search-icon {
  position: absolute;
  left: 14px;
  font-size: 1.25rem;
  color: var(--accent-blue);
  pointer-events: none;
}

.search-input-group input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  padding: 10px 40px 10px 42px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
}

.search-input-group input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
  background: rgba(15, 23, 42, 0.95);
}

.search-input-group input::placeholder {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.search-clear-btn:hover {
  color: #fff;
}

.search-counter-badge {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 9px 14px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
}

.pbp-toggles-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pbp-toggle-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.toggle-group-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  min-width: 130px;
  text-transform: uppercase;
}

.toggle-pills-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.toggle-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  font-family: var(--font-hero);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  user-select: none;
}

.toggle-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.toggle-pill.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-blue);
  color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

.toggle-pill.sp.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: var(--gold-primary);
  color: var(--gold-light);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.25);
}

.toggle-pill.mot.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: var(--green-primary);
  color: var(--green-light);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
}

.toggle-pill.td.active {
  background: rgba(250, 204, 21, 0.2);
  border-color: #facc15;
  color: #fef08a;
}

.toggle-pill.to.active {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.pill-dot.sp { background: var(--gold-primary); }
.pill-dot.mot { background: var(--green-primary); }


/* ================= DRIVE NET YARDS BADGES ================= */
.drive-yards-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.drive-yards-pill.pos {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.drive-yards-pill.neg {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.drive-yards-pill.zero {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}
