/* ==========================================================================
   Copa Recife Fitcamp — design system (compartilhado: site + admin)
   Paleta extraída do cabeçalho da tabela oficial: azul #12365F e laranja #F4511E
   ========================================================================== */
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url('../fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url('../fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-display: swap; src: url('../fonts/barlow-condensed-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('../fonts/inter-latin-700-normal.woff2') format('woff2'); }

:root {
  --navy: #12365f;
  --navy-900: #0a2340;
  --navy-700: #1d4a7e;
  --navy-500: #3f6ba3;
  --orange: #f4511e;
  --orange-600: #d9420f;
  --orange-txt: #c23a0a;          /* laranja com contraste AA para texto pequeno em fundo branco */
  --azul-50: #f3f7fc;
  --azul-100: #eaf1f8;
  --azul-200: #ddebf7;
  --laranja-50: #fff4ee;
  --laranja-100: #fce4d6;
  --texto: #1a2a3f;
  --texto-2: #52627a;
  --texto-3: #7d8ba0;
  --borda: #dbe4ee;
  --borda-2: #c6d3e2;
  --branco: #ffffff;
  --verde: #178a4c;
  --verde-bg: #e4f5ec;
  --ambar: #b77900;
  --ambar-bg: #fff3d1;
  --vermelho: #d92d2d;
  --vermelho-bg: #fde8e8;
  --ouro: #d9a400;
  --prata: #8e9aa8;
  --bronze: #b8703a;

  --raio: 14px;
  --raio-sm: 9px;
  --sombra-1: 0 1px 2px rgba(18, 54, 95, .06), 0 1px 1px rgba(18, 54, 95, .04);
  --sombra-2: 0 6px 18px -6px rgba(18, 54, 95, .18), 0 2px 6px rgba(18, 54, 95, .06);
  --sombra-3: 0 20px 44px -12px rgba(18, 54, 95, .28), 0 6px 14px rgba(18, 54, 95, .08);
  --fonte-titulo: 'Barlow Condensed', 'Arial Narrow', 'Segoe UI', sans-serif;
  --fonte: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --abas-h: 54px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--abas-h) + 12px); }
body {
  margin: 0; background: var(--branco); color: var(--texto);
  font: 400 15px/1.5 var(--fonte); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--navy-700); }
h1, h2, h3, h4 { margin: 0; font-family: var(--fonte-titulo); font-weight: 700; letter-spacing: .01em; line-height: 1.05; color: var(--navy); }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pular { position: absolute; left: 12px; top: -60px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 10px; z-index: 100; transition: top .15s; }
.pular:focus { top: 0; }
.num { font-family: var(--fonte-titulo); font-variant-numeric: tabular-nums; }
svg.ico { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }

/* ---------------------------------------------------------------- botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: 999px; border: 1.5px solid transparent; font-weight: 600; font-size: 14.5px; line-height: 1;
  background: var(--navy); color: #fff; text-decoration: none; transition: background .15s, transform .1s, box-shadow .15s, border-color .15s;
  white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--navy-700); box-shadow: var(--sombra-2); }
.btn:active { transform: translateY(1px); }
.btn.laranja { background: var(--orange-600); }
.btn.laranja:hover { background: var(--orange); }
.btn.contorno { background: transparent; color: var(--navy); border-color: var(--borda-2); }
.btn.contorno:hover { background: var(--azul-100); border-color: var(--navy-500); box-shadow: none; }
.btn.suave { background: var(--azul-100); color: var(--navy); }
.btn.suave:hover { background: var(--azul-200); box-shadow: none; }
.btn.pequeno { min-height: 34px; padding: 0 13px; font-size: 13px; }
.btn.perigo { background: var(--vermelho); }
.btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-icone {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--borda);
  background: #fff; color: var(--navy); transition: background .15s, border-color .15s;
}
.btn-icone:hover { background: var(--azul-100); border-color: var(--navy-500); }

/* ---------------------------------------------------------------- chips / pills */
.chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--borda); background: #fff; color: var(--texto); font-weight: 600; font-size: 13.5px;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s; white-space: nowrap; user-select: none;
}
.chip:hover { border-color: var(--navy-500); background: var(--azul-50); }
.chip[aria-pressed="true"], .chip.ativo { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 4px 12px -4px rgba(18, 54, 95, .5); }
.chip .pt { width: 9px; height: 9px; border-radius: 50%; background: var(--cor, var(--navy)); flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .0); }
.chip[aria-pressed="true"] .pt { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.chip .cont { font-size: 12px; font-weight: 700; opacity: .65; }
.chip[disabled] { opacity: .55; cursor: default; background: var(--azul-50); }
.chip[disabled]:hover { border-color: var(--borda); background: var(--azul-50); }
.chip .em-breve { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); font-weight: 700; }

