/* ================================================================
   OnGrid TV — Design System & Complete Stylesheet
   Plataforma esportiva premium de transmissão IPTV
   ================================================================ */

/* ---------------------------------------------------------------
   1. DESIGN TOKENS — Dark Mode (default)
   --------------------------------------------------------------- */
:root {
  /* Background */
  --bg-primary: #0B0B0F;
  --bg-secondary: #111218;
  --bg-tertiary: #181A23;
  --bg-elevated: #1C1E28;
  --bg-glass: rgba(17, 18, 24, 0.85);

  /* Borders */
  --border-subtle: #1E2030;
  --border-default: #232533;
  --border-strong: #2E3040;

  /* Text */
  --text-primary: #E5E7EB;
  --text-secondary: #9CA3AF;
  --text-tertiary: #6B7280;
  --text-inverse: #0B0B0F;

  /* Brand */
  --brand: #9254F8;
  --brand-hover: #A970FF;
  --brand-dim: rgba(146, 84, 248, 0.12);
  --brand-glow: rgba(146, 84, 248, 0.25);

  /* Status */
  --live: #22C55E;
  --live-dim: rgba(34, 197, 94, 0.12);
  --live-glow: rgba(34, 197, 94, 0.2);
  --accent: #F59E0B;
  --accent-dim: rgba(245, 158, 11, 0.12);
  --danger: #EF4444;
  --danger-dim: rgba(239, 68, 68, 0.12);
  --info: #3B82F6;
  --info-dim: rgba(59, 130, 246, 0.12);

  /* Sport colors */
  --sport-football: #22C55E;
  --sport-football-dim: rgba(34, 197, 94, 0.1);
  --sport-nba: #3B82F6;
  --sport-nba-dim: rgba(59, 130, 246, 0.1);
  --sport-ufc: #EF4444;
  --sport-ufc-dim: rgba(239, 68, 68, 0.1);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-card-hover: 0 2px 6px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

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

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

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --header-height: 56px;
  --max-width: 1400px;
}

/* ---------------------------------------------------------------
   2. LIGHT MODE TOKENS
   --------------------------------------------------------------- */
[data-theme="light"] {
  --bg-primary: #F5F7FB;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F0F2F7;
  --bg-elevated: #FFFFFF;
  --bg-glass: rgba(255, 255, 255, 0.9);

  --border-subtle: #E5E7EB;
  --border-default: #D1D5DB;
  --border-strong: #9CA3AF;

  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-tertiary: #9CA3AF;
  --text-inverse: #FFFFFF;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 2px 6px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);

  --brand-dim: rgba(146, 84, 248, 0.08);
  --live-dim: rgba(34, 197, 94, 0.08);
  --accent-dim: rgba(245, 158, 11, 0.08);
  --danger-dim: rgba(239, 68, 68, 0.08);
}

/* ---------------------------------------------------------------
   3. RESET & BASE
   --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.875rem;
  line-height: 1.5;
  min-height: 100vh;
  transition: background var(--transition-base), color var(--transition-base);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

/* ---------------------------------------------------------------
   4. UTILITY CLASSES
   --------------------------------------------------------------- */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-dim { color: var(--text-secondary); }
.text-brand { color: var(--brand); }
.text-live { color: var(--live); }
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------
   5. APP LAYOUT
   --------------------------------------------------------------- */
.ongrid-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.ongrid-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  width: 100%;
}

/* ---------------------------------------------------------------
   6. HEADER — Premium Glass
   --------------------------------------------------------------- */
.ongrid-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  height: var(--header-height);
  padding: 0 20px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
  transition: background var(--transition-base), border-color var(--transition-base);
}

.ongrid-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

.ongrid-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.ongrid-logo-text {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  white-space: nowrap;
}

.ongrid-header-center {
  flex: 1;
  display: flex;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
}

.ongrid-search {
  position: relative;
  width: 100%;
}

.ongrid-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  font-size: 0.9rem;
}

.ongrid-search-input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 40px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: all var(--transition-fast);
}

.ongrid-search-input::placeholder { color: var(--text-tertiary); }
.ongrid-search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-dim);
  background: var(--bg-elevated);
}

.ongrid-header-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
  position: relative;
}

.ongrid-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  font-size: 1.1rem;
}

.ongrid-header-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.ongrid-header-btn.active {
  background: var(--brand-dim);
  color: var(--brand);
}

.ongrid-auth-btn {
  width: auto;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  gap: 8px;
  border: 1px solid var(--border-default);
  background: var(--bg-tertiary);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}

.provider-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  border: 1px solid transparent;
}

.provider-mark.google {
  color: #fff;
  background: #4285f4;
}

.provider-mark.facebook {
  color: #fff;
  background: #1877f2;
}

.ongrid-auth-btn.login-main {
  background: var(--live);
  color: var(--text-inverse);
  border-color: transparent;
  font-weight: 800;
}

.ongrid-auth-btn.login-main:hover {
  background: #16a34a;
}

.ongrid-login-menu {
  position: relative;
}

.ongrid-login-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 120;
}

.ongrid-login-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ongrid-login-item:hover {
  background: var(--bg-tertiary);
}

.ongrid-auth-btn.logout {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.35);
}

.ongrid-auth-btn.logout:hover {
  background: var(--danger-dim);
  border-color: var(--danger);
}

.ongrid-profile-btn {
  width: auto;
  height: 38px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--bg-tertiary);
  gap: 8px;
}
.ongrid-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 48px;
  min-width: 250px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 120;
}

.ongrid-login-item.logout-item {
  color: var(--danger);
}

.ongrid-login-item.logout-item:hover {
  background: var(--danger-dim);
}

.ongrid-profile-avatar {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand), #4f46e5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}

.ongrid-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.ongrid-profile-meta {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
  gap: 2px;
  max-width: 170px;
}

.ongrid-profile-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.ongrid-profile-name-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.user-heart-team-logo {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  flex-shrink: 0;
}

.ongrid-profile-role {
  font-size: 0.66rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

/* Theme toggle */
.theme-toggle {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  transition: all var(--transition-fast);
}

.theme-toggle:hover { background: var(--bg-tertiary); }

.theme-toggle .icon-sun,
.theme-toggle .icon-moon { transition: all var(--transition-base); }

[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun,
:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

@media (max-width: 900px) {
  .ongrid-auth-btn span:not(.provider-mark) {
    display: none;
  }

  .ongrid-auth-btn {
    width: 38px;
    min-width: 38px;
    padding: 0;
  }

  .ongrid-profile-meta {
    display: none;
  }

  .ongrid-profile-btn {
    width: 38px;
    padding: 4px;
  }

  .ongrid-user-dropdown {
    right: 0;
    min-width: 220px;
  }
}

/* ---------------------------------------------------------------
   Profile Modal
   --------------------------------------------------------------- */
.profile-modal-body {
  padding-top: 14px;
}

.profile-card-shell {
  border: 1px solid var(--border-default);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.profile-hero-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), #4f46e5);
  box-shadow: 0 0 0 3px var(--brand-dim);
}

.profile-hero-info h3 {
  font-size: 0.95rem;
  margin: 0;
  color: var(--text-primary);
}

.profile-hero-info p {
  margin: 2px 0 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-field span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.profile-field input,
.profile-field textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border-default);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 10px 12px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.profile-team-input-wrap {
  position: relative;
}

.profile-team-input-wrap input {
  padding-left: 42px;
}

.profile-team-preview {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
}

.profile-field textarea {
  resize: vertical;
  min-height: 96px;
}

.profile-field input::placeholder,
.profile-field textarea::placeholder {
  color: var(--text-tertiary);
}

.profile-field input:focus,
.profile-field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-dim);
  background: var(--bg-elevated);
}

.profile-field-full {
  grid-column: 1 / -1;
}

.profile-actions-row {
  margin-top: 12px;
  display: flex;
  justify-content: flex-start;
}

@media (max-width: 720px) {
  .profile-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------
   Members & Live Chat
   --------------------------------------------------------------- */
.members-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 12px;
}

.members-sidebar,
.members-chat {
  border: 1px solid var(--border-default);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
}

.members-sidebar-title,
.members-chat-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.members-list {
  max-height: 520px;
  overflow: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.member-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-tertiary);
}

.member-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--brand), #4f46e5);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid var(--border-default);
  flex-shrink: 0;
}

.member-main {
  min-width: 0;
}

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

.member-meta {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.member-team-row {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.member-team-logo {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: contain;
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
}

.livechat-messages {
  height: 450px;
  overflow: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  border: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 8px 10px;
  max-width: 82%;
}

.chat-bubble.other {
  align-self: flex-start;
}

.chat-bubble.mine {
  align-self: flex-end;
  background: color-mix(in srgb, var(--brand) 12%, var(--bg-tertiary));
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border-default));
}

.chat-bubble.mine .chat-head {
  justify-content: flex-end;
}

.chat-bubble.mine .chat-time {
  margin-left: 0;
  margin-right: 0;
}

.chat-bubble.mine .chat-text {
  text-align: right;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.chat-user {
  font-size: 0.74rem;
  font-weight: 700;
}

.chat-time {
  margin-left: auto;
  font-size: 0.66rem;
  color: var(--text-tertiary);
}

.chat-text {
  font-size: 0.8rem;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.livechat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--border-subtle);
}

.livechat-input-row input {
  flex: 1;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-default);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 0 12px;
  outline: none;
}

.livechat-input-row input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-dim);
}

@media (max-width: 980px) {
  .members-layout {
    grid-template-columns: 1fr;
  }

  .livechat-messages {
    height: 320px;
  }
}

/* ---------------------------------------------------------------
   7. SPORT BAR — Premium Tabs
   --------------------------------------------------------------- */
.sport-bar {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  position: relative;
}

.sport-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-tertiary);
  transition: all var(--transition-base);
  position: relative;
  z-index: 1;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.sport-tab:hover { color: var(--text-secondary); }

.sport-tab.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  box-shadow: var(--shadow-sm);
}

/* Sport-specific active states */
.sport-tab[data-sport="football"].active {
  background: var(--sport-football-dim);
  color: var(--sport-football);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.sport-tab[data-sport="nba"].active {
  background: var(--sport-nba-dim);
  color: var(--sport-nba);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.sport-tab[data-sport="ufc"].active {
  background: var(--sport-ufc-dim);
  color: var(--sport-ufc);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.2);
}

.sport-tab-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.sport-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 800;
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  transition: all var(--transition-base);
}

.sport-tab.active .sport-tab-badge {
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
}

/* ---------------------------------------------------------------
   8. SUB-NAVIGATION — Football inner tabs
   --------------------------------------------------------------- */
.sub-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.sub-nav-tab {
  position: relative;
  padding: 8px 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-tertiary);
  transition: color var(--transition-fast);
  letter-spacing: 0.01em;
}

.sub-nav-tab:hover { color: var(--text-secondary); }

.sub-nav-tab.active {
  color: var(--text-primary);
  font-weight: 700;
}

.sub-nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--brand);
  border-radius: 1px;
}

.sub-nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ---------------------------------------------------------------
   9. FILTER BAR — Unified compact container
   --------------------------------------------------------------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}

.filter-bar .filter-select {
  height: 32px;
  padding: 0 28px 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  min-width: 130px;
}

.filter-bar .filter-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-dim);
}

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  height: 36px;
  padding: 0 32px 0 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M3 4.5l3 3 3-3z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 140px;
}

.filter-select:hover { border-color: var(--border-strong); }
.filter-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-dim);
}

/* ---------------------------------------------------------------
   10. CONTROL BAR — Premium toolbar
   --------------------------------------------------------------- */
.control-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.control-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-bar-center {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
}

.control-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

/* Segmented control (Hoje | Amanhã) */
.segmented-control {
  display: inline-flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.segment-btn {
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.segment-btn:hover { color: var(--text-secondary); }

.segment-btn.active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ── Botão AO VIVO ─────────────────────────────────────────── */
.segment-btn-live {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-tertiary);
}
.segment-btn-live.active,
.segment-btn-live:has(.live-count-badge:not([style*="none"])) {
  color: var(--live);
}
.live-dot-btn {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--live);
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity .3s;
}
.segment-btn-live.active .live-dot-btn,
.segment-btn-live:has(.live-count-badge:not([style*="none"])) .live-dot-btn {
  opacity: 1;
  animation: livePulse 1.4s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); }
  50%       { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}
