/* ============================================================
   Placarone — design system v0.2
   Cores: #17202A (bg) + #00FA9A (neon) + #FFFFFF
   Tipografia: Rajdhani (UI), JetBrains Mono (números)
   Mobile-first
   ============================================================ */

:root {
  --bg:          #17202A;
  --bg-elev:    #1F2A37;
  --bg-elev-2:  #2A3744;
  --bg-elev-3:  #354655;
  --border:     rgba(255,255,255,0.08);
  --border-soft: rgba(255,255,255,0.04);
  --neon:       #00FA9A;
  --neon-dim:   #00C97D;
  --neon-soft:  rgba(0,250,154,0.12);
  --text:       #FFFFFF;
  --text-mute:  #9BA8B5;
  --text-soft:  #8995A5;
  --red:        #FF4D6D;
  --red-soft:   rgba(255,77,109,0.15);
  --yellow:     #FFC857;
  --blue:       #4DA8FF;
  --green:      #00FA9A;
  --r-xs: 4px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px;
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-neon: 0 0 24px rgba(0,250,154,0.18);
  --max-w: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: 'Rajdhani', system-ui, sans-serif; font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--neon); text-decoration: none; }
a:hover { color: var(--neon-dim); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* Scrollbar global sutil nas cores do site (nunca o padrão do SO).
   Elementos que escondem a barra de propósito usam scrollbar-width:none (mais específico, vence). */
* { scrollbar-width: thin; scrollbar-color: var(--bg-elev-3) transparent; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-elev-3); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-dim); }

.wrap { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }

/* ── Header (mobile-first: logo + esporte dropdown + ações) ─── */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(23,32,42,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 0;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
  padding-left: 4px; /* respiro pra logo não colar na borda esquerda */
}
.brand .logo {
  width: 36px; height: 36px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(0,250,154,0.25));
}
.header-actions { display: flex; gap: 6px; align-items: center; }
.header-actions .h-btn {
  width: 40px; height: 40px; /* área de toque (mobile) — antes 36px */
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  color: var(--text-mute);
  background: transparent;
  border: none; cursor: pointer;
  transition: background .12s, color .12s;
}
.header-actions .h-btn:hover { background: var(--bg-elev-2); color: var(--text); }
.header-actions .h-btn.fav.on { color: var(--yellow); }
.header-actions .h-btn svg { width: 20px; height: 20px; }

/* ── Bottom Navbar (sticky, mobile-first em ambos) ──────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 60;
  background: rgba(23,32,42,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--max-w);
  margin: 0 auto;
}
.bn-item {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  padding: 10px 4px 12px;
  color: var(--text-mute);
  text-decoration: none;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.8px; text-transform: uppercase;
  border-top: 2px solid transparent;
  transition: color .12s, border-color .12s, background .12s;
}
.bn-item:hover { color: var(--text); background: var(--bg-elev-2); }
.bn-item.active {
  color: var(--neon);
  border-top-color: var(--neon);
  background: rgba(0,250,154,0.04);
}
.bn-item .ic {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
}
.bn-item .ic svg { width: 22px; height: 22px; }
.bn-item .ic .bn-badge {
  position: absolute;
  background: var(--red);
  color: white;
  font-size: 9px; font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  transform: translate(8px, -8px);
}

/* Body precisa de padding-bottom pra não tampar conteúdo */
body { padding-bottom: 70px; }
@media (max-width: 720px) { body { padding-bottom: 64px; } }

