/* ===== ROOT VARIABLES ===== */
:root {
  --bg-base: #0d1117;
  --bg-surface: #161b22;
  --bg-card: #1c2333;
  --bg-hover: #242d3d;
  --border: #30363d;
  --border-light: #21262d;

  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;

  --gold: #f0b429;
  --gold-light: #fcd34d;
  --gold-dark: #d97706;

  --green: #3fb950;
  --green-dark: #238636;
  --red: #f85149;
  --red-dark: #da3633;
  --blue: #58a6ff;
  --purple: #a371f7;
  --orange: #fb8f44;

  --win: #3fb950;
  --loss: #f85149;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);

  /* Aliases for backward compatibility */
  --accent: var(--gold);
  --bg-soft: var(--bg-surface);
  --bg-muted: var(--bg-surface);
  --border-color: var(--border);
  --line: var(--border);
  --panel: var(--bg-card);
  --danger: var(--red);
}

/* ===== RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
}
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  cursor: pointer;
  font-family: inherit;
}
input,
select,
textarea {
  font-family: inherit;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 16px;
  color: var(--text-secondary);
}
.loading-logo {
  font-size: 48px;
  animation: bounce 1s infinite;
}
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.navbar-brand-btn {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.navbar-brand .emoji {
  font-size: 1.4rem;
}
.navbar-brand .brand-accent {
  color: var(--gold);
}
.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-username {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.nav-username strong {
  color: var(--text-primary);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  transition: all 0.15s ease;
  line-height: 1;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--gold);
  color: #0d1117;
}
.btn-primary:hover:not(:disabled) {
  background: var(--gold-light);
}
.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) {
  background: #2d3748;
  border-color: #4a5568;
}
.btn-success {
  background: var(--green-dark);
  color: #fff;
}
.btn-success:hover:not(:disabled) {
  background: var(--green);
}
.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red-dark);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(248, 81, 73, 0.1);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 6px 10px;
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
}
.btn-sm {
  padding: 5px 10px;
  font-size: 0.8rem;
}
.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
}
.btn-icon {
  padding: 6px;
  border-radius: var(--radius-sm);
}

/* ===== FORMS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.form-control {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.9rem;
  width: 100%;
  transition: border-color 0.15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.15);
}
.form-control::placeholder {
  color: var(--text-muted);
}
.input-group-password {
  position: relative;
  display: flex;
}
.input-group-password .form-control {
  padding-right: 40px;
}
.btn-password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1;
}
.btn-password-toggle:hover {
  color: var(--text-primary);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.form-error {
  font-size: 0.82rem;
  color: var(--red);
  margin-top: 4px;
}

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-base);
}
.auth-page-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  width: 100%;
  max-width: 980px;
  flex-wrap: wrap;
}
.landing-hero {
  flex: 1 1 420px;
  max-width: 520px;
  color: var(--text-primary);
}
.landing-hero-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.landing-hero-logo .trophy {
  font-size: 40px;
}
.landing-hero-logo h1 {
  font-size: 1.8rem;
  font-weight: 800;
}
.landing-hero-logo h1 span {
  color: var(--gold);
}
.landing-hero-tagline {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 12px;
}
.landing-hero-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}
.landing-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.landing-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.landing-feature-icon {
  font-size: 1.3rem;
  line-height: 1.4;
}
.landing-feature-list li strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.landing-feature-list li p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}
@media (max-width: 720px) {
  .auth-page-inner {
    gap: 24px;
  }
  .landing-hero {
    text-align: center;
  }
  .landing-hero-logo {
    justify-content: center;
  }
  .landing-feature-list li {
    text-align: left;
  }
}
.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
  flex: 0 1 420px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo .trophy {
  font-size: 52px;
  display: block;
  margin-bottom: 8px;
}
.auth-logo h1 {
  font-size: 1.5rem;
  font-weight: 800;
}
.auth-logo h1 span {
  color: var(--gold);
}
.auth-logo p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.auth-divider {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 16px;
}
.auth-divider a {
  color: var(--gold);
  font-weight: 600;
}
.auth-divider a:hover {
  color: var(--gold-light);
}

/* ===== DASHBOARD ===== */
.page-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title {
  font-size: 1.5rem;
  font-weight: 800;
}
.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 2px;
}

.league-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.league-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.league-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--orange));
}
.league-card:hover {
  border-color: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.league-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.league-card-meta {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.league-card-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.league-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 10px 0;
  min-height: 20px;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-gold {
  background: rgba(240, 180, 41, 0.15);
  color: var(--gold);
}
.badge-blue {
  background: rgba(88, 166, 255, 0.15);
  color: var(--blue);
}
.badge-purple {
  background: rgba(163, 113, 247, 0.15);
  color: var(--purple);
}
.badge-red {
  background: rgba(248, 81, 73, 0.15);
  color: var(--red);
}
/* CPU game classification badges */
.cpu-badge {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 0.65rem;
}
.cpu-badge-cvc {
  background: rgba(251, 143, 68, 0.12);
  color: var(--orange);
  border-color: rgba(251, 143, 68, 0.3);
}
.badge-orange {
  background: rgba(251, 143, 68, 0.15);
  color: var(--orange);
}

.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-secondary);
}
.empty-state .empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
}
.empty-state h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 0.9rem;
}
.empty-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