.live-count-badge {
  background: var(--live);
  color: #000;
  font-size: 0.62rem;
  font-weight: 900;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
}
/* Aba AO VIVO ativa: fundo esverdeado sutil */
.segment-btn-live.active {
  background: rgba(34,197,94,.12);
  color: var(--live);
  box-shadow: 0 0 0 1px rgba(34,197,94,.25);
}

/* Game count badge */
.game-count {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--brand-dim);
  color: var(--brand);
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: all var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background: var(--brand);
  color: #FFFFFF;
  border: 1px solid var(--brand);
}

.btn-primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  box-shadow: 0 0 16px var(--brand-glow);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-sm { height: 30px; padding: 0 10px; font-size: 0.75rem; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 0.88rem; }

.btn-icon {
  width: 36px;
  padding: 0;
  border-radius: var(--radius-md);
}

.date-input {
  height: 36px;
  padding: 0 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.date-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-dim);
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.status-badge.success {
  background: var(--live-dim);
  color: var(--live);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-badge.loading {
  background: var(--brand-dim);
  color: var(--brand);
  border: 1px solid rgba(146, 84, 248, 0.2);
}

.status-badge.error {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ---------------------------------------------------------------
   11. DAY SECTION HEADER
   --------------------------------------------------------------- */
.day-section {
  margin-bottom: var(--space-xl);
}

.day-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.day-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.day-section-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--brand-dim);
  color: var(--brand);
}

/* ---------------------------------------------------------------
   12. GAME CARDS — Premium Design
   --------------------------------------------------------------- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

@media (min-width: 1600px) {
  .games-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* League group header */
.league-group-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-top: var(--space-sm);
}

.league-group-header:first-child { margin-top: 0; }

.league-group-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.league-group-count {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 800;
  background: var(--brand-dim);
  color: var(--brand);
}

.league-group {
  display: contents;
}

.league-group-body {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  gap: var(--space-md);
}

/* Individual game card */
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 11px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: default;
  overflow: hidden;
}

.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(ellipse at 50% 0%, var(--brand-dim) 0%, transparent 70%);
  transition: opacity var(--transition-slow);
  pointer-events: none;
}

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

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

.game-card.clickable { cursor: pointer; }

/* Card status modifiers */
.game-card--live {
  border-left: 3px solid var(--live);
}

.game-card--finished {
  /* garante zero verde */
}

.game-card--live .confidence-dot,
.game-card--finished .confidence-dot {
  display: none;
}

/* Card top: league + live status */
.game-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 24px;
}

.game-card-league {
  font-size: 0.67rem;
  font-weight: 650;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--live-dim);
  color: var(--live);
  border: 1px solid rgba(34, 197, 94, 0.15);
  animation: livePulse 2s ease-in-out infinite;
}

.game-card-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.game-card-finished {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(156, 163, 175, 0.1);
  color: #9CA3AF;
  border: 1px solid rgba(156, 163, 175, 0.18);
}

.game-card-scheduled {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--info-dim);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Card body: teams + time */
.game-card-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 72px;
}

.game-card-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  min-width: 0;
  text-align: center;
}

.game-card-team .team-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.game-card:hover .game-card-team .team-logo {
  transform: scale(1.05);
}

.game-card-team-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.game-card-team-logo-fallback {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 2px solid var(--brand);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-primary);
}

.game-card-team-name {
  font-size: 0.9rem;
  font-weight: 750;
  color: var(--text-primary);
  line-height: 1.2;
  max-width: 140px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* Card time area */
.game-card-time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 70px;
}

.game-card-hour {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.game-card-date-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Score display for live games */
.game-card-score {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--live);
  font-variant-numeric: tabular-nums;
}

.game-card-score-divider {
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

/* Live elapsed minute under score */
.game-card-elapsed {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--live);
  letter-spacing: 0.06em;
  text-align: center;
  margin-top: 1px;
  animation: livePulse 2s ease-in-out infinite;
}
.game-card-elapsed.ht {
  color: var(--accent);
  animation: none;
  opacity: 0.9;
}

/* Card footer: channel badges */
.game-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  padding-top: var(--space-xs);
  border-top: 1px solid var(--border-subtle);
}

/* Confidence dot — só visível em jogos futuros (inline no footer) */
.confidence-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
  flex-shrink: 0;
}

.confidence-confirmado { background: var(--live); }
.confidence-provavel { background: var(--accent); }
.confidence-revisar { background: var(--danger); }

/* ── Admin: three-dot menu button on game cards ──────────────── */
.game-card-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.game-card-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-base);
  flex-shrink: 0;
  padding: 0;
}

.game-card-menu-btn:hover,
.game-card-menu-btn:focus-visible {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  outline: none;
}

/* ── Admin: floating dropdown menu ───────────────────────────── */
.game-card-dropdown {
  position: fixed;
  z-index: 9999;
  min-width: 160px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  padding: 4px;
  animation: fadeIn 0.12s ease-out;
}

.game-card-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition-fast);
  text-align: left;
  white-space: nowrap;
}

.game-card-dropdown-item:hover {
  background: var(--bg-tertiary);
}

.game-card-dropdown-item.danger {
  color: var(--danger);
}

.game-card-dropdown-item.danger:hover {
  background: var(--danger-dim, rgba(239, 68, 68, 0.08));
}

/* ── Admin: edit channels modal ──────────────────────────────── */
.edit-channels-panel {
  width: min(420px, 94vw);
}

.edit-channels-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.edit-channels-hint code {
  font-family: inherit;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  padding: 1px 5px;
  border-radius: var(--radius-xs);
}

.edit-channels-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.edit-channels-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-dim);
}

.edit-channels-original-note,
.edit-channels-override-note {
  font-size: 0.72rem;
  margin: 8px 0 0 0;
}

.edit-channels-original-note {
  color: var(--text-tertiary);
}

.edit-channels-override-note {
  color: var(--accent);
}

.edit-channels-footer {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Admin: confirm remove modal ─────────────────────────────── */
.confirm-remove-panel {
  width: min(380px, 90vw);
}

.confirm-remove-hint {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin: 0;
}

.confirm-remove-game-label {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 4px 0;
  color: var(--text-primary);
}

/* Recovery modal */
.recover-games-panel {
  width: min(520px, 94vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.recover-games-body {
  overflow-y: auto;
  max-height: 50vh;
  padding: 4px 0;
}

.recover-empty {
  text-align: center;
  color: var(--text-tertiary);
  padding: var(--space-xl);
  font-size: 0.9rem;
}

.recover-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

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

.recover-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.recover-row-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.recover-row-meta {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.recover-row-date {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.btn-recover-restore {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
}

.btn-recover-restore:hover {
  filter: brightness(1.1);
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-3xl) var(--space-xl);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-tertiary);
  text-align: center;
}

.empty-state-icon { font-size: 2.5rem; opacity: 0.5; }
.empty-state-text { font-size: 0.9rem; font-weight: 600; }

.empty-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-2xl) var(--space-xl);
  color: var(--text-tertiary);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------------------------------------------------------------
   13. CHANNEL BADGES — Clean & Premium
   --------------------------------------------------------------- */
.channel-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.channel-badge:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.channel-badge-more {
  background: rgba(107, 114, 128, 0.16);
  border-color: rgba(107, 114, 128, 0.3);
  color: var(--text-secondary);
  font-weight: 800;
}

/* Verification status on badges */
.channel-badge.verify-confirmado {
  background: var(--live-dim);
  border-color: rgba(34, 197, 94, 0.25);
  color: var(--live);
}

.channel-badge.verify-provavel {
  background: var(--accent-dim);
  border-color: rgba(245, 158, 11, 0.25);
  color: var(--accent);
}

.channel-badge.verify-revisar {
  background: var(--danger-dim);
  border-color: rgba(239, 68, 68, 0.25);
  color: var(--danger);
}

/* Channel-specific colors */
.channel-badge.espn,
.channel-badge.espn-2,
.channel-badge.espn-3,
.channel-badge.espn-4 {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
  color: #60A5FA;
}

.channel-badge.sportv,
.channel-badge.sportv-2,
.channel-badge.sportv-3,
.channel-badge.sportvplus,
.channel-badge.premiere {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
  color: #F87171;
}

.channel-badge.globo,
.channel-badge.ge-tv {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
  color: #4ADE80;
}

.channel-badge.cazetv,
.channel-badge.caze-tv,
.channel-badge.caz-tv {
  background: rgba(146, 84, 248, 0.08);
  border-color: rgba(146, 84, 248, 0.2);
  color: #A78BFA;
}

.channel-badge.goat {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
  color: #4ADE80;
}

.channel-badge.tnt,
.channel-badge.hbo-max {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.2);
  color: #A78BFA;
}

.channel-badge.disneyplus,
.channel-badge.disney {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
  color: #60A5FA;
}

.channel-badge.paramountplus,
.channel-badge.paramount {
  background: rgba(0, 100, 210, 0.12);
  border-color: rgba(0, 100, 210, 0.3);
  color: #4B9BFF;
}

.channel-badge.bandsports,
.channel-badge.esporte-na-band {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
  color: #FBBF24;
}

.channel-badge.sbt {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
  color: #F87171;
}

.channel-badge.record {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
  color: #60A5FA;
}

/* ---------------------------------------------------------------
   14. LEAGUE & CHANNEL GRIDS (secondary tabs)
   --------------------------------------------------------------- */
.aux-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-xl) 0 var(--space-lg);
}

.aux-section-header h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

.info-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: all var(--transition-fast);
}

.info-card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-sm);
}

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

.info-card-title {
  font-size: 0.85rem;
  font-weight: 750;
  color: var(--text-primary);
}

.info-card-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.info-card-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.info-card-mini-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-card-mini-item {
  padding: 6px 10px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ---------------------------------------------------------------
   15. TEAMS TAB
   --------------------------------------------------------------- */
.teams-toolbar-ongrid {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

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

.search-wrap-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  font-size: 0.85rem;
}

.search-wrap input {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 38px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: all var(--transition-fast);
}

.search-wrap input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-dim);
}

.search-wrap-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  cursor: pointer;
}

.search-wrap-clear.show { display: flex; }
.search-wrap-clear:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* Team tiles */
.team-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  position: relative;
}

.team-tile:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(146, 84, 248, 0.15);
}

.team-tile-logo { width: 56px; height: 56px; }
.team-tile-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.team-tile-games-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 800;
  background: var(--brand);
  color: #FFFFFF;
}

/* League sections in teams tab */
.league-section-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  border-left: 3px solid var(--brand);
}

.league-section-block.league-cat-br { border-left-color: var(--sport-football); }
.league-section-block.league-cat-eu-top { border-left-color: var(--info); }
.league-section-block.league-cat-eu { border-left-color: #6366F1; }
.league-section-block.league-cat-americas { border-left-color: var(--accent); }
.league-section-block.league-cat-continental { border-left-color: var(--brand); }
.league-section-block.league-cat-asia { border-left-color: #EC4899; }

.league-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.league-section-header h3 {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.league-section-count {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.league-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-md);
}

/* ── Campeão — tema claro ─────────────────────────────────────────── */
[data-theme="light"] .team-tile.team-tile-champion {
  background: linear-gradient(160deg, #fffbeb 0%, #fef3c7 45%, #ffffff 100%) !important;
  border-color: #d97706 !important;
  box-shadow:
    0 0 0 2px #fbbf2438,
    0 6px 24px -6px #d9770650 !important;
}
[data-theme="light"] .team-tile.team-tile-champion:hover {
  background: linear-gradient(160deg, #fef3c7 0%, #fde68a 45%, #fffbeb 100%) !important;
  border-color: #b45309 !important;
  box-shadow:
    0 0 0 2px #fbbf2458,
    0 10px 30px -6px #d9770665 !important;
  transform: translateY(-4px);
}
[data-theme="light"] .team-tile.team-tile-champion .team-tile-name {
  color: #92400e !important;
  text-shadow: none !important;
  font-weight: 800 !important;
}
[data-theme="light"] .champ-label {
  background: linear-gradient(90deg, #78350f, #d97706, #fbbf24, #d97706, #78350f) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
[data-theme="light"] .champ-season {
  color: #92400e !important;
  opacity: 1 !important;
}
/* Botão "Definir campeão" com campeão definido — tema claro */
[data-theme="light"] .btn-set-champion.has-champion {
  border-color: #d9770680 !important;
  color: #92400e !important;
  background: #fef3c780 !important;
}
[data-theme="light"] .btn-set-champion:hover {
  border-color: #d97706 !important;
  color: #78350f !important;
  background: #fde68a50 !important;
}

/* ---------------------------------------------------------------
   16. NBA & UFC SECTIONS
   --------------------------------------------------------------- */
.sport-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}

.sport-section-header-info h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
}

.sport-section-header-info span {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
  display: block;
}

.sport-section-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* NBA cards */
.nba-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border-top: 3px solid var(--sport-nba);
  transition: all var(--transition-base);
}

.nba-card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-card);
}

.nba-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.nba-card-top time {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.nba-match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}

.nba-team-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.nba-team-block strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nba-vs { font-size: 0.72rem; font-weight: 800; color: var(--text-tertiary); text-transform: uppercase; }

.nba-channels-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
}

