/* =====================================================
   KINUSTY — "Quadra de ginásio" em amarelo e preto
   Referência: docs/estilo-referencia.md
   A página é a arquibancada (clara ou escura); o hero é a quadra preta com linhas
   brancas de 3px e a rede tracejada. Amarelo da logo só no botão principal e destaques.
   ===================================================== */
:root {
  /* ---- Tokens da referência ---- */
  --color-kinusty: #f5c400;          /* amarelo da logo: botão principal, destaques, estado ativo */
  --color-kinusty-hover: #ffd633;
  --color-ink: #0d0d0d;
  --color-paper: #ffffff;
  --color-carbon: #0d0d0d;           /* piso da quadra */
  --color-fog: #f3f2ee;
  --color-ash: #e2e0d8;
  --color-graphite: #66655f;
  --color-graphite-smoke: #33322e;
  --color-stone: #a3a199;

  --font-body: 'Barlow', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-inter: var(--font-body);
  --font-display: 'Big Shoulders Display', 'Barlow Condensed', 'Arial Narrow', Impact, sans-serif;

  --text-caption: 11px;    --leading-caption: 1.2;
  --text-body-sm: 14px;    --leading-body-sm: 1.4;
  --text-body: 16px;
  --text-body-lg: 18px;    --leading-body-lg: 1.45;
  --text-subheading: 22px; --leading-subheading: 1.15;
  --text-heading-sm: 30px; --leading-heading-sm: 1;
  --text-heading: 44px;    --leading-heading: .95;
  --text-heading-lg: 60px; --leading-heading-lg: .92;
  --text-display: 84px;    --leading-display: .9;
  --text-display-xl: 120px; --leading-display-xl: .88;

  /* Tamanhos fluidos: os títulos encolhem no celular */
  --fluid-display-xl: clamp(3.1rem, 1.8rem + 6.5vw, var(--text-display-xl));
  --fluid-display: clamp(2.5rem, 1.5rem + 4.4vw, var(--text-display));
  --fluid-heading: clamp(2rem, 1.5rem + 1.8vw, var(--text-heading));

  --page-max-width: 1200px;
  --section-gap: 80px;
  --card-padding: 20px;
  --element-gap: 10px;

  --radius-sm: 2px;
  --radius-lg: 4px;
  --radius-xl: 4px;
  --radius-full: 100px;

  /* Linhas da quadra */
  --linha: 3px;
  --linha-quadra: #ffffff;                 /* linhas sobre o piso preto */
  --linha-secao: var(--color-ink);         /* linhas grossas entre seções na arquibancada */

  --shadow-xl: 0 1px 0 rgba(0,0,0,.04), 0 10px 24px -12px rgba(0,0,0,.28);
  --shadow-xl-2: 0 30px 60px -20px rgba(0,0,0,.35);

  --surface-canvas: #f3f2ee;
  --surface-card: #ffffff;
  --surface-dark: #0d0d0d;

  /* ---- Estados funcionais (só status de pagamento/presença e erros; nunca decoração) ---- */
  --good: #1d7a46;
  --warn: #8a5300;
  --bad: #b3261e;
  --info: var(--color-graphite-smoke);

  /* ---- Aliases dos nomes antigos (usados em estilos inline do JS) ---- */
  --bg: var(--surface-canvas);
  --bg-2: var(--color-fog);
  --card: var(--surface-card);
  --card-2: var(--color-fog);
  --line: var(--color-ash);
  --text: var(--color-ink);
  --text-2: var(--color-graphite-smoke);
  --muted: var(--color-graphite);
  --gold: var(--color-kinusty);
  --gold-2: var(--color-kinusty);
  --gold-soft: rgba(245, 196, 0, .16);
  --radius: var(--radius-lg);
  --shadow: var(--shadow-xl);

  /* ---- Tokens semânticos que mudam com o tema ---- */
  --color-hairline: var(--color-ink);           /* bordas finas */
  --accent: var(--color-ink);                   /* amarelo não tem contraste como texto no claro: estado ativo usa preto */
  --accent-ring: rgba(245, 196, 0, .45);
  --on-accent: #ffffff;                         /* texto sobre superfície escura / vermelho / verde */
  --on-kinusty: #0d0d0d;                        /* texto sobre amarelo */
  --on-dark-muted: #b4b2aa;                     /* texto secundário sobre superfície escura */
  --blue-hover: var(--color-kinusty-hover);
  --bad-soft: #fbeceb;
  --marca-dagua-opacidade: .06;

  --curva: cubic-bezier(.32, .72, 0, 1);
  --curva-saida: cubic-bezier(.4, 0, 1, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-inter);
  font-size: var(--text-body);
  background: var(--surface-canvas);
  color: var(--color-ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--color-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: -.015em; line-height: 1.1; }
h2 { font-size: var(--text-heading-sm); }
.titulo-display { font-family: var(--font-display); font-weight: 400; letter-spacing: -.02em; line-height: 1; }
img { max-width: 100%; display: block; }
::selection { background: var(--color-ink); color: var(--color-paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Botões ---------- */
/* Base = secundário em outline; azul preenchido só no .btn-gold (primário) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 10px 20px; border-radius: var(--radius-lg); border: 1px solid var(--color-ink);
  font: inherit; font-size: var(--text-body); font-weight: 500; line-height: 1.3; cursor: pointer; white-space: nowrap;
  background: transparent; color: var(--color-ink); text-decoration: none;
  transition: transform .1s ease-out, background-color .15s, color .15s, border-color .15s, opacity .15s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn:hover { background: var(--color-ink); color: var(--color-paper); text-decoration: none; }
.btn:active:not(:disabled) { transform: scale(.97); transition-duration: 0s; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-gold { background: var(--color-kinusty); border-color: var(--color-kinusty); color: var(--on-kinusty); }
.btn-gold:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: var(--on-kinusty); }
.btn-outline { background: transparent; border-color: var(--color-ink); color: var(--color-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--color-ink); }
.btn-ghost:hover { background: var(--color-fog); color: var(--color-ink); border-color: transparent; }
.btn-sm { padding: 6px 12px; font-size: var(--text-body-sm); }
.btn-danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn-danger:hover { background: var(--bad); color: var(--on-accent); }
.btn-success { background: transparent; border-color: var(--good); color: var(--good); }
.btn-success:hover { background: var(--good); color: var(--on-accent); }
.btn-block { width: 100%; }
@media (hover: none) {
  .btn:hover { background: transparent; color: var(--color-ink); }
  .btn-gold:hover { background: var(--color-kinusty); color: var(--on-kinusty); }
  .btn-danger:hover { background: transparent; color: var(--bad); }
  .btn-success:hover { background: transparent; color: var(--good); }
}

/* ---------- Formulários ---------- */
label { display: block; font-size: var(--text-body-sm); color: var(--color-ink); margin-bottom: 6px; font-weight: 500; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-lg); border: 1px solid var(--color-ash);
  background: var(--color-fog); color: var(--color-ink); font: inherit; font-size: var(--text-body);
  transition: border-color .15s, box-shadow .2s var(--curva), background-color .15s;
}
input::placeholder, textarea::placeholder { color: var(--color-graphite); }
input:hover, select:hover, textarea:hover { border-color: var(--color-stone); }
input:focus, select:focus, textarea:focus { outline: none; background: var(--color-paper); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
textarea { resize: vertical; min-height: 80px; }
.campo { margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--color-graphite-smoke); font-size: var(--text-body-sm); font-weight: 400; }
.check input { width: auto; margin-top: .2em; accent-color: var(--color-kinusty); }
input[type=checkbox], input[type=radio] { accent-color: var(--color-kinusty); }
.hint { font-size: 13px; color: var(--color-graphite); margin-top: 4px; }

/* ---------- Cards / layout ---------- */
.container { width: min(var(--page-max-width), 100% - 32px); margin-inline: auto; }
.card { background: var(--surface-card); border: 1px solid var(--color-hairline); border-radius: var(--radius-lg); padding: var(--card-padding); }
.card h3 { font-size: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.muted { color: var(--color-graphite); }
.texto-2 { color: var(--color-graphite-smoke); }
.gold { color: var(--color-ink); font-weight: 600; }
.flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.space { justify-content: space-between; }
.mt { margin-top: 16px; } .mt-2 { margin-top: 32px; }
.oculto { display: none !important; }

/* ---------- Badges (status: ponto colorido, texto em Ink) ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-full); font-size: 12px; font-weight: 500; white-space: nowrap; letter-spacing: .01em;
  background: var(--color-paper); color: var(--color-ink); border: 1px solid var(--color-ash); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--color-graphite); }
.b-paga, .b-ativa { color: var(--color-ink); }
.b-paga::before, .b-ativa::before { background: var(--good); }
.b-pendente::before { background: var(--color-graphite); }
.b-em_analise::before, .b-trancada::before { background: var(--warn); }
.b-atrasada, .b-cancelada { color: var(--bad); border-color: rgba(179, 38, 30, .3); }
.b-atrasada::before, .b-cancelada::before { background: var(--bad); }

/* ---------- Tabelas ---------- */
.tabela-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--text-body-sm); }
th { text-align: left; color: var(--color-graphite); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; border-bottom: 1px solid var(--color-hairline); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--color-ash); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .12s; }
tbody tr:hover { background: var(--color-fog); }
@media (hover: none) { tbody tr:hover { background: none; } }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.vazio { text-align: center; color: var(--color-graphite); padding: 40px 16px; }

/* ---------- Toast (aviso: papel branco, borda sutil) ---------- */
#toast {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%) translateY(140%); opacity: 0;
  background: var(--color-paper); border: 1px solid var(--color-ash); color: var(--color-ink); padding: 12px 20px; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); z-index: 1000; max-width: calc(100% - 32px); font-size: var(--text-body-sm); font-weight: 500;
  transition: transform .5s var(--curva), opacity .3s;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
