    /* ═══ MODO ESCURO ═══════════════════════════════════════════════════════════════════
       html[data-tema="escuro"] (tema.js; a escolha fica no navegador). Tudo no sistema já é feito com estas variáveis, então
       trocar o tema é trocar os valores — e, como são "registradas" (@property), o navegador FUNDE claro→escuro em ~1 s,
       sem corte. Cada módulo tem a sua versão escura (o tom de cada um continua reconhecível). Cor nova? Use variável,
       nunca hexadecimal solto, ou ela não acompanha o tema. */
    :root[data-tema="escuro"] {
      color-scheme: dark;
      --bg: #12131f; --surface: #1a1c2b; --surface-2: #212436; --surface-3: #2a2e44; --border: #2b2f47; --border-strong: #3d4363;
      --text: #eceef8; --text-dim: #b8bdd6; --text-mut: #9298b8; --data: #8b91b3;
      --accent: #7466e0; --accent-strong: #a89cf6; --accent-soft: #252247; --accent-border: #3e3878;
      --ok: #6fdca4; --ok-bg: #13382a; --ok-fill: #2fb578; --ok-soft: #0f2a20;
      --warn: #f2b85a; --warn-bg: #3d2c0b; --warn-fill: #e08a1a; --warn-soft: #2b2009;
      --danger: #ff9990; --danger-bg: #43191a; --danger-fill: #ef5a4f; --danger-soft: #2d1414;
      --info: #92b8ff; --info-bg: #17294f; --info-fill: #4a83f0; --info-soft: #111d38;
      --violet: #c6a9ff; --violet-bg: #2e1f55; --violet-fill: #9a63f0; --violet-soft: #221741;
      --ink: #0f0e1f; --ink-2: #1a1733; --ink-line: #292446; --ink-fg: #a3a9c8; --ink-fg-2: #8087ad; --ink-icon: #b4aaf8;
      --shadow: 0 1px 2px rgba(0, 0, 0, .35);
      --shadow-alta: 0 24px 60px rgba(0, 0, 0, .6), 0 4px 12px rgba(0, 0, 0, .4);
      --veu: rgba(4, 5, 12, .62);
      --tip-bg: var(--surface-2);   /* no escuro o balão sobe um tom para se destacar do cartão embaixo */
      --tip-sombra: 0 12px 28px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .3);
      --fundo-logo: #e8eaf2;      /* clara, mas sem o branco puro que ofusca no escuro */
    }
    :root[data-tema="escuro"][data-modulo="fd"] {
      --bg: #12171f; --surface: #1a212b; --surface-2: #212936; --surface-3: #2a3444; --border: #2b3647; --border-strong: #3d4c63;
      --accent: #5f86bd; --accent-strong: #98b7e0; --accent-soft: #1a2a40; --accent-border: #34507a;
      --ink: #0b121d; --ink-2: #172234; --ink-line: #243449; --ink-fg: #9dacc4; --ink-fg-2: #7e8fa9; --ink-icon: #a6bddb;
    }
    :root[data-tema="escuro"][data-modulo="custos"] {
      --bg: #12161f; --surface: #1a202b; --surface-2: #212836; --surface-3: #2a3344; --border: #2b3447; --border-strong: #3d4a63;
      --accent: #3b8bea; --accent-strong: #84b9fc; --accent-soft: #10295a; --accent-border: #26599f;
      --ink: #040f30; --ink-2: #0a1c48; --ink-line: #123069; --ink-fg: #9fbdeb; --ink-fg-2: #7c9fd9; --ink-icon: #86bcfb;
    }
    :root[data-tema="escuro"][data-modulo="apropriacao"] {
      --bg: #141619; --surface: #1c1f23; --surface-2: #23272c; --surface-3: #2c3137; --border: #2f343a; --border-strong: #454c54;
      --accent: #5d6776; --accent-strong: #b4bcc7; --accent-soft: #2b3036; --accent-border: #4b525b;
      --ink: #0e1013; --ink-2: #1b1e22; --ink-line: #2a2e34; --ink-fg: #a6adb5; --ink-fg-2: #858d96; --ink-icon: #d3d8de;
    }
    :root[data-tema="escuro"][data-modulo="medicoes"] {
      --bg: #161b18; --surface: #1f2622; --surface-2: #27302b; --surface-3: #313d37; --border: #333f39; --border-strong: #475950;
      --accent: #66e0a3; --accent-strong: #9cf6c9; --accent-soft: #224735; --accent-border: #387858;
      --ink: #0e1f16; --ink-2: #173325; --ink-line: #244635; --ink-fg: #a3c8b5; --ink-fg-2: #80ad96; --ink-icon: #aaf8d1;
    }
    :root[data-tema="escuro"][data-modulo="vendor"] {
      --bg: #101a19; --surface: #172423; --surface-2: #1e2f2d; --surface-3: #283d3a; --border: #2a3f3c; --border-strong: #3d5a56;
      --accent: #3fd0bd; --accent-strong: #86e6d9; --accent-soft: #12403b; --accent-border: #22726a;
      --ink: #071a18; --ink-2: #0e2d2a; --ink-line: #17413d; --ink-fg: #a3c9c4; --ink-fg-2: #7fb0aa; --ink-icon: #7fe3d6;
    }
    :root[data-tema="escuro"][data-modulo="mologa"] {
      --bg: #161a1b; --surface: #1f2526; --surface-2: #272f30; --surface-3: #313b3d; --border: #333d3f; --border-strong: #475659;
      --accent: #66cce0; --accent-strong: #9ce7f6; --accent-soft: #224147; --accent-border: #386d78;
      --ink: #0e1c1f; --ink-2: #172e33; --ink-line: #244046; --ink-fg: #a3c2c8; --ink-fg-2: #80a5ad; --ink-icon: #aaebf8;
    }
    :root[data-tema="escuro"][data-modulo="colaboradores"] {
      --bg: #161315; --surface: #1f1b1e; --surface-2: #272225; --surface-3: #312b2f; --border: #342e32; --border-strong: #4b4349;
      --accent: #dd7ba4; --accent-strong: #eba5c3; --accent-soft: #34262d; --accent-border: #6a3b52;
      --ink: #100d0f; --ink-2: #1b1619; --ink-line: #2c242a; --ink-fg: #c0b4bb; --ink-fg-2: #a3949c; --ink-icon: #e6adc8;
    }
    :root[data-tema="escuro"][data-modulo="cdp"] {
      --bg: #14180c; --surface: #1c2210; --surface-2: #232b15; --surface-3: #2d371c; --border: #2f3a1d; --border-strong: #46562b;
      --accent: #a9cf4a; --accent-strong: #c6e77a; --accent-soft: #2b3818; --accent-border: #566e22;
      --ink: #0c1006; --ink-2: #161c0c; --ink-line: #232d13; --ink-fg: #b8c894; --ink-fg-2: #94a86b; --ink-icon: #c6e07a;
    }
    :root[data-tema="escuro"][data-modulo="radar"] {
      --bg: #0f1522; --surface: #151d2e; --surface-2: #1b2539; --surface-3: #233048; --border: #26324a; --border-strong: #3a4a6b;
      --accent: #7aa2f0; --accent-strong: #a4c0f7; --accent-soft: #1d2a45; --accent-border: #34508a;
      --ink: #0a0f1a; --ink-2: #121a2b; --ink-line: #1e2a42; --ink-fg: #a9bde3; --ink-fg-2: #8199c8; --ink-icon: #8fb4ff;
    }
    :root[data-tema="escuro"][data-modulo="alojamentos"] {
      --bg: #18120f; --surface: #211915; --surface-2: #2a201b; --surface-3: #352821; --border: #3a2c24; --border-strong: #5a4235;
      --accent: #e38a64; --accent-strong: #f2ad8f; --accent-soft: #3a2219; --accent-border: #7a4330;
      --ink: #120c09; --ink-2: #1d1410; --ink-line: #2e2019; --ink-fg: #d4b7aa; --ink-fg-2: #b08f80; --ink-icon: #f0a986;
      --alo-t1: #4fc3cd; --alo-t1-soft: #133a3e; --alo-t2: #9aa1f5; --alo-t2-soft: #262a52; --alo-t3: #e58cc2; --alo-t3-soft: #3d1c31;
      --alo-t4: #b9c85a; --alo-t4-soft: #2c3110; --alo-t5: #7fb6e6; --alo-t5-soft: #1a2d40; --alo-t6: #c9a27c; --alo-t6-soft: #33281d;
    }
    :root[data-tema="escuro"][data-modulo="demandas"] {
      --bg: #0f171a; --surface: #152024; --surface-2: #1b292e; --surface-3: #233539; --border: #263a3f; --border-strong: #3a565d;
      --accent: #5fb0c2; --accent-strong: #8fcfdc; --accent-soft: #16323a; --accent-border: #2c5e6a;
      --ink: #081316; --ink-2: #0f1f24; --ink-line: #1a3037; --ink-fg: #9fbec6; --ink-fg-2: #7ea0aa; --ink-icon: #86d0de;
    }
    :root[data-tema="escuro"][data-modulo="plataforma"] {
      --bg: #121a1f; --surface: #1a252b; --surface-2: #212f36; --surface-3: #2a3b44; --border: #2b3d47; --border-strong: #3d5563;
      --accent: #2f8db5; --accent-strong: #6cc0e3; --accent-soft: #15303d; --accent-border: #2a5670;
      --ink: #08181f; --ink-2: #102a38; --ink-line: #1c3a4b; --ink-fg: #9db8c9; --ink-fg-2: #7d9bb0; --ink-icon: #8fc7e0;
    }
    /* tela de login no escuro: as manchas de fundo escurecem junto */
    html[data-tema="escuro"] .lg-fundo .a { background: #1b4a66; }
    html[data-tema="escuro"] .lg-fundo .b { background: #2a3d78; }
    html[data-tema="escuro"] .lg-fundo i { opacity: .5; }
    /* o e-mail de exemplo continua com cara de e-mail (papel branco) — é o que o destinatário vai ver */
    html[data-tema="escuro"] .me-preview { color-scheme: light; }

    /* modo claro/escuro: interruptor pequeno no rodapé do menu, acima de "Módulos" (a bolinha desliza; sol de um lado, lua do outro) */
    .sidebar-footer { display: flex; flex-direction: column; align-items: stretch; }
    .tema-toggle { align-self: center; margin: 2px 0 4px; padding: 4px; border: 0; background: none; cursor: pointer; border-radius: 999px; }
    .tt-trilho { position: relative; display: block; width: 42px; height: 22px; border-radius: 999px; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--ink-line); transition: background .6s ease; }
    .tt-trilho svg { position: absolute; top: 50%; width: 12px; height: 12px; margin-top: -6px; color: var(--ink-fg-2); transition: color .5s, opacity .5s; }
    .tt-sol { left: 5px; } .tt-lua { right: 5px; }
    .tt-bola { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-fg-hi); box-shadow: 0 1px 3px rgba(0, 0, 0, .4); transition: transform .6s var(--ease); }
    html[data-tema="escuro"] .tt-bola { transform: translateX(20px); }
    .tt-trilho svg { color: var(--ink-icon); opacity: .85; }      /* os dois ícones ficam nas pontas; a bolinha cobre o do tema atual */
    .tema-toggle:hover .tt-trilho { box-shadow: inset 0 0 0 1px var(--ink-icon); }
    .tema-toggle:focus-visible { outline: 2px solid var(--ink-icon); outline-offset: 1px; }