/* NBA JS-generated classes */
.nba-match {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
  margin: var(--space-md) 0;
}

.nba-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.nba-team .team-logo {
  width: 72px;
  height: 72px;
}

.nba-team strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.nba-channels {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-subtle);
}

/* UFC */
.ufc-event-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  border-top: 3px solid var(--sport-ufc);
  overflow: hidden;
}

.ufc-event-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
}

.ufc-event-info {
  min-width: 0;
}

.side-kicker {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.ufc-event-header h3 { font-size: 1rem; font-weight: 800; text-transform: uppercase; }
.ufc-event-header p { font-size: 0.78rem; color: var(--text-secondary); margin-top: 4px; }

.ufc-times {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.ufc-time-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  font-weight: 700;
}

.ufc-time-badge span {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ufc-time-badge time {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Main — destaque */
.ufc-time-main {
  background: var(--sport-ufc-dim);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 7px 14px;
}
.ufc-time-main span { font-size: 0.7rem; color: var(--sport-ufc); }
.ufc-time-main time { font-size: 0.9rem; color: var(--sport-ufc); }

/* Prelims — discreto */
.ufc-time-prelims {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
}
.ufc-time-prelims span { font-size: 0.6rem; color: var(--text-tertiary); }
.ufc-time-prelims time { font-size: 0.72rem; color: var(--text-secondary); }

.ufc-main-fight {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  text-align: center;
}

/* ---------------------------------------------------------------
   17. TOAST NOTIFICATIONS
   --------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 650;
  box-shadow: var(--shadow-lg);
  animation: toastSlideIn var(--transition-slow);
  max-width: 380px;
  backdrop-filter: blur(12px);
}

.toast.success { background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.3); color: #4ADE80; }
.toast.error { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: #F87171; }
.toast.info { background: rgba(146, 84, 248, 0.15); border: 1px solid rgba(146, 84, 248, 0.3); color: #A78BFA; }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------------------------------------------------------------
   18. MODALS
   --------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: var(--space-xl);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: min(88vh, 900px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h2 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.modal-body {
  overflow-y: auto;
  padding: var(--space-lg) var(--space-xl);
  overscroll-behavior: contain;
  min-height: 0;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-top: 1px solid var(--border-subtle);
}

/* Modal tabs */
.modal-tabs {
  display: flex;
  gap: 2px;
  padding: 0 var(--space-xl);
  border-bottom: 1px solid var(--border-subtle);
}

.modal-tab {
  padding: 10px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-tertiary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.modal-tab:hover { color: var(--text-secondary); }
.modal-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

/* Config grid inside modal */
.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.config-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.config-card-wide { grid-column: span 2; }

.config-card h3 {
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.config-card-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

/* Tag editor */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
  margin-bottom: var(--space-sm);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 650;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
}

.tag-remove {
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  line-height: 1;
}

.tag-remove:hover { color: var(--danger); }

.tag-source {
  position: relative;
  width: 100%;
  display: block;
  padding: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(24, 29, 43, 0.92), rgba(18, 22, 33, 0.96));
  border: 1px solid rgba(126, 144, 185, 0.26);
}

.tag-source .source-details {
  display: block;
  width: 100%;
  padding: 8px 10px;
}

.tag-source .source-details > summary {
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  font-size: 0.82rem;
  color: #eaf1ff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tag-source .source-details > summary::-webkit-details-marker {
  display: none;
}

.tag-source .source-details > summary::after {
  content: "▾";
  color: #9fb3d9;
  font-size: 0.82rem;
  margin-left: 10px;
}

.tag-source .source-details[open] > summary::after {
  content: "▴";
}

.tag-source .source-details-body {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(126, 144, 185, 0.2);
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-source .source-details-body a {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(122, 226, 255, 0.4);
  background: rgba(19, 34, 54, 0.85);
  color: #cdefff;
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 700;
}

.tag-source .source-details-body a:hover {
  border-color: rgba(143, 255, 88, 0.65);
  color: #deffbe;
  background: rgba(35, 58, 35, 0.88);
}

.tag-source .tag-remove {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.92rem;
  color: rgba(208, 220, 245, 0.65);
}

[data-theme="light"] .tag-source {
  background: linear-gradient(180deg, #f8f9ff, #eef2ff);
  border-color: #d4dbef;
}

[data-theme="light"] .tag-source .source-details > summary {
  color: #1f2a40;
}

[data-theme="light"] .tag-source .source-details > summary::after {
  color: #5a6b8f;
}

[data-theme="light"] .tag-source .source-details-body {
  border-top-color: #d6deef;
}

[data-theme="light"] .tag-source .source-details-body a {
  border-color: #c8d5f0;
  background: #ffffff;
  color: #2b446f;
}

[data-theme="light"] .tag-source .source-details-body a:hover {
  border-color: #8bb34a;
  color: #36571e;
  background: #f8ffe8;
}

[data-theme="light"] .tag-source .tag-remove {
  color: rgba(49, 63, 92, 0.58);
}

.tag-input-row {
  display: flex;
  gap: var(--space-sm);
}

.tag-input-row input,
.tag-input-row select {
  flex: 1;
  height: 34px;
  padding: 0 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  outline: none;
}

.tag-input-row input:focus,
.tag-input-row select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-dim);
}

.tag-add-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--brand-dim);
  color: var(--brand);
  border: 1px solid rgba(146, 84, 248, 0.2);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.tag-add-btn:hover { background: var(--brand); color: #FFFFFF; }

/* Toggle switches */
.toggle-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  cursor: pointer;
}

.toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
  cursor: pointer;
}

.toggle-label { font-size: 0.82rem; font-weight: 650; }

/* Form group */
.form-group { margin-bottom: var(--space-md); }

.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: all var(--transition-fast);
}

.form-group textarea { min-height: 80px; resize: vertical; }

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-dim);
}

/* ── Config Panel (overhaul) ─────────────────────────────────── */

/* Wider config panel on desktop */
.modal-panel.config-panel {
  width: min(1100px, 100%);
}

/* Config header with action buttons */
.config-header {
  padding: var(--space-md) var(--space-xl);
}

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

.config-header-actions .btn-sm {
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
}

/* Tab content visibility */
.config-tab-content { display: none; }
.config-tab-content.active { display: block; animation: fadeIn 200ms ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Config body – tighter padding for tabs layout */
.config-body {
  padding: var(--space-lg) var(--space-xl);
}

.config-body .config-grid {
  margin-top: 0;
}

/* Sticky footer with always-visible save button */
.config-footer {
  position: sticky;
  bottom: 0;
  background: var(--bg-secondary);
  z-index: 3;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
}

.config-footer .btn-actions-group {
  display: flex;
  gap: var(--space-sm);
}

/* ── Aliases editor ─────────────────────────────────────────── */

.alias-editor {
  width: 100%;
  min-height: 280px;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 2;
  letter-spacing: 0.01em;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  tab-size: 4;
  white-space: pre;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.alias-editor::placeholder {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  line-height: 2;
  opacity: 0.6;
}

.alias-editor:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-dim);
}

/* Validation message */
.alias-validation {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alias-validation.success {
  background: var(--live-dim);
  color: var(--live);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.alias-validation.warning {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(250, 176, 5, 0.2);
}

.alias-validation.error {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Counter badge */
#aliasCounter {
  transition: color var(--transition-fast);
}

#aliasCounter.has-aliases {
  color: var(--brand);
}

/* ── Button loading state ───────────────────────────────────── */

.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.75;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: btnSpin 0.6s linear infinite;
  right: 12px;
}

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

/* ── Import/Export ghost buttons ────────────────────────────── */

.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-default);
}

/* ── Responsive: Mobile ─────────────────────────────────────── */

@media (max-width: 768px) {
  .config-panel {
    width: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .config-header {
    padding: var(--space-sm) var(--space-lg);
  }

  .config-body {
    padding: var(--space-md) var(--space-lg);
  }

  .config-footer {
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
  }

  .config-footer .btn {
    width: 100%;
    justify-content: center;
  }

  .config-footer .btn-actions-group {
    width: 100%;
    flex-direction: row;
  }

  .config-footer .btn-actions-group .btn {
    flex: 1;
  }

  .modal-tabs {
    overflow-x: auto;
    padding: 0 var(--space-lg);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }

  .modal-tabs::-webkit-scrollbar { display: none; }

  .modal-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .config-grid {
    grid-template-columns: 1fr;
  }

  .config-card-wide {
    grid-column: span 1;
  }

  .alias-editor {
    min-height: 220px;
    font-size: 0.76rem;
    line-height: 1.8;
    padding: 12px;
  }

  .tag-input-row {
    flex-wrap: wrap;
  }

  .tag-input-row input,
  .tag-input-row select {
    min-width: 100%;
  }
}

/* Status bar */
.status-bar-ongrid {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 650;
  margin-bottom: var(--space-md);
}

.status-bar-ongrid.success { background: var(--live-dim); color: var(--live); border: 1px solid rgba(34, 197, 94, 0.2); }
.status-bar-ongrid.error { background: var(--danger-dim); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.status-bar-ongrid.loading { background: var(--brand-dim); color: var(--brand); border: 1px solid rgba(146, 84, 248, 0.2); }

/* ---------------------------------------------------------------
   19. ROSTER MODAL (Team details)
   --------------------------------------------------------------- */
.roster-hero {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.roster-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.roster-logo img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }

.roster-info h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.roster-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.roster-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
}

.roster-badge.league { background: var(--live-dim); color: var(--live); }
.roster-badge.country { background: var(--bg-tertiary); color: var(--text-secondary); }

.roster-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: var(--space-lg) var(--space-xl) 0;
}

.roster-stat {
  text-align: center;
  padding: var(--space-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  margin-right: -1px;
}

.roster-stat:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.roster-stat:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; margin-right: 0; }

.roster-stat-value { font-size: 1rem; font-weight: 800; color: var(--text-primary); display: block; }
.roster-stat-label { font-size: 0.62rem; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------------------------------------------------------------
   20. STANDINGS TABLE
   --------------------------------------------------------------- */
.standings-scroll {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  white-space: nowrap;
}

.standings-table th {
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-default);
  position: sticky;
  top: 0;
}

.standings-table td {
  padding: 8px 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.standings-table tbody tr:hover { background: var(--bg-tertiary); }

.standings-highlight td {
  color: var(--text-primary);
  font-weight: 700;
  background: var(--brand-dim);
}

/* ---------------------------------------------------------------
   21. PLAYER CARDS
   --------------------------------------------------------------- */
.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-sm);
}

