/* ==========================================================================
   NBA Betting Analytics - Ultra Premium Dashboard
   Next-Gen Trading Terminal with Glass Morphism & Micro-Interactions
   ========================================================================== */

/* ==========================================================================
   Design Tokens
   ========================================================================== */

:root {
  /* Deep Dark Backgrounds with blue undertones */
  --bg-darkest: #050608;
  --bg-dark: #0a0e14;
  --bg-card: #0d1117;
  --bg-elevated: #161b22;
  --bg-hover: #1c2128;
  --bg-glass: rgba(13, 17, 23, 0.7);

  /* Borders with glow potential */
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-default: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(249, 115, 22, 0.3);

  /* Text with better contrast */
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #484f58;

  /* Primary Accent - Basketball Orange */
  --accent-primary: #f97316;
  --accent-light: #fb923c;
  --accent-dark: #ea580c;
  --accent-glow: rgba(249, 115, 22, 0.4);
  --accent-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #c2410c 100%);

  /* Secondary Accent - Electric Blue */
  --accent-blue: #3b82f6;
  --accent-blue-light: #60a5fa;
  --accent-blue-glow: rgba(59, 130, 246, 0.4);

  /* Status Colors - More vibrant */
  --positive: #10b981;
  --positive-light: #34d399;
  --positive-glow: rgba(16, 185, 129, 0.3);
  --negative: #f43f5e;
  --negative-light: #fb7185;
  --negative-glow: rgba(244, 63, 94, 0.3);
  --warning: #f59e0b;
  --warning-light: #fbbf24;
  --warning-glow: rgba(245, 158, 11, 0.3);

  /* Injury Betting Impact Tiers */
  --tier-critical: #ef4444;
  --tier-critical-glow: rgba(239, 68, 68, 0.3);
  --tier-high: #f97316;
  --tier-high-glow: rgba(249, 115, 22, 0.3);
  --tier-moderate: #eab308;
  --tier-moderate-glow: rgba(234, 179, 8, 0.3);
  --tier-low: #6b7280;

  /* Spacing (8px grid) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows - Layered for depth */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6), 0 8px 16px rgba(0, 0, 0, 0.4);
  --shadow-glow-orange: 0 0 30px rgba(249, 115, 22, 0.3), 0 0 60px rgba(249, 115, 22, 0.1);
  --shadow-glow-blue: 0 0 30px rgba(59, 130, 246, 0.3), 0 0 60px rgba(59, 130, 246, 0.1);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-darkest);
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Re-enable text selection for inputs and explicitly selectable content */
input, textarea, select,
[contenteditable="true"],
.selectable {
  user-select: text;
  -webkit-user-select: text;
}

/* Animated Background Grid */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(249, 115, 22, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(249, 115, 22, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: -1;
}

/* Gradient Orbs */
body::after {
  content: '';
  position: fixed;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
  animation: floatOrb 20s ease-in-out infinite;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-5%, 5%) scale(1.1); }
  66% { transform: translate(5%, -5%) scale(0.95); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Selection */
::selection {
  background: var(--accent-primary);
  color: white;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

.text-gradient {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-primary) 50%, var(--accent-blue-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-glow {
  text-shadow: 0 0 20px var(--accent-glow), 0 0 40px var(--accent-glow);
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: var(--space-8);
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}

.page-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  letter-spacing: -0.03em;
}

.page-title svg {
  width: 36px;
  height: 36px;
  color: var(--accent-primary);
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-base);
  margin-top: var(--space-2);
  font-weight: 500;
}

/* ==========================================================================
   Navbar - Glass Morphism
   ========================================================================== */

.navbar {
  background: rgba(10, 14, 20, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 var(--space-6);
  height: 72px;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  opacity: 0.5;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--text-primary);
  transition: transform var(--transition-fast);
}

.navbar-brand:hover {
  transform: scale(1.02);
}

.navbar-brand svg {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.navbar-brand-text {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  width: 145px;
}

.navbar-brand-text .highlight {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-content {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex: 1;
  min-width: 0;
}

.nav-links {
  display: flex;
  gap: var(--space-1);
  list-style: none;
  background: var(--bg-card);
  padding: var(--space-1);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-link.active {
  color: var(--text-primary);
  background: var(--accent-gradient);
  box-shadow: 0 2px 10px var(--accent-glow);
}

.nav-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Nav Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown .nav-dropdown-arrow {
  width: 12px;
  height: 12px;
  margin-left: -4px;
  opacity: 0.5;
  transition: transform var(--transition-fast);
}

.nav-dropdown:hover .nav-dropdown-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  list-style: none;
  min-width: 160px;
  z-index: 100;
  padding: var(--space-1);
  margin-top: var(--space-2);
}

/* Invisible bridge so hover isn't lost crossing the gap */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: calc(-1 * var(--space-2));
  left: 0;
  right: 0;
  height: var(--space-2);
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-dropdown-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nav-dropdown-item:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-dropdown-item.active {
  color: var(--accent-light);
}

/* Sport Selector Dropdown */
.sport-selector {
  position: relative;
  flex-shrink: 0;
}

.sport-selector .navbar-brand {
  cursor: pointer;
  user-select: none;
}

.sport-selector-arrow {
  width: 12px;
  height: 12px;
  opacity: 0.4;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  flex-shrink: 0;
}

.sport-selector.open .sport-selector-arrow {
  transform: rotate(180deg);
  opacity: 0.8;
}

.sport-selector-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 100;
  padding: var(--space-1);
  margin-top: var(--space-2);
}

.sport-selector.open .sport-selector-menu {
  display: block;
}

.sport-selector-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sport-selector-item svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.sport-selector-item:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.sport-selector-item.active {
  color: var(--text-primary);
  border-left: 2px solid var(--accent-primary);
  padding-left: calc(var(--space-3) - 2px);
}

.sport-selector-item-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sport-selector-item-name {
  line-height: 1.2;
}

.sport-badge-soon {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  padding: 1px 6px;
  border-radius: 9999px;
  line-height: 1.4;
  margin-left: auto;
}

/* Drawer sport switcher - segmented control */
.drawer-sport-switcher {
  display: flex;
  margin: var(--space-3) var(--space-5) 0;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.drawer-sport-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: calc(var(--radius-md) - 2px);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.drawer-sport-btn svg {
  display: none;
}

.drawer-sport-btn .sport-badge-soon {
  font-size: 8px;
  padding: 0 4px;
  margin-left: 0;
  line-height: 1.3;
}

.drawer-sport-btn.active {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.drawer-sport-btn:not(.active):hover {
  color: var(--text-secondary);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* Status Indicator - Pulsing */
.status-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  white-space: nowrap;
  width: 155px;
  overflow: hidden;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 10px var(--positive), 0 0 20px var(--positive-glow);
  animation: pulse 2s ease-in-out infinite;
}

.status-dot.warning {
  background: var(--warning);
  box-shadow: 0 0 10px var(--warning), 0 0 20px var(--warning-glow);
}

.status-dot.error {
  background: var(--negative);
  box-shadow: 0 0 10px var(--negative), 0 0 20px var(--negative-glow);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

/* ==========================================================================
   Cards - Glass Morphism with Depth
   ========================================================================== */

.card {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(22, 27, 34, 0.8) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  position: relative;
  overflow: visible;
  transition: all var(--transition-base);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.card:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-elevated {
  background: linear-gradient(145deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
  border-color: var(--border-default);
  box-shadow: var(--shadow-md);
}

.card-elevated:hover {
  box-shadow: var(--shadow-xl), 0 0 40px rgba(249, 115, 22, 0.05);
}

.card-accent {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow-orange);
}

.card-accent::before {
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.card-title svg {
  width: 22px;
  height: 22px;
  color: var(--accent-primary);
}

/* ==========================================================================
   Stat Cards - Premium Design
   ========================================================================== */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  position: relative;
}

.stat-card {
  background: linear-gradient(145deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  position: relative;
  overflow: visible;
  transition: all var(--transition-base);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: all var(--transition-base);
}

.stat-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(249, 115, 22, 0.1);
  z-index: 10;
}


.stat-card:hover::before {
  opacity: 1;
  width: 80%;
}

.stat-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
}

.stat-value {
  font-size: var(--text-3xl);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  line-height: 1;
}

.stat-value.positive {
  color: var(--positive);
  text-shadow: 0 0 30px var(--positive-glow);
}
.stat-value.negative {
  color: var(--negative);
  text-shadow: 0 0 30px var(--negative-glow);
}
.stat-value.warning {
  color: var(--warning);
  text-shadow: 0 0 30px var(--warning-glow);
}
.stat-value.accent {
  color: var(--accent-primary);
  text-shadow: 0 0 30px var(--accent-glow);
}

/* ==========================================================================
   Buttons - Gradient with Glow
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* Primary Button - Gradient with Glow */
.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 25px var(--accent-glow), 0 0 40px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 10px var(--accent-glow);
}

/* Secondary Button */
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* Tip Button */
.btn-tip {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(244, 114, 182, 0.15) 100%);
  color: #f472b6;
  border: 1px solid rgba(244, 114, 182, 0.3);
  text-decoration: none;
}

.btn-tip:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(244, 114, 182, 0.25) 100%);
  border-color: rgba(244, 114, 182, 0.5);
  box-shadow: 0 0 20px rgba(244, 114, 182, 0.2);
  transform: translateY(-2px);
  color: #f9a8d4;
}

.btn-tip svg {
  width: 14px;
  height: 14px;
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--accent-primary);
  background: rgba(249, 115, 22, 0.1);
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

/* Loading State */
.btn-loading {
  color: transparent !important;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Form Controls - Modern Style
   ========================================================================== */

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group > label:not(.form-checkbox) {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input,
.form-select,
.form-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

.form-input:hover,
.form-select:hover,
.form-control:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.form-input:focus,
.form-select:focus,
.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 0 20px var(--accent-glow);
  background: var(--bg-elevated);
}

.form-select,
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
  cursor: pointer;
}

/* Date inputs - style the calendar icon */
input[type="date"].form-control {
  color-scheme: dark;
}

/* Checkbox */
.form-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  cursor: pointer;
  width: 100%;
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  transition: all var(--transition-fast);
}