/* ===== LEAGUE PAGE ===== */
.league-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
}
.league-header-top {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.back-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}
.back-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}
.league-header-info {
  flex: 1;
}
.league-header-name {
  font-size: 1.4rem;
  font-weight: 800;
}
.league-header-meta {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  margin-top: 4px;
}

/* ===== ADVANCE WINDOW BANNER ===== */
.advance-window-banner {
  margin-top: 8px;
  padding: 6px 12px;
  background: rgba(240, 180, 41, 0.12);
  border: 1px solid rgba(240, 180, 41, 0.35);
  border-radius: var(--radius-sm);
  color: var(--gold-light);
  font-size: 0.82rem;
}
.advance-window-past {
  background: rgba(248, 81, 73, 0.12);
  border-color: rgba(248, 81, 73, 0.35);
  color: var(--red);
}

/* ===== PRIMARY NAV SECTIONS ===== */
.nav-sections-bar {
  background: var(--bg-base);
  border-bottom: 2px solid var(--border);
  padding: 0 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-sections-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 0;
}
.nav-section-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  padding: 14px 20px;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s;
  cursor: pointer;
}
.nav-section-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}
.nav-section-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  font-weight: 700;
}

/* ===== SUB-TABS ===== */
.tabs-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tabs-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
}
.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  padding: 10px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s;
  cursor: pointer;
}
.tab-btn:hover {
  color: var(--text-primary);
}
.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  font-weight: 600;
}
.tab-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px;
}

/* ===== TABLES ===== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
thead tr {
  background: var(--bg-surface);
}
th {
  padding: 12px 14px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover {
  background: var(--bg-hover);
}
.tbody-mine {
  background: rgba(240, 180, 41, 0.05);
}
tbody tr.tbody-mine:hover {
  background: rgba(240, 180, 41, 0.1);
}
.data-table th,
.data-table td {
  text-align: center;
}
.data-table th:first-child,
.data-table td:first-child {
  text-align: left;
}
.data-table .season-cell {
  display: block;
}

.rank-cell {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  width: 32px;
}
.team-cell {
  min-width: 140px;
}
.standings-link {
  font: inherit;
  color: inherit;
  line-height: inherit;
  vertical-align: baseline;
  text-align: left;
  min-height: 0;
  background: transparent;
  border: 0;
  padding: 0;
  display: inline;
  cursor: pointer;
}
.team-school .standings-link {
  color: var(--text-primary);
}
.team-user .standings-link {
  color: var(--text-secondary);
}
.team-school {
  font-weight: 700;
  color: var(--text-primary);
}
.team-user {
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.record-strong {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.win {
  color: var(--win);
}
.loss {
  color: var(--loss);
}
.neutral {
  color: var(--text-secondary);
}
.ranking-cell {
  font-weight: 700;
}
.ranking-top5 {
  color: var(--gold);
}
.ranking-top25 {
  color: var(--blue);
}

/* prestige stars */
.stars {
  color: var(--gold);
  letter-spacing: -1px;
  font-size: 0.85rem;
}
.stars .empty-star {
  color: var(--border);
}
.stars .star-half {
  background: linear-gradient(90deg, var(--gold) 50%, var(--border) 50%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* prestige picker widget */
.prestige-picker {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  user-select: none;
}
.ps-star {
  position: relative;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.ps-star.ps-full .ps-glyph {
  color: var(--gold);
}
.ps-star.ps-empty .ps-glyph {
  color: var(--border);
}
.ps-star.ps-half .ps-glyph {
  background: linear-gradient(90deg, var(--gold) 50%, var(--border) 50%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ps-glyph {
  pointer-events: none;
}
.ps-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
}
.ps-left {
  left: 0;
}
.ps-right {
  right: 0;
}
.ps-zero {
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-left: 6px;
}
.ps-zero:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}
.ps-display {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 6px;
}

/* bowl result pill */
.bowl-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}
.bowl-win {
  background: rgba(63, 185, 80, 0.15);
  color: var(--green);
}
.bowl-loss {
  background: rgba(248, 81, 73, 0.15);
  color: var(--red);
}
.bowl-none {
  color: var(--text-muted);
  font-style: italic;
}

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.section-title {
  font-size: 1.05rem;
  font-weight: 700;
}

/* ===== GAMES ===== */
.games-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.game-week {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  min-width: 60px;
}
.game-type-badge {
}
.game-teams {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}
.game-team {
  text-align: center;
  flex: 1;
}
.game-school {
  font-weight: 700;
  font-size: 0.9rem;
}
.game-user {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.game-score {
  font-size: 1.4rem;
  font-weight: 900;
  display: flex;
  gap: 8px;
  align-items: center;
  font-variant-numeric: tabular-nums;
  min-width: 80px;
  justify-content: center;
}
.score-win {
  color: var(--win);
}
.score-loss {
  color: var(--loss);
}
.score-sep {
  color: var(--text-muted);
  font-size: 1rem;
}
.game-actions {
  margin-left: auto;
}

/* ===== ACHIEVEMENTS ===== */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.achievement-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.achievement-icon {
  font-size: 2rem;
  flex-shrink: 0;
}
.achievement-body {
  flex: 1;
}
.achievement-type {
  font-weight: 700;
  font-size: 0.9rem;
}
.achievement-team {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.achievement-season {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.achievement-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}

/* ===== ACHIEVEMENTS OVERVIEW ===== */
.achievements-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.achievements-overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.achievements-overview-card:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.achievements-overview-icon {
  font-size: 2rem;
}
.achievements-overview-body {
  flex: 1;
}
.achievements-overview-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}
.achievements-overview-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.achievements-overview-action {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
}

/* ===== HISTORY ===== */
.season-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.season-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
}
.season-btn.active {
  background: var(--gold);
  color: #0d1117;
  border-color: var(--gold);
  font-weight: 700;
}
.season-btn:hover:not(.active) {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* ===== ALL-TIME STATS ===== */
.alltime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.stat-card-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.stat-card-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold);
  margin: 4px 0;
}
.stat-card-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ===== SETTINGS TAB ===== */
.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.settings-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.invite-code-display {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.invite-code-text {
  font-family: 'Courier New', monospace;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--gold);
  flex: 1;
}

/* ===== MODALS ===== */
#modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
}
#modal-root {
  position: fixed;
  inset: 0;
  z-index: 201;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 16px;
  pointer-events: none;
}
#modal-root:not(.hidden) {
  pointer-events: auto;
}
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow);
  animation: modal-in 0.2s ease;
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  line-height: 1;
}
.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
#modal-root:focus-visible,
.modal :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== TOASTS ===== */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 300;
  max-width: 360px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: toast-in 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.toast.success {
  border-left: 3px solid var(--green);
}
.toast.error {
  border-left: 3px solid var(--red);
}
.toast.info {
  border-left: 3px solid var(--blue);
}