.player-card {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

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

.player-photo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.player-photo img { width: 100%; height: 100%; object-fit: cover; }

.player-info strong {
  display: block;
  font-size: 0.78rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-info span {
  font-size: 0.68rem;
  color: var(--text-tertiary);
}

/* ---------------------------------------------------------------
   22. AD BANNERS
   --------------------------------------------------------------- */
.ad-banner {
  position: relative;
  height: 70px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: var(--text-tertiary);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: var(--space-lg) 0;
}

.ad-banner-label {
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 0.6rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

/* ---------------------------------------------------------------
   23. ANIMATIONS & MICRO-INTERACTIONS
   --------------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

.fade-in { animation: fadeIn var(--transition-base); }
.fade-in-up { animation: fadeInUp var(--transition-base); }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-elevated) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
  min-height: 16px;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-default);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ---------------------------------------------------------------
   24. RESPONSIVE
   --------------------------------------------------------------- */
@media (max-width: 1024px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ongrid-header-center {
    max-width: 320px;
  }

  .config-grid {
    grid-template-columns: 1fr;
  }

  .config-card-wide { grid-column: span 1; }
}

@media (max-width: 768px) {
  :root {
    --header-height: 48px;
    --space-lg: 12px;
  }

  /* Mobile hide utility */
  .mobile-hidden { display: none !important; }

  /* Header — compact */
  .ongrid-header {
    justify-content: space-between;
    height: 48px;
    padding: 0 16px;
    gap: 0;
  }

  .ongrid-logo { height: 22px; }

  .ongrid-header-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .ongrid-main { padding: 0 var(--space-sm); }

  .ongrid-header-center { display: none; }

  /* Sport bar — hidden on mobile (replaced by bottom nav) */
  .sport-bar { display: none; }

  /* Bottom nav — floating glass bar */
  .ongrid-main { padding-bottom: 80px; }

  .bottom-nav {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    gap: 4px;
    padding: 5px;
    background: rgba(17, 18, 24, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid #232533;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    padding-bottom: max(5px, env(safe-area-inset-bottom));
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 7px 18px;
    border-radius: 14px;
    font-size: 0.65rem;
    font-weight: 650;
    color: var(--text-tertiary);
    transition: all 0.2s ease;
    min-width: 72px;
    white-space: nowrap;
  }

  .bottom-nav-item.active {
    color: var(--text-primary);
    background: rgba(146, 84, 248, 0.15);
    box-shadow: 0 0 12px rgba(146, 84, 248, 0.12);
  }

  .bottom-nav-item[data-sport="football"].active {
    background: rgba(34, 197, 94, 0.12);
    color: var(--sport-football);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.1);
  }

  .bottom-nav-item[data-sport="nba"].active {
    background: rgba(59, 130, 246, 0.12);
    color: var(--sport-nba);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.1);
  }

  .bottom-nav-item[data-sport="ufc"].active {
    background: rgba(239, 68, 68, 0.12);
    color: var(--sport-ufc);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.1);
  }

  .bottom-nav-icon {
    font-size: 1.15rem;
    line-height: 1;
  }

  .bottom-nav-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  /* Sub-nav — compact */
  .sub-nav {
    gap: 16px;
    padding: 4px 0;
  }

  .sub-nav-tab {
    font-size: 0.75rem;
    padding: 6px 0;
  }

  /* Filter bar — hidden on mobile (moved to bottom sheet) */
  .filter-bar { display: none; }

  /* Control bar — mobile layout */
  .control-bar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  .control-bar-left {
    flex: 1;
    gap: 8px;
  }

  .control-bar-center { display: none; }
  .control-bar-right { display: none; }

  .segmented-control { flex: 1; }

  .segment-btn {
    flex: 1;
    text-align: center;
    padding: 5px 14px;
    font-size: 0.78rem;
  }

  .game-count {
    padding: 3px 8px;
    font-size: 0.7rem;
  }

  /* Mobile action bar */
  .control-bar-mobile-actions {
    display: flex;
    gap: 8px;
    width: 100%;
  }

  .control-bar-mobile-actions .bottom-sheet-trigger {
    flex: 1;
    height: 36px;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
  }

  /* Games grid */
  .games-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .league-group-body { gap: var(--space-sm); }
  .card-grid { grid-template-columns: 1fr; }

  /* Game cards — compact */
  .game-card {
    padding: 10px;
    gap: 8px;
    border-radius: var(--radius-md);
  }

  .game-card-body {
    gap: 8px;
    grid-template-columns: 1fr auto 1fr;
    min-height: 60px;
  }

  .game-card-team .team-logo {
    width: 40px;
    height: 40px;
  }

  .game-card-hour { font-size: 1.1rem; }

  .game-card-team-name {
    font-size: 0.72rem;
    max-width: 90px;
  }

  .game-card-top { min-height: 20px; }
  .game-card-league { font-size: 0.68rem; }
  .game-card-footer { min-height: 24px; padding-top: 4px; }
  .game-card { padding: 10px; gap: 6px; }
  .game-card-body { gap: 6px; min-height: 60px; }

  /* League group headers */
  .league-group-header {
    padding: 6px 10px;
  }

  .league-group-title { font-size: 0.75rem; }

  /* Day sections — compact */
  .day-section { margin-bottom: var(--space-md); }

  .day-section-header {
    margin-bottom: var(--space-md);
    padding-bottom: 8px;
    gap: 8px;
  }

  .day-section-title { font-size: 1rem; }

  .day-section-badge {
    padding: 2px 8px;
    font-size: 0.68rem;
  }

  /* Empty state */
  .empty-state {
    padding: var(--space-xl) var(--space-lg);
  }

  .empty-state-icon { font-size: 2rem; }

  /* Modals */
  .modal-panel {
    max-height: 95vh;
    border-radius: var(--radius-lg);
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }

  .modal-tabs {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
    overflow-x: auto;
  }

  /* Match Center mobile */
  #matchModal .modal-panel { width: 100%; max-height: 96vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .mc-hero-badge { width: 52px; height: 52px; }
  .mc-hero-name { font-size: 0.78rem; max-width: 100px; }
  .mc-score { font-size: 2rem; }
  .mc-score.dim { font-size: 1.3rem; }
  .mc-meta { font-size: 0.68rem; gap: var(--space-md); }
  .mc-meta span { max-width: 120px; }
  .mc-lineups { grid-template-columns: 1fr; gap: var(--space-lg); }
  .mc-stat-bar { grid-template-columns: 36px 1fr 36px; }

  .player-grid { grid-template-columns: 1fr; }

  .league-tiles-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .roster-stats-row {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }

  /* NBA cards — compact */
  .nba-card {
    padding: var(--space-md);
    border-radius: var(--radius-md);
  }

  .nba-card-top { margin-bottom: var(--space-sm); }

  .nba-card-top time { font-size: 0.85rem; }

  .nba-match {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-sm);
    text-align: center;
  }

  .nba-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .nba-team .team-logo {
    width: 56px;
    height: 56px;
  }

  .nba-team strong {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    max-width: 90px;
  }

  .nba-vs {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-tertiary);
    text-transform: uppercase;
  }

  .nba-channels {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-subtle);
  }

  .nba-source { font-size: 0.65rem; }

  /* UFC cards — compact */
  .ufc-event-card {
    border-radius: var(--radius-md);
  }

  .ufc-event-header {
    padding: var(--space-md);
    gap: var(--space-sm);
    flex-wrap: wrap;
  }

  .ufc-event-header h3 { font-size: 0.88rem; }
  .ufc-event-header p { font-size: 0.7rem; }

  .ufc-times {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }

  .ufc-time-badge {
    gap: 5px;
  }

  .ufc-time-main {
    padding: 5px 10px;
  }
  .ufc-time-main span { font-size: 0.62rem; }
  .ufc-time-main time { font-size: 0.78rem; }

  .ufc-time-prelims {
    padding: 3px 8px;
  }
  .ufc-time-prelims span { font-size: 0.55rem; }
  .ufc-time-prelims time { font-size: 0.66rem; }

  .ufc-main-fight {
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-sm);
    padding: var(--space-sm);
  }

  .ufc-fighter-photo {
    width: 72px;
    height: 72px;
  }

  .ufc-fighter-photo-fallback {
    font-size: 1.5rem;
  }

  .ufc-fighter {
    gap: 8px;
  }

  .ufc-fighter strong {
    font-size: 0.8rem;
    max-width: 100px;
    line-height: 1.2;
  }

  .ufc-fighter-record {
    font-size: 0.65rem;
  }

  .ufc-fighter-country {
    font-size: 0.65rem;
    gap: 4px;
  }

  .ufc-flag {
    width: 14px;
    height: 14px;
  }

  .ufc-category {
    font-size: 0.65rem;
  }

  .ufc-vs {
    font-size: 1rem !important;
  }

  .ufc-channels {
    padding: 0 var(--space-sm) var(--space-sm);
    gap: 4px;
  }

  .ufc-fight-list-title {
    font-size: 0.68rem;
  }

  .ufc-mini-photo {
    width: 32px;
    height: 32px;
  }

  .ufc-fight-row {
    padding: var(--space-sm);
    gap: var(--space-sm);
  }

  .ufc-fight-class { font-size: 0.65rem; }
  .ufc-fight-row em { font-size: 0.65rem; }
  .ufc-mini-fighter strong { font-size: 0.72rem; }
  .ufc-mini-fighter span { font-size: 0.62rem; }

  /* Global image constraint */
  .team-logo {
    max-width: 100%;
    overflow: hidden;
  }

  .team-logo img {
    max-width: 100%;
    object-fit: contain;
  }
}

@media (max-width: 480px) {
  .game-card {
    padding: var(--space-md);
  }

  .game-card-body {
    gap: var(--space-xs);
  }

  .game-card-team .team-logo {
    width: 32px;
    height: 32px;
  }

  .game-card-hour { font-size: 1.05rem; }

  .game-card-team-name {
    font-size: 0.7rem;
    max-width: 80px;
  }

  .btn-lg {
    height: 36px;
    padding: 0 14px;
    font-size: 0.8rem;
  }

  .segment-btn {
    padding: 5px 10px;
    font-size: 0.75rem;
  }
}

/* ---------------------------------------------------------------
   24.5  BOTTOM SHEET — Mobile overlay component
   --------------------------------------------------------------- */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  visibility: hidden;
  transition: visibility 0.3s;
}

.bottom-sheet-overlay.active {
  visibility: visible;
}

.bottom-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
}

.bottom-sheet-overlay.active .bottom-sheet-backdrop {
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.bottom-sheet-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 75vh;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-xl);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bottom-sheet-overlay.active .bottom-sheet-panel {
  transform: translateY(0);
}

.bottom-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 8px auto 0;
  flex-shrink: 0;
}

.bottom-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
  flex-shrink: 0;
}

.bottom-sheet-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
}

.bottom-sheet-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.bottom-sheet-close:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.bottom-sheet-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 16px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Sheet action buttons */
.sheet-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sheet-action-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border-default);
}

.sheet-action-btn-icon {
  font-size: 1.3rem;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

/* Sheet selects */
.bottom-sheet-body .filter-select {
  width: 100%;
  height: 42px;
  min-width: 0;
  font-size: 0.85rem;
  padding: 0 36px 0 14px;
}

/* Sheet date input */
.bottom-sheet-body .date-input {
  width: 100%;
  height: 42px;
  font-size: 0.85rem;
  padding: 0 14px;
}

/* Sheet labels and fields */
.sheet-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.sheet-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Sheet apply button */
.sheet-apply-btn {
  width: 100%;
  height: 44px;
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 4px;
}

.sheet-apply-btn:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

/* Hide mobile elements on desktop */
@media (min-width: 769px) {
  .control-bar-mobile-actions { display: none !important; }
  .bottom-sheet-overlay { display: none !important; }
  .bottom-nav { display: none !important; }
  .ongrid-main { padding-bottom: 0; }
}

/* ---------------------------------------------------------------
   25. JS COMPATIBILITY — Classes referenced by script.js
   --------------------------------------------------------------- */

/* Tab panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn var(--transition-base); }

/* Roster tab panels */
.roster-tab-panel { display: none; }
.roster-tab-panel.active { display: block; animation: fadeIn var(--transition-base); }

/* Roster tabs (use same styling as modal-tab) */
.roster-tab {
  padding: 10px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-tertiary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: none;
  white-space: nowrap;
}
.roster-tab:hover { color: var(--text-secondary); }
.roster-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

/* Subst items (config modal) */
.subst-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  margin-bottom: 6px;
  font-size: 0.82rem;
}
.subst-de { color: var(--text-secondary); }
.subst-seta { color: var(--brand); font-weight: 700; }
.subst-para { color: var(--text-primary); font-weight: 650; }