.form-checkbox:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  appearance: none;
  position: relative;
  transition: all var(--transition-fast);
}

.form-checkbox input[type="checkbox"]:hover {
  border-color: var(--accent-primary);
}

.form-checkbox input[type="checkbox"]:checked {
  background: var(--accent-gradient);
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px var(--accent-glow);
}

.form-checkbox input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-checkbox span {
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-4);
  align-items: end;
}

/* ==========================================================================
   Tables - Premium Data Display
   ========================================================================== */

.table-container {
  position: relative;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.table-container.has-overflow::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to left, var(--bg-card) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  transition: opacity 0.2s;
}

.table-container.scrolled-end::after {
  opacity: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th {
  padding: var(--space-4) var(--space-4);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
  border-bottom: 1px solid var(--border-default);
  position: sticky;
  top: 0;
  z-index: 10;
}

td {
  padding: var(--space-4);
  text-align: left;
  font-size: var(--text-sm);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

tbody tr {
  transition: all var(--transition-fast);
}

tbody tr:hover {
  background: linear-gradient(90deg, var(--bg-hover) 0%, transparent 100%);
}

tbody tr:hover td {
  color: var(--text-primary);
}

/* Row glow on hover */
tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

.text-right { text-align: right; }
.text-center { text-align: center; }

/* ==========================================================================
   Badges - Glowing Pills
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-game {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2) 0%, rgba(249, 115, 22, 0.1) 100%);
  color: var(--positive);
  border: 1px solid rgba(249, 115, 22, 0.3);
  box-shadow: 0 0 10px var(--positive-glow);
}

.badge-prop {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 0 10px var(--warning-glow);
}

/* Value Colors with Glow */
.value-positive {
  color: var(--positive);
  font-weight: 700;
  text-shadow: 0 0 10px var(--positive-glow);
}

.value-negative {
  color: var(--negative);
  font-weight: 700;
  text-shadow: 0 0 10px var(--negative-glow);
}

.value-neutral {
  color: var(--text-secondary);
}

/* Confidence Badges */
.confidence-high {
  color: var(--positive);
  font-weight: 700;
  text-shadow: 0 0 15px var(--positive-glow);
}

.confidence-medium {
  color: var(--warning);
  font-weight: 700;
  text-shadow: 0 0 15px var(--warning-glow);
}

.confidence-low {
  color: var(--negative);
  font-weight: 700;
  text-shadow: 0 0 15px var(--negative-glow);
}

/* Side Badges */
.side-over {
  color: var(--positive);
  font-weight: 700;
}

.side-under {
  color: var(--accent-blue-light);
  font-weight: 700;
}

/* ==========================================================================
   Info Box - Elegant Callout
   ========================================================================== */

.info-box {
  padding: var(--space-5);
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-primary);
  position: relative;
  overflow: hidden;
}

.info-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 50px;
  background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 100%);
  opacity: 0.3;
}

.info-box-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.info-box-content {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  position: relative;
}

.info-box-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.info-box-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: start;
}

.info-box-definitions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.info-def-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  line-height: 1.6;
}

.info-def-row strong {
  flex-shrink: 0;
  min-width: 85px;
}

@media (max-width: 640px) {
  .info-box-two-col {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* Legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  padding: var(--space-4);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-8);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
  opacity: 0.5;
}

.empty-state-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

.empty-state-text {
  font-size: var(--text-base);
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto;
}

/* ==========================================================================
   Parlay Cards - Premium Display
   ========================================================================== */

.parlay-card {
  background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.parlay-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.parlay-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl), var(--shadow-glow-orange);
}

.parlay-card:hover::before {
  opacity: 1;
}

.parlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.parlay-rank {
  font-size: var(--text-2xl);
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.parlay-composition {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  background: var(--bg-hover);
  border-radius: var(--radius-full);
}

.parlay-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding: var(--space-4);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.parlay-stat {
  text-align: center;
  padding: var(--space-2);
}

.parlay-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.parlay-stat-value {
  font-size: var(--text-lg);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-top: var(--space-1);
}

.parlay-picks {
  list-style: none;
}

.parlay-pick {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  margin: var(--space-2) 0;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.parlay-pick:hover {
  border-color: var(--border-default);
  background: var(--bg-hover);
}

.parlay-pick-number {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--accent-primary);
  min-width: 24px;
}

.parlay-pick-content {
  flex: 1;
}

.parlay-pick-main {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.parlay-pick-details {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ==========================================================================
   Animations
   ========================================================================== */

/* Fade in with slide */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.5s ease-out;
}

/* Staggered children animation */
.fade-in > * {
  opacity: 0;
  animation: fadeInUp 0.4s ease-out forwards;
}

.fade-in > *:nth-child(1) { animation-delay: 0.05s; }
.fade-in > *:nth-child(2) { animation-delay: 0.1s; }
.fade-in > *:nth-child(3) { animation-delay: 0.15s; }
.fade-in > *:nth-child(4) { animation-delay: 0.2s; }
.fade-in > *:nth-child(5) { animation-delay: 0.25s; }

/* Skeleton loader - Shimmer */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 0%,
    var(--bg-hover) 20%,
    var(--bg-elevated) 40%,
    var(--bg-elevated) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 1em;
  margin-bottom: var(--space-2);
}

.skeleton-title {
  height: 2em;
  width: 60%;
  margin-bottom: var(--space-4);
}

/* Number counter animation */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

.hidden { display: none; }
.block { display: block; }

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}

.w-full { width: 100%; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .navbar {
    padding: 0 var(--space-4);
    height: 64px;
  }

  .navbar-brand-text {
    display: none;
  }

  /* Hide desktop nav, show hamburger */
  .navbar-content {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .container {
    padding: var(--space-4);
    padding-bottom: calc(64px + var(--space-4) + env(safe-area-inset-bottom, 0px));
  }

  .page-title {
    font-size: var(--text-2xl);
  }

  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .parlay-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Injury Indicators & Tags
   ========================================================================== */

.injury-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 10px;
  font-weight: 700;
  color: var(--warning);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 50%;
  margin-left: 2px;
  cursor: help;
}

.injury-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.injury-tag {
  display: inline-block;
  padding: 1px 6px;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.injury-tag.injury-out {
  background: rgba(244, 63, 94, 0.15);
  color: #f87171;
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.injury-tag.injury-q {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.injury-tag.injury-dtd {
  background: rgba(245, 158, 11, 0.1);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.injury-tag.injury-p {
  background: rgba(249, 115, 22, 0.1);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

/* Injury Report Card */
.injury-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.injury-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.injury-card-title {
  font-weight: 600;
  color: var(--text-primary);
}

.injury-impact-badge {
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.injury-impact-high {
  background: rgba(244, 63, 94, 0.15);
  color: #f87171;
}

.injury-impact-medium {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.injury-impact-low {
  background: rgba(249, 115, 22, 0.1);
  color: #fdba74;
}

.injury-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.injury-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
}

.injury-player {
  font-weight: 500;
  color: var(--text-primary);
}

.injury-detail {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Game Card Injury Section — Two-Column with Impact Chips
   ========================================================================== */

.game-injuries-section {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-subtle);
}

/* Injury link label + bar */
.game-injuries-link-label {
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-subtle);
}

.game-injuries-link-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-1);
  margin-bottom: var(--space-2);
}

.game-injury-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.game-injury-link:hover {
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.08);
}

.game-injury-link svg {
  color: #f43f5e;
  opacity: 0.7;
}

.game-injury-link:hover svg {
  opacity: 1;
}

.injury-link-count {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  min-width: 18px;
  text-align: center;
}

.game-injuries-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.game-injuries-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.game-injuries-team-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.game-injuries-chips {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Injury Chip — compact flex row */
.injury-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  cursor: default;
  width: 100%;
}

.injury-chip .injury-tag {
  margin-left: auto;
  flex-shrink: 0;
}

.injury-chip:hover {
  border-color: var(--border-default);
  background: var(--bg-hover);
}

/* High-impact chip: red-tinted border/bg */
.injury-chip-high {
  border-color: rgba(244, 63, 94, 0.25);
  background: rgba(244, 63, 94, 0.06);
}

.injury-chip-high:hover {
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.1);
}

/* Medium-impact chip */
.injury-chip-medium {
  border-color: rgba(245, 158, 11, 0.15);
}

/* Low-impact chip: muted */
.injury-chip-low {
  opacity: 0.7;
}

/* 3px colored impact bar on left edge of chip */
.injury-chip-impact {
  width: 3px;
  height: 14px;
  border-radius: 2px;
  flex-shrink: 0;
}

.injury-chip-impact-high {
  background: var(--negative);
  box-shadow: 0 0 6px var(--negative-glow);
}

.injury-chip-impact-medium {
  background: var(--warning);
  box-shadow: 0 0 4px var(--warning-glow);
}

.injury-chip-impact-low {
  background: var(--text-muted);
}

/* Position badge */
.injury-chip-pos {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0 2px;
  flex-shrink: 0;
}

/* Player last name */
.injury-chip-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.injury-chip-name-high {
  color: var(--text-primary);
  text-shadow: 0 0 8px var(--negative-glow);
}

/* Hidden chips — revealed when parent has .injury-chips-expanded */
.injury-chip-hidden {
  display: none;
}

.injury-chips-expanded .injury-chip-hidden {
  display: flex;
}

/* Expand/collapse toggle button */
.injury-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  align-self: flex-start;
}

.injury-expand-btn:hover {
  background: rgba(249, 115, 22, 0.15);
  border-color: var(--accent-primary);
}

/* ==========================================================================
   Injury Report — Grouped by Matchup
   ========================================================================== */

.injury-report-games {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-4);
}

.injury-report-game {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.injury-report-matchup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
}

