/*!
 * Design System FECQJ · v1
 * Padrão visual único das telas da Fundação Educandário, baseado em educandariorp.com.br.
 * Servido em https://design.integrado.educandariorp.com.br/v1/fecqj.css (os apps importam, não copiam).
 * Prefixo de tudo: fx- (classes) e --fx- (tokens). Só tema claro.
 */

/* ============================== 1. Fonte ============================== */
/* Montserrat variável (OFL, ver fontes/OFL.txt), servida pelo próprio domínio. */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fontes/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fontes/montserrat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ============================== 2. Tokens ============================= */
:root {
  /* Paleta do site */
  --fx-navy: #131322;
  --fx-navy-2: #1b1b34;
  --fx-verde: #88c540;
  --fx-azul: #1a98d2;
  --fx-laranja: #f16033;
  --fx-amarelo: #fbde06;
  --fx-header-destaque: #ff0c0c; /* sublinhado do menu, igual ao site */

  /* Ação: #1A98D2 só em áreas grandes; texto, links e botões usam o tom com contraste 5:1 */
  --fx-acao: #1577a6;
  --fx-acao-hover: #10628a;
  --fx-acao-suave: #e8f3f9;
  --fx-foco: 0 0 0 3px rgba(21, 119, 166, 0.28);

  /* Texto e superfícies */
  --fx-texto: #131322;
  --fx-texto-2: #4a4b5e;
  --fx-texto-3: #6a6b7d;
  --fx-fundo: #f5f6f8;
  --fx-superficie: #ffffff;
  --fx-superficie-2: #fafbfc;
  --fx-borda: #e3e5ea;
  --fx-borda-forte: #cdd0d8;
  --fx-borda-campo: #868898; /* 3:1 sobre branco (WCAG 1.4.11) */

  /* Status: fundo claro + texto escuro do mesmo tom */
  --fx-ok: #4f8a1b;        --fx-ok-fundo: #eef7e3;        --fx-ok-texto: #3b6714;
  --fx-atencao: #fbde06;   --fx-atencao-fundo: #fef8cc;   --fx-atencao-texto: #665500;
  --fx-atrasado: #f16033;  --fx-atrasado-fundo: #fde9e1;  --fx-atrasado-texto: #a3361a;
  --fx-erro: #c8281c;      --fx-erro-fundo: #fde8e7;      --fx-erro-texto: #a11e14;
  --fx-info: #1a98d2;      --fx-info-fundo: #e3f3fb;      --fx-info-texto: #0e5f87;
  --fx-neutro: #6a6b7d;    --fx-neutro-fundo: #eeeff2;    --fx-neutro-texto: #4a4b5e;

  /* Tipografia: trocar a fonte é mudar só esta linha */
  --fx-fonte: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fx-fonte-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --fx-t-xs: 12px;
  --fx-t-p: 14px;
  --fx-t-base: 16px;
  --fx-t-m: 18px;
  --fx-t-g: 24px;
  --fx-t-gg: 40px;

  /* Raios: os mesmos do site, por elemento */
  --fx-raio-campo: 6px;
  --fx-raio-card: 8px;
  --fx-raio-botao: 10px;
  --fx-raio-painel: 14px;
  --fx-raio-pilula: 999px;

  /* Sombras */
  --fx-sombra-card: 0 1px 2px rgba(19, 19, 34, 0.06);
  --fx-sombra-card-hover: 0 10px 24px -10px rgba(19, 19, 34, 0.22);
  --fx-sombra-painel: 0 18px 45px -12px rgba(13, 27, 62, 0.45);
  --fx-sombra-gaveta: 0 0 10px rgba(0, 0, 0, 0.19);

  /* Layout */
  --fx-header-altura: 90px;
  --fx-container: 1140px;
  --fx-container-largo: 1440px;
  --fx-gutter: 15px;
  --fx-duracao: 0.3s;

  color-scheme: light;
}
@media (max-width: 991.98px) {
  :root { --fx-header-altura: 82px; --fx-gutter: 24px; }
}
@media (max-width: 575.98px) {
  :root { --fx-gutter: 20px; --fx-t-gg: 28px; }
}

/* ============================== 3. Base =============================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  margin: 0;
  font-family: var(--fx-fonte);
  font-size: var(--fx-t-base);
  line-height: 1.5;
  color: var(--fx-texto);
  background: var(--fx-fundo);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--fx-acao); }
a:hover { color: var(--fx-acao-hover); }
:focus-visible { outline: 2px solid var(--fx-acao); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }
code { font-family: var(--fx-fonte-mono); font-size: 0.86em; background: var(--fx-neutro-fundo); padding: 1px 6px; border-radius: 4px; }
.fx-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
html.fx-travado { overflow: hidden; }

/* Ícones Lucide (fecqj.js injeta o símbolo sob demanda) */
.fx-i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fx-i--p { width: 16px; height: 16px; }
.fx-i--g { width: 24px; height: 24px; }