#toast.erro { border-color: var(--bad); color: var(--bad); }
#toast.ok { border-color: var(--color-hairline); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(16, 21, 28, .45); display: grid; place-items: center; z-index: 500; padding: 16px; animation: escurecer .3s var(--curva); }
.modal-box { background: var(--surface-card); border: 1px solid var(--color-hairline); border-radius: var(--radius-xl); width: min(720px, 100%); max-height: 90vh; overflow: auto; padding: 28px; position: relative;
  box-shadow: var(--shadow-xl); animation: materializar .42s var(--curva); }
.modal-box h2 { font-size: var(--text-heading-sm); padding-right: 40px; }
.modal-fechar { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--color-fog); border: 0; color: var(--color-ink);
  font-size: 1.25rem; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: transform .1s, background-color .15s; }
.modal-fechar:hover { background: var(--color-ash); }
.modal-fechar:active { transform: scale(.9); }
.modal.saindo { animation: escurecer .2s var(--curva-saida) reverse forwards; }
.modal.saindo .modal-box { animation: materializar .2s var(--curva-saida) reverse forwards; }
@keyframes escurecer { from { opacity: 0; } }
@keyframes materializar { from { opacity: 0; transform: scale(.96); } }

/* =====================================================
   MARCA — wordmark Inter 800 caixa alta + ponto azul
   ===================================================== */
.marca { display: inline-flex; align-items: center; gap: 10px; color: var(--color-ink); text-decoration: none; }
.marca:hover { text-decoration: none; }
.marca img { display: none; }
.marca > span { display: inline-flex; flex-wrap: wrap; align-items: baseline; font-weight: 800; font-size: 20px; letter-spacing: -.035em; line-height: 1; text-transform: uppercase; }
.marca > span::after { content: ''; order: 1; width: .3em; height: .3em; margin-left: .08em; border-radius: 50%; background: var(--color-kinusty); }
.marca span small { order: 2; flex-basis: 100%; display: block; margin-top: 4px; font-size: var(--text-caption); color: var(--color-graphite); font-weight: 500; letter-spacing: .14em; }
.marca-form { display: flex; justify-content: center; margin: 0 auto 24px; }
.marca-form > span { font-size: 28px; }

/* =====================================================
   SITE PÚBLICO
   ===================================================== */
.topo { position: sticky; top: 0; z-index: 100; background: var(--color-paper); border-bottom: 1px solid var(--color-hairline); }
.topo .container { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.nav { display: flex; gap: 20px; align-items: center; }
.nav a { font-size: var(--text-body); font-weight: 500; text-decoration: none; }
.nav a:not(.btn) { color: var(--color-ink); padding: 4px 6px; }
.nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 6px; }
.nav .btn { padding: 8px 16px; }
.nav .btn-ghost { padding-inline: 6px; }

.hero { position: relative; overflow: hidden; padding: var(--section-gap) 0; background: var(--surface-canvas); }
.hero .container { position: relative; display: grid; grid-template-columns: 1.25fr .75fr; gap: 50px; align-items: center; }
.hero h1 { font-size: var(--fluid-display-xl); line-height: var(--leading-display-xl); margin-bottom: 24px; }
.hero h1 em { font-style: italic; color: var(--color-ink); }
.hero p { font-size: var(--text-body-lg); line-height: var(--leading-body-lg); color: var(--color-graphite-smoke); max-width: 560px; }
.hero .btn-gold::after { content: '→'; }
.hero-logo { width: min(380px, 100%); height: auto; aspect-ratio: 1; margin-inline: auto; border-radius: var(--radius-lg); border: 1px solid var(--color-hairline); background: var(--color-paper); box-shadow: var(--shadow-xl); }
.tag { display: inline-block; color: var(--color-graphite); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
.hero-stats { display: flex; gap: 40px; margin-top: 40px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--color-hairline); }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: var(--text-heading-sm); line-height: 1.1; font-weight: 400; color: var(--color-ink); letter-spacing: -.01em; }
.hero-stats span { color: var(--color-graphite); font-size: var(--text-body-sm); }

.secao { padding: var(--section-gap) 0; }
.secao-alt { background: var(--color-paper); border-block: 1px solid var(--color-ash); }
.secao-titulo { text-align: center; margin: 0 auto 50px; max-width: 760px; }
.secao-titulo h2 { font-size: var(--fluid-display); line-height: var(--leading-display); margin-bottom: 16px; }
.secao-titulo p { color: var(--color-graphite); font-size: var(--text-body-lg); line-height: var(--leading-body-lg); max-width: 600px; margin: 0 auto; }

.planos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plano { background: var(--surface-card); border: 1px solid var(--color-hairline); border-radius: var(--radius-lg); padding: 28px; position: relative; display: flex; flex-direction: column; transition: transform .25s var(--curva), box-shadow .25s var(--curva); }
.plano.destaque { box-shadow: var(--shadow-xl); }
@media (hover: hover) { .plano:hover { transform: translateY(-3px); box-shadow: var(--shadow-xl); } }
.plano .selo { position: absolute; top: -11px; left: 28px; background: var(--color-ink); color: var(--color-paper); font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: var(--radius-full); letter-spacing: .1em; }
.plano h3 { font-size: var(--text-body-sm); color: var(--color-graphite); font-weight: 500; text-transform: uppercase; letter-spacing: .1em; }
.plano .dias { font-family: var(--font-display); font-size: var(--fluid-heading); line-height: 1.05; color: var(--color-ink); letter-spacing: -.015em; }
.plano .dias span { font-size: .55em !important; color: var(--color-graphite); }
.plano .preco { font-size: 36px; font-weight: 600; margin: 16px 0; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plano .preco small { font-size: var(--text-body-sm); color: var(--color-graphite); font-weight: 400; letter-spacing: 0; }
.plano ul { list-style: none; padding: 0; margin: 0 0 24px; color: var(--color-graphite-smoke); font-size: var(--text-body-sm); flex: 1; border-top: 1px solid var(--color-ash); }
.plano li { padding: 10px 0; display: flex; gap: 10px; border-bottom: 1px solid var(--color-ash); }
.plano li::before { content: '✓'; color: var(--color-ink); font-weight: 600; }
.planos.grupo { grid-template-columns: repeat(2, 1fr); margin-top: 20px; }
.plano .precos { margin: 16px 0; }
.plano .precos div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--color-ash); font-size: var(--text-body-sm); }
.plano .precos strong { color: var(--color-ink); font-weight: 600; }

