@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,400;0,600;0,700;0,800;0,900;1,700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

:root {
  /* ── Paleta Copa 2026 ── */
  --navy-900: #04060f;
  --navy-800: #080c1c;
  --navy-700: #0e1530;
  --navy-600: #141e42;
  --navy-500: #1a2654;

  --purple-700: #3d0a6b;
  --purple-600: #5a12a0;
  --purple-500: #7b22d4;
  --purple-400: #9d4fe0;
  --purple-300: #bf89ec;
  --purple-100: #f3eaff;

  --gold-500: #f5c518;
  --gold-400: #ffd740;
  --gold-300: #ffe580;
  --gold-glow: rgba(245,197,24,.22);

  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;

  --red-mask:  #c0392b;
  --amber-500: #d97706;
  --blue-500:  #2563eb;
  --green-500: #16a34a;
  --green-600: #15803d;

  /* ── Superfícies — tema escuro com vidro ── */
  --surface-0:   #070a17;   /* fundo da página */
  --surface-1:   #0d1127;   /* cards primários */
  --surface-2:   #131829;   /* cards secundários, inputs */
  --surface-3:   #1a2035;   /* hover states */
  --surface-glass: rgba(13,17,39,0.85);

  /* ── Texto ── */
  --ink:       #f0f4ff;
  --ink-2:     #c8d0f0;
  --muted:     #7b87b8;
  --subtle:    #4a5480;

  /* ── Bordas ── */
  --border:       rgba(120,140,220,.10);
  --border-md:    rgba(120,140,220,.16);
  --border-strong:rgba(120,140,220,.25);
  --border-glow:  rgba(123,34,212,.45);

  /* ── Sombras ── */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.4);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.4);
  --shadow-md: 0 2px 8px rgba(0,0,0,.5), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 4px 16px rgba(0,0,0,.55), 0 16px 40px rgba(0,0,0,.4);
  --shadow-glow-purple: 0 0 24px rgba(123,34,212,.35), 0 0 48px rgba(123,34,212,.15);
  --shadow-glow-gold:   0 0 16px rgba(245,197,24,.30), 0 0 32px rgba(245,197,24,.12);

  /* ── Tipografia ── */
  --font-display: 'Barlow Condensed', 'DM Sans', sans-serif;  /* Display itálico/condensed — personalidade Copa */
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'DM Mono', 'SF Mono', ui-monospace, monospace;

  /* ── Raios de borda ── */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;
  --r-2xl: 24px;

  /* ── Acentos de estado ── */
  --open-accent:   var(--cyan-400);
  --locked-accent: var(--amber-500);
  --done-accent:   var(--muted);
}

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

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface-0);
  min-height: 100vh;
}

/* Background: campo de futebol noturno abstrato — linhas horizontais sutis */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(90,18,160,.18) 0%, transparent 70%),
    repeating-linear-gradient(
      0deg, transparent, transparent 88px,
      rgba(123,34,212,.04) 88px, rgba(123,34,212,.04) 89px
    ),
    repeating-linear-gradient(
      90deg, transparent, transparent 160px,
      rgba(123,34,212,.025) 160px, rgba(123,34,212,.025) 161px
    );
  pointer-events: none;
  z-index: 0;
}

/* Máscara teatral decorativa no fundo — leitmotiv 🎭 */
body::after {
  content: '🎭';
  position: fixed;
  right: -2rem;
  bottom: -3rem;
  font-size: 22rem;
  opacity: .022;
  pointer-events: none;
  z-index: 0;
  transform: rotate(-15deg);
  filter: grayscale(1);
}

main, nav { position: relative; z-index: 1; }

/* ───────────────────────────────────────────────────────────────
   NAVEGAÇÃO — bar escura estilo Copa 2026
─────────────────────────────────────────────────────────────── */
.navbar {
  background: rgba(4,6,15,.95) !important;
  backdrop-filter: saturate(200%) blur(24px);
  -webkit-backdrop-filter: saturate(200%) blur(24px);
  border-bottom: 1px solid rgba(123,34,212,.25);
  padding: .65rem 0;
  position: relative;
}

/* Linha de acento roxa embaixo do nav */
.navbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple-500) 30%, var(--gold-400) 50%, var(--purple-500) 70%, transparent);
  opacity: .6;
}

.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  font-style: italic;
  color: #fff !important;
  letter-spacing: .01em;
  display: flex;
  align-items: center;
  gap: .5rem;
  text-transform: uppercase;
}

.navbar-brand .brand-icon { font-size: 1.3rem; filter: drop-shadow(0 0 6px rgba(245,197,24,.5)); }

.navbar-brand .brand-sep {
  width: 1px;
  height: 1.1rem;
  background: rgba(123,34,212,.5);
  display: inline-block;
  margin: 0 .15rem;
  vertical-align: middle;
}

.navbar .nav-link {
  color: rgba(200,208,240,.7) !important;
  font-size: .85rem;
  font-weight: 600;
  padding: .4rem .8rem !important;
  border-radius: var(--r-sm);
  transition: background .15s, color .15s;
  letter-spacing: .01em;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: #fff !important;
  background: rgba(123,34,212,.2);
}

.navbar .nav-link.active-page {
  color: var(--gold-400) !important;
  background: rgba(123,34,212,.15);
}

.nav-form { margin: 0; }
.nav-button {
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 600;
  color: rgba(200,208,240,.7);
  background: transparent;
  border: none;
  padding: .4rem .8rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-button:hover { background: rgba(123,34,212,.2); color: #fff; }

/* ───────────────────────────────────────────────────────────────
   SHELL
─────────────────────────────────────────────────────────────── */
.app-shell { max-width: 1160px; }
main.container { padding-top: 2rem; padding-bottom: 4rem; }

/* ───────────────────────────────────────────────────────────────
   HERO — card de topo Copa 2026 style
─────────────────────────────────────────────────────────────── */
.cup-hero {
  background: linear-gradient(135deg, var(--navy-700) 0%, var(--purple-700) 55%, #1a0038 100%);
  border-radius: var(--r-2xl);
  padding: 2.25rem 2.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow-purple);
  border: 1px solid rgba(123,34,212,.35);
  margin-bottom: 1.5rem;
}

/* Bola de luz roxa decorativa */
.cup-hero::before {
  content: '';
  position: absolute;
  right: -5rem;
  top: -5rem;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123,34,212,.22) 0%, transparent 70%);
  pointer-events: none;
}

/* Máscara teatral decorativa no hero */
.cup-hero::after {
  content: '🎭';
  position: absolute;
  right: 1.5rem;
  bottom: -1rem;
  font-size: 7rem;
  opacity: .12;
  pointer-events: none;
  transform: rotate(8deg) scaleX(-1);
  filter: grayscale(.5);
  line-height: 1;
}

.cup-kicker {
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: .5rem;
  text-shadow: 0 0 12px var(--gold-glow);
}

.cup-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -.01em;
  line-height: 1.0;
  margin-bottom: .45rem;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 2px 20px rgba(123,34,212,.4);
}

.cup-hero p {
  color: rgba(200,208,240,.65);
  font-size: .9rem;
  margin: 0;
}

.cup-hero .btn-hero {
  background: rgba(123,34,212,.25);
  border: 1px solid rgba(123,34,212,.5);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  border-radius: var(--r-md);
  padding: .6rem 1.25rem;
  backdrop-filter: blur(8px);
  transition: background .15s, border-color .15s, box-shadow .15s;
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-style: italic;
}
.cup-hero .btn-hero:hover {
  background: rgba(123,34,212,.4);
  border-color: var(--purple-400);
  color: #fff;
  box-shadow: 0 0 16px rgba(123,34,212,.4);
}

/* ───────────────────────────────────────────────────────────────
   FILTROS
─────────────────────────────────────────────────────────────── */
.filters-bar {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.filter-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: .4rem;
  display: block;
}

.form-select {
  background-color: var(--surface-2);
  border: 1.5px solid var(--border-md);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink);
  padding: .6rem .9rem;
  height: 2.75rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%237b87b8' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: .8rem;
  padding-right: 2.25rem;
  transition: border-color .15s, box-shadow .15s;
  cursor: pointer;
}
.form-select:focus {
  outline: none;
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(123,34,212,.18);
}
.form-select option { background: var(--navy-700); color: var(--ink); }

.btn-filter-clear {
  background: var(--surface-2);
  border: 1.5px solid var(--border-md);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  height: 2.75rem;
  padding: 0 1rem;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn-filter-clear:hover {
  background: rgba(123,34,212,.12);
  border-color: var(--purple-500);
  color: var(--purple-300);
}

/* ───────────────────────────────────────────────────────────────
   MÉTRICAS
─────────────────────────────────────────────────────────────── */
.metrics-row { margin-bottom: 1.5rem; }

.metric {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.metric:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-md);
}

.metric-filter {
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.metric-filter:focus-visible {
  outline: 3px solid rgba(123,34,212,.3);
  outline-offset: 2px;
}

.metric-filter.active {
  border-color: rgba(123,34,212,.45);
  box-shadow: 0 0 0 3px rgba(123,34,212,.1), var(--shadow-sm);
}

.metric-value {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -.02em;
  color: var(--purple-400);
  line-height: 1;
}
.metric-value.gold {
  color: var(--gold-400);
  text-shadow: 0 0 12px var(--gold-glow);
}

.metric-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-top: .4rem;
}

/* ───────────────────────────────────────────────────────────────
   GAME CARDS
─────────────────────────────────────────────────────────────── */
.game-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
}
.game-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-md);
}

/* Linha de cor no topo — estado do jogo */
.game-card.is-open   { border-top: 3px solid var(--cyan-400); }
.game-card.is-locked { border-top: 3px solid var(--amber-500); }
.game-card.is-done   { border-top: 3px solid var(--muted); }

.card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }

/* Meta do card */
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.card-meta-left { display: flex; flex-direction: column; gap: .1rem; }
.card-num {
  font-size: .63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--subtle);
}
.card-datetime {
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-2);
}
.card-venue {
  font-size: .72rem;
  color: var(--muted);
  margin-top: .05rem;
}

/* Badge de estado */
.state-badge {
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  border-radius: 100px;
  padding: .28em .75em;
  white-space: nowrap;
}
.state-badge.open   { background: rgba(34,211,238,.12); color: var(--cyan-400); border: 1px solid rgba(34,211,238,.2); }
.state-badge.locked { background: rgba(217,119,6,.12);  color: var(--amber-500); border: 1px solid rgba(217,119,6,.2); }
.state-badge.done   { background: rgba(123,135,184,.1); color: var(--muted); border: 1px solid rgba(123,135,184,.15); }

/* ── MATCH BOARD ── */
.match-board {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: .9rem 1rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
  position: relative;
}

.match-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .35rem 0;
}

.team-identity {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
  flex: 1;
}

.team-flag {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.team-name {
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-divider { text-align: center; padding: .2rem 0; }

.vs-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-600), var(--purple-400));
  color: #fff;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .04em;
  box-shadow: 0 0 10px rgba(123,34,212,.4);
}

/* Placar oficial */
.official-score {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  min-width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-600), var(--purple-700));
  color: var(--gold-400);
  border-radius: var(--r-sm);
  flex-shrink: 0;
  border: 1px solid rgba(123,34,212,.3);
  box-shadow: 0 0 8px var(--gold-glow);
}

.official-tag {
  text-align: center;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--subtle);
  margin-top: .5rem;
}

