/* ============================================================
   STANLEIT - New Design System
   Mobile-First | Dark/Light Theme | Hockey Style
   ============================================================ */

/* ---- Google Fonts (loaded via base.html.twig) ---- */

/* ============================================================
   CSS CUSTOM PROPERTIES - DESIGN TOKENS
   ============================================================ */
:root {
  /* === Stanleit Brand Colors === */
  --sl-gold: #F5A623;
  --sl-gold-dark: #C8841A;
  --sl-gold-light: #FDD68E;
  --sl-navy: #0C2340;
  --sl-navy-mid: #1A3A5C;
  --sl-navy-light: #2E5480;
  --sl-ice: #4FC3F7;
  --sl-ice-light: #B3E5FC;

  /* === Semantic Colors === */
  --sl-success: #2E7D32;
  --sl-success-light: #4CAF50;
  --sl-danger: #C62828;
  --sl-danger-light: #EF5350;
  --sl-warning: #F57C00;
  --sl-warning-light: #FFA726;
  --sl-info: #0277BD;
  --sl-info-light: #29B6F6;

  /* === Light Theme === */
  --bg-primary: #F8F9FA;
  --bg-secondary: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F0F4F8;
  --bg-elevated: #F0F4F8;
  --bg-header: #0C2340;
  --bg-nav-mobile: #FFFFFF;
  --bg-input: #FFFFFF;
  --bg-table-header: #1A3A5C;
  --bg-table-stripe: #F0F4F8;
  --bg-badge: #E3EAF2;
  --bg-my-team: #fef3dc;

  --text-primary: #0C2340;
  --text-secondary: #4A6280;
  --text-muted: #8096AC;
  --text-inverse: #FFFFFF;
  --text-accent: #F5A623;
  --text-link: #1A3A5C;
  --text-link-hover: #F5A623;

  --border-color: #D4DEE8;
  --border-light: #E8EFF5;
  --divider: #E0E8F0;

  --shadow-sm: 0 1px 3px rgba(12,35,64,0.08);
  --shadow-md: 0 4px 12px rgba(12,35,64,0.12);
  --shadow-lg: 0 8px 24px rgba(12,35,64,0.16);

  /* === Typography === */
  --font-body: 'Roboto', system-ui, -apple-system, sans-serif;
  --font-heading: 'Roboto Condensed', 'Roboto', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* === Spacing === */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* === Border Radius === */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* === Transitions === */
  --transition: all 0.2s ease;

  /* === Layout === */
  --header-height: 60px;
  --mobile-nav-height: 64px;
  --container-max: 1280px;

  /* Backward compat with old CSS */
  --my-secondary-dark: #0C2340;
  --my-secondary: #1A3A5C;
  --my-primary: #F5A623;
  --my-primary-light: #FFF3D6;
  --tblr-primary: #1A3A5C;

  --yellow-500: #F5A623;
  --red-500: #EF5350;
  --red-700: #C62828;
  --green-500: #4CAF50;
  --gray-100: #F0F4F8;
  --gray-200: #D4DEE8;
  --gray-300: #B8C8D8;
  --gray-400: #8096AC;
  --gray-500: #637D96;
  --gray-600: #4A677F;
  --gray-700: #2E4D66;
  --gray-800: #1A3348;
  --gray-900: #0C2340;
  --azure: #29B6F6;
  --blue-500: #2196F3;
}

/* === Dark Theme === */
[data-theme="dark"] {
  --bg-primary: #0A1929;
  --bg-secondary: #0F2744;
  --bg-card: #122C4A;
  --bg-card-hover: #1A3A5C;
  --bg-elevated: #1A3A5C;
  --bg-header: #06111E;
  --bg-nav-mobile: #0F2744;
  --bg-input: #0F2744;
  --bg-table-header: #0C2340;
  --bg-table-stripe: #0F2744;
  --bg-badge: #1A3A5C;
  --bg-my-team: #2a2010;

  --text-primary: #E8F0F8;  --text-secondary: #A0BAD0;
  --text-muted: #6B8BA4;
  --text-inverse: #FFFFFF;
  --text-accent: #F5A623;
  --text-link: #4FC3F7;
  --text-link-hover: #F5A623;

  --border-color: #1E3A5C;
  --border-light: #1A3350;
  --divider: #1E3A5C;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);

  --gray-100: #1A3A5C;
  --gray-200: #1E3A5C;
  --bg-badge: #1A3A5C;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* sticky footer pattern */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* space for mobile nav */
  padding-bottom: var(--mobile-nav-height);
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0 0 var(--space-md);
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--text-link-hover);
}

img {
  max-width: 100%;
  height: auto;
}

input, select, textarea {
  font-family: var(--font-body);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.sl-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sl-container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 768px) {
  .sl-container {
    padding: 0 var(--space-lg);
  }
}

.sl-main {
  flex: 1;
  padding: var(--space-md) 0;
}

@media (min-width: 768px) {
  .sl-main {
    padding: var(--space-xl) 0;
  }
}

/* ============================================================
   HEADER
   ============================================================ */
.sl-header {
  background: var(--bg-header);
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  border-bottom: 2px solid var(--sl-gold);
}

.sl-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--space-md);
  max-width: var(--container-max);
  margin: 0 auto;
}

.sl-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.sl-logo img {
  height: 38px;
  width: auto;
  filter: drop-shadow(0 2px 10px rgba(79,195,247,0.6));
}

.sl-logo-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--sl-gold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: none;
}