/* ===== INLINE HELPERS ===== */
.hidden {
  display: none !important;
}
.flex {
  display: flex;
}
.gap-8 {
  gap: 8px;
}
.gap-12 {
  gap: 12px;
}
.gap-16 {
  gap: 16px;
}
.mt-4 {
  margin-top: 4px;
}
.mt-8 {
  margin-top: 8px;
}
.mt-16 {
  margin-top: 16px;
}
.mt-24 {
  margin-top: 24px;
}
.text-sm {
  font-size: 0.85rem;
}
.text-muted {
  color: var(--text-secondary);
}
.text-gold {
  color: var(--gold);
}
.text-center {
  text-align: center;
}
.fw-700 {
  font-weight: 700;
}
.danger-zone {
  background: rgba(248, 81, 73, 0.05);
  border: 1px solid rgba(248, 81, 73, 0.2);
  border-radius: var(--radius);
  padding: 20px;
}
.danger-zone h3 {
  color: var(--red);
  margin-bottom: 12px;
  font-size: 1rem;
}

/* ===== MEMBER LIST ===== */
.member-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.member-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: #0d1117;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.member-info {
  flex: 1;
}
.member-name {
  font-weight: 600;
  font-size: 0.9rem;
}
.member-school {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ===== SOCIAL LINKS ===== */
.social-icons {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  vertical-align: middle;
  margin-left: 4px;
}
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  transition:
    opacity 0.15s,
    transform 0.15s;
  opacity: 0.75;
  vertical-align: middle;
}
.social-icon:hover {
  opacity: 1;
  transform: scale(1.15);
}
.twitch-icon {
  color: #9146ff;
}
.youtube-icon {
  color: #ff0000;
}

.social-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.social-input-icon {
  position: absolute;
  left: 10px;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.social-input-wrap .social-input {
  padding-left: 34px;
}

.vod-link {
  color: var(--blue);
  font-weight: 600;
  border: 1px solid rgba(88, 166, 255, 0.3);
  border-radius: var(--radius-sm);
}
.vod-link:hover {
  background: rgba(88, 166, 255, 0.1);
  color: var(--blue);
}

/* ===== ELO TAB ===== */
.elo-rating {
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}
.elo-pos {
  color: var(--green);
  font-weight: 700;
}
.elo-neg {
  color: var(--red);
  font-weight: 700;
}

.elo-predictor-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.neutral-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--text-secondary);
}
.neutral-toggle input {
  cursor: pointer;
  accent-color: var(--gold);
}

/* prediction result */
.prediction-result {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  animation: modal-in 0.2s ease;
}
.pred-teams-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}
.pred-team-col {
  text-align: center;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}