.horarios { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.horario { background: var(--surface-card); border: 1px solid var(--color-hairline); border-radius: var(--radius-lg); padding: var(--card-padding); }
.horario h3 { margin-bottom: 4px; font-size: 18px; }
.horario .hora { font-family: var(--font-display); font-size: var(--text-heading-sm); line-height: 1.1; color: var(--color-ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.chip { background: var(--color-fog); border-radius: var(--radius-full); padding: 3px 10px; font-size: 12px; color: var(--color-ink); font-weight: 500; }

.diferenciais { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.diferencial { text-align: left; padding: 24px 20px; }
.diferencial .ic { font-size: 28px; margin-bottom: 16px; }
.diferencial h3 { font-size: 18px; }
.diferencial p { color: var(--color-graphite); font-size: var(--text-body-sm); margin: 0; }

.redes { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.rede { flex: 0 1 210px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; background: var(--surface-card); border: 1px solid var(--color-hairline); border-radius: var(--radius-lg); padding: 24px 20px; color: var(--color-ink); text-decoration: none; transition: transform .25s var(--curva), box-shadow .25s var(--curva); }
.rede:hover { text-decoration: none; }
@media (hover: hover) { .rede:hover { transform: translateY(-3px); box-shadow: var(--shadow-xl); } }
.rede-ic { width: 52px; height: 52px; border-radius: var(--radius-lg); display: grid; place-items: center; background: var(--color-ink); color: var(--color-paper); flex-shrink: 0; }
.rede-ic svg { width: 26px; height: 26px; }
.rede-txt { flex: 1; }
.rede-txt strong { display: block; font-size: 16px; font-weight: 600; }
.rede-txt span { color: var(--color-graphite); font-size: var(--text-body-sm); }
.rede-acao { color: var(--color-ink); font-weight: 500; font-size: var(--text-body-sm); border: 1px solid var(--color-ink); border-radius: var(--radius-lg); padding: 6px 14px; transition: background-color .15s, color .15s; }
.rede:hover .rede-acao { background: var(--color-ink); color: var(--color-paper); }
.rede-whatsapp svg { fill: currentColor; }
.posts-insta { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 340px)); justify-content: center; gap: 20px; margin-top: 40px; }
.posts-insta:empty { display: none; }
.posts-insta iframe { width: 100%; height: 560px; border: 1px solid var(--color-hairline); border-radius: var(--radius-lg); background: var(--color-paper); box-shadow: var(--shadow-xl); }

.cta-final { text-align: center; background: var(--surface-dark); color: var(--on-accent); border-radius: var(--radius-xl); padding: var(--section-gap) 24px; }
.cta-final h2 { font-size: var(--fluid-display); line-height: var(--leading-display); margin-bottom: 16px; }
.cta-final p { color: var(--on-dark-muted); font-size: var(--text-body-lg); max-width: 600px; margin: 0 auto; }
.cta-final .btn { background: var(--color-kinusty); border-color: var(--color-kinusty); color: var(--on-kinusty); margin-top: 28px; }
.cta-final .btn::after { content: '→'; }
.cta-final .btn:hover { background: var(--blue-hover); border-color: var(--blue-hover); }

.rodape { padding: 40px 0; color: var(--color-graphite); font-size: var(--text-body-sm); border-top: 1px solid var(--color-hairline); background: var(--surface-canvas); }
.rodape .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rodape a { color: var(--color-ink); }

.whats-flutuante { position: fixed; right: 16px; bottom: 16px; width: 54px; height: 54px; border-radius: 50%; background: var(--surface-dark); display: grid; place-items: center; box-shadow: var(--shadow-xl); z-index: 90; transition: transform .2s var(--curva); }
.whats-flutuante:active { transform: scale(.94); }
.whats-flutuante svg { width: 28px; height: 28px; fill: var(--on-accent); }

/* ---------- Auth / matrícula ---------- */
.pagina-form { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; background: var(--surface-canvas); }
.form-box { width: min(460px, 100%); }
.form-box.largo { width: min(860px, 100%); }
.form-box > .card { padding: 32px; }
.form-box h2 { font-size: var(--text-heading); line-height: var(--leading-heading); font-family: var(--font-display); font-weight: 400; }
.form-logo { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 16px; }
.etapas { display: flex; gap: 8px; margin-bottom: 28px; }
.etapa { flex: 1; text-align: left; font-size: 12px; color: var(--color-graphite); font-weight: 500; }
.etapa::before { content: ''; display: block; height: 2px; border-radius: 2px; background: var(--color-ash); margin-bottom: 8px; }
.etapa.ativa { color: var(--color-ink); }
.etapa.feita { color: var(--color-ink); }
.etapa.ativa::before { background: var(--color-kinusty); }
.etapa.feita::before { background: var(--color-ink); }
.opcoes-plano { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.opcao { border: 1px solid var(--color-ash); border-radius: var(--radius-lg); padding: 16px; cursor: pointer; text-align: center; transition: border-color .15s, box-shadow .15s, background-color .15s; background: var(--color-paper); }
.opcao:hover { border-color: var(--color-ink); }
.opcao.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: var(--gold-soft); }
.opcao strong { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.opcao .gold { font-weight: 600; }
.opcao small { color: var(--color-graphite); }
.opcoes-turma { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.opcoes-turma .opcao { text-align: left; }
.opcoes-turma .opcao strong { font-size: 16px; }
.dias-sel { display: flex; gap: 10px; flex-wrap: wrap; }
.dia-btn { border: 1px solid var(--color-ash); background: var(--color-paper); color: var(--color-ink); border-radius: var(--radius-lg); padding: 10px 16px; cursor: pointer; font: inherit; font-weight: 500; min-width: 92px; transition: border-color .15s, box-shadow .15s; }
.dia-btn:hover:not(:disabled) { border-color: var(--color-ink); }
.dia-btn small { display: block; font-weight: 400; font-size: 12px; color: var(--color-graphite); }
.dia-btn.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: var(--gold-soft); color: var(--accent); }
.dia-btn:disabled { opacity: .35; cursor: not-allowed; }
.resumo-box { background: var(--color-fog); border: 1px solid var(--color-ash); border-radius: var(--radius-lg); padding: 16px 20px; font-size: var(--text-body-sm); }
.resumo-box div { display: flex; justify-content: space-between; padding: 4px 0; gap: 16px; }
.resumo-box div span:first-child { color: var(--color-graphite); }
.pessoa { border: 1px solid var(--color-ash); border-radius: var(--radius-lg); padding: var(--card-padding); margin-bottom: 20px; }
.pessoa > h3 { margin: 0 0 16px; font-size: 16px; }
.pessoa > h3 small { color: var(--color-graphite); font-weight: 400; }
.opcoes-linha { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 4px 0; }
.regras { font-size: var(--text-body-sm); color: var(--color-graphite-smoke); margin: 6px 0 0; padding-left: 20px; }
.erro-msg { background: var(--bad-soft); color: var(--bad); border: 1px solid rgba(179, 38, 30, .25); border-radius: var(--radius-lg); padding: 10px 14px; font-size: var(--text-body-sm); margin-bottom: 16px; }

/* =====================================================
   PAINÉIS (aluno + admin)
   ===================================================== */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.lateral { background: var(--color-paper); border-right: 1px solid var(--color-hairline); padding: 24px 14px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 24px; overflow-y: auto; }
.lateral .marca { padding: 0 10px; }
.menu { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.menu button { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--radius-lg); border: 0; background: transparent; color: var(--color-ink); font: inherit; font-size: var(--text-body); font-weight: 500; cursor: pointer; text-align: left;
  transition: background-color .15s, color .15s, transform .1s ease-out; -webkit-tap-highlight-color: transparent; }
.menu button:hover { background: var(--color-fog); }
.menu button:active { transform: scale(.98); transition-duration: 0s; }
.menu button.ativo { background: var(--gold-soft); color: var(--accent); font-weight: 600; }
.menu .ic { width: 20px; text-align: center; }
.menu .contador { margin-left: auto; background: var(--color-ink); color: var(--color-paper); font-size: 11px; font-weight: 600; border-radius: var(--radius-full); padding: 1px 7px; }
.menu-secao { font-size: var(--text-caption); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--color-graphite); padding: 14px 10px 4px; }
.menu-secao:first-child { padding-top: 0; }
.menu button.menu-comunidade { border: 1px solid var(--color-ash); }
.menu button.menu-comunidade.ativo { border-color: var(--accent); }
.usuario-box { display: flex; gap: 10px; align-items: center; padding: 12px; background: var(--color-fog); border-radius: var(--radius-lg); }
.usuario-box div { min-width: 0; }
.usuario-box strong { display: block; font-size: var(--text-body-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usuario-box small { color: var(--color-graphite); font-size: 12px; }
.lateral-rodape { display: flex; justify-content: space-between; gap: 6px; margin-top: -12px; }
.lateral-rodape .btn { padding-inline: 8px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--color-ink); color: var(--color-paper); display: grid; place-items: center; font-weight: 600; font-size: 14px; flex-shrink: 0; overflow: hidden; }
.avatar img, .foto-previa img { width: 100%; height: 100%; object-fit: cover; }
.foto-escolha { display: flex; align-items: center; gap: 16px; }
.foto-previa { width: 88px; height: 88px; border-radius: 50%; background: var(--color-fog); border: 1px dashed var(--color-stone); display: grid; place-items: center; font-size: 1.8rem; overflow: hidden; flex-shrink: 0; }
.foto-previa.ok { border-style: solid; border-color: var(--color-hairline); }
.pausa-card { border-color: var(--warn); }

.conteudo { padding: 40px; min-width: 0; max-width: 1400px; }
.conteudo-topo { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--color-hairline); }
.conteudo-topo h1 { font-family: var(--font-display); font-weight: 400; font-size: var(--fluid-heading); line-height: 1.05; letter-spacing: -.02em; margin: 0; }
.conteudo-topo p { margin: 6px 0 0; color: var(--color-graphite); font-size: var(--text-body); }
.mobile-bar { display: none; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi { background: var(--surface-card); border: 1px solid var(--color-hairline); border-radius: var(--radius-lg); padding: var(--card-padding); transition: transform .2s var(--curva), box-shadow .2s var(--curva); }
@media (hover: hover) { .kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); } }
.kpi .rotulo { font-size: 13px; color: var(--color-graphite); display: flex; justify-content: space-between; gap: 6px; font-weight: 500; }
.kpi .valor { font-size: 32px; font-weight: 600; margin: 6px 0; font-variant-numeric: tabular-nums; letter-spacing: -.035em; line-height: 1.1; }
.kpi .sub { font-size: 13px; color: var(--color-graphite-smoke); }
.kpi.destaque { background: var(--surface-dark); border-color: var(--surface-dark); color: var(--on-accent); }
.kpi.destaque .valor { color: var(--color-kinusty); }
.kpi.destaque .rotulo, .kpi.destaque .sub, .kpi.destaque .muted { color: var(--on-dark-muted); }
.kpi.destaque .delta-up { color: #7dd3a0; } .kpi.destaque .delta-down { color: #ff9a92; }
.kpi.destaque { border-color: var(--surface-dark); }
.delta-up { color: var(--good); } .delta-down { color: var(--bad); }

.grid-dash { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-dash-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.grafico { position: relative; height: 280px; }
.grafico.baixo { height: 220px; }

.barra-prog { height: 6px; background: var(--color-ash); border-radius: var(--radius-full); overflow: hidden; }
.barra-prog > div { height: 100%; background: var(--color-ink); border-radius: var(--radius-full); }
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--color-ash); font-size: var(--text-body-sm); }
.lista li:last-child { border-bottom: 0; }
.lista .sec { color: var(--color-graphite); font-size: 13px; }

.filtros { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filtros input, .filtros select { width: auto; min-width: 160px; padding: 8px 12px; background: var(--color-paper); }
.filtros input[type=search] { flex: 1; min-width: 200px; }

.aula { display: flex; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--color-ash); }
.aula:last-child { border-bottom: 0; }
.aula .data-box { width: 54px; text-align: center; background: var(--color-fog); border-radius: var(--radius-lg); padding: 6px 0; flex-shrink: 0; }
.aula .data-box strong { display: block; font-size: 20px; line-height: 1; font-weight: 600; }
.aula .data-box small { font-size: var(--text-caption); color: var(--color-graphite); text-transform: uppercase; font-weight: 600; letter-spacing: .08em; }

.pix-box { background: var(--color-fog); border: 1px dashed var(--color-stone); border-radius: var(--radius-lg); padding: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; font-size: 13px; }
.boas-vindas { background: var(--surface-card); border: 1px solid var(--color-hairline); box-shadow: var(--shadow-xl); }
.boas-vindas h2, .boas-vindas h3 { font-family: var(--font-display); font-weight: 400; }
.aviso-item { padding: 14px 0; border-bottom: 1px solid var(--color-ash); }
.aviso-item:last-child { border-bottom: 0; }
.aviso-item p { margin: 4px 0 0; color: var(--color-graphite-smoke); font-size: var(--text-body-sm); white-space: pre-line; }

.chamada-linha { display: flex; justify-content: space-between; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--color-ash); gap: 16px; }
.toggle { display: inline-flex; border: 1px solid var(--color-ink); border-radius: var(--radius-lg); overflow: hidden; }
.toggle button { border: 0; background: transparent; color: var(--color-graphite); padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.toggle button + button { border-left: 1px solid var(--color-ink); }
.toggle button.on-p { background: var(--color-ink); color: var(--color-paper); font-weight: 600; }
.toggle button.on-f { background: var(--bad); color: var(--on-accent); font-weight: 600; }

/* ---------- Comunidade ---------- */
.feed { max-width: 640px; display: flex; flex-direction: column; gap: 16px; }
.post-novo { display: flex; flex-direction: column; gap: 12px; }
.post-novo-linha { display: flex; gap: 12px; align-items: flex-start; }
.post-novo textarea { min-height: 64px; }
.post-novo-previa { position: relative; align-self: flex-start; }
.post-novo-previa img { max-height: 220px; max-width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--color-hairline); display: block; }
.post-novo-previa button { position: absolute; top: 6px; right: 6px; background: var(--color-ink); color: var(--color-paper); border-color: var(--color-hairline); border-radius: 50%; width: 30px; height: 30px; padding: 0; }
#lista-posts { display: flex; flex-direction: column; gap: 16px; }
.card.post { padding: 18px 20px; }
.post-fixado { border-width: 2px; }
.post-topo { display: flex; align-items: center; gap: 12px; }
.post-autor { flex: 1; min-width: 0; }
.post-autor small { display: block; color: var(--color-graphite); font-size: 12px; }
.post-acoes { display: flex; gap: 4px; }
.post-acoes .btn { padding: 4px 8px; }
.btn-perigo { color: var(--bad) !important; border-color: var(--bad) !important; }
.avatar-escola { background: var(--color-paper); border: 1px solid var(--color-hairline); }
.selo-escola { font-size: 11px; vertical-align: middle; }
.selo-escola::before { background: var(--color-kinusty); }
.post-texto { white-space: pre-wrap; overflow-wrap: anywhere; margin: 14px 0 0; line-height: 1.55; }
.post-foto { display: block; width: calc(100% + 40px); max-width: none; margin: 14px -20px 0; max-height: 620px; object-fit: cover; background: var(--color-fog); border-block: 1px solid var(--color-hairline); }
.post-rodape { display: flex; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--color-ash); }
.post-btn { background: transparent; border: 0; color: var(--color-ink); font: inherit; font-size: var(--text-body-sm); font-weight: 500; padding: 6px 12px; border-radius: var(--radius-lg); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.post-btn:hover { background: var(--color-fog); }
.post-btn.curtido { color: var(--accent); font-weight: 600; }
.comentarios { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.comentario { display: flex; gap: 10px; align-items: flex-start; }
.comentario-corpo { flex: 1; min-width: 0; background: var(--color-fog); border-radius: var(--radius-lg); padding: 8px 12px; font-size: var(--text-body-sm); }
.comentario-corpo p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comentar { display: flex; gap: 8px; }
.comentar input { flex: 1; }

/* ---------- Mercado Pago / notificações / avaliação ---------- */
.mp-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; border-color: var(--color-hairline); background: var(--color-fog); }
.notif-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; border-color: var(--color-hairline); background: var(--surface-card); }
.notif-card p { margin: 4px 0 0; font-size: var(--text-body-sm); }
.estrelas { display: flex; gap: 6px; justify-content: center; margin: 16px 0 6px; }
.estrelas button { background: none; border: 0; padding: 2px; font-size: 2.6rem; line-height: 1; cursor: pointer; color: var(--color-ash); transition: transform .12s, color .12s; }
.estrelas button.on { color: var(--color-ink); }
.estrelas button:active { transform: scale(.88); }
.rotulo-nota { min-height: 1.5em; margin: 0 0 16px; text-align: center; color: var(--color-ink); font-weight: 500; }
.nota { color: var(--color-ink); letter-spacing: .08em; white-space: nowrap; }