/* ── Live badge ────────────────────────────────────────────── */
.badge-live {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--red); color: white;
  font-weight: 700; font-size: 10px; letter-spacing: 1px;
  padding: 4px 8px; border-radius: var(--r-xs);
  text-transform: uppercase;
}
.badge-live::before {
  content: ''; width: 6px; height: 6px;
  background: white; border-radius: 50%;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes spin { to { transform: rotate(360deg); } }
/* Spinner de carregamento (time.html, liga.html, jogo.html) */
.spinner {
  display: inline-block; width: 24px; height: 24px;
  border: 2.5px solid var(--bg-elev-3); border-top-color: var(--neon);
  border-radius: 50%; animation: spin .7s linear infinite;
}

/* ── Calendário horizontal (-7d a +7d) ─────────────────────── */
.calendario {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 12px 0;
  scroll-snap-type: x proximity;
}
.calendario::-webkit-scrollbar { display: none; }
.cal-dia {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  min-width: 56px; padding: 8px 4px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  flex-shrink: 0;
  scroll-snap-align: center;
  transition: background .12s, border-color .12s, transform .12s;
  text-decoration: none; color: var(--text);
}
.cal-dia:hover { background: var(--bg-elev-2); transform: translateY(-1px); }
.cal-dia .dia-sem {
  font-size: 9px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-mute);
}
.cal-dia .dia-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px; font-weight: 700;
  color: var(--text);
}
.cal-dia .dia-mes {
  font-size: 9px; font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
}
.cal-dia.hoje {
  background: var(--bg-elev);
  border-color: rgba(255,77,109,0.55);
}
.cal-dia.hoje .dia-sem { color: var(--red); }
.cal-dia.hoje .dia-num { color: var(--red); }
.cal-dia.ativo {
  background: var(--neon-soft);
  border-color: var(--neon);
}
.cal-dia.ativo .dia-num { color: var(--neon); }

/* ── Hero com padrão de chevrons ───────────────────────────── */
.hero {
  position: relative;
  padding: 48px 0 40px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
/* Chevrons direita (canvas SVG inline) */
.hero::before {
  content: '';
  position: absolute;
  right: -8%;
  top: -10%;
  bottom: -10%;
  width: 60%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><g stroke='%2300FA9A' stroke-width='1' fill='none' opacity='0.18'><path d='M-20 0 L80 100 L-20 200'/><path d='M0 0 L100 100 L0 200'/><path d='M20 0 L120 100 L20 200'/><path d='M40 0 L140 100 L40 200'/><path d='M60 0 L160 100 L60 200'/><path d='M80 0 L180 100 L80 200'/><path d='M100 0 L200 100 L100 200'/><path d='M120 0 L220 100 L120 200'/></g></svg>");
  background-size: 220px 220px;
  background-repeat: repeat;
  pointer-events: none;
  mask-image: linear-gradient(to left, black 0%, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to left, black 0%, black 40%, transparent 100%);
}
/* Glow sutil */
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 50%, rgba(0,250,154,0.08), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 720px; z-index: 1; }

.hero h1 {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 800; letter-spacing: -0.5px;
  line-height: 1.05;
  margin-bottom: 14px; text-transform: uppercase;
}
.hero h1 .accent { color: var(--neon); }

.hero p {
  color: var(--text-mute); font-size: 16px;
  max-width: 520px; line-height: 1.5;
}

/* ── Cards / Sections ──────────────────────────────────────── */
.section { padding: 24px 0; }
.section + .section { padding-top: 0; }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(0,0,0,0.12);
}
.card-head h2 {
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text-mute);
  display: flex; align-items: center; gap: 8px;
}
.card-body { padding: 0; }

/* ── Loading / Empty / Skeleton ────────────────────────────── */
.loading, .empty {
  text-align: center; color: var(--text-mute);
  padding: 32px 16px; font-size: 14px;
}
.empty.erro { color: var(--red); } /* estado de erro de carregamento */

