/*
 * AlunoAtleta – estrutura das telas e componentes básicos.
 * A cor da equipe (--equipe) vem do cadastro "Nosso time" e pinta a barra do topo,
 * os botões principais e o item ativo do menu.
 */
@font-face { font-family: "Barlow SC"; src: url("fontes/barlow-sc-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow SC"; src: url("fontes/barlow-sc-700.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fontes/source-sans-3.woff") format("woff"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fontes/source-sans-3-italico.woff") format("woff"); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
	--equipe: #1f3a5f;
	--equipe-escura: color-mix(in srgb, var(--equipe) 78%, #000);
	--equipe-clara: color-mix(in srgb, var(--equipe) 9%, #fff);
	--tinta: #17202a;
	--tinta-2: #5b6573;
	--linha: #d9dee4;
	--linha-forte: #b9c1cb;
	--fundo: #eef1f4;
	--papel: #ffffff;
	--perigo: #b42318;
	--ok: #157f3b;
	--aviso: #8a5a00;
	--titulo: "Barlow SC", "Arial Narrow", "Roboto Condensed", sans-serif;
	--texto: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
	--raio: 8px;
	--menu-larg: 248px;
	--topo-alt: 60px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fundo); color: var(--tinta); font: 400 15px/1.5 var(--texto); }
img { max-width: 100%; }
a { color: var(--equipe); text-underline-offset: 2px; }
a:hover { color: var(--equipe-escura); }
:focus-visible { outline: 2px solid var(--equipe); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--titulo); font-weight: 700; line-height: 1.15; letter-spacing: .005em; color: var(--tinta); text-wrap: balance; }
h1 { font-size: 28px; margin: 0 0 10px; }
h2 { font-size: 21px; margin: 22px 0 10px; }
h3 { font-size: 17px; margin: 18px 0 8px; }
p { margin: 0 0 12px; }
code { background: var(--fundo); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--linha); margin: 20px 0; }
small { font-size: 13px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* ---------- Estrutura: topo, menu e conteúdo ---------- */
.app-topo {
	position: sticky; top: 0; z-index: 40; height: var(--topo-alt);
	display: flex; align-items: center; gap: 12px; padding: 0 16px;
	background: var(--equipe); color: #fff; overflow: hidden;
}
/* Linhas de quadra no canto direito: a área do goleiro e a linha de tiro livre. */
.app-topo::after {
	content: ""; position: absolute; right: -70px; top: 50%; width: 220px; height: 220px; transform: translateY(-50%);
	border: 2px solid rgba(255, 255, 255, .16); border-radius: 50%;
	box-shadow: 0 0 0 34px rgba(255, 255, 255, .05), 0 0 0 36px rgba(255, 255, 255, .12);
	pointer-events: none;
}
.app-marca { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; position: relative; z-index: 1; }
.app-marca:hover { color: #fff; }
.app-escudo { width: 40px; height: 40px; border-radius: 10px; background: #fff; display: grid; place-items: center; flex: none; overflow: hidden; }
.app-escudo img { width: 34px; height: 34px; object-fit: contain; }
.app-escudo .icone-svg { width: 22px; height: 22px; color: var(--equipe); }
.app-marca strong { font: 700 20px/1.1 var(--titulo); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-marca span { display: block; font-size: 12px; opacity: .8; white-space: nowrap; }
.app-topo-acoes { margin-left: auto; display: flex; align-items: center; gap: 4px; position: relative; z-index: 1; }
.app-topo-botao { display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; padding: 8px 10px; border-radius: 6px; background: transparent; border: 0; font: 600 14px var(--texto); cursor: pointer; }
.app-topo-botao:hover, .app-topo-botao:focus-visible { background: rgba(255, 255, 255, .14); color: #fff; }
.app-topo-botao .icone-svg { width: 20px; height: 20px; }
.app-topo-botao:focus-visible { outline-color: #fff; }

.app-corpo { display: grid; grid-template-columns: var(--menu-larg) minmax(0, 1fr); min-height: calc(100vh - var(--topo-alt)); }
.app-menu { background: var(--papel); border-right: 1px solid var(--linha); padding: 14px 10px 24px; position: sticky; top: var(--topo-alt); height: calc(100vh - var(--topo-alt)); overflow-y: auto; }
.app-menu-grupo { margin: 16px 10px 4px; font: 600 13px var(--titulo); color: var(--tinta-2); letter-spacing: .02em; }
.app-menu-grupo:first-child { margin-top: 2px; }
.app-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--tinta); text-decoration: none; font-weight: 600; }
.app-menu a .icone-svg { width: 19px; height: 19px; color: var(--tinta-2); flex: none; }
.app-menu a:hover { background: var(--fundo); }
.app-menu a[aria-current="page"] { background: var(--equipe-clara); color: var(--equipe-escura); box-shadow: inset 3px 0 0 var(--equipe); }
.app-menu a[aria-current="page"] .icone-svg { color: var(--equipe); }
.app-bolha { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--perigo); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; line-height: 1; }
.app-principal { min-width: 0; padding: 22px 28px 48px; }
.app-conteudo { max-width: 1280px; margin: 0 auto; }
.app-rodape { max-width: 1280px; margin: 40px auto 0; padding-top: 14px; border-top: 1px solid var(--linha); color: var(--tinta-2); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; }
.app-rodape a { color: var(--tinta-2); }

/* Barra inferior (celular) */
.app-barra { display: none; }
.app-mais { display: none; }

@media (max-width: 860px) {
	:root { --topo-alt: 56px; }
	.app-corpo { display: block; }
	.app-menu { display: none; }
	.app-principal { padding: 16px 16px 96px; }
	.app-marca strong { font-size: 18px; }
	.app-topo-botao span { display: none; }
	.app-barra {
		display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 45; left: 0; right: 0; bottom: 0;
		background: var(--papel); border-top: 1px solid var(--linha); padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
	}
	.app-barra a, .app-barra button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 0; background: none; color: var(--tinta-2); font: 600 11.5px var(--texto); text-decoration: none; position: relative; border-radius: 8px; cursor: pointer; }
	.app-barra .icone-svg { width: 22px; height: 22px; }
	.app-barra [aria-current="page"] { color: var(--equipe); }
	.app-barra .app-bolha { position: absolute; top: 0; left: 50%; margin-left: 6px; min-width: 18px; height: 18px; font-size: 11px; }
	.app-mais[open] { display: block; }
	.app-mais { position: fixed; z-index: 50; inset: auto 0 0 0; max-height: 82vh; overflow-y: auto; margin: 0; width: 100%; max-width: none; border: 0; border-radius: 16px 16px 0 0; padding: 8px 12px calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--papel); box-shadow: 0 -8px 32px rgba(15, 25, 40, .2); }
	.app-mais::backdrop { background: rgba(15, 25, 40, .4); }
	.app-mais-alca { width: 40px; height: 4px; border-radius: 2px; background: var(--linha-forte); margin: 4px auto 10px; }
	.app-mais .app-menu-lista a { display: flex; align-items: center; gap: 12px; padding: 12px 8px; color: var(--tinta); text-decoration: none; font-weight: 600; font-size: 16px; border-bottom: 1px solid var(--fundo); }
	.app-mais .app-menu-lista .icone-svg { width: 20px; height: 20px; color: var(--tinta-2); }
	.app-mais .app-menu-grupo { margin: 14px 8px 2px; }
	.app-rodape { display: none; }
}

/* ---------- Cabeçalho das telas ---------- */
.wrap { margin: 0; }
.wrap > h1, .titulo-tela { display: inline-block; margin: 0 10px 10px 0; vertical-align: middle; }
.botao-titulo { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; margin: 0 6px 10px 0; padding: 6px 12px; border: 1px solid var(--equipe); border-radius: 6px; color: var(--equipe); background: var(--papel); text-decoration: none; font-weight: 600; font-size: 14px; }
.botao-titulo:hover { background: var(--equipe-clara); color: var(--equipe-escura); }
.fim-cabecalho { clear: both; border: 0; margin: 0; height: 0; }
.description { color: var(--tinta-2); font-size: 13.5px; margin: 6px 0 0; }

/* ---------- Avisos ---------- */
.notice { background: var(--papel); border: 1px solid var(--linha); border-left: 4px solid var(--equipe); border-radius: 6px; padding: 2px 14px; margin: 10px 0 14px; }
.notice p { margin: 9px 0; }
.notice-success { border-left-color: var(--ok); }
.notice-error { border-left-color: var(--perigo); background: #fff7f6; }
.notice-warning { border-left-color: #d49a00; background: #fffbf0; }
.notice-info { border-left-color: var(--equipe); }

/* ---------- Botões ---------- */
.button, button.button, a.button, input[type=submit].button {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 14px;
	border: 1px solid var(--linha-forte); border-radius: 6px; background: var(--papel); color: var(--tinta);
	font: 600 14px/1.2 var(--texto); text-decoration: none; cursor: pointer; white-space: nowrap; vertical-align: middle;
}
.button:hover { border-color: var(--equipe); color: var(--equipe-escura); background: var(--equipe-clara); }
.button-primary, .button.button-primary { background: var(--equipe); border-color: var(--equipe); color: #fff; }
.button-primary:hover, .button.button-primary:hover, .button.button-primary:focus-visible { background: var(--equipe-escura); border-color: var(--equipe-escura); color: #fff; }
.button-large { min-height: 42px; padding: 8px 18px; font-size: 15px; }
.button-small { min-height: 30px; padding: 3px 10px; font-size: 13px; }
.button-link, .button-link-like { background: none; border: 0; padding: 0; color: var(--equipe); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.button-link:hover { color: var(--equipe-escura); }
.button[disabled], .button:disabled { opacity: .5; cursor: not-allowed; }
p.submit { margin: 18px 0 0; }

/* ---------- Campos ---------- */
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], input[type=password], input[type=search], input[type=url], input[type=time], input[type=month], select, textarea {
	font: 400 15px/1.3 var(--texto); color: var(--tinta); background: var(--papel);
	border: 1px solid var(--linha-forte); border-radius: 6px; padding: 7px 10px; min-height: 38px; max-width: 100%;
}
select { padding-right: 28px; }
textarea { min-height: 80px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--equipe) 45%, transparent); outline-offset: 0; border-color: var(--equipe); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--equipe); vertical-align: -3px; margin: 0 6px 0 0; }
input[type=file] { font: inherit; max-width: 100%; }
label { cursor: default; }
.regular-text { width: 25em; }
.small-text { width: 5em; }
.large-text { width: 100%; }

.form-table { border-collapse: collapse; width: 100%; margin-top: 6px; }
.form-table th { text-align: left; vertical-align: top; width: 240px; padding: 16px 16px 16px 0; font-weight: 600; }
.form-table td { padding: 12px 0; vertical-align: top; }
@media (max-width: 860px) {
	.form-table, .form-table tbody, .form-table tr, .form-table th, .form-table td { display: block; width: auto; }
	.form-table th { padding: 14px 0 4px; }
	.form-table td { padding: 0 0 8px; }
	.regular-text { width: 100%; }
	input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], input[type=password], input[type=search], select, textarea { font-size: 16px; }
}

/* ---------- Tabelas ---------- */
.widefat { width: 100%; border-collapse: collapse; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden; }
.widefat th, .widefat td { text-align: left; padding: 10px 12px; vertical-align: top; }
.widefat thead th, .widefat tfoot th { font-weight: 600; font-size: 13.5px; color: var(--tinta-2); background: #f7f8fa; border-bottom: 1px solid var(--linha); }
.widefat tbody td, .widefat tbody th { border-top: 1px solid #eceff2; }
.widefat tbody tr:first-child td, .widefat tbody tr:first-child th { border-top: 0; }
.striped > tbody > tr:nth-child(odd) { background: #fbfcfd; }

/* ---------- Abas de filtro e de navegação ---------- */
.filtro-abas { list-style: none; margin: 6px 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 14px; color: var(--tinta-2); }
.filtro-abas li { margin: 0; }
.filtro-abas a { text-decoration: none; padding: 2px 4px; }
.filtro-abas a.current { color: var(--tinta); font-weight: 700; }
.nav-tab-wrapper { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--linha); margin: 6px 0 16px; }
.nav-tab { padding: 9px 16px; text-decoration: none; color: var(--tinta-2); font-weight: 600; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; margin-bottom: -1px; }
.nav-tab:hover { color: var(--tinta); background: var(--papel); }
.nav-tab-active, .nav-tab-active:hover { background: var(--papel); color: var(--tinta); border-color: var(--linha); box-shadow: inset 0 3px 0 var(--equipe); }

/* ---------- Diálogos ---------- */
dialog { border: 0; border-radius: 12px; padding: 22px; max-width: min(520px, calc(100vw - 32px)); box-shadow: 0 18px 50px rgba(15, 25, 40, .28); color: var(--tinta); }
dialog::backdrop { background: rgba(15, 25, 40, .45); }

/* ---------- Telas de entrada (login, senha) e aviso ---------- */
.entrada { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--equipe); position: relative; overflow: hidden; }
.entrada::before, .entrada::after { content: ""; position: absolute; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .14); pointer-events: none; }
.entrada::before { width: 620px; height: 620px; left: -310px; top: 50%; transform: translateY(-50%); }
.entrada::after { width: 620px; height: 620px; right: -310px; top: 50%; transform: translateY(-50%); }
.entrada-cartao { position: relative; z-index: 1; width: 100%; max-width: 400px; background: var(--papel); border-radius: 14px; padding: 28px 26px 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.entrada-equipe { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.entrada-equipe img { width: 56px; height: 56px; object-fit: contain; }
.entrada-equipe strong { display: block; font: 700 22px/1.1 var(--titulo); }
.entrada-equipe span { color: var(--tinta-2); font-size: 14px; }
.entrada h1 { font-size: 22px; margin: 0 0 14px; }
.entrada label { display: block; font-weight: 600; margin: 12px 0 4px; }
.entrada input[type=email], .entrada input[type=password], .entrada input[type=text] { width: 100%; font-size: 16px; min-height: 44px; }
.entrada .lembrar { display: flex; align-items: center; font-weight: 400; margin-top: 12px; }
.entrada .button-primary { width: 100%; min-height: 46px; font-size: 16px; margin-top: 18px; }
.entrada-links { margin: 16px 0 0; font-size: 14px; text-align: center; }
.entrada-erro { background: #fff3f1; border: 1px solid #f3c0b8; color: #8f1f13; border-radius: 6px; padding: 8px 12px; margin-bottom: 8px; font-size: 14px; }
.entrada-ok { background: #effaf2; border: 1px solid #b8e3c4; color: #135c2c; border-radius: 6px; padding: 8px 12px; margin-bottom: 8px; font-size: 14px; }
.entrada-plataforma { position: relative; z-index: 1; color: rgba(255, 255, 255, .75); font-size: 13px; text-align: center; margin-top: 16px; }
.entrada-plataforma a { color: #fff; }

/* ---------- Página pública (inscrição) ---------- */
.publico { background: var(--fundo); }
.publico-topo { background: var(--equipe); height: 8px; }
.publico-conteudo { max-width: 860px; margin: 0 auto; padding: 22px 16px 60px; }
.publico-rodape { text-align: center; color: var(--tinta-2); font-size: 13px; padding: 0 16px 30px; }

@media print {
	body { background: #fff; }
	.app-topo, .app-menu, .app-barra, .app-mais, .app-rodape { display: none !important; }
	.app-corpo { display: block; }
	.app-principal { padding: 0; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* Listas em cartões no celular: cada célula ocupa a largura toda. */
@media (max-width: 600px) {
	.alunoatleta-tabela td, .alunoatleta-tabela th { width: auto !important; max-width: none !important; }
	.alunoatleta-tabela { border-radius: var(--raio); }
	.alunoatleta-tabela tr { border-bottom-color: var(--linha) !important; }
}
@media (max-width: 600px) {
	.alunoatleta-tabela tbody td { border-top: 0 !important; }
}
@media (max-width: 860px) {
	.app-topo::after { right: -120px; opacity: .55; }
}