/* ── PALPITE ATUAL ── */
.palpite-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(123,34,212,.1);
  border: 1px solid rgba(123,34,212,.2);
  border-radius: var(--r-md);
  padding: .5rem .85rem;
  margin-bottom: .85rem;
  font-size: .83rem;
  color: var(--purple-300);
  flex-shrink: 0;
}
.palpite-pill strong { font-weight: 700; color: var(--ink); }
.palpite-points {
  font-weight: 700;
  color: var(--gold-400);
  font-family: var(--font-mono);
  font-size: .9rem;
  text-shadow: 0 0 8px var(--gold-glow);
}

/* ── FORMULÁRIO DE PALPITE ── */
.palpite-form { margin-top: auto; }

.score-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: .6rem;
  align-items: end;
  margin-bottom: .65rem;
}

.score-col { display: flex; flex-direction: column; gap: .35rem; }

.score-team-label {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.score-team-label .tf { font-size: 1rem; }

.score-input {
  width: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface-2);
  border: 1.5px solid var(--border-md);
  border-radius: var(--r-md);
  padding: .55rem .25rem;
  height: 3.25rem;
  transition: border-color .15s, box-shadow .15s, background .15s;
  -moz-appearance: textfield;
}
.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.score-input:focus {
  outline: none;
  border-color: var(--purple-500);
  background: var(--surface-3);
  box-shadow: 0 0 0 3px rgba(123,34,212,.18);
}

.score-input:disabled {
  background: var(--surface-2);
  color: var(--subtle);
  cursor: not-allowed;
  opacity: .6;
}

.score-x {
  font-size: .8rem;
  font-weight: 700;
  color: var(--subtle);
  padding-bottom: .85rem;
  text-align: center;
}

.draft-restored {
  border-color: var(--cyan-400) !important;
  box-shadow: 0 0 0 3px rgba(34,211,238,.18) !important;
}

/* Botão primário */
.btn-submit {
  width: 100%;
  border: none;
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .75rem 1rem;
  cursor: pointer;
  transition: all .15s;
}

.btn-submit.active {
  background: linear-gradient(135deg, var(--purple-600), var(--purple-500));
  color: #fff;
  box-shadow: 0 2px 12px rgba(123,34,212,.45);
}
.btn-submit.active:hover {
  background: linear-gradient(135deg, var(--purple-700), var(--purple-600));
  box-shadow: 0 4px 20px rgba(123,34,212,.55);
  transform: translateY(-1px);
}

.btn-submit.inactive {
  background: var(--surface-2);
  color: var(--subtle);
  cursor: not-allowed;
}

/* ───────────────────────────────────────────────────────────────
   RANKING
─────────────────────────────────────────────────────────────── */
.podium-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 600px) { .podium-grid { grid-template-columns: 1fr; } }

