/* =========================================================
   Central Fun Up — identidade visual (Fun Up Design System 2026)
   Sem emoji. Sem ponto de exclamação nos textos.
   ========================================================= */

@font-face { font-family: "Playfair Display"; font-weight: 600; font-display: swap; src: url("../fonts/playfair-display-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 700; font-display: swap; src: url("../fonts/playfair-display-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Raleway"; font-weight: 500; font-display: swap; src: url("../fonts/raleway-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Raleway"; font-weight: 600; font-display: swap; src: url("../fonts/raleway-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Raleway"; font-weight: 700; font-display: swap; src: url("../fonts/raleway-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 400; font-display: swap; src: url("../fonts/dm-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 500; font-display: swap; src: url("../fonts/dm-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 700; font-display: swap; src: url("../fonts/dm-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  /* Paleta oficial */
  --roxo: #4A2D82;
  --roxo-vibrante: #7C4DBC;
  --lavanda: #E8DCFF;
  --creme: #F5F2FF;
  --noite: #1A1040;
  --azul-sereno: #2B4A7E;
  --dourado: #B8914B;

  --fonte-titulo: "Playfair Display", Georgia, serif;
  --fonte-destaque: "Raleway", "Segoe UI", sans-serif;
  --fonte-texto: "DM Sans", "Segoe UI", sans-serif;

  --raio: 14px;
  --raio-pequeno: 10px;
}

/* ---------- Versão A: Clara ---------- */
:root, [data-visual="clara"] {
  --fundo: var(--creme);
  --fundo-detalhe: radial-gradient(1200px 600px at 100% -10%, #E8DCFF 0%, transparent 60%),
                   radial-gradient(900px 500px at -10% 110%, #EFE6FF 0%, transparent 55%);
  --cartao: #FFFFFF;
  --borda: #E3D8F7;
  --texto: #2A1E45;
  --texto-suave: #6B5E86;
  --titulo: var(--roxo);
  --botao: var(--roxo);
  --botao-texto: #FFFFFF;
  --botao-hover: var(--roxo-vibrante);
  --botao-secundario: #FFFFFF;
  --botao-secundario-texto: var(--roxo);
  --destaque: var(--dourado);
  --campo: #FBF9FF;
  --foco: rgba(124, 77, 188, .28);
  --sombra: 0 18px 50px -24px rgba(74, 45, 130, .35);
  --erro: #A03246;
  --erro-fundo: #FBEFF2;
}

/* ---------- Versão B: Noite ---------- */
[data-visual="noite"] {
  --fundo: var(--noite);
  --fundo-detalhe: radial-gradient(1100px 600px at 105% -10%, rgba(124, 77, 188, .45) 0%, transparent 60%),
                   radial-gradient(900px 520px at -10% 110%, rgba(43, 74, 126, .55) 0%, transparent 60%);
  --cartao: #241653;
  --borda: rgba(232, 220, 255, .14);
  --texto: #F5F2FF;
  --texto-suave: #C9BCE8;
  --titulo: #F5F2FF;
  --botao: var(--dourado);
  --botao-texto: #1A1040;
  --botao-hover: #CBA463;
  --botao-secundario: transparent;
  --botao-secundario-texto: #F5F2FF;
  --destaque: var(--dourado);
  --campo: rgba(255, 255, 255, .06);
  --foco: rgba(184, 145, 75, .35);
  --sombra: 0 24px 60px -28px rgba(0, 0, 0, .7);
  --erro: #FFB4C0;
  --erro-fundo: rgba(160, 50, 70, .25);
}

* { box-sizing: border-box; }
button, input { font-family: inherit; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--fundo-detalhe), var(--fundo);
  background-attachment: fixed;
  color: var(--texto);
  font-family: var(--fonte-texto);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Estrutura ---------- */
.pagina {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 48px;
}
.cartao {
  width: 100%;
  max-width: 440px;
  background: var(--cartao);
  border: 1px solid var(--borda);
  border-radius: 22px;
  box-shadow: var(--sombra);
  padding: 36px 32px 32px;
}
@media (max-width: 480px) { .cartao { padding: 28px 22px 24px; border-radius: 18px; } }

.marca { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 24px; }
.marca img { width: 84px; height: 84px; border-radius: 50%; }
.marca .nome {
  margin-top: 14px;
  font-family: var(--fonte-titulo);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.15;
  color: var(--titulo);
  letter-spacing: .2px;
}
.marca .linha { width: 44px; height: 3px; border-radius: 2px; background: var(--destaque); margin: 12px auto 0; }

h1, h2 { font-family: var(--fonte-titulo); color: var(--titulo); font-weight: 700; margin: 0 0 6px; line-height: 1.2; }
h1 { font-size: 26px; }
h2 { font-size: 22px; }
.sub { color: var(--texto-suave); margin: 0 0 24px; }
.rotulo { font-family: var(--fonte-destaque); font-weight: 600; font-size: 14px; letter-spacing: .3px; display: block; margin-bottom: 8px; }
.nota { font-size: 13.5px; color: var(--texto-suave); margin-top: 14px; }

/* ---------- Botões ---------- */
.botao {
  appearance: none;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: var(--raio);
  padding: 14px 18px;
  font-family: var(--fonte-destaque);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .2px;
  cursor: pointer;
  background: var(--botao);
  color: var(--botao-texto);
  transition: background .15s ease, transform .05s ease, box-shadow .15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.botao:hover { background: var(--botao-hover); }
.botao:active { transform: translateY(1px); }
.botao:focus-visible, .campo:focus-visible, .escolha:focus-visible, .link:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--foco); }
.botao[disabled] { opacity: .55; cursor: not-allowed; }
.botao.secundario { background: var(--botao-secundario); color: var(--botao-secundario-texto); border: 1.5px solid var(--borda); }
.botao.secundario:hover { border-color: var(--roxo-vibrante); }
.botao + .botao { margin-top: 12px; }

.link { background: none; border: 0; padding: 4px 2px; color: var(--texto-suave); font: inherit; font-size: 14.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; border-radius: 6px; }
.link:hover { color: var(--titulo); }
.acoes-secundarias { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }

/* ---------- Escolha de perfil ---------- */
.escolhas { display: grid; gap: 14px; }
.escolha {
  appearance: none; text-align: left; width: 100%;
  border: 1.5px solid var(--borda); border-radius: 16px;
  background: var(--campo); color: var(--texto);
  padding: 18px 18px; cursor: pointer;
  display: flex; align-items: center; gap: 16px;
  transition: border-color .15s ease, background .15s ease;
}
.escolha:hover { border-color: var(--roxo-vibrante); }
.escolha .icone {
  flex: none; width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--lavanda); color: var(--roxo);
}
[data-visual="noite"] .escolha .icone { background: rgba(184, 145, 75, .16); color: var(--dourado); }
.escolha .icone svg { width: 24px; height: 24px; }
.escolha strong { display: block; font-family: var(--fonte-destaque); font-weight: 700; font-size: 17px; color: var(--titulo); }
.escolha span { display: block; font-size: 14px; color: var(--texto-suave); }
.escolha .seta { margin-left: auto; color: var(--texto-suave); }

/* ---------- Campos ---------- */
.campo {
  width: 100%; min-height: 52px;
  border: 1.5px solid var(--borda); border-radius: var(--raio);
  background: var(--campo); color: var(--texto);
  font: inherit; font-size: 16px; padding: 12px 14px;
}
.campo::placeholder { color: var(--texto-suave); opacity: .8; }
.grupo { margin-bottom: 16px; }

.codigo { display: flex; gap: 8px; justify-content: space-between; }
.codigo input {
  width: 100%; max-width: 52px; height: 58px; text-align: center;
  font-family: var(--fonte-destaque); font-weight: 700; font-size: 24px;
  border: 1.5px solid var(--borda); border-radius: 12px; background: var(--campo); color: var(--texto);
}
.codigo input:focus { outline: none; border-color: var(--roxo-vibrante); box-shadow: 0 0 0 4px var(--foco); }

.divisor { display: flex; align-items: center; gap: 12px; color: var(--texto-suave); font-size: 13px; margin: 18px 0; }
.divisor::before, .divisor::after { content: ""; flex: 1; height: 1px; background: var(--borda); }

.aviso { border-radius: 12px; padding: 12px 14px; font-size: 14.5px; margin-bottom: 16px; }
.aviso.erro { background: var(--erro-fundo); color: var(--erro); }
.aviso.info { background: var(--campo); border: 1px solid var(--borda); color: var(--texto-suave); }

/* ---------- Termos ---------- */
.termos-texto {
  max-height: 280px; overflow: auto;
  border: 1px solid var(--borda); border-radius: 12px; background: var(--campo);
  padding: 14px 16px; font-size: 14.5px; margin-bottom: 16px;
}
.termos-texto h3 { font-family: var(--fonte-destaque); font-size: 15px; margin: 12px 0 4px; color: var(--titulo); }
.termos-texto h3:first-child { margin-top: 0; }
.marcar { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; margin-bottom: 18px; cursor: pointer; }
.marcar input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--roxo-vibrante); flex: none; }

/* ---------- Rodapé ---------- */
.rodape { margin-top: 22px; text-align: center; font-size: 12.5px; color: var(--texto-suave); max-width: 440px; }

.carregando { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

.oculto { display: none !important; }

/* =========================================================
   Painel da equipe
   ========================================================= */
.painel { min-height: 100vh; }
.topo {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px 24px; background: var(--cartao); border-bottom: 1px solid var(--borda);
}
.topo-marca { display: flex; align-items: center; gap: 10px; font-family: var(--fonte-titulo); font-weight: 700; color: var(--titulo); font-size: 19px; }
.topo-marca img { width: 36px; height: 36px; border-radius: 50%; }
.abas { display: flex; gap: 4px; flex-wrap: wrap; }
.aba { appearance: none; border: 0; background: none; padding: 9px 14px; border-radius: 10px; font-family: var(--fonte-destaque); font-weight: 600; font-size: 15px; color: var(--texto-suave); cursor: pointer; }
.aba:hover { background: var(--campo); color: var(--titulo); }
.aba.ativa { background: var(--lavanda); color: var(--roxo); }
.topo-usuario { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--texto-suave); }
.conteudo { max-width: 1180px; margin: 0 auto; padding: 28px 24px 60px; }
.cabecalho { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.cabecalho h1, .cabecalho h2 { margin: 0; }
.botao.pequeno { width: auto; min-height: 42px; padding: 10px 16px; font-size: 15px; }
.botao.perigo { background: #8E2A3E; color: #fff; }
.botao.perigo:hover { background: #A03246; }
a.botao { text-decoration: none; }

.cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 18px 0 22px; }
.cartao-numero { background: var(--cartao); border: 1px solid var(--borda); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--sombra); }
.cartao-numero .numero { font-family: var(--fonte-titulo); font-weight: 700; font-size: 34px; color: var(--titulo); line-height: 1; }
.cartao-numero .legenda { font-size: 14px; color: var(--texto-suave); }

.filtros { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.filtros .campo { width: auto; flex: 1 1 260px; min-height: 44px; }
.filtros select.campo { flex: 0 1 240px; }
.tabela-caixa { overflow-x: auto; background: var(--cartao); border: 1px solid var(--borda); border-radius: 16px; }
.tabela { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tabela th { text-align: left; font-family: var(--fonte-destaque); font-weight: 700; font-size: 13px; letter-spacing: .3px; color: var(--texto-suave); padding: 12px 14px; border-bottom: 1px solid var(--borda); white-space: nowrap; }
.tabela td { padding: 12px 14px; border-bottom: 1px solid var(--borda); vertical-align: top; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela.compacta td, .tabela.compacta th { padding: 9px 10px; }
.tabela .centro { text-align: center; }
.tabela input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--roxo-vibrante); }
.tabela tr.apagada { opacity: .5; }
.vazio { text-align: center; color: var(--texto-suave); padding: 28px; }

.etiqueta { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #EEE9F6; color: var(--texto-suave); white-space: nowrap; }
.etiqueta.ok { background: #E3F2EA; color: #24613F; }
.etiqueta.neutra { background: var(--lavanda); color: var(--roxo); }
.etiqueta.alerta { background: #FBF0DD; color: #7A5418; }

.janela { border: 0; border-radius: 20px; padding: 0; width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 40px); background: var(--cartao); color: var(--texto); box-shadow: 0 30px 80px -20px rgba(26, 16, 64, .45); }
.janela::backdrop { background: rgba(26, 16, 64, .45); }
.janela-corpo { padding: 24px 26px 28px; max-height: calc(100vh - 40px); overflow: auto; }
.grade-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; border: 0; padding: 0; margin: 14px 0 0; }
.grade-form .largo { grid-column: 1 / -1; }
.grade-form .grupo { margin-bottom: 14px; }
.grade-form .campo { min-height: 46px; }
@media (max-width: 620px) { .grade-form { grid-template-columns: 1fr; } .topo { padding: 10px 14px; } .conteudo { padding: 20px 14px 48px; } }
.acoes-linha { display: flex; gap: 10px; flex-wrap: wrap; }
.acoes-linha .botao + .botao { margin-top: 0; }
.secao { font-family: var(--fonte-destaque); font-size: 16px; color: var(--titulo); margin: 26px 0 8px; padding-top: 18px; border-top: 1px solid var(--borda); }
.lista-simples { margin: 0 0 12px; padding-left: 18px; }
.lista-simples li { margin-bottom: 6px; }

/* ---------- Área do Aluno ---------- */
.unidade { background: var(--cartao); border: 1px solid var(--borda); border-radius: 18px; padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--sombra); }
.unidade.atual { border-color: var(--roxo-vibrante); }
.unidade header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.unidade h2 { font-size: 21px; margin: 0; }
.aulas { margin: 8px 0 0; padding-left: 20px; }
.aulas > li { margin-bottom: 12px; }
.materiais { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.acoes-unidade { margin-left: 6px; white-space: nowrap; }