/* ---------- Tutorial ---------- */
.tour-foco { position: fixed; z-index: 2000; border-radius: var(--radius-lg); pointer-events: auto; cursor: pointer;
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 100vmax rgba(16, 21, 28, .55);
  transition: top .5s var(--curva), left .5s var(--curva), width .5s var(--curva), height .5s var(--curva); animation: escurecer .35s var(--curva); }
.tour-foco.sem-alvo { box-shadow: 0 0 0 100vmax rgba(16, 21, 28, .55); }
.tour-balao { position: fixed; z-index: 2001; background: var(--color-paper); border: 1px solid var(--color-hairline); border-radius: var(--radius-lg); padding: 18px 20px 16px; box-shadow: var(--shadow-xl);
  transition: top .5s var(--curva), left .5s var(--curva); }
.tour-balao.entra { animation: materializar .4s var(--curva); }
.tour-balao h3 { margin: 6px 0 4px; font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.15; }
.tour-balao p { margin: 0; color: var(--color-graphite-smoke); font-size: var(--text-body-sm); line-height: 1.55; }
.tour-topo { display: flex; justify-content: space-between; align-items: center; }
.tour-emoji { font-size: 1.5rem; line-height: 1; }
.tour-contagem { font-size: 12px; color: var(--color-graphite); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.tour-pontos { display: flex; gap: 5px; margin: 14px 0 12px; }
.tour-pontos i { width: 6px; height: 6px; border-radius: 3px; background: var(--color-ash); transition: width .35s var(--curva), background-color .35s; }
.tour-pontos i.on { width: 18px; background: var(--color-kinusty); }
.tour-acoes { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tour-foco.sai, .tour-balao.sai { opacity: 0; transition: opacity .2s var(--curva-saida); }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-dash, .grid-dash-3 { grid-template-columns: 1fr; }
  .diferenciais { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  :root { --section-gap: 56px; }
  .nav { gap: 8px; }
  .nav a:not(.btn) { display: none; }
  .hero .container { grid-template-columns: 1fr; text-align: center; gap: 32px; }
  .hero p { margin-inline: auto; }
  .hero-stats, .hero .flex { justify-content: center; }
  .hero-logo { width: 200px; order: -1; }
  .hero-logo { height: auto; aspect-ratio: 1; }
  .planos, .planos.grupo { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; }
  .app { grid-template-columns: 1fr; }
  .lateral { position: fixed; left: 0; top: 0; width: 280px; z-index: 300; transform: translateX(-100%); transition: transform .45s var(--curva), box-shadow .45s var(--curva); }
  .lateral.aberta { transform: none; box-shadow: 0 0 0 100vmax rgba(16, 21, 28, .45); }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 8px 16px; border-bottom: 1px solid var(--color-hairline); background: var(--color-paper); position: sticky; top: 0; z-index: 200; }
  .mobile-bar button { background: none; border: 0; color: var(--color-ink); font-size: 1.5rem; cursor: pointer; width: 30px; }
  .mobile-bar .marca > span { font-size: 18px; }
  .conteudo { padding: 24px 16px; }
  .conteudo-topo { margin-bottom: 20px; padding-bottom: 16px; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .opcoes-plano, .opcoes-turma { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .valor { font-size: 24px; }
  .diferenciais { grid-template-columns: 1fr; }
  .rede { flex-basis: calc(50% - 10px); padding: 20px 12px; }
  .rede-acao { padding: 5px 10px; }
  .card { padding: 16px; }
  .form-box > .card { padding: 22px 18px; }
  .form-box h2 { font-size: var(--text-heading-sm); }
  .hero-stats { gap: 20px 28px; }
  .cta-final { padding: 48px 20px; }
  .filtros input, .filtros select { min-width: 0; flex: 1 1 140px; }
  .topo .marca > span { font-size: 18px; }
  .nav .btn { padding: 6px 10px; }
  .post-foto { width: calc(100% + 32px); margin-inline: -16px; }
  /* No celular a janela vira uma folha que sobe de baixo */
  .modal { place-items: end center; padding: 0; }
  .modal-box { width: 100%; max-height: 92vh; border-radius: var(--radius-xl) var(--radius-xl) 0 0; border-bottom: 0; padding: 22px 18px calc(24px + env(safe-area-inset-bottom)); animation-name: folha; }
  .modal-box::before { content: ''; display: block; width: 38px; height: 4px; border-radius: 2px; background: var(--color-ash); margin: -8px auto 16px; }
  .modal.saindo .modal-box { animation-name: folha; }
}
@keyframes folha { from { transform: translateY(100%); } }

/* ---------- Acessibilidade ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
  .modal, .modal-box, .tour-balao.entra, .tour-foco { animation: escurecer .2s ease !important; }
  .kpi:hover, .plano:hover, .rede:hover { transform: none; }
}
@media (prefers-contrast: more) {
  input, select, textarea, .opcao, .dia-btn, .badge { border-color: var(--color-ink); }
  .muted, .hint { color: var(--color-graphite-smoke); }
}

/* =====================================================
   TEMA ESCURO — data-theme="dark" (escolha salva) ou sistema escuro sem escolha
   ===================================================== */
:root[data-theme="dark"] {
  --color-ink: #f4f3ee;
  --color-paper: #171717;
  --color-fog: #1f1f1e;
  --color-ash: #2d2c2a;
  --color-graphite: #a3a29b;
  --color-graphite-smoke: #d2d0c8;
  --color-stone: #5f5e59;
  --color-hairline: rgba(255, 255, 255, .3);
  --linha-secao: rgba(255, 255, 255, .3);
  --linha-quadra: rgba(255, 255, 255, .85);
  --surface-canvas: #0d0d0d;
  --surface-card: #171717;
  --surface-dark: #000000;
  /* No escuro o amarelo funciona como texto e linha (contraste alto) */
  --accent: var(--color-kinusty);
  --accent-ring: rgba(245, 196, 0, .3);
  --gold-soft: rgba(245, 196, 0, .12);
  --good: #6fd39b;
  --warn: #f0b45a;
  --bad: #ff8a80;
  --bad-soft: rgba(255, 138, 128, .12);
  --marca-dagua-opacidade: .07;
  --shadow-xl: 0 10px 24px -12px rgba(0,0,0,.7);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --color-ink: #f4f3ee;
  --color-paper: #171717;
  --color-fog: #1f1f1e;
  --color-ash: #2d2c2a;
  --color-graphite: #a3a29b;
  --color-graphite-smoke: #d2d0c8;
  --color-stone: #5f5e59;
  --color-hairline: rgba(255, 255, 255, .3);
  --linha-secao: rgba(255, 255, 255, .3);
  --linha-quadra: rgba(255, 255, 255, .85);
  --surface-canvas: #0d0d0d;
  --surface-card: #171717;
  --surface-dark: #000000;
  /* No escuro o amarelo funciona como texto e linha (contraste alto) */
  --accent: var(--color-kinusty);
  --accent-ring: rgba(245, 196, 0, .3);
  --gold-soft: rgba(245, 196, 0, .12);
  --good: #6fd39b;
  --warn: #f0b45a;
  --bad: #ff8a80;
  --bad-soft: rgba(255, 138, 128, .12);
  --marca-dagua-opacidade: .07;
  --shadow-xl: 0 10px 24px -12px rgba(0,0,0,.7);
  color-scheme: dark;
  }
}
/* Troca de tema suave (classe aplicada por alguns ms durante a troca) */
html.tema-trocando, html.tema-trocando *, html.tema-trocando *::before, html.tema-trocando *::after {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease, fill .35s ease, box-shadow .35s ease !important;
}

/* =====================================================
   LOGO NO FUNDO — marca d'água inteira (contain), centralizada, atrás de tudo
   ===================================================== */
body::before {
  content: ''; position: fixed; inset: 0; margin: auto; z-index: -1; pointer-events: none;
  width: min(72vw, 72vh, 680px); height: min(72vw, 72vh, 680px);
  background: url(/img/logo.webp) center / contain no-repeat;
  opacity: var(--marca-dagua-opacidade);
}
/* Seções deixam o fundo aparecer; cards continuam opacos para a leitura */
.hero, .rodape, .pagina-form { background: transparent; }
.secao-alt { background: color-mix(in srgb, var(--color-paper) 72%, transparent); }
/* Nos painéis, centraliza na área de conteúdo (à direita da lateral) e fica mais discreta */
body:has(.app)::before { opacity: calc(var(--marca-dagua-opacidade) * .75); }
@media (min-width: 861px) {
  body:has(.app)::before { left: 250px; width: min(calc(72vw - 180px), 72vh, 680px); height: min(calc(72vw - 180px), 72vh, 680px); }
}

/* =====================================================
   BOTÃO DE TEMA (sol/lua) — inserido por /js/visual.js
   ===================================================== */
.tema-btn { width: 36px; height: 36px; flex-shrink: 0; display: inline-grid; place-items: center; padding: 0; border-radius: var(--radius-lg);
  border: 1px solid var(--color-hairline); background: transparent; color: var(--color-ink); cursor: pointer;
  transition: transform .1s ease-out, background-color .15s; -webkit-tap-highlight-color: transparent; }
.tema-btn:hover { background: var(--color-fog); }
.tema-btn:active { transform: scale(.92); transition-duration: 0s; }
.tema-btn svg { width: 18px; height: 18px; transition: transform .45s var(--curva), opacity .25s; }
.tema-btn svg { grid-area: 1 / 1; }
.tema-btn .ic-sol { opacity: 0; transform: rotate(-90deg) scale(.6); }
:root[data-theme="dark"] .tema-btn .ic-sol { opacity: 1; transform: none; }
:root[data-theme="dark"] .tema-btn .ic-lua { opacity: 0; transform: rotate(90deg) scale(.6); }
.tema-flutuante { position: fixed; top: 16px; right: 16px; z-index: 120; background: var(--color-paper); }
.mobile-bar > span:last-child { width: auto !important; min-width: 30px; display: flex; justify-content: flex-end; }
.lateral-rodape .tema-btn { width: 32px; height: 32px; }

/* =====================================================
   ANIMAÇÕES — só transform/opacity; ligadas pela classe html.anima (posta por JS no <head>)
   ===================================================== */
@keyframes kv-entrada { from { opacity: 0; transform: translateY(10px); } }
html.anima body > header, html.anima body > section:first-of-type .container,
html.anima .pagina-form .form-box, html.anima .lateral, html.anima .mobile-bar { animation: kv-entrada .6s var(--curva) both; }
html.anima body > section:first-of-type .container { animation-delay: .08s; }
/* Painéis: o conteúdo de cada aba entra em cascata quando é desenhado */
html.anima .conteudo > * { animation: kv-entrada .5s var(--curva) both; }
html.anima .conteudo > *:nth-child(2) { animation-delay: .05s; }
html.anima .conteudo > *:nth-child(3) { animation-delay: .1s; }
html.anima .conteudo > *:nth-child(4) { animation-delay: .15s; }
html.anima .conteudo > *:nth-child(n+5) { animation-delay: .2s; }
html.anima .kpis > .kpi:nth-child(2) { animation: kv-entrada .5s .06s var(--curva) both; }
html.anima .kpis > .kpi:nth-child(3) { animation: kv-entrada .5s .12s var(--curva) both; }
html.anima .kpis > .kpi:nth-child(4) { animation: kv-entrada .5s .18s var(--curva) both; }
/* Ao rolar: fade + subida curta. Só esconde o que o JS marcou com .revela */
html.anima .revela { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--curva), transform .7s var(--curva); transition-delay: var(--atraso, 0s); }
html.anima .revela.visto { opacity: 1; transform: none; }
/* Hover/foco de cards e botões */
.card, .opcao, .dia-btn, .horario { transition: transform .25s var(--curva), box-shadow .25s var(--curva), border-color .15s, background-color .15s; }
@media (hover: hover) {
  .horario:hover, .diferencial:hover { transform: translateY(-3px); box-shadow: var(--shadow-xl); }
  .btn-gold:hover, .cta-final .btn:hover { transform: translateY(-1px); }
  .btn-gold::after, .cta-final .btn::after { display: inline-block; transition: transform .25s var(--curva); }
  .btn-gold:hover::after, .cta-final .btn:hover::after { transform: translateX(3px); }
}
.btn:focus-visible, .tema-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html.anima *, html.anima *::before, html.anima *::after { animation: none !important; }
  html.anima .revela { opacity: 1 !important; transform: none !important; transition: none !important; }
  html.tema-trocando * { transition: none !important; }
  .horario:hover, .diferencial:hover, .btn-gold:hover { transform: none; }
}

