/* Folhas A4 dos documentos (tela e impressão). */
.folha { background: #fff; color: #111; width: 210mm; min-height: 297mm; padding: 18mm 20mm 16mm; font: 12pt/1.6 "Times New Roman", Georgia, serif; position: relative; }
.folha.paisagem { width: 297mm; min-height: 210mm; padding: 10mm 12mm; font-size: 9pt; line-height: 1.35; }
.cab-escola { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid #2b3192; padding-bottom: 8px; margin-bottom: 18px; font-family: Arial, sans-serif; font-size: 9pt; line-height: 1.35; }
.cab-escola img { height: 60px; }
.paisagem .cab-escola img { height: 42px; }
.cab-escola p { margin: 0; }
.cab-escola .nome-escola { font-size: 14pt; font-weight: 700; color: #2b3192; }
.titulo-doc { text-align: center; font-size: 15pt; letter-spacing: .5px; margin: 24px 0 28px; }
.paisagem .titulo-doc { font-size: 12pt; margin: 4px 0 8px; }
.texto { text-align: justify; text-indent: 3em; margin: 0 0 14px; }
.caixas { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 8px 0 16px; }
.local-data { text-align: right; margin: 36px 0 56px; }
.assinatura { text-align: center; margin: 0 auto; width: 70%; }
.assinatura .linha { display: block; border-top: 1px solid #111; margin-bottom: 4px; }
.assinatura p { margin: 0; line-height: 1.3; }
.autenticidade { position: absolute; left: 20mm; right: 20mm; bottom: 8mm; font: 7.5pt/1.3 Arial, sans-serif; color: #555; text-align: center; }
.paisagem .autenticidade { left: 12mm; right: 12mm; bottom: 5mm; }
.subtitulo { font-family: Arial, sans-serif; font-weight: 600; margin: 0 0 8px; }

.folha table { border-collapse: collapse; width: 100%; font-family: Arial, sans-serif; }
.folha .grade th, .folha .grade td { border: 1px solid #555; padding: 3px 6px; font-size: 10pt; }
.folha .grade td.n, .folha .grade td.c { text-align: center; width: 1%; white-space: nowrap; }
.folha .grade td.assin { width: 40%; }
.folha .grade.notas td, .folha .grade.notas th { text-align: center; font-size: 9pt; }
.folha .grade.notas td.nome { text-align: left; }
.cab-avaliacao th, .cab-avaliacao td { border: 1px solid #555; padding: 3px 6px; font-size: 10pt; text-align: left; }
.cab-avaliacao th { background: #f0f0f0; width: 18%; }
.rodape-avaliacao { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin-top: 24px; font-family: Arial, sans-serif; font-size: 10pt; }

.cab-boletim td { border: 1px solid #555; padding: 3px 6px; }
.cab-boletim .situacao span { margin-right: 16px; }
.cab-boletim .situacao .marcado { font-weight: 700; }
table.boletim { margin-top: 6px; }
.boletim th, .boletim td { border: 1px solid #777; padding: 2px 3px; text-align: center; font-size: 8pt; }
.boletim thead th { background: #e8e9f3; }
.boletim th.disc { text-align: left; white-space: nowrap; background: #f5f5f5; }
.boletim td.na { background: #eee; }
.boletim td.forte { font-weight: 700; }
.boletim .baixa { color: #c00; }
.rodape-boletim { display: grid; grid-template-columns: 1fr 320px; gap: 12px; margin-top: 8px; font-family: Arial, sans-serif; }
.rodape-boletim p { margin: 0 0 4px; }
.legenda { font-size: 7pt; color: #333; }
.grafico { width: 100%; font: 7pt Arial, sans-serif; }
.grafico .ma, .leg-grafico .ma { fill: #2b3192; background: #2b3192; }
.grafico .mt, .leg-grafico .mt { fill: #f9ac14; background: #f9ac14; }
.leg-grafico { font-size: 8pt; margin: 0; }
.leg-grafico span { display: inline-block; width: 10px; height: 10px; vertical-align: middle; margin: 0 2px 0 8px; }
.ficha { display: flex; gap: 12px; margin-bottom: 8px; }
.ficha .foto { width: 30mm; height: 38mm; object-fit: cover; border: 1px solid #777; flex: none; display: grid; place-items: center; color: #999; }
.ficha .dados th { text-align: left; width: 22%; background: #f5f5f5; }
.ficha .dados th, .ficha .dados td { border: 1px solid #aaa; padding: 2px 6px; }

/* imprimir as cores de fundo (trimestres, cabeçalhos) como aparecem na tela */
.folha, .folha * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
@media print {
  @page { size: A4; margin: 0; }
  .folha { box-shadow: none !important; margin: 0 !important; page-break-after: always; break-after: page; }
  .folha:last-child { page-break-after: auto; break-after: auto; }
  .folha.paisagem { page: paisagem; }
  @page paisagem { size: A4 landscape; }
}

/* Cartões-resposta: uma página A4 por aluno, sem margem (as medidas do SVG são em mm) */
.pagina-cartao svg { display: block; width: 210mm; height: 297mm; }
@media print {
  .pagina-cartao { page-break-after: always; break-after: page; }
}

/* ---- Boletim igual à planilha da escola (boletim-planilha.js) ----
   Medidas em pt como na planilha; em A4 deitado a tabela ocupa a largura da folha. */
.doc-boletim.folha.paisagem { box-sizing: border-box; height: 210mm; padding: 6mm; display: flex; flex-direction: column; justify-content: center; } /* boletim ocupando a folha: 6 mm de margem (área segura das impressoras, que não imprimem nos 3 a 5 mm da borda) */
.doc-boletim.folha.paisagem .autenticidade { display: none; } /* o boletim não imprime a linha do código de autenticidade (pedido do professor, 09/11): mais espaço para o boletim */
/* a tabela é montada com 1024 px de largura; o zoom faz cada modelo ocupar a maior área possível
   dentro da margem (o fundamental cresce na largura; o médio, mais alto, é limitado pela altura) */
.folha table.bol.bol-EF { zoom: 1.05; }
.folha table.bol.bol-EM12 { zoom: 0.955; }
.folha table.bol.bol-EM3 { zoom: 0.99; }
.folha table.bol { table-layout: fixed; width: 1024px; margin: 0 auto; border-collapse: collapse; font-family: Calibri, Carlito, "Segoe UI", Arial, sans-serif; color: #000; line-height: 1.05; border: 0; } /* a moldura grossa é feita célula a célula (.be .bd .bt .bx) */
.bol .be { border-left: 2px solid #000 !important; }
.bol .bd { border-right: 2px solid #000 !important; }
.bol .bt { border-top: 2px solid #000 !important; }
.bol .bx { border-bottom: 2px solid #000 !important; }
.bol td.fora { border: 0 !important; }
.bol td { padding: 0 1px; text-align: center; vertical-align: middle; overflow: hidden; white-space: nowrap; }
/* cabeçalho */
.bol tr.h1, .bol tr.h2, .bol tr.h3, .bol tr.h4 { height: 9.75pt; }
.bol tr.h5, .bol tr.h6 { height: 10.5pt; }
.bol tr.h7 { height: 26.25pt; }
.bol .cab-logo, .bol .cab-nomeescola, .bol .cab-bol, .bol .cab-ano, .bol .cab-rot, .bol .cab-aluno, .bol .cab-seg, .bol .cab-turma { border: 0; } /* sem as linhas cinza de grade do Google Sheets: só as linhas pretas */
.bol .cab-logo { border-bottom: 1px solid #000; text-align: center; }
.bol .bol-logo { height: 52pt; width: auto; display: block; margin: 0 auto; }
.bol .cab-nomeescola { font-size: 26pt; color: #002060; vertical-align: bottom; border-top: 0; }
.bol .cab-bol { font-size: 18pt; font-weight: 700; color: #002060; text-align: right; padding-right: 4pt; }
.bol .cab-ano { font-size: 18pt; font-weight: 700; color: #002060; text-align: left; }
.bol .bb { border-bottom: 1px solid #000 !important; }
.bol .bl { border-left: 1px solid #000 !important; }
.bol .cab-chk { text-align: right; padding-right: 2pt; border-top: 0; }
.bol .cab-sit { font-size: 12pt; font-weight: 700; color: #002060; text-align: left; border-right: 1px solid #000; }
.bol .bol-caixa { display: inline-block; width: 9pt; height: 9pt; border: 1.5px solid #002060; border-radius: 2px; vertical-align: middle; font-size: 8pt; line-height: 8pt; color: #002060; font-weight: 700; text-align: center; }
.bol .cab-foto { font-size: 14pt; color: #002060; border-left: 1px solid #000; border-bottom: 1px solid #000; }
.bol .cab-foto { padding: 0; }
.bol .cab-foto img { width: 100%; height: 85pt; object-fit: cover; object-position: center top; display: block; } /* o quadro já é 3x4; foto de outro formato é cortada nas laterais */
.bol .cab-aluno { font-size: 18pt; font-weight: 700; color: #0070c0; border-bottom: 1px solid #000; }
.bol .cab-rot { border-bottom: 1px solid #000; font-size: 18pt; font-weight: 700; color: #0070c0; text-align: left; padding-left: 4pt; }
.bol .cab-seg { font-size: 18pt; color: #0070c0; text-align: right; border-bottom: 1px solid #000; }
.bol .cab-turma { font-size: 18pt; color: #0070c0; text-align: left; padding-left: 5pt; border-bottom: 1px solid #000; }
/* grade de notas */
.bol tr.lin { height: 13.5pt; }
.bol tr.lin td { border: 1px solid #000; }
.bol .t1 { background: #dfe7f5; }
.bol .t2 { background: #fff2cc; }
.bol .t3 { background: #e7ffe7; }
/* "linha dupla" = coluna/linha estreita entre os blocos, com a cor do bloco (td.g e tr.gut), como na planilha */
.bol tr td.g { border-top: 0; border-bottom: 0; padding: 0; } /* fica com a cor do bloco à direita (t1/t2/t3) */
.bol tr.gut { height: 1.5pt; }
.bol tr.gut td { border-top: 0; border-bottom: 0; padding: 0; font-size: 0; line-height: 0; }
.bol .tit-disc { font-size: 11pt; font-weight: 700; }
.bol .tit-tri { font-size: 11pt; font-weight: 700; }
.bol .tit-col { font-size: 9pt; font-weight: 700; }
.bol .tit-fin { font-size: 9pt; font-weight: 700; }
.bol .verde { color: #00b050; }
.bol td.disc { font-size: 11pt; font-weight: 700; text-align: left; padding: 0.12em 0 0 2pt; vertical-align: middle; line-height: 1; }
.bol.bol-EM3 td.disc { font-size: 8.5pt; white-space: nowrap; line-height: 1; }
.bol.bol-EM3 td.v { font-size: 11pt; }
.bol.bol-EM3 .leg-l { font-size: 6.4pt; }
.bol td.v { font-size: 12pt; color: #000099; vertical-align: middle; line-height: 1; padding: 0.12em 1px 0; } /* número no meio da célula (o padding compensa o espaço das letras que descem abaixo da linha) */
.bol td.mg { vertical-align: middle; }
.bol td.v.verde { color: #00b050; }
.bol td.v.baixa, .bol td.v.verde.baixa { color: #f00; }
.bol td.mg { font-size: 12pt; }
.bol td.rot-vert { width: auto; padding: 0; font-size: 7pt; font-weight: 700; border-left: 1px solid #000; }
.bol td.rot-vert span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.bol tr.lin td.rot-vazio { border-top: 0; border-bottom: 0; border-left: 0; }
/* faltas */
.bol tr.esp { height: 5.25pt; }
.bol tr.esp td { border: 0; padding: 0; background: #fff; } /* espaço em branco: notas, faltas e legenda ficam em caixas separadas */
/* só são grossas as bordas de fora (moldura), o fim das notas e a caixa das faltas (em cima e embaixo); as outras linhas, inclusive as duplas, têm a mesma espessura */
.bol tr.fecha td:not(.g) { border-bottom: 2px solid #000; }

.bol tr.faltas { height: 22.5pt; }
.bol tr.faltas td { font-size: 10pt; border: 1px solid #000; }
.bol tr.faltas td:not(.g) { border-top-width: 2px; border-bottom-width: 2px; }
.bol tr.faltas td.g { border-top: 0; border-bottom: 0; border-left: 0; border-right: 0; }
.bol tr.faltas td.f-txt, .bol tr.faltas td.f-tot { border-right: 0; }
.bol tr.faltas td.f-num, .bol tr.faltas td.f-tot + td.f-tot { border-left: 0; }
.bol .f-rot { font-weight: 700; text-align: left; padding-left: 2pt; }
.bol .f-txt { text-align: left; padding-left: 3pt; }
.bol .f-tot { font-weight: 700; text-align: left; padding-left: 3pt; }
.bol .f-totnum { font-weight: 700; }
/* legenda e gráficos */
.bol tr.leg-tit { height: 15pt; }
.bol tr.leg-tit td.graf-cab { border-bottom: 1px solid #000; }
.bol .leg-cab { font-family: "Arial Narrow", "Liberation Sans Narrow", Arial, sans-serif; font-size: 10pt; font-weight: 700; }
.bol .graf-cab { font-size: 9pt; font-weight: 700; border-left: 1px solid #000; }
.bol tr.leg { height: 9.75pt; }
.bol .leg-l { font-family: "Arial Narrow", "Liberation Sans Narrow", Arial, sans-serif; font-size: 8pt; text-align: left; padding-left: 2pt; border-right: 1px solid #000; }
.bol .leg-l .l1 { display: inline-block; min-width: 58%; }
.bol .leg-l .az { color: #0070c0; }
.bol .graf-tri { font-size: 9pt; border-left: 1px solid #000; }
.bol td.graf { border-left: 1px solid #000; padding: 0 4pt; vertical-align: bottom; }
.bol .bol-graf { width: 100%; height: auto; display: block; font: 7pt Calibri, Carlito, Arial, sans-serif; }
.bol .bol-graf .ma { fill: #4472c4; }
.bol .bol-graf .mt { fill: #ffff00; } /* amarelo das planilhas da escola */
.bol .bol-graf .eixo { stroke: #d9d9d9; stroke-width: .6; }
.bol tr.leg.ult td { border-bottom: 0; }
.bol .em-baixo { vertical-align: bottom; padding-bottom: 1pt; }
.bol .em-cima { vertical-align: top; padding-top: 1pt; }
/* linha preta inteira entre o nome da escola / ano letivo e a caixa APROVADO/REPROVADO */
.bol .cab-nomeescola, .bol .cab-ano { border-right: 1px solid #000 !important; }

/* ---- Folha de frequência de avaliação (folha-avaliacao.js), igual ao PDF salvo do Word (medido 22/11) ---- */
/* Word: margens 1 cm; tabelas de 190 mm com colunas fixas; bordas de 0,5 pt; Arial 12 no cabeçalho; Arial Narrow 12 na lista */
.doc-folhaAvaliacao.folha { padding: 10mm 0 0 9.91mm; font-family: Arial, Arimo, "Liberation Sans", sans-serif; line-height: 1.15; }
.doc-folhaAvaliacao table { table-layout: fixed; border-collapse: collapse; width: 190.07mm; font-family: Arial, Arimo, "Liberation Sans", sans-serif; color: #000; }
.fa-cab td { border: .5pt solid #000; padding: 0 1.9mm; text-align: center; vertical-align: middle; overflow: hidden; font-size: 12pt; line-height: 1.15; }
.fa-cab .cinza { background: #d9d9d9; }
/* alturas medidas no PDF (de borda a borda): 7,58 / 1,82 / 4,95 / 4,88 / 4,87 / 4,66 / 4,66 / 4,66 / 4,66 mm */
.fa-cab tr.r1 { height: 7.45mm; } .fa-cab tr.r2 { height: 1.82mm; } .fa-cab tr.r3 { height: 4.85mm; } .fa-cab tr.r4 { height: 4.8mm; } .fa-cab tr.r5 { height: 4.8mm; }
.fa-cab tr.r6, .fa-cab tr.r7 { height: 4.66mm; } .fa-cab tr.r8, .fa-cab tr.r9 { height: 4.66mm; } /* valores do navegador ajustados até as linhas caírem no lugar do PDF */
.fa-cab tr > td { box-sizing: border-box; }
.fa-cab .fa-logo { padding: 0; vertical-align: top; position: relative; }
.fa-cab .fa-logo img { position: absolute; left: 1.98mm; top: 6.31mm; width: 41.24mm; height: 20.99mm; display: block; }
.fa-cab .fa-titulo { font-size: 18pt; font-weight: 700; white-space: nowrap; }
/* faixa vazia sob o título: no Word só tem as linhas dos lados (a da logo e a da direita) */
.fa-cab .fa-vao { border-bottom: 0; background: #fff; font-size: 4pt; line-height: 1; }
/* coluna estreita entre os dados e o quadro dos tipos: sem linha em cima e embaixo (as dos lados são das células vizinhas) */
.fa-cab .fa-meio { border-top: 0; border-bottom: 0; background: #fff; }
.fa-cab .fa-val { color: #0070c0; }
.fa-cab .fa-disc, .fa-cab .fa-prof { font-size: 14pt; white-space: normal; }
.fa-cab .fa-tipocab { font-size: 10pt; font-weight: 700; white-space: nowrap; }
.fa-cab .fa-tipo { font-size: 10pt; text-align: left; white-space: nowrap; }
.fa-cab .fa-tipo.marcado { color: #f00; font-weight: 700; }
.fa-cab .fa-x { color: #0070c0; font-weight: 700; font-size: 11pt; padding: 0; }
.doc-folhaAvaliacao .fa-entre { margin: 0; height: 3.37mm; }
.fa-lista th, .fa-lista td { border: .5pt solid #000; padding: 0 1.23mm; line-height: 4.4mm; box-sizing: border-box; font-family: "Arial Narrow", "Liberation Sans Narrow", Arial, sans-serif; }
.fa-lista th { background: #dbe5f1; border-bottom: 1.5pt solid #000; font-size: 12pt; font-weight: 700; height: 5.1mm; white-space: nowrap; }
.fa-lista th.fa-aluno { background: #deeaf6; }
.fa-lista th.fa-nota { font-size: 11pt; }
.fa-lista td { height: 5.04mm; font-size: 12pt; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.fa-lista tr.am td { background: #ffffcc; }
.fa-lista tr.az td { background: #deeaf6; }
.fa-lista td.fa-n { font-weight: 700; text-align: center; padding: 0; }
.fa-rodape { font-family: "Arial Narrow", "Liberation Sans Narrow", Arial, sans-serif; font-size: 10pt; line-height: 4.06mm; white-space: pre; width: 190mm; overflow: hidden; }
.fa-rodape p { margin: 0; }
.fa-rodape .fa-vazio { height: 3.3mm; }
.fa-rodape .fa-rot-ass { font-weight: 700; font-style: italic; }

/* ---- Histórico escolar (historico.js), igual ao modelo em Word ---- */
.doc-historico.folha { padding: 10mm 12mm 8mm; font-family: Arial, "Liberation Sans", sans-serif; line-height: 1.15; color: #000; }
.hi table { table-layout: fixed; border-collapse: collapse; width: 100%; font-family: Arial, "Liberation Sans", sans-serif; }
.hi td, .hi th { border: 1px solid #000; padding: 0 4px; font-size: 9pt; font-weight: 400; text-align: left; vertical-align: middle; overflow: hidden; white-space: nowrap; }
.hi .hi-v { color: #0000ff; }
.hi-topo { display: grid; grid-template-columns: 38mm 1fr; align-items: center; gap: 6mm; padding: 0 4mm; }
.hi-topo img { width: 34mm; height: auto; }
.hi-topo p { margin: 0; font-size: 10pt; line-height: 1.2; }
.hi-topo .hi-razao { font-size: 12.5pt; font-weight: 700; }
.hi-titulo { text-align: center; font-size: 13pt; font-weight: 700; margin: 1mm 0 1mm 30mm; letter-spacing: 1px; }
.hi-id th { background: #d9d9d9; font-size: 9.5pt; }
.hi-id th.c { text-align: center; }
.hi-id td .hi-v { font-weight: 700; font-size: 9.5pt; }
.hi-seg { text-align: center; font-size: 12pt; font-weight: 700; margin: .6mm 0 0; }
.hi-grade tr.hi-cabgrade th { background: #d9d9d9; font-weight: 700; text-align: center; font-size: 9.5pt; white-space: normal; line-height: 1.1; height: 8mm; border-bottom: 2px solid #000; }
.hi-EM .hi-grade tr.hi-cabgrade th:first-child { font-size: 11pt; }
.hi .hi-faixa th { background: #d9d9d9; text-align: center; font-weight: 700; font-size: 9pt; height: 4.2mm; }
.hi .hi-faixa.leve th { font-weight: 400; }
.hi .hi-faixa.esq th { text-align: left; }
.hi tr.hi-lin td { height: 4.15mm; }
.hi td.hi-nota { text-align: center; }
.hi th.hi-rotv { background: #d9d9d9; text-align: center; padding: 0; }
.hi th.hi-rotv span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 700; font-size: 9pt; white-space: nowrap; }
.hi-estab { margin-top: 2mm; }
.hi-estab th, .hi-estab td { height: 4.15mm; }
.hi-estab tr.hi-estcab th { font-weight: 700; text-align: center; }
.hi-estab tr th { text-align: center; font-weight: 700; }
.hi-estab td.c { text-align: center; }
.hi-estab td.hi-obs { font-size: 9.5pt; white-space: normal; }
.hi-estab .hi-v.peq { font-size: 7.5pt; font-weight: 700; }
.hi-cert td { white-space: normal; font-size: 9pt; text-align: justify; line-height: 1.3; }
.hi-rasura { font-size: 7pt; margin: .5mm 0 0; }
.hi-data { text-align: right; font-size: 10pt; margin: 3mm 0 0; }
.hi-assin { display: flex; justify-content: space-between; margin-top: 12mm; }
.hi-assin span { width: 60mm; border-top: 1px solid #000; }
.hi .hi-titulo, .hi .hi-seg { font-family: Arial, "Liberation Sans", sans-serif; font-weight: 700; color: #000; }
.hi .hi-titulo { font-size: 14pt; letter-spacing: 1.5px; }
.hi-id tr { height: 5.2mm; }
.hi-id th, .hi-id td .hi-v { font-size: 10pt; }
/* títulos, faltas e cabeçalhos da legenda: texto centralizado de verdade na altura da célula
   (compensa o espaço que a fonte reserva embaixo para as letras que descem abaixo da linha) */
.bol .tit-disc, .bol .tit-tri, .bol .tit-col, .bol .tit-fin, .bol tr.faltas td, .bol .leg-cab, .bol .graf-cab, .bol .graf-tri { line-height: 1; padding-top: 0.12em; vertical-align: middle; }

/* Diário de classe (registro de aulas), igual ao Word "DIÁRIO DIGITAL GBA" */
.folha.diario-classe { box-sizing: border-box; width: 297mm; height: 210mm; overflow: hidden; padding: 10mm 14.4mm 5mm 15mm; font: 11pt/1.25 Arial, Helvetica, sans-serif; color: #000; } /* margens do Word: 25 mm com as tabelas recuadas 10 mm (tblInd -567) = 15 mm */
.diario-classe .dc-val { color: #0070c0; font-weight: 400; }
.diario-classe table { width: 100%; border-collapse: collapse; table-layout: fixed; font-family: Arial, Helvetica, sans-serif; }
.dc-cab td { padding: 0 2px; vertical-align: middle; }
.dc-cab .dc-logo { text-align: center; }
.dc-cab .dc-logo img { width: 100%; max-height: 30mm; object-fit: contain; }
.dc-cab .dc-escola { text-align: center; font-size: 16pt; font-weight: 700; color: #002060; padding-top: 3mm; }
.dc-cab .dc-soc { text-align: center; font-size: 11pt; }
.dc-cab .dc-titulo { text-align: center; font-weight: 700; color: #0070c0; padding: 2mm 0 1.5mm; }
.dc-cab .dc-rot { font-size: 11pt; white-space: nowrap; overflow: hidden; }
.dc-cab .dc-pag { font-size: 10pt; }
.dc-cab .dc-esp { margin-left: 5mm; }
.dc-lista { margin-top: 2mm; }
.dc-lista th { font-size: 10pt; font-weight: 700; padding: 1mm 2px; height: 8mm; vertical-align: middle; text-align: center; line-height: 1.05; }
.dc-lista th.dc-caixa { border: 1px solid #555; }
.dc-lista th .dc-normal { font-weight: 400; }
.dc-lista th:last-child { font-size: 11pt; }
.dc-lista td { height: 5.6mm; padding: 0 3px; font-size: 10.5pt; vertical-align: middle; overflow: hidden; }
.dc-lista td.dc-data { padding-left: 2mm; white-space: nowrap; }
.dc-lista td.dc-n { text-align: center; }
.dc-lista td.dc-cont { line-height: 1.15; }
.dc-rodape { margin-top: 2mm; }
.dc-rodape td { text-align: center; font-size: 10.5pt; vertical-align: middle; line-height: 1.2; }
.dc-rodape td.dc-prof { text-align: left; padding-left: 6mm; }
.dc-assin { display: flex; justify-content: space-between; gap: 12mm; margin-top: 9mm; padding: 0 4mm; font-size: 11pt; }
.dc-assin span { flex: 1; text-align: center; }
.dc-assin i { display: block; border-top: 1px solid #555; margin-bottom: 1mm; }

/* Ficha individual (modelo Word "Ficha Individual – Ano Letivo 2026") */
.doc-ficha.folha.paisagem { box-sizing: border-box; height: 210mm; padding: 7mm 8mm; line-height: 1.1; }
.fi { font-family: Calibri, Carlito, Arial, sans-serif; color: #000; font-size: 7.6pt; }
.fi table { border-collapse: collapse; width: 100%; }
.fi td, .fi th { border: 1px solid #000; padding: 0 2px; height: 4.4mm; }
.fi-topo td { border: 1px solid #000; }
.fi-logo { text-align: center; height: 15mm !important; }
.fi-logo img { max-height: 13mm; max-width: 100%; }
.fi-titulo { color: #ffc000; font-weight: 700; font-size: 20pt; text-align: center; border-left: 0 !important; }
.fi-foto { text-align: center; font-weight: 700; padding: 0 !important; }
.fi-foto img { width: 24mm; height: 30mm; object-fit: cover; display: block; margin: auto; }
.fi-linha-aluno { padding: 0 !important; }
.fi-linha-aluno table td, .fi-linha-aluno table th { border: 0; border-right: 1px solid #000; height: 6.5mm; }
.fi-linha-aluno table th { background: #d9d9d9; font-weight: 700; padding: 0 3px; white-space: nowrap; }
.fi-linha-aluno .fi-nome { width: 40%; font-weight: 700; font-size: 9pt; }
.fi-num, .fi-turma, .fi-nasc { text-align: center; color: #0000ff; font-weight: 700; white-space: nowrap; }
.fi-sit { border-right: 0 !important; font-size: 6.5pt; font-weight: 700; white-space: nowrap; }
.fi-sit span { display: flex; align-items: center; gap: 2px; }
.fi-sit i, .fi-ef i { display: inline-block; width: 3mm; height: 3mm; border: 1px solid #000; font-style: normal; text-align: center; line-height: 3mm; }
.fi-grade { margin-top: 1.2mm; table-layout: fixed; }
.fi-grade th { font-weight: 700; text-align: center; font-size: 7pt; }
.fi-grade td { text-align: center; }
.fi-grade td.fi-disc { text-align: left; font-weight: 700; white-space: nowrap; overflow: hidden; font-size: 6.8pt; text-overflow: ellipsis; }
.fi-grade .fi-lado { width: 4mm; padding: 0; vertical-align: middle; }
.fi-grade .fi-lado span { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 700; font-size: 6pt; white-space: nowrap; display: block; margin: auto; }
.fi-grade .fi-lado-cab { font-size: 7.5pt; }
.fi-t1 { background: #dae3f3; }
.fi-t2 { background: #fff2cc; }
.fi-t3 { background: #e2f0d9; }
.fi-tri { font-size: 7.5pt; }
.fi .fi-mdt { color: #00b050; font-weight: 700; }
.fi-mg { font-weight: 700; vertical-align: middle; }
.fi-cab-it th, .fi-cab-it td { border-top: 2px solid #000; }
.fi-faltas td { font-size: 6.8pt; }
.fi-dados { margin-top: 1.5mm; }
.fi-dados th { background: #d9d9d9; text-align: left; font-weight: 700; font-size: 7pt; padding-left: 3px; }
.fi-dados .fi-rot { font-weight: 700; width: 10mm; }
.fi-dados .fi-sub { background: #d9d9d9; text-align: center; font-weight: 700; }
.fi-dados .c { text-align: center; }
.fi-dados .fi-secbox { vertical-align: top; padding: 0 !important; border-top: 1px solid #000; }
.fi-obs { background: #d9d9d9; text-align: center; padding: 1px; border-bottom: 1px solid #000; }
.fi-sec { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 14mm; font-size: 7pt; }
.fi-sec .fi-linha { display: block; width: 80%; border-top: 1px solid #000; margin-bottom: 1mm; }
.fi-ef-lado { padding: 0 !important; vertical-align: stretch; }
.fi-ef-lado > table { height: 100%; }
.fi-ef-lado td { border: 0; border-left: 1px solid #000; padding: 0; height: auto; width: 50%; }
.fi-ef-lado tr + tr td { border-top: 1px solid #000; }
.fi-vert span { writing-mode: vertical-rl; transform: rotate(180deg); display: block; margin: auto; font-size: 6.6pt; white-space: nowrap; font-weight: 700; }
.fi-vert-sit span { display: flex; align-items: center; gap: 1mm; }
.fi-vert-sit i { transform: rotate(90deg); }
.fi-ef-baixo { display: flex; gap: 1.5mm; margin-top: 1.5mm; }
.fi-ef-baixo .fi-dados { margin-top: 0; flex: 1; }
.fi-obs-ef { width: 30% !important; }
.fi-obs-ef th { background: #d9d9d9; font-weight: 700; }
.fi-obs-txt { list-style: none; margin: 0; padding: 1mm 1.5mm; font-size: 6.4pt; line-height: 1.25; text-align: left; }
.fi-obs-txt li + li { border-top: 1px dotted #999; }
.fi-dados .fi-secbox { display: table-cell; }
.fi-dados .fi-secbox .fi-sec { margin-top: 6mm; }
.fi-obs-ef .fi-obs-cel { vertical-align: top; height: auto; padding: 0; }
.fi-obs-ef { border-collapse: collapse; }
.fi-ef-baixo .fi-obs-ef tr:last-child td { height: 100%; }
.fi-obs-folha td { height: auto; padding: 1mm 1.5mm; vertical-align: top; font-size: 7.5pt; }

/* Horários impressos */
.doc-horario .hor-imp-tit { font: 700 14pt Arial, sans-serif; margin: 0 0 6mm; color: #1f3a8a; }
.doc-horario .hor-imp-quadro { font: 800 22pt Arial, sans-serif; margin: 0 0 8mm; }
.doc-horario .hor-imp th { background: #1f3a8a; color: #fff; }
.doc-horario .hor-imp td { font-size: 11pt; height: 20mm; text-align: center; vertical-align: middle; }
.doc-horario .hor-imp td.c { height: auto; }
.doc-horario .hor-imp small { color: #444; }
.doc-horario .hor-imp-tit ~ .hor-imp-tit { margin-top: 8mm; }

/* Horário individual do professor (modelo de 11/11) */
.doc-hi { font-family: Inter, "Segoe UI", Arial, sans-serif !important; color: #1b2433; padding: 9mm 11mm 7mm !important; }
.doc-hi .hi-topo { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #1b2433; padding-bottom: 3mm; margin-bottom: 3mm; }
.doc-hi .hi-sobre { color: #2B3192; font-size: 7pt; font-weight: 700; letter-spacing: .04em; }
.doc-hi h1 { font-size: 20pt; margin: 1mm 0 0; line-height: 1.1; color: #1b2433; font-weight: 800; }
.doc-hi .hi-quem { font-size: 8pt; color: #555e6e; margin-top: 1mm; }
.doc-hi .hi-nums { display: flex; gap: 2.5mm; }
.doc-hi .hi-num { background: #eef2f8; border-radius: 2.5mm; min-width: 25mm; padding: 1.5mm 2mm; text-align: center; }
.doc-hi .hi-num b { display: block; font-size: 15pt; line-height: 1.2; }
.doc-hi .hi-num span { font-size: 5.5pt; text-transform: uppercase; color: #555e6e; }
.doc-hi .hi-grade { display: grid; grid-template-columns: 20mm repeat(5, 1fr); gap: 1.3mm 1.6mm; }
.doc-hi .hi-dia { background: #1b2a4a; color: #fff; border-radius: 1.5mm; text-align: center; padding: 1.3mm 0; }
.doc-hi .hi-dia b { display: block; font-size: 8.5pt; }
.doc-hi .hi-dia small { font-size: 6pt; opacity: .8; }
.doc-hi .hi-rot { font-size: 7pt; padding-top: 1mm; }
.doc-hi .hi-rot b { display: block; }
.doc-hi .hi-rot small { color: #6b7280; font-size: 6pt; }
.doc-hi .hi-cel { border-radius: 1.5mm; min-height: 9.5mm; padding: 1.2mm 2mm; background: var(--f); border-left: 1mm solid var(--c); }
.doc-hi .hi-cel b { display: block; color: var(--c); font-size: 8pt; }
.doc-hi .hi-cel small { font-size: 6.5pt; color: #333; }
.doc-hi .hi-cel + .hi-cel { margin-top: .8mm; }
.doc-hi .hi-vazia { border: 0; background: repeating-linear-gradient(135deg, #f4f5f8 0 2mm, #eceef3 2mm 2.6mm); }
.doc-hi .hi-faixa { grid-column: 1 / -1; border-top: 1px dashed #b7bdc8; height: 0; margin: 1.6mm 0; text-align: center; }
.doc-hi .hi-faixa span { position: relative; top: -2.2mm; background: #fff; padding: 0 2mm; font-size: 5.5pt; color: #6b7280; letter-spacing: .03em; }
.doc-hi .hi-legenda { display: flex; flex-wrap: wrap; gap: 1mm 5mm; border-top: 1px solid #d6dae2; margin-top: 2mm; padding-top: 1.5mm; font-size: 6.5pt; font-weight: 600; }
.doc-hi .hi-legenda i { display: inline-block; width: 2.2mm; height: 2.2mm; border-radius: 50%; margin-right: 1.2mm; vertical-align: -.3mm; }
.doc-hi .hi-rodape { display: flex; justify-content: space-between; gap: 6mm; font-size: 6pt; color: #6b7280; margin-top: 1.5mm; }
/* manhã e tarde na mesma folha: tudo um pouco menor para caber numa página */
.doc-hi.hi-dois { padding: 7mm 10mm 5mm !important; }
.doc-hi.hi-dois .hi-topo { padding-bottom: 2mm; margin-bottom: 2mm; }
.doc-hi.hi-dois h1 { font-size: 17pt; }
.doc-hi.hi-dois .hi-num b { font-size: 12pt; }
.doc-hi.hi-dois .hi-grade { gap: .9mm 1.4mm; }
.doc-hi.hi-dois .hi-cel { min-height: 0; height: 9.6mm; padding: .7mm 1.8mm; }
.doc-hi.hi-dois .hi-cel b { font-size: 7.2pt; }
.doc-hi.hi-dois .hi-cel small { font-size: 6pt; }
.doc-hi.hi-dois .hi-rot { padding-top: .4mm; font-size: 6.5pt; }
.doc-hi.hi-dois .hi-faixa { margin: 1.1mm 0; }
.doc-hi.hi-dois .hi-legenda { margin-top: 1.2mm; padding-top: 1mm; }
.fi-mat { font-size: 0.85em; white-space: nowrap; }
/* Histórico: diagonal nas séries vazias e faixa cinza entre FGB e Itinerários (igual ao Word, 20/11) */
.hi td.hi-risco { position: relative; }
.hi svg.hi-diag { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.hi svg.hi-diag line { stroke: #1f5f86; stroke-width: 1px; }
.hi tr.hi-sep td { height: 1.2mm; padding: 0; background: #d9d9d9; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
/* Histórico: medidas tiradas do Word da escola (21/11): margens 10 mm, Arial 10 nas grades, 11 na identificação */
.doc-historico.folha { padding: 10mm; }
.hi td, .hi th { font-size: 10pt; padding: 0 3px; }
.hi-topo p.hi-razao { font-size: 14pt; }
.hi-topo p.hi-cnpj { font-size: 12pt; }
.hi-topo p.hi-cep { font-size: 11pt; }
.hi .hi-titulo { font-family: "Arial Black", Arial, "Liberation Sans", sans-serif; font-weight: 900; font-size: 15pt; letter-spacing: 2px; margin: 0 0 .5mm 30mm; }
.hi-id tr { height: 5.5mm; }
.hi-id th { text-align: center; font-size: 11pt; }
.hi-id th, .hi-id td .hi-v { font-size: 11pt; }
.hi-grade tr.hi-cabgrade th { font-size: 10pt; border-bottom: 1px solid #000; }
.hi-EM .hi-grade tr.hi-cabgrade th:first-child, .hi-EF .hi-grade tr.hi-cabgrade th:first-child { font-size: 12pt; }
.hi .hi-faixa th { font-size: 10pt; height: 4.4mm; }
.hi tr.hi-lin td { height: 4.4mm; }
.hi .hi-v.b { font-weight: 700; }
.hi th.hi-rotv span { font-size: 10pt; }
.hi th.hi-rot-IT span { font-size: 9pt; }
.hi-estab th, .hi-estab td { height: 4.4mm; font-size: 10pt; }
.hi-estab td.hi-obs { font-size: 10pt; }
.hi-cert td { font-size: 10pt; }
.hi tr.hi-sep td { height: 1mm; }
/* 21/11 (comparado pixel a pixel com o Word): margem interna das células 1,9 mm como no Word, título sem espaçamento extra,
   "ENSINO MÉDIO/FUNDAMENTAL" 14, rodapé 8 e data 11 */
.hi td, .hi th { padding: 0 1.9mm; }
.hi th.hi-rotv { padding: 0; }
.hi .hi-titulo { letter-spacing: 0; }
.hi .hi-seg { font-size: 14pt; margin: .3mm 0 0; }
.hi-rasura { font-size: 8pt; }
.hi-data { font-size: 11pt; }
.hi-EM .hi-grade tr.hi-faixa.bnc th { text-align: left; padding-left: 38mm; }
.hi .hi-titulo { margin-left: 20mm; }
.hi-topo { grid-template-columns: 42mm 1fr; }
.hi-assin { margin-top: 9mm; }
.hi svg.hi-diag line { stroke-width: 1.5px; }
/* 21/11 (medido no PDF do Google Planilhas): na planilha o número fica ~1 pt mais baixo na célula.
   Mesma altura total (1,12 em), só desce o texto: menos entrelinha, mais espaço em cima. */
.bol td.v, .bol td.disc { line-height: .85; padding-top: .27em; }
/* títulos das colunas: na planilha ficam um pouco mais altos na célula (medido 21/11) */
.bol .graf-cab { padding-bottom: 1.2pt; }
.bol .tit-fin { padding-bottom: 2pt; }

/* ---- Documentos iguais aos modelos em Word (carta.js, 21/11) ---- */
.folha.cw { box-sizing: border-box; padding: 0; min-height: 297mm; color: #000; line-height: normal; }
.cw-timbre { position: absolute; left: 0; top: 0; right: 0; height: 40mm; }
.cw-logo { position: absolute; height: auto; }
.cw-tl { position: absolute; white-space: nowrap; line-height: 1.15; color: #000; }
.cw-faixa { position: absolute; display: block; height: 0; }
.cw-faixa.azul { border-top: 3pt solid #002060; margin-top: -1.5pt; }
.cw-faixa.amarela { border-top: 2.5pt solid #FFC000; margin-top: -1.25pt; }
.cw-corpo { position: relative; display: flow-root; }
.cw-b { display: flow-root; }
.cw-b p { margin: 0; text-indent: var(--recuo, 0); }
.cw-b p + p { margin-top: var(--entre, 0); }
.cw-b u { text-underline-offset: 2px; }
.cw .cw-marca { background: #ff0; }
.cw .vermelho { color: #f00; }
.cw table.cw-tab { border-collapse: collapse; width: auto; margin: 0 auto; font-family: inherit; }
.cw table.cw-tab td, .cw table.cw-tab th { border: 1px solid #000; padding: 0 1.5mm; height: 5.3mm; line-height: 1; text-align: center; font-size: 12pt; }
.cw table.cw-tab th { font-weight: 700; }
.cw table.cw-tab .cab th { border-bottom-width: 2px; }
.cw table.cw-tab.azul td, .cw table.cw-tab.azul th { background: #E7F0F9; }
.cw table.cw-tab.creme td, .cw table.cw-tab.creme th { background: #FFF5D9; }
.cw table.cw-tab td.sub { color: #f00; font-weight: 700; text-align: right; }
.cw table.cw-total { border-collapse: collapse; width: auto; margin: 0 0 0 auto; font-family: inherit; }
.cw table.cw-total td { border: 1px solid #000; color: #f00; font-weight: 700; font-size: 16pt; line-height: 1.05; text-align: center; }
.cw-caixas p { display: flex; justify-content: space-between; }
.cw-faixa.grossa { box-shadow: 0 .55mm .7mm rgba(0, 0, 0, .35); }
.cw-faixa.azul.grossa { border-top-width: .95mm; margin-top: -.47mm; }
.cw-faixa.amarela.grossa { border-top-width: .9mm; margin-top: -.45mm; }
.folha.com-timbre { padding-top: 36mm; } /* timbre padrão (21/11) por cima, nos documentos sem modelo em Word */

/* 24/11: aviso do Drive na tela de emitir */
.aviso-drive { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #d8dcea; background: #f5f7fc; }
.aviso-drive .ic { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--cor-primaria, #2b3a8f); }
.aviso-drive small { color: #555; overflow-wrap: anywhere; }
.aviso-drive.ok { border-color: #9fd5b0; background: #eef9f1; }
.aviso-drive.ok b, .aviso-drive.ok .ic { color: #1f6b3d; }
.aviso-drive.falhou { border-color: #f0d48a; background: #fff8e6; }
.aviso-drive.falhou b, .aviso-drive.falhou .ic { color: #8a6100; }
