/* style.css — Cadastro de Bolsistas CPOP 2026 · Cursinho Popular Dona Jô.
   Mesma paleta da Escala Dona Jô (tirada do logo): creme, carmim, marrom,
   azul do céu, verde da faixa, laranja do sol. Celular primeiro (360px+),
   tema escuro automático. Sem fontes externas. */
:root {
  --fundo: #fbf4e4;
  --superficie: #ffffff;
  --superficie-2: #f6eddb;
  --texto: #2a1514;
  --texto-suave: #6b4a44;
  --borda: #e6d8bf;
  --borda-forte: #b89f7c;
  --marca: #a3173a;
  --marca-escura: #7c0f2b;
  --marca-texto: #ffffff;
  --destaque: #ee893b;
  --topo-fundo: linear-gradient(135deg, #4a1c1c 0%, #6a201d 55%, #8f1838 100%);
  --ok-fundo: #e3f1e8;  --ok-borda: #3a8b62;  --ok-texto: #17452f;
  --azul-fundo: #e3f1fd; --azul-borda: #2f7fc4; --azul-texto: #0e3f6b;
  --alerta-fundo: #fde6e2; --alerta-borda: #c9362a; --alerta-texto: #8a1c14;
  --info-fundo: #fdf0e1; --info-borda: #d9782c; --info-texto: #7a3d0c;
  --cinza-fundo: #ece7e1; --cinza-texto: #564b44;
  --sombra: 0 1px 2px rgba(74, 28, 28, 0.06), 0 4px 14px rgba(74, 28, 28, 0.08);
  --raio: 14px;
  --raio-p: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fundo: #1a1111;
    --superficie: #251919;
    --superficie-2: #2f2020;
    --texto: #f7ece0;
    --texto-suave: #cdb6a8;
    --borda: #45302e;
    --borda-forte: #7a625a;
    --marca: #f07a95;
    --marca-escura: #ff9bb1;
    --marca-texto: #1f0a10;
    --destaque: #f5a25e;
    --topo-fundo: linear-gradient(135deg, #2e1212 0%, #4a1c1c 55%, #5c1229 100%);
    --ok-fundo: #163024;  --ok-borda: #5cbf8a;  --ok-texto: #c3ecd4;
    --azul-fundo: #11293f; --azul-borda: #5fb4f7; --azul-texto: #cfe6fb;
    --alerta-fundo: #3d1a16; --alerta-borda: #e8705f; --alerta-texto: #ffc9bf;
    --info-fundo: #3a2412; --info-borda: #e8914a; --info-texto: #ffd9b5;
    --cinza-fundo: #2b2524; --cinza-texto: #c2b8b1;
    --sombra: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.25);
  }
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--fundo);
  color: var(--texto);
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: var(--marca); }
a:hover { color: var(--marca-escura); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--destaque); outline-offset: 2px; }

.pular { position: absolute; left: -9999px; }
.pular:focus { left: 1rem; top: 1rem; background: var(--superficie); padding: .5rem .8rem; z-index: 10; border-radius: var(--raio-p); }