.tag-cat {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 7px; font-size: 12px; font-weight: 700; white-space: nowrap;
  background: var(--bg, var(--azul-200)); color: var(--fg, var(--navy));
}
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.pill.ao-vivo { background: var(--vermelho-bg); color: var(--vermelho); }
.pill.ao-vivo::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--vermelho); animation: pulsar 1.2s ease-out infinite; }
.pill.encerrado { background: var(--azul-100); color: var(--navy-700); }
.pill.agendado { background: #fff; color: var(--texto-2); border: 1px solid var(--borda); }
.pill.wo { background: var(--ambar-bg); color: var(--ambar); }
.pill.verde { background: var(--verde-bg); color: var(--verde); }
@keyframes pulsar { 0% { box-shadow: 0 0 0 0 rgba(217, 45, 45, .55); } 80%, 100% { box-shadow: 0 0 0 8px rgba(217, 45, 45, 0); } }

/* ---------------------------------------------------------------- logo / equipe */
.logo { width: calc(var(--t, 30px) * 1.3); height: var(--t, 30px); flex: none; display: inline-block; position: relative; border-radius: 9px; background: var(--azul-50); overflow: hidden; }
.logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.logo.tem { background: transparent; }
.equipe { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.equipe .nome { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.equipe .uf { font-size: 11px; color: var(--texto-3); font-weight: 600; margin-left: 4px; }
.equipe .indef {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 7px; border: 1.5px dashed var(--borda-2);
  color: var(--texto-2); font-weight: 500; font-style: italic; font-size: .93em; background: var(--azul-50);
}
.equipe.venceu .nome { color: var(--navy); font-weight: 700; }
.equipe.perdeu .nome { color: var(--texto-2); font-weight: 500; }

/* ---------------------------------------------------------------- campos */
.campo { position: relative; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.campo > label, .campo > .rotulo { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--texto-2); }
.entrada, .seletor {
  width: 100%; min-height: 42px; padding: 0 14px; border: 1.5px solid var(--borda-2); border-radius: 11px; background: #fff; color: var(--texto);
  transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
.seletor {
  padding-right: 38px; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2312365f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
.entrada:hover, .seletor:hover { border-color: var(--navy-500); }
.entrada:focus, .seletor:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(244, 81, 30, .16); }
.campo.ativo .seletor, .campo.ativo .combo-btn { border-color: var(--navy); background-color: var(--azul-100); font-weight: 600; }

/* combobox de equipe (com logos) */
.combo { position: relative; }
.combo-btn {
  width: 100%; min-height: 42px; padding: 0 38px 0 10px; border: 1.5px solid var(--borda-2); border-radius: 11px; background: #fff; text-align: left;
  display: flex; align-items: center; gap: 9px; transition: border-color .15s, box-shadow .15s; position: relative; overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2312365f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
.combo-btn:hover { border-color: var(--navy-500); }
.combo-btn:focus-visible, .combo.aberto .combo-btn { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(244, 81, 30, .16); }
.combo-btn .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-btn .ph { color: var(--texto-2); padding-left: 4px; }
.combo-painel {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px); min-width: 250px; background: #fff; border: 1.5px solid var(--borda); border-radius: 13px;
  box-shadow: var(--sombra-3); padding: 8px; animation: entrar .14s ease-out;
}
.combo-painel input { width: 100%; height: 38px; border: 1.5px solid var(--borda); border-radius: 9px; padding: 0 12px; margin-bottom: 6px; }
.combo-painel input:focus { outline: none; border-color: var(--orange); }
.combo-lista { list-style: none; margin: 0; padding: 0; max-height: 296px; overflow: auto; overscroll-behavior: contain; }
.combo-lista li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; cursor: pointer; font-size: 14px; font-weight: 500; }
.combo-lista li:hover, .combo-lista li.foco { background: var(--azul-100); }
.combo-lista li[aria-selected="true"] { background: var(--navy); color: #fff; }
.combo-lista li .cnt { margin-left: auto; font-size: 12px; opacity: .6; font-weight: 700; }
.combo-lista li.vazio { color: var(--texto-3); cursor: default; }
@keyframes entrar { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- superfícies */
.cartao { background: #fff; border: 1.5px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra-1); }
.vazio-estado { text-align: center; padding: 56px 20px; color: var(--texto-2); }
.vazio-estado .ico { width: 44px; height: 44px; color: var(--borda-2); margin-bottom: 8px; }
.vazio-estado strong { display: block; color: var(--navy); font-size: 17px; margin-bottom: 4px; }

/* ---------------------------------------------------------------- toasts */
.toasts { position: fixed; left: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; background: var(--navy-900); color: #fff; padding: 13px 16px; border-radius: 13px;
  box-shadow: var(--sombra-3); font-size: 14px; line-height: 1.35; animation: toast-in .28s cubic-bezier(.2, .9, .3, 1.2);
  border-left: 5px solid var(--orange);
}
.toast.ok { border-left-color: #34c47c; }
.toast.erro { border-left-color: #ff5a5a; }
.toast strong { display: block; font-family: var(--fonte-titulo); font-size: 17px; letter-spacing: .02em; font-weight: 700; }
.toast.saindo { animation: toast-out .25s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------------------------------------------------------------- dialog */
dialog.modal {
  border: 0; padding: 0; border-radius: 20px; width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: var(--sombra-3);
  background: #fff; color: var(--texto); overflow: hidden;
}
dialog.modal[open] { display: flex; flex-direction: column; animation: modal-in .22s cubic-bezier(.2, .9, .3, 1.1); }
dialog.modal::backdrop { background: rgba(10, 35, 64, .55); backdrop-filter: blur(3px); animation: fundo-in .2s; }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fundo-in { from { opacity: 0; } }
.modal-corpo { overflow: auto; padding: 0 0 4px; }
.modal-fechar { position: absolute; right: 12px; top: 12px; z-index: 2; background: rgba(255, 255, 255, .95); }

/* ---------------------------------------------------------------- skeleton */
.skel { background: linear-gradient(100deg, var(--azul-100) 30%, var(--azul-50) 50%, var(--azul-100) 70%); background-size: 200% 100%; animation: skel 1.3s linear infinite; border-radius: 10px; }
@keyframes skel { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
