/* ==============================
   PALETA TIME CERTO
   ============================== */
:root {
  /* Estes são os valores PADRÃO (Time Certo). Um clube que configurou o tema em
     Configurações do Clube sobrescreve o :root inteiro via <style> injetado pelo
     MainLayout — os valores derivados são calculados em C# (TimeCertoTheme.Resolve),
     não aqui, para o CSS e o tema do MudBlazor nunca saírem de sincronia.

     São três escolhas do clube:
       --bc-bg      fundo do site   (o resto das superfícies deriva dele)
       --bc-accent  destaque ÚNICO  (header, botões, links, ícones, barras)
       --bc-text    cor do texto    (--bc-muted deriva dele)                        */
  --bc-bg:            #0B1431;
  --bc-bg-deep:       #10192F;
  --bc-surface:       #16203C;
  --bc-surface-2:     #212C47;
  --bc-accent:        #FB6600;
  --bc-accent-lt:     #FC8C3D;
  --bc-accent-dk:     #C45000;
  --bc-on-accent:     #FFFFFF;
  --bc-accent-text:   #FD8F42;
  --bc-text:          #FDFDFD;
  --bc-muted:         #94A0B7;
  --bc-border:        #333C57;
  --bc-accent-soft:   rgba(251,102,0,.14);
  --bc-accent-soft-2: rgba(251,102,0,.28);
  /* Superfícies EM CIMA do destaque (botões dentro do header) — derivam da cor de
     contraste, senão um destaque claro engoliria um botão "branco 16%". */
  --bc-on-accent-soft:   rgba(255,255,255,.16);
  --bc-on-accent-soft-2: rgba(255,255,255,.30);
  --bc-accent-glow:   rgba(251,102,0,.38);
  --bc-surface-glass: rgba(22,32,60,.72);
  --bc-border-soft:   rgba(253,253,253,.12);

  /* Cores semânticas — NÃO mudam com o tema do clube, de propósito: verde é "pago",
     vermelho é "erro", âmbar é "atenção" em qualquer clube. */
  --bc-success:       #22C55E;
  --bc-warning:       #FB9A14;
  --bc-error:         #EF4444;
  --bc-success-text:  #4ADE80;
  --bc-warning-text:  #FCD34D;
  --bc-error-text:    #F87171;

  /* Placa da logo nos temas claros — marinho da marca, não a cor do clube: a logo é do
     Time Certo e continua a mesma em qualquer clube. */
  --tc-logo-plate:    #0B1431;
}

html, body { height: 100%; margin: 0; }

/* Quando instalado na tela inicial (standalone), bloqueia pinch-zoom e
   double-tap-zoom para o app se comportar como nativo. Em aba normal do
   navegador o zoom continua liberado. */
@media (display-mode: standalone) {
  html, body { touch-action: manipulation; }
}

body {
  background: linear-gradient(160deg, var(--bc-bg) 0%, var(--bc-bg-deep) 60%, var(--bc-bg) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--bc-text);
  font-family: 'Poppins', 'Inter', sans-serif;
}

a { color: var(--bc-accent-text); text-decoration: none; }

/* ---- Boot loader ---- */
.bc-boot {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 24px;
  background: linear-gradient(160deg, var(--bc-bg) 0%, var(--bc-bg-deep) 60%, var(--bc-bg) 100%);
}
.bc-boot-logo { font-weight: 900; font-size: 2rem; letter-spacing: .08em; color: var(--bc-accent-text); }
.bc-boot-logo span { color: var(--bc-text); }
.bc-boot-logo-img {
  width: 128px; height: auto; filter: drop-shadow(0 0 24px var(--bc-accent-glow));
  opacity: .5; animation: bc-pulse 1.7s ease-in-out infinite;
}
@keyframes bc-pulse {
  0%, 100% { opacity: .5; transform: scale(1); }
  50% { opacity: .85; transform: scale(1.08); }
}

/* ---- Loading (logo pulsando, usado em todas as telas) ---- */
.bc-loading {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 200px; padding: 24px;
}
.bc-loading-logo {
  width: 64px; height: auto; opacity: .5;
  animation: bc-pulse 1.7s ease-in-out infinite;
}

/* ---- Animações ---- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
@keyframes bounceSoft { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-8px) scale(1.04); } }
.animate-fadeIn { animation: fadeIn .45s ease-out forwards; }
.animate-scaleIn { animation: scaleIn .25s ease-out forwards; }
.animate-bounceSoft { animation: bounceSoft 2.2s ease-in-out infinite; }
.page-animate { animation: fadeIn .4s ease-out; }

/* ---- Marca em tema claro ----
   37% dos pixels sólidos da logo são quase-brancos: as faixas do escudo e o "TIME"
   prateado. Em fundo claro eles somem — e por serem INTERNOS à arte, contorno externo
   não resolve nada. A saída é a mesma do manual de marca: a versão sobre placa de
   proteção. O fundo entra na própria <img> (o PNG é transparente), então nenhum wrapper
   é preciso e as animações/seletores de quem usa continuam valendo.
   Padding em %: acompanha o tamanho da logo em cada lugar (boot, login, sidebar). */
