:root {
  /* cores da logo do Colégio Santo Antônio: C azul, S amarelo, A vermelho */
  --marca: #2f6fdb;
  --marca-escura: #1f4fa8;
  --marca-clara: #e8f0fc;
  --amarelo: #f2b400;
  --amarelo-fundo: #fff3cc;
  --vermelho: #d93a2b;
  --vermelho-fundo: #fde4e1;
  --fundo: #f3f5f9;
  --cartao: #ffffff;
  --texto: #1c2333;
  --texto-suave: #5c667a;
  --borda: #d8dee9;
  --raio: 10px;
  --sombra: 0 1px 3px rgba(0,0,0,.08), 0 4px 14px rgba(0,0,0,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 14px; color: var(--texto); background: var(--fundo); min-height: 100vh; }
a { color: var(--marca); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 1.35rem; } h2 { font-size: 1.1rem; } h3 { font-size: .95rem; }
p { margin: 0 0 .75em; }
.suave { color: var(--texto-suave); }
.peq { font-size: .85em; }
.direita { text-align: right; }
.centro { text-align: center; }
.mt { margin-top: 1rem; }
.linha { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.espaco { flex: 1; }

/* login */
.tela-login { display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #2f6fdb 0%, #163a7a 100%); }
.cartao-login { background: var(--cartao); padding: 2rem; border-radius: 14px; border-top: 6px solid; border-image: linear-gradient(90deg, var(--marca) 0 33%, var(--amarelo) 33% 66%, var(--vermelho) 66% 100%) 1; width: min(400px, 92vw); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.logo-login { text-align: center; margin-bottom: 1.25rem; }
.logo-login img { width: 170px; max-width: 70%; height: auto; margin-bottom: .5rem; }
.logo-login h1 { color: var(--marca-escura); }
.logo-login p { color: var(--texto-suave); }
.campo-senha { position: relative; display: block; }
.campo-senha input { padding-right: 2.6rem; }
.olho { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; font-size: 1.15rem; padding: .3rem .45rem; border-radius: 6px; line-height: 1; margin-top: .12rem; }
.olho:hover { background: var(--marca-clara); }
.cartao-login .check { margin: .2rem 0 .9rem; font-size: .85rem; }

/* topo */
.topo { background: var(--marca); color: #fff; display: flex; align-items: center; gap: 1rem; padding: 0 1rem; height: 58px; position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 6px rgba(0,0,0,.2); border-bottom: 4px solid; border-image: linear-gradient(90deg, var(--marca-escura) 0 33%, var(--amarelo) 33% 66%, var(--vermelho) 66% 100%) 1; }
.topo .logo { height: 36px; width: auto; background: #fff; border-radius: 8px; padding: 3px 6px; }
.marca { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; white-space: nowrap; display: flex; align-items: center; gap: .6rem; }
.marca span { font-weight: 400; opacity: .8; font-size: .9em; margin-left: .5rem; }
.topo-usuario { margin-left: auto; display: flex; align-items: center; gap: .6rem; font-size: .9rem; }
.selo { background: rgba(255,255,255,.18); padding: .15rem .5rem; border-radius: 999px; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.btn-menu { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; }

/* layout */
.corpo { display: flex; min-height: calc(100vh - 62px); }
.lateral { width: 220px; background: var(--cartao); border-right: 1px solid var(--borda); padding: 1rem .6rem; flex-shrink: 0; }
.lateral a { display: flex; align-items: center; gap: .55rem; padding: .55rem .8rem; border-radius: 8px; color: var(--texto); text-decoration: none; margin-bottom: .15rem; }
.lateral .ico { font-size: 1.05rem; line-height: 1; flex: 0 0 1.3rem; text-align: center; }
.lateral a:hover { background: var(--marca-clara); }
.lateral a.ativo { background: var(--marca); color: #fff; }
.lateral .grupo { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-suave); padding: .9rem .8rem .3rem; }
.conteudo { flex: 1; padding: 1.25rem 1.5rem 3rem; min-width: 0; }
.carregando { color: var(--texto-suave); }

/* portal de sistemas */
.portal-topo { margin-bottom: 1.4rem; }
.grade-sistemas { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.sistema { display: flex; flex-direction: column; gap: .35rem; margin: 0; text-decoration: none; color: inherit;
  border-top: 3px solid var(--marca); transition: border-color .15s, transform .15s; }
a.sistema:hover { border-color: var(--amarelo); transform: translateY(-2px); }
.sistema h3 { color: var(--marca-escura); margin: 0; }
.sistema p { color: var(--texto-suave); font-size: .86rem; margin: 0; flex: 1; }
.sis-icone { font-size: 1.7rem; line-height: 1; }
.sis-status { align-self: flex-start; margin-top: .5rem; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase;
  padding: .15rem .5rem; border-radius: 999px; background: var(--borda); color: var(--texto-suave); }
.sis-status.pronto { background: var(--marca); color: #fff; }
.sistema.em-breve { border-top-color: var(--borda); opacity: .72; }

/* cartões */
.cartao { background: var(--cartao); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1rem 1.2rem; box-shadow: var(--sombra); margin-bottom: 1rem; }
.cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.numero { font-size: 2rem; font-weight: 700; color: var(--marca); line-height: 1; }
.numero.alerta { color: #b78600; }
.numero.ruim { color: var(--vermelho); }
.rotulo { color: var(--texto-suave); font-size: .85rem; margin-top: .3rem; }
.cartao-turma { display: block; text-decoration: none; color: inherit; }
.cartao-turma:hover { border-color: var(--marca); }
.cartao-turma h3 { color: var(--marca); overflow-wrap: anywhere; word-break: break-word; }
.cartao-turma .mini { overflow-wrap: anywhere; }
.cartao { min-width: 0; overflow: hidden; }

/* botões */
.btn { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--borda); background: #fff; color: var(--texto); padding: .5rem .9rem; border-radius: 8px; cursor: pointer; font-size: .92rem; text-decoration: none; line-height: 1.2; }
.btn:hover { border-color: var(--marca); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primario { background: var(--marca); border-color: var(--marca); color: #fff; }
.btn-primario:hover { background: var(--marca-escura); }
.btn-perigo { color: var(--vermelho); border-color: #e7b3af; }
.btn-perigo:hover { background: var(--vermelho-fundo); }
.btn-claro { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.4); color: #fff; }
.btn-peq { padding: .3rem .6rem; font-size: .82rem; }
.btn-largo { width: 100%; justify-content: center; padding: .7rem; font-size: 1rem; }
.btn.ativo { background: var(--amarelo-fundo); border-color: var(--amarelo); color: #6b4f00; font-weight: 600; }
.abas { display: flex; gap: .3rem; border-bottom: 1px solid var(--borda); margin-bottom: 1rem; overflow-x: auto; scrollbar-width: none; }
.abas::-webkit-scrollbar { display: none; }
.abas button { flex: 0 0 auto; white-space: nowrap; }
.abas button { border: 0; background: none; padding: .6rem .9rem; cursor: pointer; font-size: .95rem; color: var(--texto-suave); border-bottom: 2px solid transparent; }
.abas-principais { border-bottom: 2px solid var(--borda); margin: .2rem 0 .9rem; }
.abas-principais button { font-size: 1.02rem; font-weight: 600; padding: .7rem 1.1rem; border-bottom-width: 3px; }
.abas-principais button.ativo { color: var(--marca-escura); border-bottom-color: var(--marca); }
.abas-principais .conta { display: inline-block; margin-left: .4rem; padding: .05rem .4rem; border-radius: 999px; background: var(--marca-clara); color: var(--marca-escura); font-size: .78rem; font-weight: 600; }
.abas-principais button.ativo .conta { background: var(--marca); color: #fff; }
.nota-tela { color: var(--texto-suave); font-size: .88rem; margin: 0 0 .9rem; max-width: 70ch; }
/* explicação que usa a largura da tela, em vez de virar uma coluna estreita */
.nota-tela.larga { max-width: none; }
.filtro-anos { margin: 0 0 1rem; padding: .5rem .7rem; background: var(--cartao); border: 1px solid var(--borda); border-radius: var(--raio); }
.filtro-anos .btn { text-decoration: none; }
.abas button.ativo { color: var(--marca); border-bottom-color: var(--marca); font-weight: 600; }

/* formulários */
label { display: block; font-size: .85rem; color: var(--texto-suave); margin-bottom: .7rem; }
input[type=text], input[type=password], input[type=number], input[type=file], select, textarea {
  display: block; width: 100%; margin-top: .25rem; padding: .5rem .6rem; border: 1px solid var(--borda); border-radius: 7px; font: inherit; color: var(--texto); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(47,111,219,.35); border-color: var(--marca); }
textarea { resize: vertical; min-height: 64px; }
.filtros { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; margin-bottom: 1rem; align-items: end; }
.filtros label { margin: 0; }
.check { display: flex; align-items: center; gap: .4rem; color: var(--texto); }
.check input { width: auto; margin: 0; }
.erro { color: var(--vermelho); background: var(--vermelho-fundo); padding: .5rem .7rem; border-radius: 7px; }
.aviso { background: var(--amarelo-fundo); padding: .5rem .7rem; border-radius: 7px; }
.ok { background: var(--marca-clara); padding: .5rem .7rem; border-radius: 7px; }

/* tabelas */
.tabela-rolagem { overflow-x: auto; background: var(--cartao); border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra); }
table { border-collapse: collapse; width: 100%; font-size: .84rem; }
th.ordenavel { cursor: pointer; user-select: none; }
th.ordenavel:hover { background: var(--marca-escura); }
th { background: var(--marca); color: #fff; text-align: left; padding: .5rem .5rem; font-weight: 600; position: sticky; top: 0; white-space: nowrap; }
td { padding: .35rem .5rem; border-top: 1px solid var(--borda); border-right: 1px solid #e6eaf1; vertical-align: top; }
td:last-child { border-right: 0; }
/* zebra: branco e cinza alternados para não perder a linha */
tbody tr:nth-child(even) td { background: #eef1f6; }
tbody tr:hover td { background: #e3ebf8; }
.tabela-edicao tbody tr:nth-child(even) textarea, .tabela-edicao tbody tr:nth-child(even) select { background: #fff; }
/* cores por situação (vencem a zebra) */
/* duas linhas vizinhas da mesma cor nunca ficam iguais: a par vem um tom mais escuro */
tr.nota-excelente td { background: #e3f5e6; }
tbody tr.nota-excelente:nth-child(even) td { background: #cfead6; }
tbody tr.nota-excelente:hover td { background: #bfe3c8; }
tr.nota-abaixo td { background: #fde6e3; }
tbody tr.nota-abaixo:nth-child(even) td { background: #f7d1cc; }
tbody tr.nota-abaixo:hover td { background: #f2c1bb; }
tr.saiu td { background: #a11f1f; color: #fff; }
tbody tr.saiu:nth-child(even) td { background: #861414; color: #fff; }
tbody tr.saiu:hover td { background: #700f0f; }
tr.saiu .mini, tr.saiu .sub, tr.saiu .estado { color: rgba(255,255,255,.85); }
tr.saiu a, tr.saiu .nome:hover { color: #fff; }
tr.saiu .tag { background: rgba(255,255,255,.9); color: #7a1010; }
td .nome { font-weight: 600; cursor: pointer; }
td .nome:hover { color: var(--marca); text-decoration: underline; }
td .sub { display: block; color: var(--texto-suave); font-size: .78rem; font-weight: 400; }
.obs-prof { min-width: 220px; max-width: 360px; white-space: pre-line; font-size: .82rem; }
.obs-conselho { margin: 0; min-width: 220px; min-height: 48px; font-size: .82rem; padding: .3rem .4rem; overflow: hidden; line-height: 1.3; }
.obs-anterior { margin-top: .3rem; font-size: .76rem; line-height: 1.3; color: var(--texto-suave); max-width: 300px; white-space: pre-line; border-left: 3px solid var(--amarelo); padding-left: .4rem; }
.obs-anterior b { color: var(--texto); }
tr.saiu .obs-anterior, tr.saiu .obs-anterior b { color: rgba(255,255,255,.9); }
.tabela-edicao td { padding: .35rem .4rem; }
.tabela-edicao select { margin: 0; padding: .3rem .35rem; font-size: .8rem; min-width: 140px; }
.tabela-edicao select.curto { min-width: 110px; }
.tabela-edicao textarea { margin: 0; min-width: 220px; min-height: 54px; overflow: hidden; font-size: .8rem; padding: .3rem .4rem; line-height: 1.3; }
.tabela-edicao input[type=checkbox] { width: 18px; height: 18px; }
.estado { font-size: .75rem; color: var(--texto-suave); white-space: nowrap; }
.estado.salvo { color: var(--marca); }
.estado.erro-salvar { color: var(--vermelho); background: none; padding: 0; }
.mini { font-size: .78rem; color: var(--texto-suave); }
.tag { display: inline-block; padding: .1rem .45rem; border-radius: 999px; font-size: .75rem; background: var(--marca-clara); color: var(--marca-escura); white-space: nowrap; }
.tag.vermelha { background: var(--vermelho-fundo); color: var(--vermelho); }
.tag.cinza { background: #eceff4; color: var(--texto-suave); }
.tag.amarela { background: var(--amarelo-fundo); color: #6b4f00; }
.acoes { white-space: nowrap; }
.acoes .btn { margin-right: .25rem; }

/* sábados letivos: médio em rosa bebê, fundamental em verde bebê */
tr.sab-medio td, tbody tr.sab-medio:nth-child(even) td { background: #fbe4ee; }
tbody tr.sab-medio:hover td { background: #f6d3e3; }
tr.sab-fund td, tbody tr.sab-fund:nth-child(even) td { background: #e3f5e6; }
tbody tr.sab-fund:hover td { background: #d3ecd8; }
tr.sab-evento td, tbody tr.sab-evento:nth-child(even) td { background: #f2f3f6; color: var(--texto-suave); }
tr.meu-sabado td { box-shadow: inset 3px 0 0 var(--marca); }

tr.meu-sabado:not(.sab-medio):not(.sab-fund):not(.sab-evento) td { background: var(--marca-clara); }
.chip { display: inline-block; padding: .1rem .5rem; margin: .1rem 0; border-radius: 999px; background: var(--surface-2, #eceff4); border: 1px solid var(--borda); font-size: .8rem; white-space: nowrap; }
.chip-eu { background: var(--marca); border-color: var(--marca); color: #fff; font-weight: 600; }
tfoot td { border-top: 2px solid var(--borda); font-weight: 600; }

/* calendário de avaliações: mesmo desenho da planilha da coordenação */
.tabela-avaliacoes { border-collapse: collapse; width: 100%; }
.tabela-avaliacoes th, .tabela-avaliacoes td { border: 1px solid #c6cbd4; text-align: center; vertical-align: middle;
  padding: .38rem .5rem; }
.tabela-avaliacoes thead th { background: #eceef2; color: #26303f; font-weight: 700; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .02em; }
.tabela-avaliacoes tbody tr:nth-child(odd) td { background: #f6f7f9; }
.tabela-avaliacoes tbody tr:nth-child(even) td { background: #fff; }
.tabela-avaliacoes tbody tr:hover td { background: var(--marca-clara); }
.tabela-avaliacoes .col-codigo { width: 4rem; font-weight: 700; }
.tabela-avaliacoes .col-pontuacao { width: 6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tabela-avaliacoes .col-data { width: 11rem; }
.tabela-avaliacoes .col-nome { min-width: 10rem; }
.tabela-avaliacoes .col-observacao { font-size: .82rem; color: #2f5d43; min-width: 14rem; max-width: 22rem; white-space: pre-line; text-align: left; }
.tabela-avaliacoes .col-nivel { font-size: .84rem; min-width: 8rem; white-space: pre-line; text-align: left; }

/* células que dá para escrever direto */
.tabela-avaliacoes td[data-campo] { cursor: text; }
.tabela-avaliacoes td[data-campo]:hover { outline: 1px dashed var(--marca); outline-offset: -1px; }
.tabela-avaliacoes td[data-campo]:empty::before { content: '+'; color: var(--texto-suave); opacity: .45; }
.tabela-avaliacoes td[data-campo].editando { outline: 2px solid var(--marca); outline-offset: -2px;
  background: #fff !important; text-align: left; white-space: pre-wrap; }
.tabela-avaliacoes td[data-campo].salvou { background: #e3f5e6 !important; transition: background .5s; }
.aviso-total { color: var(--perigo, #a11f1f); font-weight: 600; }
.seletor-ano { width: auto; margin: 0; padding: .25rem .5rem; font-weight: 700; font-size: 1rem;
  color: var(--marca-escura); border-radius: .4rem; }
@media print { .tabela-avaliacoes td[data-campo]:empty::before { content: ''; } }
.tabela-avaliacoes .col-acoes { width: 4.5rem; }
.cabeca-grupo td { background: #d9dde5; color: #26303f; font-weight: 700; font-size: .78rem;
  text-align: center; letter-spacing: .03em; text-transform: uppercase; }
.cabeca-grupo .faixa-serie { background: var(--marca); color: #fff; }
.quadro-serie { margin-bottom: 2.2rem; }
.cabeca-serie { align-items: center; gap: .6rem; margin-bottom: .5rem; }
.cabeca-serie h2 { margin: 0; }
.linha-extra td { color: var(--texto-suave); }
.data-chip { display: inline-block; padding: .05rem .35rem; margin: .05rem .1rem; border-radius: .3rem;
  background: var(--marca-clara); color: var(--marca-escura); font-weight: 600; font-size: .8rem; white-space: nowrap; }
.data-chip i { font-style: normal; font-weight: 400; opacity: .85; }
.rodape-quadro { margin-top: .4rem; font-style: italic; }
.linha-data { gap: .4rem; margin-bottom: .35rem; }
.linha-data input[type=date] { width: 11rem; }
.linha-data input[type=text] { flex: 1; }
.tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
@media (max-width: 700px) { .tres { grid-template-columns: 1fr; } }
.agenda { display: flex; flex-direction: column; gap: .5rem; }
.dia-agenda { display: flex; gap: .8rem; align-items: baseline; padding: .5rem .6rem; border: 1px solid var(--borda);
  border-radius: .5rem; background: var(--fundo-cartao, #fff); }
.dia-cabeca { flex: 0 0 8.5rem; font-weight: 700; color: var(--marca-escura); }
.dia-cabeca .mini { display: block; font-weight: 400; }
.dia-itens { display: flex; flex-wrap: wrap; gap: .3rem; }
@media (max-width: 700px) { .dia-agenda { flex-direction: column; gap: .3rem; } .dia-cabeca { flex: none; } }

/* folha de impressão: cabeçalho com a logo, só aparece no papel */
.folha-cabeca { display: none; }

@media print {
  body.imprimindo .no-print, body.imprimindo .menu-lateral, body.imprimindo .topo,
  body.imprimindo .acoes, body.imprimindo .rodape, body.imprimindo .abas,
  body.imprimindo .cabeca-serie, body.imprimindo .aviso { display: none !important; }
  body.imprimindo [data-quadro] { display: none; }
  body.imprimindo [data-quadro].so-esse { display: block; }
  body.imprimindo .conteudo, body.imprimindo main { margin: 0; padding: 0; max-width: none; }
  body.imprimindo .tabela-rolagem { overflow: visible; }
  body.imprimindo .folha-cabeca { display: flex; align-items: center; gap: 14px;
    border-bottom: 2px solid #1f4e9c; padding-bottom: 8px; margin-bottom: 12px; }
  body.imprimindo .folha-cabeca img { width: 78px; height: auto; }
  body.imprimindo .folha-escola { font-size: 9pt; letter-spacing: .08em; text-transform: uppercase; color: #55606f; }
  body.imprimindo .folha-titulo { font-size: 16pt; font-weight: 700; color: #1f4e9c; line-height: 1.15; }
  body.imprimindo .folha-sub { font-size: 10pt; color: #333; }
  body.imprimindo table { font-size: 8.5pt; width: 100%; }
  body.imprimindo .tabela-avaliacoes th, body.imprimindo .tabela-avaliacoes td { padding: 3pt 4pt; border-color: #8b93a1; }
  body.imprimindo .tabela-avaliacoes thead th { background: #e6e9ee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.imprimindo .cabeca-grupo td { background: #d9dde5 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.imprimindo .cabeca-grupo .faixa-serie { background: #1f4e9c !important; color: #fff !important; }
  body.imprimindo .tabela-avaliacoes tbody tr:nth-child(odd) td { background: #f4f5f7 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.imprimindo .data-chip { background: none !important; color: #1a1a1a !important; font-weight: 600; padding: 0; }
  body.imprimindo tr { break-inside: avoid; }
  body.imprimindo .rodape-quadro { margin-top: 10px; font-size: 8pt; color: #55606f; }
  @page { size: landscape; margin: 11mm; }
}

/* rodízio de provas */
.tabela-rodizio .col-rod-data_texto { width: 7rem; }
.tabela-rodizio .col-rod-grupo { width: 6rem; font-weight: 700; }
.tabela-rodizio .col-rod-horario { width: 8rem; }
.tabela-rodizio .col-rod-aplicadores { text-align: left; min-width: 16rem; }
.tabela-rodizio .col-rod-contas { width: 14rem; font-size: .84rem; }
.quem { white-space: nowrap; }
.quem-eu { font-weight: 700; color: var(--marca-escura); }
.tracinho { margin: 0 .35rem; color: var(--texto-suave); }
.grupos-rodizio { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1rem; }
.cartao-grupo { border: 1px solid var(--borda); border-radius: .6rem; padding: .8rem .9rem; background: var(--cartao); }
.cartao-grupo h3 { margin: 0; color: var(--marca-escura); }
.tag.vez { background: #e3f5e6; color: #1d6b34; border: 1px solid #b7e0c2; font-weight: 700; }
/* card das próximas aplicações */
.cartao-sugestoes { border: 1px solid #cadcfa; border-radius: .7rem; background: #f4f8ff;
  padding: .9rem 1rem 1rem; margin-bottom: 1.4rem; }
.sug-cabeca { align-items: baseline; margin-bottom: .1rem; }
.sug-cabeca h2 { margin: 0; color: var(--marca-escura); font-size: 1.15rem; }
.sug-criterio { color: var(--texto-suave); margin: 0 0 .7rem; line-height: 1.45; max-width: 60ch; }
.lista-sugestoes { display: flex; flex-direction: column; gap: .45rem; }
.sug-linha { display: flex; align-items: center; gap: .8rem; padding: .55rem .7rem;
  background: #fff; border: 1px solid var(--borda); border-radius: .5rem; }
.sug-grupo { flex: 0 0 4.2rem; font-weight: 800; color: var(--marca-escura); font-size: 1rem; }
.sug-meio { flex: 1; min-width: 0; }
.sug-nomes { font-weight: 700; }
.sug-conta { color: var(--texto-suave); }
@media (max-width: 700px) {
  .sug-linha { flex-wrap: wrap; }
  .sug-grupo { flex: 0 0 auto; }
  .sug-linha .btn { margin-left: auto; }
}
.ordem-rodizio { list-style: none; counter-reset: fila; margin: .6rem 0 0; padding: 0; }
.ordem-rodizio li { counter-increment: fila; display: flex; align-items: baseline; gap: .5rem;
  padding: .3rem .4rem; border-radius: .35rem; }
.ordem-rodizio li::before { content: counter(fila); width: 1.3rem; flex: 0 0 1.3rem; text-align: center;
  font-size: .78rem; font-weight: 700; color: var(--texto-suave); }
.ordem-rodizio li:nth-child(odd) { background: #f6f7f9; }
.ordem-rodizio li.e-a-vez { background: #e3f5e6; font-weight: 600; }
.ordem-rodizio .nome { flex: 1; }
.ordem-rodizio .vezes { font-variant-numeric: tabular-nums; color: var(--texto-suave); }
.linha-ordem { gap: .4rem; margin-bottom: .4rem; align-items: center; }
.linha-ordem .pos { width: 1.5rem; text-align: center; font-weight: 700; color: var(--texto-suave); }
.linha-ordem select { flex: 2; margin: 0; }
.linha-ordem input[type=text] { flex: 1; margin: 0; }
.linha-ordem input[name=observacao] { max-width: 6rem; }

/* schedules e planejamentos */
/* card de quem prepara */
.cartao-preparo { border: 1px solid #cadcfa; border-radius: .7rem; background: #f4f8ff;
  padding: .9rem 1rem 1rem; margin-bottom: 1.3rem; }
.lista-preparo { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .5rem; }
.preparo { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; background: #fff;
  border: 1px solid var(--borda); border-radius: .5rem; }
.preparo-meu { border-color: var(--marca); box-shadow: inset 3px 0 0 var(--marca); }
.preparo-meio { flex: 1; min-width: 0; }
.preparo-nome { font-weight: 700; }
.preparo-nome .tag { font-size: .65rem; padding: 0 .35rem; }
.preparo-conta { flex: 0 0 auto; color: var(--texto-suave); text-align: right; }

.tabela-sched .col-nivel-sched { width: 9.5rem; text-align: left; }
.tabela-sched tr.linha-minha td { background: #f4f8ff; }
.tabela-sched tr.linha-minha .col-nivel-sched { box-shadow: inset 3px 0 0 var(--marca); }
.tabela-sched .cel-doc { text-align: left; vertical-align: middle; min-width: 12rem; }
.tabela-sched .cel-doc.tem { background: #f3faf5 !important; }
.tabela-sched .nada { color: #c3c8d1; }
.btn-falta { border: 1px dashed var(--borda); background: none; color: var(--texto-suave); border-radius: .3rem;
  font-size: .78rem; padding: .15rem .6rem; cursor: pointer; }
.btn-falta:hover { border-color: var(--marca); color: var(--marca-escura); background: var(--marca-clara); }
.doc { display: inline-flex; align-items: baseline; gap: .4rem; max-width: 100%; text-decoration: none;
  color: var(--marca-escura); padding: .2rem 0; }
.doc:hover .doc-nome { text-decoration: underline; }
.doc-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 15rem; font-size: .84rem; }
.doc-tipo { flex: 0 0 auto; font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700;
  padding: .05rem .3rem; border-radius: .25rem; background: var(--marca-clara); color: var(--marca-escura); }
.doc-planejamento { background: #fbe4ee; color: #8a2a55; }
.btn-mini { border: 0; background: none; cursor: pointer; color: var(--texto-suave); font-size: .85rem; padding: 0 .2rem; }
.btn-mini:hover { color: var(--marca); }
.lista-soltos { display: flex; flex-direction: column; gap: .3rem; }
.solto { display: flex; align-items: baseline; gap: .6rem; padding: .35rem .5rem; border: 1px solid var(--borda);
  border-radius: .4rem; background: var(--cartao); }
.solto .doc-nome { max-width: 32rem; }

/* a folha do schedule, igual na tela e no papel */
/* a folha do schedule é sempre Arial 10, na tela e no papel */
.folha { background: var(--cartao); border: 1px solid var(--borda); border-radius: .6rem; padding: 1.2rem 1.4rem;
  font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 1.35; }
.folha table, .folha th, .folha td { font-family: inherit; font-size: 10pt; }
.folha .tabela-avaliacoes thead th { font-size: 10pt; }
.folha-cabeca.sempre { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid var(--marca);
  padding-bottom: 10px; margin-bottom: 14px; }
.folha-cabeca.sempre img { width: 74px; height: auto; }
.coursebook { margin: 0 0 .8rem; font-size: .9rem; }
.tabela-schedule .col-sch-semana { width: 8.5rem; }
.tabela-schedule .col-sch-unidade { width: 4rem; }
.tabela-schedule .col-sch-atividades { text-align: left; }
.tabela-schedule .col-sch-licao { text-align: left; width: 20%; }
/* as avaliações da etapa, num bloco próprio no fim da folha */
.avaliacoes-etapa { margin-top: 1.1rem; }
.avaliacoes-etapa h3 { margin: 0 0 .4rem; font-size: .95rem; color: var(--nivel-forte); }
/* tabela justa: as colunas acompanham o conteúdo, sem vão no meio */
.tabela-provas { width: auto; max-width: 100%; }
.tabela-provas th, .tabela-provas td { white-space: nowrap; padding: .25rem .8rem; }
.tabela-provas .col-prova-cod { width: 3.2rem; font-weight: 700; }
.tabela-provas .col-prova-nome { text-align: left; }
.tabela-provas .col-prova-pontos { font-variant-numeric: tabular-nums; }
.tabela-provas .col-prova-data { font-weight: 700; text-align: left; }
.tabela-provas .col-prova-data.data-aberta { font-weight: 400; font-size: .8rem; color: var(--texto-suave); }
.folha .tabela-provas thead th { background: var(--nivel-forte); color: #fff; border-color: var(--nivel-forte); }
.folha .tabela-provas th, .folha .tabela-provas td { border-color: var(--nivel-borda); }
.folha .tabela-provas tbody tr:nth-child(odd) td { background: var(--nivel-fundo); }
.avaliacoes-etapa .mini { margin-top: .3rem; }
.provas-etapa { margin: .7rem 0 .2rem; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.chip-prova { cursor: pointer; border: 1px solid #e3c3d2; background: #fbe4ee; color: #8a2a55; font-weight: 600; }
.chip-prova:hover { background: #f6d3e3; }
.tabela-schedule td { text-align: left; white-space: pre-line; vertical-align: top; }
.tabela-schedule .col-sch-semana, .tabela-schedule .col-sch-unidade { text-align: center; font-weight: 600; }

@media print {
  body.imprimindo-folha .no-print, body.imprimindo-folha .menu-lateral, body.imprimindo-folha .topo,
  body.imprimindo-folha .acoes, body.imprimindo-folha .rodape, body.imprimindo-folha .ajuda { display: none !important; }
  body.imprimindo-folha .conteudo, body.imprimindo-folha main { margin: 0; padding: 0; max-width: none; }
  body.imprimindo-folha .folha { border: 0; padding: 0; border-radius: 0; }
  body.imprimindo-folha .tabela-rolagem { overflow: visible; }

  /* o papel espelha a folha da tela, nas cores do nível, apertado para caber numa página */
  body.imprimindo-folha .folha { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 1.35; }
  body.imprimindo-folha .folha table { font-size: 10pt; width: 100%; }
  body.imprimindo-folha .folha th, body.imprimindo-folha .folha td {
    padding: 2.5pt 4pt; border-color: var(--nivel-borda) !important; }
  body.imprimindo-folha .folha-cabeca { padding-bottom: 6pt; margin-bottom: 9pt; gap: 10pt; }
  body.imprimindo-folha .folha-cabeca img { width: 62px; }
  body.imprimindo-folha .folha-escola { font-size: 9pt; }
  body.imprimindo-folha .folha-sub { font-size: 10pt; }
  body.imprimindo-folha .coursebook { font-size: 10pt; margin-bottom: 7pt; }
  body.imprimindo-folha .avaliacoes-etapa h3 { font-size: 11pt; }
  body.imprimindo-folha .rodape-quadro { font-size: 8pt; margin-top: 7pt; }
  body.imprimindo-folha .folha thead th { background: var(--nivel-forte) !important; color: #fff !important;
    border-color: var(--nivel-forte) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.imprimindo-folha .folha tbody tr:nth-child(odd) td { background: var(--nivel-fundo) !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.imprimindo-folha .folha tbody tr:nth-child(even) td { background: #fff !important; }
  body.imprimindo-folha .folha tr { break-inside: avoid; }
  body.imprimindo-folha .folha thead { display: table-header-group; }
  body.imprimindo-folha .folha-titulo { font-size: 14pt; }
  body.imprimindo-folha .avaliacoes-etapa { break-inside: auto; margin-top: 10pt; }
  body.imprimindo-folha .avaliacoes-etapa h3 { break-after: avoid; }
  body.imprimindo-folha .tabela-provas { width: auto; }
}
@page { size: portrait; margin: 12mm; }

/* grade de responsáveis por nível */
/* a grade cabe na tela: as colunas dividem a largura disponível */
.tabela-niveis { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; }
.tabela-niveis thead th { padding: .5rem .6rem; }
.tabela-niveis .col-faixa { width: 4.4rem; text-align: center; background: var(--nivel-forte, var(--marca));
  color: #fff; border-color: var(--nivel-forte, var(--marca)); vertical-align: middle; white-space: nowrap; }
.tabela-niveis .col-faixa .faixa-rotulo { font-size: .62rem; font-weight: 500; opacity: .8;
  text-transform: uppercase; letter-spacing: .06em; }
.tabela-niveis .col-faixa b { font-size: 1.1rem; letter-spacing: -.01em; }
.tabela-niveis thead .col-faixa { background: var(--marca-escura); border-color: var(--marca-escura); }
.tabela-niveis .cel-nivel { vertical-align: top; text-align: left; min-width: 0; padding: .45rem .5rem .55rem;
  overflow-wrap: anywhere; }
.tabela-niveis tbody tr:nth-child(odd) .cel-nivel { background: #fbfcfe; }
.tabela-niveis tbody tr:hover .cel-nivel { background: #f4f8ff; }
.tabela-niveis .cel-nivel.vazia { background: repeating-linear-gradient(135deg, #f6f7f9, #f6f7f9 6px, #f1f2f5 6px, #f1f2f5 12px) !important;
  text-align: center; vertical-align: middle; color: var(--texto-suave); }
.nivel-topo { margin-bottom: .35rem; }
.nivel-codigo { display: inline-block; padding: .08rem .5rem; border-radius: 999px;
  background: var(--marca-clara); color: var(--marca-escura); font-weight: 800; font-size: .9rem; letter-spacing: .01em; }
.nivel-resp { font-weight: 700; margin-bottom: .15rem; }
.campo-nivel { display: block; margin: 0 0 .35rem; }
.campo-nivel > span { display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--texto-suave); margin-bottom: .1rem; }
.tabela-niveis .sel-resp, .tabela-niveis .campo-livro { width: 100%; max-width: 100%; margin: 0; padding: .2rem .3rem;
  font-size: .76rem; border: 1px solid var(--borda); border-radius: .35rem; background: #fff; }
.tabela-niveis .campo-livro { font-size: .72rem; color: var(--texto-suave); }
.tabela-niveis .campo-nivel > span { font-size: .58rem; }
.tabela-niveis .nivel-codigo { font-size: .82rem; padding: .05rem .4rem; }
.tabela-niveis .professores-nivel .mini { font-size: .7rem; line-height: 1.45; }
.tabela-niveis .professores-nivel .tracinho { margin: 0 .15rem; }
@media (max-width: 900px) { .tabela-niveis { table-layout: auto; } .tabela-niveis .cel-nivel { min-width: 10rem; } }
.tabela-niveis .campo-livro:focus { color: var(--texto); }
.tabela-niveis .sel-resp:hover, .tabela-niveis .campo-livro:hover { border-color: var(--marca); }
.tabela-niveis .salvou { background: #e3f5e6 !important; transition: background .6s; }
.tabela-niveis .livro { font-size: .78rem; color: var(--texto-suave); white-space: pre-line; }
.professores-nivel { margin-top: .1rem; }
.professores-nivel .mini { line-height: 1.5; }
.professores-nivel .quem-eu { color: var(--marca-escura); font-weight: 700; }

/* a cor de cada nível: .1 azul, .2 amarelo, .3 vermelho */
.faixa-1 { --nivel-fundo: #e8f0fd; --nivel-borda: #b9d1f6; --nivel-forte: #1f4e9c; --nivel-texto: #fff; }
.faixa-2 { --nivel-fundo: #fdf6dc; --nivel-borda: #ecd98f; --nivel-forte: #b9860b; --nivel-texto: #fff; }
.faixa-3 { --nivel-fundo: #fdeae7; --nivel-borda: #f2c2bc; --nivel-forte: #b3261e; --nivel-texto: #fff; }
.nivel-codigo.faixa-1, .nivel-codigo.faixa-2, .nivel-codigo.faixa-3 {
  background: var(--nivel-forte); color: var(--nivel-texto); }
.preparo.faixa-1, .preparo.faixa-2, .preparo.faixa-3 {
  background: var(--nivel-fundo); border-color: var(--nivel-borda); }
.tabela-niveis .cel-nivel.faixa-1, .tabela-niveis .cel-nivel.faixa-2, .tabela-niveis .cel-nivel.faixa-3 {
  background: var(--nivel-fundo) !important; }
.tabela-sched tr.faixa-1 .col-nivel-sched { background: var(--nivel-fundo) !important; }
.tabela-sched tr.faixa-2 .col-nivel-sched { background: var(--nivel-fundo) !important; }
.tabela-sched tr.faixa-3 .col-nivel-sched { background: var(--nivel-fundo) !important; }
/* a folha inteira segue a cor do nível: linhas alternando branco e o tom do nível */
.folha.faixa-1 .folha-cabeca, .folha.faixa-2 .folha-cabeca, .folha.faixa-3 .folha-cabeca {
  border-bottom-color: var(--nivel-forte); }
.folha.faixa-1 .folha-titulo, .folha.faixa-2 .folha-titulo, .folha.faixa-3 .folha-titulo { color: var(--nivel-forte); }
.folha .tabela-schedule thead th { background: var(--nivel-forte); color: #fff; border-color: var(--nivel-forte); }
.folha .tabela-schedule tbody tr:nth-child(odd) td { background: var(--nivel-fundo); }
.folha .tabela-schedule tbody tr:nth-child(even) td { background: #fff; }
.folha .tabela-schedule tbody tr:hover td { background: #fff8d6; }
.folha .tabela-schedule th, .folha .tabela-schedule td { border-color: var(--nivel-borda); }
.folha .tabela-schedule td[data-campo].editando { background: #fff !important; outline-color: var(--nivel-forte); }
.folha .coursebook { color: var(--nivel-forte); }

/* caixinha de orientações */
.ajuda { margin: 0 0 1.2rem; border: 1px solid var(--borda); border-radius: .5rem; background: #fbfcfe; }
.ajuda summary { cursor: pointer; padding: .55rem .8rem; font-weight: 600; color: var(--marca-escura); }
.ajuda summary::marker { color: var(--marca); }
.ajuda[open] summary { border-bottom: 1px solid var(--borda); }
.ajuda ol { margin: .6rem 0 .8rem; padding-left: 2.2rem; line-height: 1.6; font-size: .88rem; }
.ajuda li { margin-bottom: .3rem; }

/* botão de excluir: um x vermelho que se entende de longe */
.btn-x { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem;
  padding: 0; border-radius: 999px; border: 1px solid #f0c8c3; background: #fdeae7; color: #b3261e;
  font-size: .8rem; line-height: 1; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn-x:hover { background: #b3261e; border-color: #b3261e; color: #fff; }
.btn-x:focus-visible { outline: 2px solid #b3261e; outline-offset: 2px; }

/* menuzinho de ações */
.menu-acoes { position: relative; display: inline-block; }
.menu-lista { position: absolute; top: calc(100% + .25rem); left: 0; z-index: 20; min-width: 15rem;
  background: var(--cartao); border: 1px solid var(--borda); border-radius: .5rem; padding: .25rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.14); }
.menu-lista button { display: block; width: 100%; text-align: left; border: 0; background: none; cursor: pointer;
  padding: .45rem .6rem; border-radius: .35rem; font-size: .88rem; color: var(--texto); }
.menu-lista button:hover { background: var(--marca-clara); }
.menu-lista button.perigo { color: #a11f1f; border-top: 1px solid var(--borda); margin-top: .2rem; padding-top: .5rem; }
.menu-lista button.perigo:hover { background: #fbe0dd; }

/* ano letivo */
.etapas-ano { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .6rem; }
.etapa-cartao { background: #fff; border: 1px solid var(--borda); border-radius: .5rem; padding: .6rem .7rem; }
.etapa-cartao.etapa-agora { border-color: var(--marca); box-shadow: inset 3px 0 0 var(--marca); }
.etapa-nome { font-weight: 800; color: var(--marca-escura); margin-bottom: .35rem; }
.etapa-datas { font-weight: 600; }
.etapa-cartao input[type=date] { width: 100%; margin: 0; padding: .2rem .35rem; font-size: .82rem; }
.tabela-ano { width: 100%; }
.tabela-ano .col-data-ano { width: 8rem; }
.tabela-ano .col-nome-ano { text-align: left; }
.tabela-ano .acoes { width: 7.5rem; white-space: nowrap; }
.tabela-ano td { padding: .3rem .5rem; }
.tabela-ano tr.tipo-nacional td { background: #fdeae7 !important; }
.tabela-ano tr.tipo-regional td { background: #fdf6dc !important; }
.tabela-ano tr.tipo-escolar td { background: #e8f0fd !important; }

/* lista de material */
.folha-material .bloco-serie { margin-bottom: 1rem; break-inside: avoid; }
.folha-material .bloco-serie h3 { margin: 0 0 .3rem; font-size: 11pt; color: var(--nivel-forte, var(--marca-escura)); }
/* colunas iguais em todas as séries: larguras fixas, não pelo conteúdo */
.tabela-material { width: 100%; table-layout: fixed; }
.tabela-material .col-mat-nivel { width: 4.5rem; }
.tabela-material .col-mat-livro { text-align: left; overflow-wrap: anywhere; }
.tabela-material .col-mat-isbn { width: 15.5rem; text-align: left; }
.tabela-material .col-mat-quem { width: 10.5rem; white-space: normal; }
.tabela-material thead .col-mat-quem { white-space: normal; line-height: 1.2; }
.tabela-material .acoes, .tabela-material thead th:last-child { width: 2.6rem; }
.tabela-material td { vertical-align: top; }
@media print {
  body.imprimindo-folha .tabela-material .col-mat-nivel { width: 3.2rem; }
  body.imprimindo-folha .tabela-material .col-mat-isbn { width: 10rem; text-align: left; }
  /* no papel, espaçamento 1 e tudo justo: a tela continua folgada */
  body.imprimindo-folha .folha-material,
  body.imprimindo-folha .folha-material table,
  body.imprimindo-folha .folha-material th,
  body.imprimindo-folha .folha-material td { line-height: 1; }
  body.imprimindo-folha .folha-material th, body.imprimindo-folha .folha-material td { padding: 1.8pt 3pt; }
  body.imprimindo-folha .folha-material .bloco-serie { margin-bottom: 5pt; }
  body.imprimindo-folha .folha-material .bloco-serie h3 { font-size: 10pt; margin-bottom: 2pt; }
  body.imprimindo-folha .folha-material .mat-linha { font-size: 9pt; line-height: 1.1; }
}
.mat-livro { font-weight: 600; }
.mat-linha { display: flex; gap: .35rem; align-items: baseline; font-size: 9pt; color: var(--texto-suave); }
.mat-rotulo { flex: 0 0 auto; text-transform: uppercase; font-size: 7.5pt; letter-spacing: .04em; opacity: .8; }
.mat-campo { flex: 1; min-width: 2rem; }
.mat-campo:hover, .mat-livro:hover { outline: 1px dashed var(--marca); outline-offset: 1px; }
.mat-campo.editando, .mat-livro.editando { outline: 2px solid var(--marca); background: #fff; }
.mat-campo.salvou, .mat-livro.salvou { background: #e3f5e6; transition: background .6s; }
.isbn-linha { display: flex; align-items: baseline; gap: .35rem; justify-content: flex-start; }
.isbn-numero { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.isbn-ok { color: #1d6b34; font-weight: 800; }
.isbn-ruim { color: #b3261e; font-weight: 800; }
.erro-isbn { color: #b3261e; }
.btn-loja { display: inline-block; margin-top: .25rem; font-size: 8pt; text-decoration: none;
  color: var(--marca-escura); border: 1px solid var(--borda); border-radius: .3rem; padding: .05rem .4rem; }
.btn-loja:hover { background: var(--marca-clara); border-color: var(--marca); }
.rodape-material { margin-top: .6rem; font-size: 9pt; font-style: italic; color: var(--texto-suave); }

/* conferência no catálogo */
.linha-loja { display: flex; flex-wrap: nowrap; gap: .25rem; margin-top: .3rem; }
.linha-loja .btn-loja { white-space: nowrap; padding: .05rem .3rem; }
.cat-selo { margin-top: .25rem; font-size: 8pt; line-height: 1.3; border-radius: .25rem; padding: .1rem .35rem; }
.cat-ok { background: #e3f5e6; color: #1d6b34; }
.cat-alerta { background: #fdf0d5; color: #8a5a00; }
.cat-neutro { background: #eceef2; color: #55606f; }
button.btn-loja { cursor: pointer; font-family: inherit; }
button.btn-loja:disabled { opacity: .6; cursor: default; }
.lista-candidatos { display: flex; flex-direction: column; gap: .4rem; margin: .5rem 0 .2rem; }
.candidato { display: flex; align-items: center; gap: .8rem; padding: .5rem .7rem; border: 1px solid var(--borda);
  border-radius: .45rem; background: var(--cartao); }
.candidato > div:first-child { flex: 1; min-width: 0; }
.cand-titulo { font-weight: 600; }
@media print { .cat-selo { display: none; } }

/* enturmação */
.tabela-enturmacao { table-layout: fixed; }
.tabela-enturmacao th, .tabela-enturmacao td { text-align: left; vertical-align: middle; }
.tabela-enturmacao th { white-space: normal; letter-spacing: .01em; }
.tabela-enturmacao td .mini { display: block; text-align: left; }
.tabela-enturmacao .col-ent-origem .mini { display: inline; }
.tabela-enturmacao .col-ent-aluno { width: 25%; }
.tabela-enturmacao .col-ent-origem { width: 11%; }
.tabela-enturmacao .col-ent-profo { width: 11%; }
.tabela-enturmacao .col-ent-destino { width: 13%; }
.tabela-enturmacao .col-ent-profd { width: 20%; }
.tabela-enturmacao .col-ent-obs { width: 20%; }
.tabela-enturmacao .col-ent-origem .mini { margin-left: .35rem; }
.tabela-enturmacao select { width: 100%; margin: 0; padding: .12rem .25rem; font-size: .82rem; }
.tabela-enturmacao select.salvou { outline: 2px solid #6bb37e; }
.tabela-enturmacao .sel-nivel { font-weight: 600; }
.tabela-enturmacao tbody tr.mov-subiu > td { background: #eaf2fd; }
.tabela-enturmacao tbody tr.mov-desceu > td { background: #fdf3dd; }
.mov-selo { display: block; font-size: 8pt; font-weight: 700; color: #1e5aa8; }
tr.mov-desceu .mov-selo { color: #8a5a00; }
.cartoes-ent { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .55rem; margin-bottom: .8rem; }
.cartoes-ent .cartao { padding: .45rem .7rem; }
.cartoes-ent .numero { font-size: 1.6rem; }
.cartoes-ent .rotulo { font-size: .78rem; margin-top: .15rem; }
.campo-busca { margin: 0; padding: .3rem .6rem; border: 1px solid var(--borda); border-radius: .4rem;
  font: inherit; font-size: .85rem; min-width: 12rem; }

/* nivelamento da 3ª série */
.cel-nivelamento { display: flex; align-items: center; gap: .2rem; }
.nota-niv { width: 4.2rem; margin: 0; padding: .12rem .3rem; font: inherit; font-size: .82rem;
  border: 1px solid var(--borda); border-radius: .3rem; text-align: right; }
.nota-niv.salvou { outline: 2px solid #6bb37e; }
.por-cento { font-size: .78rem; color: var(--suave); }
.niv-selo { display: inline-block; margin-top: .2rem; font-size: 8pt; font-weight: 700;
  border-radius: .25rem; padding: .05rem .35rem; }
.niv-selo.niv-ok { background: #e3f5e6; color: #1d6b34; }
.niv-selo.niv-cursa { background: #fdf0d5; color: #8a5a00; }
.niv-selo.niv-espera { background: #eceef2; color: #55606f; }
.cartao-nivel.niv-ok .numero { color: #1d6b34; }
.cartao-nivel.niv-cursa .numero { color: #8a5a00; }
.cartao-nivel.niv-espera .numero { color: #55606f; }
.aviso-niv { border-left: 3px solid var(--marca); padding-left: .7rem; }
.corte-campo { margin-left: .5rem; white-space: nowrap; font-weight: 600; }
.corte-campo input { width: 4rem; margin: 0 .2rem 0 .3rem; padding: .1rem .3rem; font: inherit;
  border: 1px solid var(--borda); border-radius: .3rem; }

/* folha da 3ª série */
#folha-niv { display: none; }
.folha-nivelamento .folha-regra { margin: .6rem 0 .8rem; font-size: 10pt; line-height: 1.45; }
.folha-nivelamento .tabela-folha { width: 100%; border-collapse: collapse; font-size: 10pt; }
.folha-nivelamento .tabela-folha th, .folha-nivelamento .tabela-folha td {
  border: 1px solid #b9c0cc; padding: .18rem .4rem; text-align: left; }
.folha-nivelamento .tabela-folha thead th { background: #eef1f6; font-size: 9pt; text-transform: uppercase; }
.folha-nivelamento .col-num { width: 2.2rem; text-align: right; }
.folha-nivelamento .col-ra { width: 7rem; }
.folha-nivelamento .col-turma { width: 5rem; }
.folha-nivelamento .col-nota { width: 6rem; text-align: right; }
.folha-nivelamento .col-prof { width: 10rem; }
@media print {
  body.imprimindo-folha #folha-niv { display: block; }
}

/* filtros da enturmação */
.campo-filtro { margin: 0; padding: .3rem .5rem; border: 1px solid var(--borda); border-radius: .4rem;
  font: inherit; font-size: .85rem; background: var(--cartao); max-width: 12rem; }

/* quadro de montagem */
.quadro-grupos { display: grid; grid-template-columns: repeat(auto-fit, minmax(21rem, 1fr)); gap: .8rem; margin: .8rem 0; }
.quadro-grupo { padding: .7rem .8rem .8rem; }
.quadro-cabeca { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem;
  border-bottom: 2px solid var(--borda); padding-bottom: .3rem; margin-bottom: .4rem; }
.quadro-cabeca h3 { margin: 0; font-size: 1rem; }
.tabela-quadro { width: 100%; border-collapse: collapse; font-size: .85rem; }
.tabela-quadro th, .tabela-quadro td { border-bottom: 1px solid var(--borda); padding: .22rem .4rem; text-align: left; }
.tabela-quadro thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .02em; color: var(--suave); }
.tabela-quadro .num { text-align: right; width: 3.4rem; font-variant-numeric: tabular-nums; }
.tabela-quadro .forte { font-weight: 700; }
.tabela-quadro .col-q-nivel { vertical-align: middle; width: 5.5rem; border-right: 1px solid var(--borda); }
/* uma linha por professor, sem texto empilhado */
.tabela-professores { table-layout: fixed; }
.tabela-professores th, .tabela-professores td { padding: .3rem .5rem; vertical-align: middle; white-space: nowrap; }
.tabela-professores .c-prof { width: 16%; overflow: hidden; text-overflow: ellipsis; }
.tabela-professores .c-tot { width: 5.5rem; }
.tabela-professores .c-mf { width: 5.5rem; }
.tabela-professores .c-barra { width: 9rem; }
.tabela-professores .c-niveis { width: 22%; white-space: normal; }
.tabela-professores .c-grupos { width: auto; white-space: normal; }
.barra-sexo { display: flex; align-items: center; gap: .35rem; }
.barra-sexo i { height: .55rem; display: block; }
.barra-sexo .parte-m { background: #4f7fd4; border-radius: .3rem 0 0 .3rem; }
.barra-sexo .parte-f { background: #e6a4b4; border-radius: 0 .3rem .3rem 0; }
.barra-sexo b { font-size: .72rem; color: var(--suave); font-weight: 600; min-width: 2.2rem; text-align: right; }
/* só no quadro de montagem: o .chip geral é o dos sábados letivos, com o azul
   de quem está logado, e não pode ser sobrescrito aqui */
.tabela-professores .chip { display: inline-block; margin: 0 .2rem .12rem 0; padding: .03rem .38rem;
  border-radius: .25rem; background: var(--fundo); border: 1px solid var(--borda);
  font-size: .74rem; font-variant-numeric: tabular-nums; }
.lista-sugestoes { margin: .3rem 0 0; padding-left: 1.1rem; }
.lista-sugestoes li { margin-bottom: .35rem; line-height: 1.45; }
.lista-sugestoes .sug-sexo { color: #8a5a00; }
.cartao-sugestao { border-left: 3px solid var(--marca); }

.tabela-ano .col-semana-ano { width: 11rem; white-space: nowrap; color: var(--texto-suave); }

.cel-unica { vertical-align: top; background: repeating-linear-gradient(135deg,
  var(--cartao), var(--cartao) 10px, var(--fundo) 10px, var(--fundo) 20px); }
.cel-unica .nivel-codigo.cinza { background: var(--marca-escura); color: #fff; border-radius: .35rem;
  padding: .1rem .5rem; font-size: .78rem; }
.cel-unica .mini { margin-top: .4rem; }

/* relógio da sessão */
.relogio-sessao { font-variant-numeric: tabular-nums; font-weight: 600; font-size: .85rem;
  padding: .1rem .45rem; border-radius: .35rem; background: rgba(255, 255, 255, .18);
  color: #fff; cursor: default; letter-spacing: .02em; }
.relogio-sessao::before { content: "⏱"; margin-right: .25rem; font-weight: 400; }
.relogio-sessao.atencao { background: #fbe6a2; color: #6b4a00; }
.relogio-sessao.acabando { background: #ffd9d6; color: #a11; animation: pisca-sessao 1s steps(2, start) infinite; }
@keyframes pisca-sessao { 50% { opacity: .45; } }
@media print { .relogio-sessao { display: none; } }

/* o nome por extenso do sistema, na entrada e no portal */
.titulo-sistema { font-size: 1.15rem; line-height: 1.3; text-wrap: balance; margin-bottom: .2rem; }
.cartao-login .titulo-sistema { font-size: 1.05rem; }

/* aviso de tela vazia: alinhado com o resto da página, não centralizado */
.vazio-tela { margin: .6rem 0; padding: .7rem .9rem; border: 1px dashed var(--borda);
  border-radius: .45rem; background: var(--cartao); }

/* histórico de alterações */
.dia-hist { margin-bottom: 1rem; }
.dia-hist h3 { margin: 0 0 .35rem; font-size: .95rem; }
.tabela-historico { table-layout: fixed; }
.tabela-historico th, .tabela-historico td { text-align: left; vertical-align: top; padding: .25rem .5rem; }
.tabela-historico .col-h-hora { width: 4rem; font-variant-numeric: tabular-nums; color: var(--texto-suave); }
.tabela-historico .col-h-quem { width: 8rem; }
.tabela-historico .col-h-alvo { width: 22%; }
.tabela-historico .col-h-oque { width: auto; white-space: normal; word-break: break-word; }
.tabela-historico .seta { color: var(--texto-suave); margin: 0 .15rem; }
.vazio-hist { color: var(--texto-suave); font-style: italic; }

/* instalar como app */
.btn-instalar { margin-top: .9rem; background: transparent; border: 1px dashed var(--marca);
  color: var(--marca); font-weight: 600; }
.btn-instalar:hover { background: var(--marca-clara); border-style: solid; }
.btn-instalar::before { content: "⬇"; margin-right: .4rem; }
.modal-instalar { max-width: 30rem; }
.passos-instalar { margin: .6rem 0 .2rem; padding-left: 1.3rem; line-height: 1.55; }
.passos-instalar li { margin-bottom: .45rem; }

/* modal */
.modal-fundo { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-start; justify-content: center; padding: 3vh 1rem; z-index: 50; overflow-y: auto; }
.modal { background: var(--cartao); border-radius: 14px; width: min(760px, 100%); padding: 1.25rem 1.4rem; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modal h2 { display: flex; align-items: center; gap: .5rem; }
.modal .fechar { margin-left: auto; border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: var(--texto-suave); }
.duas { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
/* formulários do modal: rótulo em cima, campo do mesmo tamanho, tudo alinhado */
.modal form label { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .85rem; font-weight: 500; }
.modal form label input, .modal form label select, .modal form label textarea { width: 100%; margin: 0; }
.modal form label.check { flex-direction: row; align-items: center; gap: .45rem; }
.modal form .duas, .modal form .tres { align-items: end; }
.modal form .nota-tela { margin-top: -.2rem; }
.modal form .mini { margin: -.55rem 0 .9rem; }
.rodape-modal { display: flex; gap: .5rem; justify-content: flex-end; margin-top: .5rem; }
.historico { max-height: 260px; overflow-y: auto; font-size: .82rem; border-top: 1px solid var(--borda); margin-top: .5rem; padding-top: .5rem; }
.historico div { padding: .3rem 0; border-bottom: 1px dashed var(--borda); }

/* rodapé */
.rodape { display: flex; align-items: center; padding: .6rem 1.5rem; border-top: 1px solid var(--borda); background: var(--cartao); color: var(--texto-suave); font-size: .78rem; }
.rodape-login { position: fixed; left: 0; bottom: 0; width: 100%; background: transparent; border-top: 0; color: rgba(255,255,255,.85); }
.corpo { min-height: calc(100vh - 62px - 33px); }

/* primeiro acesso: só a criação de senha */
body.so-senha .lateral, body.so-senha .btn-menu { display: none; }
.cartao-senha { max-width: 460px; margin: 2rem auto; }
.cartao-senha h1 { margin-bottom: .4rem; }

/* toast */
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: #1f2a26; color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 60; box-shadow: var(--sombra); }
.toast.erro { background: var(--vermelho); }

/* barras simples */
.barra { display: flex; align-items: center; gap: .5rem; font-size: .85rem; margin: .25rem 0; color: inherit; text-decoration: none; border-radius: 6px; padding: .1rem .3rem; }
.barra:hover { background: var(--marca-clara); }
.barra span:first-child { flex: 0 0 230px; color: var(--texto-suave); white-space: normal; line-height: 1.15; }
.barra .trilho { flex: 1; min-width: 40px; }
.barra i { display: block; height: 10px; background: var(--marca); border-radius: 5px; min-width: 2px; }
.barra b { min-width: 3ch; text-align: right; }
.btn-filtros { display: none; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .lateral { width: 190px; }
  .conteudo { padding: 1rem; }
  .tabela-edicao textarea { min-width: 180px; }
  .tabela-edicao select { min-width: 120px; }
  .marca span { display: none; }
}
/* ---------- celular ---------- */
@media (max-width: 800px) {
  .btn-menu { display: block; }
  .topo { gap: .6rem; padding: 0 .7rem; }
  .topo .logo { height: 30px; }
  /* no celular a barra fica escondida: aparece só ao tocar no ☰ */
  .lateral { position: fixed; top: 62px; left: 0; bottom: 0; width: 232px; z-index: 30;
    transform: translateX(-100%); transition: transform .18s ease; overflow-y: auto; padding: 1rem .6rem; }
  .lateral.aberta { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.35); }
  .conteudo { padding: .8rem; }
  .filtro-anos { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .filtro-anos::-webkit-scrollbar { display: none; }
  .filtro-anos .btn { flex: 0 0 auto; }
  .filtro-anos .espaco, .filtro-anos .mini:last-child { display: none; }
  .duas { grid-template-columns: 1fr; }
  #topo-nome, #topo-papel { display: none; }
  .cartoes { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; }
  .cartao { padding: .8rem .9rem; }
  .numero { font-size: 1.6rem; }
  .filtros { grid-template-columns: 1fr 1fr; }
  .modal { padding: 1rem; }
  .barra span:first-child { flex-basis: 120px; white-space: normal; line-height: 1.15; }
  .btn-filtros { display: inline-flex; margin-bottom: .5rem; }
  .filtros { display: none; }
  .filtros.aberto { display: grid; }
  /* tabela de edição vira cartões: um aluno por bloco, cada campo com seu rótulo */
  .tabela-edicao thead { display: none; }
  .tabela-edicao, .tabela-edicao tbody { display: block; }
  .tabela-edicao tr { display: block; padding: .5rem .6rem .3rem; border-top: 4px solid var(--borda); }
  .tabela-edicao td { display: block; border: 0; padding: .15rem 0 .35rem; }
  .tabela-edicao td.so-pc { display: none; }
  .tabela-edicao td[data-r]::before { content: attr(data-r); display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-suave); margin-bottom: .1rem; }
  .tabela-edicao tr.saiu td[data-r]::before { color: rgba(255,255,255,.8); }
  .tabela-edicao td.cel-nome .nome { font-size: 1rem; }
  .tabela-edicao td.centro { text-align: left; }
  .tabela-edicao select, .tabela-edicao textarea { width: 100%; min-width: 0; }
  .tabela-edicao td.estado { padding: 0; min-height: 1em; }
  .tabela-rolagem { border-radius: 8px; }
}
/* tablet em pé (600–800px): cartão com dois campos por linha */
@media (min-width: 600px) and (max-width: 800px) {
  .tabela-edicao tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 .8rem; align-items: start; }
  .tabela-edicao td.cel-nome, .tabela-edicao td[data-r^="Obs"], .tabela-edicao td.estado { grid-column: 1 / -1; }
  .tabela-edicao td[data-r="RA"], .tabela-edicao td.centro { grid-column: 1 / -1; padding-bottom: 0; }
}
/* ---------- celular pequeno ---------- */
@media (max-width: 400px) {
  .marca { font-size: .95rem; }
  .filtros { grid-template-columns: 1fr; }
  .linha .btn { padding: .4rem .6rem; font-size: .85rem; }
}
@media print {
  .topo, .lateral, .btn, .filtros, .toast { display: none !important; }
  .conteudo { padding: 0; }
  .tabela-edicao textarea, .tabela-edicao select { border: 0; }
}

/* ---------- faixa do conselho ----------
   A tira de controle da reunião: onde estou na fila da turma de origem e
   quanto falta dela. Fica no topo da tela da turma porque é o que se olha
   entre um aluno e o próximo.

   Reaproveita .cartao e .linha (que já é flex com wrap, então no celular o
   progresso desce para a própria linha sozinho); daqui só sai o destaque
   visual e o aperto do espaçamento, para a faixa não roubar a altura que a
   tabela precisa. */
.cartao-conselho {
  background: var(--marca-clara);
  border-color: var(--marca);
  padding: .6rem .8rem;
  margin-bottom: .6rem;
}
.faixa-conselho { gap: .5rem; row-gap: .35rem; }
.faixa-conselho .mini { color: var(--texto); }
.faixa-conselho .mini b { color: var(--marca-escura); }
/* o andador é o par de botões: no celular eles ficam lado a lado e o texto
   da posição entre os dois, sem quebrar no meio */
.faixa-conselho #posicao-fila { white-space: nowrap; }
@media (max-width: 520px) {
  .faixa-conselho { justify-content: space-between; }
  .faixa-conselho #progresso-origem { flex-basis: 100%; }
}