@media (min-width: 480px) {
  .sl-logo-text {
    display: block;
  }
}

.sl-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sl-team-badge {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background 0.2s;
  cursor: pointer;
}

.sl-team-badge:hover {
  background: rgba(255,255,255,0.1);
}

.sl-team-badge img {
  height: 36px;
  width: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(79,195,247,0.6));
}

.sl-team-badge-info {
  display: none;
  flex-direction: column;
}

@media (min-width: 960px) {
  .sl-team-badge-info {
    display: flex;
  }
}

.sl-team-badge-name {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-inverse);
  line-height: 1;
}

.sl-team-badge-user {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  line-height: 1;
  margin-top: 2px;
}

/* Theme Toggle */
.sl-theme-toggle {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.sl-theme-toggle:hover {
  background: rgba(255,255,255,0.2);
  color: var(--sl-gold);
}

/* ============================================================
   DESKTOP NAVIGATION
   ============================================================ */
.sl-desktop-nav {
  display: none;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .sl-desktop-nav {
    display: block;
  }
}

.sl-desktop-nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 44px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sl-desktop-nav-inner::-webkit-scrollbar {
  display: none;
}

.sl-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0 var(--space-md);
  height: 44px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  position: relative;
}

.sl-nav-link:hover,
.sl-nav-link.active {
  color: #ffffff;
  border-bottom-color: var(--sl-gold);
}

/* L'header è sempre dark navy in entrambi i temi, non servono override per dark */

.sl-nav-link i,
.sl-nav-link svg {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Nav Dropdown */
.sl-nav-dropdown {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.sl-nav-dropdown-toggle {
  cursor: pointer;
}

.sl-nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  z-index: 9999;
  padding: var(--space-sm) 0;
  padding-top: 8px;
  overflow: visible;
}

/* Ponte invisibile sopra il menu per evitare gap tra toggle e menu */
.sl-nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.sl-nav-dropdown.open .sl-nav-dropdown-menu {
  display: block;
}

.sl-nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}

.sl-nav-dropdown-item:hover {
  background: var(--bg-card-hover);
  color: var(--sl-gold-dark);
}

.sl-nav-dropdown-item i {
  width: 16px;
  color: var(--text-muted);
}

.sl-nav-dropdown-divider {
  height: 1px;
  background: var(--divider);
  margin: var(--space-xs) 0;
}

/* ============================================================
   MOBILE BOTTOM NAVIGATION
   ============================================================ */
.sl-mobile-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  /* include device safe area (home indicator / gesture bar) into height so the nav sits above it */
  height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
  /* fallback: use JS-calculated CSS variable for browsers that don't expose env(safe-area-inset-bottom) */
  height: calc(var(--mobile-nav-height) + var(--safe-area-bottom-px, 0px));
  background: var(--bg-nav-mobile);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
  padding-bottom: var(--safe-area-bottom-px, 0px);
}

@media (min-width: 768px) {
  .sl-mobile-nav {
    display: none;
  }
}

.sl-mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  padding: var(--space-xs);
}

.sl-mobile-nav-item i,
.sl-mobile-nav-item svg {
  font-size: 1.3rem;
}

.sl-mobile-nav-item.active,
.sl-mobile-nav-item:hover {
  color: var(--sl-gold);
}

/* Mobile Menu Drawer */
.sl-mobile-drawer {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  padding: var(--space-lg);
  /* include safe-area inset bottom so drawer content sits above home/gesture bar */
  padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom));
  /* fallback when env() is not available: use JS-updated --safe-area-bottom-px */
  padding-bottom: calc(var(--space-lg) + var(--safe-area-bottom-px, 0px));
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.25s ease;
}

.sl-mobile-drawer.open {
  display: block;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sl-drawer-handle {
  width: 40px;
  height: 4px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-lg);
}

.sl-drawer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.sl-drawer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  font-size: 0.7rem;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: var(--transition);
  text-align: center;
}

.sl-drawer-item:hover {
  background: var(--sl-gold);
  color: var(--sl-navy);
  border-color: var(--sl-gold);
}

.sl-drawer-item i {
  font-size: 1.4rem;
  color: var(--sl-navy);
}

[data-theme="dark"] .sl-drawer-item i {
  color: var(--sl-gold);
}

.sl-drawer-item:hover i {
  color: var(--sl-navy);
}

.sl-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1999;
}

.sl-drawer-overlay.open {
  display: block;
}

/* ============================================================
   CARDS
   ============================================================ */
.sl-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-md);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.sl-card:hover {
  box-shadow: var(--shadow-md);
}

.sl-card-header {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-table-header);
  color: var(--text-inverse);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.sl-card-header.gold {
  background: var(--sl-gold);
  color: var(--sl-navy);
}

.sl-card-header.navy {
  background: var(--sl-navy);
  color: #fff;
}

.sl-card-body {
  padding: var(--space-md);
}

.sl-card-body.p-0 {
  padding: 0;
}

/* ============================================================
   GRID
   ============================================================ */
.sl-row {
  display: grid;
  gap: var(--space-md);
}

.sl-row.cols-2 {
  grid-template-columns: 1fr;
}

.sl-row.cols-3 {
  grid-template-columns: 1fr;
}

.sl-row.cols-4 {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .sl-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .sl-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .sl-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   TABLES
   ============================================================ */
.sl-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.sl-table th {
  background: var(--bg-table-header);
  color: var(--text-inverse);
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-xs) var(--space-sm);
  text-align: left;
  white-space: nowrap;
}