/* Respiro em px, NUNCA em %: padding percentual se mede pela largura do elemento PAI —
   dentro de um container largo ele engolia a área de conteúdo e sobrava só a placa. */
.brand-logo-on-light {
  background: var(--tc-logo-plate);
  border-radius: 22%;
  padding: 7px;
  box-sizing: border-box;
  box-shadow: 0 4px 14px rgba(11, 20, 49, .18);
}
/* Logos pequenas (sidebar 42px, topo da landing 34px) precisam de menos respiro. */
.sidebar-brand-logo.brand-logo-on-light,
.landing-nav-brand .brand-logo-on-light { padding: 4px; border-radius: 26%; }

/* ---- Tipografia / marca ---- */
.brand-text {
  background: linear-gradient(90deg, var(--bc-accent), var(--bc-accent-lt));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.login-logo-img { width: 140px; height: auto; filter: drop-shadow(0 0 30px var(--bc-accent-glow)); }

/* ---- Glass cards ---- */
.glass-card {
  background: var(--bc-surface-glass);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bc-border-soft);
  box-shadow: 0 8px 32px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06);
  border-radius: 16px;
}

/* ---- Recorte de foto (Cropper.js) ---- */
.bc-crop-wrap { width: 100%; height: 320px; overflow: hidden; border-radius: 12px; background: #000; }
.bc-crop-wrap img { display: block; max-width: 100%; }
.bc-crop-wrap.bc-crop-round .cropper-view-box,
.bc-crop-wrap.bc-crop-round .cropper-face { border-radius: 50%; }
.bc-crop-wrap .cropper-view-box { outline: 1px solid var(--bc-accent); }
.bc-crop-wrap .cropper-line, .bc-crop-wrap .cropper-point { background-color: var(--bc-accent); }

/* ---- Headers ----
   As duas classes existem por histórico (uma era azul, outra laranja). Hoje as duas
   usam o MESMO destaque: o clube escolhe uma cor e o header inteiro vira ela. */
.header-brand,
.header-orange {
  background: linear-gradient(135deg, var(--bc-accent-dk) 0%, var(--bc-accent) 55%, var(--bc-accent-lt) 100%);
  color: var(--bc-on-accent);
}
/* Texto/ícones dentro do header acompanham o contraste da cor escolhida — sem isso um
   destaque claro (amarelo, lima) ficaria com texto branco ilegível. */
.header-brand h1, .header-orange h1,
.header-brand h2, .header-orange h2,
.header-brand h3, .header-orange h3,
.header-brand p,  .header-orange p,
.header-brand .mud-icon-root, .header-orange .mud-icon-root,
.header-brand button, .header-orange button { color: var(--bc-on-accent); }

/* ---- Inputs ---- */
.custom-input {
  background: var(--bc-surface-glass);
  border: 1.5px solid var(--bc-border);
  transition: all .25s ease; color: var(--bc-text); border-radius: 12px;
}
.custom-input:focus {
  border-color: var(--bc-accent);
  box-shadow: 0 0 0 3px var(--bc-accent-soft-2), 0 0 20px var(--bc-accent-soft);
  outline: none;
}
.custom-input::placeholder { color: var(--bc-muted); }

/* ---- Botões ---- */
/* Os dois botões usam o MESMO destaque; o que muda é o peso — o cheio para a ação
   principal, o vazado para a secundária. Antes eram duas cores diferentes (laranja e
   azul), o que fazia o tema do clube parecer que só pintava metade da tela. */
.btn-primary {
  background: linear-gradient(135deg, var(--bc-accent) 0%, var(--bc-accent-lt) 100%);
  color: var(--bc-on-accent); font-weight: 700; transition: all .25s ease;
  box-shadow: 0 4px 16px var(--bc-accent-glow); border: none; cursor: pointer;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px var(--bc-accent-glow); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-secondary {
  background: var(--bc-accent-soft);
  color: var(--bc-accent-text); font-weight: 700; border: 1px solid var(--bc-accent-soft-2);
  transition: all .25s ease; cursor: pointer;
}
.btn-secondary:hover { transform: translateY(-1px); background: var(--bc-accent-soft-2); box-shadow: 0 4px 16px var(--bc-accent-soft-2); }
.btn-secondary:disabled { opacity: .6; cursor: not-allowed; }

/* ---- Badges ---- */
.badge { padding: 3px 10px; border-radius: 6px; font-size: .72rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px; }
.badge-orange { background: var(--bc-accent-soft); border: 1px solid var(--bc-accent-glow); color: var(--bc-accent-text); }
.badge-blue { background: var(--bc-accent-soft-2); border: 1px solid var(--bc-border); color: var(--bc-accent-text); }
.badge-green { background: rgba(34,197,94,.15); border: 1px solid rgba(34,197,94,.5); color: var(--bc-success-text); }
.badge-red { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.5); color: var(--bc-error-text); }

/* ---- Bottom nav (mobile, estilo app) ---- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-radius: 22px 22px 0 0; z-index: 1000;
  background: var(--bc-surface-glass);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--bc-border-soft);
  box-shadow: 0 -8px 32px rgba(0,0,0,.5);
}
.bottom-nav button { transition: background .2s ease, transform .15s ease; }
.bottom-nav button:active { transform: scale(.94); }

/* ==============================
   APP SHELL — sidebar no desktop, bottom nav no mobile
   ============================== */
.app-sidebar { display: none; }

@media (min-width: 960px) {
  .app-shell { display: flex; }
  .app-sidebar {
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0; width: 264px;
    background: var(--bc-surface-glass);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--bc-border-soft);
    padding: 20px 14px; z-index: 900; overflow-y: auto;
  }
  .app-content { flex: 1; margin-left: 264px; min-width: 0; }
  .bottom-nav { display: none; }
  .pb-nav { padding-bottom: 40px !important; }
  .app-content .content-wrap { max-width: 1080px; }
  .header-orange, .header-brand { border-radius: 0 0 22px 22px; }
  .app-content .game-card:hover, .app-content .pricing-card:hover { transform: translateY(-3px); }
  /* O que só existe porque a sidebar está escondida (ex.: trocar de clube no header). */
  .only-mobile { display: none !important; }
}

