/* FizApp — site (conta, checkout, páginas legais). O painel admin usa admin.css.
   Padrão visual: docs/design-system.md, seção 14 (variáveis) + tokens das seções 3, 5 e 6.
   Fontes servidas pelo próprio site (woff2), sem CDN. Celular primeiro. */

@font-face { font-family: 'Fredoka'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/Fredoka-500.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/Fredoka-600.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/Fredoka-700.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/Nunito-600.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/Nunito-700.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-style: normal; font-display: swap; src: url('fonts/Nunito-800.woff2') format('woff2'); }

:root {
  --fundo-crianca: #EEF3FF;  --fundo-gestor: #F6F6FA;  --superficie: #FFFFFF;
  --texto: #23203A;  --texto-forte2: #45425C;  --texto-suave: #5B5873;
  --borda: #DAD7E6;  --borda-forte: #CFCADF;  --divisor: #E4E2EE;
  --link: #5B3FD1;  --link-hover: #3F2A9E;
  --estrela: #FFC21A;  --estrela-contorno: #E0A100;  --estrela-texto: #8A5A00;
  --cor: #7C4DFF;  --cor-escura: #3F2A9E;
  --raio-pilula: 999px;  --raio-card: 22px;  --raio-botao: 16px;  --raio-campo: 12px;
  --fonte-titulo: 'Fredoka', system-ui, sans-serif;
  --fonte-texto: 'Nunito', system-ui, sans-serif;
  /* Tokens da seção 3 usados no site */
  --superficie-suave: #FAF9FD;  --superficie-neutra: #F0EFF5;
  --sucesso-fundo: #E4F6EC;  --sucesso-texto: #1B7A4A;
  --dourado-fundo: #FFF3C7;  --dourado-texto: #8A5A00;
  --chama: #BF360C;  --chama-fundo: #FFE9D6;
  --cor-tinta: #EDE6FF;
  --raio-card-gestor: 20px;  --raio-botao-gestor: 14px;
  --sombra-card: 0 1px 2px rgba(35,32,58,0.06), 0 6px 20px rgba(35,32,58,0.06);
  --margem: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--fundo-gestor); color: var(--texto);
  font-family: var(--fonte-texto); font-weight: 600; font-size: 16px; line-height: 1.5;
}
body.area-site { background: var(--fundo-crianca); }
a { color: var(--link); font-weight: 800; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--cor); outline-offset: 2px; }
.pular { position: absolute; left: -9999px; }
.pular:focus { left: 8px; top: 8px; background: var(--superficie); padding: 8px 12px; border-radius: var(--raio-campo); z-index: 10; }

/* Cabeçalho e rodapé */
.topo { background: var(--superficie); border-bottom: 1px solid var(--divisor); }
.topo-interno { max-width: 960px; margin: 0 auto; padding: 10px var(--margem); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 60px; }
.marca { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--texto); font-family: var(--fonte-titulo); font-weight: 700; font-size: 24px; }
.marca:hover { color: var(--texto); }
.estrela path { fill: var(--estrela); stroke: var(--estrela-contorno); stroke-width: 1.5; stroke-linejoin: round; }
.marca small { font-family: var(--fonte-texto); font-size: 13px; font-weight: 800; color: var(--texto-suave); }
.menu { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; }
.menu a { text-decoration: none; font-size: 14px; color: var(--texto-forte2); padding: 10px 0; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--link); }
.menu form { margin: 0; }
.rodape { margin-top: auto; padding: 24px var(--margem); text-align: center; font-size: 13px; color: var(--texto-suave); }
.rodape a { margin: 0 8px; display: inline-block; padding: 10px 0; }

/* Conteúdo */
main { width: 100%; max-width: 960px; margin: 0 auto; padding: 24px var(--margem) 40px; }
main.estreito { max-width: 520px; }
main.texto-longo { max-width: 760px; }
h1 { font-family: var(--fonte-titulo); font-weight: 600; font-size: 26px; line-height: 1.2; margin: 0 0 16px; }
h2 { font-family: var(--fonte-titulo); font-weight: 600; font-size: 19px; line-height: 1.3; margin: 24px 0 8px; }
h3 { font-family: var(--fonte-texto); font-weight: 800; font-size: 16px; margin: 16px 0 6px; }
p { margin: 0 0 12px; }
.suave { color: var(--texto-suave); }
.meta { font-size: 14px; font-weight: 700; color: var(--texto-suave); }
.card { background: var(--superficie); border-radius: var(--raio-card-gestor); padding: 20px; margin: 0 0 12px; box-shadow: var(--sombra-card); }
.card > :last-child { margin-bottom: 0; }
.grade { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grade.duas { grid-template-columns: 1fr 1fr; } .grade.tres { grid-template-columns: repeat(3, 1fr); } .grade.quatro { grid-template-columns: repeat(4, 1fr); } }

/* Faixas de aviso (sem vermelho) */
.aviso { border-radius: var(--raio-botao-gestor); padding: 12px 16px; margin: 0 0 16px; font-weight: 700; }
.aviso-ok { background: var(--sucesso-fundo); color: var(--sucesso-texto); }
.aviso-atencao { background: var(--dourado-fundo); color: var(--dourado-texto); }
.aviso-erro { background: var(--chama-fundo); color: var(--chama); }
.aviso-neutro { background: var(--superficie-neutra); color: var(--texto-forte2); }

/* Selos */
.selo { display: inline-block; border-radius: var(--raio-pilula); padding: 4px 12px; font-size: 13px; font-weight: 800; background: var(--superficie-neutra); color: var(--texto-forte2); }
.selo-teste { background: var(--cor-tinta); color: var(--cor-escura); }
.selo-ativa, .selo-pago { background: var(--sucesso-fundo); color: var(--sucesso-texto); }
.selo-atrasada, .selo-pendente, .selo-vencido { background: var(--dourado-fundo); color: var(--dourado-texto); }

