/* =====================================================================
   IGE Gestão — tema no padrão de telas que a equipe já conhece
   (medidas, cores e espaçamentos replicados tela a tela).
   Carregado por último: sobrepõe style.css apenas no sistema da secretaria.
   ===================================================================== */
:root {
  --em-azul: #007bff;
  --em-azul2: #0066ff;
  --em-texto: #444f7b;
  --em-escuro: #1e293b;
  --em-cinza: #64748b;
  --em-icone: #475569;
  --em-fundo: #f5f7fa;
  --em-linha: #edeff6;
  --em-borda: #cacfe0;
  --em-borda2: #dce0ee;
  --em-ro: #e6e9f3;
  --em-sel: #e5f2ff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
  font-size: 14px;
  color: var(--em-texto);
}
body { background: var(--em-fundo); color: var(--em-texto); line-height: 1.5; }
a { color: var(--em-azul); }

/* ---------------------------------------------------------------- barra lateral de módulos */
.l8 { grid-template-columns: 72px 1fr; }
.rail { width: 72px; background: linear-gradient(60deg, var(--em-azul2) 0%, var(--em-azul) 100%); padding: 14px 0; gap: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.rail-logo { width: 44px; height: 44px; border-radius: 10px; margin: 0 0 12px; box-shadow: none; }
.rail-logo img { width: 36px; height: 36px; }
.rail-bt { width: 48px; height: 48px; border-radius: 10px; color: #fff; }
.rail-bt svg { width: 22px; height: 22px; stroke-width: 1.45; }
.rail-bt:hover { background: rgba(255,255,255,.16); }
.rail-bt.ativo { background: #fff; color: var(--em-azul); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.rail-bt.aberto { background: rgba(255,255,255,.24); }
.rail-sep { width: 41px; height: 1px; background: rgba(255,255,255,.16); margin: 4px 0 6px; }

/* painel de submódulos */
.painel { left: 72px; width: 320px; background: #fff; border: 0; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,.08); color: var(--em-escuro); animation: none; }
.em-pn-tit { display: block; width: 100%; text-align: left; background: none; border: 1px solid transparent; padding: 6px 0; font: inherit; font-size: 17px; font-weight: 600; color: var(--em-escuro); cursor: pointer; border-radius: 4px; }
.em-pn-tit:hover { color: var(--em-azul); }
.em-pn-cam { display: block; min-height: 18px; font-size: 12px; font-weight: 500; color: var(--em-escuro); }
.em-pn-sep { border: 0; border-top: 1px solid var(--em-borda2); margin: 12px 0 7px; opacity: 1; }
.em-pn-busca { position: relative; margin: 3.5px 0 10.5px; }
.em-pn-busca svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--em-cinza); }
.em-pn-busca input { width: 100%; height: 39px; border: 1px solid var(--em-borda2) !important; border-radius: 8px !important; padding: 9px 12px 9px 34px !important; font-size: 13px; color: var(--em-escuro); background: #fff; box-shadow: none !important; }
.em-pn-lista { flex: 1; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.em-pn-bt { display: flex; align-items: center; width: 100%; min-height: 48px; margin: 3.5px 0; padding: 10px 12px; border: 1px solid var(--em-borda2); border-radius: 8px; background: #fff; color: var(--em-escuro); font: inherit; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; gap: 14px; }
.em-pn-bt:hover { border-color: var(--em-azul); color: var(--em-azul); }
.em-pn-bt .ic { width: 20px; display: flex; justify-content: center; color: var(--em-icone); }
.em-pn-bt .ic svg { width: 19px; height: 19px; stroke-width: 1.5; }
.em-pn-bt .tx { flex: 1; }
.em-pn-bt .ch { color: var(--em-cinza); display: flex; } .em-pn-bt .ch svg { width: 13px; height: 13px; stroke-width: 2; }
.em-pn-bt:hover .ic { color: var(--em-azul); }

/* ---------------------------------------------------------------- área de trabalho (cartão branco) */
.l8 .main { background: #fff; margin: 14px 10px 42px 11px; padding: 21px; border-radius: 4px; box-shadow: 0 20px 50px -20px rgba(0,0,150,.1); align-self: start; min-height: calc(100vh - 56px); }
.l8 .main.em-home { background: transparent; box-shadow: none; padding: 8px 0 0; margin: 14px 10px 42px 11px; }

/* cabeçalho da função: título azul + caminho + Favorito */
.topo { display: block; margin: 0; }
.topo-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 21px; min-height: 42px; }
.topo h1 { margin: 0; font-size: 14px; font-weight: 500; color: var(--em-azul); line-height: 1.2; }
.em-mig { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 7px 0 0; font-size: 12px; font-weight: 500; color: var(--em-texto); }
.em-mig li + li { padding-left: 7px; } .em-mig li + li::before { content: "/"; padding-right: 7px; color: #6c757d; }
.topo .sub { margin-top: 6px; font-size: 12.5px; color: var(--em-cinza); }
.topo .sub:empty { display: none; }
.em-fav { display: inline-flex; align-items: center; gap: 7px; height: 37px; padding: 7px 21px; border: 1px solid var(--em-ro); background: var(--em-ro); color: var(--em-texto); border-radius: 4px; font: inherit; cursor: pointer; white-space: nowrap; }
.em-fav svg { width: 15px; height: 15px; }
.em-fav.on svg { fill: currentColor; } .em-fav.on { color: var(--em-azul); }
/* barra de ferramentas cinza */
.topo .acoes.em-barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; background: var(--em-linha); margin: 0 -21px 14px; padding: 14px 21px; min-height: 65px; }
.em-barra .espaco.fim { order: 98; flex: 1; }
.em-barra .fim { order: 99; }

/* ---------------------------------------------------------------- botões */
.btn { height: 37px; padding: 7px 21px; border: 1px solid var(--em-borda); background: #fff; color: var(--em-texto); border-radius: 4px; font-size: 14px; line-height: 1.5; gap: 7px; transition: color .15s, background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { background: #fff; border-color: var(--em-azul); color: var(--em-azul); }
.btn svg { width: 15px; height: 15px; }
.btn.pri { background: var(--em-azul); border-color: var(--em-azul); color: #fff; box-shadow: 0 5px 10px #cce5ff; }
.btn.pri:hover { background: #0069d9; border-color: #0062cc; color: #fff; }
.btn.az { background: #fff; border-color: var(--em-borda); color: var(--em-texto); }
.btn.az:hover { border-color: var(--em-azul); color: var(--em-azul); }
.btn.perigo, .btn.cancelar { color: var(--em-texto); border-color: var(--em-borda); }
.btn.perigo:hover, .btn.cancelar:hover { color: #fff; background: #dc3545; border-color: #dc3545; }
.btn.peq { height: 32px; padding: 5.25px 10.5px; font-size: 13px; }
.acoes { gap: 7px; }

/* ---------------------------------------------------------------- campos */
.form { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 21px; }
.campo { gap: 0; margin-bottom: 14px; }
.campo label, .em-lbl { font-size: 14px; font-weight: 500; color: var(--em-texto); line-height: 26px; min-height: 26px; display: flex; }
.campo label .req { color: inherit; margin-left: 3px; }
.campo .ajuda { font-size: 12px; color: var(--em-cinza); margin-top: 3px; }
input, select, textarea { height: 39px; padding: 6.3px 10.5px 4.2px; border: 1px solid var(--em-borda); border-radius: 4px; background: #fff; color: var(--em-texto); font-size: 14px; }
textarea { height: auto; min-height: 78px; padding: 8px 10.5px; }
input[type=checkbox], input[type=radio] { height: auto; width: auto; }
select { appearance: none; -webkit-appearance: none; padding-right: 30px; background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3e%3cpath d='M0 0h10L5 6z' fill='%23444f7b'/%3e%3c/svg%3e") no-repeat right 12px center / 9px 6px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: #80bdff; box-shadow: 0 0 0 .2rem rgba(0,123,255,.25); }
input[readonly], input:disabled, select:disabled, textarea[readonly], textarea:disabled { background-color: var(--em-ro); border-color: var(--em-ro); color: var(--em-texto); opacity: 1; }
.chk { padding-top: 26px; gap: 8px; font-weight: 400 !important; }
.filtros { gap: 0 21px; margin-bottom: 7px; }
.filtros .btn { margin-bottom: 14px; }
.lk-lista { border-color: var(--em-borda2); border-radius: 4px; }
.lk-lista div:hover { background: var(--em-sel); }
.lk-novo { color: var(--em-azul); font-size: 12.5px; }

/* grupo de botões Sim/Não (alternância) */
.seg { display: flex; width: 100%; border: 0; border-radius: 4px; overflow: visible; }
.seg button { flex: 1; height: 39px; padding: 5.25px 10.5px; border: 1px solid var(--em-borda); background: #fff; color: var(--em-texto); font-weight: 400; margin-left: -1px; border-radius: 0; }
.seg button:first-child { margin-left: 0; border-radius: 4px 0 0 4px; }
.seg button:last-child { border-radius: 0 4px 4px 0; }
.seg button + button { border-left: 1px solid var(--em-borda); }
.seg button.ativo { background: var(--em-sel); border-color: #0d6efd; color: var(--em-azul); font-weight: 400; position: relative; z-index: 1; }

/* abas em "pílulas" */
.tabs { display: flex; flex-wrap: wrap; gap: 0; border: 0; margin: 0 0 7px; overflow: visible; }
.tabs button { display: inline-flex; align-items: center; gap: 7px; height: 37px; margin: 7px 10.5px 7px 0; padding: 7px 14px; border: 1px solid var(--em-borda); border-radius: 5.25px; background: transparent; color: #0d6efd; font-weight: 400; }
.tabs button svg { width: 15px; height: 15px; }
.tabs button:hover { color: #0a58ca; }
.tabs button.ativo { background: var(--em-azul); border-color: var(--em-azul); color: #fff; font-weight: 400; box-shadow: 0 5px 10px rgba(0,123,255,.3); }

/* seções recolhíveis (acordeão) */
.em-acc { background: #fff; border: 1px solid var(--em-borda2); border-radius: 8px; margin-bottom: 14px; overflow: hidden; }
.em-acc > summary { list-style: none; display: flex; align-items: center; padding: 14px 17.5px; cursor: pointer; color: var(--em-texto); font-size: 14px; box-shadow: inset 0 -1px 0 var(--em-borda2); }
.em-acc > summary::-webkit-details-marker { display: none; }
.em-acc > summary::after { content: ""; margin-left: auto; width: 17.5px; height: 17.5px; background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23052c65'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") no-repeat center / 17.5px; transform: rotate(-180deg); transition: transform .2s; }
.em-acc:not([open]) > summary { box-shadow: none; }
.em-acc:not([open]) > summary::after { transform: none; }
.em-acc > .em-acc-c { padding: 17.5px 17.5px 3.5px; }

/* cartões dentro da área de trabalho */
.l8 .main .card { border: 1px solid var(--em-borda2); border-radius: 8px; box-shadow: none; padding: 17.5px; }
.l8 .main .topo + .card, .l8 .main .em-limpo { border: 0; padding: 0; }
.kpi { border-color: var(--em-borda2); border-radius: 8px; }
h2 { font-size: 15px; font-weight: 600; color: var(--em-escuro); }
h3 { color: var(--em-texto); font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 14px; }
.tag { border-radius: 4px; font-weight: 500; }

/* ---------------------------------------------------------------- grades (listas) */
.l8 .main table:not(.sem-grade) { border-collapse: separate; border-spacing: 0 5px; width: 100%; }
.l8 .main table:not(.sem-grade) th { background: var(--em-azul); color: #fff; font-size: 14px; font-weight: 400; height: 51px; padding: 0 9px; border: 0; white-space: nowrap; text-align: left; }
.l8 .main table:not(.sem-grade) th:first-child { border-radius: 4px 0 0 4px; padding-left: 12px; }
.l8 .main table:not(.sem-grade) th:last-child { border-radius: 0 4px 4px 0; }
.l8 .main table.em-grade th.ord { cursor: pointer; user-select: none; }
.l8 .main table.em-grade th.ord::before { content: "⇕"; margin-right: 5px; font-size: 12px; opacity: .9; }
.l8 .main table:not(.sem-grade) td { height: 39px; padding: 2px 9px; border-top: 1px solid var(--em-linha); border-bottom: 1px solid var(--em-linha); background: #fff; color: var(--em-texto); }
.l8 .main table:not(.sem-grade) td:first-child { border-left: 1px solid var(--em-linha); border-radius: 4px 0 0 4px; padding-left: 12px; }
.l8 .main table:not(.sem-grade) td:last-child { border-right: 1px solid var(--em-linha); border-radius: 0 4px 4px 0; }
.l8 .main table:not(.sem-grade) tbody tr:nth-child(odd) td { background: var(--em-linha); }
.l8 .main table:not(.sem-grade) tr.click:hover td { background: var(--em-sel); border-color: var(--em-sel); cursor: pointer; }
.l8 .main table:not(.sem-grade) tr.em-cancelado td { background: #fde8ea !important; border-color: #f1aeb5 !important; color: #dc3545; }
.l8 .main table:not(.sem-grade) tr.em-cancelado td:first-child { border-left-color: #dc3545 !important; }
.l8 .main table:not(.sem-grade) tr.em-cancelado td:last-child { border-right-color: #dc3545 !important; }
.l8 .main table:not(.sem-grade) tfoot td { font-weight: 600; background: var(--em-fundo); }
.tbl-wrap { overflow-x: auto; }
.em-acoes-linha { white-space: nowrap; text-align: right; width: 1%; }
.em-ic { display: inline-flex; align-items: center; justify-content: center; width: 33px; height: 32px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--em-texto); cursor: pointer; vertical-align: middle; }
.em-ic svg { width: 16px; height: 16px; stroke-width: 1.5; }
.em-ic:hover { color: #fff; background: var(--em-azul); }
.em-ic.ok:hover { background: #198754; } .em-ic.del:hover { background: #dc3545; }
tr.em-cancelado .em-ic { color: #dc3545; }
.em-rodape-grade { display: flex; align-items: center; gap: 10px; margin-top: 7px; color: var(--em-cinza); }
.vazio { color: var(--em-cinza); }

/* ---------------------------------------------------------------- Ficha do aluno */
.em-linha { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 21px; }
.em-c2 { grid-column: span 2; } .em-c3 { grid-column: span 3; } .em-c4 { grid-column: span 4; } .em-c5 { grid-column: span 5; } .em-c6 { grid-column: span 6; } .em-c7 { grid-column: span 7; } .em-c8 { grid-column: span 8; } .em-c9 { grid-column: span 9; } .em-c10 { grid-column: span 10; } .em-c12 { grid-column: span 12; }
.em-busca-in { display: flex; }
.em-busca-in input { border-radius: 4px 0 0 4px; border-right: 0; }
.em-busca-in .btn { height: 39px; border-radius: 0 4px 4px 0; padding: 7px 21px; }
.em-recarregar { display: flex; justify-content: flex-end; margin-bottom: 4px; }
.em-recarregar .btn { width: 53px; padding: 0; justify-content: center; }
.em-foto { position: relative; width: 100%; max-width: 242px; height: 223px; background: var(--em-ro); border-radius: 7px; overflow: hidden; box-shadow: 0 20px 50px -20px rgba(0,0,150,.1); display: flex; align-items: center; justify-content: center; color: #9aa3bf; }
.em-foto img { width: 100%; height: 100%; object-fit: cover; }
.em-foto > svg { width: 84px; height: 84px; stroke-width: 1; }
.em-foto-bar { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.45); color: #fff; text-align: center; padding: 4px 0; font-size: 14px; cursor: pointer; }
.em-foto-menu { position: absolute; inset: 0; background: rgba(30,41,59,.82); display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 16px; }
.em-foto-menu button { background: #fff; border: 0; border-radius: 4px; padding: 7px; font: inherit; color: var(--em-texto); cursor: pointer; }
.em-foto-menu button:hover { background: var(--em-sel); color: var(--em-azul); }
.em-ficha-topo { display: grid; grid-template-columns: minmax(180px, 242px) 1fr; gap: 21px; margin-bottom: 7px; }
.em-sn { display: flex; }
.em-quick dt { font-weight: 500; color: var(--em-cinza); font-size: 12.5px; } .em-quick dd { margin: 0 0 8px; }
.em-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }

/* ---------------------------------------------------------------- tela inicial */
.h8-cab { border: 1px solid var(--em-borda2); border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; gap: 16px; }
.h8-logo { width: 104px; height: 84px; border: 1px solid rgba(15,30,60,.1); border-radius: 10px; padding: 8px 16px; box-shadow: 0 1px 2px rgba(15,30,60,.05); }
.h8-ola { border-left: 1px solid var(--em-borda2); padding-left: 16px; }
.h8-ola h1 { font-size: 22px; font-weight: 600; color: var(--em-escuro); letter-spacing: 0; }
.h8-ola .sub { font-size: 13px; color: var(--em-cinza); }
.h8-sino { width: 42px; height: 42px; border-color: var(--em-borda2); border-radius: 8px; color: var(--em-icone); }
.h8-sino svg { width: 20px; height: 20px; }
.sino-n { background: #dc3545; border-radius: 9999px; top: -7px; right: -7px; font-size: 10.5px; }
.h8-busca { border: 1px solid var(--em-borda2); border-radius: 8px; padding: 0 16px; margin-bottom: 24px; height: 48px; }
.h8-busca svg { width: 17px; height: 17px; color: var(--em-cinza); }
.h8-busca input { font-size: 15px; height: 46px; padding: 0 !important; color: var(--em-escuro); }
.h8-grid { grid-template-columns: 1fr 340px; gap: 24px; }
.h8-box { border: 1px solid var(--em-borda2); border-radius: 8px; }
.h8-box-cab { padding: 14px 20px; border-bottom: 1px solid var(--em-borda2); }
.h8-box-cab b { font-size: 15px; font-weight: 600; color: var(--em-escuro); }
.h8-box-cab a { font-size: 13px; color: var(--em-azul); padding: 4px 6px; border-radius: 4px; }
.h8-box-cab a:hover { background: var(--em-sel); }
.h8-filtro { background: var(--em-linha); border-radius: 8px; margin: 16px 20px 12px; height: 38px; }
.h8-filtro input { font-size: 13.5px; height: 36px; }
.h8-favs { padding: 0 20px 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.h8-fav { border: 1px solid var(--em-borda2); border-left: 4px solid var(--em-azul); border-radius: 8px; padding: 8px 10px; min-height: 64px; }
.h8-fav b { font-size: 16px; font-weight: 400; color: var(--em-escuro); }
.h8-fav small { font-size: 13px; color: var(--em-cinza); }
.h8-fav-ic { color: var(--em-azul); } .h8-fav-ic svg { width: 24px; height: 24px; stroke-width: 1.4; }
.h8-com { border: 1px solid #86efac; border-radius: 8px; box-shadow: inset 0 0 0 1px #86efac; }
.h8-com-faixa { background: linear-gradient(120deg, #0b3d91, var(--em-azul)); }
.h8-com-tx { padding: 12px 14px; }
.h8-tag { background: #e8f1ff; color: var(--em-azul); }
.em-badge-novos { background: #dc3545; color: #fff; border-radius: 9999px; font-size: 10.5px; font-weight: 600; padding: 1px 8px; margin-left: 4px; }

/* ---------------------------------------------------------------- janelas */
.modal { border-radius: 7px; padding: 21px; }
.modal h2 { font-size: 17px; color: var(--em-escuro); }
.modal .rodape { gap: 7px; }
#toast div { background: #1e293b; border-radius: 4px; }

@media (max-width: 1000px) {
  .em-linha { grid-template-columns: 1fr; } .em-linha > * { grid-column: 1 / -1; }
  .em-ficha-topo { grid-template-columns: 1fr; }
  .l8 .main { margin: 8px 6px 30px; padding: 14px; } .topo .acoes.em-barra { margin: 0 -14px 14px; padding: 10px 14px; }
}
@media (max-width: 700px) { .l8 { grid-template-columns: 60px 1fr; } .rail { width: 60px; } .painel { left: 60px; width: calc(100vw - 60px); } }
.em-badge-novos, .h8-box-cab a { white-space: nowrap; }

/* ---------------------------------------------------------------- ajustes finos do menu (2ª rodada) */
.rail-logo { background: transparent; box-shadow: none; width: 48px; height: 40px; margin: 0; border-radius: 0; }
.rail-logo svg { display: block; }
.rail-sep { display: block; width: 41px; height: 1px; background: rgba(255,255,255,.16); margin: 10px 0 8px; flex: none; }
.rail-bt.aberto, .rail-bt.ativo { background: #fff; color: var(--em-azul); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.rail-bt svg { width: 21px; height: 21px; }
.painel { overflow: visible; }
.em-pn-cam { color: var(--em-azul); font-size: 12px; font-weight: 500; }
.em-pn-recolher { position: absolute; top: 28px; right: -13px; width: 26px; height: 26px; border: 0; border-radius: 5px; background: var(--em-azul); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; box-shadow: 0 2px 6px rgba(0,123,255,.35); }
.em-pn-recolher svg { width: 15px; height: 15px; }
.em-pn-bt { font-size: 13px; font-weight: 500; color: var(--em-escuro); }
.em-pn-bt .ic { color: var(--em-icone); }
.em-pn-sub { display: block; font-size: 11.5px; font-weight: 400; color: var(--em-cinza); margin-top: 2px; }
