/* Design tokens do SEMED. Nomes do padrão (docs/03_DESIGN_SYSTEM.md); valores da direção F · Comando,
   aprovada pelo dono em 17/11/2026. Componente nenhum usa cor solta: tudo sai daqui, nos dois temas. */

@font-face { font-family: 'Geist'; src: url('../fonts/Geist-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('../fonts/Geist-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('../fonts/Geist-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('../fonts/Geist-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
/* A Geist desenha "º" e "ª" iguais a "o" e "a" ("Pedido nº 9" saía "Pedido no 9"): só esses dois vêm da fonte do aparelho.
   Sem nenhuma delas, fica como antes. */
@font-face { font-family: 'Geist'; src: local('Arial'), local('Helvetica Neue'), local('Helvetica'), local('Roboto'), local('Segoe UI'); font-weight: 400; unicode-range: U+00AA, U+00BA; }
@font-face { font-family: 'Geist'; src: local('Arial'), local('Helvetica Neue'), local('Helvetica'), local('Roboto'), local('Segoe UI'); font-weight: 500; unicode-range: U+00AA, U+00BA; }
@font-face { font-family: 'Geist'; src: local('Arial'), local('Helvetica Neue'), local('Helvetica'), local('Roboto'), local('Segoe UI'); font-weight: 600; unicode-range: U+00AA, U+00BA; }
@font-face { font-family: 'Geist'; src: local('Arial'), local('Helvetica Neue'), local('Helvetica'), local('Roboto'), local('Segoe UI'); font-weight: 700; unicode-range: U+00AA, U+00BA; }
@font-face { font-family: 'Geist Mono'; src: url('../fonts/GeistMono-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  /* ════════ TIPOGRAFIA ════════ */
  --font-sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'Courier New', monospace;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 36px;
  --text-5xl: 48px;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --tracking-tight: -0.02em;
  --tracking-tighter: -0.04em;
  --tracking-wide: 0.05em;
  --tracking-widest: 0.1em;

  /* ════════ ESPAÇAMENTOS ════════ */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* ════════ RAIOS ════════ */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* ════════ TRANSIÇÕES ════════ */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration: 250ms;
  --duration-slow: 400ms;

  /* ════════ CAMADAS ════════ */
  --z-dropdown: 100;
  --z-nav: 200;
  --z-veil: 190;
  --z-modal: 500;
  --z-tooltip: 1000;
  --z-toast: 2000;

  /* ════════ ÁREA SEGURA (L60) ════════ */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* ════════ LARGURA DO CONTEÚDO ════════ */
  --largura-max: 1320px;
  --respiro: 28px;

  /* ════════ MARCA (iguais nos dois temas) ════════ */
  --nav-text: #FFFFFF;
  --nav-text-secondary: rgb(255 255 255 / 0.8);
  --nav-text-muted: rgb(255 255 255 / 0.68);
  --nav-hover: rgb(255 255 255 / 0.12);
  --nav-line: rgb(255 255 255 / 0.18);
  --nav-control: rgb(255 255 255 / 0.08);
  --nav-control-border: rgb(255 255 255 / 0.16);
  --nav-active-bg: #FFFFFF;
  --nav-active-text: #0C1E72;
  --nav-active-icon: #1F3FD6;
  --nav-badge-bg: #4CC3F2;
  --nav-badge-text: #04163F;
  /* Cores das logos (SEMED e Prefeitura), para a luz e a assinatura da entrada. Medidas em produto/02-MARCA.md;
     o verde e o azul da estrela foram clareados para aparecer sobre o azul-marinho. */
  --marca-estrela: #4163FF;
  --marca-ciano: #0098DA;
  --marca-verde: #00B341;
  --marca-sol: #FFCC00;
  /* Prévia do e-mail: o e-mail abre em papel claro em qualquer leitor, então a prévia é igual nos dois temas.
     Mesmas cores do molde (email-molde.js). */
  --email-fundo: #F1F5FB;
  --email-papel: #FFFFFF;
  --email-marca: #0C1E72;
  --email-sobre-marca: #FFFFFF;
  --email-botao: #1F3FD6;
  --email-tinta: #121C2C;
  --email-tinta-2: #4A586F;
  --email-linha: #D5DEEB;
  --ponto: #D33A42;
  --ponto-texto: #FFFFFF;
  --busca-bg: #FFFFFF;
  --busca-text: #0B1530;
  --busca-placeholder: #5B6886;
  --busca-icon: #1F3FD6;
  --busca-kbd-bg: #EEF2FA;
  --busca-kbd-text: #3D4A69;
  --busca-halo: rgb(76 195 242 / 0.18);
  --busca-halo-foco: rgb(76 195 242 / 0.4);

  /* Etapas de ensino: paleta validada por script para daltonismo (claro e escuro), ordem fixa. */
  --etapa-creche: #0B93CF;
  --etapa-pre: #E08A2A;
  --etapa-iniciais: #2340D8;
  --etapa-finais: #0F9D58;
  --etapa-eja: #8B5CF6;
}

/* ════════ TEMA CLARO ════════ */
:root, :root[data-tema="claro"] {
  color-scheme: light;
  --nav-bg: radial-gradient(900px 340px at 50% -12%, rgb(0 152 218 / 0.2), transparent 70%), linear-gradient(180deg, #0C1E72 0%, #0A1756 100%);
  --nav-solid: #0B1B66;
  --dock-bg: rgb(9 20 62 / 0.9);
  --marca-dagua-opacidade: 0.07;
  --entrada-bg: linear-gradient(165deg, #0C1E72 0%, #0A1756 55%, #071042 100%);
  --entrada-brilho: rgb(0 152 218 / 0.16);

  --bg: #F1F4FA;
  --surface: #FFFFFF;
  --bg-subtle: #F3F6FB;
  --bg-muted: #EEF1F6;
  --text: #0B1530;
  --text-secondary: #3D4A69;
  --text-muted: #5B6886;
  --text-inverted: #FFFFFF;
  --border: #E2E8F2;
  --border-strong: #C7D2E5;

  --primary: #1F3FD6;
  --primary-hover: #1833B4;
  --primary-text: #FFFFFF;
  --primary-halo: rgb(31 63 214 / 0.16);
  --link: #1F3FD6;
  --focus: #0098DA;
  --icon-bg: #EEF1F6;
  --icon: #3D4A69;

  --success: #12A150; --success-bg: #E2F6E9; --success-text: #0A6431;
  --info: #0B84C6; --info-bg: #E4F2FB; --info-text: #075783;
  --warning: #E3940F; --warning-bg: #FFF2D9; --warning-text: #7F4D00; --warning-dot: #B06E00;
  --danger: #E5484D; --danger-bg: #FDE7E7; --danger-text: #AE1E1E;

  --chart-line: #0B84C6;
  --grid: #E8EDF5;
  --track: #E3E9F4;
  --row-hover: #F6F8FC;
  --tooltip-bg: #0B1530;
  --tooltip-text: #FFFFFF;
  --overlay: rgb(3 8 25 / 0.5);

  --shadow-sm: 0 1px 2px rgb(11 21 48 / 0.05);
  --shadow-md: 0 1px 2px rgb(11 21 48 / 0.05), 0 14px 30px -18px rgb(11 21 48 / 0.2);
  --shadow-lg: 0 2px 4px rgb(11 21 48 / 0.06), 0 26px 48px -20px rgb(11 21 48 / 0.3);
  --shadow-dock: 0 24px 50px -18px rgb(3 10 40 / 0.6);
}

/* ════════ TEMA ESCURO ════════ */
:root[data-tema="escuro"] {
  color-scheme: dark;
  --nav-bg: radial-gradient(900px 340px at 50% -12%, rgb(0 152 218 / 0.14), transparent 70%), linear-gradient(180deg, #0A1650 0%, #070F36 100%);
  --nav-solid: #091447;
  --dock-bg: rgb(14 24 56 / 0.86);
  --marca-dagua-opacidade: 0.055;
  --entrada-bg: linear-gradient(165deg, #0A1650 0%, #070F36 60%, #050B28 100%);
  --entrada-brilho: rgb(113 137 255 / 0.16);

  --bg: #060B18;
  --surface: #0F1730;
  --bg-subtle: #141E3D;
  --bg-muted: #18213F;
  --text: #ECF1FF;
  --text-secondary: #B6C0DC;
  --text-muted: #8E9ABD;
  --text-inverted: #0B1530;
  --border: #1C274A;
  --border-strong: #2B3966;

  --primary: #7189FF;
  --primary-hover: #8A9DFF;
  --primary-text: #04102E;
  --primary-halo: rgb(113 137 255 / 0.22);
  --link: #93A6FF;
  --focus: #4FB8F0;
  --icon-bg: #18213F;
  --icon: #B6C0DC;

  --success: #3DD68C; --success-bg: rgb(61 214 140 / 0.14); --success-text: #74E4AE;
  --info: #4FB8F0; --info-bg: rgb(79 184 240 / 0.14); --info-text: #8ED3F7;
  --warning: #F5B544; --warning-bg: rgb(245 181 68 / 0.15); --warning-text: #F8CB7A; --warning-dot: #F5B544;
  --danger: #FF6B6B; --danger-bg: rgb(255 107 107 / 0.15); --danger-text: #FF9E9E;

  --chart-line: #4FB8F0;
  --grid: #18223F;
  --track: #1B264A;
  --row-hover: #131C38;
  --tooltip-bg: #ECF1FF;
  --tooltip-text: #0B1530;
  --overlay: rgb(0 0 0 / 0.6);

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-md: 0 14px 30px -18px rgb(0 0 0 / 0.7);
  --shadow-lg: 0 26px 48px -20px rgb(0 0 0 / 0.85);

  --etapa-creche: #1E9FD8;
  --etapa-pre: #D07F2A;
  --etapa-iniciais: #5B74F5;
  --etapa-finais: #22A55E;
  --etapa-eja: #A274E8;
}