/* Formulários (CampoTexto 8.11) */
.campo { margin: 0 0 14px; }
.campo label, .rotulo { display: block; font-size: 13px; font-weight: 800; color: var(--texto-suave); margin: 0 0 6px; }
.campo input[type=text], .campo input[type=email], .campo input[type=password], .campo input[type=number], .campo input[type=search], .campo input[type=tel], .campo select, .campo textarea {
  width: 100%; min-height: 46px; border: 1px solid var(--borda); border-radius: var(--raio-campo); padding: 0 14px;
  font-family: var(--fonte-texto); font-weight: 600; font-size: 16px; color: var(--texto); background: var(--superficie);
}
.campo textarea { padding: 10px 14px; min-height: 90px; resize: vertical; }
.campo input[aria-invalid="true"] { border-color: var(--chama); }
.campo-erro { color: var(--chama); font-size: 14px; font-weight: 700; margin: 6px 0 0; }
.campo-ajuda { font-size: 13px; color: var(--texto-suave); margin: 6px 0 0; }
.linha { display: flex; gap: 12px; flex-wrap: wrap; }
.linha > .campo { flex: 1 1 140px; }
.marcar { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; font-weight: 700; }
.marcar input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--cor); }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
legend { font-size: 13px; font-weight: 800; color: var(--texto-suave); margin: 0 0 6px; padding: 0; }
.opcoes { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 480px) { .opcoes.duas { grid-template-columns: 1fr 1fr; } }
.opcao { display: flex; gap: 10px; align-items: center; min-height: 52px; border: 1px solid var(--borda); border-radius: var(--raio-botao-gestor); padding: 10px 14px; background: var(--superficie); font-weight: 800; cursor: pointer; }
.opcao input { width: 20px; height: 20px; accent-color: var(--cor); }
.opcao:has(input:checked) { border-color: var(--cor); background: var(--cor-tinta); }

/* Botões (8.9, gestor) */
.botao { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px; border-radius: var(--raio-botao-gestor);
  border: 0; background: var(--cor); color: #FFFFFF; font-family: var(--fonte-texto); font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer; }
.botao:hover { background: var(--cor-escura); color: #FFFFFF; }
.botao.secundario { background: var(--superficie); color: var(--texto-forte2); border: 1px solid var(--borda); font-size: 14px; }
.botao.secundario:hover { border-color: var(--cor); color: var(--cor-escura); }
.botao.largo { width: 100%; }
.botao.pequeno { min-height: 44px; padding: 0 14px; font-size: 13px; border-radius: var(--raio-campo); }
.botao-link { background: none; border: 0; padding: 10px 0; min-height: 44px; font-family: var(--fonte-texto); font-weight: 800; font-size: 14px; color: var(--link); text-decoration: underline; cursor: pointer; }
.acoes { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 16px 0 0; }
.acoes.centro { justify-content: center; }
.acoes form { margin: 0; }

/* Planos */
.plano { display: flex; flex-direction: column; }
.plano .preco { font-family: var(--fonte-titulo); font-weight: 600; font-size: 30px; line-height: 1.1; margin: 4px 0; }
.plano .preco small { font-family: var(--fonte-texto); font-size: 14px; font-weight: 700; color: var(--texto-suave); }
.plano ul { padding: 0; margin: 12px 0 16px; list-style: none; }
.plano li { padding: 6px 0 6px 26px; position: relative; }
.plano li::before { content: ""; position: absolute; left: 0; top: 11px; width: 14px; height: 14px; border-radius: 50%; background: var(--sucesso-fundo); box-shadow: inset 0 0 0 4px var(--sucesso-texto); }
.plano .acoes { margin-top: auto; }

/* Tabelas */
.tabela-rolagem { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 13px; font-weight: 800; color: var(--texto-suave); padding: 8px; border-bottom: 1px solid var(--divisor); }
td { padding: 10px 8px; border-bottom: 1px solid var(--divisor); vertical-align: top; }
tr:last-child td { border-bottom: 0; }

/* Pix */
.pix { text-align: center; }
.pix img { width: 220px; height: 220px; image-rendering: pixelated; background: var(--superficie); border: 1px solid var(--divisor); border-radius: var(--raio-campo); padding: 8px; }
.pix textarea { font-family: ui-monospace, monospace; font-size: 13px; }
.esperando { display: inline-flex; gap: 8px; align-items: center; color: var(--texto-suave); font-weight: 800; }
.esperando .estrela { animation: girar 2.4s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .esperando .estrela { animation: none; } }

/* Páginas legais */
.legal h2 { margin-top: 32px; }
.legal li { margin: 0 0 6px; }
.marcador { background: var(--dourado-fundo); color: var(--dourado-texto); padding: 0 4px; border-radius: 4px; font-weight: 800; }

/* Início provisório */
.heroi { text-align: center; padding: 24px 0 8px; }
.heroi .estrela { width: 72px; height: 72px; }
.heroi h1 { font-size: 34px; }

/* Campos de data e selects (conta) */
.campo select { padding: 0 10px; }
.campo input[type=date], .campo input[type=month] {
  width: 100%; min-height: 46px; border: 1px solid var(--borda); border-radius: var(--raio-campo); padding: 0 14px;
  font-family: var(--fonte-texto); font-weight: 600; font-size: 16px; color: var(--texto); background: var(--superficie);
}
.campo select[aria-invalid="true"], .campo textarea[aria-invalid="true"] { border-color: var(--chama); }
/* O painel admin tem folha própria: /assets/admin.css (design system, seção 14.3). */