.pred-team-col.pred-favored {
  border-color: var(--gold-dark);
  background: rgba(240, 180, 41, 0.06);
}
.pred-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.pred-favored .pred-badge {
  color: var(--gold);
}
.pred-school {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.pred-username {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.pred-elo-badge {
  display: inline-block;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}
.pred-vs-col {
  text-align: center;
}
.pred-vs-label {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.pred-elo-gap {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
}

/* probability bar */
.prob-bar-wrap {
  margin: 0 0 20px;
}
.prob-bar {
  height: 10px;
  background: rgba(248, 81, 73, 0.25);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
}
.prob-bar-home {
  height: 100%;
  background: var(--green);
  border-radius: 99px;
  transition: width 0.4s ease;
}
.prob-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
}

/* lines grid */
.pred-lines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.pred-line-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.pred-line-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.pred-line-value {
  font-size: 0.88rem;
  line-height: 1.6;
}

.pred-footnote {
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

/* ===== ADVANCE STATUS PANEL ===== */
.advance-status-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin: 0 0 16px 0;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.advance-status-panel.advance-status-warning {
  border-color: var(--orange);
  background: rgba(251, 143, 68, 0.08);
}
.advance-status-panel.advance-status-expired {
  border-color: var(--red);
  background: rgba(248, 81, 73, 0.08);
}
.advance-status-panel.advance-status-held {
  border-color: var(--orange);
  background: rgba(255, 165, 0, 0.1);
}
.advance-status-panel.advance-status-none {
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.advance-status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-bottom: 4px;
}
.advance-status-title {
  font-weight: 700;
  font-size: 0.95rem;
}
.advance-status-countdown {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.advance-status-warning .advance-status-countdown {
  color: var(--orange);
}
.advance-status-expired .advance-status-countdown {
  color: var(--red);
}
.advance-status-held .advance-status-countdown {
  color: var(--orange);
  font-weight: 700;
}
.advance-status-dates {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.advance-next {
  color: var(--text-secondary);
}
.advance-unplayed-section {
  margin-top: 8px;
}
.advance-unplayed-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.advance-unplayed-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.83rem;
}
.advance-unplayed-list li {
  padding: 2px 0;
}
.advance-unplayed-none {
  font-size: 0.83rem;
  color: var(--green);
  font-weight: 600;
}

/* ===== ADVANCE DAYS PICKER ===== */
.advance-days-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
}
.advance-day-label {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
  user-select: none;
}
.advance-day-label.selected {
  border-color: var(--gold);
  background: rgba(240, 180, 41, 0.1);
  color: var(--gold);
  font-weight: 600;
}
.advance-day-label input {
  cursor: pointer;
  accent-color: var(--gold);
}
.advance-window-table {
  width: 100%;
}

.advance-validator {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 0.85rem;
}
.advance-validator-ok {
  background: rgba(63, 185, 80, 0.12);
  border-color: rgba(63, 185, 80, 0.35);
  color: var(--green);
}
.advance-validator-error {
  background: rgba(248, 81, 73, 0.12);
  border-color: rgba(248, 81, 73, 0.35);
  color: var(--red);
}
.advance-calendar-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--bg-surface);
}
.advance-calendar-title {
  font-weight: 700;
  margin-bottom: 8px;
}
.advance-calendar-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.advance-cal-item {
  min-width: 150px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  background: var(--bg-card);
}
.advance-cal-item.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(240, 180, 41, 0.45);
  background: rgba(240, 180, 41, 0.12);
}
.advance-cal-week {
  font-weight: 700;
  font-size: 0.82rem;
}
.advance-cal-dates {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.advance-row-active {
  background: rgba(240, 180, 41, 0.08);
}

/* Week rules toggle labels */
.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.toggle-label input[type='checkbox'] {
  cursor: pointer;
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
}
.text-danger {
  color: var(--red);
}

/* ===== WEEK ADVANCE (Task 42) ===== */

.wa-timeline {
  display: flex;
  gap: 2px;
  padding: 12px 0;
  overflow-x: auto;
  margin-bottom: 8px;
}
.wa-tl-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  max-width: 72px;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.wa-tl-item:hover {
  background: var(--bg-hover);
}
.wa-tl-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--border);
  margin-bottom: 4px;
  border: 2px solid var(--border);
}
.wa-tl-done .wa-tl-dot {
  background: var(--green);
  border-color: var(--green-dark);
}
.wa-tl-active .wa-tl-dot {
  background: var(--gold);
  border-color: var(--gold-dark);
  animation: pulse 1.5s infinite;
}
.wa-tl-current .wa-tl-dot {
  background: var(--blue);
  border-color: var(--blue);
}
.wa-tl-upcoming .wa-tl-dot {
  background: var(--bg-surface);
  border-color: var(--border);
}
.wa-tl-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-tl-done .wa-tl-label {
  color: var(--green);
}
.wa-tl-active .wa-tl-label {
  color: var(--gold);
  font-weight: 600;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(240, 180, 41, 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(240, 180, 41, 0);
  }
}

.wa-stats-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.wa-stat {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  text-align: center;
  min-width: 80px;
}
.wa-stat-val {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}
.wa-stat-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.wa-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wa-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  transition: background 0.2s;
}
.wa-step-active {
  border-color: var(--gold);
  background: rgba(240, 180, 41, 0.05);
}
.wa-step-done {
  border-color: var(--green-dark);
  background: rgba(63, 185, 80, 0.05);
}
.wa-step-skip {
  opacity: 0.6;
}
.wa-step-icon {
  font-size: 1.1rem;
}
.wa-step-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
}

.wa-row-done {
  opacity: 0.6;
}

.btn-xs {
  padding: 2px 8px;
  font-size: 0.7rem;
  border-radius: 4px;
}