/* Teams by league container */
.teams-by-league {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Conference / section titles in roster */
.modal-section { margin-bottom: var(--space-xl); }
.modal-section:last-child { margin-bottom: 0; }
.modal-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Upcoming match cards (roster modal) */
.upcoming-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.upcoming-match-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}
.upcoming-match-card:hover { border-color: var(--border-default); }
.upcoming-match-card.is-soon {
  border-color: rgba(34, 197, 94, 0.3);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.1);
}
.upcoming-card-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}
.upcoming-date-block { display: flex; align-items: baseline; gap: 6px; min-width: 90px; }
.upcoming-date-block strong { font-size: 1.4rem; font-weight: 900; color: var(--text-primary); line-height: 1; }
.upcoming-month { color: var(--text-secondary); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.upcoming-weekday { color: var(--text-tertiary); font-size: 0.65rem; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: var(--radius-full); background: var(--bg-tertiary); }
.upcoming-weekday.highlight { color: var(--text-inverse); background: var(--live); font-weight: 800; }
.upcoming-league-block { display: flex; align-items: center; justify-content: center; min-width: 0; }
.upcoming-league-block strong { color: var(--text-primary); font-size: 0.78rem; font-weight: 750; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upcoming-time-block { background: var(--bg-secondary); color: var(--live); padding: 5px 12px; border-radius: var(--radius-full); font-size: 0.82rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.upcoming-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-xl);
}
.upcoming-team-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
}
.upcoming-team-side .team-logo { width: 52px; height: 52px; }
.upcoming-team-side strong { font-size: 0.85rem; font-weight: 750; color: var(--text-primary); max-width: 150px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.upcoming-vs-divider { color: var(--text-tertiary); font-size: 1.1rem; font-weight: 900; }
.upcoming-card-footer {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}
.upcoming-canais-row { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }

/* ── Match Center Modal (mc-) ──────────────────────────────── */

/* Match modal wider */
#matchModal .modal-panel { width: min(720px, 96vw); }

/* Hero header */
.match-hero { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-lg); width: 100%; padding: var(--space-md) 0; }
.mc-hero-team { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.mc-hero-badge { width: 68px; height: 68px; border-radius: 50%; background: var(--bg-tertiary); border: 2px solid var(--border-default); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.mc-hero-badge img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.mc-badge-fb { display: grid; place-items: center; width: 100%; height: 100%; font-size: 1.4rem; font-weight: 800; color: var(--tc, var(--text-secondary)); background: color-mix(in srgb, var(--tc, var(--text-secondary)) 12%, transparent); border-radius: 50%; }
.mc-hero-name { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); max-width: 140px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mc-hero-center { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 90px; }
.mc-score { font-size: 2.4rem; font-weight: 900; color: var(--text-primary); letter-spacing: 0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.mc-score.live { color: var(--live); }
.mc-score.dim { font-size: 1.6rem; color: var(--text-tertiary); font-weight: 800; }
.mc-score-sep { color: var(--text-tertiary); font-size: 0.9rem; margin: 0 2px; }
.mc-status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.mc-status.mc-live { background: var(--live-dim); color: var(--live); border: 1px solid rgba(34,197,94,0.2); }
.mc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live); animation: livePulse 1s ease-in-out infinite; }
.mc-status.mc-ft { background: var(--bg-tertiary); color: var(--text-tertiary); }
.mc-status.mc-ns { background: var(--brand-dim); color: var(--brand); }
.mc-meta { display: flex; justify-content: center; gap: var(--space-lg); font-size: 0.72rem; color: var(--text-secondary); margin-top: 2px; }
.mc-meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }

/* Empty state */
.mc-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-md); padding: var(--space-xl) var(--space-lg); min-height: 160px; text-align: center; }
.mc-empty-icon { font-size: 2rem; opacity: 0.7; }
.mc-empty-text { font-size: 0.82rem; color: var(--text-secondary); max-width: 300px; line-height: 1.5; }

/* Loading spinner */
.mc-spinner { width: 28px; height: 28px; border: 3px solid var(--border-default); border-top-color: var(--brand); border-radius: 50%; animation: mcSpin 0.7s linear infinite; }
@keyframes mcSpin { to { transform: rotate(360deg); } }

/* Events */
.mc-events { display: flex; flex-direction: column; gap: 2px; }
.mc-event { display: flex; align-items: flex-start; gap: var(--space-sm); padding: 8px 10px; border-radius: var(--radius-sm); font-size: 0.82rem; transition: background 0.15s; }
.mc-event.home { background: linear-gradient(90deg, rgba(74,144,217,0.08) 0%, transparent 60%); }
.mc-event.away { background: linear-gradient(270deg, rgba(224,85,85,0.08) 0%, transparent 60%); }
.mc-event.ev-goal { border-left: 3px solid var(--live); }
.mc-event.ev-card { border-left: 3px solid #f59e0b; }
.mc-ev-min { font-weight: 700; color: var(--brand); min-width: 36px; text-align: center; font-size: 0.78rem; flex-shrink: 0; padding-top: 1px; font-variant-numeric: tabular-nums; }
.mc-ev-icon { font-size: 0.85rem; min-width: 20px; text-align: center; flex-shrink: 0; }
.mc-ev-info { flex: 1; color: var(--text-primary); line-height: 1.4; display: flex; flex-direction: column; gap: 1px; }
.mc-ev-info strong { font-weight: 650; }
.mc-ev-info small { color: var(--text-tertiary); font-size: 0.75rem; font-weight: 600; }
.mc-ev-sub { display: block; font-size: 0.72rem; color: var(--text-tertiary); font-weight: 500; }

/* Stats */
.mc-stats { display: flex; flex-direction: column; gap: var(--space-md); }
.mc-stat { display: flex; flex-direction: column; gap: 4px; }
.mc-stat-label { text-align: center; font-size: 0.7rem; color: var(--text-tertiary); font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; }
.mc-stat-bar { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: var(--space-sm); }
.mc-stat-val { font-weight: 700; font-size: 0.85rem; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.mc-stat-val:first-child { text-align: right; }
.mc-stat-val:last-child { text-align: left; }
.mc-stat-track { height: 6px; border-radius: 3px; background: var(--bg-tertiary); display: flex; overflow: hidden; }
.mc-stat-fill { height: 100%; transition: width 0.5s ease; }
.mc-stat-fill.home { background: var(--brand); border-radius: 3px 0 0 3px; }
.mc-stat-fill.away { background: var(--danger); border-radius: 0 3px 3px 0; }

/* Lineups */
.mc-lineups { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
.mc-lu-side { min-width: 0; }
.mc-lu-header { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-md); }
.mc-lu-header h4 { font-size: 0.85rem; font-weight: 750; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-lu-form { padding: 2px 8px; border-radius: var(--radius-full); background: var(--brand-dim); color: var(--brand); font-size: 0.68rem; font-weight: 700; flex-shrink: 0; }
.mc-lu-title { display: block; font-size: 0.68rem; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.mc-lu-section { margin-bottom: var(--space-md); }
.mc-lu-section.subs { margin-top: var(--space-sm); padding-top: var(--space-sm); border-top: 1px solid var(--border-subtle); }
.mc-lu-player { display: flex; align-items: center; gap: var(--space-sm); padding: 4px 0; font-size: 0.8rem; border-bottom: 1px solid var(--border-subtle); }
.mc-lu-player:last-child { border-bottom: none; }
.mc-lu-num { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 0.66rem; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.mc-lu-side.away .mc-lu-num { background: var(--danger); }
.mc-lu-name { flex: 1; color: var(--text-primary); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-lu-pos { font-size: 0.66rem; color: var(--text-tertiary); font-weight: 600; flex-shrink: 0; padding: 2px 6px; background: var(--bg-tertiary); border-radius: var(--radius-sm); }

/* Field */
.mc-field { background: #14421f; border-radius: var(--radius-md); overflow: hidden; border: 2px solid #1e5a2a; }
.mc-field-svg { display: block; width: 100%; height: auto; max-height: 520px; }

/* ── Match Tracker (Campo tab) ──────────────────────────────── */

.mc-tracker {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Field container with pulse overlays */
.mc-tracker-field-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #14421f;
  border: 2px solid #1e5a2a;
}

.mc-tracker-field-container .mc-field-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 480px;
}

/* Pulse zones — attacking third pressure indicators */
.mc-tracker-pulse {
  position: absolute;
  left: 0;
  right: 0;
  height: 28%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.mc-tracker-pulse.top {
  top: 0;
  background: radial-gradient(ellipse at 50% 70%, rgba(74,144,217,0.2) 0%, transparent 75%);
}

.mc-tracker-pulse.bottom {
  bottom: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(224,85,85,0.2) 0%, transparent 75%);
}

.mc-tracker-pulse.active {
  opacity: 1;
  animation: trackerPulse 2.4s ease-in-out infinite;
}

@keyframes trackerPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* Ball — CSS transitions for smooth movement */
.mc-tracker-ball {
  transition: cx 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
              cy 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.7));
}

.mc-tracker-ball-glow {
  transition: cx 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
              cy 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
              r 0.3s ease,
              opacity 0.3s ease;
  fill: rgba(255,221,68,0.3);
}

.mc-tracker-ball-glow.idle {
  animation: ballBreathe 1.6s ease-in-out infinite;
}

@keyframes ballBreathe {
  0%, 100% { r: 12; opacity: 0.2; }
  50% { r: 18; opacity: 0.45; }
}

/* Ball trail — fades at previous position */
.mc-tracker-ball-trail {
  transition: opacity 0.5s ease-out;
  fill: rgba(255,255,255,0.35);
}

/* Highlight ring on field (clicking timeline events) */
.mc-tracker-highlight-ring {
  animation: highlightPulse 0.9s ease-in-out infinite;
  pointer-events: none;
}

@keyframes highlightPulse {
  0%, 100% { r: 15; opacity: 0.9; }
  50% { r: 24; opacity: 0.35; }
}

/* Highlight label — minute next to pulse ring */
.mc-tracker-highlight-label {
  font-size: 7px;
  fill: #fff;
  font-weight: 700;
  font-family: var(--font-sans);
  text-anchor: middle;
  pointer-events: none;
}

/* Timeline container */
.mc-tracker-timeline {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-sm) 0;
  overflow: hidden;
}

.mc-tracker-timeline-scroll {
  display: flex;
  gap: 4px;
  padding: 0 var(--space-md);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  -webkit-overflow-scrolling: touch;
}

.mc-tracker-timeline-scroll::-webkit-scrollbar { height: 4px; }
.mc-tracker-timeline-scroll::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 2px;
}

/* Timeline event card */
.mc-tte {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
  color: var(--text-secondary);
  position: relative;
}

.mc-tte:hover {
  background: var(--bg-elevated);
  border-color: var(--border-default);
  transform: translateY(-2px);
}

.mc-tte.active {
  background: var(--brand-dim);
  border-color: var(--brand);
  color: var(--brand);
}

.mc-tte.active::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
}

/* Timeline type indicators */
.mc-tte.goal { border-bottom: 3px solid var(--live); }
.mc-tte.card { border-bottom: 3px solid var(--accent); }
.mc-tte.subst { border-bottom: 3px solid var(--info); }
.mc-tte.var { border-bottom: 3px solid var(--brand); }

.mc-tte-min {
  font-size: 0.65rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.mc-tte-icon {
  font-size: 0.8rem;
  line-height: 1;
}

/* Empty timeline */
.mc-tracker-timeline-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-lg);
  color: var(--text-tertiary);
  font-size: 0.72rem;
  font-weight: 600;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .mc-tracker-field-container .mc-field-svg {
    max-height: 340px;
  }

  .mc-tracker-pulse {
    height: 22%;
  }

  .mc-tte {
    min-width: 38px;
    height: 38px;
    padding: 3px 4px;
  }

  .mc-tte-min { font-size: 0.58rem; }
  .mc-tte-icon { font-size: 0.7rem; }

  .mc-tracker-timeline-scroll {
    padding: 0 var(--space-sm);
    gap: 3px;
  }
}

/* ── New Horizontal Tracker (bet365-style) ─────────────────── */
.mc-tr2 { display: flex; flex-direction: column; gap: 12px; }