/* Skeleton cards (substitui "Carregando…" textual) */
.skeleton-list { padding: 4px 0; }
.skeleton-row {
  display: grid; grid-template-columns: 1fr;
  gap: 6px; padding: 10px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.skeleton-row:last-child { border-bottom: none; }
.skeleton-bar {
  height: 10px; background: linear-gradient(90deg, var(--bg-elev-2) 0%, var(--bg-elev-3) 50%, var(--bg-elev-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
  border-radius: 4px;
}
.skeleton-bar.short { width: 30%; height: 9px; }
.skeleton-bar.mid { width: 70%; height: 14px; }
.skeleton-bar.long { width: 100%; height: 18px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Jogo row (compacto) ───────────────────────────────────── */
.liga-group {
  background: rgba(0,0,0,0.08);
}
.liga-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; font-size: 10px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--text-mute);
  background: rgba(0,0,0,0.18);
  border-top: 1px solid var(--border-soft);
}
.liga-header { text-decoration: none; }
.liga-header:hover { background: rgba(0,0,0,0.28); }
.liga-header .liga-nome { display: flex; align-items: center; gap: 8px; }
.liga-header .liga-cor {
  width: 3px; height: 12px; background: var(--neon); border-radius: 1px;
}
.liga-header .liga-logo {
  width: 18px; height: 18px; object-fit: contain;
  background: #fff; border-radius: 4px; padding: 1px;
}
.liga-header-row { display: flex; align-items: stretch; }
.liga-header-row .liga-header { flex: 1; }
.liga-fav {
  display: flex; align-items: center; justify-content: center;
  width: 42px; flex: 0 0 auto;
  background: rgba(0,0,0,0.18); border: none; border-top: 1px solid var(--border-soft);
  color: var(--text-mute); cursor: pointer; transition: color .12s, background .12s;
}
.liga-fav:hover { color: var(--neon); background: rgba(0,0,0,0.28); }
.liga-fav.on { color: var(--yellow); }
.liga-fav svg { width: 16px; height: 16px; }

/* LAYOUT VERTICAL: 4 colunas — status | times empilhados | placar | sinal */
.jogo-row {
  display: grid;
  grid-template-columns: 60px 1fr 56px 18px 56px;
  gap: 12px; align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background .12s, transform .12s, border-left-color .12s;
  border-left: 3px solid transparent;
  text-decoration: none;
  color: inherit;
}
.jogo-row:last-child { border-bottom: none; }
.jogo-row:hover {
  background: rgba(0,250,154,0.04);
  border-left-color: var(--neon);
  transform: translateX(2px);
}

.jogo-hora {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--text-soft);
  text-align: center; font-weight: 600;
}
/* Ao vivo: horário em cima + tempo decorrido embaixo (vermelho) */
.jogo-hora.live { display: flex; flex-direction: column; align-items: center; gap: 1px; }
/* Encerrado: horário + FIM (cinza), mesmo empilhamento do ao vivo */
.jogo-hora.fim { display: flex; flex-direction: column; align-items: center; gap: 1px; }
/* Horário e o status (FIM / minuto) na MESMA fonte e tamanho — só a cor muda */
.jh-time, .jh-elapsed, .jh-fim { font-size: 12px; font-weight: 600; letter-spacing: 0.3px; }
.jogo-hora.live .jh-time, .jogo-hora.fim .jh-time { color: var(--text-soft); }
.jh-fim { color: var(--text-mute); }
.jogo-hora.live .jh-elapsed { color: var(--red); }

/* Coluna de ação (5ª col): estrela + sinal empilhados e centralizados (vert. e horiz.) */
.jogo-row { position: relative; }
.col-acao {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
}
.jogo-fav {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-soft); opacity: 0.5; padding: 0;
}
.jogo-fav svg { width: 14px; height: 14px; }
.jogo-fav.on { color: var(--yellow); opacity: 1; }
.jogo-fav:hover { color: var(--yellow); opacity: 1; }