.badge-green {
  background: rgba(63, 185, 80, 0.15);
  color: var(--green);
  border: 1px solid rgba(63, 185, 80, 0.3);
}
.badge-yellow {
  background: rgba(240, 180, 41, 0.15);
  color: var(--gold);
  border: 1px solid rgba(240, 180, 41, 0.3);
}
.badge-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.csv-wizard-breadcrumb {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.csv-wizard-step-current {
  font-weight: bold;
  color: var(--primary, #3b82f6);
}
.csv-wizard-step-done {
  color: var(--text-muted);
}
.csv-wizard-step-upcoming {
  color: var(--text-muted);
  opacity: 0.7;
}
.csv-wizard-step-sep {
  color: var(--border);
}

.text-success {
  color: var(--green);
}
.text-warning {
  color: var(--gold);
}
.text-error {
  color: var(--red);
}

.form-error {
  color: var(--red);
  font-size: 0.8rem;
  margin-top: 4px;
}
.form-error.hidden {
  display: none;
}

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

.form-control-sm {
  padding: 4px 8px;
  font-size: 0.8rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .page-wrapper {
    padding: 20px 16px;
  }
  .league-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .auth-card {
    padding: 28px 20px;
  }
  .tab-content {
    padding: 20px 16px;
  }
  .game-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .achievements-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== HOME / WEEKLY DASHBOARD (Task 7) ===== */

.home-dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Active advance banner */
.home-advance-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(240, 180, 41, 0.12);
  border: 1px solid rgba(240, 180, 41, 0.35);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold-light);
  flex-wrap: wrap;
}

/* Dashboard alert banners (missing schedule, no games, etc.) */
.home-alert-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(88, 166, 255, 0.08);
  border: 1px solid rgba(88, 166, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.875rem;
  color: var(--blue);
  margin-bottom: 8px;
}

/* Top bar (title + week selector) */
.home-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.home-season-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.home-week-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-week-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.home-week-select {
  padding: 5px 10px;
  font-size: 0.82rem;
}

/* My Game card */
.my-game-card {
  background: var(--bg-card);
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius);
  padding: 16px 20px;
  position: relative;
  overflow: hidden;
}
.my-game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--orange));
}
.my-game-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold);
  margin-bottom: 10px;
}
.my-game-matchup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.my-game-team {
  flex: 1;
}
.my-game-team:last-child {
  text-align: right;
}
.my-game-school {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.my-game-user {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.my-game-score {
  font-size: 1.1rem;
  font-weight: 800;
  text-align: center;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.my-game-win {
  background: rgba(63, 185, 80, 0.15);
  color: var(--green);
}
.my-game-loss {
  background: rgba(248, 81, 73, 0.15);
  color: var(--red);
}
.my-game-upcoming {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

/* Widget row (countdown + games remaining) */
.home-widget-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.home-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.home-widget-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}
.home-widget-body {
  flex: 1;
  min-width: 0;
}
.home-widget-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.home-countdown-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-countdown-warning {
  color: var(--gold);
}
.home-countdown-expired {
  color: var(--red);
}
.home-widget-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main 2-column grid */
.home-main-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}
.home-main-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.home-side-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Generic section card */
.home-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}
.home-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
}
.home-empty {
  padding: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Home game rows */
.home-games-list {
  display: flex;
  flex-direction: column;
}
.home-game-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
}
.home-game-row:last-child {
  border-bottom: none;
}
.hgr-team {
  flex: 1;
  min-width: 0;
}
.hgr-away {
  text-align: right;
}
.hgr-school {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hgr-winner {
  color: var(--green);
}
.hgr-user {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hgr-score {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.hgr-win {
  color: var(--green);
}
.hgr-loss {
  color: var(--red);
}
.hgr-sep {
  color: var(--text-muted);
}
.hgr-upcoming {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  font-style: italic;
}

/* Top performers */
.top-performers-list {
  display: flex;
  flex-direction: column;
}
.top-perf-item {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
}
.top-perf-item:last-child {
  border-bottom: none;
}
.top-perf-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.top-perf-matchup {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  flex-wrap: wrap;
}
.top-perf-winner {
  font-weight: 700;
  color: var(--text-primary);
}
.top-perf-score {
  background: var(--bg-hover);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Mini standings */
.mini-standings {
  display: flex;
  flex-direction: column;
}
.mini-stand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
}
.mini-stand-row:last-child {
  border-bottom: none;
}
.mini-stand-mine {
  background: rgba(240, 180, 41, 0.07);
}
.mini-stand-rank {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.mini-stand-school {
  flex: 1;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-stand-record {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Home hub standings module */
.home-hub-standings .home-standings-conf {
  margin-bottom: 10px;
}
.home-hub-standings .home-standings-conf-label {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 4px 0;
  margin-bottom: 2px;
}
.home-hub-standings .home-standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.home-hub-standings .home-standings-table th {
  text-align: left;
  padding: 4px 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
}
.home-hub-standings .home-standings-table td {
  padding: 4px 8px;
  border-bottom: 1px solid var(--border-light);
}
.home-hub-standings .home-standings-table tr.mini-stand-mine {
  background: rgba(240, 180, 41, 0.07);
}

/* Home hub schedule module */
.home-schedule-overview {
  padding: 6px 0 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.home-schedule-progress {
  font-weight: 600;
}
.home-schedule-week-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.home-schedule-week-strip .week-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 22px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}
.home-schedule-week-strip .week-dot.done {
  background: var(--green-dark);
  color: #fff;
}
.home-schedule-week-strip .week-dot.current {
  background: var(--gold);
  color: #000;
}
.home-schedule-week-strip .week-dot.upcoming {
  background: var(--bg-hover);
  color: var(--text-muted);
}

/* Recent results ticker */
.home-ticker {
  display: flex;
  flex-direction: column;
}
.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.8rem;
}
.ticker-item:last-child {
  border-bottom: none;
}
.ticker-week {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-teams {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--text-secondary);
}
.ticker-winner {
  font-weight: 700;
  color: var(--text-primary);
}
.ticker-score {
  background: var(--bg-hover);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.78rem;
}

/* ===== RESPONSIVE — HOME DASHBOARD ===== */
@media (max-width: 860px) {
  .home-main-grid {
    grid-template-columns: 1fr;
  }
  .home-side-col {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
  }
}
@media (max-width: 600px) {
  .home-widget-row {
    grid-template-columns: 1fr;
  }
  .home-side-col {
    grid-template-columns: 1fr;
  }
  .my-game-matchup {
    gap: 8px;
  }
  .home-advance-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== CFP Projection Center (Task 32.5) ===== */
.cfp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 14px;
}
.cfp-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.cfp-card h4 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}
.cfp-card-span-2 {
  grid-column: span 2;
}
.cfp-card-subtitle {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  margin-bottom: 6px;
}

.cfp-bracket-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 10px;
}
.cfp-matchup,
.cfp-bye-path {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 8px;
}
.cfp-matchup-vs {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.74rem;
  margin: 2px 0 4px;
}

.cfp-team-chip {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px;
  margin-bottom: 6px;
}
.cfp-team-chip:last-child {
  margin-bottom: 0;
}
.cfp-team-logo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
}
.cfp-team-line {
  font-size: 0.78rem;
}
.cfp-team-line-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* CFP team chip badge row (bye / campus-host / AQ reason) */
.cfp-team-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.cfp-team-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
/* Bye badge — seeds 1-4 (text label conveys state) */
.cfp-team-badge--bye {
  background: rgba(88, 166, 255, 0.15);
  border: 1px solid rgba(88, 166, 255, 0.5);
  color: #58a6ff;
}
/* Campus-host badge — seeds 5-8 (text label conveys state) */
.cfp-team-badge--host {
  background: rgba(240, 180, 41, 0.15);
  border: 1px solid rgba(240, 180, 41, 0.5);
  color: #c09010;
}
/* AQ reason badges — P4 / G5 / Notre Dame auto-bid (CFB 27) */
.cfp-team-badge--aq-p4-champion {
  background: rgba(63, 185, 80, 0.12);
  border: 1px solid rgba(63, 185, 80, 0.4);
  color: #3fb950;
}
.cfp-team-badge--aq-g5-champion {
  background: rgba(251, 143, 68, 0.12);
  border: 1px solid rgba(251, 143, 68, 0.4);
  color: #e07030;
}
.cfp-team-badge--aq-notre-dame-top12 {
  background: rgba(188, 143, 60, 0.12);
  border: 1px solid rgba(188, 143, 60, 0.4);
  color: #a07830;
}

.cfp-lock-lock {
  border-color: rgba(63, 185, 80, 0.45);
  background: rgba(63, 185, 80, 0.08);
}
.cfp-lock-bubble {
  border-color: rgba(240, 180, 41, 0.45);
  background: rgba(240, 180, 41, 0.09);
}
.cfp-lock-out {
  border-color: rgba(248, 81, 73, 0.45);
  background: rgba(248, 81, 73, 0.09);
}

.cfp-path-list {
  margin-left: 16px;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.cfp-bubble-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 8px;
}
.cfp-bubble-note {
  border-left: 2px solid var(--border);
  padding-left: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.cfp-change-list {
  margin-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
}

.cfp-timeline {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.cfp-time-item {
  min-width: 180px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: var(--bg-card);
}
.cfp-time-item.active {
  border-color: var(--gold-dark);
  box-shadow: inset 0 0 0 1px rgba(240, 180, 41, 0.35);
}

.cfp-poll-disagree td {
  background: rgba(251, 143, 68, 0.12);
}

.cfp-resume-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.cfp-resume-team-card {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 8px;
  background: var(--bg-card);
}
.cfp-resume-team-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.cfp-resume-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 6px;
  margin-bottom: 6px;
}
.cfp-resume-grid div {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
}
.cfp-resume-grid strong {
  font-size: 0.84rem;
}
.cfp-resume-subline {
  font-size: 0.74rem;
  margin-top: 2px;
}

@media (max-width: 980px) {
  .cfp-grid,
  .cfp-bracket-grid {
    grid-template-columns: 1fr;
  }
  .cfp-card-span-2 {
    grid-column: span 1;
  }
  .cfp-resume-grid {
    grid-template-columns: repeat(2, minmax(90px, 1fr));
  }
}

/* ===== GAME EDIT SYSTEM (Task 43) ===== */

/* Impact level indicator strip on game cards that have been edited */
.game-card.game-edited {
  border-left: 3px solid #f59e0b;
}

/* Edit log table rows */
.edit-log-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  transition: background 0.15s;
}
.edit-log-row:hover {
  background: var(--bg-surface);
}
.edit-log-row.reverted {
  opacity: 0.6;
}

/* Diff preview table */
.diff-table {
  width: 100%;
  font-size: 0.83rem;
  border-collapse: collapse;
}
.diff-table th {
  text-align: left;
  padding: 4px 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}
.diff-table td {
  padding: 6px 8px;
  border-top: 1px solid var(--border);
}
.diff-table .diff-after-positive {
  color: #22c55e;
  font-weight: 600;
}
.diff-table .diff-after-negative {
  color: #ef4444;
  font-weight: 600;
}

/* Impact scope indicator */
.impact-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}
.impact-indicator.minor {
  background: #22c55e15;
  border: 1px solid #22c55e40;
}
.impact-indicator.moderate {
  background: #f59e0b15;
  border: 1px solid #f59e0b40;
}
.impact-indicator.major {
  background: #ef444415;
  border: 1px solid #ef444440;
}

/* Recalculation lock banner */
.recalc-lock-banner {
  background: #f59e0b15;
  border: 1px solid #f59e0b40;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #d97706;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

#slider-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.settings-subsection {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.settings-subsection h4 {
  margin-bottom: 10px;
}
.slider-row {
  margin-bottom: 8px;
}
.slider-row label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.slider-row input[type='range'] {
  width: 100%;
}

/* ===== DYNASTY SETTINGS HUB ===== */
.dynasty-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.dynasty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.dynasty-callouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.dynasty-callout {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--bg-surface);
}
.dynasty-callout-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gold);
}
.dynasty-rule-group {
  margin-bottom: 12px;
}
.dynasty-rule-group h4 {
  margin: 0 0 8px;
}
.dynasty-rule-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 8px;
  background: var(--bg-surface);
}
.dynasty-rule-enforced {
  border-left: 3px solid var(--red);
}
.dynasty-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dynasty-timeline-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--bg-surface);
}
.dynasty-timeline-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* Division management */
.division-dnd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}
.division-dropzone {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px;
  min-height: 90px;
  background: var(--bg-surface);
}
.division-team-chip {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 6px;
  font-size: 0.8rem;
  cursor: grab;
}