.injury-report-matchup {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.injury-report-adj {
  font-size: var(--text-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.injury-report-teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.injury-report-team-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.injury-report-team-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.injury-report-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-1) var(--space-2);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}

/* 8px colored impact dot */
.injury-impact-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.injury-impact-dot-critical {
  width: 10px;
  height: 10px;
  background: var(--tier-critical);
  box-shadow: 0 0 6px var(--tier-critical-glow);
}

.injury-impact-dot-high {
  width: 10px;
  height: 10px;
  background: var(--tier-high);
  box-shadow: 0 0 4px var(--tier-high-glow);
}

.injury-impact-dot-moderate {
  background: var(--tier-moderate);
  box-shadow: 0 0 4px var(--tier-moderate-glow);
}

.injury-impact-dot-low {
  background: var(--tier-low);
}

.injury-report-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.injury-report-pos {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 0 4px;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.injury-report-part {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  white-space: nowrap;
}

/* 40px horizontal impact meter */
.injury-impact-bar {
  width: 40px;
  height: 4px;
  background: var(--bg-card);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
  margin-left: auto;
}

.injury-impact-fill {
  height: 100%;
  border-radius: 2px;
  transition: width var(--transition-base);
}

.injury-impact-fill-high {
  background: var(--negative);
  box-shadow: 0 0 4px var(--negative-glow);
}

.injury-impact-fill-medium {
  background: var(--warning);
  box-shadow: 0 0 3px var(--warning-glow);
}

.injury-impact-fill-low {
  background: var(--text-muted);
}

/* ==========================================================================
   League Injury Report — Collapsible Teams
   ========================================================================== */

.injury-league-teams {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
}

.injury-team-collapsible {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.injury-team-collapsible:hover {
  border-color: var(--border-default);
}

.injury-team-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  font-family: var(--font-sans);
  transition: background var(--transition-fast);
}

.injury-team-header:hover {
  background: var(--bg-hover);
}

.injury-team-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.injury-team-abbr {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  min-width: 40px;
}

.injury-team-name {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.injury-team-count {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--warning);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-full);
  padding: 1px 8px;
}

.injury-team-chevron {
  transition: transform var(--transition-fast);
  color: var(--text-muted);
}

.injury-team-expanded .injury-team-chevron {
  transform: rotate(180deg);
}

.injury-team-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
  padding: 0 var(--space-4);
}

.injury-team-expanded .injury-team-body {
  max-height: 2000px;
  padding: 0 var(--space-4) var(--space-3);
}

.injury-team-body .injury-report-row {
  margin-bottom: var(--space-1);
}

.injury-team-body .injury-timeline {
  margin-bottom: 0;
}

/* ==========================================================================
   Responsive — Injury Sections
   ========================================================================== */

@media (max-width: 900px) {
  .game-injuries-grid {
    grid-template-columns: 1fr;
  }

  .injury-report-teams {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Date Navigation Bar
   ========================================================================== */

.date-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(22, 27, 34, 0.8) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  position: relative;
}

.date-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.date-nav-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.date-nav-arrow svg {
  width: 20px;
  height: 20px;
}

.date-nav-arrow:hover:not(.disabled) {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px var(--accent-glow);
  color: white;
}

.date-nav-arrow.disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

.date-nav-center {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 280px;
  justify-content: center;
}

.date-nav-label {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.date-nav-badge-today {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: 10px;
  font-weight: 800;
  color: white;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 0 10px var(--accent-glow);
}

.date-nav-today-btn {
  position: absolute;
  right: var(--space-6);
}

/* Date Picker Input */
.date-nav-picker {
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  color-scheme: dark;
}

.date-nav-picker:hover {
  border-color: var(--accent-primary);
  background: var(--bg-hover);
}

.date-nav-picker:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.date-nav-picker::-webkit-calendar-picker-indicator {
  filter: invert(0.7) sepia(1) hue-rotate(100deg) brightness(1.2);
  cursor: pointer;
}

/* ==========================================================================
   Scoreboard Game Cards
   ========================================================================== */

.game-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.game-card {
  background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-3) var(--space-4);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: var(--border-default);
  border-radius: 3px 0 0 3px;
  transition: all var(--transition-base);
}

.game-card:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   Team-Colored Game Cards — Corner Aura
   ========================================================================== */

/* Propagate team color vars to scoreboard children */
.game-card-teams .game-scoreboard > :first-child {
  --team-color: var(--away-color);
}
.game-card-teams .game-scoreboard > :last-child {
  --team-color: var(--home-color);
}

/* Left border: team color gradient (overridden by final/high-conf green) */
.game-card-teams::before {
  background: linear-gradient(180deg,
    var(--away-color, var(--border-default)),
    var(--home-color, var(--border-default)));
  width: 4px;
}

/* Corner aura: radial team-color wash from opposite corners */
.game-card-teams::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 0% 0%, var(--away-color), transparent 60%),
    radial-gradient(ellipse at 100% 100%, var(--home-color), transparent 60%);
  opacity: 0.06;
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
  transition: opacity var(--transition-base);
}

/* Card content sits above the color wash */
.game-card-teams > * {
  position: relative;
  z-index: 1;
}

/* Team-colored abbreviations with secondary color stroke */
.game-card-teams .game-team-abbr {
  color: var(--team-color, var(--text-primary));
  -webkit-text-stroke: 1px var(--team-color-2);
  paint-order: stroke fill;
}

/* Winner: full team color + glow + stroke */
.game-card-teams .game-team-winner .game-team-abbr {
  color: var(--team-color, var(--text-primary));
  -webkit-text-stroke: 1px var(--team-color-2);
  text-shadow: 0 0 12px var(--team-color);
  opacity: 1;
}

/* Loser: dimmed team color, no stroke */
.game-card-teams .game-team-loser .game-team-abbr {
  color: var(--team-color, var(--text-muted));
  -webkit-text-stroke: 0;
  opacity: 0.4;
}

/* Hover: intensify the aura */
.game-card-teams:hover::after {
  opacity: 0.12;
}

/* Injury section team labels pick up team colors */
.game-card-teams .game-injuries-col:first-child .game-injuries-team-label {
  color: var(--away-color);
}
.game-card-teams .game-injuries-col:last-child .game-injuries-team-label {
  color: var(--home-color);
}

.game-card-final::before {
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-glow);
}

.game-card-high-conf::before {
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-glow);
}

.game-card-status {
  margin-bottom: var(--space-2);
}

.game-status-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius-full);
}

.game-status-final {
  background: rgba(249, 115, 22, 0.12);
  color: var(--accent-light);
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.game-status-scheduled {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-blue-light);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

/* Inline status badge in prediction line */
.game-status-inline {
  font-size: 9px;
  padding: 1px 6px;
  vertical-align: middle;
}

/* Scoreboard layout: away | score | home */
.game-scoreboard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) 0;
  margin-bottom: var(--space-2);
}

.game-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  min-width: 70px;
}