/* Coluna 2: times empilhados (home em cima, away embaixo) */
.times-stack {
  display: flex; flex-direction: column;
  gap: 6px; min-width: 0;
}
.time-line {
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
}
.time-line img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.time-line .nome {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.time-line .forma {
  flex-shrink: 0;
}

/* Coluna 3: placares verticais (home em cima, away embaixo) */
.placar-stack {
  display: flex; flex-direction: column;
  gap: 6px; align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px; font-weight: 700;
  color: var(--neon);
  min-height: 56px;
  justify-content: center;
}
.placar-stack .g-home, .placar-stack .g-away {
  line-height: 1; min-height: 18px;
  text-align: center;
}
.placar-stack.empty { min-height: 56px; } /* jogo não começou: reserva o espaço, sem "VS" */
/* /liga e /time reusam .vs pra mostrar a DATA do próximo jogo (não "VS") — texto sutil, sem caixa */
.placar-stack.vs { font-size: 12px; font-weight: 600; color: var(--text-mute); }
.placar-stack.live { color: var(--red); animation: pulse 1.8s ease-in-out infinite; }
.placar-stack.live .g-home, .placar-stack.live .g-away { color: var(--red); }

/* Espaçador coluna 4 (gap visual entre placar e sinal) */
.jogo-row .sep { width: 1px; height: 24px; background: var(--border-soft); margin: 0 auto; }

/* Sinal: texto puro colorido à direita (sem caixa) — CASA / FORA / EMP */
.sinal {
  font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  white-space: nowrap; text-align: center;
}
.sinal.placeholder { color: transparent; }
.sinal.casa { color: var(--neon); }
.sinal.fora { color: var(--yellow); }
.sinal.emp  { color: var(--text-mute); }

/* Forma V/E/D — 5 bolinhas (8px) */
.forma {
  display: flex; gap: 4px; align-items: center; min-height: 8px;
}
.forma .ponto {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--bg-elev-3);
  flex-shrink: 0;
}
.forma .ponto.W { background: var(--neon); box-shadow: 0 0 4px rgba(0,250,154,0.3); }
.forma .ponto.D { background: var(--yellow); }
.forma .ponto.L { background: var(--red); }

.time-info.right .forma { justify-content: flex-end; }

.time-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.time-info.right .time-meta { align-items: flex-end; }

/* ── Mobile tweaks ─────────────────────────────────────────── */
@media (max-width: 720px) {
  .header-inner { gap: 8px; padding: 10px 0; }
  .brand .logo { width: 32px; height: 32px; }
  .nav a { padding: 6px 8px; font-size: 11px; letter-spacing: 0.5px; }

  .hero { padding: 28px 0 24px; }
  .hero::before { right: -20%; width: 80%; }

  .jogo-row {
    grid-template-columns: 50px 1fr 48px 14px 48px;
    gap: 8px; padding: 9px 12px;
  }
  .time-line .nome { font-size: 12.5px; }
  .time-line img { width: 18px; height: 18px; }
  .placar-stack { font-size: 14px; }
  .sinal { font-size: 11px; }
}

@media (max-width: 480px) {
  .jogo-row { grid-template-columns: 42px 1fr 38px 10px 44px; gap: 6px; padding: 8px 10px; }
  .time-line .nome { font-size: 11.5px; }
  .time-line img { width: 16px; height: 16px; }
  .placar-stack { font-size: 13px; }
  .sinal { font-size: 10.5px; }
}

/* ── Utilities ─────────────────────────────────────────────── */
.muted { color: var(--text-mute); }
.soft { color: var(--text-soft); }
.center { text-align: center; }
.hidden { display: none !important; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ── P0 (v0.5.1): header limpo + chip ao vivo + drawer de menu ── */
.brand-name {
  font-weight: 800; font-size: 18px; color: var(--text);
  letter-spacing: 1px; text-transform: uppercase;
}
.brand .logo { border-radius: var(--r-sm); }

/* Chip ao vivo (estilo Flashscore) */
.live-chip {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 2px 0 14px;
  background: var(--red-soft);
  border: 1px solid rgba(255,77,109,0.35);
  color: var(--text);
  padding: 8px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  transition: background .12s, border-color .12s;
}
.live-chip[hidden] { display: none; }
.live-chip:hover { background: rgba(255,77,109,0.20); }
.live-chip strong { color: var(--red); font-weight: 800; }
.live-chip .live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  animation: livepulse 1.4s infinite;
}
.live-chip .live-chip-arrow { margin-left: 2px; color: var(--text-mute); font-size: 18px; line-height: 1; }
@keyframes livepulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,77,109,0.6); }
  70%  { box-shadow: 0 0 0 6px rgba(255,77,109,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,77,109,0); }
}