.podium-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.podium-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.podium-card.rank-1 {
  border-top: 3px solid var(--gold-400);
  box-shadow: var(--shadow-sm), 0 0 20px var(--gold-glow);
}
.podium-card.rank-2 { border-top: 3px solid #8899cc; }
.podium-card.rank-3 { border-top: 3px solid #b87851; }

/* Máscara teatral mini no podium */
.podium-card.rank-1::after {
  content: '🎭';
  position: absolute;
  right: -.5rem;
  bottom: -.5rem;
  font-size: 3.5rem;
  opacity: .07;
  pointer-events: none;
  transform: rotate(12deg);
  filter: grayscale(1);
}

.rank-medal {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  font-weight: 800;
  font-family: var(--font-display);
  flex-shrink: 0;
  background: var(--surface-2);
  color: var(--muted);
}
.rank-medal.rank-1 {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: #2a1500;
  box-shadow: 0 0 12px var(--gold-glow);
}
.rank-medal.rank-2 { background: linear-gradient(135deg, #c8d4e8, #9aaac0); color: #1a2240; }
.rank-medal.rank-3 { background: linear-gradient(135deg, #d4956a, #b8693a); color: #fff; }

.podium-info { min-width: 0; }
.podium-name {
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: -.01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.podium-pts { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.podium-pts strong {
  color: var(--gold-400);
  font-family: var(--font-mono);
}

/* Tabela de ranking */
.ranking-table-wrap {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

.ranking-table thead th {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  padding: .85rem 1.25rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.ranking-table tbody td {
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.ranking-table tbody tr:last-child td { border-bottom: none; }

.ranking-table tbody tr:hover { background: rgba(123,34,212,.04); }
.ranking-table .my-row {
  background: rgba(123,34,212,.08);
  border-left: 3px solid var(--purple-500);
}

.pts-display {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold-400);
}

.you-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(123,34,212,.15);
  color: var(--purple-300);
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-radius: 100px;
  padding: .15em .6em;
  margin-left: .4rem;
  vertical-align: middle;
  border: 1px solid rgba(123,34,212,.25);
}

/* Legenda */
.score-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  margin-top: 1rem;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: var(--muted);
}
.legend-pts {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--gold-400);
  font-size: .85rem;
}

/* ───────────────────────────────────────────────────────────────
   AUTH CARDS
─────────────────────────────────────────────────────────────── */
.auth-card {
  background: var(--surface-1);
  border: 1px solid var(--border-md);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-lg), var(--shadow-glow-purple);
  overflow: hidden;
}

.auth-header {
  background: linear-gradient(140deg, var(--navy-700) 0%, var(--purple-700) 100%);
  padding: 2.25rem 2rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Máscara decorativa no auth header */
.auth-header::before {
  content: '🎭';
  position: absolute;
  left: -1.5rem;
  bottom: -1.5rem;
  font-size: 8rem;
  opacity: .08;
  pointer-events: none;
  transform: rotate(-20deg);
  filter: grayscale(1);
}
.auth-header::after {
  content: '🎭';
  position: absolute;
  right: -1.5rem;
  top: -1.5rem;
  font-size: 8rem;
  opacity: .08;
  pointer-events: none;
  transform: rotate(20deg) scaleX(-1);
  filter: grayscale(1);
}

.auth-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
  position: relative;
  z-index: 1;
}
.auth-header p {
  font-size: .88rem;
  color: rgba(200,208,240,.6);
  margin: .45rem 0 0;
  position: relative;
  z-index: 1;
}

.auth-body { padding: 1.75rem 2rem; }

/* ───────────────────────────────────────────────────────────────
   FORM CONTROLS
─────────────────────────────────────────────────────────────── */
.field-group { margin-bottom: 1rem; }

.form-label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  margin-bottom: .4rem;
}

.form-control {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--border-md);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: .9rem;
  color: var(--ink);
  padding: .7rem 1rem;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-control:focus {
  outline: none;
  background: var(--surface-3);
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(123,34,212,.18);
}
.form-control::placeholder { color: var(--subtle); }

.btn-primary-full {
  width: 100%;
  background: linear-gradient(135deg, var(--purple-600), var(--purple-500));
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .85rem 1rem;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(123,34,212,.45);
  transition: all .15s;
}
.btn-primary-full:hover {
  background: linear-gradient(135deg, var(--purple-700), var(--purple-600));
  box-shadow: 0 4px 20px rgba(123,34,212,.55);
  transform: translateY(-1px);
}

.auth-footer { text-align: center; margin-top: 1.25rem; font-size: .85rem; color: var(--muted); }
.auth-footer a { color: var(--purple-300); font-weight: 600; text-decoration: none; }
.auth-footer a:hover { color: var(--purple-400); text-decoration: underline; }

.auth-rules-link {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: .72rem;
  font-weight: 800;
  gap: .4rem;
  justify-content: center;
  margin-top: .75rem;
  text-decoration: none;
}

.auth-rules-link span {
  align-items: center;
  border: 1px solid var(--border-md);
  border-radius: 50%;
  display: inline-flex;
  font-family: var(--font-mono);
  height: 1.2rem;
  justify-content: center;
  width: 1.2rem;
}

.auth-rules-link:hover,
.auth-rules-link:focus-visible {
  color: var(--wc26-gold-2);
}

.auth-divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* ───────────────────────────────────────────────────────────────
   ADMIN
─────────────────────────────────────────────────────────────── */
.admin-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-top: 3px solid var(--cyan-400);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.admin-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-save-result {
  width: 100%;
  background: linear-gradient(135deg, var(--navy-600), var(--purple-700));
  color: #fff;
  border: 1px solid rgba(123,34,212,.3);
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .75rem 1rem;
  cursor: pointer;
  transition: all .15s;
  margin-top: .25rem;
}
.btn-save-result:hover {
  background: linear-gradient(135deg, var(--purple-700), var(--purple-600));
  box-shadow: 0 0 16px rgba(123,34,212,.4);
}

/* ───────────────────────────────────────────────────────────────
   ALERTS
─────────────────────────────────────────────────────────────── */
.alert {
  border-radius: var(--r-lg);
  border: 1px solid transparent;
  font-size: .88rem;
  font-weight: 500;
  padding: .85rem 1.1rem;
}
.alert-success { background: rgba(22,163,74,.1);  border-color: rgba(22,163,74,.2);  color: #4ade80; }
.alert-warning { background: rgba(217,119,6,.1);  border-color: rgba(217,119,6,.2);  color: var(--amber-500); }
.alert-danger  { background: rgba(192,57,43,.1);  border-color: rgba(192,57,43,.2);  color: #f87171; }
.alert-info    { background: rgba(123,34,212,.1); border-color: rgba(123,34,212,.2); color: var(--purple-300); }

/* ───────────────────────────────────────────────────────────────
   SIMULADOR
─────────────────────────────────────────────────────────────── */
.sim-toolbar {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.sim-panel {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.sim-group-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
  min-width: 0;
}

.sim-group-card h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -.01em;
  color: var(--purple-400);
  margin: 0;
}

.sim-team-list { display: grid; gap: .4rem; }

.sim-team-list > span {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: .85rem;
  font-weight: 600;
  padding: .45rem .75rem;
  display: flex;
  align-items: center;
  gap: .45rem;
  color: var(--ink-2);
}

.sim-fixtures {
  list-style: none;
  border-top: 1px solid var(--border);
  padding-top: .75rem;
  margin-bottom: 0;
}

.sim-fixtures li {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .4rem 0;
  border-bottom: 1px solid var(--border);
}
.sim-fixtures li:last-child { border-bottom: none; }

.sim-fixtures > li > span { font-weight: 600; font-size: .83rem; color: var(--ink-2); }
.sim-fixtures small { color: var(--muted); font-size: .72rem; }

.sim-select {
  background: var(--surface-2);
  border: 1.5px solid var(--border-md);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: .83rem;
  font-weight: 600;
  color: var(--ink);
  padding: .5rem .65rem;
  height: 2.6rem;
  cursor: pointer;
  width: 100%;
}
.sim-select:focus {
  outline: none;
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(123,34,212,.18);
}
.sim-select option { background: var(--navy-700); }

.sim-thirds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .65rem;
}

.sim-third-option {
  align-items: center;
  background: var(--surface-2);
  border: 1.5px solid var(--border-md);
  border-radius: var(--r-md);
  cursor: pointer;
  display: grid;
  gap: .2rem .5rem;
  grid-template-columns: auto 1fr;
  padding: .75rem;
  transition: border-color .15s, background .15s;
  color: var(--ink-2);
}
.sim-third-option strong { grid-column: 2; font-size: .82rem; }
.sim-third-option.is-selected {
  background: rgba(245,197,24,.08);
  border-color: var(--gold-400);
  box-shadow: 0 0 8px var(--gold-glow);
}

.sim-summary { display: grid; gap: .65rem; }
.sim-summary span,
.sim-champion {
  background: var(--surface-2);
  border-radius: var(--r-md);
  color: var(--purple-300);
  font-weight: 700;
  font-size: .88rem;
  padding: .7rem .9rem;
  border: 1px solid var(--border);
}

.sim-champion { font-size: .95rem; }

/* Botões de ação */
.btn-action {
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 600;
  border-radius: var(--r-md);
  padding: .6rem 1.1rem;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s;
}
.btn-action:hover {
  background: rgba(123,34,212,.12);
  border-color: var(--purple-500);
  color: var(--purple-300);
}

.btn-action-primary {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-radius: var(--r-md);
  padding: .65rem 1.35rem;
  border: none;
  background: linear-gradient(135deg, var(--purple-600), var(--purple-500));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(123,34,212,.4);
  transition: all .15s;
}
.btn-action-primary:hover {
  background: linear-gradient(135deg, var(--purple-700), var(--purple-600));
  box-shadow: 0 4px 20px rgba(123,34,212,.5);
  transform: translateY(-1px);
}

/* ───────────────────────────────────────────────────────────────
   EMPTY STATE
─────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--muted);
  font-size: .9rem;
}
.empty-state code {
  font-family: var(--font-mono);
  background: var(--surface-2);
  color: var(--purple-300);
  padding: .2em .5em;
  border-radius: 4px;
  font-size: .85em;
  border: 1px solid var(--border);
}

/* ───────────────────────────────────────────────────────────────
   UTILITIES
─────────────────────────────────────────────────────────────── */
.section-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: var(--ink);
}
.section-sub {
  font-size: .85rem;
  color: var(--muted);
  margin-top: .15rem;
}

#sem-jogos-filtrados { border-radius: var(--r-lg); }

/* ── Bandeiras ── */
.flag-img {
  aspect-ratio: 4 / 3;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.3);
  display: inline-block;
  flex-shrink: 0;
  height: auto;
  max-width: 1.45em;
  object-fit: cover;
  vertical-align: -.18em;
  width: 1.35em;
}

.flag-fallback {
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  border: 1px solid var(--border-md);
  height: .95em;
}

.score-team-label .flag-img,
.form-label .flag-img {
  max-width: 1.1em;
  width: 1.05em;
}

.sim-flag { max-width: 1.25em; width: 1.15em; }

.team-flag, .tf {
  align-items: center;
  display: inline-flex;
  line-height: 1;
}

.team-inline {
  align-items: center;
  display: inline-flex;
  gap: .4rem;
  min-width: 0;
  vertical-align: middle;
}

.team-inline > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Cards compactos no painel ── */
.jogo-card-wrapper .game-card { border-radius: var(--r-lg); }
.jogo-card-wrapper .game-card:hover { transform: translateY(-2px); }
.jogo-card-wrapper .card-body { padding: .9rem; }
.jogo-card-wrapper .card-meta { align-items: flex-start; gap: .6rem; margin-bottom: .65rem; }
.jogo-card-wrapper .card-venue { display: none; }
.jogo-card-wrapper .match-board { border-radius: var(--r-md); margin-bottom: .7rem; padding: .55rem .7rem; }
.jogo-card-wrapper .match-team { padding: .18rem 0; }
.jogo-card-wrapper .team-name { font-size: .86rem; }
.jogo-card-wrapper .team-identity { gap: .45rem; }
.jogo-card-wrapper .vs-chip { font-size: .56rem; height: 1.35rem; width: 1.35rem; }
.jogo-card-wrapper .match-divider { padding: .05rem 0; }
.jogo-card-wrapper .official-score { font-size: .95rem; height: 1.65rem; min-width: 1.65rem; }
.jogo-card-wrapper .official-tag { font-size: .6rem; margin-top: .3rem; }
.jogo-card-wrapper .palpite-pill { margin-bottom: .65rem; padding: .4rem .65rem; }
.jogo-card-wrapper .score-row { gap: .45rem; margin-bottom: .5rem; }
.jogo-card-wrapper .score-team-label { font-size: .64rem; letter-spacing: .04em; }
.jogo-card-wrapper .score-input { font-size: 1.22rem; height: 2.55rem; padding: .35rem .2rem; }
.jogo-card-wrapper .score-x { padding-bottom: .62rem; }
.jogo-card-wrapper .btn-submit { font-size: .82rem; padding: .6rem .85rem; }

/* ── Simulador grupo head ── */
.sim-group-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: space-between;
  margin-bottom: .9rem;
  min-width: 0;
}

.sim-group-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  max-width: 100%;
}

.sim-progress {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  min-width: 2.45rem;
  padding: .28rem .55rem;
}

.sim-progress.is-complete {
  background: rgba(123,34,212,.12);
  border-color: rgba(123,34,212,.3);
  color: var(--purple-300);
}

.sim-team-rank-list { display: grid; gap: .5rem; }

.sim-team-row {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: grid;
  gap: .6rem;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
  padding: .52rem .55rem .52rem .7rem;
  transition: background .15s, border-color .15s, box-shadow .15s;
  color: var(--ink-2);
}

.sim-team-row.has-rank {
  background: rgba(123,34,212,.08);
  border-color: rgba(123,34,212,.25);
}

.sim-team-main { align-items: center; display: flex; gap: .45rem; min-width: 0; }
.sim-team-main .team-inline { flex: 1; font-size: .86rem; font-weight: 700; }

.sim-current-rank {
  align-items: center;
  background: linear-gradient(135deg, var(--purple-600), var(--purple-500));
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex-shrink: 0;
  font-size: .66rem;
  font-weight: 800;
  height: 1.35rem;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0 .35rem;
}

.sim-rank-actions { display: flex; flex-shrink: 0; gap: .28rem; max-width: 100%; }

.sim-rank-button {
  align-items: center;
  background: var(--surface-3);
  border: 1.5px solid var(--border-md);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: .68rem;
  font-weight: 800;
  height: 1.85rem;
  justify-content: center;
  padding: 0;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
  width: 1.85rem;
}
.sim-rank-button:hover {
  border-color: var(--purple-500);
  color: var(--purple-300);
  transform: translateY(-1px);
}
.sim-rank-button.is-occupied { opacity: .45; }
.sim-rank-button.is-selected {
  background: linear-gradient(135deg, var(--purple-600), var(--purple-500));
  border-color: var(--purple-500);
  color: #fff;
  opacity: 1;
}

.sim-fixtures-wrap {
  border-top: 1px solid var(--border);
  margin-top: .85rem;
  padding-top: .65rem;
}
.sim-fixtures-wrap summary {
  color: var(--muted);
  cursor: pointer;
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
}
.sim-fixtures { border-top: none; margin-top: .45rem; padding-top: 0; }

.sim-third-option.is-disabled { cursor: not-allowed; opacity: .55; }
.sim-third-option strong .team-inline { max-width: 100%; }

.sim-empty-bracket {
  background: var(--surface-2);
  border: 1px dashed var(--border-md);
  border-radius: var(--r-md);
  color: var(--muted);
  font-size: .88rem;
  font-weight: 600;
  padding: 1rem;
}

.sim-team-pick {
  min-height: 3.15rem;
  position: relative;
}

.sim-team-pick.is-winner {
  background: rgba(123,34,212,.12);
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(123,34,212,.1);
}

.sim-team-pick.is-eliminated { opacity: .4; }
.sim-team-pick.is-winner span { color: var(--purple-300); }

.pick-check {
  align-items: center;
  background: linear-gradient(135deg, var(--purple-600), var(--purple-500));
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: .75rem;
  height: 1.35rem;
  justify-content: center;
  position: absolute;
  right: .55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.35rem;
}

.sim-champion .team-inline { color: var(--gold-400); font-weight: 800; }

@media (max-width: 575.98px) {
  .sim-team-row { grid-template-columns: 1fr; }
  .sim-rank-actions { justify-content: space-between; }
  .sim-rank-button { flex: 1; width: auto; }
}

/* ── Chave mata-mata ── */
.sim-knockout-panel { padding: .85rem; }
.sim-knockout-panel > .d-flex { margin-bottom: .7rem !important; }

.sim-bracket {
  align-items: stretch;
  display: grid;
  gap: .55rem;
  grid-template-columns: minmax(455px, 1fr) minmax(120px, .28fr) minmax(455px, 1fr);
  overflow-x: auto;
  padding-bottom: .25rem;
}

.sim-side {
  align-items: stretch;
  display: grid;
  gap: .42rem;
  grid-template-columns: repeat(4, minmax(104px, 1fr));
  min-width: 455px;
}

.sim-final-column {
  align-items: stretch;
  display: flex;
  min-width: 120px;
}

.sim-round { display: flex; flex-direction: column; min-width: 0; }
.sim-round h3 {
  color: var(--muted);
  font-size: .65rem;
  letter-spacing: .1em;
  margin-bottom: .35rem;
  min-height: 1rem;
  text-align: center;
  text-transform: uppercase;
}

.sim-round-matches {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-around;
  min-height: 0;
}

.sim-knockout-match {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  display: grid;
  gap: .22rem;
  margin: .17rem 0;
  padding: .28rem;
}

.sim-match-num {
  align-items: center;
  display: flex;
  gap: .25rem;
  justify-content: space-between;
  min-height: 1rem;
}
.sim-match-num span {
  color: var(--gold-400);
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 800;
}
.sim-match-num small {
  color: var(--subtle);
  display: block;
  font-size: .53rem;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sim-team-pick {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  min-height: 2.05rem;
  padding: .25rem .38rem;
  text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.sim-team-pick:not(:disabled):hover {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(123,34,212,.12);
}
.sim-team-pick span { font-size: .72rem; font-weight: 700; line-height: 1.12; }
.sim-team-pick small { font-size: .58rem; line-height: 1.1; color: var(--muted); }
.sim-team-pick .team-inline { gap: .34rem; }
.sim-team-pick .sim-flag { max-width: 1.45em; width: 1.4em !important; }
.sim-team-pick .team-compact > span:last-child {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.pick-check { font-size: .62rem; height: 1.05rem; right: .35rem; width: 1.05rem; }

.sim-round-final .sim-knockout-match {
  background: rgba(245,197,24,.08);
  border-color: rgba(245,197,24,.3);
  box-shadow: 0 0 12px var(--gold-glow);
}
.sim-round-final { flex: 1; width: 100%; }
.sim-empty-bracket { grid-column: 1 / -1; }

@media (max-width: 1199.98px) {
  .sim-bracket {
    grid-template-columns: minmax(430px, 1fr) minmax(115px, .28fr) minmax(430px, 1fr);
  }
  .sim-side { min-width: 430px; }
}

/* ───────────────────────────────────────────────────────────────
   MOBILE — ajustes críticos para telas pequenas
─────────────────────────────────────────────────────────────── */
@media (max-width: 575.98px) {
  body::after { font-size: 12rem; right: -1rem; bottom: -2rem; }

  main.container { padding-top: 1.25rem; padding-bottom: 3rem; }

  .cup-hero {
    padding: 1.5rem 1.25rem;
    border-radius: var(--r-xl);
  }
  .cup-hero::after { font-size: 4.5rem; right: .75rem; }
  .cup-hero h1 { font-size: 2rem; }

  .metric-value { font-size: 1.85rem; }

  .auth-header { padding: 1.75rem 1.25rem 1.5rem; }
  .auth-header::before, .auth-header::after { font-size: 5.5rem; }
  .auth-body { padding: 1.25rem 1.25rem; }

  .podium-grid { grid-template-columns: 1fr; gap: .75rem; }

  .ranking-table thead th,
  .ranking-table tbody td { padding: .75rem .85rem; }

  .score-input { height: 3rem; font-size: 1.35rem; }

  .filters-bar { padding: .85rem 1rem; }

  .sim-panel, .sim-toolbar { padding: 1rem 1rem; }
  .sim-group-card { padding: 1rem; }
}

@media (max-width: 400px) {
  .cup-hero { padding: 1.25rem 1rem; }
  .auth-card { border-radius: var(--r-xl); }
  .card-body { padding: .85rem; }
}

/* ───────────────────────────────────────────────────────────────
   REDUCED MOTION
─────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ───────────────────────────────────────────────────────────────
   SCROLLBAR — tema escuro
─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--surface-0); }
::-webkit-scrollbar-thumb {
  background: var(--navy-500);
  border-radius: 4px;
  border: 2px solid var(--surface-0);
}
::-webkit-scrollbar-thumb:hover { background: var(--purple-700); }

/* ───────────────────────────────────────────────────────────────
   SELEÇÃO DE TEXTO
─────────────────────────────────────────────────────────────── */
::selection {
  background: rgba(123,34,212,.35);
  color: #fff;
}
/* ═══════════════════════════════════════════════════════════════
   REPAGINADA 2026 — Copa do Mundo × Teatro 🎭
   Direção visual: base oficial black/white/gold do 26 + faixas vibrantes
   dos países-sede. Menos neon genérico, mais placa esportiva, editorial
   e identidade de torneio.
═══════════════════════════════════════════════════════════════ */
:root {
  /* Núcleo 2026: preto, branco, ouro do troféu */
  --wc26-black: #050509;
  --wc26-ink: #0b0b12;
  --wc26-charcoal: #11131d;
  --wc26-white: #f8f6ef;
  --wc26-paper: #fffdf4;
  --wc26-gold: #d6a83a;
  --wc26-gold-2: #f2d06b;
  --wc26-gold-deep: #8d661b;

  /* Países-sede / sistema gráfico colorido */
  --host-red: #e5383b;
  --host-blue: #1368ff;
  --host-green: #00a85a;
  --host-lime: #8bd80d;
  --host-yellow: #ffd447;
  --host-purple: #6422d4;
  --host-cyan: #13c7e6;

  --mask-glyph: '🎭';
  --cup-glyph: '🏆';
  --wc26-ribbon: linear-gradient(
    90deg,
    var(--host-green) 0 14%,
    var(--wc26-white) 14% 20%,
    var(--host-red) 20% 34%,
    var(--host-blue) 34% 51%,
    var(--host-yellow) 51% 65%,
    var(--host-purple) 65% 82%,
    var(--host-lime) 82% 100%
  );
  --wc26-panel: linear-gradient(180deg, rgba(255,253,244,.045), rgba(255,253,244,.015));

  /* Rebalance da paleta antiga */
  --navy-900: #050509;
  --navy-800: #090a12;
  --navy-700: #10131f;
  --navy-600: #171b2a;
  --navy-500: #20263b;

  --purple-700: #35106f;
  --purple-600: #4c16a8;
  --purple-500: var(--host-purple);
  --purple-400: #7f4dff;
  --purple-300: #c7b6ff;
  --purple-100: #f5f0ff;

  --gold-500: var(--wc26-gold);
  --gold-400: var(--wc26-gold-2);
  --gold-300: #ffe7a1;
  --gold-glow: rgba(214,168,58,.18);

  --cyan-400: var(--host-cyan);
  --cyan-500: #079db8;

  --red-mask: var(--host-red);
  --amber-500: #f59f22;
  --blue-500: var(--host-blue);
  --green-500: var(--host-green);
  --green-600: #007c47;

  --surface-0: #050509;
  --surface-1: #0c0d15;
  --surface-2: #141722;
  --surface-3: #1b2030;
  --surface-glass: rgba(12,13,21,.88);

  --ink: #f7f3e8;
  --ink-2: #d7d0c1;
  --muted: #9b9487;
  --subtle: #5f6574;

  --border: rgba(248,246,239,.075);
  --border-md: rgba(248,246,239,.13);
  --border-strong: rgba(248,246,239,.22);
  --border-glow: rgba(214,168,58,.42);

  --shadow-xs: 0 1px 2px rgba(0,0,0,.32);
  --shadow-sm: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 22px rgba(0,0,0,.26);
  --shadow-md: 0 1px 0 rgba(255,255,255,.04) inset, 0 16px 34px rgba(0,0,0,.34);
  --shadow-lg: 0 1px 0 rgba(255,255,255,.05) inset, 0 24px 60px rgba(0,0,0,.44);
  --shadow-glow-purple: 0 0 0 1px rgba(100,34,212,.20), 0 20px 50px rgba(0,0,0,.35);
  --shadow-glow-gold: 0 0 0 1px rgba(214,168,58,.25), 0 14px 35px rgba(214,168,58,.08);
}

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(circle at 12% 8%, rgba(19,104,255,.10), transparent 28rem),
    radial-gradient(circle at 90% 0%, rgba(100,34,212,.16), transparent 32rem),
    radial-gradient(circle at 74% 88%, rgba(0,168,90,.10), transparent 30rem),
    var(--surface-0);
}

/* Campo noturno + grid de identidade visual, sem cara de template neon */
body::before {
  background-image:
    linear-gradient(90deg, rgba(248,246,239,.028) 1px, transparent 1px),
    linear-gradient(0deg, rgba(248,246,239,.024) 1px, transparent 1px),
    radial-gradient(circle at 50% 42%, transparent 0 8.5rem, rgba(248,246,239,.035) 8.55rem 8.65rem, transparent 8.7rem),
    linear-gradient(90deg, transparent calc(50% - .5px), rgba(248,246,239,.045) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px));
  background-size: 84px 84px, 84px 84px, 100% 100%, 100% 100%;
  opacity: .95;
}

body::after {
  content: '26  🎭  26';
  right: -5rem;
  bottom: -4rem;
  font-family: var(--font-display);
  font-size: clamp(10rem, 24vw, 25rem);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -.08em;
  opacity: .035;
  filter: none;
  transform: rotate(-10deg);
  white-space: nowrap;
}

/* Blocos utilitários para inserir máscaras decorativas no HTML quando quiser */
.mask-mark,
.theatre-mark,
.cup-mask-mark {
  align-items: center;
  background: rgba(214,168,58,.10);
  border: 1px solid rgba(214,168,58,.25);
  border-radius: 999px;
  color: var(--wc26-gold-2);
  display: inline-flex;
  font-weight: 800;
  gap: .35rem;
  line-height: 1;
  padding: .28rem .55rem;
}
.mask-mark::before,
.theatre-mark::before,
.cup-mask-mark::before { content: var(--mask-glyph); }

/* ── Navbar: assinatura 26 + faixa de países-sede ── */
.navbar {
  background: rgba(5,5,9,.92) !important;
  border-bottom: 1px solid rgba(248,246,239,.08);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 28px rgba(0,0,0,.22);
}

.navbar::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--wc26-ribbon);
}

.navbar::after {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(248,246,239,.20), transparent);
  opacity: 1;
}