/* =====================================================
   QUADRA DE GINÁSIO — tipografia, linhas e números
   ===================================================== */
body { font-family: var(--font-body); font-size: var(--text-body); line-height: 1.5; }
h1, h2, .titulo-display, .form-box h2, .conteudo-topo h1, .modal-box h2, .tour-balao h3, .boas-vindas h2, .boas-vindas h3 {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase; letter-spacing: .005em; line-height: .92;
}
h3, h4 { font-family: var(--font-body); font-weight: 700; letter-spacing: 0; }
.hero h1 em, .secao-titulo h2 em { font-style: normal; color: var(--color-kinusty); }

/* Botões: caixa alta esportiva */
.btn { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 14px; border-width: 2px; }
.btn-sm { font-size: 12px; padding: 6px 12px; }
.btn-ghost { border-color: transparent; }

/* Rótulos (tags) com marcador amarelo */
.tag { font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: .14em; color: var(--color-graphite); display: inline-flex; align-items: center; gap: 10px; }
.tag::before { content: ''; width: 22px; height: var(--linha); background: var(--color-kinusty); }

/* Marca: wordmark na fonte de título + ponto amarelo */
.marca > span { font-family: var(--font-display); font-weight: 900; font-size: 26px; letter-spacing: .02em; }
.marca > span::after { width: .26em; height: .26em; }
.marca span small { font-family: var(--font-body); font-weight: 600; letter-spacing: .22em; }
.marca-form > span { font-size: 36px; }

/* Topo e divisórias com linha de quadra */
.topo { border-bottom: var(--linha) solid var(--linha-secao); }
.secao-alt { border-block: var(--linha) solid var(--linha-secao); }
.rodape { border-top: var(--linha) solid var(--linha-secao); }
.conteudo-topo { border-bottom: var(--linha) solid var(--linha-secao); }
.lateral { border-right: var(--linha) solid var(--linha-secao); }
th { font-weight: 700; font-size: 12px; letter-spacing: .08em; border-bottom: 2px solid var(--color-hairline); }
@media (max-width: 860px) { .mobile-bar { border-bottom: var(--linha) solid var(--linha-secao); } }