/* ---- Ações de admin do Início ----
   Flex (e não grid de 2 colunas fixas): quando o plano esconde Mensalidades/Financeiro,
   os botões restantes crescem e ficam lado a lado, sem deixar meia linha vazia. */
.admin-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.admin-actions > button {
  flex: 1 1 calc(50% - 6px); min-width: 150px;
  padding: 14px; border-radius: 14px; font-weight: 700; cursor: pointer;
  transition: transform .15s ease, filter .18s ease;
}
.admin-actions > button:hover { transform: translateY(-1px); filter: brightness(1.08); }

/* ---- Escolha do "Criar" (CreateChoiceDialog) ---- */
.create-choice {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--bc-surface); border: 1px solid var(--bc-border); border-radius: 14px;
  padding: 14px; cursor: pointer; color: var(--bc-text);
  transition: border-color .2s ease, background .2s ease, transform .15s ease;
}
.create-choice:hover { border-color: var(--bc-accent); background: var(--bc-surface-2); transform: translateY(-1px); }
.create-choice:focus-visible { outline: 2px solid var(--bc-accent); outline-offset: 2px; }
.create-choice-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.create-choice-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.create-choice-text strong { font-size: .95rem; font-weight: 800; }
.create-choice-text small { font-size: .75rem; color: var(--bc-muted); line-height: 1.35; }

/* ---- Troca de clube ---- */
.club-switch-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 12px; border-radius: 10px; cursor: pointer; color: inherit;
  background: var(--bc-accent-soft); border: 1px solid var(--bc-border-soft);
  font-weight: 700; font-size: .8rem; line-height: 1;
  transition: background .18s ease, transform .15s ease;
}
.club-switch-btn:hover { background: var(--bc-accent-soft-2); }
.club-switch-btn:active { transform: scale(.94); }
.club-switch-btn:disabled { opacity: .6; cursor: not-allowed; }