.navbar-brand {
  color: var(--wc26-paper) !important;
  gap: .55rem;
  text-shadow: none;
}

.navbar-brand::after {
  content: '26';
  align-items: center;
  background: var(--wc26-paper);
  border-radius: .35rem;
  color: var(--wc26-black);
  display: inline-flex;
  font-family: var(--font-display);
  font-size: .9rem;
  font-style: italic;
  font-weight: 900;
  height: 1.25rem;
  justify-content: center;
  letter-spacing: -.08em;
  margin-left: .15rem;
  padding: 0 .38rem 0 .32rem;
  transform: skew(-4deg);
}

.navbar-brand .brand-icon {
  filter: drop-shadow(0 0 8px rgba(214,168,58,.36));
}

.navbar-toggler {
  align-items: center;
  background: rgba(248,246,239,.10);
  border: 1px solid rgba(248,246,239,.28) !important;
  border-radius: var(--r-sm);
  display: inline-flex;
  height: 2.6rem;
  justify-content: center;
  padding: .55rem !important;
  transition: background .15s, border-color .15s, box-shadow .15s;
  width: 2.8rem;
}

.navbar-toggler:hover,
.navbar-toggler:focus-visible,
.navbar-toggler[aria-expanded="true"] {
  background: rgba(214,168,58,.16);
  border-color: rgba(214,168,58,.72) !important;
  box-shadow: 0 0 0 3px rgba(214,168,58,.18) !important;
}

.mobile-menu-icon {
  display: grid;
  gap: .25rem;
  width: 1.35rem;
}

.mobile-menu-icon span {
  background: var(--wc26-paper);
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
  display: block;
  height: 2px;
  transition: background .15s;
  width: 100%;
}

.navbar-toggler[aria-expanded="true"] .mobile-menu-icon span {
  background: var(--wc26-gold-2);
}

.navbar .nav-link,
.nav-button {
  color: rgba(248,246,239,.68) !important;
  border: 1px solid transparent;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.nav-button:hover {
  background: rgba(248,246,239,.07);
  border-color: rgba(248,246,239,.10);
  color: var(--wc26-paper) !important;
}

.navbar .nav-link.active-page {
  background: rgba(214,168,58,.12);
  border-color: rgba(214,168,58,.24);
  color: var(--wc26-gold-2) !important;
}

/* ── Hero: placa oficial 2026, 26 monumental e máscaras ── */
.cup-hero {
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(255,255,255,.06), transparent 30%),
    linear-gradient(135deg, #050509 0%, #10111b 45%, #050509 100%);
  border: 1px solid rgba(248,246,239,.12);
  box-shadow: var(--shadow-lg);
}

.cup-hero::before {
  background:
    var(--wc26-ribbon),
    radial-gradient(circle at 75% 20%, rgba(214,168,58,.16), transparent 13rem);
  border-radius: 999px 0 0 999px;
  height: 10px;
  left: 2.5rem;
  opacity: .95;
  right: 2.5rem;
  top: 0;
  width: auto;
}

.cup-hero::after {
  content: '26 🎭';
  right: 1.2rem;
  bottom: -.65rem;
  font-family: var(--font-display);
  font-size: clamp(4.8rem, 12vw, 9rem);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -.09em;
  opacity: .105;
  filter: none;
  transform: rotate(-5deg);
}

.cup-kicker {
  align-items: center;
  color: var(--wc26-gold-2);
  display: inline-flex;
  gap: .5rem;
  text-shadow: none;
}

.cup-kicker::before,
.cup-kicker::after {
  border: 1px solid rgba(214,168,58,.28);
  border-radius: 999px;
  line-height: 1;
  padding: .18rem .42rem;
}
.cup-kicker::before { content: '🎭'; background: rgba(214,168,58,.10); }
.cup-kicker::after { content: '🎭'; color: var(--wc26-paper); background: rgba(248,246,239,.07); }

.cup-hero h1 {
  letter-spacing: -.04em;
  max-width: 760px;
  position: relative;
  text-shadow: none;
}

.cup-hero h1::first-letter { color: var(--wc26-gold-2); }

.cup-hero p { color: rgba(248,246,239,.70); max-width: 680px; }

.cup-hero .btn-hero,
.btn-primary-full,
.btn-submit.active,
.btn-action-primary {
  background: var(--wc26-paper);
  border: 1px solid rgba(248,246,239,.35);
  box-shadow: 0 10px 18px rgba(0,0,0,.22), 0 0 0 1px rgba(214,168,58,.18) inset;
  color: var(--wc26-black);
  position: relative;
}

.cup-hero .btn-hero::before,
.btn-primary-full::before,
.btn-submit.active::before,
.btn-action-primary::before {
  content: '🎭';
  margin-right: .45rem;
  filter: saturate(1.1);
}

.cup-hero .btn-hero:hover,
.btn-primary-full:hover,
.btn-submit.active:hover,
.btn-action-primary:hover {
  background: var(--wc26-gold-2);
  border-color: var(--wc26-gold);
  box-shadow: 0 14px 26px rgba(0,0,0,.30), 0 0 0 1px rgba(5,5,9,.16) inset;
  color: var(--wc26-black);
}

/* ── Cards e painéis: top stripe 2026, sombras mais limpas ── */
.filters-bar,
.metric,
.game-card,
.ranking-table-wrap,
.auth-card,
.admin-card,
.sim-toolbar,
.sim-panel,
.sim-group-card {
  background: var(--wc26-panel), var(--surface-1);
  border-color: rgba(248,246,239,.10);
  box-shadow: var(--shadow-sm);
}

.filters-bar,
.metric,
.game-card,
.ranking-table-wrap,
.auth-card,
.admin-card,
.sim-toolbar,
.sim-panel,
.sim-group-card,
.podium-card {
  overflow: hidden;
  position: relative;
}

.filters-bar::before,
.metric::before,
.game-card::before,
.ranking-table-wrap::before,
.auth-card::before,
.admin-card::before,
.sim-toolbar::before,
.sim-panel::before,
.sim-group-card::before,
.podium-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--wc26-ribbon);
  opacity: .86;
  pointer-events: none;
}