/* Drawer de menu */
.drawer-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,0.55); }
.drawer {
  position: fixed; top: 0; right: 0; z-index: 100;
  width: min(82vw, 320px); height: 100%;
  background: var(--bg-elev);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 28px rgba(0,0,0,0.5);
  transform: translateX(100%);
  transition: transform .22s ease;
  display: flex; flex-direction: column;
  padding: 16px; overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.drawer-head strong { font-size: 16px; text-transform: uppercase; letter-spacing: 1px; }
.drawer-head .h-btn {
  width: 40px; height: 40px; font-size: 18px;
  color: var(--text-mute); background: transparent;
  border: none; cursor: pointer; border-radius: var(--r-sm);
}
.drawer-section { margin-bottom: 18px; }
.drawer-label {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-soft); margin: 6px 0 8px;
}
.drawer-item {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; gap: 10px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 11px 13px; margin-bottom: 6px;
  color: var(--text); font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer; text-align: left;
  transition: background .12s, border-color .12s;
}
.drawer-item:not(.soon):hover { background: var(--bg-elev-3); }
.drawer-item.active { border-color: var(--neon); color: var(--neon); }
.drawer-item.active .check { color: var(--neon); font-weight: 800; }
.drawer-item.soon { opacity: 0.55; cursor: default; }
.drawer-item .chevron { color: var(--text-mute); font-size: 18px; line-height: 1; }
.drawer-item .soon-tag {
  font-size: 9px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-soft); background: var(--bg-elev-3);
  padding: 2px 6px; border-radius: var(--r-xs); font-weight: 700;
}
@media (max-width: 480px) {
  .brand-name { font-size: 16px; }
}

/* ── Onda 1: foco visível (a11y) + scroll horizontal de tabela (mobile) ── */
:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; border-radius: 2px; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl-wrap .tbl-classif { min-width: 340px; }

/* Ícones do drawer (line, slim — sem emoji) */
.di-label { display: inline-flex; align-items: center; gap: 10px; }
.di-ico { width: 18px; height: 18px; flex-shrink: 0; }

/* Badge "ao vivo" no bottom-nav (vermelho, injetado por live-badge.js) */
.bottom-nav .bn-item .ic { position: relative; }
.bn-badge {
  position: absolute; top: -5px; right: -9px;
  min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 800; line-height: 16px; text-align: center;
  border-radius: 8px;
}
.bn-badge[hidden] { display: none; }

/* ── Busca global (modal) ───────────────────────────────── */
.busca-overlay{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:200;backdrop-filter:blur(2px)}
.busca-overlay[hidden], .busca-modal[hidden]{display:none !important}
.busca-modal{position:fixed;left:50%;top:64px;transform:translateX(-50%);width:calc(100% - 24px);max-width:420px;
  background:var(--bg-elev);border:1px solid var(--bg-elev-2);z-index:201;border-radius:14px;box-shadow:0 16px 48px rgba(0,0,0,.55);
  max-height:70vh;display:flex;flex-direction:column;overflow:hidden}