.club-switch-list { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 2px; }
.club-switch-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px;
  padding: 12px; border-radius: 14px; cursor: pointer; text-align: left;
  background: var(--bc-surface-glass); border: 1px solid var(--bc-border-soft);
  color: var(--bc-text);
  transition: border-color .18s ease, background .18s ease, transform .15s ease;
}
.club-switch-item:hover:not(:disabled) { border-color: var(--bc-accent); background: var(--bc-accent-soft); }
.club-switch-item:active:not(:disabled) { transform: scale(.985); }
.club-switch-item.active { border-color: var(--bc-accent); background: var(--bc-accent-soft); cursor: default; opacity: 1; }
.club-switch-logo { width: 42px; height: 42px; border-radius: 11px; object-fit: cover; flex: none; }
.club-switch-logo-fallback {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--bc-accent-soft); color: var(--bc-accent-text);
}
.club-switch-name { font-weight: 700; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.club-switch-role { font-size: .74rem; color: var(--bc-muted); }

/* Cobre a tela do clique até o app recarregar já no clube novo. Fica ACIMA de tudo
   (bottom nav = 1000, sidebar = 900, diálogos do MudBlazor = 1400). */
.bc-switch-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  padding: 24px; text-align: center;
  background: linear-gradient(160deg, var(--bc-bg) 0%, var(--bc-bg-deep) 60%, var(--bc-bg) 100%);
  animation: fadeIn .2s ease-out;
}
.bc-switch-logo {
  width: 96px; max-height: 96px; object-fit: contain; border-radius: 18px;
  filter: drop-shadow(0 0 24px var(--bc-accent-glow));
  animation: bc-pulse 1.7s ease-in-out infinite;
}
.bc-switch-text { color: var(--bc-text); font-size: .95rem; font-weight: 600; }
.bc-switch-text b { color: var(--bc-accent-text); }

.sidebar-brand {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 24px;
  cursor: pointer; font-weight: 900; letter-spacing: .02em; font-size: 1.05rem;
}
.sidebar-brand b { color: var(--bc-accent-text); }
.sidebar-brand-ball { font-size: 1.5rem; }
.sidebar-brand-logo { height: 42px; width: auto; max-width: 170px; object-fit: contain; }

.sidebar-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.sidebar-section-label {
  margin: 18px 10px 6px; font-size: .68rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: var(--bc-muted);
}
.sidebar-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--bc-muted); font-size: .88rem; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: background .18s ease, color .18s ease;
}
.sidebar-link:hover { background: var(--bc-accent-soft); color: var(--bc-text); }
.sidebar-link.active {
  background: linear-gradient(135deg, var(--bc-accent) 0%, var(--bc-accent-lt) 100%);
  color: var(--bc-on-accent); box-shadow: 0 4px 14px var(--bc-accent-glow);
}
.sidebar-footer {
  border-top: 1px solid var(--bc-border-soft); padding-top: 12px; margin-top: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.sidebar-logout {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  border: none; background: transparent; color: #EF4444; font-weight: 700; font-size: .85rem;
  cursor: pointer; width: 100%; text-align: left; transition: background .18s ease;
}
.sidebar-logout:hover { background: rgba(239,68,68,.12); }

/* ---- Edição de times (arrastar/tocar para trocar dois jogadores) ---- */
.team-player-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; }
.team-edit-row {
  padding: 7px 10px; margin: 3px -6px; border-radius: 12px; cursor: grab;
  border: 1.5px dashed var(--bc-border-soft); background: rgba(255,255,255,.03);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
  -webkit-user-select: none; user-select: none;
  /* o arrasto é do elemento inteiro; sem isso o navegador tenta arrastar a foto do jogador */
  -webkit-touch-callout: none;
}
.team-edit-row:hover { border-color: var(--bc-accent-soft-2); background: var(--bc-accent-soft); }
.team-edit-row:active { cursor: grabbing; transform: scale(.99); }
.team-edit-row.selected {
  border-style: solid; border-color: var(--bc-accent);
  background: var(--bc-accent-soft); box-shadow: 0 0 0 3px var(--bc-accent-soft);
}
.team-edit-row.drop-target {
  border-style: solid; border-color: var(--bc-warning); background: rgba(251,154,20,.14);
}
.team-edit-row img { pointer-events: none; }

