/* ===== Tokens ===== */
:root {
  --fundo: #f3f5f8; --lateral: #f5f7fa; --superficie: #ffffff; --superficie-2: #f7f9fb;
  --texto: #111827; --texto-2: #4b5563; --mudo: #6b7280; --borda: #e2e7ee; --borda-forte: #d3dae3;
  --ativo-fundo: #e2e7ee; --verde: #0e8a68; --verde-fundo: #e3f5ee; --verde-texto: #0b6b51;
  --laranja-fundo: #fdf0dc; --laranja-texto: #a35400; --vermelho-fundo: #fde8e6; --vermelho-texto: #b42318;
  --info-fundo: #e8f1f0; --info-borda: #cfe2df;
  --grad: linear-gradient(90deg, #2dd4a7 0%, #3b8ff0 100%);
  --grad-suave: linear-gradient(90deg, #8be3cf 0%, #9cc4f5 100%);
  /* Paleta dos gráficos (validada: claro) */
  --c-sub: #0b6f99; --c-cal: #14a37f; --c-sup: #c2410c; --c-neutro: #8a94a3;
  --seq: #0b6f99; --q-ok: rgba(20, 163, 127, .07); --q-atencao: rgba(194, 65, 12, .06);
  --grade: #e5e9ef; --sombra: 0 1px 2px rgba(16, 24, 40, .04);
  --raio: 16px; --raio-p: 10px;
  --fonte: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fonte-titulo: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}
[data-tema="escuro"] {
  --fundo: #0f141a; --lateral: #121821; --superficie: #171e27; --superficie-2: #1c2430;
  --texto: #e8edf3; --texto-2: #b5c0cc; --mudo: #8c99a8; --borda: #26303c; --borda-forte: #334050;
  --ativo-fundo: #222c38; --verde: #34c99a; --verde-fundo: #12352b; --verde-texto: #6fe0bb;
  --laranja-fundo: #3a2812; --laranja-texto: #f3b46b; --vermelho-fundo: #3d1a17; --vermelho-texto: #f59a91;
  --info-fundo: #142a2a; --info-borda: #1f3d3c;
  /* Paleta dos gráficos (validada: escuro) */
  --c-sub: #3a8ad0; --c-cal: #16a077; --c-sup: #d9652c; --c-neutro: #7d8896;
  --seq: #3a8ad0; --q-ok: rgba(22, 160, 119, .10); --q-atencao: rgba(217, 101, 44, .10);
  --grade: #252e3a; --sombra: none;
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html { color-scheme: light; }
[data-tema="escuro"] { color-scheme: dark; }
body { margin: 0; font: 15px/1.5 var(--fonte); background: var(--fundo); color: var(--texto); -webkit-font-smoothing: antialiased; }
a { color: var(--verde); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--fonte-titulo); letter-spacing: -.01em; color: var(--texto); }
h1 { font-size: 1.9rem; font-weight: 700; margin: 0 0 .2rem; line-height: 1.2; }
h2 { font-size: 1.1rem; font-weight: 600; margin: 0 0 .35rem; }
h3 { font-size: .98rem; font-weight: 600; margin: 1.1rem 0 .5rem; }
.sub { color: var(--texto-2); margin: 0 0 1.5rem; }
.sub.pequeno, .pequeno { font-size: .88rem; }
.sub.pequeno { margin-bottom: 1rem; }
.mudo { color: var(--mudo); }
.fino { font-weight: 400; }
.flex1 { flex: 1; min-width: 0; }
.sobrelinha { text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; font-weight: 600; color: var(--verde); margin: 0 0 .35rem; }
.icone { width: 18px; height: 18px; flex: none; }
.com-icone { display: flex; align-items: center; gap: .5rem; }
.com-icone .icone { color: var(--verde); }
.texto-alerta { color: var(--laranja-texto); font-weight: 600; }
.texto-longo { white-space: normal; }
[hidden] { display: none !important; }

/* ===== Estrutura com menu lateral ===== */
.app { display: flex; min-height: 100vh; }
.lateral { width: 240px; flex: none; background: var(--lateral); border-right: 1px solid var(--borda); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; padding: 1.4rem 1.4rem 1.2rem; border-bottom: 1px solid var(--borda); }
.logo:hover { text-decoration: none; }
.logo-img { height: 38px; width: auto; display: block; background: #fff; padding: 5px 7px; border-radius: 8px; box-sizing: content-box; }
.relatorio-topo .logo-img { height: 52px; }
.publico-topo .logo-img { height: 46px; }
.logo-texto { display: inline-flex; flex-direction: column; line-height: .85; font-family: var(--fonte-titulo); font-style: italic; background: #fff; padding: .35rem .6rem; border-radius: 8px; border: 1px solid var(--borda); }
.logo-texto b { font-size: 1.45rem; font-weight: 700; color: #0f172a; letter-spacing: -.04em; }
.logo-texto i { font-size: .8rem; font-weight: 700; color: #fff; background: #0f172a; padding: 0 .3rem; margin-left: .7rem; box-shadow: -4px 0 0 #2bb8e0; }
.menu { display: flex; flex-direction: column; gap: .2rem; padding: 1rem .7rem; flex: 1; overflow-y: auto; }
.menu a { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border-radius: 10px; color: var(--texto-2); font-weight: 500; }
.menu a:hover { background: var(--ativo-fundo); text-decoration: none; color: var(--texto); }
.menu a .icone { color: var(--mudo); }
.menu a.ativo { background: var(--ativo-fundo); color: var(--verde); }
.menu a.ativo .icone { color: var(--verde); }
.lateral-rodape { border-top: 1px solid var(--borda); padding: 1rem 1.4rem 1.2rem; display: flex; flex-direction: column; gap: 1rem; }
.tema-linha { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--mudo); }
.quem { display: flex; flex-direction: column; }
.quem strong { font-weight: 600; font-size: .92rem; }
.quem small { color: var(--mudo); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; }
.sair { display: flex; align-items: center; gap: .65rem; background: none; border: 0; padding: 0; font: inherit; color: var(--texto-2); cursor: pointer; }
.sair:hover { color: var(--texto); }

.conteudo { flex: 1; min-width: 0; }
.pagina { max-width: 900px; margin: 0 auto; padding: 2.5rem 2rem 4rem; }
.pagina.larga { max-width: 1020px; }
.pagina.media { max-width: 660px; }
.pagina.estreita { max-width: 600px; }

/* Tema */
.so-escuro { display: none; }
[data-tema="escuro"] .so-claro { display: none; }
[data-tema="escuro"] .so-escuro { display: inline-flex; }

/* ===== Componentes ===== */
.cartao { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--sombra); }
.cartao.vazio { text-align: center; padding: 2.5rem 1.5rem; display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.cartao.vazio p { margin: 0 0 .75rem; }
.vazio-icone .icone { width: 38px; height: 38px; color: var(--texto-2); margin-bottom: .6rem; }
.vazio-texto { color: var(--mudo); text-align: center; padding: 1.5rem 0; margin: 0; }
.cabecalho { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.cabecalho h1 + .sub, .cabecalho .sub { margin-bottom: 0; }
.cabecalho .acoes { display: flex; gap: .6rem; }
.trilha { color: var(--mudo); font-size: .88rem; margin: 0 0 .75rem; }
.grade2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.25rem; align-items: start; }
.grade2 > .cartao { margin-bottom: 0; }
.grade2.assimetrica { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); }
.grade2 + .cartao, .grade2 + .grade2 { margin-top: 1.25rem; }

.botao { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; background: var(--grad); color: #0f172a; border: 0; border-radius: 12px; padding: .7rem 1.2rem; font: 600 .93rem var(--fonte); cursor: pointer; white-space: nowrap; transition: filter .15s, opacity .15s; }
.botao:hover { filter: brightness(1.05) saturate(1.05); text-decoration: none; }
.botao:disabled, .botao[aria-disabled="true"] { background: var(--grad-suave); color: rgba(15, 23, 42, .45); cursor: not-allowed; filter: none; }
.botao.secundario { background: var(--superficie); color: var(--texto); border: 1px solid var(--borda-forte); }
.botao.secundario:hover { background: var(--superficie-2); }
.botao.secundario.ativo { border-color: var(--verde); color: var(--verde); }
.botao.pequeno { padding: .45rem .85rem; font-size: .85rem; border-radius: 10px; }
.botao.largo { width: 100%; }
.botao.perigo { background: var(--vermelho-texto); color: #fff; }
.botao .icone { width: 16px; height: 16px; }
.botao-icone { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: none; color: var(--texto-2); cursor: pointer; }
.botao-icone:hover { background: var(--ativo-fundo); color: var(--texto); text-decoration: none; }
.botao-icone.borda { border: 1px solid var(--borda-forte); background: var(--superficie); width: 40px; height: 40px; }
.botao-icone.perigo:hover { color: var(--vermelho-texto); background: var(--vermelho-fundo); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--verde); cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; }
.link-verde, .link-forte { color: var(--verde); font-weight: 600; font-size: .88rem; }
.link-forte { color: var(--texto); }

.pilula { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .65rem; border-radius: 999px; background: var(--ativo-fundo); color: var(--texto-2); font-size: .8rem; font-weight: 500; white-space: nowrap; }
.pilula .icone { width: 13px; height: 13px; }
.pilula.verde { background: var(--verde-fundo); color: var(--verde-texto); }
.pilula.laranja { background: var(--laranja-fundo); color: var(--laranja-texto); }
.pilula.vermelha { background: var(--vermelho-fundo); color: var(--vermelho-texto); }
.pilula.sub { background: color-mix(in srgb, var(--c-sub) 14%, var(--superficie)); color: var(--texto); }
.pilula.sup { background: color-mix(in srgb, var(--c-sup) 14%, var(--superficie)); color: var(--texto); }
.pilula.pequena { font-size: .72rem; padding: .15rem .55rem; }
.etiquetas { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }

.avatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ativo-fundo); color: var(--verde); font-family: var(--fonte-titulo); font-weight: 600; flex: none; }
.avatar.pequeno { width: 32px; height: 32px; font-size: .85rem; }
.avatar.grande { width: 56px; height: 56px; font-size: 1.25rem; }
.avatar.gradiente { background: var(--grad); color: #0f172a; }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.foto-grande { width: 96px; height: 96px; color: var(--mudo); }
.avatar.foto-grande .icone { width: 36px; height: 36px; }
.foto-campo { display: flex; gap: 1.25rem; align-items: center; margin-bottom: 1.4rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--borda); }
.foto-campo input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.foto-campo label.botao { margin: .2rem 0 .35rem; }
.foto-campo input[type=file]:focus-visible + small, .foto-campo label.botao:focus-within { outline: 2px solid var(--verde); }
.bloco { display: block; }
.grade-form.sem-margem { margin-top: 0; }
.titulo-avatar { display: flex; align-items: center; gap: 1rem; margin-bottom: .25rem; }
.titulo-avatar h1 { margin-bottom: .35rem; }
.nome-grande { font-family: var(--fonte-titulo); font-size: 1.15rem; font-weight: 600; }

.aviso { padding: .8rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-size: .92rem; }
.aviso-success { background: var(--verde-fundo); color: var(--verde-texto); }
.aviso-error { background: var(--vermelho-fundo); color: var(--vermelho-texto); }
.aviso-info, .aviso-warning { background: var(--info-fundo); color: var(--texto-2); border: 1px solid var(--info-borda); }

/* Formulários */
label { display: block; margin-bottom: .9rem; font-weight: 500; font-size: .9rem; }
label .icone { width: 15px; height: 15px; vertical-align: -2px; margin-right: .35rem; color: var(--texto-2); }
.rotulo { display: block; font-weight: 500; font-size: .9rem; margin-bottom: .4rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=month], input[type=time], input[type=number], input[type=search], select, textarea {
  display: block; width: 100%; margin-top: .35rem; padding: .6rem .8rem; border: 1px solid var(--borda-forte); border-radius: 10px; font: inherit; font-weight: 400; background: var(--superficie); color: var(--texto);
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--verde) 45%, transparent); outline-offset: 1px; border-color: var(--verde); }
input:disabled { background: var(--superficie-2); color: var(--mudo); }
label.check { display: flex; gap: .55rem; align-items: center; font-weight: 400; }
.opcoes { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .9rem; }
.opcao { display: flex; gap: .55rem; align-items: center; font-weight: 400; margin: 0; padding: .6rem .8rem; border: 1px solid var(--borda); border-radius: 10px; cursor: pointer; }
.opcao:has(input:checked) { border-color: var(--verde); background: var(--verde-fundo); }
.campo { margin-bottom: .25rem; }
.com-erro input, .com-erro select { border-color: var(--vermelho-texto); }
.errorlist { color: var(--vermelho-texto); margin: -.5rem 0 .9rem; padding-left: 1.1rem; font-size: .85rem; }
.acoes { display: flex; gap: 1rem; align-items: center; }
.acoes.direita { justify-content: flex-end; margin-top: 1rem; }
.grade-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; margin-top: 1.25rem; }
.form-linha { display: flex; flex-wrap: wrap; gap: 0 1rem; align-items: flex-end; }
.form-linha label { flex: 1; min-width: 140px; }
.form-linha .flex2 { flex: 2; min-width: 220px; }
.form-linha .acoes { margin-bottom: .9rem; }