.busca-head{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--bg-elev-2)}
.busca-head .busca-ic{width:18px;height:18px;color:var(--text-mute);flex:0 0 auto}
.busca-head input{flex:1;background:none;border:none;outline:none;color:#fff;font-family:inherit;font-size:16px}
.busca-head input::placeholder{color:var(--text-mute)}
.busca-close{background:none;border:none;color:var(--text-mute);font-size:18px;cursor:pointer;padding:4px 8px;flex:0 0 auto}
.busca-body{overflow-y:auto;padding:6px 0 12px}
.busca-sec{font-size:11px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:var(--text-mute);padding:12px 16px 6px}
.busca-item{display:flex;align-items:center;gap:12px;padding:10px 16px;text-decoration:none;color:inherit}
.busca-item:hover{background:var(--bg-elev-2)}
.busca-item img{width:30px;height:30px;object-fit:contain;flex:0 0 auto;background:#fff;border-radius:5px;padding:1px}
.busca-item.busca-jog img{border-radius:50%;object-fit:cover;background:var(--bg-elev-2);padding:0}
.busca-item .bi-txt{flex:1;display:flex;flex-direction:column;min-width:0}
.busca-item .bi-nome{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.busca-item .bi-sub{font-size:11px;color:var(--text-mute)}
.busca-item .bi-tag{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--text-mute);
  border:1px solid var(--bg-elev-3);border-radius:6px;padding:2px 7px;flex:0 0 auto}
.busca-vazio{padding:40px 24px;text-align:center;color:var(--text-mute);line-height:1.6}

/* ── Seletor de esporte (modal "em breve") ──────────────── */
.esp-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:210;backdrop-filter:blur(2px)}
.esp-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:211;width:90%;max-width:360px;
  background:var(--bg-elev);border:1px solid var(--bg-elev-2);border-radius:16px;padding:28px 24px;text-align:center;box-shadow:0 16px 48px rgba(0,0,0,.5)}
.esp-modal .esp-ico{width:56px;height:56px;margin:0 auto 14px;color:var(--neon)}
.esp-modal .esp-ico svg{width:56px;height:56px}
.esp-modal h3{font-size:20px;font-weight:800;text-transform:uppercase;letter-spacing:.5px;margin-bottom:8px}
.esp-modal p{color:var(--text-mute);font-size:14px;line-height:1.5;margin-bottom:20px}
.esp-btn{background:var(--neon);color:var(--bg);border:none;border-radius:10px;padding:12px 20px;font-weight:700;
  text-transform:uppercase;letter-spacing:.5px;font-family:inherit;font-size:14px;cursor:pointer;width:100%}

/* ── Onboarding 1º acesso ───────────────────────────────── */
.onb-overlay{position:fixed;inset:0;background:var(--bg);z-index:300;display:flex;flex-direction:column}
.onb-slide{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:32px 28px;gap:8px}
.onb-slide .onb-ic{width:96px;height:96px;color:var(--neon);margin-bottom:12px}
.onb-slide .onb-ic svg{width:96px;height:96px}
.onb-slide h2{font-size:26px;font-weight:800;text-transform:uppercase;letter-spacing:.5px}
.onb-slide p{color:var(--text-mute);font-size:16px;line-height:1.55;max-width:340px}
.onb-foot{padding:20px 28px calc(28px + env(safe-area-inset-bottom,0));display:flex;flex-direction:column;gap:16px;align-items:center}
.onb-dots{display:flex;gap:8px}
.onb-dots span{width:8px;height:8px;border-radius:50%;background:var(--bg-elev-3);transition:background .2s,width .2s}
.onb-dots span.on{background:var(--neon);width:22px;border-radius:4px}
.onb-actions{display:flex;gap:12px;width:100%;max-width:360px}
.onb-btn{flex:1;border-radius:12px;padding:14px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;font-family:inherit;font-size:14px;cursor:pointer}
.onb-btn.primary{background:var(--neon);color:var(--bg);border:none}
.onb-btn.ghost{background:transparent;color:var(--text-mute);border:1px solid var(--bg-elev-3)}

