:root {
    --marca: #1f4e79;
    --marca-escura: #163a5a;
    --marca-clara: #e8f0f8;
    --fundo: #f4f6f9;
    --borda: #e2e6ec;
    --texto-suave: #5b6675;
    --menu-largura: 248px;
    --bs-primary: #1f4e79;
    --bs-primary-rgb: 31, 78, 121;
    --bs-link-color: #1f4e79;
    --bs-link-hover-color: #163a5a;
}

body {
    background: var(--fundo);
    color: #1d2733;
    font-size: 0.95rem;
}

.btn-primary {
    --bs-btn-bg: var(--marca);
    --bs-btn-border-color: var(--marca);
    --bs-btn-hover-bg: var(--marca-escura);
    --bs-btn-hover-border-color: var(--marca-escura);
    --bs-btn-active-bg: var(--marca-escura);
    --bs-btn-active-border-color: var(--marca-escura);
    --bs-btn-disabled-bg: var(--marca);
    --bs-btn-disabled-border-color: var(--marca);
}
.btn-outline-primary {
    --bs-btn-color: var(--marca);
    --bs-btn-border-color: var(--marca);
    --bs-btn-hover-bg: var(--marca);
    --bs-btn-hover-border-color: var(--marca);
    --bs-btn-active-bg: var(--marca-escura);
}
.form-check-input:checked { background-color: var(--marca); border-color: var(--marca); }

/* ---------- Barra superior ---------- */
.topo {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: 56px;
    background: var(--marca);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
}
.topo .marca {
    font-weight: 600;
    font-size: 1.05rem;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}
.topo .contexto {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.topo .contexto .rotulo {
    font-size: 0.85rem;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topo .form-select {
    max-width: 340px;
    font-size: 0.85rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}
.topo .btn-topo {
    color: #fff;
    border: 0;
    background: transparent;
    padding: 6px 8px;
    border-radius: 6px;
}
.topo .btn-topo:hover { background: rgba(255, 255, 255, 0.12); }
/* escola fixa, depois do município */
.topo .escola-fixa {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 0.85rem;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}
.topo .escola-fixa .nome { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; font-weight: 600; }
.topo .escola-fixa .btn-escola { padding: 2px 6px; }
.lista-escolas .list-group-item.active .selo { background: rgba(255, 255, 255, 0.25); color: #fff; }
.lista-escolas .cod-inep { font-variant-numeric: tabular-nums; color: var(--texto-suave); }
.lista-escolas .list-group-item.active .cod-inep { color: rgba(255, 255, 255, 0.85); }
@media (max-width: 575.98px) {
    .topo { gap: 6px; padding: 0 8px; }
    .topo .marca { display: none; }
    .topo .form-select { max-width: none; }
    .topo .contexto .rotulo { display: none; }
    .topo .escola-fixa { border-left: 0; padding-left: 0; }
    .topo .escola-fixa .nome { max-width: 150px; }
}

/* ---------- Menu lateral ---------- */
.menu {
    --bs-offcanvas-width: 280px;
    width: var(--menu-largura);
    background: #fff;
    border-right: 1px solid var(--borda);
}
@media (min-width: 992px) {
    .menu {
        position: fixed;
        top: 56px;
        bottom: 0;
        left: 0;
        overflow-y: auto;
    }
    .conteudo { margin-left: var(--menu-largura); }
}
.menu .secao {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--texto-suave);
    padding: 16px 20px 6px;
}
.menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    color: #1d2733;
    text-decoration: none;
    border-left: 3px solid transparent;
}
.menu a:hover { background: var(--fundo); }
.menu a.ativo {
    background: var(--marca-clara);
    border-left-color: var(--marca);
    color: var(--marca);
    font-weight: 600;
}
.menu a .bi { font-size: 1.05rem; }

/* ---------- Conteúdo ---------- */
.conteudo { padding: 24px; }
@media (max-width: 575.98px) { .conteudo { padding: 16px; } }

.cabecalho-pagina {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}
.cabecalho-pagina h1 { font-size: 1.4rem; margin: 0; font-weight: 600; }
.cabecalho-pagina .sub { color: var(--texto-suave); font-size: 0.9rem; }

.cartao {
    background: #fff;
    border: 1px solid var(--borda);
    border-radius: 10px;
}
.cartao-corpo { padding: 16px 20px; }

.filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--borda);
}
.filtros .form-control, .filtros .form-select { max-width: 280px; }