/* ---------- Hero = quadra vista de cima ---------- */
.hero { background: var(--color-carbon); color: #fff; padding: 48px 0; }
.hero .container { padding: 44px 36px; }
.hero .container::before { content: ''; position: absolute; inset: 0; border: var(--linha) solid var(--linha-quadra); pointer-events: none; }
/* rede: linha central tracejada entre o texto e a logo */
.hero .container::after { content: ''; position: absolute; top: 0; bottom: 0; left: calc(36px + (100% - 72px - 50px) * .625 + 25px);
  border-left: var(--linha) dashed var(--linha-quadra); pointer-events: none; }
.hero h1 { color: #fff; }
.hero p, .hero .tag { color: #d6d4cc; }
.hero .btn-outline { border-color: #fff; color: #fff; }
.hero .btn-outline:hover { background: #fff; color: #0d0d0d; }
.hero-logo { position: relative; z-index: 1; border: 0; border-radius: 50%; background: transparent;
  box-shadow: 0 0 0 var(--linha) var(--linha-quadra), 0 0 0 14px #0d0d0d, 0 0 0 calc(14px + var(--linha)) rgba(255,255,255,.35); }
.hero-stats { border-top: var(--linha) solid var(--linha-quadra); }
.hero-stats strong { font-family: var(--font-display); font-weight: 900; font-size: 40px; line-height: .95; color: var(--color-kinusty); text-transform: uppercase; letter-spacing: .01em; }
.hero-stats span { color: #b4b2aa; }
@media (hover: none) { .hero .btn-outline:hover { background: transparent; color: #fff; } }
@media (max-width: 860px) {
  .hero { padding: 24px 0; }
  .hero .container { padding: 32px 18px 28px; }
  /* no celular a logo fica em cima e a rede atravessa na horizontal */
  .hero .container::after { left: 0; right: 0; bottom: auto; top: calc(32px + 200px + 16px); border-left: 0; border-top: var(--linha) dashed var(--linha-quadra); }
  .hero-stats strong { font-size: 30px; }
}

/* Números grandes na fonte de título */
.plano .dias, .plano .preco, .horario .hora, .kpi .valor, .opcao strong, .aula .data-box strong {
  font-family: var(--font-display); font-weight: 900; letter-spacing: .005em; font-variant-numeric: tabular-nums;
}
.plano .dias { text-transform: uppercase; }
.plano .preco { font-size: 52px; line-height: 1; }
.horario .hora { font-size: 40px; line-height: 1; }
.kpi .valor { font-size: 44px; line-height: 1; }
.opcao strong { font-size: 30px; line-height: 1; }
.aula .data-box strong { font-size: 26px; }
.plano.destaque { border-width: var(--linha); }
.plano .selo { background: var(--color-kinusty); color: var(--on-kinusty); font-weight: 700; border-radius: var(--radius-sm); }
.plano li::before { background: var(--color-kinusty); color: var(--on-kinusty); width: 18px; height: 18px; flex-shrink: 0; display: grid; place-items: center; font-size: 11px; border-radius: 2px; }
.horario { border-top: var(--linha) solid var(--color-kinusty); }
.chip, .badge { border-radius: var(--radius-sm); }
.badge { font-weight: 600; }
.kpi.destaque { box-shadow: inset 0 0 0 6px var(--surface-dark), inset 0 0 0 9px rgba(255,255,255,.85); }
.barra-prog > div { background: var(--color-kinusty); }
.etapa::before { height: var(--linha); }
@media (max-width: 600px) { .kpi .valor { font-size: 34px; } .plano .preco { font-size: 44px; } }

/* Menu dos painéis: aba ativa em amarelo */
.menu button.ativo, .menu button.menu-comunidade.ativo { background: var(--color-kinusty); color: var(--on-kinusty); border-color: var(--color-kinusty); font-weight: 700; }
.menu .contador { background: var(--color-kinusty); color: var(--on-kinusty); }
.menu-secao { font-family: var(--font-display); font-weight: 800; font-size: 13px; }
.opcao.sel, .dia-btn.sel { border-color: var(--color-ink); box-shadow: 0 0 0 2px var(--color-ink) inset; background: var(--gold-soft); color: var(--color-ink); }
.toggle button.on-p { background: var(--color-kinusty); color: var(--on-kinusty); }
.estrelas button.on { color: var(--color-kinusty); -webkit-text-stroke: 1px var(--color-ink); }

/* CTA final = meia quadra com linhas */
.cta-final { position: relative; overflow: hidden; }
.cta-final::before { content: ''; position: absolute; inset: 14px; border: var(--linha) solid rgba(255,255,255,.85); pointer-events: none; }
.cta-final::after { content: ''; position: absolute; left: 14px; right: 14px; top: 50%; border-top: var(--linha) dashed rgba(255,255,255,.3); pointer-events: none; }
.cta-final > * { position: relative; z-index: 1; }
.cta-final p { color: #c9c7bf; }

/* Botão flutuante do WhatsApp em amarelo */
.whats-flutuante { background: var(--color-kinusty); }
.whats-flutuante svg { fill: var(--on-kinusty); }

/* ---------- Placar do mês (aba Frequência do aluno) ---------- */
.placar { background: var(--surface-dark); color: #fff; border-radius: var(--radius-lg); padding: 22px; margin-bottom: 16px; position: relative; overflow: hidden; }
.placar::before { content: ''; position: absolute; inset: 8px; border: var(--linha) solid rgba(255,255,255,.85); pointer-events: none; }
.placar > * { position: relative; }
.placar-topo { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 4px 8px 0; }
.placar-topo strong { font-family: var(--font-display); font-weight: 900; font-size: 22px; letter-spacing: .08em; text-transform: uppercase; }
.placar-topo span { color: #b4b2aa; font-size: 13px; }
.placar-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 14px 8px 10px; text-align: center; }
.placar-score div { display: grid; gap: 2px; }
.placar-score b { font-family: var(--font-display); font-weight: 900; font-size: clamp(64px, 18vw, 104px); line-height: .85; font-variant-numeric: tabular-nums; }
.placar-score .casa b { color: var(--color-kinusty); }
.placar-score small { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #b4b2aa; }
.placar-score i { width: 0; height: 64px; border-left: var(--linha) dashed rgba(255,255,255,.5); }
.placar-treinos { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px 4px; }
.placar-treinos span { width: 32px; height: 32px; border-radius: 2px; display: grid; place-items: center; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; border: 2px solid rgba(255,255,255,.35); color: #b4b2aa; }
.placar-treinos span.p { background: var(--color-kinusty); border-color: var(--color-kinusty); color: #0d0d0d; }
.placar-treinos span.f { border-color: #ff8a80; color: #ff8a80; }
.placar-vazio { padding: 8px; color: #b4b2aa; font-size: 14px; }

/* Topo no celular: botões caixa alta mais compactos para caber em 360–390px */
@media (max-width: 600px) {
  .topo .marca > span { font-size: 22px; }
  .topo .marca span small { letter-spacing: .14em; }
  .nav { gap: 6px; }
  .nav .btn { padding: 6px 9px; font-size: 11.5px; letter-spacing: .02em; }
  .nav .tema-btn { width: 32px; height: 32px; }
}

/* =====================================================
   RECURSOS NOVOS — aula grátis, vagas, vitrine, eventos, carteirinha, QR, relatórios
   ===================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
legend { font-size: var(--text-body-sm); font-weight: 500; margin-bottom: 6px; padding: 0; }
.dia-btn small { font-variant-numeric: tabular-nums; }

/* ---------- Vagas das turmas ---------- */
.selo-vagas { font-family: var(--font-display); font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--radius-sm);
  background: var(--color-fog); color: var(--color-ink); white-space: nowrap; }
.selo-vagas.poucas { background: var(--color-kinusty); color: var(--on-kinusty); }
.selo-vagas.cheio { background: var(--color-ink); color: var(--surface-card); }
.chip-cheio { text-decoration: line-through; color: var(--color-graphite); }
.chip-alerta { background: var(--gold-soft); outline: 1px solid var(--color-kinusty); }
.horario-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Depoimentos ---------- */
.depoimentos { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.depoimento { margin: 0; background: var(--surface-card); border: 1px solid var(--color-hairline); border-top: var(--linha) solid var(--color-kinusty); border-radius: var(--radius-lg);
  padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.depoimento .nota { color: var(--color-kinusty); -webkit-text-stroke: .6px var(--color-ink); font-size: 18px; letter-spacing: .12em; }
.depoimento blockquote { margin: 0; font-size: var(--text-body-lg); line-height: 1.45; flex: 1; }
.depoimento blockquote::before { content: '“'; font-family: var(--font-display); font-weight: 900; font-size: 48px; line-height: 0; vertical-align: -.35em; margin-right: 4px; color: var(--color-kinusty); }
.depoimento figcaption { display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--color-ash); }
.depoimento figcaption span { color: var(--color-graphite); font-size: var(--text-body-sm); }

/* ---------- Galeria ---------- */
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 45%), 1fr)); gap: 10px; }
.galeria img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-lg); background: var(--color-fog); border: 1px solid var(--color-hairline); }

/* ---------- Eventos ---------- */
.eventos-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.evento-card { background: var(--surface-card); border: 1px solid var(--color-hairline); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.evento-card > img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: var(--linha) solid var(--color-kinusty); }
.evento-card.passado { opacity: .6; }
.evento-corpo { display: flex; gap: 16px; padding: 18px; align-items: flex-start; }
.evento-corpo h3 { margin: 0 0 4px; font-size: 18px; }
.evento-corpo p { margin: 0 0 8px; font-size: var(--text-body-sm); }
.evento-data { flex-shrink: 0; width: 60px; text-align: center; background: var(--surface-dark); color: #fff; border-radius: var(--radius-lg); padding: 8px 0 6px; }
.evento-data strong { display: block; font-family: var(--font-display); font-weight: 900; font-size: 30px; line-height: 1; color: var(--color-kinusty); }
.evento-data span { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.evento-linha { flex-wrap: wrap; }
.evento-acao { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.foto-evento { width: 120px; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); border: 1px dashed var(--color-stone); display: grid; place-items: center; overflow: hidden; font-size: 1.6rem; background: var(--color-fog); flex-shrink: 0; }
.foto-evento img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Perguntas frequentes ---------- */
.faq { max-width: 820px; margin: 0 auto; border-top: var(--linha) solid var(--linha-secao); }
.faq-item { border-bottom: 1px solid var(--color-hairline); }
.faq-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 4px;
  font-weight: 700; font-size: var(--text-body-lg); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-family: var(--font-display); font-weight: 900; font-size: 30px; line-height: 1; transition: transform .25s var(--curva); flex-shrink: 0; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0 4px 20px; color: var(--color-graphite-smoke); max-width: 65ch; }
.cta-acoes { justify-content: center; margin-top: 28px; }
.cta-final .btn-outline { border-color: #fff; color: #fff; margin-top: 0; background: transparent; }
.cta-final .btn-outline::after { content: none; }
.cta-final .btn-outline:hover { background: #fff; color: #0d0d0d; }

/* ---------- Dashboard: resumo do mês ---------- */
.mes-resumo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; border-top: var(--linha) solid var(--color-kinusty); }
.mes-resumo > div { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; min-width: 0; }
.mes-resumo > div + div { border-left: 1px solid var(--color-ash); padding-left: 16px; }
.mes-resumo .rotulo { font-size: 13px; color: var(--color-graphite); font-weight: 500; }
.mes-resumo strong { font-family: var(--font-display); font-weight: 900; font-size: 36px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.atraso-card { margin-bottom: 16px; border-color: var(--bad); border-top-width: var(--linha); }
.filtro-rotulo { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.filtro-rotulo input { width: auto; }
.barra-inline { display: inline-block; width: 70px; height: 6px; background: var(--color-ash); border-radius: var(--radius-full); overflow: hidden; vertical-align: middle; margin-right: 8px; }
.barra-inline span { display: block; height: 100%; background: var(--color-kinusty); }
.relatorio { min-width: 0; }
.btn.na-galeria { background: var(--gold-soft); }

/* ---------- QR do check-in ---------- */
.qr-checkin { text-align: center; display: grid; justify-items: center; gap: 4px; }
.qr-checkin .tag { justify-content: center; }
.qr-checkin h2 { margin: 0; }
.qr-caixa { width: min(320px, 80vw); aspect-ratio: 1; background: #fff; padding: 12px; border: var(--linha) solid #0d0d0d; border-radius: var(--radius-lg); margin: 12px 0; }
.qr-caixa svg { width: 100%; height: 100%; display: block; }
.qr-checkin:fullscreen { background: #0d0d0d; color: #fff; place-content: center; padding: 24px; }
.qr-checkin:fullscreen .qr-caixa { width: min(70vh, 80vw); border-color: #fff; }
.qr-checkin:fullscreen .btn, .qr-checkin:fullscreen .hint { display: none; }
.qr-checkin:fullscreen h2 { font-size: 64px; color: #fff; }
.qr-checkin:fullscreen p { color: #d6d4cc; font-size: 22px; }

/* ---------- Carteirinha digital ---------- */
.carteirinha { background: #0d0d0d; color: #fff; border-radius: 10px; padding: 18px; position: relative; overflow: hidden; max-width: 460px; min-height: 260px; display: flex; flex-direction: column; gap: 12px; container-type: inline-size; }
.carteirinha::before { content: ''; position: absolute; inset: 8px; border: 2px solid rgba(255,255,255,.85); border-radius: 4px; pointer-events: none; }
.carteirinha::after { content: ''; position: absolute; top: 8px; bottom: 8px; left: 50%; border-left: 2px dashed rgba(255,255,255,.18); pointer-events: none; }
.carteirinha > * { position: relative; z-index: 1; }
.cart-topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 6px 0; font-size: 10px; font-weight: 700; letter-spacing: .14em; color: #b4b2aa; }
.cart-marca { font-family: var(--font-display); font-weight: 900; font-size: 22px; letter-spacing: .03em; color: #fff; display: inline-flex; align-items: baseline; }
.cart-marca i { width: 6px; height: 6px; border-radius: 50%; background: var(--color-kinusty); margin-left: 2px; }
.cart-corpo { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; flex: 1; padding: 0 6px; min-width: 0; }
.cart-foto { width: 74px; height: 92px; border-radius: 4px; overflow: hidden; background: #262626; display: grid; place-items: center; border: 2px solid var(--color-kinusty); }
.cart-foto img { width: 100%; height: 100%; object-fit: cover; }
.cart-foto span { font-family: var(--font-display); font-weight: 900; font-size: 28px; color: var(--color-kinusty); }
.cart-dados { min-width: 0; }
.cart-nome { display: block; font-family: var(--font-display); font-weight: 900; font-size: 22px; line-height: 1; text-transform: uppercase; margin-bottom: 8px; overflow-wrap: anywhere; }
.cart-dados dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.cart-dados dt { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: #b4b2aa; }
.cart-dados dd { margin: 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.cart-qr { width: 86px; aspect-ratio: 1; background: #fff; padding: 4px; border-radius: 4px; }
.cart-qr svg { width: 100%; height: 100%; display: block; }
.cart-rodape { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 6px 4px; font-size: 11px; color: #b4b2aa; }
.cart-status { font-weight: 700; font-size: 12px; padding: 3px 8px; border-radius: 2px; }
.cart-status.ok { background: var(--color-kinusty); color: #0d0d0d; }
.cart-status.pend { background: #ff8a80; color: #0d0d0d; }
.carteirinha:fullscreen, .carteirinha.cart-expandida { max-width: none; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; justify-content: center; padding: 6vmin; }
.carteirinha.cart-expandida { position: fixed; inset: 0; z-index: 3000; }
.carteirinha:fullscreen .cart-corpo, .carteirinha.cart-expandida .cart-corpo { flex: 0; gap: 4vmin; }
.carteirinha:fullscreen .cart-foto, .carteirinha.cart-expandida .cart-foto { width: 28vmin; height: 35vmin; }
.carteirinha:fullscreen .cart-qr, .carteirinha.cart-expandida .cart-qr { width: 30vmin; }
.carteirinha:fullscreen .cart-nome, .carteirinha.cart-expandida .cart-nome { font-size: 7vmin; }
/* Carteirinha estreita (celular): foto e dados lado a lado, QR numa linha própria embaixo */
@container (max-width: 400px) {
  .cart-corpo { grid-template-columns: auto 1fr; align-items: start; }
  .cart-qr { grid-column: 1 / -1; width: 112px; justify-self: center; }
  .cart-foto { width: 64px; height: 80px; }
  .cart-nome { font-size: 19px; }
  .cart-topo span:last-child { display: none; }
}

/* ---------- Página de check-in / validação ---------- */
.checkin-card { text-align: center; display: grid; justify-items: center; gap: 8px; }
.checkin-card h2 { margin: 4px 0 0; }
.checkin-card p { margin: 0 0 8px; }
.checkin-icone { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 900; font-size: 44px; }
.checkin-icone.ok { background: var(--color-kinusty); color: #0d0d0d; }
.checkin-icone.erro { background: var(--bad-soft); color: var(--bad); }
.valida-foto { width: 160px; height: 160px; border-radius: 50%; overflow: hidden; border: var(--linha) solid var(--color-kinusty); background: var(--color-fog); display: grid; place-items: center; margin: 8px 0; }
.valida-foto img { width: 100%; height: 100%; object-fit: cover; }
.valida-foto span { font-family: var(--font-display); font-weight: 900; font-size: 56px; }
.valida-status { font-weight: 700; padding: 8px 16px; border-radius: var(--radius-lg); font-size: 18px; }
.valida-status.ok { background: var(--color-kinusty); color: #0d0d0d; }
.valida-status.erro { background: var(--bad); color: #fff; }

/* ---------- Instalar app e faixa sem internet ---------- */
.instalar-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.instalar-card img { border-radius: 10px; flex-shrink: 0; }
.instalar-card > div:nth-child(2) { flex: 1; min-width: 200px; }
.instalar-card p { margin: 2px 0 0; font-size: var(--text-body-sm); }
.faixa-offline { position: fixed; left: 0; right: 0; bottom: 0; z-index: 400; background: var(--color-ink); color: var(--surface-card); text-align: center;
  font-size: var(--text-body-sm); font-weight: 600; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }

/* ---------- CRM: lista de contatos e conversa ---------- */
.crm-lista { padding: 0; overflow: hidden; }
.crm-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 14px 18px; cursor: pointer; color: inherit; font: inherit; }
.crm-item:last-child { border-bottom: 0; }
.crm-item:hover, .crm-item:focus-visible { background: var(--bg-2); }
.crm-item-topo { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.crm-item-msg { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.crm-filtros .chip { border: 0; cursor: pointer; font: inherit; font-size: 12px; }
.crm-chat { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; padding: 12px; background: var(--bg-2); border-radius: var(--radius-lg); margin-bottom: 12px; }
.crm-evento { align-self: flex-start; font-size: 13px; color: var(--text-2); background: var(--surface-card); border-radius: var(--radius-lg); padding: 6px 12px; }

/* ---------- Carregamento (esqueletos) e estados vazios ---------- */
@keyframes kv-brilho { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.esqueleto { display: grid; gap: 10px; padding: 4px 0; }
.esqueleto span, .esq-titulo, .esq-card, .esq-bloco { display: block; border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--color-ash) 0%, var(--color-fog) 50%, var(--color-ash) 100%); background-size: 200% 100%; animation: kv-brilho 1.4s linear infinite; }
.esqueleto span { height: 14px; }
.esqueleto span:nth-child(3n+2) { width: 82%; }
.esqueleto span:nth-child(3n) { width: 64%; }
.esqueleto-pagina { display: grid; gap: 16px; }
.esq-titulo { height: 44px; width: min(320px, 70%); margin-bottom: 12px; }
.esq-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.esq-card { height: 108px; }
.esq-bloco { height: 260px; }
@media (max-width: 600px) { .esq-cards { grid-template-columns: 1fr 1fr; } }
.estado-vazio { text-align: center; padding: 36px 16px; display: grid; gap: 8px; justify-items: center; color: var(--color-graphite-smoke); }
.estado-vazio strong { font-family: var(--font-display); font-weight: 800; font-size: 22px; text-transform: uppercase; color: var(--color-ink); }
.estado-vazio p { margin: 0; max-width: 46ch; color: var(--color-graphite); }
.estado-vazio .btn { margin-top: 8px; }
.card > .estado-vazio { padding: 24px 8px; }

/* ---------- Retorno dos botões que salvam ---------- */
@keyframes kv-girar { to { transform: rotate(360deg); } }
button.carregando { position: relative; color: transparent !important; pointer-events: none; }
button.carregando::before { content: ''; position: absolute; inset: 0; margin: auto; width: 1em; height: 1em; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--color-ink) transparent var(--color-ink) transparent; animation: kv-girar .7s linear infinite; }
.btn-gold.carregando::before { border-color: var(--on-kinusty) transparent var(--on-kinusty) transparent; }
button.salvo { box-shadow: 0 0 0 3px var(--good) !important; }
button.falhou { box-shadow: 0 0 0 3px var(--bad) !important; animation: kv-tremer .3s; }
@keyframes kv-tremer { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

@media (max-width: 860px) {
  .mes-resumo { grid-template-columns: 1fr; }
  .mes-resumo > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--color-ash); padding-top: 12px; }
}
@media (max-width: 600px) {
  .evento-acao { width: 100%; justify-content: flex-start; padding-left: 70px; }
  .depoimento blockquote { font-size: var(--text-body); }
}
@media (prefers-reduced-motion: reduce) {
  .esqueleto span, .esq-titulo, .esq-card, .esq-bloco { animation: none; }
  button.carregando::before { animation-duration: 2s; }
  button.falhou { animation: none; }
}

/* Impressão do QR de check-in: só o QR na folha */
@media print {
  body * { visibility: hidden; }
  .qr-checkin, .qr-checkin * { visibility: visible; }
  .qr-checkin { position: absolute; inset: 0; color: #000; }
  .qr-checkin .btn { display: none; }
  .modal { background: none; }
}

/* Colunas dos painéis não podem ficar mais largas que a tela (gráficos e tabelas encolhem dentro do card) */
.grid-dash > *, .grid-dash-3 > *, .kpis > * { min-width: 0; }
.grafico canvas { max-width: 100%; }
#relatorios .grid-dash { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { #relatorios .grid-dash { grid-template-columns: 1fr; } }

/* Conquistas do aluno (aba Frequência) */
.conquistas { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; }
.conquista { border: 1px solid var(--line); border-radius: 10px; padding: .7rem; text-align: center; display: flex; flex-direction: column; gap: .2rem; opacity: .6; }
.conquista .emoji { font-size: 1.8rem; filter: grayscale(1); }
.conquista small { font-size: .75rem; color: var(--muted); }
.conquista .barra-prog { margin-top: .3rem; }
.conquista.ganha { opacity: 1; border-color: var(--gold); background: var(--gold-soft); }
.conquista.ganha .emoji { filter: none; }

/* Indique e ganhe (área do aluno) */
.indique-desc { font-family: var(--font-display); font-weight: 900; font-size: 40px; line-height: .9; text-align: right; }
.indique-desc small { display: block; font-family: var(--font-body); font-weight: 600; font-size: 12px; color: var(--muted); }

/* =====================================================
   HERO VIVO — a quadra se desenha, a rede cai e a bola é sacada (js/quadra.js)
   ===================================================== */
@keyframes kv-risca { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes kv-rede-cai { from { transform: scaleY(0); } to { transform: none; } }
@keyframes kv-rede-estica { from { transform: scaleX(0); } to { transform: none; } }
html.anima .hero .container::before { animation: kv-risca .9s .15s cubic-bezier(.65, 0, .35, 1) both; }
html.anima .hero .container::after { transform-origin: top; animation: kv-rede-cai .5s .75s cubic-bezier(.3, 1.4, .5, 1) both; }
@media (max-width: 860px) { html.anima .hero .container::after { transform-origin: left; animation-name: kv-rede-estica; } }

.quadra-jogo { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.bola-hero, .bola-sombra, .bola-marca { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform; transition: none !important; }
.quadra-jogo.ativa .bola-hero, .quadra-jogo.ativa .bola-sombra { opacity: 1; }
.bola-hero { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; pointer-events: auto; }
.bola-hero svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.bola-hero:focus-visible { outline: 3px solid var(--color-kinusty); outline-offset: 4px; }
.bola-hero.tocada svg { animation: kv-amassa .25s ease-out; }
.bola-sombra { width: 36px; height: 14px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .22), transparent); }
.bola-marca { width: 60px; height: 60px; border-radius: 50%; border: 3px solid var(--color-kinusty); }
.bola-marca.bate { animation: kv-marca .7s ease-out; }
@keyframes kv-marca { from { opacity: .9; scale: .15; } to { opacity: 0; scale: 1.5; } }
@keyframes kv-amassa { 0% { scale: 1.15 .8; } 100% { scale: 1; } }
.hero-logo.tremeu { animation: kv-tremor .45s ease-out; }
@keyframes kv-tremor { 0%, 100% { translate: 0 0; } 20% { translate: 0 5px; rotate: -2deg; } 45% { translate: 0 -2px; rotate: 1.2deg; } 70% { translate: 0 1px; rotate: -.5deg; } }
@media (prefers-reduced-motion: reduce) { .bola-marca.bate, .hero-logo.tremeu, .bola-hero.tocada svg { animation: none; } }

/* Ícones dos diferenciais: traço de linha de quadra sobre o amarelo */
.diferencial .ic { width: 52px; height: 52px; display: grid; place-items: center; background: var(--color-kinusty); color: var(--on-kinusty); border-radius: var(--radius-sm); }
.diferencial .ic svg { width: 30px; height: 30px; }

/* Turma em treino neste momento (página inicial) */
.ao-vivo { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--color-ink); }
.ao-vivo::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--good, #1a9c4b); box-shadow: 0 0 0 0 rgba(26, 156, 75, .55); }
html.anima .ao-vivo:not(.hoje)::before { animation: kv-pulso 1.6s ease-out infinite; }
.ao-vivo.hoje { font-weight: 600; color: var(--muted); }
.ao-vivo.hoje::before { background: var(--color-kinusty); }
@keyframes kv-pulso { 70% { box-shadow: 0 0 0 9px rgba(26, 156, 75, 0); } 100% { box-shadow: 0 0 0 0 rgba(26, 156, 75, 0); } }

/* "Ponto!" — comemoração do check-in */
.ponto { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: rgba(13, 13, 13, .72); animation: kv-ponto-fundo .25s ease both; cursor: pointer; }
.ponto.sai { opacity: 0; transition: opacity .3s; }
.ponto-quadra { position: relative; width: min(320px, 80vw); aspect-ratio: 1; border: var(--linha) solid #fff; background: var(--color-carbon); display: grid; place-items: center; }
.ponto-quadra::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: var(--linha) dashed rgba(255, 255, 255, .85); }
.ponto-quadra strong { position: relative; font-family: var(--font-display); font-weight: 900; font-size: clamp(64px, 18vw, 96px); line-height: .9; text-transform: uppercase; color: var(--color-kinusty); animation: kv-ponto-txt .45s .42s cubic-bezier(.2, 1.4, .4, 1) both; }
.ponto-bola { position: absolute; width: 44px; height: 44px; left: 62%; top: 72%; animation: kv-corte .45s cubic-bezier(.5, 0, .9, .6) both; }
.ponto-marca { position: absolute; left: calc(62% - 18px); top: calc(72% - 18px); width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--color-kinusty); opacity: 0; animation: kv-marca .6s .42s ease-out forwards; }
@keyframes kv-ponto-fundo { from { opacity: 0; } }
@keyframes kv-corte { from { transform: translate(-190px, -260px) scale(1.9) rotate(-200deg); } to { transform: none; } }
@keyframes kv-ponto-txt { from { opacity: 0; scale: .4; } }

/* Avisos de comprovante de PIX no painel do admin */
#avisos-pix { position: fixed; top: 16px; right: 16px; z-index: 900; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 32px)); }
.aviso-pix { position: relative; background: var(--surface-card); color: var(--color-ink); border: 1px solid var(--color-hairline); border-left: 6px solid var(--good); border-radius: var(--radius-sm); padding: 14px 40px 14px 16px; box-shadow: var(--shadow-xl); }
.aviso-pix.conferir { border-left-color: var(--color-kinusty); }
.aviso-pix strong { display: block; font-size: 15px; margin-bottom: 4px; }
.aviso-pix p { margin: 0 0 8px; font-size: 14px; line-height: 1.4; }
.aviso-pix .hint { display: block; margin-bottom: 10px; }
.aviso-fechar { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px; }
html.anima .aviso-pix { animation: kv-aviso-entra .35s var(--curva) both; }
.aviso-pix.saindo { opacity: 0; transform: translateX(20px); transition: opacity .25s, transform .25s; }
@keyframes kv-aviso-entra { from { opacity: 0; transform: translateX(30px); } }
@media (max-width: 860px) { #avisos-pix { top: auto; bottom: 16px; } }

/* Bolsistas */
.b-bolsa { background: var(--color-kinusty); color: var(--on-kinusty); border-color: transparent; }