/* ---- Game card ---- */
.game-card {
  background: var(--bc-surface-glass);
  border: 1px solid var(--bc-border-soft);
  backdrop-filter: blur(12px); transition: all .3s ease; border-radius: 16px;
}
.game-card:hover { border-color: var(--bc-accent-glow); box-shadow: 0 8px 32px var(--bc-accent-soft); transform: translateY(-2px); }
.game-card-active { border-color: #22C55E !important; box-shadow: 0 0 20px rgba(34,197,94,.25) !important; }

/* ---- Progress ---- */
.progress-bar { background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; height: 8px; }
.progress-fill { background: linear-gradient(90deg, var(--bc-accent), var(--bc-accent-lt)); border-radius: 999px; height: 100%; transition: width .6s ease; }

/* ---- Level badge ---- */
.level-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; font-weight: 800; color: #fff; font-size: 1rem;
}
.level-1 { background: linear-gradient(135deg,#6B7280,#9CA3AF); }
.level-2 { background: linear-gradient(135deg,#16A34A,#4ADE80); }
.level-3 { background: linear-gradient(135deg,#2563EB,#60A5FA); }
.level-4 { background: linear-gradient(135deg,#9333EA,#C084FC); }
.level-5 { background: linear-gradient(135deg,#F59E0B,#FCD34D); }
.level-6 { background: linear-gradient(135deg,#DC2626,#F87171); }

/* ---- Placar ---- */
.score-display { font-size: 4rem; font-weight: 900; text-shadow: 0 4px 20px rgba(0,0,0,.5); line-height: 1; }
@media (max-width: 640px) { .score-display { font-size: 3rem; } }

/* ---- Layout ---- */
.content-wrap { max-width: 640px; margin: 0 auto; width: 100%; }
/* !important necessário: várias páginas usam style="padding:20px" inline no mesmo elemento,
   e isso sobrescreveria o respiro reservado pro bottom nav flutuante (mobile). */
.pb-nav { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bc-surface); }
::-webkit-scrollbar-thumb { background: var(--bc-accent-glow); border-radius: 4px; }

/* ---- Cabeçalho padrão de página (PageHeader.razor) ---- */
/* Toda tela interna abre igual: voltar no topo à esquerda, ações à direita, e só
   embaixo o título. Antes cada página inventava o seu, e metade não tinha como voltar. */
.page-header { padding: 16px 20px 20px; }
/* Sem min-height: quando a linha não tem botão nenhum (tela raiz no desktop) ela
   encolhe sozinha, em vez de deixar uma faixa vazia acima do título. */
.page-header-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.page-header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* Componente que usa as variáveis de destaque mas vive DENTRO do header colorido
   (o trocar-clube): as variáveis passam a sair da cor de contraste do header. */
.header-on-accent {
  --bc-accent-soft: var(--bc-on-accent-soft);
  --bc-accent-soft-2: var(--bc-on-accent-soft-2);
  --bc-border-soft: var(--bc-on-accent-soft-2);
  --bc-accent-text: var(--bc-on-accent);
}
.page-header-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.page-header-icon {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  background: var(--bc-on-accent-soft); display: flex; align-items: center; justify-content: center;
}
.page-header h1 { font-weight: 800; font-size: 1.35rem; margin: 0; line-height: 1.2; }
.page-header .page-header-sub { margin: 3px 0 0; font-size: .84rem; opacity: .85; }

/* Botões dentro de um header colorido: fundo tirado da própria cor de contraste. */
.header-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--bc-on-accent-soft); border: none; color: var(--bc-on-accent);
  padding: 9px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .82rem;
  transition: background .2s ease;
}
.header-action:hover { background: var(--bc-on-accent-soft-2); }
/* Só ícone: alvo de toque quadrado de 38px (o mínimo confortável no celular). */
.header-action-icon { padding: 9px; min-width: 38px; }

/* ---- Estado vazio (EmptyState.razor) ---- */
.empty-state { padding: 34px 24px; text-align: center; }
.empty-state-icon {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 14px;
  background: var(--bc-accent-soft); display: flex; align-items: center; justify-content: center;
}
.empty-state h3 { margin: 0 0 6px; font-size: 1rem; font-weight: 700; }
.empty-state p { margin: 0; color: var(--bc-muted); font-size: .85rem; line-height: 1.55; }

/* ---- Navegação por seções (pílulas roláveis) ---- */
/* A barra rola sozinha no celular; a scrollbar visível só sujaria a faixa. */
.tab-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tab-scroll::-webkit-scrollbar { display: none; }
.tab-pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0;
  padding: 9px 15px; border-radius: 999px; cursor: pointer; font-size: .82rem; font-weight: 700;
  background: var(--bc-surface); color: var(--bc-muted); border: 1px solid var(--bc-border);
}
.tab-pill:hover { color: var(--bc-text); }
.tab-pill-active { background: var(--bc-accent); color: var(--bc-on-accent); border-color: var(--bc-accent); }
.tab-pill-active:hover { color: var(--bc-on-accent); }

/* O triângulo padrão do <details> não combina com os cards; o ícone fica no próprio summary. */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* ==============================
   SELEÇÃO (segmentos, chips, régua de níveis, passos)
   Blocos de escolha que aparecem em telas de entrada — hoje o convite, e qualquer
   formulário que precise das mesmas peças. Tudo sai das variáveis do tema do clube.
   ============================== */

/* Alternador de duas ou três opções, no lugar de dois botões soltos lado a lado. */
.seg-control {
  display: flex; gap: 4px; padding: 4px; border-radius: 14px;
  background: var(--bc-surface); border: 1px solid var(--bc-border);
}
.seg-option {
  flex: 1; padding: 10px 12px; border: none; border-radius: 10px; background: none; cursor: pointer;
  color: var(--bc-muted); font-weight: 700; font-size: .85rem; transition: all .2s ease;
}
.seg-option:hover { color: var(--bc-text); }
.seg-option-active {
  background: var(--bc-accent); color: var(--bc-on-accent);
  box-shadow: 0 4px 14px var(--bc-accent-glow);
}
.seg-option-active:hover { color: var(--bc-on-accent); }

/* Opção múltipla em bloco (posições no cadastro). */
.chip-select {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 12px 6px; border-radius: 12px; cursor: pointer;
  font-weight: 700; font-size: .78rem; line-height: 1.2;
  background: var(--bc-surface); border: 1.5px solid var(--bc-border); color: var(--bc-muted);
  transition: all .2s ease;
}
.chip-select:hover { border-color: var(--bc-accent-glow); color: var(--bc-text); }
.chip-select-active {
  border-color: var(--bc-accent); background: var(--bc-accent-soft); color: var(--bc-accent-text);
}

/* Régua de níveis: cada nível com quem do clube joga nele (ver LevelPicker.razor). */
.level-option {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 14px; cursor: pointer;
  background: var(--bc-surface); border: 1.5px solid var(--bc-border);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.level-option:hover { border-color: var(--bc-accent-glow); transform: translateY(-1px); }
.level-option-active {
  border-color: var(--bc-accent); background: var(--bc-accent-soft);
  box-shadow: 0 0 0 3px var(--bc-accent-soft-2);
}
.level-option-title { font-weight: 700; font-size: .9rem; color: var(--bc-text); }
.level-option-meta {
  color: var(--bc-muted); font-size: .74rem; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Fotos sobrepostas: o recorte com a cor do card é o que separa uma da outra. */
.level-stack { display: flex; align-items: center; flex-shrink: 0; }
.level-stack-item { display: inline-flex; border-radius: 50%; box-shadow: 0 0 0 2px var(--bc-surface); }
.level-stack-item + .level-stack-item { margin-left: -10px; }
.level-option-active .level-stack-item { box-shadow: 0 0 0 2px var(--bc-accent-soft); }

/* Progresso de formulário em etapas. */
.step-track { display: flex; align-items: center; gap: 6px; }
.step-dot { flex: 1; height: 4px; border-radius: 999px; background: var(--bc-border); transition: background .3s ease; }
.step-dot-done { background: var(--bc-accent); }

/* ---- Convite (/convite/{code}) ---- */
/* A logo do clube é o que dá o "sou eu que estou te chamando": vem grande, com um halo
   na cor de destaque em vez de um quadrado solto no topo. */
.invite-logo {
  width: 84px; height: 84px; border-radius: 24px; object-fit: cover;
  box-shadow: 0 14px 40px rgba(0,0,0,.45), 0 0 0 6px var(--bc-accent-soft);
}
.invite-logo-fallback {
  display: flex; align-items: center; justify-content: center;
  background: var(--bc-accent-soft); border: 1px solid var(--bc-border-soft);
}

/* ==============================
   LANDING PAGE (/)
   ============================== */
.landing-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: var(--bc-surface-glass);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bc-border-soft);
}
.landing-nav-brand { display: flex; align-items: center; }
.landing-nav-brand img { height: 34px; width: auto; }
.landing-nav-links { display: flex; gap: 28px; align-items: center; }
.landing-nav-links a { color: var(--bc-text); font-size: .9rem; font-weight: 500; }
.landing-nav-links a:hover { color: var(--bc-accent-text); }
.landing-container { max-width: 1180px; margin: 0 auto; padding: 0 24px; width: 100%; box-sizing: border-box; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  border-radius: 999px; background: var(--bc-accent-soft); border: 1px solid var(--bc-accent-glow);
  color: var(--bc-accent-text); font-size: .78rem; font-weight: 700;
}
.landing-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 64px 0 40px; }
.hero-title { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 900; line-height: 1.1; margin: 18px 0; }
.hero-sub { color: var(--bc-muted); font-size: 1.05rem; max-width: 480px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin: 24px 0 14px; }
.hero-perks { display: flex; gap: 18px; flex-wrap: wrap; font-size: .82rem; color: var(--bc-muted); }
.hero-perks span { display: inline-flex; align-items: center; gap: 6px; }

.hero-visual { position: relative; min-height: 320px; display: flex; align-items: center; justify-content: center; }
.hero-ball { font-size: 5.5rem; filter: drop-shadow(0 12px 30px var(--bc-accent-glow)); animation: bounceSoft 3s ease-in-out infinite; }
.hero-float-card {
  position: absolute; padding: 10px 14px; border-radius: 12px; font-size: .78rem; font-weight: 700;
  animation: fadeIn .6s ease-out forwards;
}
.hero-float-card small { display: block; font-weight: 500; color: var(--bc-muted); font-size: .68rem; margin-bottom: 2px; }

.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 28px; margin: 12px 0 64px; }
.stat-item { text-align: center; }
.stat-item .num { font-size: 1.9rem; font-weight: 900; color: var(--bc-text); }
.stat-item .lbl { font-size: .78rem; color: var(--bc-muted); margin-top: 2px; }

.section-head { text-align: center; max-width: 560px; margin: 0 auto 40px; }
.section-eyebrow { color: var(--bc-accent-text); font-weight: 800; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.section-title { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 900; margin: 8px 0; }
.section-sub { color: var(--bc-muted); font-size: .95rem; }

.landing-section { padding: 56px 0; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card { padding: 22px; }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bc-accent-soft-2), var(--bc-accent-soft)); color: var(--bc-accent-text); margin-bottom: 12px;
}
.feature-card h3 { font-size: 1rem; margin: 0 0 6px; }
.feature-card p { font-size: .85rem; color: var(--bc-muted); margin: 0; line-height: 1.5; }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; }
.step-item { text-align: center; }
.step-icon {
  width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; color: var(--bc-on-accent);
}
.step-num { color: var(--bc-accent-text); font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.step-item h3 { margin: 4px 0 6px; font-size: 1rem; }
.step-item p { color: var(--bc-muted); font-size: .85rem; margin: 0; }

.price-callout {
  display: flex; align-items: center; gap: 14px; max-width: 640px; margin: 0 auto 32px;
  padding: 16px 22px; border-radius: 14px; text-align: left;
  background: var(--bc-accent-soft); border: 1.5px solid var(--bc-accent-glow);
  color: var(--bc-text); font-size: .9rem;
}
.price-callout .mud-icon-root { color: var(--bc-accent-text); font-size: 1.8rem; flex-shrink: 0; }
.price-callout-example { display: block; color: var(--bc-muted); font-size: .8rem; margin-top: 2px; }

.price-calc { margin: 4px 0 16px; padding: 12px; border-radius: 10px; background: var(--bc-surface-glass); border: 1px solid var(--bc-border); }
.price-calc label { display: block; font-size: .75rem; color: var(--bc-muted); margin-bottom: 6px; }
.price-calc-row { display: flex; align-items: center; gap: 8px; }
.price-calc-row input { width: 72px; padding: 7px 10px; font-size: .9rem; text-align: center; }
.price-calc-row span { font-size: .8rem; color: var(--bc-muted); }
.price-calc-result { margin-top: 8px; font-weight: 800; font-size: 1.1rem; color: var(--bc-accent-text); }
.price-calc-result span { font-size: .7rem; font-weight: 600; color: var(--bc-muted); margin-left: 2px; }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.pricing-card { padding: 24px; display: flex; flex-direction: column; position: relative; }
.pricing-card-popular { border: 1.5px solid var(--bc-accent) !important; box-shadow: 0 0 32px var(--bc-accent-soft-2) !important; }
.pricing-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--bc-accent), var(--bc-accent-lt)); color: var(--bc-on-accent); font-size: .68rem; font-weight: 800;
  padding: 5px 14px; border-radius: 999px; white-space: nowrap;
}
.pricing-price { font-size: 2.1rem; font-weight: 900; margin: 10px 0 2px; }
.pricing-price span { font-size: .8rem; font-weight: 600; color: var(--bc-muted); }
.pricing-features { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.pricing-features li { display: flex; align-items: flex-start; gap: 8px; font-size: .83rem; color: var(--bc-text); }

.cta-banner { text-align: center; padding: 48px 24px; margin: 24px 0 64px; }

@media (max-width: 900px) {
  .landing-hero { grid-template-columns: 1fr; gap: 32px; padding-top: 32px; }
  .hero-visual { min-height: 220px; order: -1; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; }
  .landing-nav-links { display: none; }
}
@media (max-width: 560px) {
  .features-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); padding: 20px; }
}

/* ---- Sorteio dos times (TeamDrawDialog) ----
   Os jogadores são posicionados em porcentagem/px pelo componente e SÓ o style muda
   entre as etapas: como o elemento é o mesmo, a transição do navegador faz cada
   jogador viajar até a nova posição em vez de piscar no lugar novo. */
.draw-root { padding: 4px 2px 2px; }
.draw-in { animation: drawIn .38s cubic-bezier(.22,1,.36,1) both; }
.draw-out { animation: drawOut .36s ease-in forwards; }
@keyframes drawIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes drawOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.96); } }