.table { margin: 0; }
.table > :not(caption) > * > * { padding: 10px 16px; vertical-align: middle; }
.table thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--texto-suave);
    font-weight: 600;
    background: #fafbfc;
}
.table tbody tr.inativo td { color: #98a1ad; }

.vazio {
    padding: 40px 16px;
    text-align: center;
    color: var(--texto-suave);
}
.vazio .bi { font-size: 2rem; display: block; margin-bottom: 8px; }

.selo {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef1f5;
    color: #3b4654;
    margin: 1px 2px 1px 0;
    white-space: nowrap;
}
.selo-marca { background: var(--marca-clara); color: var(--marca); }

/* ---------- Vínculos de alunos: um cartão por par ---------- */
.lista-vinculos { display: flex; flex-direction: column; gap: 12px; }
.cartao-vinculo { border: 1px solid var(--borda); border-radius: 10px; background: #fff; padding: 12px 16px; }
.cartao-vinculo.marcado { border-color: #86c79a; box-shadow: 0 0 0 2px #dcfce7; }
.cv-cab { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cv-cab .form-check-input { margin: 0; flex: none; }
.cv-conf { min-width: 54px; font-size: 0.95rem; flex: none; }
.cv-nome { flex: 1; min-width: 200px; font-size: 1rem; }
.cv-acoes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cv-corpo { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: start;
    margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--borda); font-size: 0.88rem; }
.cv-rotulo { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texto-suave); margin-bottom: 2px; }
.cv-rotulo .link-crianca { font-size: 0.72rem; text-transform: none; letter-spacing: 0; }
.cv-passagem { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--texto-suave); padding-top: 14px; }
.cv-motivos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.motivo { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; border-radius: 999px; padding: 2px 10px; border: 1px solid; }
.motivo-mais { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.motivo-menos { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.motivo-info { background: #f8fafc; border-color: var(--borda); color: var(--texto-suave); }
button.motivo-clicavel { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
button.motivo-clicavel:hover { filter: brightness(0.96); }
/* provas de cada ciclo no ano (vínculos): componente feito normal, "não participou" riscado */
.provas { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 5px; }
.prova { font-size: 0.72rem; line-height: 1.5; border: 1px solid var(--borda); border-radius: 6px; padding: 0 6px; background: #f8fafc; white-space: nowrap; }
.prova s { color: var(--texto-suave); }
.prova-nao { color: var(--texto-suave); }
.prova-nada { background: #fff4e0; border-color: #f3d9a4; color: #8a5a00; }
@media (max-width: 767.98px) {
    .cv-corpo { grid-template-columns: minmax(0, 1fr); }
    .cv-passagem { flex-direction: row; padding-top: 0; }
    .cv-passagem .bi-arrow-right { transform: rotate(90deg); }
    .cv-acoes { width: 100%; justify-content: flex-start; }
}
.selo-alerta { background: #fff4e0; color: #8a5a00; }
/* inativo (escola, turma, usuário, município): vermelho cheio (pedido do usuário de 2026-11-08) */
.selo-inativo { background: #dc3545; color: #fff; }
/* Vínculos de alunos: escola que não aparece no outro cadastro do par */
/* Vínculos: a mesma prova nos dois cadastros — verde = compatível (no máximo um fez), vermelho = os dois fizeram (só a letra) */
.prova .comp-ok { color: #15803d; font-weight: 700; }
.prova .comp-conflito { color: #dc2626; font-weight: 700; }
.selo-escola-diferente { display: inline-block; background: #ffe066; color: #3d3000; border-radius: 6px; padding: 0 7px; font-weight: 600; }

/* Indicadores da página inicial */
.indicador {
    background: #fff;
    border: 1px solid var(--borda);
    border-radius: 10px;
    padding: 16px 20px;
    height: 100%;
}
.indicador .numero { font-size: 1.8rem; font-weight: 600; color: var(--marca); line-height: 1.2; }
.indicador .legenda { color: var(--texto-suave); font-size: 0.85rem; }

/* Listas de seleção nos formulários (escolas, eixos) */
.lista-opcoes {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--borda);
    border-radius: 8px;
    padding: 8px 12px;
}
.lista-opcoes .grupo { font-size: 0.75rem; text-transform: uppercase; color: var(--texto-suave); margin: 8px 0 4px; }
.lista-opcoes .grupo:first-child { margin-top: 0; }

.senha-gerada {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 1.3rem;
    letter-spacing: 0.08em;
    background: var(--fundo);
    border: 1px dashed var(--borda);
    border-radius: 8px;
    padding: 10px 14px;
    text-align: center;
    user-select: all;
}

/* Login */
.pagina-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: linear-gradient(160deg, var(--marca) 0%, #2d6a9f 100%);
}
.caixa-login {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}
.caixa-login h1 { font-size: 1.35rem; font-weight: 600; color: var(--marca); margin-bottom: 4px; }
.caixa-login .sub { color: var(--texto-suave); font-size: 0.9rem; margin-bottom: 24px; }

/* Avisos flutuantes */
.avisos {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(420px, calc(100vw - 32px));
}
.aviso {
    background: #1d2733;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    font-size: 0.9rem;
}
.aviso.erro { background: #b42318; }
.aviso.ok { background: #1f7a3f; }

.carregando { color: var(--texto-suave); padding: 24px 16px; text-align: center; }

/* ---------- Mapa ---------- */
.mapa-layout { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 992px) { .mapa-layout { grid-template-columns: minmax(0, 1fr) 340px; } }
.mapa-cartao { overflow: hidden; display: flex; flex-direction: column; }
.mapa-grande { height: 60vh; min-height: 360px; }
@media (min-width: 992px) { .mapa-grande { height: calc(100vh - 56px - 48px - 70px - 42px); min-height: 460px; } }
.mapa-legenda {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
    padding: 10px 16px; border-top: 1px solid var(--borda); font-size: 0.82rem; color: var(--texto-suave);
}
.bola {
    display: inline-block; width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); vertical-align: -2px; flex: none;
}
.mapa-lista { display: flex; flex-direction: column; min-height: 0; }
@media (min-width: 992px) { .mapa-lista { max-height: calc(100vh - 56px - 48px - 70px); } }
.mapa-lista .filtros .form-control, .mapa-lista .filtros .form-select { max-width: none; flex: 1 1 140px; }
.lista-escolas { overflow-y: auto; padding: 4px 0; }
.item-escola {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 8px 16px; border: 0; background: transparent; font-size: 0.88rem; color: inherit;
}
.item-escola:hover, .item-escola:focus-visible { background: var(--fundo); }
.aviso-sem-ponto { margin: 10px 12px 4px; padding: 8px 12px; border-radius: 8px; background: #fff4e0; color: #6b4600; }
.popup-escola { min-width: 220px; }
.popup-escola .selo { font-size: 0.7rem; }
.leaflet-container { font-family: inherit; }
.mini-mapa { height: 300px; border: 1px solid var(--borda); border-radius: 8px; }

/* ---------- Modelo do plano ---------- */
.selo-ok { background: #e3f4e8; color: #1f6b38; }
.modelo-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.modelo-layout > * { min-width: 0; }
@media (min-width: 992px) {
    .modelo-layout { grid-template-columns: 290px minmax(0, 1fr); align-items: start; }
    .nav-eixos { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow-y: auto; }
}
.nav-eixos .secao {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--texto-suave); padding: 12px 16px 2px;
}
.nav-eixos a {
    display: flex; gap: 8px; align-items: baseline; padding: 6px 16px; color: #1d2733; text-decoration: none;
    font-size: 0.88rem; border-left: 3px solid transparent;
}
.nav-eixos a:hover { background: var(--fundo); }
.nav-eixos a.ativo { background: var(--marca-clara); border-left-color: var(--marca); color: var(--marca); font-weight: 600; }
.nav-eixos .num { min-width: 20px; text-align: right; color: var(--texto-suave); font-variant-numeric: tabular-nums; }
.faixa-modelo { border-radius: 10px; padding: 10px 16px; margin-bottom: 16px; border: 1px solid var(--borda); background: #fff; }
.faixa-rascunho { background: #fff8e8; border-color: #f0d9a8; }
.faixa-publicado { background: #f1f8f3; border-color: #cfe7d6; }
.faixa-arquivado { background: #f3f4f6; }
.rotulo-info { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texto-suave); margin-bottom: 2px; }
.bloco { background: #fff; border: 1px solid var(--borda); border-radius: 10px; margin-bottom: 14px; }
.bloco-semed { border-color: #d6c8ec; background: #fcfaff; }
.bloco-cab { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--borda); }
.bloco-corpo { padding: 12px 16px; }
.tabela-modelo { font-size: 0.82rem; }
.tabela-modelo > :not(caption) > * > * { padding: 6px 10px; vertical-align: top; }
.tabela-modelo thead th { font-size: 0.72rem; white-space: normal; min-width: 90px; }
.tabela-modelo thead th.escala { min-width: 70px; }
.tabela-modelo tbody th { font-weight: 500; background: #fafbfc; min-width: 140px; }
.tabela-modelo td.fixo { color: #3b4654; background: #fafbfc; min-width: 200px; }
.tipo-col { font-size: 0.65rem; text-transform: none; letter-spacing: 0; background: #eef1f5; color: #5b6675; border-radius: 4px; padding: 0 4px; font-weight: 500; }
.ex { color: #8a94a3; font-style: italic; }
.linha-nova { color: var(--texto-suave); font-size: 0.8rem; text-align: center; background: #fcfcfd; }
.nota { font-size: 0.78rem; color: var(--texto-suave); margin-top: 6px; }
.caixa-campo { border: 1px dashed #cfd6df; border-radius: 6px; min-height: 32px; background: #fafbfc; padding: 4px 8px; font-size: 0.82rem; }
.caixa-campo.alta { min-height: 64px; }
.grade-marcacoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 16px; font-size: 0.88rem; }
.lista-edit-linha {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; margin-bottom: 6px;
    border: 1px solid var(--borda); border-radius: 8px; background: #fbfcfd;
}
.lista-edit-linha .w-rotulo { flex: 2 1 200px; }
.lista-edit-linha .w-tipo { flex: 0 0 170px; }
.lista-edit-linha .w-op { flex: 2 1 220px; }
.lista-edit-linha .w-ex { flex: 1 1 160px; }
.lista-edit-acoes { margin-left: auto; display: flex; gap: 2px; }

/* ---------- Plano da escola / acompanhamento ---------- */
.selo-perigo { background: #fde8e6; color: #9b1c12; }
.selo-cl {
    display: inline-block; min-width: 30px; text-align: center; font-size: 0.75rem; font-weight: 600;
    padding: 1px 6px; border-radius: 6px; border: 1px solid transparent; white-space: nowrap;
}
.cl-adequado { background: #dff3e5; color: #17663a; border-color: #b9e2c6; }
.cl-atencao { background: #fff3d6; color: #8a5a00; border-color: #f2d896; }
.cl-prioridade { background: #fde3e0; color: #9b1c12; border-color: #f4b8b0; }
.cl-na { background: #eef1f5; color: #5b6675; border-color: #dde2e8; }
.cl-vazio { background: transparent; color: #a3acb8; }
a .selo-cl { text-decoration: none; }
.prog-eixo { font-size: 0.72rem; color: var(--texto-suave); font-variant-numeric: tabular-nums; }
.prog-eixo.completo { color: #17663a; font-weight: 600; }
.bloco-rodape { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--borda); background: #fafbfc; border-radius: 0 0 10px 10px; }
.tabela-form { font-size: 0.85rem; }
.tabela-form > :not(caption) > * > * { padding: 6px 8px; vertical-align: top; }
.tabela-form thead th { font-size: 0.72rem; white-space: normal; min-width: 110px; }
.tabela-form tbody th { font-weight: 500; background: #fafbfc; min-width: 140px; }
.tabela-form td.fixo { color: #3b4654; background: #fafbfc; min-width: 220px; font-size: 0.8rem; }
.tabela-form td.alerta { background: #fff6f5; }
.tabela-form .campo-txt, .tabela-form .campo-sel { min-width: 130px; }
.tabela-form .campo-longo { min-width: 200px; }
.tabela-form .campo-num { min-width: 110px; }
.tabela-form .campo-data { min-width: 140px; }
.campo-multi { display: flex; flex-direction: column; gap: 2px; min-width: 170px; }
.valor { white-space: pre-wrap; }
.valor-bloco { white-space: pre-wrap; background: #fafbfc; border: 1px solid var(--borda); border-radius: 6px; padding: 6px 10px; min-height: 34px; }
.opcao-classif {
    display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: 8px; border: 1px solid; cursor: pointer;
    flex: 1 1 200px; font-size: 0.88rem;
}
.opcao-classif input { margin-top: 4px; }
.devolutiva { border-left: 3px solid var(--marca); padding: 4px 12px; margin-bottom: 10px; font-size: 0.9rem; }
details > summary { cursor: pointer; }
.tabela-painel { max-height: calc(100vh - 300px); }
.tabela-painel thead th { position: sticky; top: 0; z-index: 2; }
.tabela-painel .col-escola { position: sticky; left: 0; z-index: 1; background: #fff; min-width: 220px; font-weight: 500; }
.tabela-painel thead .col-escola { z-index: 3; background: #fafbfc; }
.tabela-painel .col-eixo { min-width: 38px; }
.tabela-painel td, .tabela-painel th { padding: 6px 6px !important; }

/* ---------- Leitura dos blocos e importações ---------- */
.tabela-leitura { font-size: 0.86rem; }
.tabela-leitura > :not(caption) > * > * { padding: 6px 10px; vertical-align: top; }
.tabela-leitura thead th { font-size: 0.72rem; white-space: normal; min-width: 90px; }
.tabela-leitura tbody th { font-weight: 500; background: #fafbfc; min-width: 130px; }
.tabela-leitura td { white-space: pre-wrap; }
.tabela-leitura td.fixo { color: #3b4654; background: #fafbfc; min-width: 200px; font-size: 0.8rem; }
.tabela-leitura td.auto { background: #f3f7fb; font-variant-numeric: tabular-nums; }
.tabela-leitura tr.total th, .tabela-leitura tr.total td { font-weight: 600; border-top: 2px solid var(--borda); }
.tabela-leitura .acoes { width: 1%; white-space: nowrap; text-align: right; min-width: 0; }
.tipo-auto { background: #e3eefa; color: #1f4e79; }
.lista-campos { margin: 0 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 20px; }
.lista-campos dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--texto-suave); font-weight: 600; }
.lista-campos dd { margin: 0; white-space: pre-wrap; }
.lista-previa { max-height: 300px; overflow-y: auto; border: 1px solid var(--borda); border-radius: 8px; padding: 8px 12px; }
.lista-previa > div { padding: 2px 0; border-bottom: 1px dashed #eef1f5; }

/* ---------- Configurações do município ---------- */
.logo-config { height: 150px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--borda); border-radius: 6px; background: #fff; }
.logo-config img { max-height: 130px; max-width: 90%; object-fit: contain; }

/* ---------- Documentos para imprimir (devolutiva, plano completo) ---------- */
.folha {
    background: #fff;
    border: 1px solid var(--borda);
    border-radius: 6px;
    max-width: 210mm;
    margin: 0 auto 24px;
    padding: 14mm 14mm 12mm;
    font-size: 0.92rem;
    color: #1d2733;
}
.folha.paisagem { max-width: 297mm; }
.folha-cab { text-align: center; border-bottom: 2px solid var(--marca); padding-bottom: 10px; margin-bottom: 14px; }
.folha-cab.com-logo { display: grid; grid-template-columns: 76px 1fr 76px; align-items: center; gap: 12px; }
.folha-logo { max-width: 76px; max-height: 96px; object-fit: contain; justify-self: center; }
.folha-cab .orgao { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--texto-suave); }
.folha-cab h1 { font-size: 1.3rem; margin: 8px 0 2px; color: var(--marca); }
.folha-sub { font-size: 0.88rem; }
.folha-marca { display: inline-block; margin-top: 6px; padding: 2px 10px; border: 1px dashed #b58105; color: #7a5600; font-size: 0.78rem; border-radius: 4px; }
.folha-marca.perigo { border-color: #b02a37; color: #b02a37; }
.folha h2 { font-size: 1rem; color: var(--marca); border-bottom: 1px solid var(--borda); padding-bottom: 3px; margin: 18px 0 8px; }
.folha h3 { font-size: 0.92rem; margin: 12px 0 6px; }
.folha section > p { margin-bottom: 6px; }
.folha .obs { font-size: 0.8rem; color: var(--texto-suave); }
.folha-ident, .folha-tabela { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.folha-ident th, .folha-ident td, .folha-tabela th, .folha-tabela td { border: 1px solid #c9d0d9; padding: 4px 6px; vertical-align: top; text-align: left; }
.folha-ident th, .folha-tabela thead th { background: #eef2f6; font-weight: 600; }
.folha-ident th { width: 1%; white-space: nowrap; }
.folha-tabela td { overflow-wrap: break-word; }
.folha-tabela .obs { font-size: 0.9em; }
.folha-tabela.metas td:first-child { width: 34%; }
.folha-eixo { border: 1px solid var(--borda); border-left: 3px solid var(--marca); border-radius: 4px; padding: 6px 10px; margin-bottom: 8px; }
.folha-eixo .titulo { font-weight: 600; margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.folha-campo { margin-bottom: 4px; }
.folha-campo .rot { font-size: 0.76rem; font-weight: 600; color: var(--texto-suave); text-transform: uppercase; letter-spacing: 0.02em; }
.folha-tabela.assinaturas td { height: 34px; }
.folha-tabela.assinaturas td:nth-child(3) { width: 34%; }
.folha-tabela.assinaturas td:nth-child(4) { width: 14%; }
.folha-rodape { margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--borda); font-size: 0.72rem; color: var(--texto-suave); text-align: center; }
.folha .tabela-leitura { font-size: 0.8rem; }
.folha .bloco-impressao { margin-bottom: 10px; break-inside: auto; }
.folha .bloco-impressao .titulo-bloco { font-weight: 600; font-size: 0.86rem; margin-bottom: 4px; }
@media (max-width: 575.98px) {
    .folha { padding: 16px 12px; }
    .folha-ident, .folha-ident tbody, .folha-ident tr, .folha-ident th, .folha-ident td { display: block; width: auto; }
    .folha-ident th { white-space: normal; border-bottom: 0; }
    .folha-ident th:empty, .folha-ident td:empty { display: none; }
    .folha-tabela, .folha .tabela-leitura { display: block; overflow-x: auto; }
    .folha-cab.com-logo { grid-template-columns: 48px 1fr; gap: 8px; }
    .folha-logo { max-width: 48px; max-height: 64px; }
}

@page { size: A4; margin: 14mm 12mm 14mm; }
@media print {
    .topo, .menu, .no-print, .avisos, .modal, .modal-backdrop { display: none !important; }
    html, body { background: #fff !important; }
    .conteudo { margin: 0 !important; padding: 0 !important; }
    .folha { border: 0; border-radius: 0; padding: 0; margin: 0; max-width: none; font-size: 10pt; }
    .folha-ident, .folha-tabela, .folha .tabela-leitura { font-size: 8.5pt; }
    .folha .table-responsive { overflow: visible !important; }
    .folha h2, .folha h3, .folha-eixo .titulo, .folha .titulo-bloco { break-after: avoid; }
    .folha-eixo, .folha-tabela tr, .folha .tabela-leitura tr { break-inside: avoid; }
    .folha-assinaturas { break-inside: avoid; }
    .folha-ident th, .folha-tabela thead th, .selo-cl { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    a { color: inherit; text-decoration: none; }
}

/* ---------- Avisos ---------- */
.badge-avisos {
    position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: #dc3545; color: #fff; font-size: 0.68rem; font-weight: 700; line-height: 18px; text-align: center;
}
.badge-avisos.so-info { background: #0d6efd; }
.lista-avisos { width: min(380px, 94vw); padding: 0; max-height: 70vh; overflow-y: auto; }
.lista-avisos .cab-avisos { padding: 10px 14px; font-weight: 600; border-bottom: 1px solid var(--borda); }
.item-aviso { display: flex; gap: 10px; padding: 9px 14px; color: #1d2733; text-decoration: none; border-bottom: 1px solid var(--borda); }
.item-aviso:hover { background: var(--fundo); color: #1d2733; }
.item-aviso .bi { margin-top: 2px; }
.item-aviso .titulo { display: block; font-size: 0.86rem; font-weight: 600; line-height: 1.25; }
.item-aviso .detalhe { display: block; font-size: 0.78rem; color: var(--texto-suave); line-height: 1.3; margin-top: 2px; }
.item-aviso.nivel-perigo { border-left: 3px solid #dc3545; }
.item-aviso.nivel-alerta { border-left: 3px solid #f0ad00; }
.item-aviso.nivel-info { border-left: 3px solid #0d6efd; }
.lista-avisos .ver-todos { display: block; padding: 9px 14px; text-align: center; font-size: 0.85rem; }
.cartao .item-aviso:last-child { border-bottom: 0; }

/* ---------- Fechamento do ano ---------- */
.passos-fechamento { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 0; font-size: 0.88rem; }
.passos-fechamento li { display: flex; align-items: center; gap: 8px; color: var(--texto-suave); }
.passos-fechamento .num { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #c9d0d9; display: inline-flex;
    align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; }
.passos-fechamento li.feito { color: #146c43; }
.passos-fechamento li.feito .num { background: #198754; border-color: #198754; color: #fff; }
.secao-fechamento { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--texto-suave); margin: 14px 0 6px; }
.so-impressao { display: none; }
@media print { .so-impressao { display: block; } }

/* ---------- Relatórios da rede ---------- */
.barra-empilhada { display: flex; gap: 2px; height: 14px; min-width: 160px; background: transparent; }
.barra-empilhada .seg { display: block; height: 100%; min-width: 3px; }
.barra-empilhada .seg:first-child { border-radius: 4px 0 0 4px; }
.barra-empilhada .seg:last-child { border-radius: 0 4px 4px 0; }
.barra-empilhada .seg:only-child { border-radius: 4px; }
.seg-adequado { background: #2f9e5a; }
.seg-atencao { background: #e0a400; }
.seg-prioridade { background: #d64534; }
.seg-nao_se_aplica { background: #8e99a8; }
.seg-sem_avaliacao { background: #e2e6ec; }
.legenda-barras { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--texto-suave); }
.legenda-barras .amostra { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tabela-distribuicao .col-barra { width: 34%; }
@media print { .barra-empilhada .seg { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .legenda-barras .amostra { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* ---------- Plano de Ação da SEMED ---------- */
.tabela-par { font-size: 0.84rem; }
.tabela-par td { white-space: normal; }
.ind-sistema { margin-top: 4px; font-size: 0.75rem; color: #1f4e79; background: var(--marca-clara); border-radius: 4px; padding: 1px 6px; display: inline-block; }
.indicador-par .numero { font-size: 1.35rem; }
.indicador-par .legenda { font-size: 0.78rem; line-height: 1.25; }
@media print { .dimensao-par { break-before: auto; } .tabela-par tr { break-inside: avoid; } }

/* ---------- Rascunho do PPP ---------- */
.ppp-escrever { border: 1px dashed #d4a72c; background: #fff8e6; color: #7a5600; border-radius: 4px; padding: 6px 10px; margin: 4px 0 10px; font-size: 0.85rem; }
.ppp-escrever-amostra { border: 1px dashed #d4a72c; background: #fff8e6; color: #7a5600; border-radius: 3px; padding: 0 4px; }
.folha h4 { font-size: 0.86rem; margin: 10px 0 4px; }
@media print { .ppp-escrever { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* ---------- Alunos ---------- */
tr.clicavel { cursor: pointer; }
.itens-aluno { display: inline-flex; flex-wrap: wrap; gap: 2px; }
.itens-aluno span { min-width: 20px; padding: 0 3px; text-align: center; font-size: 0.7rem; border-radius: 3px; background: #eef1f5; color: #5b6675; }
.itens-aluno span.ok { background: #dff3e5; color: #17663a; }
.itens-aluno span.erro { background: #fde3e0; color: #9b1c12; }
.lista-chaves code { font-size: 0.8rem; }

/* ---------- Menu CAEd / CNCA (Painel Analítico, Resultados, Acompanhamento) ---------- */
.estrela-caed { display: inline-block; border: 1px solid; border-radius: 6px; padding: 1px 8px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.selo-faixa { display: inline-block; border-radius: 6px; padding: 1px 8px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.pilula-faixa { display: inline-block; min-width: 54px; text-align: center; border-radius: 6px; padding: 1px 6px; margin: 0 1px 2px; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.legenda-faixas { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.78rem; color: var(--texto-suave); }
.legenda-faixas i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.filtros-caed { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.filtros-caed .campo { display: flex; flex-direction: column; min-width: 150px; }
.filtros-caed .campo label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texto-suave); margin-bottom: 2px; font-weight: 600; }
.filtros-caed .campo-largo { min-width: 220px; }
/* Acomp Aluno: filtros um embaixo do outro (metade esquerda) e a matriz ano escolar × componente (metade direita) */
.filtros-caed.filtros-coluna { flex-direction: column; align-items: flex-start; }
/* ano letivo e ciclo em botões de opção: o botão não herda o estilo do título do campo */
.filtros-caed .campo .opcoes-radio label.btn { text-transform: none; letter-spacing: 0; font-size: 0.8rem; font-weight: 500; margin-bottom: 0;
    color: var(--bs-btn-color); min-width: 64px; }
.filtros-caed .campo .opcoes-radio .btn-check:checked + label.btn { color: var(--bs-btn-active-color); }
/* passar o mouse: fundo claro e a letra na cor da marca (antes a letra ficava branca no fundo branco e sumia) */
.filtros-caed .campo .opcoes-radio .btn-check:not(:checked) + label.btn:hover { color: var(--marca); background: #eef4fb; }
.filtros-caed.filtros-coluna .campo-largo { min-width: 0; width: 100%; max-width: 420px; }
.rotulo-matriz { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texto-suave); font-weight: 600; margin-bottom: 4px; }
.rotulo-matriz span { text-transform: none; letter-spacing: 0; font-weight: 400; }
.matriz-caed { overflow-x: auto; }
.matriz-caed table { border-collapse: separate; border-spacing: 3px; }
.matriz-caed th { font-size: 0.75rem; font-weight: 600; color: var(--texto-suave); padding: 0 6px; text-align: center; white-space: nowrap; }
.matriz-caed tbody th { text-align: right; padding-right: 8px; }
.matriz-caed td { padding: 0; text-align: center; }
.matriz-caed .mz-cel { min-width: 52px; padding: 2px 6px; border: 1px solid var(--borda); border-radius: 6px; background: #fff; color: var(--marca);
    font-size: 0.8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.matriz-caed .mz-cel:hover { background: #eef4fb; border-color: #b9cde3; }
.matriz-caed .mz-cel.ativo { background: var(--marca); border-color: var(--marca); color: #fff; }
.matriz-caed .mz-cel:disabled { background: #f8fafc; border-color: #eef1f5; color: #cbd5e1; cursor: not-allowed; }
.matriz-caed tbody th.mz-comp { min-width: 0; text-align: left; font-weight: 500; color: #334155; font-size: 0.78rem; white-space: nowrap; padding-right: 10px; }
.matriz-caed .mz-cel:disabled { text-decoration: none; }
.nota-caed { font-size: 0.8rem; color: var(--texto-suave); line-height: 1.5; }
.turma-caed { border: 1px solid var(--borda); border-radius: 8px; margin-bottom: 8px; overflow: hidden; background: #fff; }
.turma-caed > .cab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 14px; cursor: pointer; }
.turma-caed > .cab .chev { color: var(--texto-suave); font-size: 0.75rem; width: 12px; }
.turma-caed > .corpo { border-top: 1px solid var(--borda); padding: 10px 14px; }
.tabela-caed td, .tabela-caed th { vertical-align: middle; }
.link-crianca { color: var(--marca); text-decoration: underline; cursor: pointer; background: none; border: 0; padding: 0; font-weight: 600; text-align: left; }
.lista-estudantes { padding-left: 2rem; line-height: 2.1; font-size: 1.02rem; }
.lista-estudantes .link-crianca { font-weight: 500; }
.lista-estudantes .serie-aluno { display: inline-block; min-width: 4.2em; margin-right: 0.5rem; color: var(--texto-suave); font-size: 0.88rem; }
.pivot-caed { font-size: 0.82rem; table-layout: fixed; }
.pivot-caed th, .pivot-caed td { border: 1px solid var(--borda); padding: 5px 6px; text-align: center; vertical-align: middle; word-wrap: break-word; }
.pivot-caed thead th { background: #f8fafc; font-size: 0.74rem; font-weight: 600; }
.pivot-caed th.rotulo, .pivot-caed td.rotulo { text-align: left; width: 260px; background: #fff; }
.pivot-caed td.total, .pivot-caed th.total { background: #f8fafc; font-weight: 600; }
.pivot-caed .drill { color: var(--marca); cursor: pointer; text-decoration: underline dotted; background: none; border: 0; padding: 0; text-align: left; font: inherit; }
.pivot-caed .extra { display: block; font-size: 0.7rem; color: var(--texto-suave); font-weight: 400; }
.pivot-caed .sub { display: block; font-size: 0.68rem; opacity: 0.8; font-weight: 400; }
.barra-caed { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: #eef1f5; min-width: 60px; }
.barra-caed span { display: block; height: 100%; }
.trilha-caed { font-size: 0.85rem; }
.trilha-caed .item { display: inline-flex; align-items: center; gap: 4px; background: var(--marca-clara); color: var(--marca); border-radius: 12px; padding: 1px 4px 1px 10px; margin: 2px 4px 2px 0; }
.trilha-caed .item button { border: 0; background: transparent; color: var(--marca); padding: 0 4px; line-height: 1; }

/* Envio dos resultados: turmas que já lançaram × turmas listadas (verde = todas, amarelo = parte, vermelho = nenhuma) */
.envio-badge { display: inline-block; min-width: 64px; text-align: center; border-radius: 6px; padding: 2px 8px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; border: 1px solid; }
.envio-ok { background: #dcfce7; border-color: #bbf7d0; color: #14532d; }
.envio-badge.envio-pct { min-width: 48px; margin-top: 1px; }
/* histórico da escola (linha do tempo) */
.lista-historico { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--bs-border-color); margin-left: 9px; }
.evento-historico { display: flex; gap: 10px; padding: 0 0 12px 0; margin-left: -10px; font-size: 0.9rem; }
.evento-historico > .bi { background: var(--bs-body-bg); color: var(--marca); font-size: 1.1rem; line-height: 1.2; }
.envio-parcial { background: #fef3c7; border-color: #fde68a; color: #78350f; }
.envio-nada { background: #fee2e2; border-color: #fecaca; color: #7f1d1d; }
.tabela-envio td, .tabela-envio th { vertical-align: middle; }
.tabela-envio td.num, .tabela-envio th.num { text-align: center; white-space: nowrap; }
.tabela-envio th .sub { display: block; font-size: 0.68rem; font-weight: 400; color: var(--texto-suave); text-transform: none; letter-spacing: 0; }
.tabela-envio tfoot td { font-weight: 600; background: #f8fafc; border-top: 2px solid var(--borda); }
.tabela-envio .link-escola { color: var(--marca); text-decoration: underline dotted; cursor: pointer; background: none; border: 0; padding: 0; text-align: left; font: inherit; font-weight: 600; }

/* ---------- Paginação (App.paginacao) ---------- */
.paginacao { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 16px; border-top: 1px solid var(--borda); font-size: 0.85rem; }
.paginacao .contagem { color: var(--texto-suave); margin-right: auto; }
.paginacao .tamanho { display: flex; align-items: center; gap: 6px; color: var(--texto-suave); }
.paginacao .tamanho .form-select { width: auto; }
.paginacao .page-link { min-width: 32px; text-align: center; }

/* ---------- Ficha do aluno: quadro com os componentes lado a lado; o componente clicado mostra as habilidades embaixo ---------- */
.bloco-ficha { margin-top: 18px; }
.selo-repetente { background: #fd7e14; color: #fff; margin-left: 4px; }
.quadro-comp th.ini-grupo, .quadro-comp td.ini-grupo { border-left: 2px solid var(--borda); }
.quadro-comp thead tr:first-child th { border-bottom: 0; padding-bottom: 0; }
.btn-comp-ficha { border: 1px solid var(--borda); background: #fff; color: var(--marca); border-radius: 6px; padding: 3px 10px; font-weight: 600;
    font-size: 0.82rem; white-space: nowrap; width: 100%; }
.btn-comp-ficha:hover { background: #f1f5f9; }
.btn-comp-ficha .bi { font-size: 0.7rem; transition: transform .15s; display: inline-block; }
.btn-comp-ficha.ativo { background: var(--marca); border-color: var(--marca); color: #fff; }
.btn-comp-ficha.ativo .bi { transform: rotate(180deg); }
.detalhe-comp-ficha { margin-top: 10px; border: 1px solid var(--borda); border-top: 3px solid var(--marca); border-radius: 8px; background: #fff; }
.detalhe-comp-ficha > .titulo { padding: 8px 12px; font-weight: 600; border-bottom: 1px solid var(--borda); background: #fafbfc; }
.detalhe-comp-ficha .table-responsive { padding: 4px 8px 8px; }

/* Acompanhamento do CAEd: um ciclo por coluna (número + selo do nível); o ciclo de referência em destaque */
.tabela-caed th.col-ref, .tabela-caed td.col-ref { background: rgba(31, 78, 121, 0.05); }
.tabela-caed td.celula-ciclo { white-space: nowrap; text-align: center; }
/* Ficha: comparação da criança com turma, escola e município (mesmo ano escolar) */
/* ficha: comparação (verde = a criança acima, vermelho = abaixo), cortes dos níveis, legenda e gráfico de evolução */
.cmp-acima, .comparacao-ficha td.cmp-acima { --bs-table-bg: #dcfce7; background-color: #dcfce7 !important; color: #14532d; border-radius: 3px; }
.cmp-abaixo, .comparacao-ficha td.cmp-abaixo { --bs-table-bg: #fee2e2; background-color: #fee2e2 !important; color: #7f1d1d; border-radius: 3px; }
.corte-nivel { white-space: nowrap; margin: 2px 0; font-size: 0.75rem; }
.corte-nivel .corte-faixa { font-weight: 400; margin-left: 2px; }
.legenda-ficha { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--borda); border-radius: 8px; background: #fafbfc; font-size: 0.8rem; }
.legenda-ficha li { margin: 3px 0; }
.grafico-ficha { padding-top: 10px; }
.grafico-ficha .g-area { position: relative; overflow-x: auto; }
.grafico-ficha svg { width: 100%; height: auto; min-width: 520px; display: block; }
.grafico-ficha .g-eixo { font-size: 11px; fill: #64748b; }
.grafico-ficha .g-ano { font-size: 12px; fill: #334155; font-weight: 600; }
.grafico-ficha .g-rotulo { font-size: 12px; fill: #334155; }
.grafico-ficha .g-leg { font-size: 0.8rem; color: #334155; }
.grafico-ficha .g-leg i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.grafico-ficha .g-bola { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.grafico-ficha .g-faixa { padding: 0 5px; border-radius: 3px; border: 1px solid #e5e7eb; color: #334155; }
.grafico-ficha .g-dica { position: absolute; z-index: 5; min-width: 220px; padding: 8px 10px; background: #fff; border: 1px solid var(--borda);
    border-radius: 8px; box-shadow: 0 6px 18px rgba(15, 23, 42, .15); font-size: 0.8rem; pointer-events: none; }
.comparacao-ficha { padding: 8px 12px 10px; border: 1px solid var(--borda); border-radius: 8px; background: #fff; }
.comparacao-ficha table { width: auto; font-size: 0.82rem; }
.comparacao-ficha th, .comparacao-ficha td { padding: 2px 8px; }

/* ---------- Painel Analítico: cartões Lista / Topo / Exibição (molde do ICEP) ---------- */
.eixos-caed { display: flex; flex-wrap: wrap; gap: 12px; }
.eixo-card {
    display: flex; align-items: flex-start; gap: 12px; flex: 1 1 220px; min-width: 0;
    background: #fff; border: 1px solid var(--borda); border-radius: 10px; padding: 10px 14px;
    text-align: left; font: inherit; color: inherit;
}
button.eixo-card { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
button.eixo-card:hover, button.eixo-card:focus-visible { border-color: var(--marca); box-shadow: 0 2px 8px rgba(31, 78, 121, .12); outline: 0; }
.eixo-card.eixo-exibicao { flex: 1 1 560px; }
#cardLista { flex: 1 1 320px; }
#cardTopo { flex: 1 1 280px; }
.eixo-card .degrau { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.eixo-card .eixo-icone { color: var(--marca); font-size: 1.15rem; margin-top: 2px; }
.eixo-card .eixo-seta { color: #b8c2cf; font-size: 0.85rem; margin-top: 3px; }
.eixo-card .eixo-corpo { flex: 1; min-width: 0; display: block; }
.eixo-card .eixo-titulo { display: block; font-size: 0.7rem; font-weight: 700; color: var(--texto-suave); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.eixo-card .eixo-valor { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; font-size: 0.9rem; font-weight: 600; color: #1d2733; }
.eixo-card .eixo-valor .bi-chevron-right { font-size: 0.65rem; color: #b8c2cf; }
.eixo-card .passo { color: var(--texto-suave); font-weight: 500; }
.eixo-card .passo.fixo { color: #a3adba; text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .2); }
.eixo-card .passo.atual { color: var(--marca); font-weight: 700; background: var(--marca-clara); border-radius: 6px; padding: 0 6px; }
.eixo-card .eixo-obs { display: block; font-size: 0.75rem; color: #8a5a00; margin-top: 2px; }
.eixo-card .eixo-obs:empty { display: none; }
.eixo-card .btn-group .btn .bi { margin-right: 2px; }

.modal-eixo { max-width: 640px; }
.opcoes-eixo { display: flex; flex-direction: column; gap: 6px; }
.opcao-eixo {
    display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; font: inherit; color: inherit;
    background: #fff; border: 1px solid var(--borda); border-radius: 8px; padding: 8px 12px; cursor: pointer;
}
.opcao-eixo:hover:not(:disabled) { border-color: var(--marca); background: #fafcfe; }
.opcao-eixo.ativa { border-color: var(--marca); background: var(--marca-clara); }
.opcao-eixo:disabled { cursor: not-allowed; opacity: 0.55; }
.opcao-eixo .marca { color: var(--marca); margin-top: 2px; }
.opcao-eixo .texto { display: block; min-width: 0; }
.opcao-eixo .rot { display: block; font-weight: 600; }
.opcao-eixo .rot .bi-chevron-right { font-size: 0.65rem; color: #9aa5b3; margin: 0 2px; }
.opcao-eixo .obs { display: block; font-size: 0.78rem; color: var(--texto-suave); margin-top: 1px; }
.opcao-eixo .agora { display: block; font-size: 0.75rem; color: var(--marca); margin-top: 3px; }

/* ---------- Pendências do município: um cartão por pendência, que leva à tela que resolve ---------- */
.grade-pendencias { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cartao-pendencia {
    display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--borda); border-left: 4px solid #d97706;
    border-radius: 10px; padding: 16px 18px; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cartao-pendencia:hover, .cartao-pendencia:focus-visible { box-shadow: 0 4px 14px rgba(31, 78, 121, .12); transform: translateY(-1px); color: inherit; outline: 0; }
.cartao-pendencia .cp-topo { display: flex; align-items: center; gap: 10px; }
.cartao-pendencia .cp-icone { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px;
    background: #fff4e0; color: #b45309; font-size: 1.05rem; }
.cartao-pendencia .cp-titulo { font-weight: 600; line-height: 1.25; }
.cartao-pendencia .cp-numero { font-size: 2rem; font-weight: 700; color: #b45309; line-height: 1.1; font-variant-numeric: tabular-nums; margin-top: 4px; }
.cartao-pendencia .cp-numero small { display: block; font-size: 0.8rem; font-weight: 400; color: var(--texto-suave); margin-top: 2px; }
.cartao-pendencia .cp-detalhe { font-size: 0.85rem; color: #1d2733; }
.cartao-pendencia .cp-dica { font-size: 0.8rem; color: var(--texto-suave); flex: 1; }
.cartao-pendencia .cp-acao { font-size: 0.85rem; font-weight: 600; color: var(--marca); margin-top: 4px; }
.cartao-pendencia.ok { border-left-color: #1f6b38; }
.cartao-pendencia.ok .cp-icone { background: #e3f4e8; color: #1f6b38; }
.cartao-pendencia.ok .cp-numero { color: #1f6b38; font-size: 1.35rem; }

/* ---------- Minilinha de desempenho (Acompanhamento do CAEd) ---------- */
.minilinha, .minilinha-eixo { display: block; overflow: visible; }
.minilinha .ml-fundo { fill: transparent; }
.minilinha .ml-ano { stroke: #dfe5ec; stroke-width: 1; }
.minilinha .ml-meio { stroke: #e9edf2; stroke-width: 1; stroke-dasharray: 2 3; }
.minilinha .ml-linha { stroke: #8fa6bf; stroke-width: 2; stroke-linecap: round; }
.minilinha .ml-pulo { stroke-dasharray: 3 3; stroke-width: 1.5; }
.minilinha .ml-ponto { fill: #8fa6bf; }
.minilinha .ml-ref { fill: var(--marca); stroke: #fff; stroke-width: 1.5; }
.minilinha .ml-cursor { stroke: #5b6675; stroke-width: 1; stroke-dasharray: 2 2; }
.minilinha-eixo text { font-size: 9px; fill: var(--texto-suave); font-weight: 600; }
td.celula-minilinha { vertical-align: middle; cursor: crosshair; }
.dica-minilinha {
    position: fixed; z-index: 1080; pointer-events: none; background: #1d2733; color: #fff; border-radius: 6px;
    padding: 5px 9px; font-size: 0.76rem; line-height: 1.35; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); white-space: nowrap;
}

/* Painel Analítico: cor comparada à média (▲▼ além de 1 desvio-padrão) e legenda da escala */
.pivot-caed .seta-desvio, .legenda-cor .seta-desvio { font-size: 0.62rem; color: #3d4754; vertical-align: 1px; }
.legenda-cor { display: inline-flex; align-items: center; gap: 4px; font-size: 0.75rem; color: var(--texto-suave); }
.legenda-cor .amostra-cor { display: inline-block; width: 18px; height: 12px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .06); }

/* Rótulo com dica (title): sublinhado pontilhado e cursor de ajuda */
.rotulo-dica { cursor: help; text-decoration: underline dotted rgba(0, 0, 0, .35); text-underline-offset: 3px; }

/* Acomp Aluno com os 9 ciclos: linha que separa os anos, o ano do filtro em destaque, células compactas */
.tabela-caed th.ano-ini, .tabela-caed td.ano-ini { border-left: 2px solid #dfe5ec; }
.tabela-caed thead th.ano-sel { color: var(--marca); }
.tabela-caed td.celula-outro-ano { font-size: 0.85rem; }
.tabela-caed td.celula-ciclo .selo-nivel, .tabela-caed td.celula-ciclo .pilula-faixa { white-space: nowrap; }
.tabela-caed .col-aluno { min-width: 210px; }
.tabela-caed td.celula-ciclo { padding-left: 3px; padding-right: 3px; min-width: 78px; }
.tabela-caed td.celula-ciclo .selo-faixa { font-size: 0.66rem; padding: 1px 5px; }

/* Acomp Aluno: abas (lista e Análise com IA) e a análise determinística (plano de estudo por habilidade) */
.abas-acomp { margin-bottom: 0; border-bottom: 0; }
.abas-acomp .nav-link { font-weight: 500; }
.abas-acomp + #resultado > .cartao, .abas-acomp ~ #analise > .cartao { border-top-left-radius: 0; }
.btn-analisar { border: 0; background: none; padding: 0 2px; color: #7c3aed; font-size: 0.85rem; vertical-align: baseline; }
.btn-analisar:hover { color: #5b21b6; }
.campo-analise { min-width: 320px; max-width: 520px; flex: 1; }
.aviso-ia { font-size: 0.8rem; color: #5b21b6; background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 8px; padding: 6px 10px; }
.texto-ia { margin: 0; padding-left: 1.2rem; font-size: 0.88rem; line-height: 1.55; }
.texto-ia li { margin: 3px 0; }
.metas-ia { display: flex; flex-wrap: wrap; gap: 10px; }
.meta-ia { border: 1px solid var(--borda); border-radius: 8px; padding: 8px 12px; min-width: 190px; max-width: 320px; background: #fff; }
.meta-ia .rot { font-size: 0.78rem; font-weight: 600; }
.meta-ia .num { font-size: 1.25rem; font-weight: 700; color: #b45309; }
.meta-ia .num small { font-size: 0.75rem; font-weight: 500; }
.meta-ia.meta-ok .num { color: #15803d; }
.plano-ia { padding-left: 1.4rem; margin: 0; }
.plano-ia > li { border: 1px solid var(--borda); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; background: #fff; }
.plano-ia > li::marker { font-weight: 700; color: var(--marca); }
.passos-ia { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 4px 0 6px; }
.passos-ia .seta { color: #94a3b8; font-size: 0.75rem; }
.passo-ia { display: inline-block; border-radius: 6px; padding: 0 6px; font-size: 0.75rem; font-weight: 600; border: 1px solid transparent; white-space: nowrap; cursor: help; }
.passo-ia small { font-weight: 400; opacity: .8; }
.passo-ia.passo-baixo { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.passo-ia.passo-medio { background: #ffedd5; color: #9a3412; border-color: #fed7aa; }
.passo-ia.passo-ok { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.passo-ia.passo-inicio { box-shadow: 0 0 0 2px var(--marca); }
.selo.prior-base { background: #fee2e2; color: #991b1b; }
.selo.prior-turma { background: #ffedd5; color: #9a3412; }
.selo.prior-consolidar { background: #e0e7ff; color: #3730a3; }
.tabela-ia { font-size: 0.82rem; }
.tabela-ia th { font-size: 0.7rem; text-transform: uppercase; color: var(--texto-suave); font-weight: 600; }
.tabela-ia td { vertical-align: middle; }
/* Plano da turma (o ✦ do Acomp Turma): os alunos pelo nível, uma coluna por nível */
.grupos-turma { display: flex; flex-wrap: wrap; gap: 10px; }
.grupo-turma { flex: 1 1 200px; max-width: 320px; border: 1px solid var(--borda); border-radius: 8px; overflow: hidden; background: #fff; }
.grupo-turma .grupo-cab { font-size: 0.78rem; font-weight: 700; padding: 4px 10px; }
.grupo-turma ul { list-style: none; margin: 0; padding: 6px 10px; font-size: 0.8rem; line-height: 1.6; }
.grupo-turma .selo { font-size: 0.68rem; }
.linha-nomes-ia > td { background: #fafbfc; }
.nomes-ia { columns: 4 170px; column-gap: 18px; font-size: 0.75rem; line-height: 1.55; padding: 2px 4px; }
.nomes-ia span { display: block; break-inside: avoid; }
.vezes-ia { display: flex; flex-wrap: wrap; gap: 0 12px; max-width: 420px; }
.vezes-ia > span { white-space: nowrap; }

/* Acomp Turma: barrinha da distribuição pelos níveis, turma que abre os alunos, divisórias dos grupos */
.barra-faixas { display: flex; width: 64px; height: 6px; margin: 4px auto 0; border-radius: 3px; overflow: hidden; background: #eef1f5; cursor: help; }
.barra-faixas i { display: block; height: 100%; }
.btn-abrir-turma { border: 0; background: none; padding: 0; color: var(--marca); text-align: left; }
.btn-abrir-turma .bi { font-size: 0.75rem; color: var(--texto-suave); }
.btn-abrir-turma:hover span { text-decoration: underline; }
.tabela-caed tr.linha-divisor td { background: #f8fafc; color: var(--texto-suave); font-size: 0.8rem; font-weight: 600; padding: 6px 10px; }
.tabela-caed tr.fora-comparacao td { color: #64748b; }
.tabela-caed tr.linha-alunos-turma > td { background: #fbfcfe; padding: 6px 10px 12px; border-top: 0; }
.tabela-alunos-turma { width: auto; font-size: 0.82rem; background: #fff; border: 1px solid var(--borda); }
.tabela-alunos-turma td, .tabela-alunos-turma th { padding: 3px 10px; vertical-align: middle; }

/* Sanfona por componente (Acerto por habilidade em Alunos) */
.sanfona-hab { border: 1px solid var(--borda); border-radius: 8px; margin-bottom: 8px; background: #fff; overflow: hidden; }
.sanfona-hab > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 14px; cursor: pointer; list-style: none; background: #f8fafc; }
.sanfona-hab > summary::-webkit-details-marker { display: none; }
.sanfona-hab > summary .seta { font-size: 0.75rem; color: var(--texto-suave); transition: transform .15s; }
.sanfona-hab[open] > summary .seta { transform: rotate(90deg); }
.sanfona-hab[open] > summary { border-bottom: 1px solid var(--borda); }
.sanfona-hab .tabela-leitura { margin: 0; }

/* Nomes para conferir (nomes-conferir.html): a escolha da grafia certa em cartões */
.opcoes-nome { display: grid; gap: .5rem; }
.opcao-nome { display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .75rem; border: 1px solid var(--bs-border-color); border-radius: .5rem; cursor: pointer; }
.opcao-nome:hover { border-color: var(--bs-primary); }
.opcao-nome:has(input[type=radio]:checked) { border-color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), .06); }
.opcao-nome .form-check-input { margin-top: .2rem; flex-shrink: 0; }
.opcao-nome .on-nome { display: block; font-weight: 600; }
.opcao-nome .on-detalhe { display: block; font-size: .8rem; color: var(--bs-secondary-color); }