.game-team-abbr {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.game-team-tag {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
  opacity: 0.6;
}

.game-team-name {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
  max-width: 90px;
}

.game-team-winner .game-team-abbr {
  color: var(--text-primary);
}

.game-team-winner .game-team-name {
  color: var(--text-secondary);
}

.game-team-loser .game-team-abbr {
  color: var(--text-muted);
  opacity: 0.6;
}

.game-team-loser .game-team-name {
  opacity: 0.5;
}

.game-score-area {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
}

.game-score {
  font-size: var(--text-2xl);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.game-score-winner {
  color: var(--text-primary);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.game-score-loser {
  color: var(--text-muted);
  opacity: 0.6;
}

.game-score-divider {
  font-size: var(--text-xl);
  color: var(--text-muted);
  font-weight: 300;
}

.game-score-status {
  width: 100%;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: -2px;
}

.game-score-status-final {
  color: var(--accent-light);
  opacity: 0.7;
}

.game-score-status-live {
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.game-score-status-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulse-dot 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px #ef4444; }
  50% { opacity: 0.3; box-shadow: none; }
}

/* Score change flash animation */
@keyframes score-flash {
  0% { color: var(--accent-primary); transform: scale(1.25); }
  100% { color: inherit; transform: scale(1); }
}

.game-score.score-changed {
  animation: score-flash 0.6s ease-out;
}

/* Winner/loser applied by JS after game ends */
.game-team-winner .game-team-abbr,
.game-team-winner .game-team-name {
  color: var(--text-primary);
}

.game-team-loser .game-team-abbr,
.game-team-loser .game-team-name {
  opacity: 0.45;
}

.game-score-winner {
  color: var(--text-primary) !important;
  font-weight: 700;
}

.game-score-loser {
  opacity: 0.45;
}

.game-time-label {
  width: 100%;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 0.7;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

.game-score-proj-line {
  width: 100%;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  opacity: 0.55;
  letter-spacing: 0.03em;
  margin-top: -2px;
}

.game-vs {
  font-size: var(--text-lg);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Prediction line below scores */
.game-prediction {
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-subtle);
}

.game-prediction-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}

.game-prediction-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.game-prediction-pick {
  font-size: var(--text-sm);
  font-weight: 700;
}

.game-prediction-details {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.game-prediction-detail {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Model result badges */
.model-result {
  font-weight: 800;
  font-size: var(--text-sm);
  font-family: var(--font-mono);
}

.model-result-correct {
  color: var(--positive);
  text-shadow: 0 0 10px var(--positive-glow);
}

.model-result-wrong {
  color: var(--negative);
  text-shadow: 0 0 10px var(--negative-glow);
}

/* Injury tags in game card */
.game-injuries {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Responsive - Game Cards
   ========================================================================== */

@media (min-width: 1400px) {
  .game-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .game-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .date-nav {
    padding: var(--space-3) var(--space-4);
    gap: var(--space-2);
    flex-wrap: wrap;
  }

  .date-nav-center {
    min-width: auto;
    flex-wrap: wrap;
  }

  .date-nav-label {
    font-size: var(--text-base);
  }

  .date-nav-picker {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
  }

  .date-nav-arrow {
    width: 36px;
    height: 36px;
  }

  .date-nav-arrow svg {
    width: 16px;
    height: 16px;
  }

  .game-team-abbr {
    font-size: var(--text-lg);
  }

  .game-score {
    font-size: var(--text-xl);
  }

  .game-prediction-details {
    gap: var(--space-2);
  }

  .game-card:hover {
    transform: none;
  }

  .ev-pick:hover {
    transform: none !important;
  }

  .parlay-card:hover,
  .card:hover {
    transform: none;
  }

  .parlay-pick:hover {
    border-color: var(--border-subtle);
    background: var(--bg-elevated);
  }
}

/* ==========================================================================
   Injury Tab — Toolbar & Filters
   ========================================================================== */

.injury-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}

.injury-search-wrap {
  position: relative;
  flex: 1 1 200px;
  min-width: 160px;
  max-width: 300px;
}

.injury-search-input {
  width: 100%;
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-8);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.injury-search-input::placeholder {
  color: var(--text-muted);
}

.injury-search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.injury-search-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.injury-filter-group {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.injury-filter-btn {
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.injury-filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-primary);
  background: rgba(249, 115, 22, 0.08);
}

.injury-filter-btn.active {
  color: white;
  background: var(--accent-gradient);
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-glow);
}

.injury-expand-all-btn {
  margin-left: auto;
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.injury-expand-all-btn:hover {
  background: rgba(249, 115, 22, 0.15);
  border-color: var(--accent-primary);
}

/* ==========================================================================
   Injury Tab — Today-Team Highlight
   ========================================================================== */

.injury-team-today {
  border-color: rgba(249, 115, 22, 0.25);
  background: linear-gradient(145deg, var(--bg-elevated) 0%, rgba(249, 115, 22, 0.04) 100%);
}

.injury-team-today:hover {
  border-color: rgba(249, 115, 22, 0.4);
}

.injury-team-today-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  font-size: 9px;
  font-weight: 800;
  color: white;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ==========================================================================
   Injury Tab — Team Header Enrichment
   ========================================================================== */

.injury-team-header-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Loss Badge — compact colored pill in team header */
.injury-team-loss-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  transition: all var(--transition-fast);
}

.injury-team-loss-badge-high {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.injury-team-loss-badge-medium {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.injury-team-loss-badge-low {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}

.injury-team-loss-badge-pct {
  font-size: 12px;
  font-weight: 800;
}

.injury-team-loss-badge-high .injury-team-loss-badge-pct {
  color: var(--negative-light);
}

.injury-team-loss-badge-medium .injury-team-loss-badge-pct {
  color: var(--warning-light);
}

.injury-team-loss-badge-low .injury-team-loss-badge-pct {
  color: var(--text-secondary);
}

.injury-team-loss-badge-detail {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.injury-team-status-breakdown {
  display: flex;
  gap: var(--space-1);
}

.injury-mini-tag {
  display: inline-block;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 3px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.injury-mini-tag-out {
  background: rgba(244, 63, 94, 0.15);
  color: #f87171;
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.injury-mini-tag-q {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.injury-mini-tag-dtd {
  background: rgba(245, 158, 11, 0.1);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.injury-mini-tag-p {
  background: rgba(249, 115, 22, 0.1);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

/* ==========================================================================
   Injury Tab — Player Row Enrichment
   ========================================================================== */

.injury-days-out {
  display: inline-flex;
  align-items: center;
  padding: 0 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  flex-shrink: 0;
}

.injury-days-out-long {
  color: var(--negative-light);
  border-color: rgba(244, 63, 94, 0.2);
  background: rgba(244, 63, 94, 0.06);
}

.injury-pos-mult {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.7;
  flex-shrink: 0;
}

.injury-desc-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  line-height: 1;
}

.injury-desc-toggle:hover {
  background: rgba(249, 115, 22, 0.2);
  border-color: var(--accent-primary);
}

.injury-desc-expanded {
  display: none;
  width: 100%;
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4);
  margin: 0 0 var(--space-1) 0;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.04) 0%, rgba(249, 115, 22, 0.02) 100%);
  border: 1px solid rgba(249, 115, 22, 0.1);
  border-top: none;
  border-left: 3px solid var(--accent-primary);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.injury-desc-expanded.show {
  display: block;
}

/* ==========================================================================
   Player Card — Two-Line Layout
   ========================================================================== */

.injury-player-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-1);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.injury-player-card:hover {
  border-color: var(--border-default);
  background: var(--bg-hover);
}

.injury-player-card-critical:hover {
  border-color: var(--tier-critical);
  background: linear-gradient(135deg, var(--bg-hover) 0%, rgba(239, 68, 68, 0.08) 100%);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.08);
}

.injury-player-card-high:hover {
  border-color: var(--tier-high);
  background: linear-gradient(135deg, var(--bg-hover) 0%, rgba(249, 115, 22, 0.06) 100%);
}

.injury-player-card-critical {
  border-left: 3px solid var(--tier-critical);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(239, 68, 68, 0.06) 100%);
  box-shadow: inset 0 0 20px rgba(239, 68, 68, 0.03);
}

.injury-player-card-high {
  border-left: 3px solid var(--tier-high);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(249, 115, 22, 0.04) 100%);
}

.injury-player-card-moderate {
  border-left: 3px solid var(--tier-moderate);
}

.injury-player-card-low {
  border-left: 3px solid var(--tier-low);
  opacity: 0.75;
}

.injury-player-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 26px;
}

.injury-player-card-identity {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.injury-player-card-status {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.injury-player-card-active {
  border-color: rgba(249, 115, 22, 0.2);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
  margin-bottom: 0;
}

.injury-player-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: var(--space-1);
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--space-1);
  min-height: 24px;
}

.injury-player-card-injury {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ==========================================================================
   Return Estimate Visual (mini timeline bar on player card)
   ========================================================================== */

.injury-return-estimate {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  min-width: 140px;
}

.injury-return-bar-track {
  position: relative;
  flex: 1;
  height: 6px;
  background: var(--bg-darkest);
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}

/* Elapsed time (already out) */
.injury-return-bar-elapsed {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px 0 0 3px;
}

/* Estimated return window (range) */
.injury-return-bar-range {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 3px;
}

.injury-return-bar-range-high {
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.6), rgba(244, 63, 94, 0.3));
  box-shadow: 0 0 4px var(--negative-glow);
}

.injury-return-bar-range-medium {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.6), rgba(245, 158, 11, 0.3));
  box-shadow: 0 0 3px var(--warning-glow);
}

.injury-return-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.injury-return-estimate-high .injury-return-label {
  color: var(--negative-light);
}

.injury-return-estimate-medium .injury-return-label {
  color: var(--warning-light);
}

/* ==========================================================================
   Stat Chips (bottom row of player card)
   ========================================================================== */

.injury-stat-chips {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.injury-stat-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 18px;
}

.injury-stat-chip small {
  font-size: 8px;
  font-weight: 600;
  opacity: 0.7;
  letter-spacing: 0.02em;
}

.injury-stat-chip-ppg {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.injury-stat-chip-rpg {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.injury-stat-chip-apg {
  color: #fb923c;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.injury-stat-chip-mpg {
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Production Loss Dashboard (stat cards + ring)
   ========================================================================== */

.injury-loss-dashboard {
  margin-bottom: var(--space-3);
}

.injury-loss-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}

.injury-loss-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-1);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
  min-height: 60px;
}

.injury-loss-card-ppg {
  border-color: rgba(244, 63, 94, 0.25);
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(244, 63, 94, 0.05) 100%);
}

.injury-loss-card-ppg .injury-loss-card-value {
  color: var(--negative-light);
  text-shadow: 0 0 12px var(--negative-glow);
}

.injury-loss-card-pct {
  flex-direction: column;
  gap: 2px;
}

.injury-loss-card-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.injury-loss-card-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* SVG Donut Ring for Loss % */
.injury-loss-pct-ring {
  position: relative;
  width: 48px;
  height: 48px;
}

.injury-loss-pct-svg {
  width: 48px;
  height: 48px;
  transform: rotate(-90deg);
}

.injury-loss-pct-bg {
  fill: none;
  stroke: var(--bg-darkest);
  stroke-width: 3;
}

.injury-loss-pct-fill {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray var(--transition-slow);
}

.injury-loss-pct-fill-high {
  stroke: var(--negative);
  filter: drop-shadow(0 0 4px var(--negative-glow));
}

.injury-loss-pct-fill-medium {
  stroke: var(--warning);
  filter: drop-shadow(0 0 3px var(--warning-glow));
}

.injury-loss-pct-fill-low {
  stroke: var(--text-muted);
}

.injury-loss-pct-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-primary);
}

/* ==========================================================================
   Enhanced Matchup Impact Cards
   ========================================================================== */

.injury-matchup-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: border-color var(--transition-fast);
}

.injury-matchup-card:hover {
  border-color: var(--border-default);
}

.injury-matchup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
}

.injury-matchup-title {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.injury-matchup-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.injury-matchup-advantage {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--positive);
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: var(--radius-full);
}

.injury-matchup-advantage-large {
  box-shadow: 0 0 12px var(--positive-glow);
}

.injury-matchup-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-3);
}

.injury-matchup-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.injury-matchup-side-worse {
  border: 1px solid rgba(244, 63, 94, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  background: rgba(244, 63, 94, 0.03);
}

.injury-matchup-team-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-1);
}

.injury-matchup-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-1);
}

.injury-matchup-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.injury-matchup-stat-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
}

.injury-matchup-stat-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.injury-matchup-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  padding-top: 20px;
}

.injury-matchup-players {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--space-1);
}

.injury-matchup-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px var(--space-2);
  font-size: var(--text-xs);
  border-radius: 3px;
}

.injury-matchup-player-name {
  font-weight: 600;
  color: var(--text-secondary);
}

.injury-matchup-player-ppg {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--warning-light);
}

/* ==========================================================================
   Injury Timeline
   ========================================================================== */

.injury-timeline {
  padding: var(--space-2) var(--space-3);
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(22, 27, 34, 0.6) 100%);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.injury-timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
}