.sl-table td {
  padding: var(--space-xs) var(--space-sm);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}

.sl-table tbody tr:hover {
  background: var(--bg-table-stripe);
}

.sl-table tbody tr:last-child td {
  border-bottom: none;
}

.sl-table .text-right { text-align: right; }
.sl-table .text-center { text-align: center; }
.sl-table .highlight { background: var(--bg-table-stripe) !important; }

/* highlight current user's team */
.sl-table tr.my-team td {
  background: linear-gradient(90deg, rgba(245,166,35,0.15) 0%, transparent 70%);
}

/* ============================================================
   BADGES
   ============================================================ */
.sl-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-sm);
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
}

.sl-badge-gold { background: var(--sl-gold); color: var(--sl-navy); }
.sl-badge-navy { background: var(--sl-navy); color: #fff; }
.sl-badge-success { background: var(--sl-success); color: #fff; }
.sl-badge-danger { background: var(--sl-danger); color: #fff; }
.sl-badge-warning { background: var(--sl-warning); color: #fff; }
.sl-badge-info { background: var(--sl-info); color: #fff; }
.sl-badge-muted { background: var(--bg-badge); color: var(--text-secondary); }
.sl-badge-live { background: var(--sl-danger-light); color: #fff; animation: pulse 1.5s infinite; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}

.badge.bg-green { background: var(--sl-success) !important; color: #fff; }
.badge.bg-red { background: var(--sl-danger) !important; color: #fff; }
.badge.bg-yellow { background: var(--sl-gold) !important; color: var(--sl-navy); }
.badge.bg-azure { background: var(--sl-info) !important; color: #fff; }
.badge.bg-blue { background: #1565C0 !important; color: #fff; }
.badge.bg-gray { background: var(--bg-badge) !important; color: var(--text-secondary); }
.badge.bg-black { background: #222 !important; color: #fff; }
.badge.bg-danger { background: var(--sl-danger) !important; color: #fff; }
.badge.bg-success { background: var(--sl-success) !important; color: #fff; }
.badge.bg-my-primary { background: var(--sl-gold) !important; color: var(--sl-navy); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn-primary {
  background: var(--sl-navy);
  color: #fff;
  border-color: var(--sl-navy);
}

.btn-primary:hover {
  background: var(--sl-navy-mid);
  color: #fff;
}

.btn-gold {
  background: var(--sl-gold);
  color: var(--sl-navy);
  border-color: var(--sl-gold);
}

.btn-gold:hover {
  background: var(--sl-gold-dark);
  color: var(--sl-navy);
}

.btn-success {
  background: var(--sl-success);
  color: #fff;
  border-color: var(--sl-success);
}

.btn-success:hover {
  background: #1B5E20;
  color: #fff;
}

.btn-danger,
.btn-red {
  background: var(--sl-danger);
  color: #fff;
  border-color: var(--sl-danger);
}

.btn-danger:hover,
.btn-red:hover {
  background: #B71C1C;
  color: #fff;
}

.btn-outline-primary {
  background: transparent;
  color: var(--sl-navy);
  border-color: var(--sl-navy);
}

.btn-outline-primary:hover {
  background: var(--sl-navy);
  color: #fff;
}

[data-theme="dark"] .btn-outline-primary {
  color: var(--sl-ice);
  border-color: var(--sl-ice);
}

[data-theme="dark"] .btn-outline-primary:hover {
  background: var(--sl-ice);
  color: var(--sl-navy);
}

.btn-outline-danger {
  background: transparent;
  color: var(--sl-danger);
  border-color: var(--sl-danger);
}

.btn-outline-danger:hover {
  background: var(--sl-danger);
  color: #fff;
}

.btn-outline-success {
  background: transparent;
  color: var(--sl-success);
  border-color: var(--sl-success);
}

.btn-outline-success:hover {
  background: var(--sl-success);
  color: #fff;
}

.btn-outline-warning {
  background: transparent;
  color: var(--sl-warning);
  border-color: var(--sl-warning);
}

.btn-outline-warning:hover {
  background: var(--sl-warning);
  color: #fff;
}

.btn-sm {
  padding: 4px var(--space-sm);
  font-size: 0.7rem;
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 0.95rem;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.w-full { width: 100%; }

/* ============================================================
   FORMS
   ============================================================ */
.form-control,
.form-select {
  display: block;
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: border-color 0.2s;
  line-height: 1.5;
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--sl-gold);
  box-shadow: 0 0 0 3px rgba(245,166,35,0.2);
}

.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .form-control {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-table-header);
  color: var(--text-inverse);
  border: 1.5px solid var(--bg-table-header);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  font-size: 0.8rem;
  white-space: nowrap;
}

.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.form-check-input {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  accent-color: var(--sl-gold);
}

.form-check-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ============================================================
   PROGRESS BARS
   ============================================================ */
.progress {
  height: 6px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--sl-gold);
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

.progress-bar.bg-my-secondary,
.progress-bar.bg-my-secondary-dark {
  background: var(--sl-navy-mid);
}

/* ============================================================
   PAGE TITLE
   ============================================================ */
.sl-page-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-align: center;
  width: 100%;
  margin-bottom: var(--space-lg);
  position: relative;
}

.sl-page-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--sl-gold);
  margin: var(--space-sm) auto 0;
  border-radius: var(--radius-full);
}

/* legacy support */
.h1-page {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: var(--space-lg);
  position: relative;
}

.h1-page::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--sl-gold);
  margin: var(--space-sm) auto 0;
  border-radius: var(--radius-full);
}

/* ============================================================
   FOOTER
   ============================================================ */
.sl-footer {
  background: var(--bg-header);
  color: rgba(255,255,255,0.6);
  padding: var(--space-lg) 0;
  text-align: center;
  font-size: 0.8rem;
  border-top: 2px solid var(--sl-gold);
}

.sl-footer a {
  color: var(--sl-gold);
}

/* ============================================================
   STAT CARD (KPI)
   ============================================================ */
.sl-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.sl-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sl-stat-value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.sl-stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================================
   SCOREBOARD CARD
   ============================================================ */
.sl-scoreboard-item {
  display: flex;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.15s;
  position: relative;
  overflow: hidden;
  gap: var(--space-md);
  min-height: 64px;
}

.sl-scoreboard-item:last-child {
  border-bottom: none;
}

.sl-scoreboard-item:hover {
  background: var(--bg-card-hover);
}

.sl-scoreboard-team {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
}

.sl-scoreboard-team.away {
  flex-direction: row-reverse;
}

.sl-scoreboard-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.sl-scoreboard-name {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-primary);
}

.sl-scoreboard-score {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 100px;
  justify-content: center;
}

.sl-score-num {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
  min-width: 36px;
  text-align: center;
}

.sl-score-num.winner {
  color: var(--sl-gold);
}

.sl-score-sep {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* old scoreboard compat */
.card-scoreboard {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-light);
}

.card-scoreboard:last-child {
  border-bottom: none;
}

.card-scoreboard .logo {
  height: 80px;
  position: absolute;
  opacity: 0.5;
  top: -10px;
  transform: rotate(8deg);
}

.card-scoreboard .logo.left { left: -15px; }
.card-scoreboard .logo.right { right: -15px; }

.card-scoreboard .text {
  width: 100%;
  position: relative;
  z-index: 2;
}

.card-scoreboard .score {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
}

.card-scoreboard .score.win {
  color: var(--sl-gold);
}

/* ============================================================
   PLAYER CARD (small)
   ============================================================ */
.player-small-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-align: center;
  transition: var(--transition);
  width: 100%;
}

.player-small-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.player-image {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #1a3a5c 0%, #1e5f96 60%, #1a7aac 100%);
  min-height: 100px;
}

.player-image.background-red {
  background: linear-gradient(135deg, #B71C1C 0%, #E53935 100%);
}

.player-image.background-blue {
  background: linear-gradient(160deg, #1a3a5c 0%, #1e5f96 60%, #1a7aac 100%);
}

.player-image.background-black {
  background: linear-gradient(135deg, #111 0%, #555 100%);
}

.player-image .teamLogo {
  position: absolute;
  top: -20px;
  left: -20px;
  max-width: 100px;
  opacity: 0.5;
}

.player-image .imgPlayer {
  position: relative;
  width: 100%;
}

.player-small-card-info {
  background: var(--bg-card);
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.75rem;
}

.player-small-card-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.player-small-card-info .text-muted {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ============================================================
   LINEUP
   ============================================================ */
.lineup-role {
  background: var(--sl-gold);
  color: var(--sl-navy);
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px var(--space-xs);
  text-align: center;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-bottom: 4px;
}

.sl-lineup-section {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.sl-lineup-section-header {
  background: var(--sl-navy);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: var(--space-xs) var(--space-md);
  text-align: center;
}

/* ============================================================
   MATCHUP PAGE
   ============================================================ */
.sl-matchup-header {
  background: linear-gradient(135deg, var(--sl-navy) 0%, var(--sl-navy-mid) 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-lg);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.sl-matchup-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
  z-index: 1;
}

.sl-matchup-team-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

@media (min-width: 768px) {
  .sl-matchup-team-logo {
    width: 120px;
    height: 120px;
  }
}

.sl-matchup-team-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  color: #fff;
}

.sl-matchup-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  flex-shrink: 0;
  z-index: 1;
}

.sl-matchup-score-nums {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
}

@media (min-width: 768px) {
  .sl-matchup-score-nums {
    font-size: 4.5rem;
  }
}

.sl-matchup-week {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* matchup table old compat */
.matchup-table td {
  text-align: center;
  padding: var(--space-xs) var(--space-md);
}

.matchup-table td.home { text-align: left; padding-left: var(--space-lg); }
.matchup-table td.home.win {
  font-weight: bold;
  background: linear-gradient(90deg, rgba(245,166,35,0.15) 0%, transparent 100%);
}

.matchup-table td.away { text-align: right; padding-right: var(--space-lg); }
.matchup-table td.away.win {
  font-weight: bold;
  background: linear-gradient(90deg, transparent 0%, rgba(245,166,35,0.15) 100%);
}

.matchup-table tr.matchup-row td:first-child { text-align: left; font-size: 1.25rem; }
.matchup-table tr.matchup-row td:last-child { text-align: right; font-size: 1.25rem; }

.matchup-logo td { padding: 0; height: 50px; }
.matchup-logo td img { height: 50px; }

img.logo-matchup {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

@media (max-width: 767px) {
  img.logo-matchup { width: 45px; height: 45px; }
}

/* ============================================================
   TEAMS PAGE
   ============================================================ */
.sl-team-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: var(--transition);
  margin-bottom: var(--space-md);
}

.sl-team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: inherit;
}

.sl-team-card-header {
  background: var(--sl-navy);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  position: relative;
  overflow: hidden;
}

.sl-team-card-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.5));
}

.sl-team-card-logo-bg {
  position: absolute;
  right: -15px;
  bottom: -15px;
  width: 140px;
  opacity: 0.25;
}

.sl-team-card-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
  z-index: 1;
}

.sl-team-card-body {
  padding: var(--space-md);
}

.sl-team-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.8rem;
}

.sl-team-stat:last-child {
  border-bottom: none;
}

.sl-team-stat-label {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.sl-team-stat-value {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
}

/* ============================================================
   STANDINGS
   ============================================================ */
.sl-standings-table th:first-child,
.sl-standings-table td:first-child {
  text-align: left;
}

.sl-standings-rank {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-muted);
  min-width: 28px;
}

.sl-standings-rank.playoff {
  color: var(--sl-success);
}

/* ============================================================
   TIMELINE
   ============================================================ */
.myTimeline {
  padding: var(--space-md);
  background: var(--sl-navy) !important;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.myTimeline .timeline {
  position: relative;
  padding-left: var(--space-xl);
}

.myTimeline .timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--sl-gold);
  border-radius: var(--radius-full);
}

.myTimeline .container {
  position: relative;
  padding: 0 0 var(--space-md) 0;
}

.myTimeline .container::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--sl-gold);
  border-radius: 50%;
  border: 2px solid var(--sl-navy);
}

.myTimeline .content {
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  color: rgba(255,255,255,0.9);
}

.myTimeline .content h2 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--sl-gold);
  margin: 0 0 var(--space-xs);
}