.mc-tr2-poss-row {
  display: flex; align-items: center; gap: 8px; padding: 0 2px;
}
.mc-tr2-side {
  display: flex; align-items: center; gap: 5px; flex-shrink: 0;
}
.mc-tr2-side.home { flex-direction: row; }
.mc-tr2-side.away { flex-direction: row-reverse; }
.mc-tr2-logo { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
.mc-tr2-poss-pct {
  font-size: 1.05rem; font-weight: 900;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.mc-tr2-poss-pct.home { color: #4a90d9; }
.mc-tr2-poss-pct.away { color: #e05555; }
.mc-tr2-poss-track-wrap {
  flex: 1; display: flex; flex-direction: column; gap: 3px; align-items: center;
}
.mc-tr2-poss-track {
  width: 100%; height: 8px; border-radius: 4px;
  display: flex; overflow: hidden; background: var(--bg-tertiary);
}
.mc-tr2-poss-fill.home { background: #4a90d9; }
.mc-tr2-poss-fill.away { background: #e05555; }
.mc-tr2-poss-caption {
  font-size: 0.58rem; font-weight: 650; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.06em;
}

.mc-tr2-scorebar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 8px 10px;
  background: var(--bg-tertiary); border-radius: 10px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 2px;
}
.mc-tr2-sb-team {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 700; color: var(--text-primary);
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mc-tr2-sb-team.right { justify-content: flex-end; text-align: right; }
.mc-tr2-sb-logo {
  width: 22px; height: 22px; object-fit: contain; flex-shrink: 0;
  border-radius: 4px;
}
.mc-tr2-sb-center {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  flex-shrink: 0;
}
.mc-tr2-sb-score {
  font-size: 1.3rem; font-weight: 900; color: var(--text-primary);
  font-variant-numeric: tabular-nums; letter-spacing: 0.05em;
  display: flex; align-items: center; gap: 5px;
}
.mc-tr2-sb-div { color: var(--text-tertiary); font-size: 1rem; }
.mc-tr2-sb-timer {
  font-size: 0.68rem; font-weight: 800; color: var(--live);
  letter-spacing: 0.06em; text-transform: uppercase;
  animation: livePulse 2s ease-in-out infinite;
}
.mc-tr2-sb-timer.ht { color: var(--accent); animation: none; }

.mc-tr2-pitch-wrap {
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 6px 24px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,0.06);
  max-height: 205px;
}
.mc-tr2-svg { display: block; width: 100%; height: auto; max-height: 205px; }

.mc-tr2-attack-ind {
  text-align: center; font-size: 0.74rem; font-weight: 700;
  padding: 2px 0; letter-spacing: 0.03em;
  transition: color 0.4s ease;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.mc-tr2-attack-ind.home { color: #4a90d9; }
.mc-tr2-attack-ind.away { color: #e05555; }
.mc-tr2-attack-ind.neutral { color: var(--text-tertiary); }

.mc-tr2-mstats { display: flex; flex-direction: column; gap: 5px; padding: 0 2px; }
.mc-tr2-srow {
  display: grid;
  grid-template-columns: 26px 1fr 26px;
  grid-template-areas: "v1 bar v2" ". lbl .";
  align-items: center; gap: 0 6px;
}
.mc-tr2-sv {
  font-size: 0.8rem; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--text-tertiary);
}
.mc-tr2-sv.home { text-align: right; color: #4a90d9; }
.mc-tr2-sv.away { text-align: left;  color: #e05555; }
.mc-tr2-sv.win  { color: var(--text-primary); font-size: 0.88rem; }
.mc-tr2-strack {
  height: 5px; border-radius: 3px; display: flex; overflow: hidden;
  background: var(--bg-tertiary); grid-area: bar;
}
.mc-tr2-slbl {
  grid-area: lbl; text-align: center;
  font-size: 0.57rem; font-weight: 650; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.05em; margin-top: 1px;
}

.mc-tr2-tl-wrap {
  border-top: 1px solid var(--border-subtle); padding-top: 10px;
}
.mc-tr2-tl-label {
  font-size: 0.62rem; font-weight: 700; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px;
}
.mc-tr2-tl {
  display: flex; flex-wrap: wrap; gap: 5px;
  max-height: 96px; overflow-y: auto;
}
.mc-tr2-tl::-webkit-scrollbar { height: 3px; }
.mc-tr2-ev {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 8px; border-radius: 999px; font-size: 0.68rem;
  font-weight: 600; border: 1px solid var(--border-subtle);
  background: var(--bg-tertiary); color: var(--text-secondary);
  white-space: nowrap;
}
.mc-tr2-ev.home { border-color: rgba(74,144,217,.3); background: rgba(74,144,217,.08); }
.mc-tr2-ev.away { border-color: rgba(224,85,85,.3);  background: rgba(224,85,85,.08);  }
.mc-tr2-ev.goal { border-color: rgba(34,197,94,.4);  background: rgba(34,197,94,.1);   font-weight: 750; }
.mc-tr2-ev-min  { font-weight: 800; color: var(--brand); font-size: 0.63rem; }
.mc-tr2-ev-icon { font-size: 0.72rem; }
.mc-tr2-ev-name { max-width: 66px; overflow: hidden; text-overflow: ellipsis; }

/* Away events in Events tab — right-aligned */
.mc-event.away { flex-direction: row-reverse; text-align: right; }
.mc-event.away .mc-ev-info.away { text-align: right; }
.mc-event.away .mc-ev-min { color: #e05555; }

/* Modal loading */
.modal-loading-sections {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.modal-loading-card {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  color: var(--text-secondary);
  font-size: 0.82rem;
}

/* Roster group labels */
.roster-group h4 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 750;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.roster-group h4 span { color: var(--text-tertiary); font-size: 0.68rem; }
.roster-group h3 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
}
.roster-group h3 span {
  color: #fff;
  background: var(--brand);
  border-radius: var(--radius-full);
  padding: 2px 7px;
  font-size: 0.65rem;
}

/* Roster grid */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-sm);
}

/* League card compact (used in leagues/channels tabs) */
.league-card.compact {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}
.league-card.compact header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}
.league-card.compact h3 { font-size: 0.85rem; font-weight: 750; color: var(--text-primary); }
.league-card.compact p { font-size: 0.78rem; color: var(--text-secondary); }

/* Channel card (used in channels tab) */
.channel-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}
.channel-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}
.channel-card-title strong { font-size: 0.78rem; color: var(--text-secondary); }

/* Mini games list */
.mini-games { display: flex; flex-direction: column; gap: 6px; }
.mini-games span {
  padding: 6px 10px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Clickable game cards */
.game-card.clickable { cursor: pointer; }

/* Manage modal */
.manage-body { padding: 0; }
.manage-search-bar { margin-bottom: var(--space-md); }
.manage-search-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: all var(--transition-fast);
}
.manage-search-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-dim); }
.manage-search-input::placeholder { color: var(--text-tertiary); }

.manage-results { display: flex; flex-direction: column; gap: 6px; min-height: 40px; }
.manage-result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: border-color var(--transition-fast);
}
.manage-result-card:hover { border-color: var(--border-default); }
.manage-result-card.overridden { border-color: var(--brand); background: var(--brand-dim); }
.manage-result-card.removed { opacity: 0.5; border-color: var(--danger); }
.manage-result-left { display: flex; align-items: center; gap: var(--space-sm); min-width: 0; flex: 1; }
.manage-result-logo { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.manage-result-info { display: flex; flex-direction: column; min-width: 0; }
.manage-result-info strong { color: var(--text-primary); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.manage-result-league { color: var(--text-tertiary); font-size: 0.7rem; }
.manage-result-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.manage-result-select {
  padding: 6px 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.72rem;
  outline: none;
  max-width: 160px;
  cursor: pointer;
}
.manage-result-select:focus { border-color: var(--brand); }

.manage-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.manage-row:last-child { border-bottom: none; }
.manage-row-team { font-size: 0.8rem; color: var(--text-secondary); font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manage-row-team.removed { text-decoration: line-through; color: var(--text-tertiary); }
.manage-row-arrow { color: var(--text-tertiary); font-size: 0.75rem; flex-shrink: 0; }
.manage-row-league { font-size: 0.78rem; color: var(--brand); font-weight: 650; flex: 1; }

button.manage-row-remove,
button.manage-row-restore {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.7rem;
  cursor: pointer;
  font-weight: 700;
  transition: all var(--transition-fast);
}
button.manage-row-remove { background: none; color: var(--danger); border-color: rgba(239, 68, 68, 0.2); }
button.manage-row-remove:hover { background: var(--danger); color: #fff; }
button.manage-row-restore { background: none; color: var(--live); border-color: rgba(34, 197, 94, 0.2); }
button.manage-row-restore:hover { background: var(--live); color: var(--text-inverse); }

.manage-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.manage-btn-add { background: var(--brand); color: #fff; border-color: var(--brand); }
.manage-btn-add:hover { background: var(--brand-hover); }
.manage-details { margin-top: var(--space-md); }
.manage-details summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 650;
  padding: 6px 0;
}
.manage-details summary:hover { color: var(--text-primary); }
.manage-list { padding: var(--space-sm) 0 var(--space-sm) var(--space-sm); }
.manage-add-form { display: flex; gap: var(--space-sm); padding: var(--space-sm) 0; flex-wrap: wrap; }
.manage-input {
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
  outline: none;
  flex: 1;
  min-width: 140px;
}
.manage-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-dim); }
.manage-input::placeholder { color: var(--text-tertiary); }
.manage-icon { font-size: 2rem; display: flex; align-items: center; justify-content: center; }
.muted { color: var(--text-tertiary); font-size: 0.78rem; font-style: italic; }

/* UFC specific */
.ufc-toolbar { background: var(--sport-ufc-dim); border: 1px solid rgba(239, 68, 68, 0.15); }

.ufc-fighter-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-strong);
}
.ufc-fighter-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ufc-fighter-photo-fallback {
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--sport-ufc);
  background: var(--sport-ufc-dim);
  border-color: rgba(239, 68, 68, 0.2);
}

.ufc-fighter-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.ufc-fighter-record {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-weight: 600;
}

.ufc-fighter-country {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.ufc-flag {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.ufc-category {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ufc-vs {
  color: var(--sport-ufc) !important;
  font-size: 1.3rem !important;
  font-weight: 900 !important;
}

.ufc-channels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 0 var(--space-lg) var(--space-lg);
}

.ufc-fight-list-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

.ufc-mini-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-tertiary);
}
.ufc-mini-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ufc-fight-list { display: grid; gap: var(--space-sm); padding: var(--space-lg); }

.ufc-fight-row {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  align-items: center;
  gap: var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.ufc-fight-class {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-sm);
}

.ufc-mini-fighter { display: flex; align-items: center; gap: var(--space-sm); }
.ufc-mini-fighter.right { flex-direction: row-reverse; text-align: right; }
.ufc-fight-row em {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.ufc-center { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ufc-center strong { color: var(--sport-ufc); font-size: 1.2rem; font-weight: 900; text-transform: uppercase; }

.ufc-fighter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
}
.ufc-fighter strong { font-size: 0.88rem; font-weight: 750; color: var(--text-primary); }

/* Form hint */
.form-hint { display: block; color: var(--text-tertiary); font-size: 0.72rem; margin-top: 4px; }
.mt-12 { margin-top: var(--space-md); }

/* Legends */
.league-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}

/* Team logo (reusable component) */
.team-logo {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  background: var(--bg-tertiary);
}
.team-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.team-logo-fallback {
  border: 2px solid var(--brand);
  color: var(--text-primary);
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 50%;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

/* NBA specific overrides */
.nba-card { border-top: 3px solid var(--sport-nba); }
.nba-toolbar { background: var(--sport-nba-dim); border: 1px solid rgba(59, 130, 246, 0.15); }
.nba-source { font-size: 0.72rem; color: var(--text-tertiary); font-weight: 650; margin-top: var(--space-sm); text-align: center; }

/* ---------------------------------------------------------------
   26. LOADING SHIMMER
   --------------------------------------------------------------- */
@keyframes shimmer {
  0% { opacity: 0.55; }
  50% { opacity: 0.25; }
  100% { opacity: 0.55; }
}

.loading-shimmer {
  animation: shimmer 1.2s ease-in-out infinite;
  pointer-events: none;
  position: relative;
}

.loading-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-tertiary);
  border-radius: inherit;
  opacity: 0.5;
  z-index: 10;
}

/* ---------------------------------------------------------------
   27. PRINT STYLES (optional)
   --------------------------------------------------------------- */