.metric:hover,
.game-card:hover,
.podium-card:hover,
.admin-card:hover {
  border-color: rgba(248,246,239,.16);
  box-shadow: var(--shadow-md);
}

.metric::after {
  content: '🎭';
  position: absolute;
  right: .9rem;
  bottom: .65rem;
  font-size: 2.2rem;
  opacity: .055;
  pointer-events: none;
}

.metric-value {
  color: var(--wc26-paper);
  text-shadow: none;
}

.metric-value.gold,
.pts-display,
.legend-pts,
.podium-pts strong,
.palpite-points,
.sim-champion .team-inline {
  color: var(--wc26-gold-2);
  text-shadow: none;
}

.metric-label,
.filter-label,
.form-label,
.score-team-label,
.ranking-table thead th,
.sim-round h3 {
  color: rgba(248,246,239,.50);
}

/* ── Inputs / selects: interface esportiva, não “template pronto” ── */
.form-select,
.form-control,
.score-input,
.sim-select {
  background-color: #10131b;
  border-color: rgba(248,246,239,.13);
  color: var(--wc26-paper);
}

.form-select:focus,
.form-control:focus,
.score-input:focus,
.sim-select:focus {
  border-color: rgba(214,168,58,.72);
  box-shadow: 0 0 0 3px rgba(214,168,58,.14);
}

.btn-filter-clear,
.btn-action {
  background: rgba(248,246,239,.055);
  border-color: rgba(248,246,239,.13);
  color: rgba(248,246,239,.64);
}

.btn-filter-clear:hover,
.btn-action:hover {
  background: rgba(214,168,58,.10);
  border-color: rgba(214,168,58,.38);
  color: var(--wc26-gold-2);
}

/* ── Match cards: placar oficial com detalhe 26 + máscara ── */
.game-card {
  overflow: hidden;
}
.game-card::after {
  content: '26';
  position: absolute;
  right: .7rem;
  top: .52rem;
  color: rgba(248,246,239,.055);
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -.08em;
  pointer-events: none;
}

.game-card.is-open   { border-top-color: var(--host-green); }
.game-card.is-locked { border-top-color: var(--host-yellow); }
.game-card.is-done   { border-top-color: var(--subtle); }

.card-num::before { content: '🎭 '; opacity: .75; }

.state-badge {
  align-items: center;
  display: inline-flex;
  gap: .3rem;
}
.state-badge::before { content: '🎭'; font-size: .85em; }
.state-badge.open   { background: rgba(0,168,90,.12); color: #5dffb2; border-color: rgba(0,168,90,.24); }
.state-badge.locked { background: rgba(255,212,71,.11); color: var(--host-yellow); border-color: rgba(255,212,71,.28); }
.state-badge.done   { background: rgba(248,246,239,.07); color: rgba(248,246,239,.55); border-color: rgba(248,246,239,.12); }

.match-board {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 3.8rem, rgba(248,246,239,.03) 3.85rem 3.95rem, transparent 4rem),
    linear-gradient(90deg, transparent calc(50% - .5px), rgba(248,246,239,.05) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px)),
    #10131b;
  border-color: rgba(248,246,239,.11);
  overflow: hidden;
}

.match-board::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--wc26-ribbon);
  opacity: .8;
}

.match-board::after {
  content: '🎭';
  position: absolute;
  right: .65rem;
  bottom: .2rem;
  font-size: 2.4rem;
  opacity: .045;
  pointer-events: none;
}

.vs-chip {
  background: var(--wc26-paper);
  border: 1px solid rgba(214,168,58,.35);
  box-shadow: none;
  color: var(--wc26-black);
  font-family: var(--font-display);
  font-size: .7rem;
  font-style: italic;
}

.official-score {
  background: #050509;
  border-color: rgba(214,168,58,.35);
  box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset;
  color: var(--wc26-gold-2);
}

.official-tag::before { content: '🏆 '; opacity: .75; }

.palpite-pill {
  background: rgba(214,168,58,.08);
  border-color: rgba(214,168,58,.22);
  color: rgba(248,246,239,.78);
}
.palpite-pill::before {
  content: '🎭';
  margin-right: .45rem;
}

.btn-submit.inactive {
  background: rgba(248,246,239,.06);
  color: rgba(248,246,239,.32);
}

/* ── Ranking: podium mais “tabela de torneio” ── */
.podium-card {
  background: var(--wc26-panel), var(--surface-1);
  border-color: rgba(248,246,239,.10);
  overflow: hidden;
}

.podium-card::after {
  content: '🎭';
  position: absolute;
  right: .2rem;
  bottom: -.5rem;
  font-size: 4rem;
  opacity: .055;
  pointer-events: none;
  transform: rotate(10deg);
}

.podium-card.rank-1 {
  border-top-color: var(--wc26-gold-2);
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(214,168,58,.13) inset;
}