.injury-timeline-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.injury-timeline-scale {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.injury-timeline-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.injury-timeline-row {
  display: grid;
  grid-template-columns: minmax(100px, 150px) 60px 1fr auto 30px auto 60px;
  align-items: center;
  gap: var(--space-2);
  padding: 5px 0;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 3px;
  transition: background var(--transition-fast);
}

.injury-timeline-row:last-child {
  border-bottom: none;
}

.injury-timeline-row:hover {
  background: var(--bg-hover);
}

/* Tier-tinted row backgrounds */
.injury-timeline-row-critical {
  background: linear-gradient(135deg, transparent 0%, rgba(239, 68, 68, 0.05) 100%);
}

.injury-timeline-row-critical:hover {
  background: linear-gradient(135deg, var(--bg-hover) 0%, rgba(239, 68, 68, 0.08) 100%);
}

.injury-timeline-row-high {
  background: linear-gradient(135deg, transparent 0%, rgba(249, 115, 22, 0.03) 100%);
}

.injury-timeline-row-high:hover {
  background: linear-gradient(135deg, var(--bg-hover) 0%, rgba(249, 115, 22, 0.06) 100%);
}

.injury-timeline-row-low {
  opacity: 0.75;
}

/* Active row (description expanded) */
.injury-timeline-row-active {
  background: rgba(249, 115, 22, 0.04);
  border-bottom-color: transparent;
}

/* Identity cell (dot + tier + name + pos) */
.injury-timeline-identity {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.injury-timeline-name {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.injury-timeline-injury-type {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.injury-timeline-bar-track {
  height: 10px;
  background: var(--bg-darkest);
  border-radius: 5px;
  overflow: hidden;
}

.injury-timeline-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width var(--transition-base);
}

.injury-timeline-bar-fill-critical {
  background: linear-gradient(90deg, #dc2626, var(--tier-critical), #fb7185);
  box-shadow: 0 0 6px var(--tier-critical-glow);
}

.injury-timeline-bar-fill-high {
  background: linear-gradient(90deg, #c2410c, var(--tier-high), #fb923c);
  box-shadow: 0 0 4px var(--tier-high-glow);
}

.injury-timeline-bar-fill-moderate {
  background: linear-gradient(90deg, #a16207, var(--tier-moderate), #facc15);
  box-shadow: 0 0 4px var(--tier-moderate-glow);
}

.injury-timeline-bar-fill-low {
  background: linear-gradient(90deg, #374151, var(--tier-low));
}

/* Timeline tier-colored player names */
.injury-timeline-name-critical { color: var(--tier-critical); }
.injury-timeline-name-high { color: var(--tier-high); }

/* Tier Label Badges (CRIT / HIGH) */
.injury-tier-label {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0 4px;
  border-radius: 3px;
  text-transform: uppercase;
  line-height: 16px;
}

.injury-tier-label-critical {
  color: var(--tier-critical);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.injury-tier-label-high {
  color: var(--tier-high);
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.injury-timeline-days {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: right;
}

.injury-timeline-return {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--warning-light);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.injury-timeline-return-unknown {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Compact stat chips inside timeline rows */
.injury-timeline-stats {
  display: flex;
  align-items: center;
  gap: 2px;
}

.injury-timeline-stats .injury-stat-chip {
  font-size: 10px;
  padding: 0 4px;
  line-height: 16px;
}

.injury-timeline-stats .injury-stat-chip small {
  font-size: 7px;
}

/* ==========================================================================
   Injury Tab — Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .injury-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .injury-search-wrap {
    max-width: 100%;
    flex: none;
  }

  .injury-expand-all-btn {
    margin-left: 0;
    width: 100%;
  }

  .injury-team-status-breakdown {
    display: none;
  }

  .injury-team-loss-badge-detail {
    display: none;
  }

  .injury-stat-chips,
  .injury-loss-dashboard {
    display: none;
  }

  .injury-timeline-stats,
  .injury-timeline-bar-track,
  .injury-timeline-injury-type {
    display: none;
  }

  .injury-timeline-row {
    grid-template-columns: 1fr auto auto auto;
  }

  .injury-matchup-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .injury-matchup-vs {
    padding-top: 0;
    padding-bottom: var(--space-1);
  }

  .injury-loss-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  /* Hide team full name on small phones - abbreviation is enough */
  .injury-team-name {
    display: none;
  }

  /* Hide return estimate column - too cramped at 390px */
  .injury-timeline-return {
    display: none;
  }

  .injury-timeline-row {
    grid-template-columns: 1fr auto auto;
    gap: var(--space-1);
    padding: 4px 0;
  }

  /* Bump timeline font sizes for legibility */
  .injury-timeline-days {
    font-size: 11px;
  }

  .injury-team-header {
    padding: var(--space-3) var(--space-2);
  }

  .injury-team-header-left {
    gap: var(--space-2);
  }
}

/* ==========================================================================
   All-Star Game Cards
   ========================================================================== */

.game-card-allstar {
  position: relative;
}

.game-card-allstar::before {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%) !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4) !important;
}

.allstar-badge {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  color: #000;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  line-height: 1.4;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* SGP Game Card - team color accents */
.sgp-game-card::before {
  background: linear-gradient(180deg, var(--away-color, var(--border-default)), var(--home-color, var(--border-default))) !important;
  opacity: 0.7;
}

.sgp-game-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--away-color, transparent), transparent 40%, transparent 60%, var(--home-color, transparent));
  opacity: 0.5;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.sgp-game-card:hover::before {
  opacity: 1;
}

.sgp-game-card:hover::after {
  opacity: 0.8;
}

/* SGP Game Selector - selected state */
.sgp-game-selected {
  border-color: var(--accent-primary) !important;
  background: linear-gradient(145deg, rgba(249, 115, 22, 0.08) 0%, var(--bg-elevated) 100%) !important;
}

.sgp-game-selected::before {
  background: var(--accent-primary) !important;
  opacity: 1 !important;
  box-shadow: 0 0 10px var(--accent-glow) !important;
}

.sgp-game-selected::after {
  background: var(--accent-primary) !important;
  opacity: 0.6 !important;
}

/* Prediction History - Row result indicators */
.row-hit { box-shadow: inset 3px 0 0 var(--positive); }
.row-miss { box-shadow: inset 3px 0 0 var(--negative); }
.row-pending { box-shadow: inset 3px 0 0 var(--text-muted); }

/* Line Movement - expandable section */
/* Spread & O/U comparison — model vs market */
.game-lines-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-subtle);
}

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

.game-line-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.game-line-values {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.game-line-model {
  font-weight: 700;
  color: #3b82f6;
}

.game-line-market {
  font-weight: 700;
  color: #f59e0b;
}

.game-line-vs {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

.line-movement-section {
  border-top: 1px solid var(--border-subtle);
  padding: 0.75rem 1rem;
}

.line-movement-buttons {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.line-movement-toggle {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.line-movement-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.line-movement-toggle.btn-loading {
  color: transparent !important;
  pointer-events: none;
}

.line-movement-toggle.btn-loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid transparent;
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  top: 50%;
  left: 50%;
  margin-top: -7px;
  margin-left: -7px;
}
.line-movement-content {
  display: none;
  margin-top: 0.75rem;
}
.line-movement-content.active {
  display: block;
}
.line-movement-snapshot {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem 1rem;
  align-items: center;
  font-size: 0.8rem;
}
.line-movement-snapshot .lm-label {
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.line-movement-snapshot .lm-value {
  color: var(--text-primary);
  font-weight: 600;
}
.line-movement-chart {
  position: relative;
  height: 200px;
  margin-top: 0.5rem;
}
.line-movement-alerts {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.lm-alert-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Chip Toggles (shared: props page, parlay builder)
   ========================================================================== */

.props-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.prop-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.prop-chip input { display: none; }
.prop-chip span {
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-sans);
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  line-height: 1.2;
}
.prop-chip input:checked + span {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
}
.prop-chip:hover span { border-color: var(--text-secondary); }

/* ==========================================================================
   Prediction Detail - Expandable Rows
   ========================================================================== */

.pred-row-clickable {
  cursor: pointer;
  transition: background var(--transition-fast);
}
.pred-row-clickable:hover {
  background: var(--bg-hover) !important;
}
.pred-row-expanded {
  background: var(--bg-elevated) !important;
}

.pred-detail-row {
  background: var(--bg-card);
}
.pred-detail-cell {
  padding: 1.25rem !important;
  border-top: none !important;
}

.pred-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.5rem;
  min-height: 200px;
}

.pred-detail-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.pred-detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 1rem;
}

.pred-detail-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.2rem 0;
  font-size: 0.8rem;
}

.pred-detail-label {
  color: var(--text-muted);
  font-weight: 500;
}

.pred-detail-value {
  color: var(--text-primary);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.pred-detail-chart-wrap {
  min-height: 200px;
}

.pred-detail-chart {
  position: relative;
  height: 220px;
}

.inline-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-default);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  flex-shrink: 0;
}

.pred-detail-loading,
.pred-detail-error,
.pred-detail-no-data {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 100px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.pred-detail-error {
  color: var(--negative);
}

/* ==========================================================================
   Mobile Responsive - Global Enhancements
   ========================================================================== */

@media (max-width: 768px) {
  /* Tables - horizontal scroll */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-container table {
    min-width: auto;
  }

  /* Only force min-width on wide tables (many columns) */
  .table-container.table-wide table {
    min-width: 600px;
  }

  /* Injury matchup header - stack badges below title */
  .injury-matchup-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  /* Page header */
  .page-header {
    flex-direction: column;
    gap: var(--space-3);
  }

  .page-title svg {
    width: 28px;
    height: 28px;
  }

  /* Prediction detail - stack vertically */
  .pred-detail-grid {
    grid-template-columns: 1fr;
  }

  .pred-detail-stats {
    grid-template-columns: 1fr 1fr;
  }

  /* Charts - reduce height */
  .pred-detail-chart {
    height: 180px;
  }

  /* Touch target sizing for tablets and phones */
  .form-control,
  .form-input,
  .form-select {
    min-height: 44px;
  }

  .btn {
    min-height: 48px;
  }

  .btn-sm {
    min-height: 40px;
  }

  /* Card header - wrap long titles + badges on narrow screens */
  .card-header {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  /* Injury expand button - larger touch target */
  .injury-expand-btn {
    min-height: 32px;
    min-width: 32px;
    padding: 4px 8px;
    font-size: 11px;
  }

  /* Lines comparison - stack on mobile */
  .game-lines-comparison {
    flex-direction: column;
    gap: var(--space-1);
  }

  /* Line movement buttons - wrap on mobile */
  .line-movement-buttons {
    flex-wrap: wrap;
  }

  /* Line movement toggle - larger touch target */
  .line-movement-toggle {
    min-height: 40px;
    padding: 0.5rem 0.75rem;
  }

  /* EV filter selects - larger touch target */
  .ev-filter-select {
    min-height: 44px;
    padding: 0.5rem 1.8rem 0.5rem 0.6rem;
  }

  /* Injury search input + filter buttons - larger touch targets */
  .injury-search-input {
    min-height: 44px;
  }

  .injury-filter-btn {
    min-height: 36px;
    padding: var(--space-2) var(--space-3);
  }

  /* Injury expand-all button - larger touch target */
  .injury-expand-all-btn {
    min-height: 40px;
    padding: var(--space-3) var(--space-4);
  }

  /* SGP game card - tap feedback (no hover on touch) */
  .sgp-game-card:active {
    transform: scale(0.97);
    transition: transform 0.1s;
  }

  .sgp-game-card:hover::before {
    opacity: 0.7;
  }

  .sgp-game-card:hover::after {
    opacity: 0.5;
  }
}

/* ==========================================================================
   SGP Results - Card Styles
   ========================================================================== */

.card-sgp-hit {
  background: var(--bg-elevated);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.card-sgp-miss {
  background: var(--bg-elevated);
  border: 1px solid rgba(244, 63, 94, 0.15);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.sgp-result-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sgp-result-hit {
  background: rgba(249, 115, 22, 0.15);
  color: var(--positive);
}

.sgp-result-miss {
  background: rgba(244, 63, 94, 0.12);
  color: var(--negative);
}

.sgp-result-pending {
  background: rgba(139, 148, 158, 0.12);
  color: var(--text-muted);
}

.sgp-card-footer {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.sgp-footer-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sgp-footer-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sgp-footer-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.sgp-header-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  width: 100%;
}

.sgp-header-stat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sgp-header-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sgp-header-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

@media (max-width: 768px) {
  .sgp-card-footer {
    gap: 1rem;
  }
  .sgp-footer-stat {
    flex: 1 1 calc(33% - 1rem);
    min-width: 60px;
  }
  .sgp-header-stats {
    gap: 0.75rem;
  }
  .sgp-header-stat {
    flex: 1 1 calc(33% - 0.75rem);
    min-width: 70px;
  }

  /* Date nav today button - flow into flex layout */
  .date-nav-today-btn {
    position: static;
    order: 4;
  }
}

/* ==========================================================================
   Medium Phone Breakpoint
   ========================================================================== */

@media (max-width: 640px) {
  .container {
    padding: var(--space-4);
    padding-bottom: calc(64px + var(--space-4) + env(safe-area-inset-bottom, 0px));
  }

  .stat-card {
    padding: var(--space-3);
  }

  .stat-value {
    font-size: var(--text-xl);
  }

  .ev-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .parlay-stats {
    gap: var(--space-2);
  }

  .parlay-stat {
    padding: var(--space-2);
  }
}

/* ==========================================================================
   Small Phone Breakpoint
   ========================================================================== */

@media (max-width: 480px) {
  .container {
    padding: var(--space-3);
    padding-bottom: calc(56px + var(--space-3) + env(safe-area-inset-bottom, 0px));
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }

  .stat-card {
    padding: var(--space-3);
  }

  .stat-value {
    font-size: var(--text-lg);
  }

  .page-title {
    font-size: var(--text-xl);
  }

  .page-subtitle {
    font-size: var(--text-sm);
  }

  .card {
    border-radius: var(--radius-md);
  }

  /* Parlay stats - two columns on small phones */
  .parlay-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Prediction detail - single column stats */
  .pred-detail-stats {
    grid-template-columns: 1fr;
  }

  .pred-detail-cell {
    padding: 0.75rem !important;
  }

  /* Date nav - tighter on small phones */
  .date-nav-label {
    font-size: var(--text-sm);
  }

  .date-nav-arrow {
    width: 44px;
    height: 44px;
  }

  .date-nav-arrow svg {
    width: 16px;
    height: 16px;
  }

  .page-title svg {
    width: 24px;
    height: 24px;
  }

  /* Game card scoreboard tightening */
  .game-team {
    min-width: 60px;
  }

  .game-team-name {
    display: none;
  }

  .game-score-area {
    gap: var(--space-2);
  }

  .game-prediction-details {
    gap: var(--space-2);
    flex-wrap: wrap;
    justify-content: center;
  }

  /* EV summary grid - 2 columns on small phones */
  .ev-summary-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }

  /* Compact navbar on small phones */
  .navbar {
    height: 56px;
  }

  .navbar-brand svg {
    width: 32px;
    height: 32px;
  }

  /* Compact bottom tab bar */
  .bottom-tab-bar {
    height: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  .bottom-tab svg {
    width: 20px;
    height: 20px;
  }

  .bottom-tab span {
    font-size: 10px;
  }

  /* Parlay pick details - tighter on small phones */
  .parlay-pick-details {
    font-size: var(--text-xs);
  }

  .parlay-pick {
    padding: var(--space-3);
    gap: var(--space-2);
  }

  /* Toast position for smaller tab bar */
  .toast-container {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-3);
  max-width: 420px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(22, 27, 34, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  color: var(--text-primary);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
  pointer-events: auto;
  max-width: 100%;
}

.toast-visible {
  transform: translateX(0);
  opacity: 1;
}

.toast-dismissing {
  transform: translateX(120%);
  opacity: 0;
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
}

.toast-icon svg {
  width: 20px;
  height: 20px;
}

.toast-message {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 0 0 var(--space-2);
  line-height: 1;
  transition: color 0.15s;
}

.toast-close:hover {
  color: var(--text-primary);
}

/* Toast type variants */
.toast-success {
  border-left: 3px solid var(--positive);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.08) 0%, rgba(22, 27, 34, 0.92) 40%);
}

.toast-success .toast-icon {
  color: var(--positive);
}

.toast-error {
  border-left: 3px solid var(--negative);
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.08) 0%, rgba(22, 27, 34, 0.92) 40%);
}

.toast-error .toast-icon {
  color: var(--negative);
}

.toast-warning {
  border-left: 3px solid var(--warning);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(22, 27, 34, 0.92) 40%);
}

.toast-warning .toast-icon {
  color: var(--warning);
}

.toast-info {
  border-left: 3px solid var(--accent-blue);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(22, 27, 34, 0.92) 40%);
}

.toast-info .toast-icon {
  color: var(--accent-blue);
}

@media (max-width: 640px) {
  .toast-container {
    left: var(--space-3);
    right: var(--space-3);
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    max-width: none;
  }
}

/* ===========================
   EV Scanner - Trading Terminal Styles
   =========================== */

.ev-summary-grid {
  grid-template-columns: repeat(6, 1fr);
  margin-bottom: var(--space-4);
}

.ev-highlight {
  color: var(--accent-primary) !important;
}

.ev-elite-text {
  color: #f0b429 !important;
}

.ev-strong-text {
  color: #fb923c !important;
}

/* Loading State */
.ev-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) 0;
  gap: var(--space-4);
}

.ev-loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-default);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: ev-spin 0.8s linear infinite;
}