@media print {
  .ongrid-header,
  .sport-bar,
  .filter-bar,
  .toolbar-ongrid,
  .sub-nav,
  .ad-banner { display: none !important; }

  body { background: #fff; color: #000; }
  .game-card { break-inside: avoid; border: 1px solid #ddd; }
}

/* ── Campo tab: bet365-style pitch container + event popup ─────────── */
.mc-tr2-pitch-container {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}

/* "Marcadores de Gols" header bar */
.mc-tr2-pitch-header {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.82);
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.mc-tr2-ph-left {
  display: flex;
  align-items: center;
  gap: 5px;
}
.mc-tr2-ph-icon { font-size: 0.9rem; }
.mc-tr2-ph-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255,255,255,0.60);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Pitch no longer needs its own border — container handles it */
.mc-tr2-pitch-container .mc-tr2-pitch-wrap {
  border: none;
  border-radius: 0;
  margin: 0;
}

/* Event popup overlay */
.mc-tr2-evpop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 10, 3, 0.80);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 10;
}
.mc-tr2-evpop.visible { opacity: 1; }

.mc-tr2-evpop-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  padding: 0 16px;
}
.mc-tr2-evpop-icon {
  font-size: 2.8rem;
  line-height: 1;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.8));
}
.mc-tr2-evpop-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0,0,0,0.9);
  line-height: 1.1;
}
.mc-tr2-evpop-title.goal {
  color: #22c55e;
  text-shadow: 0 0 30px rgba(34,197,94,0.7), 0 2px 10px rgba(0,0,0,0.9);
  animation: goalPop 0.45s cubic-bezier(.17,.67,.44,1.3) forwards;
}
.mc-tr2-evpop-title.card-red  { color: #ef4444; text-shadow: 0 0 20px rgba(239,68,68,0.6), 0 2px 10px rgba(0,0,0,0.9); }
.mc-tr2-evpop-title.card-yellow { color: #facc15; text-shadow: 0 0 20px rgba(250,204,21,0.5), 0 2px 10px rgba(0,0,0,0.9); }

@keyframes goalPop {
  0%   { transform: scale(0.7); opacity: 0; }
  70%  { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
.mc-tr2-evpop-player {
  font-size: 0.92rem;
  color: #4ade80;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-top: 2px;
}
.mc-tr2-evpop-team {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.40);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ════════════════════════════════════════════════════════════
   PRÉ-JOGO TAB  (Predictions + Injuries)
   ════════════════════════════════════════════════════════════ */
.mc-pj-wrap { display:flex; flex-direction:column; gap:16px; padding:4px 0; }

.mc-pj-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.mc-pj-title {
  font-size: 0.72rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-secondary);
  margin-bottom: 12px;
}
.mc-pj-advice {
  font-size: 0.88rem; font-style: italic;
  color: var(--brand); margin-bottom: 12px; font-weight: 500;
}
.mc-pj-bars { display:flex; flex-direction:column; gap:7px; }
.mc-pj-bar-row { display:grid; grid-template-columns:1fr 2fr auto; align-items:center; gap:8px; }
.mc-pj-team { font-size:0.72rem; color:var(--text-secondary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mc-pj-track { height:6px; background:var(--bg-tertiary); border-radius:4px; overflow:hidden; }
.mc-pj-fill  { height:100%; border-radius:4px; transition:width .5s; }
.mc-pj-fill.home { background:#4a90d9; }
.mc-pj-fill.draw { background:#888; }
.mc-pj-fill.away { background:#e05555; }
.mc-pj-pct  { font-size:0.72rem; font-weight:700; color:var(--text-primary); min-width:30px; text-align:right; }
.mc-pj-winner { margin-top:10px; font-size:0.78rem; color:var(--text-secondary); }
.mc-pj-winner strong { color:var(--brand); }

/* Injuries */
.mc-inj-team { margin-bottom:12px; }
.mc-inj-team:last-child { margin-bottom:0; }
.mc-inj-team-header { display:flex; align-items:center; gap:6px; margin-bottom:8px; font-size:0.8rem; font-weight:700; color:var(--text-primary); }
.mc-inj-team-logo { width:20px; height:20px; object-fit:contain; }
.mc-inj-row { display:flex; align-items:center; gap:10px; padding:6px 0; border-bottom:1px solid var(--border-subtle); }
.mc-inj-row:last-child { border-bottom:none; }
.mc-inj-photo { width:32px; height:32px; border-radius:50%; object-fit:cover; border:1px solid var(--border-subtle); }
.mc-inj-photo-placeholder { width:32px; height:32px; display:flex; align-items:center; justify-content:center; font-size:1.1rem; }
.mc-inj-info { display:flex; flex-direction:column; gap:2px; }
.mc-inj-name { font-size:0.82rem; font-weight:600; color:var(--text-primary); }
.mc-inj-type { font-size:0.70rem; color:var(--text-secondary); }

/* ════════════════════════════════════════════════════════════
   H2H TAB
   ════════════════════════════════════════════════════════════ */
.mc-h2h-wrap { display:flex; flex-direction:column; gap:12px; }

.mc-h2h-summary {
  display:grid; grid-template-columns:1fr auto 1fr;
  background:var(--bg-secondary); border:1px solid var(--border-subtle);
  border-radius:var(--radius-md); padding:14px 12px; gap:8px;
}
.mc-h2h-sum-item { display:flex; flex-direction:column; align-items:center; gap:3px; }
.mc-h2h-sum-item.home { align-items:flex-start; }
.mc-h2h-sum-item.away { align-items:flex-end; }
.mc-h2h-sum-n { font-size:1.8rem; font-weight:900; color:var(--text-primary); line-height:1; }
.mc-h2h-sum-item.home .mc-h2h-sum-n { color:#4a90d9; }
.mc-h2h-sum-item.away .mc-h2h-sum-n { color:#e05555; }
.mc-h2h-sum-l { font-size:0.62rem; color:var(--text-tertiary); text-align:center; font-weight:600; letter-spacing:.04em; }

.mc-h2h-list { display:flex; flex-direction:column; gap:6px; }
.mc-h2h-row {
  background:var(--bg-secondary); border:1px solid var(--border-subtle);
  border-radius:var(--radius-sm); padding:8px 10px;
  display:flex; flex-direction:column; gap:4px;
  border-left:3px solid transparent;
}
.mc-h2h-row.home { border-left-color:#4a90d9; }
.mc-h2h-row.away { border-left-color:#e05555; }
.mc-h2h-row.draw { border-left-color:#888; }
.mc-h2h-date { font-size:0.62rem; color:var(--text-tertiary); }
.mc-h2h-match { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.mc-h2h-team { font-size:0.78rem; color:var(--text-secondary); flex:1; }
.mc-h2h-team.right { text-align:right; }
.mc-h2h-team.winner { color:var(--text-primary); font-weight:700; }
.mc-h2h-score { font-size:0.9rem; font-weight:800; color:var(--text-primary); white-space:nowrap; }
.mc-h2h-comp { font-size:0.60rem; color:var(--text-tertiary); font-style:italic; }

/* ════════════════════════════════════════════════════════════
   TABELA TAB (Standings)
   ════════════════════════════════════════════════════════════ */
.mc-tb-wrap { display:flex; flex-direction:column; gap:16px; }
.mc-tb-group-title { font-size:0.70rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--text-secondary); margin-bottom:6px; }
.mc-tb-scroll { overflow-x:auto; }
.mc-tb-table {
  width:100%; border-collapse:collapse; font-size:0.75rem;
  color:var(--text-secondary);
}
.mc-tb-table th {
  padding:5px 6px; text-align:center; font-weight:700; font-size:0.63rem;
  color:var(--text-tertiary); border-bottom:1px solid var(--border-subtle);
  white-space:nowrap;
}
.mc-tb-table th:nth-child(2) { text-align:left; }
.mc-tb-table td {
  padding:6px 6px; text-align:center; border-bottom:1px solid var(--border-subtle);
}
.mc-tb-table td:nth-child(2) { text-align:left; }
.mc-tb-table tr:last-child td { border-bottom:none; }
.mc-tb-highlight td { background:rgba(74,144,217,.08); color:var(--text-primary); }
.mc-tb-highlight .mc-tb-pts { color:var(--brand) !important; }
.mc-tb-pos { font-weight:700; color:var(--text-tertiary); width:20px; }
.mc-tb-team { display:flex; align-items:center; gap:6px; }
.mc-tb-logo { width:16px; height:16px; object-fit:contain; }
.mc-tb-pts { font-weight:800; color:var(--text-primary); }
.mc-tb-form-cell { display:flex; gap:2px; justify-content:center; }
.mc-tb-form { display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; border-radius:3px; font-size:0.55rem; font-weight:800; color:#fff; }
.mc-tb-form.w { background:#22c55e; }
.mc-tb-form.d { background:#888; }
.mc-tb-form.l { background:#e05555; }

/* ── Lineups tab — player ratings + badges ─────────────────── */
.mc-lu-coach {
  font-size: 0.70rem; color: var(--text-secondary);
  padding: 2px 0 8px 2px;
}
.mc-lu-player { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.mc-lu-rating {
  margin-left:auto; min-width:28px; padding:1px 5px;
  border-radius:4px; font-size:0.68rem; font-weight:800;
  color:#fff; text-align:center; flex-shrink:0;
}
.mc-lu-badge {
  font-size:0.60rem; padding:1px 4px;
  border-radius:3px; font-weight:700;
  background: rgba(255,255,255,0.08);
  color: var(--text-secondary);
}
.mc-lu-badge.goal { color:#22c55e; background:rgba(34,197,94,.12); }
.mc-lu-badge.ast  { color:#4a90d9; background:rgba(74,144,217,.12); }
.mc-lu-badge.save { color:#a78bfa; background:rgba(167,139,250,.12); }
.mc-lu-badge.shot { color:#f59e0b; background:rgba(245,158,11,.12); }
.mc-lu-player.sub { opacity: 0.7; }

/* ════════════════════════════════════════════════════════════
   HERO HEADER — Árbitro + Estádio
   ════════════════════════════════════════════════════════════ */
.mc-meta-extra {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; margin-top: 5px;
}
.mc-meta-venue, .mc-meta-referee {
  font-size: 0.62rem; color: var(--text-tertiary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 200px;
}
.mc-meta-venue { color: var(--text-secondary); }

/* ════════════════════════════════════════════════════════════
   LINEUPS — Player photos + Coach card
   ════════════════════════════════════════════════════════════ */
.mc-lu-photo {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}
.mc-lu-photo-fb {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 700; background: var(--bg-tertiary);
  color: var(--text-tertiary); width: 28px; height: 28px;
  border-radius: 50%; flex-shrink: 0;
}
.mc-lu-coach-card {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin-bottom: 8px;
  background: var(--bg-tertiary); border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}
.mc-lu-coach-photo {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}
.mc-lu-coach-photo-fb {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem; width: 38px; height: 38px; flex-shrink: 0;
}
.mc-lu-coach-info { display: flex; flex-direction: column; gap: 2px; }
.mc-lu-coach-name { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); }
.mc-lu-coach-meta { font-size: 0.65rem; color: var(--text-tertiary); }

/* ════════════════════════════════════════════════════════════
   TRANSFERS WIDGET (inside Escalações tab)
   ════════════════════════════════════════════════════════════ */
.mc-tr-widget {
  margin-top: 20px; border-top: 1px solid var(--border-subtle); padding-top: 16px;
}
.mc-lu-section-title {
  font-size: 0.70rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-secondary); margin-bottom: 12px;
}
.mc-tr-side { margin-bottom: 14px; }
.mc-tr-side-name {
  font-size: 0.72rem; font-weight: 700; color: var(--brand);
  margin-bottom: 6px; padding-left: 2px;
}
.mc-tr-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--border-subtle);
}
.mc-tr-row:last-child { border-bottom: none; }
.mc-tr-photo {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
  flex-shrink: 0; border: 1px solid var(--border-subtle);
}
.mc-tr-photo-fb {
  width: 30px; height: 30px; display: inline-flex; align-items: center;
  justify-content: center; font-size: 1rem; flex-shrink: 0;
}
.mc-tr-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mc-tr-player { font-size: 0.80rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-tr-clubs { font-size: 0.62rem; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-tr-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.mc-tr-date { font-size: 0.60rem; color: var(--text-tertiary); }
.mc-tr-type {
  font-size: 0.58rem; font-weight: 700; text-transform: uppercase;
  padding: 1px 5px; border-radius: 3px;
  background: var(--brand-dim); color: var(--brand);
}

/* ════════════════════════════════════════════════════════════
   VENUE CARD (inside Pré-Jogo tab)
   ════════════════════════════════════════════════════════════ */
.mc-venue-card { padding-bottom: 12px; }
.mc-venue-img {
  width: 100%; max-height: 160px; object-fit: cover;
  border-radius: var(--radius-sm); margin-bottom: 10px;
}
.mc-venue-name {
  font-size: 1rem; font-weight: 800; color: var(--text-primary);
  margin-bottom: 8px;
}
.mc-venue-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.mc-venue-meta span {
  font-size: 0.72rem; color: var(--text-secondary);
  background: var(--bg-tertiary); border: 1px solid var(--border-subtle);
  border-radius: 4px; padding: 3px 8px;
}

/* ── Player Profile ─────────────────────────────────────── */
.mc-player-loading { display:flex; flex-direction:column; align-items:center; gap:12px; padding:48px 0; color:var(--text-muted,#888); }
.mc-player-profile { padding:0 0 24px; }
.mc-player-back { background:none; border:none; color:var(--accent,#4a90d9); font-size:.85rem; font-weight:600; cursor:pointer; padding:12px 16px; display:flex; align-items:center; gap:6px; }
.mc-player-back:hover { opacity:.7; }
.mc-player-hero { display:flex; gap:16px; padding:4px 16px 16px; align-items:flex-start; }
.mc-player-photo { width:80px; height:80px; border-radius:50%; object-fit:cover; background:#eee; flex-shrink:0; }
.mc-player-photo.fallback { display:flex; align-items:center; justify-content:center; font-size:2rem; background:var(--card-bg,#f5f5f5); }
.mc-player-info { flex:1; min-width:0; }
.mc-player-name { font-size:1.1rem; font-weight:700; margin:0 0 4px; }
.mc-player-team { display:flex; align-items:center; gap:6px; font-size:.8rem; color:var(--text-muted,#888); margin-bottom:8px; }
.mc-player-team-logo { width:16px; height:16px; object-fit:contain; }
.mc-player-meta { display:flex; flex-wrap:wrap; gap:6px; font-size:.75rem; color:var(--text-secondary,#666); }
.mc-player-meta span { background:var(--chip-bg,#f0f0f0); border-radius:20px; padding:2px 8px; }
.mc-player-league { font-size:.7rem; color:var(--accent,#4a90d9); margin-top:6px; font-weight:600; }
.mc-pst-section { padding:0 16px; }
.mc-pst-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(90px,1fr)); gap:8px; margin-top:10px; }
.mc-pst-item { background:var(--card-bg,#f8f8f8); border-radius:10px; padding:10px 8px; text-align:center; }
.mc-pst-val { display:block; font-size:1.3rem; font-weight:700; color:var(--accent,#4a90d9); }
.mc-pst-lbl { display:block; font-size:.65rem; color:var(--text-muted,#999); margin-top:2px; text-transform:uppercase; letter-spacing:.4px; }
.mc-lu-arrow { margin-left:auto; color:var(--text-muted,#aaa); font-size:1rem; }

/* ── Tabela sub-tabs ────────────────────────────────────── */
.mc-tb-subtabs { display:flex; gap:4px; padding:12px 12px 0; overflow-x:auto; scrollbar-width:none; }
.mc-tb-subtabs::-webkit-scrollbar { display:none; }
.mc-tb-stab { background:var(--chip-bg,#f0f0f0); border:none; border-radius:20px; padding:5px 12px; font-size:.75rem; font-weight:600; cursor:pointer; color:var(--text-secondary,#666); white-space:nowrap; transition:background .15s,color .15s; }
.mc-tb-stab.active { background:var(--accent,#4a90d9); color:#fff; }
#mc-tb-content { padding-top:4px; }

/* ── Top Scorers / Assists / Cards list ─────────────────── */
.mc-scorer-list { padding:8px 12px; display:flex; flex-direction:column; gap:8px; }
.mc-scorer-row { display:flex; align-items:center; gap:10px; background:var(--card-bg,#f8f8f8); border-radius:10px; padding:8px 10px; }
.mc-scorer-rank { font-size:.75rem; font-weight:700; color:var(--text-muted,#aaa); min-width:18px; text-align:center; }
.mc-scorer-player { display:flex; align-items:center; gap:8px; flex:1; min-width:0; }
.mc-scorer-photo { width:34px; height:34px; border-radius:50%; object-fit:cover; background:#ddd; flex-shrink:0; }
.mc-scorer-photo-fb { width:34px; height:34px; border-radius:50%; background:var(--chip-bg,#e8e8e8); display:flex; align-items:center; justify-content:center; font-size:1rem; flex-shrink:0; }
.mc-scorer-info { min-width:0; }
.mc-scorer-name { display:block; font-size:.82rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mc-scorer-team { display:flex; align-items:center; gap:4px; font-size:.68rem; color:var(--text-muted,#999); margin-top:1px; }
.mc-scorer-tlogo { width:12px; height:12px; object-fit:contain; }
.mc-scorer-stats { display:flex; gap:8px; align-items:center; flex-shrink:0; }
.mc-scorer-main { display:flex; flex-direction:column; align-items:center; }
.mc-scorer-main span, .mc-scorer-sec span { display:block; }
.mc-scorer-main { font-size:1.1rem; font-weight:700; color:var(--accent,#4a90d9); text-align:center; }
.mc-scorer-main small { font-size:.6rem; color:var(--text-muted,#999); font-weight:400; }
.mc-scorer-sec { font-size:.85rem; font-weight:600; color:var(--text-secondary,#777); text-align:center; }
.mc-scorer-sec small { font-size:.6rem; color:var(--text-muted,#999); font-weight:400; }

/* ── Odds section ───────────────────────────────────────── */
.mc-odds-market { margin-bottom:12px; }
.mc-odds-market-name { font-size:.75rem; font-weight:600; color:var(--text-secondary,#666); margin-bottom:6px; display:flex; justify-content:space-between; align-items:center; }
.mc-odds-bk { font-size:.65rem; color:var(--text-muted,#aaa); font-weight:400; }
.mc-odds-row { display:flex; gap:8px; }
.mc-odds-item { flex:1; background:var(--chip-bg,#f0f0f0); border-radius:10px; padding:8px 6px; text-align:center; }
.mc-odds-label { display:block; font-size:.65rem; color:var(--text-muted,#999); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:2px; }
.mc-odds-val { display:block; font-size:1rem; font-weight:700; color:var(--accent,#4a90d9); }

/* ── Coach trophies ─────────────────────────────────────── */
.mc-lu-coach-trophies { font-size:.7rem; color:#b8860b; font-weight:600; margin-top:3px; display:block; }

/* ── Aba BET — Bookmaker selector ───────────────────────── */
.modal-tab-bet { background:linear-gradient(135deg,#7c3aed,#4f46e5) !important; color:#fff !important; font-weight:700 !important; border-radius:8px !important; padding:5px 14px !important; }
.modal-tab-bet.active { box-shadow:0 0 0 2px #7c3aed !important; }

/* grid de bookmakers */
.bet-bookmaker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

/* card individual */
.bet-bk-card {
  position: relative;
  border: 2px solid var(--border-default, #232533);
  border-radius: 14px;
  padding: 14px 8px 10px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .12s;
  background: var(--bg-elevated, #1C1E28);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.bet-bk-card:hover {
  border-color: var(--brand, #9254F8);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(146,84,248,.15);
}
.bet-bk-card.selected {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,.22), 0 4px 20px rgba(124,58,237,.18);
  background: rgba(124,58,237,.1);
}

/* badge colorida da marca */
.bet-bk-badge {
  width: 52px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .03em;
  line-height: 1;
  flex-shrink: 0;
}

.bet-bk-name {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-primary, #E5E7EB);
  line-height: 1.2;
}

/* checkmark de selecionado */
.bet-bk-check {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: .65rem;
  font-weight: 900;
  color: #7c3aed;
  background: rgba(124,58,237,.18);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* linha de ID personalizado */
.bet-custom-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bet-custom-row label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary, #9CA3AF);
  white-space: nowrap;
}
.bet-custom-row input[type="number"] {
  width: 100px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-default, #232533);
  background: var(--bg-secondary, #111218);
  color: var(--text-primary, #E5E7EB);
  font-size: .85rem;
}
.bet-custom-row a {
  font-size: .78rem;
  color: #9254F8;
  text-decoration: none;
}
.bet-custom-row a:hover { text-decoration: underline; }
/* League IDs tab (Config) */
.league-id-add-row {
  display: grid;
  grid-template-columns: 140px 1fr 1fr auto;
  gap: 10px;
  margin-bottom: 12px;
}

.league-id-add-row .tag-input {
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(20,24,36,.92), rgba(16,20,30,.92));
  color: #eaf0ff;
  padding: 0 10px;
  font-size: 13px;
}

.league-id-add-row .tag-input::placeholder {
  color: rgba(200,210,235,.45);
}

.league-id-add-row .tag-input:focus {
  outline: none;
  border-color: rgba(152, 255, 0, .75);
  box-shadow: 0 0 0 3px rgba(152, 255, 0, .16);
  background: linear-gradient(180deg, rgba(22,28,40,.98), rgba(18,24,34,.98));
}

[data-theme="light"] .league-id-add-row .tag-input {
  border: 1px solid #d6dbe7;
  background: linear-gradient(180deg, #ffffff, #f8faff);
  color: #1f2937;
}

[data-theme="light"] .league-id-add-row .tag-input::placeholder {
  color: #8b95a7;
}

[data-theme="light"] .league-id-add-row .tag-input:focus {
  border-color: rgba(124, 58, 237, .65);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .14);
  background: #ffffff;
}

.league-id-table-wrap {
  border: 1px solid var(--line, rgba(255,255,255,.12));
  border-radius: 10px;
  overflow: hidden;
}

.league-id-table {
  width: 100%;
  border-collapse: collapse;
}

.league-id-table th,
.league-id-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line, rgba(255,255,255,.08));
  text-align: left;
}

.league-id-table thead th {
  font-size: 12px;
  opacity: .8;
  letter-spacing: .02em;
}

.league-id-table .empty-row {
  text-align: center;
  opacity: .7;
}

.league-id-table td .tag-input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(20,24,36,.92), rgba(16,20,30,.92));
  color: #eaf0ff;
  padding: 0 10px;
  font-size: 13px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.league-id-table td .tag-input::placeholder {
  color: rgba(200,210,235,.45);
}

.league-id-table td .tag-input:hover {
  border-color: rgba(152, 255, 0, .35);
}

.league-id-table td .tag-input:focus {
  outline: none;
  border-color: rgba(152, 255, 0, .75);
  box-shadow: 0 0 0 3px rgba(152, 255, 0, .16);
  background: linear-gradient(180deg, rgba(22,28,40,.98), rgba(18,24,34,.98));
}

.league-id-table td:first-child {
  font-weight: 700;
  color: #d6deff;
  letter-spacing: .02em;
}

.league-id-table th {
  color: rgba(223,231,255,.72);
}

.league-id-table tbody tr:hover {
  background: rgba(152, 255, 0, .04);
}

[data-theme="light"] .league-id-table td .tag-input {
  border: 1px solid #d6dbe7;
  background: linear-gradient(180deg, #ffffff, #f8faff);
  color: #1f2937;
}

[data-theme="light"] .league-id-table td .tag-input::placeholder {
  color: #8b95a7;
}

[data-theme="light"] .league-id-table td .tag-input:hover {
  border-color: #b8c1d3;
}

[data-theme="light"] .league-id-table td .tag-input:focus {
  border-color: rgba(124, 58, 237, .65);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .14);
  background: #ffffff;
}

[data-theme="light"] .league-id-table td:first-child {
  color: #6b7280;
}

[data-theme="light"] .league-id-table th {
  color: #6b7280;
}

[data-theme="light"] .league-id-table tbody tr:hover {
  background: rgba(124, 58, 237, .04);
}

.league-id-remove {
  border: 1px solid rgba(255,80,80,.45);
  color: #ff8b8b;
  background: transparent;
  border-radius: 8px;
  padding: 4px 10px;
  font-weight: 700;
  cursor: pointer;
}