.rank-medal.rank-1 {
  background: var(--wc26-gold-2);
  color: var(--wc26-black);
  box-shadow: none;
}
.rank-medal.rank-2 { background: #e6e6e6; color: #11131d; }
.rank-medal.rank-3 { background: #c6895c; color: #120904; }

.ranking-table thead th { background: #10131b; }
.ranking-table tbody tr:hover { background: rgba(248,246,239,.035); }
.ranking-table .my-row {
  background: rgba(214,168,58,.08);
  border-left-color: var(--wc26-gold-2);
}

.you-badge {
  background: rgba(214,168,58,.12);
  border-color: rgba(214,168,58,.28);
  color: var(--wc26-gold-2);
}
.you-badge::before { content: '🎭 '; }

/* ── Auth/Admin: entrada com cara de credencial do torneio ── */
.auth-header {
  background:
    linear-gradient(90deg, rgba(248,246,239,.08), transparent 35%),
    linear-gradient(135deg, #050509 0%, #151622 100%);
}
.auth-header::before {
  content: '🎭';
  opacity: .075;
  filter: none;
}
.auth-header::after {
  content: '26 🎭';
  color: var(--wc26-paper);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -.08em;
  opacity: .085;
  filter: none;
}

.auth-header h1::before { content: '🎭 '; color: var(--wc26-gold-2); }
.auth-footer a { color: var(--wc26-gold-2); }
.auth-footer a:hover { color: var(--host-yellow); }

.btn-save-result {
  background: #050509;
  border-color: rgba(214,168,58,.32);
  color: var(--wc26-paper);
}
.btn-save-result::before { content: '🎭 '; }
.btn-save-result:hover {
  background: var(--wc26-paper);
  color: var(--wc26-black);
  box-shadow: none;
}

/* ── Simulador: grupos e chave com linguagem de bracket oficial ── */
.sim-group-card h2 {
  color: var(--wc26-paper);
  letter-spacing: -.04em;
}
.sim-group-card h2::before {
  content: '🎭';
  color: var(--wc26-gold-2);
  font-size: .75em;
  margin-right: .35rem;
}

.sim-team-list > span,
.sim-summary span,
.sim-champion,
.sim-team-row,
.sim-knockout-match,
.sim-team-pick,
.sim-third-option,
.sim-progress,
.sim-empty-bracket {
  background: #10131b;
  border-color: rgba(248,246,239,.10);
}

.sim-progress.is-complete,
.sim-team-row.has-rank,
.sim-team-pick.is-winner,
.sim-third-option.is-selected {
  background: rgba(214,168,58,.09);
  border-color: rgba(214,168,58,.36);
  box-shadow: none;
}

.sim-current-rank,
.sim-rank-button.is-selected,
.pick-check {
  background: var(--wc26-paper);
  color: var(--wc26-black);
}

.sim-rank-button:hover,
.sim-team-pick:not(:disabled):hover {
  border-color: rgba(214,168,58,.45);
  box-shadow: 0 0 0 3px rgba(214,168,58,.10);
  color: var(--wc26-gold-2);
}

.sim-match-num span { color: var(--wc26-gold-2); }
.sim-round-final .sim-knockout-match {
  background: rgba(214,168,58,.09);
  border-color: rgba(214,168,58,.36);
  box-shadow: none;
}
.sim-round-final .sim-match-num::after {
  content: '🎭';
  color: var(--wc26-gold-2);
  font-size: .78rem;
}

/* ── Alerts: menos saturação, mais consistência ── */
.alert-success { background: rgba(0,168,90,.10); border-color: rgba(0,168,90,.22); color: #70ffc0; }
.alert-warning { background: rgba(255,212,71,.10); border-color: rgba(255,212,71,.22); color: var(--host-yellow); }
.alert-danger  { background: rgba(229,56,59,.10); border-color: rgba(229,56,59,.24); color: #ff8c8e; }
.alert-info    { background: rgba(19,104,255,.10); border-color: rgba(19,104,255,.24); color: #93b8ff; }
.alert::before { content: '🎭 '; }

.empty-state::before {
  content: '🎭';
  display: block;
  font-size: 2.25rem;
  margin-bottom: .45rem;
  opacity: .7;
}

/* ── Microdetalhes 2026 para elementos recorrentes ── */
.section-title::before { content: '🎭 '; color: var(--wc26-gold-2); }
.section-sub::before { content: '🎭 '; opacity: .75; }
.legend-item::before { content: '🎭'; font-size: .82rem; opacity: .65; }
.team-flag, .tf, .team-inline .flag-img { filter: saturate(1.08) contrast(1.02); }
.flag-img { box-shadow: 0 0 0 1px rgba(248,246,239,.18), 0 1px 2px rgba(0,0,0,.35); }

::-webkit-scrollbar-thumb { background: rgba(248,246,239,.20); border-color: var(--surface-0); }
::-webkit-scrollbar-thumb:hover { background: var(--wc26-gold); }

::selection { background: rgba(214,168,58,.40); color: var(--wc26-paper); }

@media (max-width: 575.98px) {
  body::after { content: '26 🎭'; font-size: 11rem; right: -2.5rem; }
  .cup-hero::before { left: 1.25rem; right: 1.25rem; }
  .cup-hero::after { font-size: 5.8rem; right: .5rem; }
  .cup-kicker { flex-wrap: wrap; }
  .navbar-brand::after { display: none; }
}

/* ==========================================================================
   TEMA, ACESSIBILIDADE E FLUXOS GUIADOS
   ========================================================================== */

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
  --surface-0: #f3f5f8;
  --surface-1: #ffffff;
  --surface-2: #f0f3f7;
  --surface-3: #e7ecf2;
  --surface-glass: rgba(255,255,255,.92);
  --ink: #161a22;
  --ink-2: #343b49;
  --muted: #616b7c;
  --subtle: #8b94a3;
  --border: rgba(13,20,32,.09);
  --border-md: rgba(13,20,32,.15);
  --border-strong: rgba(13,20,32,.24);
  --shadow-xs: 0 1px 2px rgba(15,23,42,.08);
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 8px 22px rgba(15,23,42,.07);
  --shadow-md: 0 2px 4px rgba(15,23,42,.06), 0 14px 32px rgba(15,23,42,.10);
  --shadow-lg: 0 3px 8px rgba(15,23,42,.08), 0 24px 55px rgba(15,23,42,.12);
  --shadow-glow-purple: 0 0 0 1px rgba(100,34,212,.10), 0 20px 44px rgba(15,23,42,.10);
  --wc26-panel: linear-gradient(180deg, rgba(255,255,255,.95), rgba(248,250,252,.94));
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 12% 8%, rgba(19,104,255,.08), transparent 28rem),
    radial-gradient(circle at 90% 0%, rgba(100,34,212,.07), transparent 32rem),
    radial-gradient(circle at 74% 88%, rgba(0,168,90,.06), transparent 30rem),
    var(--surface-0);
}

html[data-theme="light"] body::before {
  background-image:
    linear-gradient(90deg, rgba(15,23,42,.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(15,23,42,.03) 1px, transparent 1px),
    radial-gradient(circle at 50% 42%, transparent 0 8.5rem, rgba(15,23,42,.04) 8.55rem 8.65rem, transparent 8.7rem),
    linear-gradient(90deg, transparent calc(50% - .5px), rgba(15,23,42,.045) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px));
}

.app-main {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.nav-menu {
  gap: .25rem;
}

.theme-toggle {
  align-items: center;
  background: rgba(248,246,239,.06);
  border: 1px solid rgba(248,246,239,.13);
  border-radius: var(--r-sm);
  color: var(--wc26-paper);
  cursor: pointer;
  display: inline-flex;
  height: 2.35rem;
  justify-content: center;
  position: relative;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
  width: 2.35rem;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: rgba(214,168,58,.14);
  border-color: rgba(214,168,58,.45);
  color: var(--wc26-gold-2);
  outline: none;
  transform: translateY(-1px);
}

.theme-icon {
  font-size: 1.05rem;
  line-height: 1;
}

html[data-theme="dark"] .theme-icon-dark,
html[data-theme="light"] .theme-icon-light {
  display: none;
}

.auth-page-row {
  margin-top: 2.5rem;
}

.auth-symbol {
  font-size: 2rem;
  margin-bottom: .5rem;
}

.field-group-last {
  margin-bottom: 1.25rem;
}

.field-help {
  color: var(--muted);
  display: block;
  font-size: .72rem;
  line-height: 1.35;
  margin-top: .38rem;
}

.password-control {
  position: relative;
}

.password-control .form-control {
  padding-right: 5rem;
}

.password-toggle {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: .72rem;
  font-weight: 800;
  height: calc(100% - .4rem);
  padding: 0 .75rem;
  position: absolute;
  right: .2rem;
  text-transform: uppercase;
  top: .2rem;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--wc26-gold-2);
  outline: none;
}

.form-control,
.form-select,
.score-input,
.sim-select {
  caret-color: var(--wc26-gold);
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink);
}

.form-control::placeholder,
.score-input::placeholder {
  color: var(--subtle);
  opacity: 1;
  -webkit-text-fill-color: var(--subtle);
}

.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
  box-shadow: 0 0 0 1000px var(--surface-2) inset !important;
  caret-color: var(--ink);
  -webkit-text-fill-color: var(--ink) !important;
}

.metric-filter.active,
.metric-filter[aria-pressed="true"] {
  background:
    linear-gradient(135deg, rgba(214,168,58,.18), rgba(100,34,212,.10)),
    var(--surface-1);
  border-color: rgba(214,168,58,.75);
  box-shadow: 0 0 0 3px rgba(214,168,58,.15), var(--shadow-md);
  transform: translateY(-2px);
}

.metric-filter.active::after,
.metric-filter[aria-pressed="true"]::after {
  bottom: auto;
  color: var(--wc26-gold-2);
  content: '✓';
  font-family: var(--font);
  font-size: 1rem;
  font-style: normal;
  font-weight: 900;
  opacity: 1;
  right: .9rem;
  top: .7rem;
}

.metric-filter.active .metric-label,
.metric-filter[aria-pressed="true"] .metric-label {
  color: var(--wc26-gold-2);
}

.flag-img {
  aspect-ratio: 1.4;
  display: inline-block;
  height: auto;
  max-width: 1.4em;
  object-fit: cover;
  width: 1.4em;
}

.flag-img-sm {
  max-width: 1.05em;
  width: 1.05em;
}

.flag-fallback {
  background: var(--surface-3);
  border: 1px solid var(--border-md);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: .75rem;
}

.admin-card-meta,
.admin-match-board {
  margin-bottom: .85rem;
}

.official-tag-pending {
  color: var(--amber-500);
}

.label-flag {
  margin-right: .3rem;
}

.score-input-full {
  width: 100%;
}

.admin-score-divider {
  color: var(--muted);
  font-weight: 600;
  padding-bottom: .85rem;
}

.admin-submit-row {
  margin-top: .25rem;
}

.ranking-col-position {
  width: 3rem;
}

.ranking-col-number {
  width: 6rem;
}

.rank-medal-small {
  font-size: .8rem;
  height: 1.75rem;
  width: 1.75rem;
}

.ranking-position,
.ranking-predictions {
  color: var(--muted);
  font-size: .85rem;
}

.ranking-position {
  font-weight: 600;
}

.ranking-name {
  font-size: .92rem;
  font-weight: 600;
}

.ranking-empty {
  color: var(--muted);
  font-size: .9rem;
  padding: 2rem;
}

/* Resultados */
.results-filters {
  margin-bottom: 1.25rem;
}

.results-list {
  display: grid;
  gap: .85rem;
}

.result-card {
  background: var(--wc26-panel), var(--surface-1);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
}

.result-card::before {
  background: var(--wc26-ribbon);
  content: '';
  height: 3px;
  inset: 0 0 auto;
  position: absolute;
}

.result-card-summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(9rem, .8fr) minmax(20rem, 1.5fr) 1.5rem;
  list-style: none;
  padding: 1rem 1.1rem;
}

.result-card-summary::-webkit-details-marker {
  display: none;
}

.result-card-summary:hover {
  background: rgba(214,168,58,.05);
}

.result-meta {
  display: grid;
  gap: .15rem;
}

.result-meta span {
  color: var(--ink);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.result-meta small {
  color: var(--muted);
  font-size: .7rem;
}

.result-scoreboard {
  align-items: center;
  display: grid;
  gap: .7rem;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.result-team {
  align-items: center;
  display: flex;
  gap: .5rem;
  min-width: 0;
}

.result-team strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-team-away {
  justify-content: flex-end;
}

.result-score {
  background: var(--wc26-paper);
  border-radius: var(--r-sm);
  color: var(--wc26-black);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  padding: .28rem .65rem;
}

.result-expand {
  color: var(--muted);
  font-size: 1.3rem;
  transition: transform .15s;
}

.result-card[open] .result-expand {
  transform: rotate(180deg);
}

.result-predictions {
  border-top: 1px solid var(--border);
  display: grid;
  gap: .35rem;
  padding: .75rem 1.1rem 1rem;
}

.result-prediction {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(0, 1fr) auto 4.5rem;
  padding: .55rem .7rem;
}

.result-prediction.is-current-user {
  border-color: rgba(214,168,58,.48);
  box-shadow: inset 3px 0 var(--wc26-gold);
}

.result-player {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-player small {
  background: rgba(214,168,58,.14);
  border-radius: 999px;
  color: var(--wc26-gold-deep);
  font-size: .62rem;
  margin-left: .35rem;
  padding: .15rem .35rem;
}

.result-points {
  color: var(--wc26-gold-deep);
  font-size: .75rem;
  font-weight: 800;
  text-align: right;
}

.result-empty-predictions {
  color: var(--muted);
  padding: .8rem;
  text-align: center;
}

/* Simulador guiado */
.hero-actions,
.sim-stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.sim-stepper {
  background: var(--surface-1);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: .5rem;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 1.25rem;
  padding: .55rem;
  position: sticky;
  top: 4.6rem;
  z-index: 20;
}

.sim-step {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  gap: .12rem .55rem;
  grid-template-columns: 2rem 1fr;
  padding: .65rem .75rem;
  text-align: left;
}

.sim-step > span {
  align-items: center;
  background: var(--surface-3);
  border: 1px solid var(--border-md);
  border-radius: 50%;
  display: flex;
  font-weight: 900;
  grid-row: span 2;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.sim-step strong {
  color: var(--ink);
  font-size: .78rem;
}

.sim-step small {
  font-size: .66rem;
}

.sim-step.is-active {
  background: rgba(214,168,58,.10);
  border-color: rgba(214,168,58,.38);
}

.sim-step.is-active > span,
.sim-step.is-complete > span {
  background: var(--wc26-gold-2);
  border-color: var(--wc26-gold);
  color: var(--wc26-black);
}

.sim-stage[hidden] {
  display: none !important;
}

.sim-stage-heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.sim-stage-heading h2 {
  margin-bottom: .2rem;
}

.sim-stage-content {
  margin-bottom: 1.25rem;
}

.section-eyebrow {
  color: var(--wc26-gold-deep);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
  margin: 0 0 .25rem;
  text-transform: uppercase;
}

.section-title-compact {
  margin-bottom: 1rem;
}

.sim-stage-progress,
.sim-autosave-status {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
}

.sim-stage-progress {
  background: var(--surface-1);
  border: 1px solid var(--border-md);
  border-radius: 999px;
  padding: .42rem .7rem;
  white-space: nowrap;
}

.sim-feedback {
  background: rgba(245,159,34,.10);
  border: 1px solid rgba(245,159,34,.35);
  border-radius: var(--r-md);
  color: var(--ink);
  display: grid;
  gap: .25rem;
  margin-bottom: 1rem;
  padding: .75rem .9rem;
}

.sim-feedback.is-success {
  background: rgba(0,168,90,.10);
  border-color: rgba(0,168,90,.32);
}

.sim-navigation {
  align-items: center;
  background: var(--surface-glass);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  bottom: .75rem;
  box-shadow: var(--shadow-md);
  display: grid;
  gap: .75rem;
  grid-template-columns: auto 1fr auto;
  margin-top: 1rem;
  padding: .7rem;
  position: sticky;
  z-index: 21;
}

.sim-autosave-status {
  text-align: center;
}

html[data-theme="light"] .filters-bar,
html[data-theme="light"] .metric,
html[data-theme="light"] .game-card,
html[data-theme="light"] .ranking-table-wrap,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .admin-card,
html[data-theme="light"] .sim-toolbar,
html[data-theme="light"] .sim-panel,
html[data-theme="light"] .sim-group-card,
html[data-theme="light"] .podium-card {
  border-color: var(--border-md);
}

html[data-theme="light"] .form-select,
html[data-theme="light"] .form-control,
html[data-theme="light"] .score-input,
html[data-theme="light"] .sim-select,
html[data-theme="light"] .sim-team-list > span,
html[data-theme="light"] .sim-summary span,
html[data-theme="light"] .sim-champion,
html[data-theme="light"] .sim-team-row,
html[data-theme="light"] .sim-knockout-match,
html[data-theme="light"] .sim-team-pick,
html[data-theme="light"] .sim-third-option,
html[data-theme="light"] .sim-progress,
html[data-theme="light"] .sim-empty-bracket {
  background: var(--surface-2);
  border-color: var(--border-md);
}

html[data-theme="light"] .form-select option {
  background: var(--surface-1);
  color: var(--ink);
}

html[data-theme="light"] .match-board {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 3.8rem, rgba(15,23,42,.035) 3.85rem 3.95rem, transparent 4rem),
    linear-gradient(90deg, transparent calc(50% - .5px), rgba(15,23,42,.05) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px)),
    var(--surface-2);
  border-color: var(--border-md);
}

html[data-theme="light"] .card-num,
html[data-theme="light"] .team-name,
html[data-theme="light"] .score-team-label,
html[data-theme="light"] .sim-group-card h2,
html[data-theme="light"] .sim-team-pick,
html[data-theme="light"] .sim-fixtures > li > span {
  color: var(--ink);
}

html[data-theme="light"] .metric-value {
  color: var(--ink);
}

html[data-theme="light"] .metric-value.gold,
html[data-theme="light"] .metric-filter.active .metric-value,
html[data-theme="light"] .metric-filter[aria-pressed="true"] .metric-value,
html[data-theme="light"] .pts-display,
html[data-theme="light"] .palpite-points,
html[data-theme="light"] .legend-pts,
html[data-theme="light"] .sim-champion .team-inline {
  color: var(--wc26-gold-deep);
}

html[data-theme="light"] .metric-label,
html[data-theme="light"] .filter-label,
html[data-theme="light"] .form-label,
html[data-theme="light"] .ranking-table thead th,
html[data-theme="light"] .sim-round h3 {
  color: var(--muted);
}

html[data-theme="light"] .metric-filter.active .metric-label,
html[data-theme="light"] .metric-filter[aria-pressed="true"] .metric-label {
  color: var(--wc26-gold-deep);
}

html[data-theme="light"] .palpite-pill,
html[data-theme="light"] .ranking-table .my-row {
  color: var(--ink-2);
}

html[data-theme="light"] .ranking-table thead th {
  background: var(--surface-2);
}

html[data-theme="light"] .ranking-table tbody tr:hover {
  background: rgba(214,168,58,.07);
}

html[data-theme="light"] .state-badge.open {
  color: #087244;
}

html[data-theme="light"] .state-badge.locked {
  color: #8b5b00;
}

html[data-theme="light"] .state-badge.done {
  color: var(--muted);
}

html[data-theme="light"] .btn-filter-clear,
html[data-theme="light"] .btn-action {
  background: var(--surface-2);
  border-color: var(--border-md);
  color: var(--ink-2);
}

html[data-theme="light"] .alert-success { color: #087244; }
html[data-theme="light"] .alert-warning { color: #865700; }
html[data-theme="light"] .alert-danger { color: #a1262a; }
html[data-theme="light"] .alert-info { color: #174ea6; }

@media (max-width: 767.98px) {
  .result-card-summary {
    grid-template-columns: 1fr auto;
  }

  .result-meta {
    grid-column: 1 / -1;
  }

  .result-scoreboard {
    grid-column: 1;
  }

  .result-expand {
    grid-column: 2;
  }

  .sim-step {
    display: flex;
    justify-content: center;
    padding: .55rem;
  }

  .sim-step strong,
  .sim-step small {
    display: none;
  }

  .sim-step > span {
    flex: 0 0 auto;
  }

  .sim-stage-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 575.98px) {
  .app-main {
    padding-top: 1.25rem;
  }

  .auth-page-row {
    margin-top: .5rem;
  }

  .result-scoreboard {
    gap: .35rem;
  }

  .result-team strong {
    font-size: .75rem;
  }

  .result-score {
    font-size: 1rem;
    padding: .25rem .45rem;
  }

  .result-prediction {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .result-points {
    grid-column: 1 / -1;
    text-align: left;
  }

  .sim-navigation {
    grid-template-columns: 1fr 1fr;
  }

  .sim-autosave-status {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

/* ==========================================================================
   COMPETICAO DIARIA, CORINGA E DESEMPENHO
   ========================================================================== */

.nav-update-badge,
.leader-day-badge {
  background: var(--wc26-gold-2);
  border-radius: 999px;
  color: var(--wc26-black);
  display: inline-flex;
  font-size: .58rem;
  font-weight: 900;
  line-height: 1;
  margin-left: .25rem;
  padding: .22rem .38rem;
  text-transform: uppercase;
  vertical-align: middle;
}

.result-update-alert {
  align-items: center;
  background: rgba(214,168,58,.12);
  border: 1px solid rgba(214,168,58,.38);
  border-radius: var(--r-md);
  color: var(--wc26-gold-2);
  display: flex;
  font-size: .82rem;
  font-weight: 800;
  justify-content: center;
  margin-bottom: 1rem;
  padding: .65rem .85rem;
  text-decoration: none;
}

.result-update-alert:hover {
  background: rgba(214,168,58,.18);
  color: var(--wc26-gold-2);
}

.admin-section,
.performance-section {
  border-top: 1px solid var(--border-md);
  margin-top: 1.75rem;
  padding-top: 1.35rem;
}

.admin-section-heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.admin-section-heading .section-title {
  margin-bottom: 0;
}

.admin-sync-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;
}

.admin-sync-actions .state-badge {
  text-decoration: none;
}

.admin-api-suggestion {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--subtle);
  border-radius: var(--r-sm);
  display: flex;
  gap: .65rem;
  justify-content: space-between;
  margin-bottom: .75rem;
  padding: .55rem .6rem;
}

.admin-api-suggestion.has-difference {
  background: rgba(214,168,58,.07);
  border-color: rgba(214,168,58,.28);
  border-left-color: var(--wc26-gold);
}

.admin-api-suggestion-copy {
  display: grid;
  gap: .08rem;
  min-width: 0;
}

.admin-api-suggestion-copy span,
.admin-api-suggestion-copy small {
  color: var(--muted);
  font-size: .56rem;
  line-height: 1.3;
}

.admin-api-suggestion-copy strong {
  color: var(--ink);
  font-size: .67rem;
  line-height: 1.3;
}

.admin-api-suggestion .btn-action-primary {
  flex: 0 0 auto;
  padding: .45rem .55rem;
}

.admin-round-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(16rem, .75fr) minmax(20rem, 1.25fr);
}

.admin-round-create,
.admin-round-list,
.admin-game-controls {
  background: var(--surface-1);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.admin-round-create {
  align-items: end;
  display: grid;
  gap: .65rem;
  grid-template-columns: minmax(0, 1fr) 5rem;
  padding: .9rem;
}

.admin-round-create .btn-action-primary {
  grid-column: 1 / -1;
  width: 100%;
}

.admin-round-list {
  display: grid;
  gap: .5rem;
  padding: .65rem;
}

.admin-round-item {
  align-items: center;
  display: grid;
  gap: .5rem;
  grid-template-columns: minmax(0, 1fr) 4.5rem auto auto;
}

.admin-round-order {
  text-align: center;
}

.admin-round-count,
.admin-round-label {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  white-space: nowrap;
}

.admin-round-empty {
  color: var(--muted);
  margin: 0;
  padding: .75rem;
}

.admin-game-controls {
  align-items: end;
  display: grid;
  gap: .75rem;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 1rem;
  padding: .8rem;
}

.admin-round-filter,
.admin-round-assign {
  align-items: end;
  display: grid;
  gap: .5rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-round-filter .filter-label,
.admin-round-assign .filter-label {
  grid-column: 1 / -1;
}

.admin-game-select {
  align-items: center;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: .68rem;
  font-weight: 800;
  gap: .35rem;
}

.admin-game-select input {
  accent-color: var(--wc26-gold);
  height: 1rem;
  width: 1rem;
}

.admin-game-select:has(input:disabled) {
  cursor: not-allowed;
  opacity: .55;
}

.card-round {
  color: var(--wc26-gold-2);
  font-size: .63rem;
  font-weight: 800;
  text-transform: uppercase;
}

.crowd-meter {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: grid;
  gap: .5rem;
  margin-bottom: .65rem;
  overflow: hidden;
  padding: .65rem;
}

.crowd-meter-head {
  align-items: center;
  display: flex;
  gap: .5rem;
  justify-content: space-between;
}

.crowd-meter-head strong {
  color: var(--ink);
  font-size: .72rem;
}

.crowd-meter-head span {
  color: var(--muted);
  font-size: .62rem;
  font-weight: 700;
}

.crowd-meter-grid {
  display: grid;
  gap: .3rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crowd-meter-grid span {
  color: var(--muted);
  display: grid;
  font-size: .58rem;
  gap: .12rem;
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
}

.crowd-meter-grid strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .75rem;
}

.crowd-scores {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: .6rem;
  gap: .25rem;
}

.crowd-scores span {
  background: var(--surface-3);
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 800;
  padding: .12rem .35rem;
}

.palpite-pill.is-joker {
  border-color: rgba(214,168,58,.42);
  box-shadow: inset 3px 0 var(--wc26-gold);
}

.palpite-pill small,
.palpite-points small,
.result-points small {
  color: var(--wc26-gold-2);
  display: block;
  font-size: .58rem;
  font-weight: 800;
  margin-top: .1rem;
}

.jogo-card-wrapper {
  scroll-margin-top: 5.5rem;
}

.joker-overview {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--wc26-gold);
  border-radius: var(--r-md);
  margin-bottom: 1rem;
  padding: .72rem .8rem .78rem;
}

.joker-overview-heading {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: .55rem;
}

.joker-overview-heading .section-eyebrow {
  margin-bottom: .05rem;
}

.joker-overview-heading h2 {
  color: var(--ink);
  font-size: .92rem;
  font-weight: 900;
  margin: 0;
}

.joker-overview-heading > span {
  color: var(--muted);
  font-size: .62rem;
  font-weight: 800;
  text-align: right;
}

.joker-round-list {
  display: flex;
  gap: .45rem;
  overflow-x: auto;
  padding-bottom: .1rem;
  scrollbar-width: thin;
}

.joker-round-item {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: inherit;
  display: flex;
  flex: 1 0 11.5rem;
  gap: .5rem;
  min-width: 0;
  padding: .48rem .55rem;
  text-decoration: none;
  transition: border-color .18s, background .18s, transform .18s;
}

a.joker-round-item:hover {
  border-color: rgba(214,168,58,.42);
  color: inherit;
  transform: translateY(-1px);
}

.joker-round-mark,
.joker-control-mark {
  align-items: center;
  background: var(--surface-3);
  border: 1px solid var(--border-md);
  border-radius: 50%;
  color: var(--muted);
  display: inline-flex;
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 900;
  height: 1.72rem;
  justify-content: center;
  width: 1.72rem;
}

.joker-round-copy,
.joker-control-copy {
  display: grid;
  gap: .06rem;
  min-width: 0;
}

.joker-round-copy strong {
  color: var(--ink);
  font-size: .66rem;
  line-height: 1.2;
}

.joker-round-copy small {
  color: var(--muted);
  font-size: .56rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.joker-round-item.is-disponivel .joker-round-mark,
.joker-control.is-available .joker-control-mark {
  border-color: rgba(214,168,58,.38);
  color: var(--wc26-gold-2);
}

.joker-round-item.is-escolhido,
.joker-round-item.is-travado {
  background: rgba(214,168,58,.09);
  border-color: rgba(214,168,58,.38);
}

.joker-round-item.is-escolhido .joker-round-mark,
.joker-round-item.is-travado .joker-round-mark,
.joker-control.is-selected .joker-control-mark {
  background: var(--wc26-gold);
  border-color: var(--wc26-gold);
  color: #17130a;
}

.joker-round-item.is-nao-utilizado {
  opacity: .66;
}

.joker-control {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  display: flex;
  gap: .48rem;
  justify-content: space-between;
  margin-top: .65rem;
  padding: .45rem .5rem;
}

.joker-control.is-selected {
  background: rgba(214,168,58,.08);
  border-color: rgba(214,168,58,.4);
  box-shadow: inset 2px 0 var(--wc26-gold);
}

.joker-control strong {
  color: var(--ink);
  font-size: .7rem;
}

.joker-control small {
  color: var(--muted);
  font-size: .59rem;
  line-height: 1.25;
}

.joker-control.is-selected strong {
  color: var(--wc26-gold-2);
}

.joker-button {
  background: var(--surface-2);
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  color: var(--ink-2);
  cursor: pointer;
  flex-shrink: 0;
  font-size: .65rem;
  font-weight: 900;
  padding: .42rem .55rem;
  white-space: nowrap;
}

.joker-button:hover:not(:disabled),
.joker-button.selected {
  background: rgba(214,168,58,.12);
  border-color: rgba(214,168,58,.42);
  color: var(--wc26-gold-2);
}

.joker-button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.ranking-controls {
  align-items: end;
  display: flex;
  gap: .8rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.ranking-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
}

.ranking-table {
  min-width: 46rem;
}

.ranking-mobile-stats {
  display: none;
}

.ranking-tabs {
  background: var(--surface-1);
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  display: inline-flex;
  gap: .2rem;
  padding: .25rem;
}

.ranking-tabs a {
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 800;
  padding: .5rem .7rem;
  text-decoration: none;
}

.ranking-tabs a.active {
  background: var(--wc26-gold-2);
  color: var(--wc26-black);
}

.ranking-scope-form {
  align-items: end;
  display: grid;
  gap: .35rem .5rem;
  grid-template-columns: minmax(10rem, 1fr) auto;
}

.ranking-scope-form .filter-label {
  grid-column: 1 / -1;
}

.podium-achievements {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin-top: .35rem;
}

.podium-achievements span {
  background: rgba(214,168,58,.11);
  border: 1px solid rgba(214,168,58,.24);
  border-radius: 999px;
  color: var(--wc26-gold-2);
  font-size: .56rem;
  font-weight: 800;
  padding: .16rem .32rem;
}

.performance-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.performance-grid .metric {
  min-width: 0;
}

.achievement-grid {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.achievement-card {
  align-items: flex-start;
  background: var(--surface-1);
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  display: flex;
  gap: .65rem;
  min-width: 0;
  padding: .75rem;
}

.achievement-mark {
  align-items: center;
  background: var(--wc26-gold-2);
  border-radius: 50%;
  color: var(--wc26-black);
  display: flex;
  flex: 0 0 1.75rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 900;
  height: 1.75rem;
  justify-content: center;
}

.achievement-card strong {
  color: var(--ink);
  display: block;
  font-size: .76rem;
}

.achievement-card p {
  color: var(--muted);
  font-size: .65rem;
  line-height: 1.35;
  margin: .15rem 0 0;
}

.performance-columns {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.performance-list {
  display: grid;
  gap: .4rem;
}

.performance-row {
  align-items: center;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  display: grid;
  gap: .35rem;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: .55rem .65rem;
}

.performance-row strong {
  color: var(--ink);
  font-size: .75rem;
}

.performance-row span,
.performance-empty {
  color: var(--muted);
  font-size: .65rem;
}

.performance-row b {
  color: var(--wc26-gold-2);
  font-family: var(--font-mono);
  font-size: .72rem;
}

html[data-theme="light"] .result-update-alert,
html[data-theme="light"] .card-round,
html[data-theme="light"] .palpite-pill small,
html[data-theme="light"] .palpite-points small,
html[data-theme="light"] .result-points small,
html[data-theme="light"] .joker-control.is-selected strong,
html[data-theme="light"] .performance-row b {
  color: var(--wc26-gold-deep);
}

html[data-theme="light"] .admin-round-create,
html[data-theme="light"] .admin-round-list,
html[data-theme="light"] .admin-game-controls,
html[data-theme="light"] .achievement-card,
html[data-theme="light"] .performance-row,
html[data-theme="light"] .ranking-tabs {
  border-color: var(--border-md);
}

@media (max-width: 991.98px) {
  .admin-round-layout,
  .performance-columns {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 767.98px) {
  .admin-game-controls,
  .ranking-controls {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .ranking-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .ranking-tabs a {
    text-align: center;
  }

  .admin-round-item {
    grid-template-columns: minmax(0, 1fr) 4rem;
  }

  .admin-round-count,
  .admin-round-item .btn-action {
    grid-column: span 1;
  }

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

@media (max-width: 575.98px) {
  .admin-sync-actions {
    justify-content: stretch;
    width: 100%;
  }

  .admin-sync-actions form,
  .admin-sync-actions .btn-action-primary {
    width: 100%;
  }

  .admin-api-suggestion {
    align-items: stretch;
    display: grid;
  }

  .admin-api-suggestion form,
  .admin-api-suggestion .btn-action-primary {
    width: 100%;
  }

  .admin-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-round-create,
  .admin-round-filter,
  .admin-round-assign,
  .performance-row {
    grid-template-columns: 1fr;
  }

  .admin-round-create .btn-action-primary,
  .admin-round-filter .filter-label,
  .admin-round-assign .filter-label,
  .performance-row b {
    grid-column: 1;
  }

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

  .performance-grid .metric {
    padding: .8rem;
  }

  .performance-grid .metric-value {
    font-size: 1.65rem;
  }

  .performance-row span {
    white-space: normal;
  }
}

/* Estados de envio da autenticacao */
.auth-submit {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 3rem;
}

.auth-submit:disabled,
.auth-submit.is-loading {
  cursor: wait;
  opacity: .86;
  transform: none;
}

.auth-submit-spinner {
  animation: auth-spin .7s linear infinite;
  border: 2px solid rgba(5,5,9,.25);
  border-radius: 50%;
  border-top-color: var(--wc26-black);
  display: none;
  height: 1rem;
  margin-right: .5rem;
  width: 1rem;
}

.auth-submit.is-loading::before {
  display: none;
}

.auth-submit.is-loading .auth-submit-spinner {
  display: inline-block;
}

.auth-submit-status {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

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

/* Regras, filtros administrativos e ranking mobile */
.rules-index {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.rules-index a {
  background: var(--surface-1);
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  padding: .48rem .68rem;
  text-decoration: none;
}

.rules-index a:hover {
  background: rgba(214,168,58,.13);
  border-color: rgba(214,168,58,.42);
  color: var(--wc26-gold-2);
}

.admin-metric-filter {
  color: inherit;
  display: block;
  text-decoration: none;
}

.admin-metric-filter:hover {
  color: inherit;
}

.rules-index {
  border-bottom: 1px solid var(--border);
  margin: 1rem 0 0;
  padding-bottom: 1rem;
}

.rules-layout {
  display: grid;
  gap: 0 2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rules-section {
  border-bottom: 1px solid var(--border);
  min-width: 0;
  padding: 1.5rem 0;
  scroll-margin-top: 5rem;
}

.rules-section p {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.65;
}

.rules-highlight {
  border-left: 3px solid var(--wc26-gold);
  display: grid;
  gap: .2rem;
  margin-top: 1rem;
  padding: .5rem 0 .5rem .8rem;
}

.rules-highlight strong {
  color: var(--ink);
  font-size: .78rem;
}

.rules-highlight span {
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.5;
}

.rules-score-grid {
  display: grid;
  gap: .5rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: .8rem 0;
}

.rules-score-grid div {
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  display: grid;
  gap: .1rem;
  padding: .65rem;
}

.rules-score-grid strong {
  color: var(--wc26-gold-2);
  font-family: var(--font-mono);
  font-size: 1.3rem;
}

.rules-score-grid span {
  color: var(--muted);
  font-size: .62rem;
}

html[data-theme="light"] .rules-index a:hover,
html[data-theme="light"] .rules-score-grid strong {
  color: var(--wc26-gold-deep);
}

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

  .rules-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .joker-overview {
    padding-inline: .65rem;
  }

  .joker-overview-heading {
    align-items: start;
    display: grid;
    gap: .15rem;
  }

  .joker-overview-heading > span {
    text-align: left;
  }

  .joker-round-item {
    flex-basis: 12.75rem;
  }

  .joker-control {
    gap: .4rem;
  }

  .joker-control-mark {
    height: 1.6rem;
    width: 1.6rem;
  }

  .joker-control small {
    font-size: .56rem;
  }

  .admin-round-layout,
  .admin-round-list,
  .admin-round-item {
    min-width: 0;
    width: 100%;
  }

  .admin-round-item {
    grid-template-columns: 1fr;
  }

  .admin-round-count,
  .admin-round-item .btn-action {
    grid-column: 1;
  }

  .admin-round-item .btn-action {
    width: 100%;
  }

  .ranking-table {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
  }

  .ranking-table .ranking-desktop-stat {
    display: none;
  }

  .ranking-table thead th,
  .ranking-table tbody td {
    padding: .7rem .45rem;
  }

  .ranking-table th:nth-child(2),
  .ranking-table td:nth-child(2) {
    width: auto;
  }

  .ranking-table th:nth-child(3),
  .ranking-table td:nth-child(3) {
    width: 4rem;
  }

  .ranking-mobile-stats {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: .53rem;
    gap: .12rem .45rem;
    line-height: 1.3;
    margin-top: .22rem;
  }

  .ranking-mobile-stats strong {
    color: var(--ink-2);
    font-family: var(--font-mono);
    font-size: .57rem;
  }

  .ranking-col-number {
    width: 4rem;
  }

  .ranking-col-position {
    width: 2.8rem;
  }

}