@keyframes ev-spin {
  to { transform: rotate(360deg); }
}

.ev-loading-text {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ev-shimmer-rows {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.ev-shimmer-row {
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--border-default) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: ev-shimmer 1.5s infinite;
}

@keyframes ev-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Sections - Premium Tier Containers */
.ev-section {
  margin-bottom: var(--space-6);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  position: relative;
  border: 1px solid var(--border-default);
  background: linear-gradient(180deg, rgba(13, 17, 23, 0.9) 0%, var(--bg-card) 100%);
}

/* Colored top accent border */
.ev-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 2px;
  border-radius: 0 0 2px 2px;
}

/* -- Elite tier: Gold/Amber -- */
.ev-section.tier-elite {
  border-color: rgba(240, 180, 41, 0.3);
  box-shadow: 0 0 20px rgba(240, 180, 41, 0.06), inset 0 1px 0 rgba(240, 180, 41, 0.1);
}

.ev-section.tier-elite::before {
  background: linear-gradient(90deg, transparent, #f0b429, #d4a012, #f0b429, transparent);
}

/* -- Strong tier: Emerald/Green -- */
.ev-section.tier-strong {
  border-color: rgba(251, 146, 60, 0.3);
  box-shadow: 0 0 20px rgba(251, 146, 60, 0.06), inset 0 1px 0 rgba(251, 146, 60, 0.1);
}

.ev-section.tier-strong::before {
  background: linear-gradient(90deg, transparent, #fb923c, #f97316, #fb923c, transparent);
}

/* -- Game tier: Blue -- */
.ev-section.tier-game {
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: 0 0 20px rgba(96, 165, 250, 0.06), inset 0 1px 0 rgba(96, 165, 250, 0.1);
}

.ev-section.tier-game::before {
  background: linear-gradient(90deg, transparent, #93bbfd, #60a5fa, #93bbfd, transparent);
}

/* -- Moderate tier: Cool blue-gray -- */
.ev-section.tier-moderate {
  border-color: rgba(139, 148, 158, 0.25);
  box-shadow: 0 0 15px rgba(139, 148, 158, 0.04), inset 0 1px 0 rgba(139, 148, 158, 0.08);
}

.ev-section.tier-moderate::before {
  background: linear-gradient(90deg, transparent, #6b7280, #8b949e, #6b7280, transparent);
}

/* Tier Headers */
.ev-tier-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-default);
}

.ev-tier-header-text {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.ev-tier-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tier-elite .ev-tier-title {
  background: linear-gradient(135deg, #f7d070, #f0b429, #d4a012, #f0b429);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 8px rgba(240, 180, 41, 0.3));
}

.tier-strong .ev-tier-title {
  background: linear-gradient(135deg, #fdba74, #fb923c, #f97316, #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 8px rgba(251, 146, 60, 0.3));
}

.tier-game .ev-tier-title {
  background: linear-gradient(135deg, #93bbfd, #60a5fa, #3b82f6, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.3));
}

.tier-moderate .ev-tier-title {
  color: var(--text-secondary);
}

.ev-tier-count {
  border-radius: var(--radius-full);
  padding: 0.15rem 0.65rem;
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: var(--font-mono);
}

.tier-elite .ev-tier-count {
  background: rgba(240, 180, 41, 0.12);
  border: 1px solid rgba(240, 180, 41, 0.3);
  color: #f0b429;
}

.tier-strong .ev-tier-count {
  background: rgba(251, 146, 60, 0.12);
  border: 1px solid rgba(251, 146, 60, 0.3);
  color: #fb923c;
}

.tier-game .ev-tier-count {
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #60a5fa;
}

.tier-moderate .ev-tier-count {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
}

.ev-tier-desc {
  color: var(--text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* Filter Controls Bar */
.ev-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.ev-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 120px;
}

.ev-filter-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.ev-filter-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  transition: border-color var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 1.8rem;
}

.ev-filter-select:hover,
.ev-filter-select:focus {
  border-color: var(--accent-primary);
  outline: none;
}

@media (max-width: 768px) {
  .ev-filter-bar {
    gap: var(--space-2);
  }

  .ev-filter-group {
    min-width: calc(50% - var(--space-2));
    flex: none;
  }
}

/* Tier Grids */
.ev-tier-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Prop Pick Cards */
.ev-pick {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: rgba(13, 17, 23, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--border-default);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Tier-specific pick card accents */
.tier-elite .ev-pick {
  border-left-color: rgba(240, 180, 41, 0.5);
}

.tier-elite .ev-pick:hover {
  transform: translateX(4px);
  border-color: rgba(240, 180, 41, 0.4);
  border-left-color: #f0b429;
  box-shadow: 0 0 12px rgba(240, 180, 41, 0.08);
}

.tier-strong .ev-pick {
  border-left-color: rgba(251, 146, 60, 0.5);
}

.tier-strong .ev-pick:hover {
  transform: translateX(4px);
  border-color: rgba(251, 146, 60, 0.4);
  border-left-color: #fb923c;
  box-shadow: 0 0 12px rgba(251, 146, 60, 0.08);
}

.tier-moderate .ev-pick {
  border-left-color: rgba(139, 148, 158, 0.35);
}

.tier-moderate .ev-pick:hover {
  transform: translateX(4px);
  border-color: rgba(139, 148, 158, 0.3);
  border-left-color: #8b949e;
}

.tier-game .ev-pick {
  border-left-color: rgba(96, 165, 250, 0.5);
}

.tier-game .ev-pick:hover {
  transform: translateX(4px);
  border-color: rgba(96, 165, 250, 0.4);
  border-left-color: #60a5fa;
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.08);
}

/* Tier-scoped prop type badge colors */
.tier-elite .badge-success,
.tier-elite .badge-warning {
  background: rgba(240, 180, 41, 0.15);
  border-color: rgba(240, 180, 41, 0.4);
  color: #f0b429;
}

.tier-strong .badge-success,
.tier-strong .badge-warning {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.35);
  color: #60a5fa;
}

.tier-moderate .badge-success,
.tier-moderate .badge-warning {
  background: rgba(139, 148, 158, 0.1);
  border-color: rgba(139, 148, 158, 0.3);
  color: #8b949e;
}

.ev-pick-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.ev-pick-player {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev-pick-matchup {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.ev-pick-details {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.ev-pick-line {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.ev-secondary-stats {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.ev-pick-ev {
  text-align: right;
  flex-shrink: 0;
}

/* EV Value Display */
.ev-value {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1.2;
  color: #fb923c;
  text-shadow: 0 0 12px rgba(251, 146, 60, 0.3);
}

.tier-elite .ev-value {
  color: #f0b429;
  text-shadow: 0 0 12px rgba(240, 180, 41, 0.35);
}

.tier-strong .ev-value {
  color: #fb923c;
  text-shadow: 0 0 12px rgba(251, 146, 60, 0.3);
}

.tier-game .ev-value {
  color: #60a5fa;
  text-shadow: 0 0 12px rgba(96, 165, 250, 0.35);
}

.tier-moderate .ev-value {
  color: var(--text-secondary);
  text-shadow: none;
}

.ev-value-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

/* (Game picks now reuse .ev-pick card structure) */

/* Empty State */
.ev-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) 0;
  gap: var(--space-3);
  color: var(--text-muted);
  text-align: center;
}

.ev-empty-sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
  opacity: 0.7;
}

.ev-error-text {
  color: var(--danger);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .ev-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ev-section {
    padding: var(--space-4);
    margin-bottom: var(--space-4);
  }

  .ev-tier-title {
    font-size: 1.1rem;
  }

  .ev-pick {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .ev-pick-ev {
    text-align: left;
  }

  .ev-value {
    font-size: 1.25rem;
  }

  .ev-secondary-stats {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .ev-tier-desc {
    display: none;
  }
}

/* ==========================================================================
   Dashboard Polish - Card Hover Glow
   ========================================================================== */

/* Subtle emerald/blue gradient border glow on hover for all card types */
.game-card:hover {
  border-color: rgba(249, 115, 22, 0.25);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(249, 115, 22, 0.08), 0 0 40px rgba(249, 115, 22, 0.04);
}

.parlay-card:hover {
  box-shadow: var(--shadow-xl), 0 0 25px rgba(249, 115, 22, 0.12), 0 0 50px rgba(249, 115, 22, 0.05);
}

.card:hover {
  box-shadow: var(--shadow-lg), 0 0 20px rgba(249, 115, 22, 0.06);
}

/* High confidence game cards get a persistent subtle pulse glow */
.game-card-high-conf {
  animation: confGlowPulse 3s ease-in-out infinite;
}

@keyframes confGlowPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(249, 115, 22, 0.08); }
  50% { box-shadow: 0 0 18px rgba(249, 115, 22, 0.15), 0 0 35px rgba(249, 115, 22, 0.06); }
}

/* ==========================================================================
   Dashboard Polish - Extended Staggered Entrance Animations
   ========================================================================== */

.fade-in > *:nth-child(6)  { animation-delay: 0.30s; }
.fade-in > *:nth-child(7)  { animation-delay: 0.35s; }
.fade-in > *:nth-child(8)  { animation-delay: 0.40s; }
.fade-in > *:nth-child(9)  { animation-delay: 0.45s; }
.fade-in > *:nth-child(10) { animation-delay: 0.50s; }
.fade-in > *:nth-child(11) { animation-delay: 0.55s; }
.fade-in > *:nth-child(12) { animation-delay: 0.60s; }
.fade-in > *:nth-child(n+13) { animation-delay: 0.65s; }

/* Grid variant: stagger based on grid position with faster timing */
.fade-in-grid > * {
  opacity: 0;
  animation: fadeInUp 0.35s ease-out forwards;
}

.fade-in-grid > *:nth-child(1)  { animation-delay: 0.03s; }
.fade-in-grid > *:nth-child(2)  { animation-delay: 0.06s; }
.fade-in-grid > *:nth-child(3)  { animation-delay: 0.09s; }
.fade-in-grid > *:nth-child(4)  { animation-delay: 0.12s; }
.fade-in-grid > *:nth-child(5)  { animation-delay: 0.15s; }
.fade-in-grid > *:nth-child(6)  { animation-delay: 0.18s; }
.fade-in-grid > *:nth-child(7)  { animation-delay: 0.21s; }
.fade-in-grid > *:nth-child(8)  { animation-delay: 0.24s; }
.fade-in-grid > *:nth-child(9)  { animation-delay: 0.27s; }
.fade-in-grid > *:nth-child(10) { animation-delay: 0.30s; }
.fade-in-grid > *:nth-child(11) { animation-delay: 0.33s; }
.fade-in-grid > *:nth-child(12) { animation-delay: 0.36s; }
.fade-in-grid > *:nth-child(n+13) { animation-delay: 0.39s; }

/* ==========================================================================
   Dashboard Polish - Stat Card Enhancements
   ========================================================================== */

/* Hover lift with glow (enhancing existing hover) */
.stat-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(249, 115, 22, 0.3);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(249, 115, 22, 0.1);
}

/* ==========================================================================
   Dashboard Polish - Table Row Hover Polish
   ========================================================================== */

/* Alternate row striping */
tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.01);
}

/* Smoother hover background transition */
tbody tr {
  transition: background var(--transition-base), box-shadow var(--transition-fast);
}

tbody tr:hover {
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.04) 0%, rgba(28, 33, 40, 0.6) 30%, transparent 100%);
}

/* Left accent bar on hover - enhance existing */
tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--accent-primary), inset 8px 0 12px -6px rgba(249, 115, 22, 0.1);
}