.onboarding-coach-list {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  display: grid;
  gap: 8px;
}

.onboarding-list-item {
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
}

.onboarding-school-card {
  display: grid;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: var(--bg-card);
}

.onboarding-school-card.is-taken {
  opacity: 0.7;
  background: var(--bg-surface);
}

.wizard-conf-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: var(--bg-card);
}
.wizard-dropzone {
  min-height: 48px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wizard-school-pill {
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  cursor: grab;
  user-select: none;
}
.wizard-conf-tabs-wrap {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.wizard-conf-tab {
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  border-radius: 999px;
  padding: 6px 10px;
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
  cursor: pointer;
}
.wizard-conf-tab.is-active {
  border-color: var(--accent);
  background: var(--bg-card);
}
.wizard-div-badge {
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
}
.wizard-subtabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.wizard-subtab-panel.is-hidden,
.wizard-division-config.is-hidden,
.wizard-champ-location.is-hidden {
  display: none;
}
.wizard-teams-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}
.wizard-teams-grid-divisions {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}
.wizard-column-title {
  font-weight: 700;
  margin-bottom: 6px;
}
.wizard-team-search {
  margin-bottom: 6px;
}
.wizard-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.ratings-inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}
.ratings-inline-form label {
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ratings-diff-improved {
  color: #1f9d55;
}
.ratings-diff-declined {
  color: #d64545;
}
.ratings-diff-unchanged {
  color: #8a8f98;
}

/* ===== USER AVAILABILITY MANAGER ===== */
.availability-grid-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  margin-top: 10px;
}
.availability-grid-head,
.availability-row {
  display: grid;
  grid-template-columns: 64px repeat(24, minmax(22px, 1fr));
  gap: 4px;
  align-items: center;
}
.availability-grid-head {
  margin-bottom: 6px;
}
.availability-col-head {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
}
.availability-col-head:first-child {
  grid-column-start: 2;
}
.availability-day-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.availability-cell {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 4px;
  padding: 0;
}
.availability-cell:hover {
  border-color: var(--blue);
}
.availability-cell.active {
  background: rgba(63, 185, 80, 0.8);
  border-color: rgba(63, 185, 80, 0.9);
}
.active-preset {
  border-color: var(--gold);
  color: var(--gold-light);
}
.mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.mini-cal-cell {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 4px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.mini-cal-cell.blocked {
  background: rgba(248, 81, 73, 0.22);
  border-color: rgba(248, 81, 73, 0.7);
  color: #ffd9d6;
}
.matchup-availability-card {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--bg-surface);
}
.matchup-best {
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.matchup-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.matchup-heatmap {
  display: grid;
  gap: 4px;
}
.matchup-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 6px;
  align-items: center;
}
.matchup-day {
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.matchup-cells {
  display: grid;
  grid-template-columns: repeat(24, minmax(10px, 1fr));
  gap: 2px;
}
.matchup-cell {
  display: inline-block;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.matchup-cell-mutual {
  background: rgba(34, 197, 94, 0.85);
}
.matchup-cell-single {
  background: rgba(250, 204, 21, 0.9);
}
.matchup-cell-none {
  background: rgba(239, 68, 68, 0.85);
}

/* ===== LEAGUE AVAILABILITY HUB ===== */
.league-cal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.cal-day {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  background: var(--bg-surface);
  cursor: pointer;
}
.cal-day:hover {
  border-color: var(--blue);
}
.cal-bar {
  margin-top: 6px;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-surface);
  overflow: hidden;
}
.cal-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #1f9d55, #5fd18b);
}
.season-cell {
  display: inline-block;
  min-width: 48px;
  text-align: center;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 0.75rem;
  background: color-mix(in srgb, #1f9d55 calc(var(--ratio) * 1%), #7f1d1d);
}

.all-american-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.all-american-card {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 10px;
}
.all-american-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: var(--bg-surface);
  color: var(--gold);
  border: 1px solid var(--border);
}
.all-american-name {
  font-weight: 700;
}
.all-american-ballot-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.career-progress-bar {
  height: 12px;
  background: var(--bg-surface);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.career-progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #22c55e);
}
.career-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.career-badge {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: var(--bg-card);
}
.career-badge.unlocked {
  border-color: #22c55e;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2);
}
.career-badge.locked {
  opacity: 0.72;
}