/* Tabelas */
.tabela { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabela th, .tabela td { padding: .6rem .55rem; border-bottom: 1px solid var(--borda); text-align: left; vertical-align: top; }
.tabela th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mudo); font-weight: 600; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabela.compacta td, .tabela.compacta th { padding: .4rem .45rem; }
.resumo { color: var(--mudo); font-size: .9rem; }
.resumo strong { color: var(--texto); font-size: 1.05rem; }
.ponto-pilar { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--verde); margin-right: .55rem; vertical-align: 2px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.kpi { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1.1rem 1.25rem; box-shadow: var(--sombra); }
.kpi-rotulo { display: flex; align-items: center; gap: .4rem; color: var(--mudo); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 500; }
.kpi-rotulo .icone { width: 14px; height: 14px; }
.kpi strong { display: block; font-family: var(--fonte-titulo); font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; margin: .2rem 0 .1rem; }
.kpi small { color: var(--mudo); font-size: .8rem; }

/* Atletas */
.busca { position: relative; margin-bottom: 1rem; }
.busca .icone { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--mudo); }
.busca input { margin: 0; padding-left: 2.5rem; background: var(--superficie); }
.faixa { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.25rem; color: var(--texto); }
.faixa:hover { text-decoration: none; border-color: var(--borda-forte); }
.faixa strong { display: block; font-family: var(--fonte-titulo); font-weight: 600; }
.faixa small { display: block; font-size: .8rem; }
.selo-icone { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: var(--verde-fundo); color: var(--verde); flex: none; }
.filtros { display: flex; gap: .75rem; align-items: center; margin: 1.5rem 0 1.25rem; flex-wrap: wrap; }
.atleta { position: relative; display: flex; align-items: center; gap: 1rem; padding: 1.4rem 1.25rem; flex-wrap: wrap; }
.atleta:hover { border-color: var(--borda-forte); }
.atleta .cobre { position: absolute; inset: 0; border-radius: var(--raio); }
.atleta form, .atleta .semana .pilula { position: relative; z-index: 1; }
.atleta-nome strong { display: block; font-family: var(--fonte-titulo); font-weight: 600; font-size: 1.02rem; }
.atleta-nome small { font-size: .82rem; }
.atleta .etiquetas { flex: 1; }
.semana { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; }
.seta { color: var(--mudo); }