/* ==========================================================================
   Dashboard Polish - Nav Active Indicator Glow
   ========================================================================== */

/* Base pseudo-element for nav glow line */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  right: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-light), transparent);
  border-radius: 2px;
  opacity: 0;
  transition: all var(--transition-base);
}

.nav-link:hover::after {
  left: 25%;
  right: 25%;
  opacity: 0.5;
}

.nav-link.active::after {
  left: 20%;
  right: 20%;
  opacity: 1;
  filter: blur(1px);
}

/* ==========================================================================
   Dashboard Polish - Badge Utility Classes
   ========================================================================== */

.badge-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.08) 100%);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.08) 100%);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-accent {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(249, 115, 22, 0.08) 100%);
  color: var(--accent-light);
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.badge-danger {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.15) 0%, rgba(244, 63, 94, 0.08) 100%);
  color: var(--negative-light);
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.badge-info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.08) 100%);
  color: var(--accent-blue-light);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

/* ==========================================================================
   Dashboard Polish - Empty State Animation
   ========================================================================== */

/* Subtle floating animation on empty state icons */
.empty-state svg {
  animation: emptyFloat 3s ease-in-out infinite;
  width: 72px;
  height: 72px;
}

@keyframes emptyFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Slightly more inviting empty states */
.empty-state {
  padding: var(--space-12) var(--space-8) calc(var(--space-12) + var(--space-4));
}

.empty-state-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