/* ===== COMPANION VIEW LAYOUT ===== */
body.companion-layout-active {
  background: var(--bg-base);
}

body.companion-layout-active .navbar,
body.companion-layout-active .league-header,
body.companion-layout-active .nav-sections-bar,
body.companion-layout-active .tabs-bar {
  display: none !important;
}

body.companion-layout-active #app {
  padding: 0;
  max-width: 100%;
}

.companion-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.companion-header {
  padding: 12px 16px;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

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

.companion-brand {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold);
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.companion-meta {
  display: flex;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.companion-league-name {
  font-weight: 600;
}

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

.companion-nav {
  margin-top: 8px;
}

.companion-main {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.companion-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Common cards */
.comp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.comp-card-header {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 4px;
}

/* Standings */
.companion-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.companion-table th,
.companion-table td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.companion-table th {
  color: var(--text-secondary);
  font-weight: 600;
}

.companion-team-school {
  font-weight: 700;
}

.companion-team-user {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Recruiting Board */
.recruit-cards-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recruit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}

.recruit-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-light);
}

.recruit-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.recruit-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.recruit-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.recruit-cost {
  font-weight: 700;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}

.recruit-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--border-light);
  gap: 8px;
}

.recruit-card-notes {
  background: var(--bg-surface);
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px dashed var(--border);
  width: 100%;
}