.myTimeline .content p {
  margin: var(--space-xs) 0 0;
  font-size: 0.8rem;
}

/* ============================================================
   VARIOUS LEGACY COMPAT
   ============================================================ */
.clean-a {
  color: inherit;
  text-decoration: none !important;
}

.clean-a:hover {
  color: inherit;
}

.hidden { display: none; }
.my-pointer { cursor: pointer; }
.my-bold { font-weight: bold; }
.onlyMobile { display: none; }
.onlyDesktop { display: inline-block; }
.link-color { color: var(--sl-gold) !important; }

/* ============================================================
   UTILITY CLASSES (Bootstrap-compatible subset)
   ============================================================ */
.d-flex { display: flex !important; }
.d-block { display: block !important; }
.d-none { display: none !important; }
.d-inline-flex { display: inline-flex !important; }

.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }

.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }

.align-items-start { align-items: flex-start !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-stretch { align-items: stretch !important; }
.align-self-center { align-self: center !important; }

.gap-1 { gap: 4px !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 12px !important; }
.gap-4 { gap: 16px !important; }

.text-nowrap { white-space: nowrap !important; }
.text-center { text-align: center !important; }
.text-start { text-align: left !important; }
.text-end { text-align: right !important; }
.text-wrap { white-space: normal !important; }

.w-100 { width: 100% !important; }
.w-full { width: 100% !important; }
.h-100 { height: 100% !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.mb-4 { margin-bottom: 16px !important; }
.mb-5 { margin-bottom: 24px !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 12px !important; }
.ms-2 { margin-left: 8px !important; }
.me-2 { margin-right: 8px !important; }
.m-0 { margin: 0 !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 4px !important; }
.p-2 { padding: 8px !important; }
.p-3 { padding: 12px !important; }

.fw-bold { font-weight: 700 !important; }
.fw-normal { font-weight: 400 !important; }
.fs-sm { font-size: 0.875rem !important; }
.fs-xs { font-size: 0.75rem !important; }
.opacity-50 { opacity: 0.5 !important; }

/* Responsive flex direction */
@media (min-width: 768px) {
  .flex-md-row { flex-direction: row !important; }
  .flex-md-column { flex-direction: column !important; }
  .d-md-flex { display: flex !important; }
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
}

.sticky-column {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--bg-card);
}

@media (max-width: 767px) {
  .onlyMobile { display: inline-block; }
  .onlyDesktop { display: none; }
}

.background-row-division {
  background: var(--sl-gold) !important;
  color: var(--sl-navy);
}

.background-row-division th {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-top: 4px;
  padding-bottom: 4px;
}

.background-row-division.background-row-division-secondary {
  background: var(--sl-navy) !important;
  color: #fff;
}

.background-row-division.background-row-division-primary {
  background: var(--sl-gold) !important;
  color: var(--sl-navy);
}

.divider-my-secondary {
  background: var(--sl-navy-mid);
  color: #fff;
  padding: 4px var(--space-md);
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.divider-my-primary {
  background: var(--sl-gold);
  color: var(--sl-navy);
  padding: 4px var(--space-md);
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.background-yellow-fade-right {
  background: linear-gradient(90deg, rgba(245,166,35,0.2) 0%, transparent 70%);
}

.background-yellow-fade-right-100 {
  background: linear-gradient(90deg, rgba(245,166,35,0.25) 0%, transparent 100%);
}

/* SweetAlert2 theming */
.swal2-confirm {
  background-color: var(--sl-navy) !important;
  font-family: var(--font-heading) !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
}

/* Loading overlay */
.loading-full {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  gap: var(--space-md);
}

.loading-full .message {
  margin-top: var(--space-md);
}

/* Bid cards */
.bid-card-right {
  border-left: 2px solid var(--border-light);
}

.bid-card-allbids {
  border-top: 1px solid var(--border-light);
  padding-top: var(--space-md);
  margin-top: var(--space-sm);
}

@media (max-width: 767px) {
  .bid-card-right { border-left: none; }
  .bid-card-allbids { border-top: 1px solid var(--border-light); }
  .card-scoreboard .logo.left { left: -40px; }
  .card-scoreboard .logo.right { right: -40px; }
}

/* Trade */
.trade-box img { max-width: 60px; }
.trade-box .team-items { margin-bottom: var(--space-lg); }
.trade-box .team-title { font-size: 1.1rem; font-weight: bold; font-family: var(--font-heading); }
.trade-box .item { padding: var(--space-xs) 0; border-bottom: 1px solid var(--border-light); }
.new-trade-select-box {
  border-top: 2px solid var(--sl-gold);
  border-bottom: 2px solid var(--sl-gold);
  padding: var(--space-md);
  background: var(--bg-card);
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-md);
}

/* Auction */
.auction-expire {
  background: var(--sl-navy);
  color: #fff;
  text-align: center;
  padding: var(--space-sm);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: 0.8rem;
}

.end12 { background: var(--sl-danger) !important; color: #fff !important; }
.end24 { background: var(--sl-warning) !important; color: #fff !important; }
.endExpired { background: #111 !important; color: #fff !important; }

/* Cap situation */
.table.cap-situation td { padding: 3px; }

/* Player page */
.player-page .teamPlayerCard {
  position: relative;
  text-align: right;
  width: 280px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--sl-navy) 0%, var(--sl-navy-mid) 100%);
}

.player-page .teamPlayerCard .teamLogo {
  position: absolute;
  top: 0;
  left: 0;
  height: 140px;
  opacity: 0.5;
  transform: rotate(8deg);
  z-index: 0;
}

.player-page .teamPlayerCard .imgPlayer {
  position: relative;
  max-width: 180px;
}

.player-page .card-player-head .card-body {
  min-height: 160px;
}

.player-page .image-player { height: 180px; }

.my-size-big { font-size: 1.5rem; font-family: var(--font-heading); font-weight: 800; }

/* Draft redraft */
.player-small-card.redraft { height: 300px; }
@media (max-width: 767px) { .player-small-card.redraft { height: 270px; } }

.no-stats-record { padding: var(--space-xl); text-align: center; color: var(--text-muted); }

/* Prev/Next lineup */
.prev-next-lineup { margin: var(--space-sm) 0; }

/* Watch list */
.sl-watchlist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

@media (min-width: 480px) {
  .sl-watchlist-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .sl-watchlist-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .sl-watchlist-grid { grid-template-columns: repeat(5, 1fr); }
}

/* League messages */
.sl-league-message {
  border-left: 3px solid var(--sl-gold);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: var(--space-sm);
  font-size: 0.875rem;
}

/* Trade alert */
.sl-trade-alert {
  background: linear-gradient(135deg, var(--sl-gold-light) 0%, rgba(245,166,35,0.2) 100%);
  border: 2px solid var(--sl-gold);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
}

/* Nav tabs inside cards */
.nav-tabs {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0;
}

.nav-tabs .nav-item .nav-link {
  display: block;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.nav-tabs .nav-item .nav-link:hover,
.nav-tabs .nav-item .nav-link.active {
  color: var(--sl-gold);
  border-bottom-color: var(--sl-gold);
}

.tab-content .tab-pane {
  display: none;
}

.tab-content .tab-pane.active.show {
  display: block;
}

/* Free agency / waivers highlight */
.auction-expire {
  width: 100%;
}

/* Player card for teams */
.col-4.col-md-2 {
  padding: 3px !important;
}

/* Bootstrap compat classes */
.d-flex { display: flex; }
.d-none { display: none; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }
.flex-column { flex-direction: column; }
.flex-grow-1 { flex-grow: 1; }
.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.ms-2 { margin-left: var(--space-sm); }
.me-2 { margin-right: var(--space-sm); }
.ps-2 { padding-left: var(--space-sm); }
.pe-2 { padding-right: var(--space-sm); }
.p-0 { padding: 0; }
.fw-bold { font-weight: bold; }
.small { font-size: 0.8rem; }
.h1, .h2, .h3, .h4 { font-family: var(--font-heading); font-weight: 800; }
.h1 { font-size: 1.75rem; }
.h3 { font-size: 1.25rem; }
.h4 { font-size: 1rem; }
.subheader { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.subheader { font-family: var(--font-heading); }

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

/* Bootstrap grid compat */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -8px;
}

.row > * {
  padding: 0 8px;
  width: 100%;
}

/* columns */
.col-12 { width: 100%; }
.col-6 { width: 50%; }
.col-4 { width: 33.333%; }
.col-3 { width: 25%; }
.col-2 { width: 16.666%; }
.col-1 { width: 8.333%; }

@media (min-width: 768px) {
  .col-md-1 { width: 8.333%; }
  .col-md-2 { width: 16.666%; }
  .col-md-3 { width: 25%; }
  .col-md-4 { width: 33.333%; }
  .col-md-5 { width: 41.666%; }
  .col-md-6 { width: 50%; }
  .col-md-7 { width: 58.333%; }
  .col-md-8 { width: 66.666%; }
  .col-md-9 { width: 75%; }
  .col-md-10 { width: 83.333%; }
  .col-md-11 { width: 91.666%; }
  .col-md-12 { width: 100%; }
  .offset-md-0 { margin-left: 0; }
  .offset-md-1 { margin-left: 8.333%; }
  .offset-md-2 { margin-left: 16.666%; }
  .offset-md-3 { margin-left: 25%; }
  .offset-md-4 { margin-left: 33.333%; }
  .offset-md-5 { margin-left: 41.666%; }
  .offset-md-6 { margin-left: 50%; }
  .offset-md-7 { margin-left: 58.333%; }
  .offset-md-8 { margin-left: 66.666%; }
  .offset-md-9 { margin-left: 75%; }
  .offset-md-10 { margin-left: 83.333%; }
  .offset-md-11 { margin-left: 91.666%; }
  .d-md-none { display: none; }
  .flex-md-row { flex-direction: row; }
  .flex-md-row-reverse { flex-direction: row-reverse; }
  .gap-md-0 { gap: 0; }
  .gap-md-3 { gap: var(--space-md); }
  .d-md-flex { display: flex; }
}

@media (min-width: 960px) {
  .col-lg-auto { width: auto; }
  .d-xl-block { display: block; }
}

/* Card compat */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card-header {
  background: var(--bg-table-header);
  color: var(--text-inverse);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.card-body {
  padding: var(--space-md);
  background: var(--bg-card);
}

.card-body.myTimeline {
  padding: 0;
}

.card-stamp {
  position: absolute;
  right: 0;
  top: 0;
  opacity: 0.1;
}

.card-stamp-lg img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.card-md { position: relative; overflow: hidden; }

/* Full-width responsive */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th {
  background: var(--bg-table-header);
  color: var(--text-inverse);
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 8px;
  text-align: left;
  white-space: nowrap;
}

.table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}

.table tbody tr:hover td {
  background: var(--bg-table-stripe);
}

.table.table-no-hover tbody tr:hover td,
.table.table-no-hover tbody tr:hover .sticky-column {
  background: inherit !important;
  background-color: inherit !important;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table .text-center td,
.table.text-center td,
.table .text-center th,
.table.text-center th { text-align: center; }
.table-nowrap td, .table-nowrap th { white-space: nowrap; }

/* Spaziosa per tap facile da mobile */
.table-touch td,
.table-touch th { padding: 10px 8px; }
@media (min-width: 768px) {
  .table-touch td,
  .table-touch th { padding: 8px 8px; }
}

/* Progress compat */
.progress-sm { height: 4px; }

/* Column padding utility */
.column-padding { padding: 3px; }

/* Lineup count helper */
.lineup-cnt { margin-top: var(--space-md); }

/* ============================================================
   PLAYER HERO CARD — mobile-first
   ============================================================ */
.player-hero-card {
  background: linear-gradient(150deg, var(--sl-navy) 0%, var(--sl-navy-mid) 100%);
  border-radius: var(--radius-xl);
  padding: 16px 16px 0;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.player-hero-nhl-watermark {
  position: absolute;
  right: -30px;
  bottom: -20px;
  height: 180px;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

/* ---- TOP ROW: photo + identity ---- */
.player-hero-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
}

.player-hero-photo-wrap {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  overflow: hidden;
  position: relative;
}

@media (min-width: 480px) {
  .player-hero-photo-wrap { width: 110px; height: 110px; }
}

.player-hero-photo-nhl-bg {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 80px;
  opacity: 0.35;
  z-index: 0;
}

.player-hero-photo-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.player-hero-identity {
  flex: 1;
  min-width: 0;
  padding-bottom: 14px;
}

.player-hero-name {
  font-family: var(--font-heading), sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

@media (min-width: 480px) {
  .player-hero-name { font-size: 1.55rem; }
}

.player-hero-watch {
  cursor: pointer;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.player-hero-watch:hover { transform: scale(1.2); }

.player-hero-role {
  font-family: var(--font-heading), sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.player-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.player-hero-pill {
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 3px 8px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.8);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.player-hero-pill i { font-size: 0.6rem; opacity: 0.8; }

/* ---- BOTTOM STRIP: contract info ---- */
.player-hero-contract {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0,0,0,0.25);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  padding: 10px 14px;
  margin: 0 -16px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.player-hero-contract-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.65));
}
.player-hero-contract-logo:hover { transform: scale(1.08); }

.player-hero-contract-info {
  flex: 1;
  min-width: 0;
}

.player-hero-contract-status {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.player-hero-contract-value {
  font-family: var(--font-heading), sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.55);
}

.player-hero-contract-exp {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.82);
  margin-top: 2px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.player-hero-contract-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex-shrink: 0;
}

/* ---- Status badges used in player hero ---- */
.player-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.player-status-badge.danger  { background: var(--sl-danger);  color: #fff; }
.player-status-badge.success { background: var(--sl-success); color: #fff; }
.player-status-badge.dark    { background: #222;              color: #fff; }
.player-status-badge.warning { background: var(--sl-warning); color: #fff; }
.player-status-badge.gold    { background: var(--sl-gold);    color: var(--sl-navy); }

/* ---- Player actions grid ---- */
.player-actions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  align-items: center;
}

/* ---- Hide header theme toggle on mobile (use hamburger drawer instead) ---- */
@media (max-width: 767px) {
  .sl-theme-toggle { display: none !important; }
}

/* ============================================================
   PLAYOFF/PLAYOUT BRACKET
   ============================================================ */
.sl-bracket-wrap   { overflow-x: auto; }
.sl-bracket-hdr,
.sl-bracket-row    { min-width: 700px; }
.sl-bracket-col-qf { width: 160px; flex-shrink: 0; }
.sl-bracket-col-sf { width: 152px; flex-shrink: 0; }
.sl-bracket-col-qf-sm { width: 152px; flex-shrink: 0; } /* playout */
.sl-bracket-col-sf-sm { width: 145px; flex-shrink: 0; } /* playout */

/* Desktop bracket centrato con la finale al centro */
.sl-bracket-desktop-row {
  display: flex;
  align-items: stretch;
  width: 100%;
}
.sl-bracket-desktop-col-qf  { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.sl-bracket-desktop-col-cf  { flex: 1; min-width: 0; display: flex; align-items: center; }
.sl-bracket-desktop-col-fin {
  flex: 1.25;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-left:  2px solid rgba(255,255,255,0.1);
  border-right: 2px solid rgba(255,255,255,0.1);
  background: rgba(255,193,7,0.04);
  position: relative;
}
.sl-bracket-conn-v {
  display: flex; flex-direction: column;
  width: 24px; flex-shrink: 0;
}
.sl-bracket-conn-v-top  { flex: 1; border-right: 2px solid var(--border-color); border-bottom: 2px solid rgba(255,193,7,0.35); border-bottom-right-radius: 4px; }
.sl-bracket-conn-v-bot  { flex: 1; border-right: 2px solid var(--border-color); border-top:    2px solid rgba(255,193,7,0.35); border-top-right-radius:    4px; }
.sl-bracket-conn-v-rtop { flex: 1; border-left: 2px solid var(--border-color); border-bottom: 2px solid rgba(255,193,7,0.35); border-bottom-left-radius: 4px; }
.sl-bracket-conn-v-rbot { flex: 1; border-left: 2px solid var(--border-color); border-top:    2px solid rgba(255,193,7,0.35); border-top-left-radius:    4px; }
.sl-bracket-conn-h-sm   { display: flex; align-items: center; width: 16px; flex-shrink: 0; }
.sl-bracket-conn-h-md   { display: flex; align-items: center; width: 22px; flex-shrink: 0; }
.sl-bracket-conn-h-line           { width: 100%; height: 2px; background: rgba(255,193,7,0.35); }
.sl-bracket-conn-h-line-gold      { width: 100%; height: 2px; background: rgba(255,193,7,0.65); }
/* Playout danger variants */
.sl-bracket-conn-v-top-d  { flex: 1; border-right: 2px solid var(--border-color); border-bottom: 2px solid rgba(220,53,69,0.35); border-bottom-right-radius: 4px; }
.sl-bracket-conn-v-bot-d  { flex: 1; border-right: 2px solid var(--border-color); border-top:    2px solid rgba(220,53,69,0.35); border-top-right-radius:    4px; }
.sl-bracket-conn-v-rtop-d { flex: 1; border-left: 2px solid var(--border-color); border-bottom: 2px solid rgba(220,53,69,0.35); border-bottom-left-radius: 4px; }
.sl-bracket-conn-v-rbot-d { flex: 1; border-left: 2px solid var(--border-color); border-top:    2px solid rgba(220,53,69,0.35); border-top-left-radius:    4px; }
.sl-bracket-conn-h-line-d      { width: 100%; height: 2px; background: rgba(220,53,69,0.35); }
.sl-bracket-conn-h-line-d-strong { width: 100%; height: 2px; background: rgba(220,53,69,0.65); }
.sl-bracket-desktop-col-fin-d {
  flex: 1.25;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-left:  2px solid rgba(255,255,255,0.1);
  border-right: 2px solid rgba(255,255,255,0.1);
  background: rgba(220,53,69,0.04);
  position: relative;
}

@media (max-width: 767px) {
  /* Rimuove overflow e min-width: il bracket riempie esattamente il 100% */
  .sl-bracket-wrap            { overflow-x: visible !important; }
  .sl-bracket-hdr,
  .sl-bracket-row             { min-width: 0 !important; width: 100% !important; }
  /* Colonne si espandono in modo uguale per riempire tutto lo spazio */
  .sl-bracket-col-qf,
  .sl-bracket-col-sf,
  .sl-bracket-col-qf-sm,
  .sl-bracket-col-sf-sm       { width: auto !important; flex: 1 !important; min-width: 0 !important; }
  /* Connettori piccoli ma fissi */
  .sl-bracket-conn-bracket    { width: 10px !important; flex-shrink: 0; }
  .sl-bracket-conn-h          { width: 4px !important; flex-shrink: 0; }
  /* Riga squadra: logo a sinistra, punteggio a destra, nome nascosto */
  .sl-bmc-name                { display: none !important; }
  /* Eccezione: nelle card delle finali mostra il nome (c'è spazio) */
  .sl-bmc-name-show           { display: block !important; font-size: 0.82rem !important; font-weight: 600 !important; }
  /* Nelle card finali ripristina gap e padding riga */
  .sl-bmc-card-final .sl-bmc-row { gap: 8px !important; padding: 7px 10px !important; }
  .sl-bmc-row                 { padding: 5px 4px !important; gap: 0 !important; justify-content: space-between !important; }
  .sl-bmc-logo                { width: 44px !important; height: 44px !important; flex-shrink: 0; }
  .sl-bmc-score               { font-size: 0.88rem !important; font-weight: 900 !important; min-width: 0 !important; padding-right: 2px; }
  .sl-bmc-tbd                 { padding: 10px 2px !important; font-size: 0.55rem !important; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes bell-shake {
    0%, 80%, 100% { transform: rotate(0); }
    85%  { transform: rotate(15deg); }
    90%  { transform: rotate(-12deg); }
    95%  { transform: rotate(8deg); }
}