.empty-state-text {
  font-size: var(--text-base);
  max-width: 450px;
  line-height: 1.7;
}

/* ==========================================================================
   Dashboard Polish - Focus & Accessibility
   ========================================================================== */

/* Focus-visible ring for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Buttons get a glow ring */
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow), 0 0 15px var(--accent-glow);
}

/* Form inputs already have focus styles, enhance with focus-visible */
.form-input:focus-visible,
.form-select:focus-visible,
.form-control:focus-visible {
  outline: none;
}

/* Nav links */
.nav-link:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: -2px;
  border-radius: var(--radius-md);
}

/* Table rows - keyboard focus */
tr:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: -2px;
}

/* ==========================================================================
   Dashboard Polish - Scrollbar for All Containers
   ========================================================================== */

/* Ensure custom scrollbar applies to overflow containers */
.table-container::-webkit-scrollbar,
.injury-league-teams::-webkit-scrollbar,
.parlay-picks::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.table-container::-webkit-scrollbar-track,
.injury-league-teams::-webkit-scrollbar-track,
.parlay-picks::-webkit-scrollbar-track {
  background: transparent;
}

.table-container::-webkit-scrollbar-thumb,
.injury-league-teams::-webkit-scrollbar-thumb,
.parlay-picks::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: var(--radius-full);
}

.table-container::-webkit-scrollbar-thumb:hover,
.injury-league-teams::-webkit-scrollbar-thumb:hover,
.parlay-picks::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Firefox scrollbar */
.table-container,
.injury-league-teams,
.parlay-picks {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-hover) transparent;
}

/* ==========================================================================
   Dashboard Polish - Loading Skeleton Enhancements
   ========================================================================== */

/* Skeleton stat card placeholder */
.skeleton-stat {
  height: 80px;
  border-radius: var(--radius-lg);
}

/* Skeleton card placeholder */
.skeleton-card {
  height: 120px;
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-4);
}

/* Skeleton table row */
.skeleton-row {
  height: 48px;
  margin-bottom: var(--space-2);
  border-radius: var(--radius-sm);
}

/* Date input dark scheme (extend to form-input) */
input[type="date"].form-input {
  color-scheme: dark;
}

/* EV Scanner stat cards pulse while loading */
.ev-stats-loading .stat-card {
  animation: statLoadPulse 1.5s ease-in-out infinite;
}

.ev-stats-loading .stat-value {
  opacity: 0.3;
}

@keyframes statLoadPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ==========================================================================
   Dashboard Polish - Info Tooltips
   ========================================================================== */

.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  cursor: help;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  line-height: 1;
}

.info-tip:hover {
  background: rgba(249, 115, 22, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-light);
}

.info-tip-content {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 300px;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: var(--text-xs);
  font-weight: 400;
  font-style: normal;
  font-family: var(--font-sans);
  color: var(--text-secondary);
  line-height: 1.6;
  z-index: 10000;
  text-align: left;
  white-space: normal;
}

/* Arrow pointing down to the info-tip button */
.info-tip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border-default);
}

/* Show on hover (desktop) */
.info-tip:hover .info-tip-content {
  display: block;
}

/* Show when toggled open (mobile) */
.info-tip.info-tip-open .info-tip-content {
  display: block;
}

/* Emphasized text inside tooltips */
.info-tip-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.info-tip-content .tip-accent {
  color: var(--accent-light);
  font-weight: 600;
}

/* Mobile tooltip portal (rendered by JS as direct child of body) */
.info-tip-portal {
  position: fixed;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  left: var(--space-4);
  right: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: var(--text-xs);
  font-weight: 400;
  font-family: var(--font-sans);
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: left;
  white-space: normal;
  z-index: 10000;
}

.info-tip-portal strong {
  color: var(--text-primary);
  font-weight: 600;
}

.info-tip-portal .tip-accent {
  color: var(--accent-light);
  font-weight: 600;
}

@media (max-width: 768px) {
  /* Hide inline tooltip on mobile - JS portal handles display */
  .info-tip:hover .info-tip-content,
  .info-tip.info-tip-open .info-tip-content {
    display: none !important;
  }
}

/* ==========================================================================
   Hamburger Button & Mobile Navigation Drawer
   ========================================================================== */

/* Hamburger button - hidden on desktop */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  position: relative;
  z-index: 201;
  flex-shrink: 0;
}

.nav-hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 20px;
  height: 16px;
  position: relative;
}

.nav-hamburger-icon span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  left: 0;
}

.nav-hamburger-icon span:nth-child(1) { top: 0; }
.nav-hamburger-icon span:nth-child(2) { top: 7px; }
.nav-hamburger-icon span:nth-child(3) { top: 14px; }

/* Hamburger to X animation */
body.nav-drawer-open .nav-hamburger-icon span:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}

body.nav-drawer-open .nav-hamburger-icon span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

body.nav-drawer-open .nav-hamburger-icon span:nth-child(3) {
  top: 7px;
  transform: rotate(-45deg);
}

/* Backdrop overlay */
.nav-mobile-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 149;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.nav-drawer-open .nav-mobile-backdrop {
  display: block;
  opacity: 1;
}

/* Mobile drawer panel */
.nav-mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: var(--bg-dark);
  border-left: 1px solid var(--border-default);
  z-index: 150;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

body.nav-drawer-open .nav-mobile-drawer {
  transform: translateX(0);
}

/* Drawer header */
.nav-drawer-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-5) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-drawer-header .navbar-brand-text {
  display: block;
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Drawer navigation links */
.nav-drawer-links {
  list-style: none;
  padding: var(--space-3) var(--space-3);
  flex: 1;
}

.nav-drawer-links li {
  margin-bottom: var(--space-1);
}

.nav-drawer-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-drawer-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-drawer-link.active {
  color: var(--text-primary);
  background: var(--accent-gradient);
  box-shadow: 0 2px 10px var(--accent-glow);
}

.nav-drawer-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Drawer sub-links (History dropdown items) */
.nav-drawer-sub {
  list-style: none;
  padding-left: var(--space-6);
}

.nav-drawer-sub .nav-drawer-link {
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-3);
}

/* Drawer footer (status, tip, refresh) */
.nav-drawer-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.nav-drawer-footer .status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.nav-drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.nav-drawer-actions .btn {
  flex: 1 1 calc(50% - var(--space-2) / 2);
  justify-content: center;
  min-height: 44px;
  min-width: 0;
}

.nav-drawer-actions .btn span {
  display: inline;
}

/* Prevent body scroll when drawer is open */
body.nav-drawer-open {
  overflow: hidden;
}

/* ==========================================================================
   Bottom Tab Bar (Mobile)
   ========================================================================== */

.bottom-tab-bar {
  display: none;
}

@media (max-width: 768px) {
  .bottom-tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
    z-index: 100;
    align-items: stretch;
    justify-content: space-around;
  }

  .bottom-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 4px;
    padding: 8px 0;
    color: var(--text-muted);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    transition: color var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
  }

  .bottom-tab svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .bottom-tab span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
  }

  .bottom-tab.active {
    color: var(--accent-light);
  }

  .bottom-tab.active::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-glow);
  }
}


/* ==========================================================================
   Auth Pages
   ========================================================================== */

.auth-page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.auth-logo-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: contrast(1.2) brightness(1.1) invert(1);
}

.auth-logo-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.auth-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
  text-align: center;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-optional {
  font-weight: 400;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.form-checkbox-group {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
}

.form-checkbox-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.form-checkbox-label .form-checkbox {
  display: inline-block;
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  accent-color: var(--accent-primary);
  cursor: pointer;
  appearance: auto;
  vertical-align: middle;
}

.form-checkbox-label span {
  line-height: 1;
  vertical-align: middle;
}

.auth-submit {
  width: 100%;
  padding: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-top: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
}

.auth-footer-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: var(--space-8);
}

.auth-link {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 600;
}

.auth-link:hover {
  text-decoration: underline;
}

/* Flash Messages */
.flash-messages {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.flash-message {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.flash-error {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--negative-light);
}

.flash-success {
  background: rgba(249, 115, 22, 0.1);
  border-color: rgba(249, 115, 22, 0.3);
  color: var(--accent-light);
}

.flash-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--accent-blue-light);
}

/* QR Code Container */
.qr-container {
  display: flex;
  justify-content: center;
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}

.qr-image {
  width: 200px;
  height: 200px;
  image-rendering: pixelated;
}

.manual-secret {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.manual-secret summary {
  margin-bottom: 0.5rem;
}

.secret-code {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent-light);
  letter-spacing: 0.1em;
  word-break: break-all;
  user-select: all;
}

/* TOTP Input */
.totp-input {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.5em;
  padding: 0.75rem;
}

/* User Menu (navbar) */
.user-menu {
  position: relative;
}

.user-menu-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  font-family: inherit;
}

.user-menu-toggle:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.user-menu-toggle svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.user-menu-arrow {
  width: 12px !important;
  height: 12px !important;
  transition: transform 0.2s;
}

.user-menu.open .user-menu-arrow {
  transform: rotate(180deg);
}

.user-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 0.375rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 1000;
}

.user-menu.open .user-menu-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  font-family: inherit;
}

.user-menu-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.user-menu-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.user-menu-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0.25rem 0.5rem;
}

.user-menu-item.danger:hover {
  color: var(--negative-light);
}

/* Mobile drawer user section */
.nav-drawer-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin: 0 0.5rem 0.5rem;
  background: var(--bg-elevated);
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.nav-drawer-user-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-drawer-user-icon svg {
  width: 16px;
  height: 16px;
  color: white;
}

.nav-drawer-user-info {
  flex: 1;
  min-width: 0;
}

.nav-drawer-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-drawer-user-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Landing page auth buttons */
.landing-auth-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  animation: fadeInUp 1s ease-out 1.2s backwards;
}

.btn-auth-landing {
  padding: 0.75rem 2rem;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-auth-landing:hover {
  transform: translateY(-2px);
}

.btn-auth-signin {
  background: transparent;
  color: #f0f6fc;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-auth-signin:hover {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.05);
}

.btn-auth-signup {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: white;
}

.btn-auth-signup:hover {
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.3);
}

