/* Arca da Aliança 2.0 — cores dos setores iguais às do programa desktop */
:root {
  --alunos: #1F4E78; --alunos-claro: #2E75B6; --alunos-escuro: #163A5A; --alunos-fundo: #f0f2f5;
  --func: #0B5D4B; --func-claro: #1F8A70; --func-escuro: #08463A; --func-fundo: #e9f4ef;
  --cinza: #595959; --texto: #222; --borda: #d6dbe1;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: "Segoe UI", Roboto, Arial, sans-serif; color: var(--texto); background: #f0f2f5; }

.fundo-kerubins { background: #1d1d1d url("../img/kerubins_Hitech.jpg") center / cover fixed no-repeat; }
.tema-alunos { background: var(--alunos-fundo); }
.tema-funcionarios { background: var(--func-fundo); }

/* barra superior */
.barra { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 10px 18px; background: #2b2b2b; color: #fff; }
.barra.tema-alunos { background: var(--alunos); }
.barra.tema-funcionarios { background: var(--func); }
.barra-esq, .barra-dir { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.marca { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.05rem; }
.titulo-setor { font-weight: 700; letter-spacing: .5px; }
.usuario small { opacity: .8; }
.inline { display: inline; margin: 0; }

/* botões */
.botao { display: inline-block; border: 0; border-radius: 6px; padding: 8px 14px; font: inherit;
  font-weight: 600; cursor: pointer; text-decoration: none; color: #fff; }
.botao-azul { background: var(--alunos); } .botao-azul:hover { background: var(--alunos-escuro); }
.botao-cinza { background: var(--cinza); } .botao-cinza:hover { background: #404040; }
.botao-claro { background: rgba(255,255,255,.18); } .botao-claro:hover { background: rgba(255,255,255,.3); }
.largo { width: 100%; margin-top: 18px; padding: 11px; }

/* layout */
.conteudo { max-width: 1100px; margin: 0 auto; padding: 22px 16px 40px; }
.centro { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cartao { background: rgba(255,255,255,.96); border: 1px solid var(--borda); border-radius: 10px;
  padding: 20px; box-shadow: 0 4px 18px rgba(0,0,0,.12); margin-bottom: 18px; }
.cartao-login { width: 100%; max-width: 380px; }
.cartao-login h1 { margin: 0 0 4px; font-size: 1.35rem; color: var(--alunos); }
.sub { margin: 0 0 14px; color: #555; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input { width: 100%; padding: 10px; border: 1px solid #b9c0c8; border-radius: 6px; font: inherit; }
input:focus { outline: 2px solid var(--alunos-claro); border-color: transparent; }

/* alertas */
.alerta { max-width: 1100px; margin: 0 auto 14px; padding: 10px 14px; border-radius: 6px; font-weight: 600; }
.centro .alerta { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); width: min(92%, 520px); z-index: 5; }
.alerta-erro { background: #fde2e1; color: #8a1c17; border: 1px solid #f3b4b0; }
.alerta-aviso { background: #fff4d6; color: #7a5600; border: 1px solid #f0d58c; }
.alerta-ok { background: #e0f4e8; color: #11613a; border: 1px solid #a9dcbd; }

/* escolha de setor */
.faixa-titulo { text-align: center; color: #fff; background: rgba(43,43,43,.82); border-radius: 10px;
  padding: 14px; margin-bottom: 22px; }
.faixa-titulo h1 { margin: 0; font-size: 1.6rem; letter-spacing: 1px; }
.faixa-titulo p { margin: 4px 0 0; color: #ddd; }
.grade-setores { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.cartao-setor { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; color: #fff;
  text-decoration: none; box-shadow: 0 6px 22px rgba(0,0,0,.35); transition: transform .15s; }
.cartao-setor:hover { transform: translateY(-3px); }
.cartao-setor.tema-alunos { background: var(--alunos); }
.cartao-setor.tema-funcionarios { background: var(--func); }
.cartao-setor img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.rodape-setor { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.rodape-setor strong { font-size: 1.2rem; }
.rodape-setor em { font-style: normal; font-weight: 600; opacity: .9; }
.botao-entrar { align-self: flex-end; background: rgba(255,255,255,.2); }

/* página do setor */
.escola { font-weight: 700; color: #333; margin-top: 0; }
.grade-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.resumo span { display: block; color: #555; }
.resumo strong { font-size: 1.8rem; }
body.tema-alunos .resumo strong, body.tema-alunos h2 { color: var(--alunos); }
body.tema-funcionarios .resumo strong, body.tema-funcionarios h2 { color: var(--func); }
h2 { margin-top: 0; font-size: 1.15rem; }
.tabela { width: 100%; border-collapse: collapse; }
.tabela th, .tabela td { padding: 8px 10px; border-bottom: 1px solid #e3e7ec; text-align: left; }
.tabela tbody tr:nth-child(even) { background: #f7f9fc; }
.num { text-align: right !important; }
.nota { color: #666; font-size: .92rem; }

@media (max-width: 600px) {
  .barra { padding: 8px 10px; }
  .barra-dir .usuario { width: 100%; }
}

/* ===== Fase 2: pesquisa e ficha ===== */
.largo-total { max-width: 1500px; }
.contador { display: flex; flex-wrap: wrap; gap: 6px 16px; background: var(--alunos-escuro); color: #fff;
  padding: 8px 14px; border-radius: 8px; margin-bottom: 14px; font-size: .92rem; }
.filtros { padding: 12px 16px; }
.filtros fieldset { border: 0; margin: 0; padding: 0; }
.filtros legend { font-weight: 700; color: var(--alunos); margin-bottom: 6px; font-size: 1rem; }
.linha-filtros { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 8px; }
.campo { display: flex; flex-direction: column; margin: 0; font-size: .85rem; min-width: 150px; flex: 1 1 150px; }
.campo.largo2 { flex: 2 1 320px; }
.campo.estreito { flex: 0 0 90px; min-width: 90px; }
.junto { display: flex; gap: 6px; }
.junto input { flex: 1; }
select { padding: 9px; border: 1px solid #b9c0c8; border-radius: 6px; font: inherit; background: #fff; width: 100%; }
.junto select { width: auto; }
.acoes-filtro { display: flex; gap: 8px; margin-left: auto; }
.botao-secundario { background: #e4e8ee; color: #333; } .botao-secundario:hover { background: #d3d9e1; }
.botao-verde { background: #375623; } .botao-verde:hover { background: #26401a; }
.botao-vermelho { background: #C00000; } .botao-vermelho:hover { background: #8f0000; }
.botao-azul-claro { background: var(--alunos-claro); } .botao-azul-claro:hover { background: var(--alunos); }
.mini { padding: 4px 9px; font-size: .82rem; }
.vazio { color: #555; text-align: center; padding: 22px; }
.info-resultado { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 4px 2px 8px; }
.tabela-rolagem { overflow-x: auto; background: #fff; border: 1px solid var(--borda); border-radius: 8px; }
.tabela-alunos { font-size: .88rem; }
.tabela thead th { background: var(--alunos); color: #fff; position: sticky; top: 0; white-space: nowrap; }
.tabela thead th a { color: #fff; text-decoration: none; }
.tabela tbody tr:nth-child(even) { background: #f7f9fc; }
.tabela tbody tr.clicavel { cursor: pointer; }
.tabela tbody tr.clicavel:hover { background: #dbe8f6; }
.tabela td.nome a { color: inherit; text-decoration: none; font-weight: 600; }
.centro-txt { text-align: center !important; }
.nowrap { white-space: nowrap; }
.obs { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.obs-quebra { white-space: pre-line; min-width: 160px; }
.tag-arq { font-size: .78rem; background: #e8eef7; border-radius: 4px; padding: 1px 5px; font-weight: 600; }
tr.st-descartado td { color: #c00000; font-weight: 600; }
tr.st-movido td.status { color: #0B5CAD; font-weight: 700; }
tr.st-removido td.status { color: #B45F06; font-weight: 700; }
tr.st-base td { color: #7F6000; }
.paginacao { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 14px 0; flex-wrap: wrap; }
.cab-pagina { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.cab-pagina h1 { font-size: 1.3rem; margin: 0; color: var(--alunos); }
.cab-secao { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cab-secao h2 { margin: 0; }
h2 small, h1 small { font-weight: 400; color: #666; font-size: .85rem; }
.grade-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 4px 18px; border: 0; padding: 0; margin: 0; }
.grade-form label { margin: 8px 0 0; }
.grade-form fieldset:disabled input { background: #f3f4f6; }
fieldset:disabled input { background: #f3f4f6; color: #444; }
.bloco { display: block; margin-top: 14px; }
textarea { width: 100%; padding: 10px; border: 1px solid #b9c0c8; border-radius: 6px; font: inherit; resize: vertical; }
.rodape-form { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.rodape-form .botao-verde { margin-left: auto; }
.sub-aluno { margin: 0 0 10px; }
label small.nota { display: block; font-weight: 400; margin-top: 3px; }
.tabela-alunos td.nome { min-width: 260px; }
.tabela-alunos td.nome a { display: inline; }
.conteudo.medio { max-width: 1320px; }

/* ===== Multiescola: menus dos setores, escolas, usuários ===== */
.escola-barra { font-weight: 600; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.escola-barra small { opacity: .8; font-weight: 400; }
.menu-setor { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 12px; background: var(--alunos-escuro); position: relative; z-index: 20; }
.menu-setor.tema-funcionarios { background: var(--func-escuro); }
.menu-grupo { position: relative; }
.menu-grupo summary { list-style: none; cursor: pointer; color: #fff; font-weight: 600; padding: 9px 14px; border-radius: 6px 6px 0 0; user-select: none; }
.menu-grupo summary::-webkit-details-marker { display: none; }
.menu-grupo summary:hover, .menu-grupo[open] summary { background: rgba(255,255,255,.16); }
.menu-grupo ul { position: absolute; left: 0; top: 100%; min-width: 270px; margin: 0; padding: 6px 0; list-style: none;
  background: #fff; border: 1px solid var(--borda); border-radius: 0 8px 8px 8px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.menu-grupo li a { display: block; padding: 8px 16px; color: #222; text-decoration: none; white-space: nowrap; }
.menu-grupo li a:hover { background: #e8eef7; }
.menu-grupo li a.em-breve { color: #777; }
.menu-grupo li a small { font-size: .72rem; background: #f3e9c6; color: #7a5600; border-radius: 4px; padding: 1px 5px; margin-left: 6px; }
.em-preparacao h1 { color: #7a5600; font-size: 1.3rem; margin-top: 0; }
.selo-escola { background: #e8eef7; border-radius: 6px; padding: 4px 10px; font-weight: 600; font-size: .9rem; }
.escola-col { font-size: .8rem; max-width: 200px; }
#filtro-escolas { margin-bottom: 12px; }
.todas-escolas { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.grupo-escolas { margin: 18px 0 8px; color: var(--alunos); }
.lista-escolas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.item-escola { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; font: inherit;
  padding: 10px 12px; border: 1px solid var(--borda); border-radius: 8px; background: #fff; cursor: pointer; }
.item-escola:hover { border-color: var(--alunos-claro); background: #eef4fb; }
.item-escola.atual { border: 2px solid var(--alunos); background: #e3edf8; }
.item-escola span { color: #666; font-size: .85rem; }
.item-escola[hidden] { display: none; }
tr.inativa td { color: #999; }
.grade-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 18px; }
.conteudo.estreito { max-width: 820px; }
.linhas-rotulo label { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 10px; margin: 6px 0; }
.linhas-rotulo label.check span { font-weight: 400; }
.linhas-rotulo input[type=checkbox] { width: auto; }
.junto-brasao { display: flex; align-items: center; gap: 10px; }
.brasao-mini { height: 54px; width: auto; border: 1px solid var(--borda); border-radius: 4px; background: #fff; }
@media (max-width: 640px) { .linhas-rotulo label { grid-template-columns: 1fr; gap: 2px; } }
.busca-inline { display: flex; gap: 6px; margin-left: auto; }
.busca-inline input { width: 260px; }
.opcoes-radio label { font-weight: 400; display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.opcoes-radio input { width: auto; }
[hidden] { display: none !important; }
.nivel { font-size: .8rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; background: #e4e8ee; }
.nivel-superadmin { background: #5b1a7a; color: #fff; } .nivel-admin { background: #C00000; color: #fff; }
.nivel-gestor { background: #B45F06; color: #fff; } .nivel-operador { background: var(--alunos-claro); color: #fff; }
.dados-acesso th { width: 200px; } code.quebra { word-break: break-all; }

/* ===== Fase 3: relatórios, etiquetas, novo aluno ===== */
.abas { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: -1px; }
.abas a { padding: 9px 16px; border: 1px solid var(--borda); border-bottom: 0; border-radius: 8px 8px 0 0; background: #e4e8ee;
  color: #333; text-decoration: none; font-weight: 600; }
.abas a.ativa { background: #fff; color: var(--alunos); }
.abas + .cartao, .abas + form.cartao { border-top-left-radius: 0; }
.check-linha { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 10px 0 4px; }
.check-linha input { width: auto; }
.check-linha.inline { display: inline-flex; margin: 0; }
select[multiple] { padding: 4px; }
.botao-laranja { background: #C65911; } .botao-laranja:hover { background: #9c440b; }
.barra-selecao { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 12px 16px; }
.barra-selecao label { margin: 0; }
.barra-selecao select { width: auto; }
.barra-marcados { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 0 2px 8px; }
.grade-capas { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.capa-item { border: 1px solid var(--borda); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.capa-item img { max-width: 100%; max-height: 140px; object-fit: contain; border: 1px solid #eee; }
.capa-item form { display: flex; gap: 6px; align-items: center; margin: 0; }
.capa-item input[type=file] { padding: 4px; font-size: .8rem; }
.botoes-novo { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-top: 16px; }
.confirma-homonimo { max-width: none; }
.confirma-homonimo label { font-weight: 600; }
.margens { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; font-weight: 400; font-size: .85rem; }
.margens input { padding: 6px; }

/* ===== Fase 4: setor Funcionários ===== */
.oculto { display: none; }
.botao-roxo { background: #7030A0; } .botao-roxo:hover { background: #561f7d; }
.ficha-func .abas-ficha { margin: -4px 0 14px; border-bottom: 1px solid var(--borda); }
.ficha-func .abas-ficha a.ativa { color: var(--func, #548235); }
body:not(.com-abas) .aba-ficha { border-top: 2px solid var(--borda); padding-top: 8px; margin-top: 14px; }
body.com-abas .titulo-aba { display: none; }
.ficha-linha { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 8px; }
.fcampo { display: flex; flex-direction: column; font-size: .82rem; font-weight: 600; margin: 0; }
.fcampo input, .fcampo select { font-weight: 400; }
.fc-p { flex: 1 1 80px; } .fc-m { flex: 2 1 140px; } .fc-g { flex: 3 1 220px; } .fc-gg { flex: 5 1 320px; }
.ident-com-foto { display: flex; gap: 18px; align-items: flex-start; }
.ident-campos { flex: 1; }
.foto-func { width: 160px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.foto-func img, .sem-foto { width: 150px; height: 190px; object-fit: cover; border: 1px solid var(--borda); border-radius: 4px; background: #f4f6f8; }
.sem-foto { display: flex; align-items: center; justify-content: center; text-align: center; color: #999; font-weight: 700; }
.foto-func input[type=file] { width: 160px; font-size: .75rem; padding: 3px; }
@media (max-width: 720px) { .ident-com-foto { flex-direction: column-reverse; } }
.tabela-mini input, .tabela-mini select { padding: 4px 6px; font-size: .85rem; }
.tabela-formacoes td { min-width: 110px; }
tr.selecionada td { background: #fff3cd !important; }
.rodape-ficha { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--borda);
  position: sticky; bottom: 0; background: #fff; }
.opcoes-busca { flex: 2 1 260px; }
.opcoes-busca .junto { display: flex; gap: 12px; align-items: center; min-height: 36px; }
.tabela-func td { font-size: .85rem; }
.tema-funcionarios .tabela th { background: var(--func); }
.tema-funcionarios .tabela th a { color: #fff; }
.tema-funcionarios .contador { background: var(--func-escuro); }
.tema-funcionarios h1, .tema-funcionarios .cab-pagina h1, .tema-funcionarios .filtros legend { color: var(--func); }
.tema-funcionarios .botao-azul { background: var(--func-claro); }
.tema-funcionarios .botao-azul:hover { background: var(--func); }

/* fase 5a: importação em blocos e Data Enrichment */
progress.progresso { width: 100%; height: 22px; margin: 6px 0 12px; accent-color: var(--func); }
.tema-alunos progress.progresso { accent-color: var(--alunos); }
pre.resumo-importacao { white-space: pre-wrap; background: #f7f9fc; border: 1px solid var(--borda); border-radius: 8px;
  padding: 12px 14px; font-size: .9rem; max-height: 480px; overflow: auto; }
details.outros-campos { margin: 10px 0; }
details.outros-campos > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }

/* fase 5b: ferramentas */
.barra-ferramentas { border-top: 1px dashed var(--borda); padding-top: 8px; }
.botao-escuro { background: #7B0000; } .botao-escuro:hover { background: #5a0000; }
.texto-erro { color: #C00000; } .texto-ok { color: #375623; } .texto-aviso { color: #9C5700; }
.lista-curta { max-height: 360px; overflow: auto; }
.duas-colunas { display: grid; grid-template-columns: minmax(280px, 1fr) 2fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .duas-colunas { grid-template-columns: 1fr; } }
.lista-cpf { list-style: none; padding: 0; margin: 6px 0; max-height: 260px; overflow: auto; font-size: .85rem; }
.mono { font-family: Consolas, monospace; }
.tabela-form input { width: 100%; min-width: 70px; padding: 4px 6px; }
.tabela-form input.largo { min-width: 260px; } .tabela-form input.curto { min-width: 50px; max-width: 80px; }
.grade-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; }
.tipo-mov { border: 1px solid var(--borda); border-radius: 8px; padding: 6px 12px; margin-bottom: 10px; }
.rodape-form.esquerda { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
form.inline { display: inline-block; }

.copiar-oculto { position: fixed; left: -9999px; top: 0; }
.dados-acesso td:last-child { width: 1%; white-space: nowrap; }