.draw-head { text-align: center; margin-bottom: 14px; }
.draw-steps { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; }
.draw-step {
  width: 26px; height: 4px; border-radius: 999px; background: var(--bc-border);
  transition: background .4s ease, box-shadow .4s ease, transform .4s ease;
}
.draw-step.done { background: var(--bc-accent-dk); }
.draw-step.on { background: var(--bc-accent); transform: scaleY(1.6); box-shadow: 0 0 10px var(--bc-accent-glow); }
.draw-title { margin: 0; font-size: 1.05rem; font-weight: 800; letter-spacing: .01em; }
.draw-sub { margin: 4px 0 0; font-size: .78rem; color: var(--bc-muted); min-height: 2.2em; }

.draw-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.draw-metrics > div {
  background: var(--bc-surface); border: 1px solid var(--bc-border-soft);
  border-radius: 12px; padding: 8px 4px; text-align: center;
}
.draw-metrics strong { display: block; font-size: 1.15rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.draw-metrics small { display: block; font-size: .62rem; color: var(--bc-muted); margin-top: 2px; }
.draw-metric-cap { border-color: var(--bc-accent-glow) !important; }
.draw-metric-cap strong { color: var(--bc-accent-text); }

.draw-teamheads { display: grid; gap: 4px; margin-bottom: 6px; }
.draw-teamhead {
  border-radius: 10px 10px 0 0; padding: 5px 2px; text-align: center; min-width: 0;
  background: color-mix(in srgb, var(--tc-team) 22%, transparent);
  border-bottom: 2px solid var(--tc-team);
}
.draw-teamdot { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--tc-team); margin: 0 auto 3px; }
.draw-teamname {
  display: block; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px;
}
.draw-teamsum { display: block; font-size: .78rem; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--bc-accent-text); }