/* ============================== 4. Layout ============================= */
.fx-pagina { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.fx-main { flex: 1 0 auto; padding: 40px 0 64px; }
/* Igual ao site: caixa de 1140px com 15px de respiro dos lados (conteúdo útil de 1110px) */
.fx-container { width: 100%; max-width: var(--fx-container); margin: 0 auto; padding: 0 var(--fx-gutter); }
.fx-container--largo { max-width: var(--fx-container-largo); }
@media (max-width: 575.98px) { .fx-main { padding: 28px 0 48px; } }

.fx-cabecalho { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.fx-titulo { font-size: var(--fx-t-gg); font-weight: 900; color: var(--fx-acao); letter-spacing: -0.01em; }
.fx-subtitulo { margin-top: 6px; font-size: var(--fx-t-base); color: var(--fx-texto-2); }
.fx-secao-titulo { font-size: var(--fx-t-m); font-weight: 800; color: var(--fx-texto); }
.fx-sobretitulo { font-size: var(--fx-t-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fx-texto-3); }
.fx-mudo { color: var(--fx-texto-3); }

/* ============================== 5. Botões ============================= */
.fx-btn {
  --b-cor: var(--fx-acao);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 22px;
  border: 1px solid var(--b-cor); border-radius: var(--fx-raio-botao);
  background: transparent; color: var(--b-cor);
  font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  cursor: pointer; user-select: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.fx-btn:hover { background: var(--fx-acao-suave); color: var(--fx-acao-hover); }
.fx-btn:focus-visible { outline: none; box-shadow: var(--fx-foco); }
.fx-btn:disabled, .fx-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.fx-btn--primario { background: var(--fx-acao); color: #fff; }
.fx-btn--primario:hover { background: var(--fx-acao-hover); border-color: var(--fx-acao-hover); color: #fff; }
.fx-btn--secundario { background: var(--fx-superficie); }
.fx-btn--perigo { --b-cor: var(--fx-erro); background: var(--fx-erro); color: #fff; }
.fx-btn--perigo:hover { background: var(--fx-erro-texto); border-color: var(--fx-erro-texto); color: #fff; }
.fx-btn--perigo-contorno { --b-cor: var(--fx-erro); background: var(--fx-superficie); }
.fx-btn--perigo-contorno:hover { background: var(--fx-erro-fundo); color: var(--fx-erro-texto); }
.fx-btn--fantasma { border-color: transparent; color: var(--fx-texto-2); }
.fx-btn--fantasma:hover { background: var(--fx-neutro-fundo); color: var(--fx-texto); }
.fx-btn--p { min-height: 36px; padding: 7px 14px; font-size: var(--fx-t-p); gap: 6px; }
.fx-btn--icone { padding: 0; width: 44px; }
.fx-btn--p.fx-btn--icone { width: 36px; }
.fx-btn--bloco { width: 100%; }
.fx-btn.fx-carregando { position: relative; color: transparent !important; pointer-events: none; }
.fx-btn.fx-carregando::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid currentColor; border-color: #fff #fff transparent transparent; border-radius: 50%; animation: fx-girar 0.7s linear infinite; }
.fx-btn--secundario.fx-carregando::after, .fx-btn:not([class*="--"]).fx-carregando::after { border-color: var(--fx-acao) var(--fx-acao) transparent transparent; }

/* ============================== 6. Campos ============================= */
.fx-campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fx-rotulo { font-size: var(--fx-t-p); font-weight: 600; color: var(--fx-texto); }
.fx-rotulo small { font-weight: 400; color: var(--fx-texto-3); }
.fx-obrigatorio { color: var(--fx-erro); font-weight: 700; margin-left: 2px; }
.fx-input, .fx-select, .fx-textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  font-size: var(--fx-t-base); /* 16px: o iOS não dá zoom ao focar */
  background: var(--fx-superficie); color: var(--fx-texto);
  border: 1px solid var(--fx-borda-campo); border-radius: var(--fx-raio-campo);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.fx-textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.fx-input::placeholder, .fx-textarea::placeholder { color: var(--fx-texto-3); opacity: 1; }
.fx-input:hover, .fx-select:hover, .fx-textarea:hover { border-color: var(--fx-texto-2); }
.fx-input:focus, .fx-select:focus, .fx-textarea:focus { outline: none; border-color: var(--fx-acao); box-shadow: var(--fx-foco); }
.fx-input:disabled, .fx-select:disabled, .fx-textarea:disabled { background: var(--fx-neutro-fundo); color: var(--fx-texto-3); cursor: not-allowed; }
.fx-select {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%234a4b5e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.fx-campo--erro .fx-input, .fx-campo--erro .fx-select, .fx-campo--erro .fx-textarea,
.fx-input[aria-invalid="true"], .fx-select[aria-invalid="true"], .fx-textarea[aria-invalid="true"] { border-color: var(--fx-erro); }
.fx-erro { display: flex; align-items: center; gap: 6px; font-size: var(--fx-t-p); color: var(--fx-erro-texto); }
.fx-ajuda { font-size: var(--fx-t-p); color: var(--fx-texto-3); }
.fx-busca { position: relative; }
.fx-busca .fx-i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--fx-texto-3); pointer-events: none; }
.fx-busca .fx-input { padding-left: 42px; }
.fx-busca .fx-input::-webkit-search-cancel-button { cursor: pointer; }

/* Checkbox */
.fx-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: var(--fx-t-p); line-height: 1.4; }
.fx-check input {
  appearance: none; flex: none; width: 20px; height: 20px; margin: 0; cursor: pointer;
  border: 1px solid var(--fx-borda-campo); border-radius: 4px; background: var(--fx-superficie);
  display: grid; place-content: center; transition: background-color 0.15s, border-color 0.15s;
}
.fx-check input::after { content: ""; width: 11px; height: 6px; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform 0.12s; }
.fx-check input:checked { background: var(--fx-acao); border-color: var(--fx-acao); }
.fx-check input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.fx-check input:focus-visible { outline: none; box-shadow: var(--fx-foco); }
.fx-check input:disabled { background: var(--fx-neutro-fundo); cursor: not-allowed; }
.fx-check:has(input:disabled) { cursor: not-allowed; color: var(--fx-texto-3); }

/* Interruptor (liga/desliga) */
.fx-switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.fx-switch input {
  appearance: none; flex: none; position: relative; width: 44px; height: 24px; margin: 0; cursor: pointer;
  border-radius: var(--fx-raio-pilula); background: var(--fx-borda-campo); transition: background-color 0.2s;
}
.fx-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform 0.2s; }
.fx-switch input:checked { background: var(--fx-acao); }
.fx-switch input:checked::after { transform: translateX(20px); }
.fx-switch input:focus-visible { outline: none; box-shadow: var(--fx-foco); }
.fx-switch input:disabled { opacity: 0.5; cursor: not-allowed; }
.fx-switch-texto { display: flex; flex-direction: column; gap: 2px; font-size: var(--fx-t-base); font-weight: 600; line-height: 1.3; }
.fx-switch-texto small { font-size: var(--fx-t-p); font-weight: 400; color: var(--fx-texto-3); }

/* ========================== 7. Cards e chips ========================== */
.fx-card { background: var(--fx-superficie); border: 1px solid var(--fx-borda); border-radius: var(--fx-raio-card); box-shadow: var(--fx-sombra-card); }
.fx-card--pad { padding: 24px; }
@media (max-width: 575.98px) { .fx-card--pad { padding: 20px; } }

.fx-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 3px 10px; border-radius: var(--fx-raio-pilula);
  font-size: var(--fx-t-xs); font-weight: 600; line-height: 1.5; white-space: nowrap;
  background: var(--fx-neutro-fundo); color: var(--fx-neutro-texto);
}
.fx-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.fx-chip--sem-ponto::before { display: none; }
.fx-chip--ok { background: var(--fx-ok-fundo); color: var(--fx-ok-texto); }
.fx-chip--atencao { background: var(--fx-atencao-fundo); color: var(--fx-atencao-texto); }
.fx-chip--atrasado { background: var(--fx-atrasado-fundo); color: var(--fx-atrasado-texto); }
.fx-chip--erro { background: var(--fx-erro-fundo); color: var(--fx-erro-texto); }
.fx-chip--info { background: var(--fx-info-fundo); color: var(--fx-info-texto); }

/* Filtros em pílula (seleção única, role="tab" ou aria-pressed) */
.fx-filtros { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-filtro {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px;
  border: 1px solid var(--fx-borda-forte); border-radius: var(--fx-raio-pilula); background: var(--fx-superficie);
  font-size: var(--fx-t-p); font-weight: 600; color: var(--fx-texto-2); cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.fx-filtro:hover { border-color: var(--fx-texto-3); color: var(--fx-texto); }
.fx-filtro[aria-pressed="true"], .fx-filtro[aria-selected="true"] { background: var(--fx-navy); border-color: var(--fx-navy); color: #fff; }
.fx-filtro-qtd { font-size: var(--fx-t-xs); font-weight: 700; padding: 0 7px; border-radius: var(--fx-raio-pilula); background: var(--fx-neutro-fundo); color: var(--fx-texto-2); }
.fx-filtro[aria-pressed="true"] .fx-filtro-qtd, .fx-filtro[aria-selected="true"] .fx-filtro-qtd { background: rgba(255,255,255,.18); color: #fff; }
/* Filtro em seletor (lista nativa do aparelho): mesmo visual da pílula, com seta */
.fx-filtro-select {
  appearance: none; padding-right: 36px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234a4b5e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.fx-filtro-select:focus-visible { outline: none; box-shadow: var(--fx-foco); }
.fx-filtro-select.fx-ativo {
  background-color: var(--fx-navy); border-color: var(--fx-navy); color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.fx-filtro-select option { color: var(--fx-texto); background: #fff; }
/* Lista própria do seletor (PC e Android; o iPhone usa a nativa) */
.fx-seletor { position: relative; display: flex; flex: 1 1 auto; min-width: 0; }
.fx-seletor > .fx-filtro { width: 100%; justify-content: flex-start; }
.fx-seletor-texto { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; }
.fx-seletor-lista {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: max(100%, 220px); max-height: 320px; overflow-y: auto;
  margin: 0; padding: 6px; list-style: none; background: var(--fx-superficie);
  border: 1px solid var(--fx-borda); border-radius: var(--fx-raio-botao); box-shadow: var(--fx-sombra-painel);
}
.fx-seletor-lista.fx-para-cima { top: auto; bottom: calc(100% + 6px); }
.fx-seletor-lista li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px;
  border-radius: var(--fx-raio-campo); font-size: var(--fx-t-p); font-weight: 500; color: var(--fx-texto); cursor: pointer; outline: none;
}
.fx-seletor-lista li:hover, .fx-seletor-lista li:focus { background: var(--fx-acao-suave); }
.fx-seletor-lista li:focus-visible { box-shadow: inset 0 0 0 2px var(--fx-acao); }
.fx-seletor-rotulo { display: inline-flex; align-items: center; gap: 8px; }
.fx-seletor-check { color: var(--fx-acao); visibility: hidden; }
.fx-seletor-lista li[aria-selected="true"] { font-weight: 700; }
.fx-seletor-lista li[aria-selected="true"] .fx-seletor-check { visibility: visible; }

/* Avatar (foto do M365 ou iniciais) */
.fx-avatar {
  --tam: 36px;
  position: relative; flex: none; width: var(--tam); height: var(--tam); border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--fx-azul); color: #fff;
  font-size: calc(var(--tam) * 0.4); font-weight: 700; letter-spacing: 0.02em; user-select: none;
}
.fx-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fx-avatar--g { --tam: 56px; }
.fx-avatar--p { --tam: 32px; }
/* Cor das iniciais: fixa por pessoa (fecqj.js calcula pelo e-mail) */
.fx-avatar[data-cor="1"] { background: var(--fx-info-fundo); color: var(--fx-info-texto); }
.fx-avatar[data-cor="2"] { background: var(--fx-ok-fundo); color: var(--fx-ok-texto); }
.fx-avatar[data-cor="3"] { background: var(--fx-atrasado-fundo); color: var(--fx-atrasado-texto); }
.fx-avatar[data-cor="4"] { background: var(--fx-atencao-fundo); color: var(--fx-atencao-texto); }
.fx-avatar[data-cor="5"] { background: #e8e8f3; color: #2e2e5c; }

/* Caixa de nota (informação contextual) */
.fx-nota { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--fx-raio-card); background: var(--fx-info-fundo); color: var(--fx-info-texto); font-size: var(--fx-t-p); line-height: 1.5; }
.fx-nota .fx-i { margin-top: 1px; }
.fx-nota--atencao { background: var(--fx-atencao-fundo); color: var(--fx-atencao-texto); }
.fx-nota--erro { background: var(--fx-erro-fundo); color: var(--fx-erro-texto); }

/* Link "pular para o conteúdo" (aparece só no foco por teclado) */
.fx-pular { position: absolute; left: 16px; top: -100px; z-index: 200; padding: 10px 16px; border-radius: var(--fx-raio-botao); background: #fff; color: var(--fx-acao); font-weight: 600; box-shadow: var(--fx-sombra-painel); }
.fx-pular:focus { top: 16px; }

/* Faixa com as quatro cores da marca */
.fx-faixa { display: flex; height: 4px; }
.fx-faixa::before, .fx-faixa::after, .fx-faixa > span { content: ""; flex: 1; }
.fx-faixa::before { background: var(--fx-verde); }
.fx-faixa > span:first-child { background: var(--fx-azul); }
.fx-faixa > span:last-child { background: var(--fx-laranja); }
.fx-faixa::after { background: var(--fx-amarelo); }

/* ===================== 8. Estados: vazio e esqueleto ==================== */
.fx-vazio { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 48px 24px; }
.fx-vazio-icone { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--fx-acao-suave); color: var(--fx-acao); margin-bottom: 4px; }
.fx-vazio-icone .fx-i { width: 26px; height: 26px; }
.fx-vazio-titulo { font-size: var(--fx-t-m); font-weight: 700; }
.fx-vazio-texto { color: var(--fx-texto-2); max-width: 420px; }
.fx-vazio .fx-btn { margin-top: 8px; }

.fx-esqueleto { position: relative; overflow: hidden; background: #eceef2; border-radius: 6px; }
.fx-esqueleto::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: fx-brilho 1.4s infinite; }
@keyframes fx-brilho { to { transform: translateX(100%); } }
@keyframes fx-girar { to { transform: rotate(360deg); } }
/* Botão com ícone que gira enquanto a ação roda (ex.: "Atualizar") */
.fx-girando-icone .fx-i { animation: fx-girar 0.8s linear infinite; }
.fx-girando { width: 28px; height: 28px; border: 3px solid var(--fx-borda); border-top-color: var(--fx-acao); border-radius: 50%; animation: fx-girar 0.8s linear infinite; }

/* ============================== 9. Tabela ============================= */
.fx-tabela-caixa { overflow: auto; max-height: var(--fx-tabela-altura, none); border: 1px solid var(--fx-borda); border-radius: var(--fx-raio-card); background: var(--fx-superficie); }
.fx-tabela { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fx-t-p); }
.fx-tabela th { position: sticky; top: 0; z-index: 1; background: var(--fx-superficie-2); text-align: left; font-size: var(--fx-t-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fx-texto-2); padding: 12px 16px; border-bottom: 1px solid var(--fx-borda); white-space: nowrap; }
.fx-tabela td { padding: 12px 16px; border-bottom: 1px solid var(--fx-borda); vertical-align: middle; }
.fx-tabela tbody tr:last-child td { border-bottom: 0; }
.fx-tabela tbody tr:hover td { background: var(--fx-superficie-2); }
.fx-tabela .fx-num { text-align: right; font-variant-numeric: tabular-nums; }
.fx-tabela th[aria-sort] { cursor: pointer; user-select: none; }
.fx-tabela th[aria-sort]::after { content: "↕"; margin-left: 6px; opacity: 0.35; }
.fx-tabela th[aria-sort="ascending"]::after { content: "↑"; opacity: 1; }
.fx-tabela th[aria-sort="descending"]::after { content: "↓"; opacity: 1; }

/* ============================== 10. Header ============================ */
.fx-header { position: sticky; top: 0; z-index: 90; height: var(--fx-header-altura); background: var(--fx-navy); color: #fff; }
/* Três colunas: logo à esquerda, menu no centro exato, usuário à direita (posições fixas,
   para o menu não pular de lugar quando o app não tem usuário ou menu). */
.fx-header-inner { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px; }
.fx-header-logo { grid-column: 1; justify-self: start; display: flex; align-items: center; border-radius: 4px; }
.fx-header-logo img { height: 38px; width: auto; }
/* Página pública sem menu e sem usuário (formulário do edital): o logo vai para o centro. */
.fx-header--centro .fx-header-logo { grid-column: 2; justify-self: center; }
.fx-header-menu { grid-column: 2; }
.fx-menu { display: flex; align-items: center; gap: 20px; margin: 0; padding: 0; list-style: none; }
.fx-menu a {
  position: relative; display: inline-block; padding: 6px 0;
  font-size: 14px; font-weight: 400; color: #fff; text-decoration: none; text-transform: lowercase; white-space: nowrap;
}
.fx-menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--fx-header-destaque); transform: scaleX(0); transform-origin: center; transition: transform 0.25s ease-out; }
/* O sublinhado aparece só ao passar o mouse (ou no foco do teclado), nunca fixo no item atual */
.fx-menu a:hover::after, .fx-menu a:focus-visible::after { transform: scaleX(1); }
.fx-menu a:focus-visible { outline-color: #fff; }
.fx-usuario { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 12px; min-width: 0; }
.fx-usuario-nome { font-size: 14px; color: #fff; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-btn--sair { --b-cor: var(--fx-laranja); color: #fff; padding: 8px 18px; min-height: 38px; text-transform: lowercase; }
.fx-btn--sair:hover { background: var(--fx-laranja); color: #fff; }
.fx-btn--sair:focus-visible { box-shadow: 0 0 0 3px rgba(241, 96, 51, 0.45); }
.fx-hamburguer {
  grid-column: 3; justify-self: end; display: none; place-items: center; width: 46px; height: 40px; padding: 5px 8px;
  border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; transition: background-color 0.2s;
}
.fx-hamburguer .fx-i { width: 30px; height: 30px; stroke-width: 1.75; }
.fx-hamburguer[aria-expanded="true"] { background: var(--fx-laranja); }
.fx-hamburguer:focus-visible { outline-color: #fff; }
@media (max-width: 991.98px) {
  .fx-header-menu, .fx-usuario { display: none; }
  .fx-hamburguer { display: grid; }
}
/* Menu que não cabe entre o logo e o usuário (muitas abas, nome longo, notebook): o fecqj.js marca o
   header como compacto e ele fica igual ao do celular, com a gaveta. */
.fx-header--compacto .fx-header-menu, .fx-header--compacto .fx-usuario { display: none; }
.fx-header--compacto .fx-hamburguer { display: grid; }

/* Gaveta do celular: visual do site, comportamento de diálogo modal (Esc, foco preso, fundo inerte) */
.fx-gaveta {
  position: fixed; inset: 0 auto 0 0; margin: 0; padding: 0; border: 0;
  width: min(300px, 86vw); max-width: none; height: 100%; max-height: none;
  background: var(--fx-navy); color: #fff; box-shadow: var(--fx-sombra-gaveta);
  transform: translateX(-100%); transition: transform var(--fx-duracao) ease-in-out;
  overflow: hidden;
}
.fx-gaveta.fx-aberta { transform: none; }
.fx-gaveta::backdrop { background: rgba(19, 19, 34, 0); transition: background-color var(--fx-duracao) ease-in-out; }
.fx-gaveta.fx-aberta::backdrop { background: rgba(19, 19, 34, 0.55); }
/* Só a lista rola: o logo, o fechar e quem está logado ficam sempre à vista. A lista vai de borda a
   borda (a barra fica na beira da gaveta) e tem folga para o contorno do foco não ser cortado. */
.fx-gaveta-corpo { height: 100%; display: flex; flex-direction: column; padding: 40px 36px 32px; }
.fx-gaveta-corpo > nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scroll-padding-block: 8px; margin: 0 -36px; padding: 4px 36px 24px; }
/* Barra translúcida em pílula, sem as setas do Windows, que acende com o mouse sobre a gaveta. O
   Chrome só aceita o ::-webkit-scrollbar sem scrollbar-color; o Firefox fica com a fina dele. */
.fx-gaveta-corpo, .fx-gaveta-corpo > nav { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }
@supports selector(::-webkit-scrollbar) {
  .fx-gaveta-corpo, .fx-gaveta-corpo > nav { scrollbar-width: auto; scrollbar-color: auto; }
  .fx-gaveta ::-webkit-scrollbar { width: 10px; }
  .fx-gaveta ::-webkit-scrollbar-track { background: transparent; }
  .fx-gaveta ::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 5px; background: rgba(255, 255, 255, 0.22) padding-box; }
  .fx-gaveta:hover ::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, 0.4); }
}
/* Celular deitado: com o topo e o usuário fixos sobraria pouco para a lista, então rola tudo junto. */
@media (max-height: 479.98px) {
  .fx-gaveta-corpo { overflow-y: auto; overscroll-behavior: contain; }
  .fx-gaveta-corpo > nav { flex: none; overflow: visible; padding-bottom: 0; }
}
.fx-gaveta-topo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.fx-gaveta-topo img { height: 32px; width: auto; }
.fx-gaveta-fechar { display: grid; place-items: center; width: 40px; height: 40px; margin-right: -10px; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; }
.fx-gaveta-fechar:hover { background: rgba(255,255,255,.08); }
.fx-gaveta-fechar:focus-visible { outline-color: #fff; }
.fx-gaveta-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.fx-gaveta-menu a { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; color: #fff; text-decoration: none; }
.fx-gaveta-menu a[aria-current="page"]::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--fx-laranja); }
.fx-gaveta-menu a:hover { text-decoration: underline; text-underline-offset: 4px; }
.fx-gaveta-menu a:focus-visible { outline-color: #fff; }
.fx-gaveta-usuario { margin-top: auto; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; gap: 16px; }
.fx-gaveta-quem { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fx-gaveta-quem > div { min-width: 0; }
.fx-gaveta-quem > div > b { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-gaveta-quem > div > span { display: block; font-size: 13px; color: rgba(255,255,255,.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-gaveta .fx-btn--sair { width: 100%; min-height: 46px; text-transform: none; }

/* ============================== 11. Rodapé ============================ */
.fx-rodape { flex: none; background: var(--fx-navy); color: rgba(255,255,255,.78); font-size: 14px; }
.fx-rodape-inner { min-height: 80px; padding-top: 18px; padding-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; }
.fx-rodape-credito { color: rgba(255,255,255,.6); }
.fx-rodape a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.fx-rodape a:hover { color: var(--fx-amarelo); }
.fx-rodape a:focus-visible { outline-color: #fff; }
@media (max-width: 767.98px) {
  /* Celular: bloco alinhado à esquerda (como o resto da página), texto menor, sem centralizar */
  .fx-rodape { font-size: 13px; line-height: 1.6; }
  .fx-rodape-inner { flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; min-height: 0; padding-top: 24px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}

/* ============================== 12. Modal ============================= */
.fx-modal {
  width: min(560px, calc(100vw - 32px)); max-width: none; max-height: min(86vh, 860px);
  margin: auto; padding: 0; border: 0; border-radius: var(--fx-raio-painel);
  background: var(--fx-superficie); color: var(--fx-texto); box-shadow: var(--fx-sombra-painel);
  opacity: 0; transform: translateY(12px) scale(0.98); transition: opacity 0.2s, transform 0.2s;
}
.fx-modal.fx-aberta { opacity: 1; transform: none; }
.fx-modal::backdrop { background: rgba(19, 19, 34, 0); transition: background-color 0.2s; }
.fx-modal.fx-aberta::backdrop { background: rgba(19, 19, 34, 0.55); }
.fx-modal-caixa { display: flex; flex-direction: column; max-height: inherit; }
.fx-modal-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 24px 0; }
.fx-modal-titulo { font-size: 20px; font-weight: 800; line-height: 1.3; }
/* Alvo de toque de 44 px; as margens deixam o ícone no mesmo lugar e o topo na mesma altura. */
.fx-modal-fechar.fx-btn { width: 44px; min-height: 44px; margin: -12px -12px -4px 0; }
.fx-modal-corpo { padding: 16px 24px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; color: var(--fx-texto-2); }
.fx-modal-acoes { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--fx-borda); background: var(--fx-superficie-2); border-radius: 0 0 var(--fx-raio-painel) var(--fx-raio-painel); }
.fx-modal-icone { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--fx-acao-suave); color: var(--fx-acao); }
.fx-modal--perigo .fx-modal-icone { background: var(--fx-erro-fundo); color: var(--fx-erro); }
@media (max-width: 575.98px) {
  /* No celular o modal abre de baixo */
  .fx-modal { width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: var(--fx-raio-painel) var(--fx-raio-painel) 0 0; transform: translateY(100%); transition: opacity 0.2s, transform var(--fx-duracao) ease-out; }
  .fx-modal.fx-aberta { transform: none; }
  .fx-modal-acoes { flex-direction: column-reverse; border-radius: 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .fx-modal-acoes .fx-btn { width: 100%; }
}

/* ============================== 13. Avisos ============================ */
.fx-avisos { position: fixed; right: 24px; bottom: 24px; z-index: 1000; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none; }
.fx-aviso {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 12px;
  width: min(400px, calc(100vw - 32px)); padding: 14px 14px 14px 16px;
  background: var(--fx-navy); color: #fff; border-radius: var(--fx-raio-card); box-shadow: var(--fx-sombra-painel);
  font-size: var(--fx-t-p); line-height: 1.45;
  border-left: 4px solid var(--fx-verde);
  animation: fx-aviso-entra 0.25s ease-out;
}
.fx-aviso .fx-i { margin-top: 1px; }
.fx-aviso--ok .fx-i { color: var(--fx-verde); }
.fx-aviso--erro { border-left-color: var(--fx-laranja); }
.fx-aviso--erro .fx-i { color: var(--fx-laranja); }
.fx-aviso--info { border-left-color: var(--fx-azul); }
.fx-aviso--info .fx-i { color: var(--fx-azul); }
.fx-aviso--atencao { border-left-color: var(--fx-amarelo); }
.fx-aviso--atencao .fx-i { color: var(--fx-amarelo); }
.fx-aviso-texto { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fx-aviso-fechar { flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin: -4px -4px -4px 0; border: 0; border-radius: 6px; background: transparent; color: rgba(255,255,255,.75); cursor: pointer; }
.fx-aviso-fechar:hover { background: rgba(255,255,255,.1); color: #fff; }
.fx-aviso.fx-saindo { animation: fx-aviso-sai 0.2s ease-in forwards; }
@keyframes fx-aviso-entra { from { opacity: 0; transform: translateY(12px); } }
@keyframes fx-aviso-sai { to { opacity: 0; transform: translateX(24px); } }
@media (max-width: 575.98px) {
  .fx-avisos { right: 16px; left: 16px; bottom: max(16px, env(safe-area-inset-bottom)); align-items: stretch; }
  .fx-aviso { width: auto; }
}

/* ==================== 14. Telas de entrada (login e 403) ==================== */
/* Sem header. Estrutura: <body><div class="fx-auth"><aside class="fx-auth-marca">…<main class="fx-auth-painel">…</div>.
   Tela dividida: à esquerda a marca (navy do site, logo branco, título 900 e a
   faixa de cores); à direita o formulário em fundo claro. No celular a marca vira uma faixa
   no topo. Usado pelo /login e /403 de todos os apps. */
.fx-auth { --auth-bloco: 440px; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--fx-fundo); }
/* Os dois lados usam o mesmo bloco (largura --auth-bloco), centralizado na metade e na altura;
   o logo fica fora do fluxo, alinhado à esquerda do bloco, para não deslocar o centro. */
.fx-auth-marca { position: relative; display: flex; align-items: center; justify-content: center; padding: 120px 32px; background: var(--fx-navy); color: #fff; overflow: hidden; }
.fx-auth-marca img { position: absolute; top: 56px; left: max(32px, calc((100% - var(--auth-bloco)) / 2)); height: 44px; width: auto; }
.fx-auth-marca-texto { width: min(var(--auth-bloco), 100%); display: flex; flex-direction: column; gap: 16px; }
.fx-auth-app { font-size: clamp(40px, 4.4vw, 56px); font-weight: 900; line-height: 1.05; letter-spacing: -0.015em; }
.fx-auth-lema { margin-top: 16px; max-width: 440px; font-size: var(--fx-t-m); color: rgba(255,255,255,.78); text-wrap: pretty; }
.fx-auth-lema b { color: #fff; font-weight: 600; }
.fx-auth-marca .fx-faixa { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; }
.fx-auth-painel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 120px 32px; }
.fx-auth-corpo { width: min(var(--auth-bloco), 100%); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.fx-auth-titulo { font-size: 32px; font-weight: 900; line-height: 1.15; color: var(--fx-texto); }
.fx-auth-texto { font-size: var(--fx-t-base); color: var(--fx-texto-2); }
.fx-auth-corpo .fx-btn { margin-top: 20px; width: 100%; min-height: 52px; font-size: var(--fx-t-base); }
.fx-auth-corpo form { width: 100%; }
.fx-auth-nota { margin-top: 16px; font-size: var(--fx-t-p); line-height: 1.6; color: var(--fx-texto-3); }
.fx-auth-nota [data-fx-icone] { display: inline-flex; vertical-align: -2px; margin-right: 6px; }
.fx-auth-nota a { color: var(--fx-acao); }
.fx-auth-carregando { width: min(var(--auth-bloco), 100%); display: flex; align-items: center; gap: 14px; color: var(--fx-texto-2); }
/* Sem ícone de alerta (padrão Google "Você precisa de acesso"): a identidade fica no lado navy;
   aqui só o texto e a conta conectada, em pílula, para a pessoa notar se entrou com a conta errada. */
.fx-auth-quem { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; margin-top: 12px; padding: 6px 18px 6px 6px; border: 1px solid var(--fx-borda-forte); border-radius: var(--fx-raio-pilula); background: var(--fx-superficie); }
.fx-auth-quem-textos { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.fx-auth-quem-textos span:first-child { font-size: var(--fx-t-xs); color: var(--fx-texto-3); }
.fx-auth-quem-textos span:last-child { font-size: var(--fx-t-p); font-weight: 600; overflow-wrap: break-word; }
/* Botão "Entrar com Microsoft": cheio na cor de ação; o logo da Microsoft fica num quadro branco */
.fx-btn-microsoft { gap: 14px; justify-content: flex-start; padding-left: 8px; }
.fx-btn-microsoft-logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 7px; background: #fff; flex: none; }
.fx-btn-microsoft-logo svg { width: 18px; height: 18px; }
.fx-btn-microsoft [data-fx-icone] { display: flex; margin-left: auto; margin-right: 10px; }
/* Celular: a tela inteira é navy; a marca ocupa o alto e o formulário sobe como uma folha clara
   presa embaixo (padrão de app), sem sobra de fundo vazio. Respeita as áreas seguras do iPhone. */
@media (max-width: 767.98px) {
  .fx-auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; background: var(--fx-navy); }
  .fx-auth-marca { flex-direction: column; align-items: stretch; justify-content: center; gap: 28px; min-height: 240px; padding: max(40px, calc(env(safe-area-inset-top) + 24px)) 24px 44px; overflow: visible; }
  .fx-auth-marca img { position: static; align-self: flex-start; height: 36px; }
  .fx-auth-marca-texto { width: auto; gap: 12px; }
  .fx-auth-app { font-size: clamp(36px, 11vw, 46px); }
  .fx-auth-lema { margin-top: 0; font-size: 15px; }
  .fx-auth-marca .fx-faixa { top: 0; bottom: auto; height: 4px; }
  .fx-auth-painel { justify-content: flex-start; align-items: stretch; padding: 32px 24px max(28px, calc(env(safe-area-inset-bottom) + 20px)); border-radius: 24px 24px 0 0; background: var(--fx-fundo); box-shadow: 0 -16px 40px -20px rgba(0, 0, 0, 0.6); }
  .fx-auth-corpo, .fx-auth-carregando { width: 100%; }
  .fx-auth-titulo { font-size: 26px; }
  .fx-auth-corpo .fx-btn { margin-top: 16px; }
  .fx-auth-nota { margin-top: 12px; }
}
@media (max-width: 380px) {
  .fx-auth-marca, .fx-auth-painel { padding-left: 20px; padding-right: 20px; }
  .fx-auth-titulo { font-size: 24px; }
}
/* Celular baixo (ex.: iPhone SE): marca mais compacta para o formulário caber sem rolar */
@media (max-width: 767.98px) and (max-height: 680px) {
  .fx-auth-marca { gap: 24px; min-height: 0; padding-bottom: 28px; }
  .fx-auth-app { font-size: 32px; }
  .fx-auth-painel { padding-top: 24px; }
}
/* Celular deitado e telas baixas: menos respiro em cima e embaixo para caber sem rolar à toa */
@media (min-width: 768px) and (max-height: 600px) {
  .fx-auth-marca, .fx-auth-painel { padding-top: 88px; padding-bottom: 40px; }
  .fx-auth-marca img { top: 24px; height: 36px; }
  .fx-auth-app { font-size: 36px; }
}

/* ===================== 15. Diálogo nativo do app ====================== */
/* Para apps que já abrem o próprio <dialog> com showModal()/close(): basta a classe
   fx-modal fx-modal--nativo. A animação de entrada vem do @starting-style. */
.fx-modal--nativo[open] { opacity: 1; transform: none; }
.fx-modal--nativo[open]::backdrop { background: rgba(19, 19, 34, 0.55); }
/* Com o diálogo aberto o fundo não rola, como no FECQJ.modal (html.fx-travado). */
html:has(.fx-modal--nativo[open]) { overflow: hidden; }
@starting-style {
  .fx-modal--nativo[open] { opacity: 0; transform: translateY(12px) scale(0.98); }
  .fx-modal--nativo[open]::backdrop { background: rgba(19, 19, 34, 0); }
}

/* ============== 16. Aviso de sistema feito para computador ============== */
.fx-bloqueio { position: fixed; inset: 0; z-index: 3000; overflow-y: auto; background: var(--fx-navy); }
.fx-bloqueio .fx-auth { min-height: 100%; }
.fx-bloqueio .fx-auth-corpo .fx-btn--secundario { margin-top: 4px; }

/* ============================== 17. Impressão ============================= */
@media print {
  .fx-header, .fx-rodape, .fx-gaveta, .fx-avisos, .fx-bloqueio, .fx-pular { display: none !important; }
  body { background: #fff; }
}

/* ======================= 18. Movimento reduzido ======================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