.recruit-signed {
  border-left: 3px solid var(--green);
}

.recruit-committed {
  border-left: 3px solid var(--gold);
}

/* Matchups */
.matchup-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.matchup-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.matchup-mine {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(240, 180, 41, 0.15);
}

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

.matchup-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.matchup-team-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  border-radius: 4px;
}

.matchup-team-row.team-mine {
  background: rgba(240, 180, 41, 0.05);
}

.matchup-team-info {
  display: flex;
  flex-direction: column;
}

.matchup-school {
  font-weight: 700;
  font-size: 0.85rem;
}

.matchup-coach {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.matchup-score {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.matchup-score.winner {
  color: var(--text-primary);
  font-weight: 800;
}

/* ===== NOTIFICATION BELL (Issue #619) ===== */
.notif-bell-btn {
  position: relative;
  font-size: 1rem;
  padding: 6px 8px;
}
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}
.notif-dropdown {
  position: fixed;
  width: 320px;
  max-height: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.notif-dropdown-title {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-primary);
}
.notif-mark-all-btn {
  font-size: 0.75rem;
  color: var(--blue);
  padding: 2px 6px;
}
.notif-list {
  overflow-y: auto;
  flex: 1;
}
.notif-empty {
  padding: 24px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.notif-error {
  padding: 20px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.notif-retry-btn {
  font-size: 0.8125rem;
}
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.12s;
  background: var(--bg-surface);
}
.notif-item:last-child {
  border-bottom: none;
}
.notif-item:hover,
.notif-item:focus {
  background: var(--bg-hover);
  outline: none;
}
.notif-item--read {
  background: var(--bg-card);
  opacity: 0.75;
}
.notif-item--read:hover,
.notif-item--read:focus {
  background: var(--bg-hover);
  opacity: 1;
}
.notif-item-body {
  flex: 1;
  min-width: 0;
}
.notif-item-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-item-message {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.notif-item-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.notif-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}

/* ===== TEAM DRAFT LOBBY ===== */
.draft-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fade-in 0.25s ease-out;
}
.draft-header-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.8));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.draft-status-badge {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}
.draft-status-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  animation: pulse-border 2s infinite;
}
.draft-status-badge.paused {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.draft-status-badge.completed {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.draft-timer-container {
  display: flex;
  align-items: center;
  gap: 12px;
}
.draft-timer-clock {
  font-size: 1.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}
.draft-timer-clock.warning {
  color: var(--red);
  animation: pulse-opacity 1s infinite alternate;
}
.draft-main-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
@media (max-width: 992px) {
  .draft-main-layout {
    grid-template-columns: 1fr;
  }
}
.draft-board {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.draft-board-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.draft-order-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 450px;
  overflow-y: auto;
}
.draft-order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}
.draft-order-item.active {
  border-color: var(--gold);
  background: rgba(240, 180, 41, 0.05);
  box-shadow: 0 0 10px rgba(240, 180, 41, 0.15);
  transform: translateX(4px);
}
.draft-order-item.completed {
  opacity: 0.65;
  background: var(--bg-card);
}
.draft-pick-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 24px;
}
.draft-pick-user {
  font-weight: 600;
  flex: 1;
}
.draft-pick-team {
  font-weight: 700;
  color: var(--gold);
}
.draft-pick-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 10px;
}
.pool-browser {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.pool-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.pool-search {
  flex: 1;
  min-width: 200px;
}
.pool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  max-height: 550px;
  overflow-y: auto;
  padding-right: 4px;
}
.team-draft-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.team-draft-card:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 180, 41, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.team-draft-card.drafted {
  opacity: 0.5;
  background: var(--bg-card);
}
.team-draft-name {
  font-size: 1rem;
  font-weight: 700;
}
.team-draft-conf {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.team-draft-stars {
  color: var(--gold);
  font-size: 0.85rem;
}
.commissioner-controls-panel {
  background: rgba(240, 180, 41, 0.03);
  border: 1px dashed rgba(240, 180, 41, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

@keyframes pulse-border {
  0% {
    border-color: rgba(16, 185, 129, 0.3);
  }
  50% {
    border-color: rgba(16, 185, 129, 0.8);
  }
  100% {
    border-color: rgba(16, 185, 129, 0.3);
  }
}
@keyframes pulse-opacity {
  0% {
    opacity: 0.6;
  }
  100% {
    opacity: 1;
  }
}