.draw-stage { position: relative; width: 100%; transition: height .7s cubic-bezier(.22,1,.36,1); }
.draw-lane {
  position: absolute; left: 0; right: 0; border-radius: 10px;
  background: var(--bc-surface); border: 1px dashed var(--bc-border);
  animation: fadeIn .5s ease-out both;
}
.draw-slot {
  position: absolute; padding: 3px; box-sizing: border-box;
  transition: left .72s cubic-bezier(.22,1,.36,1), top .72s cubic-bezier(.22,1,.36,1),
              width .72s cubic-bezier(.22,1,.36,1), opacity .45s ease, transform .45s ease;
}
.draw-slot.dropped { opacity: .16; transform: scale(.8); filter: grayscale(1); }
.draw-slot.gone { opacity: 0; pointer-events: none; }
.draw-chip {
  height: 52px; box-sizing: border-box; border-radius: 10px; padding: 4px 2px;
  background: var(--bc-surface-2); border: 1.5px solid var(--tc-team, var(--bc-border-soft));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  position: relative; overflow: hidden; transition: border-color .5s ease, box-shadow .5s ease, background .5s ease;
}
.draw-chip.hot { box-shadow: 0 0 0 2px var(--bc-accent-soft-2), 0 0 16px var(--bc-accent-soft); }
.draw-chip-name {
  font-size: .6rem; font-weight: 700; max-width: 100%; padding: 0 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.draw-chip-level {
  position: absolute; top: 2px; right: 2px; width: 15px !important; height: 15px !important;
  font-size: .55rem !important; border: 1px solid var(--bc-surface-2);
}

.draw-balance { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.draw-balance-row { display: flex; align-items: center; gap: 8px; }
.draw-balance-name {
  font-size: .68rem; font-weight: 700; width: 62px; flex-shrink: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.draw-balance-track { flex: 1; height: 7px; border-radius: 999px; background: var(--bc-surface); overflow: hidden; }
.draw-balance-fill { height: 100%; border-radius: 999px; background: var(--tc-team); transition: width .8s cubic-bezier(.22,1,.36,1); }
.draw-balance-value { font-size: .7rem; font-weight: 800; font-variant-numeric: tabular-nums; width: 22px; text-align: right; }
.draw-balance-note { margin: 8px 0 0; text-align: center; font-size: .72rem; color: var(--bc-muted); }
.draw-dropped { margin: 10px 0 0; text-align: center; font-size: .68rem; color: var(--bc-muted); }

/* Quem pediu menos movimento continua vendo as etapas — só sem a viagem pela tela. */
@media (prefers-reduced-motion: reduce) {
  .draw-slot, .draw-stage, .draw-balance-fill { transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .draw-in, .draw-out, .draw-lane { animation-duration: .01ms !important; }
}

/* ---- Blazor error ---- */
#blazor-error-ui {
  background: #b91c1c; color: #fff; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2);
  display: none; left: 0; padding: 0.8rem 1.4rem; position: fixed; width: 100%; z-index: 1200;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 1rem; top: .6rem; }