/* Cabeçalho */
.topo { background: var(--topo-fundo); color: #fff; padding: 1.25rem 1rem 2.6rem; }
.topo-conteudo { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: .85rem; }
.marca { flex: none; width: 4rem; height: auto; display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.topo-sobre { margin: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; opacity: .9; }
.topo-titulo { margin: .05rem 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; line-height: 1.15; font-weight: 700; }

main { max-width: 760px; margin: -1.6rem auto 0; padding: 0 .75rem 1rem; }
body.admin main, body.admin .topo-conteudo { max-width: 1100px; }

.cartao {
  background: var(--superficie);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  padding: 1rem 1rem 1.1rem;
  margin: 0 0 .9rem;
  border: 0;
  min-width: 0;
}
.cartao h1 { font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; line-height: 1.25; margin: 0 0 .6rem; }
.cartao h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
.estreito { max-width: 420px; margin-left: auto; margin-right: auto; }

/* Orientações */
.orientacoes details { border-top: 1px solid var(--borda); padding: .35rem 0; }
.orientacoes details:first-of-type { border-top: 0; }
.orientacoes summary { cursor: pointer; font-weight: 700; padding: .45rem 0; color: var(--marca); }
.orientacoes summary:hover { color: var(--marca-escura); }
.modelo { margin: .5rem 0; padding: .7rem .9rem; background: var(--superficie-2); border-left: 4px solid var(--destaque); border-radius: 0 var(--raio-p) var(--raio-p) 0; font-style: italic; }
.modelo p { margin: .3rem 0; }
.destaque { background: var(--info-fundo); color: var(--info-texto); border-left: 4px solid var(--info-borda); padding: .5rem .7rem; border-radius: 0 var(--raio-p) var(--raio-p) 0; }
.exemplo { background: var(--ok-fundo); color: var(--ok-texto); padding: .5rem .7rem; border-radius: var(--raio-p); }

/* Formulário */
.secao > legend {
  float: left; width: 100%; padding: 0; margin: 0 0 .7rem;
  font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; font-weight: 700; color: var(--marca);
}
.secao > legend + * { clear: both; }
.campo { margin: 0 0 1rem; border: 0; padding: 0; min-width: 0; }
.campo > label, .campo > legend { display: block; font-weight: 600; margin-bottom: .3rem; padding: 0; }
.grupo > legend { float: left; width: 100%; }
.grupo > legend + * { clear: both; }
.obrig { color: var(--marca); }
.opcional { font-weight: 400; color: var(--texto-suave); font-size: .9rem; }
.ajuda { margin: .1rem 0 .4rem; color: var(--texto-suave); font-size: .9rem; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=password],
input:not([type]), select, textarea {
  width: 100%; min-height: 2.9rem; padding: .55rem .7rem;
  border: 1.5px solid var(--borda-forte); border-radius: var(--raio-p);
  background: var(--superficie); font-size: 1rem;
}
textarea { min-height: 5rem; }
input[type=file] {
  width: 100%; padding: .6rem; border: 1.5px dashed var(--borda-forte); border-radius: var(--raio-p);
  background: var(--superficie-2); font-size: .95rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--marca); }
.opcoes { display: flex; flex-wrap: wrap; gap: .5rem; }
.opcao {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem;
  padding: .45rem .8rem; border: 1.5px solid var(--borda); border-radius: var(--raio-p);
  background: var(--superficie-2); cursor: pointer; font-weight: 400;
}
.opcao input { width: 1.2rem; height: 1.2rem; accent-color: var(--marca); margin: 0; flex: none; }
.opcao.caixa { display: flex; align-items: flex-start; }
.opcao.caixa input { margin-top: .15rem; }
.com-erro input, .com-erro select, .com-erro .opcao { border-color: var(--alerta-borda); }
.erro-campo { color: var(--alerta-texto); background: var(--alerta-fundo); margin: .35rem 0 0; padding: .35rem .6rem; border-radius: var(--raio-p); font-size: .92rem; }
.aviso-erros { border-left: 5px solid var(--alerta-borda); }
.aviso-erros h2 { color: var(--alerta-texto); }
.aviso { background: var(--alerta-fundo); color: var(--alerta-texto); padding: .6rem .8rem; border-radius: var(--raio-p); }
.privacidade-resumo ul { padding-left: 1.2rem; }
.privacidade-resumo li { margin-bottom: .3rem; }

/* Honeypot: fora da tela para pessoas, presente para robôs */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.acoes { margin: 1rem 0 1.5rem; }
.botao {
  display: inline-block; min-height: 3rem; padding: .7rem 1.3rem; border-radius: 999px;
  border: 2px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; font-size: 1rem;
}
.botao.principal { background: var(--marca); color: var(--marca-texto); width: 100%; }
.botao.principal:hover { background: var(--marca-escura); color: var(--marca-texto); }
.botao.principal[disabled] { opacity: .65; cursor: progress; }
.botao.secundario { background: var(--superficie-2); color: var(--texto); border-color: var(--borda-forte); }
.botao.perigo { background: var(--alerta-borda); color: #fff; }
.botao-link { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; padding: .3rem; }
@media (min-width: 560px) { .botao.principal { width: auto; } }

/* Sucesso */
.sucesso { border-top: 6px solid var(--ok-borda); }
.protocolo {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.6rem; font-weight: 700;
  letter-spacing: .06em; text-align: center; padding: .7rem; margin: .4rem 0 1rem;
  background: var(--ok-fundo); color: var(--ok-texto); border-radius: var(--raio-p); word-break: break-all;
}

.texto-longo h2 { margin-top: 1.3rem; color: var(--marca); }
.texto-longo li { margin-bottom: .3rem; }

.rodape { max-width: 760px; margin: 0 auto; padding: .5rem 1rem 2rem; text-align: center; color: var(--texto-suave); font-size: .88rem; }
.rodape p { margin: .2rem 0; }

/* Área da coordenação */
.barra-admin {
  display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem;
  background: var(--superficie); border-radius: var(--raio); box-shadow: var(--sombra);
  padding: .6rem 1rem; margin-bottom: .9rem;
}
.barra-admin a { font-weight: 700; text-decoration: none; }
.form-sair { margin-left: auto; display: flex; align-items: center; gap: .4rem; color: var(--texto-suave); }
.flash { background: var(--azul-fundo); color: var(--azul-texto); border-left: 4px solid var(--azul-borda); padding: .6rem .8rem; border-radius: var(--raio-p); }
.filtros { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; margin-top: .6rem; }
.filtros label { display: flex; flex-direction: column; font-size: .9rem; font-weight: 600; gap: .2rem; }
.filtros label.largo { flex: 1 1 16rem; }
.filtros select { min-width: 10rem; }
.contador { font-size: .95rem; background: var(--superficie-2); padding: .1rem .55rem; border-radius: 999px; vertical-align: middle; font-family: system-ui, sans-serif; }
.etiqueta { display: inline-block; font-size: .8rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; background: var(--cinza-fundo); color: var(--cinza-texto); margin: .1rem 0; }
.st-aprovada { background: var(--ok-fundo); color: var(--ok-texto); }
.st-recusada { background: var(--alerta-fundo); color: var(--alerta-texto); }
.st-pendente_documento { background: var(--info-fundo); color: var(--info-texto); }
.st-recebida { background: var(--azul-fundo); color: var(--azul-texto); }
.flag { background: var(--superficie-2); color: var(--texto-suave); border: 1px solid var(--borda); }
.flag-alerta { background: var(--alerta-fundo); color: var(--alerta-texto); }
.tabela-rolagem { overflow-x: auto; }
.tabela { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tabela th, .tabela td { text-align: left; padding: .5rem .45rem; border-bottom: 1px solid var(--borda); vertical-align: top; }
.tabela th { font-size: .85rem; color: var(--texto-suave); }
.tabela.compacta { font-size: .85rem; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.dados { display: grid; grid-template-columns: 1fr; gap: .1rem .9rem; margin: 0 0 1rem; }
.dados dt { font-weight: 700; color: var(--texto-suave); font-size: .88rem; margin-top: .45rem; }
.dados dd { margin: 0; overflow-wrap: anywhere; }
@media (min-width: 700px) {
  .dados { grid-template-columns: minmax(12rem, 16rem) 1fr; }
  .dados dt { margin-top: 0; }
}
.arquivos { padding-left: 1.1rem; }
.arquivos li { margin-bottom: .4rem; }
.cartao.perigo { border-left: 5px solid var(--alerta-borda); }
.paginacao { display: flex; gap: 1rem; }