/* Listas */
.lista-cartao { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); overflow: hidden; margin-bottom: 1.25rem; }
.linha-lista { display: flex; align-items: center; gap: 1rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--borda); color: var(--texto); }
.linha-lista:last-child { border-bottom: 0; }
a.linha-lista:hover { background: var(--superficie-2); text-decoration: none; }
.cartao .linha-lista { padding: .7rem 0; }
.hora { color: var(--verde); font-weight: 700; font-family: var(--fonte-titulo); font-variant-numeric: tabular-nums; }
.data { font-variant-numeric: tabular-nums; min-width: 90px; }
.consentimento { padding: .85rem 0; border-bottom: 1px solid var(--borda); }
.copiar { display: flex; gap: .5rem; margin-top: .5rem; align-items: center; }
.copiar input { margin: 0; font-size: .8rem; color: var(--mudo); padding: .45rem .6rem; }

/* Relatórios */
.lista-escolha { border: 1px solid var(--borda); border-radius: 14px; overflow: hidden; }
.lista-escolha label { display: flex; align-items: center; gap: .65rem; margin: 0; padding: .7rem 1rem; border-bottom: 1px solid var(--borda); font-weight: 400; cursor: pointer; }
.lista-escolha label:last-child { border-bottom: 0; }
.lista-escolha label .icone { margin: 0; color: var(--texto); }
.lista-escolha input { position: absolute; opacity: 0; pointer-events: none; }
.lista-escolha label:has(input:checked) { background: var(--verde-fundo); color: var(--verde-texto); }
.lista-escolha label:has(input:focus-visible) { outline: 2px solid var(--verde); outline-offset: -2px; }
.barra-relatorio { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.relatorio-topo { display: flex; gap: 1.25rem; align-items: center; margin-bottom: 1.5rem; }
.relatorio-topo .logo { padding: 0; border: 0; }
.relatorio-topo .sub { margin: 0; }

/* Roteiros */
.caixas { display: flex; flex-direction: column; gap: .6rem; }
.caixa { border: 1px solid var(--borda); border-radius: 12px; padding: .7rem .9rem; font-size: .92rem; color: var(--texto-2); }
.caixa strong { color: var(--texto); font-weight: 500; }
.abas { display: inline-flex; border: 1px solid var(--borda-forte); border-radius: 12px; overflow: hidden; background: var(--superficie); margin: .5rem 0 .9rem; }
.abas a { padding: .6rem 1rem; color: var(--texto); font-size: .9rem; text-align: center; border-right: 1px solid var(--borda); }
.abas a:last-child { border-right: 0; }
.abas a:hover { background: var(--superficie-2); text-decoration: none; }
.abas a.ativa { background: var(--grad); color: #0f172a; font-weight: 500; }
.abas.largas { display: flex; }
.abas.largas a { flex: 1; font-size: .86rem; padding: .55rem .4rem; line-height: 1.25; }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chip { padding: .45rem 1rem; border: 1px solid var(--borda-forte); border-radius: 12px; color: var(--texto); background: var(--superficie); font-size: .9rem; }
.chip:hover { text-decoration: none; background: var(--superficie-2); }
.chip.ativo { background: var(--grad); border-color: transparent; color: #0f172a; font-weight: 500; }
.perguntas { margin: 0 0 1rem; padding-left: 1.4rem; display: flex; flex-direction: column; gap: .15rem; }
.perguntas li { padding: .5rem .25rem; border-bottom: 1px solid var(--borda); font-size: .92rem; }
.perguntas li:last-child { border-bottom: 0; }
.perguntas li > .flex1 { display: inline; }
.acoes-item { float: right; display: inline-flex; gap: .1rem; margin-left: .5rem; }
.acoes-item form { display: inline; }
.acoes-item .botao-icone { width: 28px; height: 28px; }
.acoes-item .icone { width: 15px; height: 15px; }

/* Agenda */
.navegacao-mes { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.mes-titulo { font-family: var(--fonte-titulo); font-size: 1.1rem; flex: 1; margin-left: .3rem; }
.calendario { padding: 1rem; }
.cal-cabecalho, .cal-semana { display: grid; grid-template-columns: repeat(7, 1fr); gap: .5rem; }
.cal-cabecalho span { text-align: center; font-size: .72rem; color: var(--mudo); letter-spacing: .04em; padding: .3rem 0 .6rem; }
.cal-semana { margin-bottom: .5rem; }
.cal-semana:last-child { margin-bottom: 0; }
.cal-dia { min-height: 76px; border: 1px solid var(--borda); border-radius: 12px; padding: .5rem .55rem; color: var(--texto); display: flex; flex-direction: column; gap: .2rem; overflow: hidden; }
.cal-dia:hover { border-color: var(--borda-forte); background: var(--superficie-2); text-decoration: none; }
.cal-dia.hoje { border-color: var(--verde); }
.cal-dia.hoje .cal-num { color: var(--verde); font-weight: 700; }
.vazio-dia { border: 0; }
.cal-num { font-size: .92rem; font-weight: 500; }
.cal-evento { font-size: .7rem; background: var(--verde-fundo); color: var(--verde-texto); border-radius: 5px; padding: .05rem .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-mais { font-size: .7rem; color: var(--mudo); }
h2.verde .icone { color: var(--verde); }
h2.com-icone { margin-top: 1.5rem; margin-bottom: .75rem; }

/* ===== Gráficos ===== */
.grafico-cartao { position: relative; }
.grafico { width: 100%; height: auto; display: block; overflow: visible; }
.grafico .grade-linha { stroke: var(--grade); stroke-width: 1; stroke-dasharray: 3 3; }
.grafico .eixo-base { stroke: var(--borda-forte); stroke-width: 1; }
.grafico .eixo { fill: var(--mudo); font: 11px var(--fonte); font-variant-numeric: tabular-nums; }
.grafico .q-ok { fill: var(--q-ok); }
.grafico .q-atencao { fill: var(--q-atencao); }
.grafico .alvo { fill: transparent; }
.grafico .marca { cursor: pointer; }
.grafico .ponto { stroke: var(--superficie); stroke-width: 2; }
.p-ascensao { fill: var(--c-cal); background: var(--c-cal); }
.p-estavel { fill: var(--c-neutro); background: var(--c-neutro); }
.p-atencao { fill: var(--c-sup); }
.grafico .marca:hover .ponto { stroke: var(--texto); }
.b-subestima { fill: var(--c-sub); background: var(--c-sub); }
.b-calibrado { fill: var(--c-cal); background: var(--c-cal); }
.b-superestima { fill: var(--c-sup); background: var(--c-sup); }
.grafico .marca:hover .barra { opacity: .82; }
.legenda { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: .8rem; color: var(--texto-2); margin-top: .6rem; }
.legenda span { display: inline-flex; align-items: center; gap: .4rem; }
.leg-ponto { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.leg-tri { display: inline-block; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 10px solid var(--c-sup); }
.ver-tabela { position: absolute; top: 1.4rem; right: 1.5rem; z-index: 2; }
.ver-tabela summary { list-style: none; cursor: pointer; color: var(--verde); font-size: .82rem; font-weight: 500; }
.ver-tabela summary::-webkit-details-marker { display: none; }
.ver-tabela[open] { position: static; margin-bottom: .75rem; }
.ver-tabela[open] summary { text-align: right; margin-bottom: .5rem; }
.ver-tabela[open] summary::after { content: ' (fechar)'; color: var(--mudo); }
.ver-tabela[open] ~ .grafico, .ver-tabela[open] ~ .legenda { display: none; }
.mapa-calor { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: .88rem; }
.mapa-calor th { font-size: .78rem; font-weight: 600; color: var(--texto-2); text-align: center; padding: .3rem; }
.mapa-calor tbody th { text-align: left; font-weight: 500; white-space: nowrap; }
.mapa-calor td { text-align: center; padding: .6rem .3rem; border-radius: 6px; font-variant-numeric: tabular-nums; font-weight: 600; background: color-mix(in srgb, var(--seq) var(--p), var(--superficie)); color: var(--texto); cursor: default; }
.mapa-calor td.escuro { color: #fff; }
.mapa-calor td.sem { background: var(--superficie-2); color: var(--mudo); font-weight: 400; }
.escala-legenda .gradiente { display: inline-block; width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--seq) 15%, var(--superficie)), var(--seq)); }
.dica { position: fixed; z-index: 50; pointer-events: none; background: var(--texto); color: var(--fundo); font-size: .8rem; padding: .4rem .6rem; border-radius: 8px; max-width: 280px; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }

/* ===== Páginas públicas ===== */
.publico-topo { display: flex; justify-content: center; padding: 1.5rem 0 .5rem; }
.publico-topo .logo { border: 0; padding: 0; }
.publico-conteudo { max-width: 760px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.estreito { max-width: 480px; margin-left: auto; margin-right: auto; }
.pergunta { border: 0; border-bottom: 1px solid var(--borda); padding: .9rem 0 1.1rem; margin: 0; }
.pergunta:last-child { border-bottom: 0; }
.pergunta legend { font-weight: 500; margin-bottom: .6rem; padding: 0; }
.pergunta.com-erro legend { color: var(--vermelho-texto); }
.escala { display: flex; gap: .4rem; flex-wrap: wrap; }
.escala label { margin: 0; font-weight: 400; }
.escala input { position: absolute; opacity: 0; pointer-events: none; }
.escala span { display: inline-flex; width: 2.6rem; height: 2.6rem; align-items: center; justify-content: center; border: 1px solid var(--borda-forte); border-radius: 10px; cursor: pointer; background: var(--superficie); font-variant-numeric: tabular-nums; font-weight: 500; }
.escala input:checked + span { background: var(--grad); border-color: transparent; color: #0f172a; font-weight: 700; }
.escala input:focus-visible + span { outline: 2px solid var(--verde); outline-offset: 2px; }
.selo { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }

/* ===== Responsivo e impressão ===== */
@media (max-width: 860px) {
  .app { flex-direction: column; }
  .lateral { width: 100%; height: auto; position: static; }
  .menu { flex-direction: row; flex-wrap: wrap; }
  .lateral-rodape { flex-direction: row; justify-content: space-between; align-items: center; }
  .grade2.assimetrica, .grade-form { grid-template-columns: 1fr; }
  .semana { align-items: flex-start; }
}
@media print {
  .lateral, .nao-imprimir, .aviso { display: none !important; }
  body { background: #fff; }
  .pagina { max-width: none; padding: 0; }
  .cartao, .kpi { box-shadow: none; break-inside: avoid; }
}

/* ===== Ficha do atleta: tabela de ciclos ===== */
.tabela-rolagem { overflow-x: auto; margin: 0 -.25rem; padding: 0 .25rem; }
.tabela-ciclos td { vertical-align: middle; }
.tabela-ciclos tr.clicavel { cursor: pointer; }
.tabela-ciclos tr.clicavel:hover td { background: var(--superficie-2); }
.tabela-ciclos .seta-col { width: 28px; text-align: right; color: var(--mudo); padding-left: 0; }
.tabela-ciclos .seta-col .icone { width: 16px; height: 16px; vertical-align: middle; }
.tabela-ciclos small.bloco { font-size: .78rem; margin-top: .1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.consentimento-grade { margin-top: .5rem; }
.consentimento-grade .consentimento:first-child { padding-top: 0; }
.caixa-form { background: var(--superficie-2); border: 1px solid var(--borda); border-radius: 12px; padding: 1rem 1.1rem .4rem; }
.caixa-form h3 { margin-top: 0; }

/* ===== Novo ciclo ===== */
.tipos-ciclo .opcao { align-items: flex-start; padding: .85rem 1rem; }
.tipos-ciclo .opcao input { margin-top: .25rem; }
.tipos-ciclo .opcao strong { font-weight: 600; }
.tipos-ciclo .opcao small { font-weight: 400; margin-top: .15rem; }

/* ===== Seletor de modalidade (espaço de trabalho) ===== */
.seletor-modalidade { margin: .9rem .7rem 0; position: relative; }
.seletor-modalidade summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; align-items: center;
  padding: .55rem .8rem; border: 1px solid var(--borda-forte); border-radius: 12px; background: var(--superficie); }
.seletor-modalidade summary::-webkit-details-marker { display: none; }
.seletor-modalidade summary:hover { border-color: var(--verde); }
.seletor-modalidade summary:focus-visible { outline: 2px solid var(--verde); outline-offset: 2px; }
.seletor-rotulo { grid-column: 1; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--mudo); }
.seletor-atual { grid-column: 1; font-family: var(--fonte-titulo); font-weight: 600; color: var(--verde); }
.seletor-seta { grid-column: 2; grid-row: 1 / span 2; color: var(--mudo); transition: transform .15s; }
.seletor-modalidade[open] .seletor-seta { transform: rotate(90deg); }
.seletor-lista { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--superficie);
  border: 1px solid var(--borda-forte); border-radius: 12px; padding: .3rem; box-shadow: 0 8px 24px rgba(16, 24, 40, .12); }
.seletor-lista a { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .5rem .6rem; border-radius: 8px; color: var(--texto); font-size: .9rem; }
.seletor-lista a:hover { background: var(--ativo-fundo); text-decoration: none; }
.seletor-lista a.ativa { background: var(--verde-fundo); color: var(--verde-texto); font-weight: 600; }
.seletor-contagem { font-size: .75rem; color: var(--mudo); font-weight: 400; }

/* ===== Gráficos da Carteira (v2) ===== */
.grafico { min-height: 220px; }
.grafico-cabecalho { padding-right: 6.5rem; margin-bottom: .5rem; }
.grafico-cabecalho .sub { margin-bottom: .4rem; }
.grafico .q-atencao { fill: color-mix(in srgb, var(--vermelho-texto) 9%, transparent); }
.grafico .q-rotulo { fill: var(--vermelho-texto); font: 600 11px var(--fonte); letter-spacing: .02em; }
.grafico .referencia { stroke: var(--mudo); stroke-width: 1.2; opacity: .7; }
.grafico .grade-linha { stroke-dasharray: 2 4; }
.grafico .eixo { font-size: 11px; }
.grafico .eixo-titulo { fill: var(--texto-2); font: 500 12px var(--fonte); }
.grafico .ponto-inicial { fill: #fff; font: 700 10.5px var(--fonte); pointer-events: none; }
.grafico .zona-calibrada { fill: color-mix(in srgb, var(--c-cal) 10%, transparent); }
.grafico .zona-rotulo { fill: var(--verde-texto); font: 600 10.5px var(--fonte); }
.grafico .valor-barra { fill: var(--texto-2); font: 600 11px var(--fonte); font-variant-numeric: tabular-nums; }
.destaque-calibrado { display: inline-flex; align-items: baseline; gap: .3rem; background: var(--verde-fundo); color: var(--verde-texto);
  border-radius: 999px; padding: .2rem .7rem; font-size: .85rem; }
.destaque-calibrado strong { font-family: var(--fonte-titulo); font-size: 1.05rem; }
.nota-grafico { font-size: .82rem; color: var(--mudo); margin: .6rem 0 0; }
.grafico-cartao .legenda { justify-content: center; }
.grafico-cartao .legenda { gap: .9rem; font-size: .78rem; flex-wrap: nowrap; white-space: nowrap; }
.destaque-calibrado small { font-size: .75rem; opacity: .85; }

/* ===== Ciclo em andamento ===== */
.aviso-progresso { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; }
.progresso-linhas { display: inline-flex; gap: 1rem; }

/* ===== Relatório Atleta x Avaliador: matriz de calibração ===== */
.mc-calibrado { --cor: var(--c-cal); }
.mc-superestima { --cor: var(--c-sup); }
.mc-subestima { --cor: var(--c-sub); }
.matriz-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 1.5rem; align-items: start; }
.matriz-rolagem { overflow-x: auto; }
.matriz-com-eixos { display: flex; align-items: center; gap: .4rem; min-width: 400px; }
.matriz-eixo-y { writing-mode: vertical-rl; transform: rotate(180deg); font-size: .75rem; color: var(--texto-2); font-weight: 500; }
.matriz-eixo-x { text-align: center; font-size: .75rem; color: var(--texto-2); font-weight: 500; margin: .3rem 0 0 2rem; }
.matriz { border-collapse: separate; border-spacing: 3px; width: 100%; table-layout: fixed; }
.matriz th { font-size: .72rem; color: var(--mudo); font-weight: 500; text-align: center; padding: 0; height: 1.4rem; }
.matriz tbody th { width: 1.6rem; }
.matriz td { height: 2.15rem; padding: 0; border-radius: 5px; text-align: center; background: var(--superficie-2);
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.matriz td:not(.vazia) { background: color-mix(in srgb, var(--cor) var(--p), var(--superficie)); }
.matriz td.diagonal.vazia { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-cal) 45%, transparent); }
.matriz-celula { width: 100%; height: 100%; border: 0; background: none; cursor: pointer; font: 600 .82rem var(--fonte);
  color: var(--texto); font-variant-numeric: tabular-nums; border-radius: 5px; }
.matriz td.forte .matriz-celula { color: #fff; }
.matriz-celula:hover, .matriz-celula:focus-visible { outline: 2px solid var(--texto); outline-offset: -2px; }
.matriz-legenda { justify-content: flex-start; margin-top: .7rem; font-size: .76rem; }
.leg-quadro { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--cor);
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.matriz-detalhe { margin-top: .8rem; padding: .8rem 1rem; border: 1px solid var(--borda); border-radius: 10px; background: var(--superficie-2); font-size: .85rem; }
.matriz-detalhe strong { display: block; margin-bottom: .35rem; }
.matriz-detalhe ul { margin: 0; padding-left: 1.1rem; }
.matriz-resumo { border: 1px solid var(--borda); border-radius: 12px; padding: 1rem; }
.resumo-total strong { display: block; font-family: var(--fonte-titulo); font-size: 2rem; line-height: 1; }
.resumo-total span { font-size: .8rem; color: var(--mudo); }
.resumo-faixas { list-style: none; padding: 0; margin: .9rem 0; display: flex; flex-direction: column; gap: .45rem; font-size: .88rem; }
.resumo-faixas li { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: .5rem; }
.resumo-faixas strong { font-variant-numeric: tabular-nums; }
.chips-pilar { display: flex; flex-direction: column; gap: .35rem; }
.chip-pilar { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem .6rem; border-radius: 8px; font-size: .8rem;
  border-left: 4px solid var(--cor, var(--borda)); background: var(--superficie-2); }
.chip-pilar strong { font-variant-numeric: tabular-nums; }
.chip-calibrado { --cor: var(--c-cal); } .chip-superestima { --cor: var(--c-sup); } .chip-subestima { --cor: var(--c-sub); }
.matriz-vazia { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; padding: 2rem 1rem;
  border: 1px dashed var(--borda-forte); border-radius: 12px; background: repeating-linear-gradient(45deg, transparent 0 10px, var(--superficie-2) 10px 20px); }
@media (max-width: 860px) { .matriz-layout { grid-template-columns: 1fr; } }

/* ===== Parecer do instrutor ===== */
.parecer textarea { min-height: 10rem; resize: vertical; }
.parecer-rodape { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: .6rem; flex-wrap: wrap; }
.contador { display: block; text-align: right; font-size: .75rem; color: var(--mudo); margin-top: .25rem; font-variant-numeric: tabular-nums; }
.contador.perto { color: var(--laranja-texto); }
.parecer-texto { white-space: normal; line-height: 1.6; margin: 0 0 .5rem; }
.parecer-assinatura { font-size: .82rem; color: var(--mudo); margin: 0; }
.so-imprimir { display: none; }
@media print {
  .so-imprimir { display: block !important; }
  .matriz-rolagem { overflow: visible; }
  .matriz-layout { grid-template-columns: minmax(0, 1fr) 200px; }
}

/* Tela Usuários (Administrador) */
.acoes-linha { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; white-space: nowrap; }
.acoes-linha form { margin: 0; }
/* ===== Degustação (/demo): selo, marca d'água e impressão bloqueada ===== */
.selo-demo { margin: 0 0 1rem; padding: .55rem .9rem; border-radius: var(--raio-p); background: var(--laranja-fundo); color: var(--laranja-texto); font-size: .88rem; }
.marca-dagua { position: fixed; inset: 0; z-index: 50; pointer-events: none; background-repeat: repeat; }
@media print {
  body.degustacao .app, body.degustacao .marca-dagua, body.degustacao .dica { display: none !important; }
  body.degustacao::before { content: "Demonstração · HB ICP"; display: block; padding: 40vh 0; text-align: center; font: 700 28px/1.2 Arial, sans-serif; color: #111; }
}

/* Respostas de ciclos da degustação: o roteiro não sai na impressão. */
@media print {
  body.sem-impressao .publico-conteudo { display: none !important; }
  body.sem-impressao::before { content: "Demonstração · HB ICP"; display: block; padding: 40vh 0; text-align: center; font: 700 28px/1.2 Arial, sans-serif; color: #111; }
}