/* ── Tema claro (html.light) ────────────────────────────── */
html.light{
  --bg:#EDF1F6; --bg-elev:#FFFFFF; --bg-elev-2:#EAEFF4; --bg-elev-3:#DCE3EB;
  --border:rgba(0,0,0,0.10); --border-soft:rgba(0,0,0,0.05);
  --text:#16202B; --text-mute:#5C6B7A; --text-soft:#6A7888;
  --neon-soft:rgba(0,201,125,0.16);
}
html.light .header{background:rgba(255,255,255,0.92)}
html.light .bottom-nav{background:rgba(255,255,255,0.96)}
html.light a{color:var(--neon-dim)}
html.light .brand .logo{filter:none}
html.light .liga-header{background:rgba(0,0,0,0.04)}
html.light .busca-item img,html.light .liga-logo,html.light .chip-logo{background:#F1F4F8}

/* ── Modal de jogador (perfil + stats da temporada) ─────── */
.pm-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:220;backdrop-filter:blur(2px)}
.pm-overlay[hidden],.pm-modal[hidden]{display:none !important}
.pm-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:221;width:calc(100% - 28px);max-width:460px;
  background:var(--bg-elev);border:1px solid var(--bg-elev-2);border-radius:16px;box-shadow:0 16px 48px rgba(0,0,0,.55);
  max-height:82vh;overflow-y:auto;padding:20px}
.pm-close{position:absolute;top:12px;right:12px;background:none;border:none;color:var(--text-mute);font-size:18px;cursor:pointer;padding:4px 8px}
.pm-head{display:flex;align-items:center;gap:14px;margin-bottom:6px}
.pm-foto{width:64px;height:64px;border-radius:50%;object-fit:cover;background:var(--bg-elev-2);flex:0 0 auto;border:2px solid var(--neon)}
.pm-id h3{font-size:19px;font-weight:800}
.pm-id h3 i{font-style:normal;color:var(--neon);font-family:'JetBrains Mono',monospace;font-size:15px}
.pm-team{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:var(--text-soft);margin-top:4px}
.pm-team img{width:18px;height:18px;object-fit:contain;flex:0 0 auto}
.pm-meta{color:var(--text-mute);font-size:13px;margin-top:3px}
.pm-sec{font-size:11px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:var(--text-mute);margin:18px 0 8px}
.pm-tbl{width:100%;border-collapse:collapse;font-size:13px}
.pm-tbl th,.pm-tbl td{padding:8px 6px;text-align:center;border-bottom:1px solid var(--border-soft)}
.pm-tbl th{font-size:10px;text-transform:uppercase;letter-spacing:.5px;color:var(--text-mute);font-weight:700}
.pm-tbl .pm-liga{text-align:left;display:flex;align-items:center;gap:8px;font-weight:600}
.pm-tbl .pm-liga img{width:18px;height:18px;object-fit:contain;background:#fff;border-radius:3px;padding:1px}
.pm-tbl .pm-rt{font-weight:800;color:var(--neon);font-family:'JetBrains Mono',monospace}
.pm-empty{padding:24px;text-align:center;color:var(--text-mute)}
/* últimos 5 jogos no modal — tabela larga de scouts (rola na horizontal, igual partida) */
.pm-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 -4px}
.pm-u-tbl{white-space:nowrap;min-width:max-content}
.pm-u-tbl th,.pm-u-tbl td{padding:7px 7px}
.pm-u-tbl thead th{position:sticky;top:0;background:var(--bg-elev)}
.pm-u-tbl .pm-jg{text-align:left;display:flex;align-items:center;gap:6px;white-space:nowrap}
.pm-u-tbl .pm-jg img{width:18px;height:18px;object-fit:contain;flex:0 0 auto}
.pm-u-tbl .pm-jg .pm-op{font-weight:600;overflow:hidden;text-overflow:ellipsis;max-width:80px;color:var(--text-soft)}
.pm-u-tbl .pm-sc{font-family:'JetBrains Mono',monospace;font-weight:700;font-size:12px;flex:0 0 auto}
.pm-u-tbl .pm-sc i{font-style:normal;color:var(--text-mute);font-weight:500;margin:0 1px}
.pm-jrow{cursor:pointer}
.pm-jrow:hover{background:var(--bg-elev-2)}
.pm-jrow:focus-visible{outline:2px solid var(--neon);outline-offset:-2px}
