/* ============================================================
   Plataforma de Gestão Escolar (GOTI)
   Tipografia self-hosted — igual ao projecto centro-formacao:
   Space Grotesk (títulos) + Inter (corpo). Sem CDN de fontes.
   ============================================================ */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk/space-grotesk-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk/space-grotesk-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk/space-grotesk-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter/inter-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter/inter-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter/inter-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter/inter-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
}

html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, .font-display { font-family: var(--font-display); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* ===== Cabeçalho de tabela fixo ao percorrer a lista ===== */
/* Aplica-se a todas as tabelas dentro da área de conteúdo. O <thead> fica
   preso ao topo do contentor com scroll (a <main>, ou um wrapper .table-scroll). */
main table thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: #f8fafc;                 /* slate-50 — opaco, para as linhas não transparecerem */
  box-shadow: inset 0 -1px 0 #e2e8f0;        /* linha de separação, imune ao border-collapse */
}
/* Contentor opcional para dar à tabela uma altura máxima com scroll próprio */
.table-scroll {
  max-height: 70vh;
  overflow: auto;
}

/* ===== Páginas imprimíveis (declarações, histórico, comprovativos, cartão) ===== */
.doc-body { background: #eef2f7; color: #0f172a; padding: 28px 16px; }
.doc-toolbar { max-width: 780px; margin: 0 auto 18px; display: flex; gap: 8px; justify-content: center; }
.doc-btn { border: 0; border-radius: 8px; padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; }
.doc-btn.primary { background: var(--doc-c, #1d4ed8); color: #fff; }
.doc-btn.ghost { background: #fff; color: #475569; border: 1px solid #cbd5e1; }
.doc-sheet {
  max-width: 780px; margin: 0 auto; background: #fff; padding: 40px 46px;
  box-shadow: 0 10px 30px rgba(2,6,23,.12); border-radius: 4px;
  font-size: 13px; line-height: 1.7;
}
.doc-lh { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid var(--doc-c, #1d4ed8); padding-bottom: 12px; margin-bottom: 22px; }
.doc-lh img { height: 52px; width: auto; }
.doc-lh .name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 17px; color: var(--doc-c, #1d4ed8); }
.doc-lh .meta { font-size: 11px; color: #64748b; }
.doc-title { text-align: center; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 16px; letter-spacing: .5px; text-transform: uppercase; margin: 8px 0 22px; }
.doc-sign { margin-top: 54px; display: flex; justify-content: space-between; font-size: 12px; }
.doc-sign .line { border-top: 1px solid #0f172a; padding-top: 4px; min-width: 210px; text-align: center; }
.doc-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 11.5px; }
.doc-table th, .doc-table td { border: 1px solid #cbd5e1; padding: 5px 8px; text-align: left; }
.doc-table th { background: #f1f5f9; }
.doc-table td.num { text-align: center; }

@media print {
  .doc-body { background: #fff; padding: 0; }
  .doc-toolbar { display: none; }
  .doc-sheet { box-shadow: none; max-width: none; margin: 0; padding: 24mm 20mm; }
}
