    /* ══ MÓDULOS ═══════════════════════════════════════════════════════════
       Cada módulo tem a sua cor base. As variáveis de cor abaixo são
       "registradas" (@property, tipo <color>): assim o navegador INTERPOLA o
       valor quando o tema muda, e tudo que usa a variável — menu, botões,
       fundos, bordas — funde de uma cor pra outra, em vez de trocar num corte.
       Gestão Linkana = roxo (o tema base, no :root). Gestão F.D. = azul ardósia. */
    @property --bg            { syntax: '<color>'; inherits: true; initial-value: #eff0fa; }
    @property --surface-2     { syntax: '<color>'; inherits: true; initial-value: #f5f5fd; }
    @property --surface-3     { syntax: '<color>'; inherits: true; initial-value: #eceef8; }
    @property --border        { syntax: '<color>'; inherits: true; initial-value: #e1e3f0; }
    @property --border-strong { syntax: '<color>'; inherits: true; initial-value: #c5cae4; }
    @property --accent        { syntax: '<color>'; inherits: true; initial-value: #5544c4; }
    @property --accent-strong { syntax: '<color>'; inherits: true; initial-value: #4232a3; }
    @property --accent-soft   { syntax: '<color>'; inherits: true; initial-value: #efedfa; }
    @property --accent-border { syntax: '<color>'; inherits: true; initial-value: #cdc6f2; }
    @property --ink           { syntax: '<color>'; inherits: true; initial-value: #1e1936; }
    @property --ink-2         { syntax: '<color>'; inherits: true; initial-value: #282245; }
    @property --ink-line      { syntax: '<color>'; inherits: true; initial-value: #332c54; }
    @property --ink-fg        { syntax: '<color>'; inherits: true; initial-value: #a3a9c8; }
    @property --ink-fg-2      { syntax: '<color>'; inherits: true; initial-value: #8087ad; }
    @property --ink-icon      { syntax: '<color>'; inherits: true; initial-value: #b4aaf8; }

    @property --surface       { syntax: '<color>'; inherits: true; initial-value: #ffffff; }
    @property --text          { syntax: '<color>'; inherits: true; initial-value: #171a2b; }
    @property --text-dim      { syntax: '<color>'; inherits: true; initial-value: #4b5169; }
    @property --text-mut      { syntax: '<color>'; inherits: true; initial-value: #676d8c; }
    @property --data          { syntax: '<color>'; inherits: true; initial-value: #737a9b; }
    @property --ok            { syntax: '<color>'; inherits: true; initial-value: #0f6b41; }
    @property --ok-bg         { syntax: '<color>'; inherits: true; initial-value: #d5f0e2; }
    @property --ok-fill       { syntax: '<color>'; inherits: true; initial-value: #1f9d63; }
    @property --ok-soft       { syntax: '<color>'; inherits: true; initial-value: #ebf8f1; }
    @property --warn          { syntax: '<color>'; inherits: true; initial-value: #8a4b00; }
    @property --warn-bg       { syntax: '<color>'; inherits: true; initial-value: #ffe6b3; }
    @property --warn-fill     { syntax: '<color>'; inherits: true; initial-value: #cc7400; }
    @property --warn-soft     { syntax: '<color>'; inherits: true; initial-value: #fff5d9; }
    @property --danger        { syntax: '<color>'; inherits: true; initial-value: #a31d15; }
    @property --danger-bg     { syntax: '<color>'; inherits: true; initial-value: #ffd9d4; }
    @property --danger-fill   { syntax: '<color>'; inherits: true; initial-value: #dc3a30; }
    @property --danger-soft   { syntax: '<color>'; inherits: true; initial-value: #fff0ee; }
    @property --info          { syntax: '<color>'; inherits: true; initial-value: #1a4fb5; }
    @property --info-bg       { syntax: '<color>'; inherits: true; initial-value: #dbe8ff; }
    @property --info-fill     { syntax: '<color>'; inherits: true; initial-value: #2f6fe0; }
    @property --info-soft     { syntax: '<color>'; inherits: true; initial-value: #eef4ff; }
    @property --violet        { syntax: '<color>'; inherits: true; initial-value: #6432b8; }
    @property --violet-bg     { syntax: '<color>'; inherits: true; initial-value: #eadffd; }
    @property --violet-fill   { syntax: '<color>'; inherits: true; initial-value: #8b4fe0; }
    @property --violet-soft   { syntax: '<color>'; inherits: true; initial-value: #f6f1ff; }

    :root {
      transition:
        --bg .95s ease-in-out,
        --surface .95s ease-in-out,
        --surface-2 .95s ease-in-out,
        --surface-3 .95s ease-in-out,
        --border .95s ease-in-out,
        --border-strong .95s ease-in-out,
        --text .95s ease-in-out,
        --text-dim .95s ease-in-out,
        --text-mut .95s ease-in-out,
        --data .95s ease-in-out,
        --accent .95s ease-in-out,
        --accent-strong .95s ease-in-out,
        --accent-soft .95s ease-in-out,
        --accent-border .95s ease-in-out,
        --ok .95s ease-in-out,
        --ok-bg .95s ease-in-out,
        --ok-fill .95s ease-in-out,
        --ok-soft .95s ease-in-out,
        --warn .95s ease-in-out,
        --warn-bg .95s ease-in-out,
        --warn-fill .95s ease-in-out,
        --warn-soft .95s ease-in-out,
        --danger .95s ease-in-out,
        --danger-bg .95s ease-in-out,
        --danger-fill .95s ease-in-out,
        --danger-soft .95s ease-in-out,
        --info .95s ease-in-out,
        --info-bg .95s ease-in-out,
        --info-fill .95s ease-in-out,
        --info-soft .95s ease-in-out,
        --violet .95s ease-in-out,
        --violet-bg .95s ease-in-out,
        --violet-fill .95s ease-in-out,
        --violet-soft .95s ease-in-out,
        --ink .95s ease-in-out,
        --ink-2 .95s ease-in-out,
        --ink-line .95s ease-in-out,
        --ink-fg .95s ease-in-out,
        --ink-fg-2 .95s ease-in-out,
        --ink-icon .95s ease-in-out;
    }
    @media (prefers-reduced-motion: reduce) { :root { transition: none; } }
    :root[data-modulo="fd"] {
      --bg: #edf1f6; --surface-2: #f4f7fb; --surface-3: #e8edf4; --border: #dde4ee; --border-strong: #c3cddc;
      --accent: #46648f; --accent-strong: #34507a; --accent-soft: #eaf0f8; --accent-border: #c3d2e8;
      --ink: #1b2637; --ink-2: #253349; --ink-line: #32425b; --ink-fg: #9dacc4; --ink-fg-2: #7e8fa9; --ink-icon: #a6bddb;
    }

    /* Custos: azul cobalto, vivo mas sóbrio: mais saturado que o ardósia da F.D., sem o verde-azulado da Plataforma e sem virar neon */
    :root[data-modulo="custos"] {
      --bg: #e8f0fc; --surface-2: #f0f6fe; --surface-3: #e0eafa; --border: #d2e1f6; --border-strong: #a6c2ea;
      --accent: #0b4fa8; --accent-strong: #08397e; --accent-soft: #e0edfc; --accent-border: #a3c4f0;
      --ink: #051c47; --ink-2: #0a2b62; --ink-line: #12407f; --ink-fg: #a3c0ec; --ink-fg-2: #7fa3da; --ink-icon: #74b0fa;
    }

    /* Módulos novos (Apropriação, Medições, Vendor List, Mológa): por ora só cartão e página de espera. As paletas já vêm nas duas versões
       (a escura em 13-escuro.css). Mológa é uma variação do azul oficial do Link; os outros três saem da família azul/roxa dos demais (o Vendor List é verde-azulado). */
    /* Apropriação: grafite neutro (pedido do dono: o terracota de antes cansava). Cinzas levemente frios; a cor fica só no status. O
       destaque é o grafite escuro (no escuro, cinza claro), que ainda se distingue do cinza fraco de "não se aplica". */
    :root[data-modulo="apropriacao"] {
      --bg: #f3f4f5; --surface-2: #f8f9fa; --surface-3: #eef0f2; --border: #e2e5e8; --border-strong: #cdd2d7;
      --accent: #353c45; --accent-strong: #22272e; --accent-soft: #e7eaed; --accent-border: #c5cbd2;
      --ink: #1b1f24; --ink-2: #272c33; --ink-line: #343a42; --ink-fg: #aab1b9; --ink-fg-2: #89919a; --ink-icon: #d3d8de;
    }
    :root[data-modulo="medicoes"] {
      --bg: #f3f6f4; --surface-2: #f8faf9; --surface-3: #f1f3f2; --border: #e7eae8; --border-strong: #d1d8d4;
      --accent: #277b51; --accent-strong: #1f6542; --accent-soft: #edfaf3; --accent-border: #c6f2dc;
      --ink: #193628; --ink-2: #224534; --ink-line: #2c5440; --ink-fg: #a3c8b5; --ink-fg-2: #80ad96; --ink-icon: #aaf8d1;
    }
    :root[data-modulo="vendor"] {
      --bg: #f1f6f5; --surface-2: #f6faf9; --surface-3: #ebf1f0; --border: #dce7e5; --border-strong: #c2d3d0;
      --accent: #0f766e; --accent-strong: #0b5a54; --accent-soft: #e3f5f2; --accent-border: #a9dcd5;
      --ink: #0a2624; --ink-2: #103633; --ink-line: #1a4844; --ink-fg: #a3c9c4; --ink-fg-2: #7fb0aa; --ink-icon: #7fe3d6;
    }
    :root[data-modulo="mologa"] {
      --bg: #f3f5f6; --surface-2: #f8fafa; --surface-3: #f1f3f3; --border: #e7eaea; --border-strong: #d1d7d8;
      --accent: #2b7887; --accent-strong: #21606c; --accent-soft: #edf8fa; --accent-border: #c6ebf2;
      --ink: #193136; --ink-2: #223f45; --ink-line: #2c4d54; --ink-fg: #a3c2c8; --ink-fg-2: #80a5ad; --ink-icon: #aaebf8;
    }
    /* Colaboradores: ameixa — nenhum outro módulo usa esse tom. Documentação de terceiros exigida por um cliente final (hoje via WeHandle),
       controle só de leitura (o cadastro/vocabulário de status é da plataforma externa). SÓBRIO de propósito: fundos brancos e cinzas quase
       neutros, com só um leve tom ameixa; a cor forte fica no que é interação (botão, seleção, foco). As categorias de documento têm cor própria
       (utilidades.corCategoria), para a lista não ficar toda do mesmo tom. */
    :root[data-modulo="colaboradores"] {
      --bg: #f6f5f6; --surface-2: #faf9fa; --surface-3: #f0eef0; --border: #e5e2e5; --border-strong: #d2ced2;
      --accent: #99386b; --accent-strong: #7a2b53; --accent-soft: #f5eef2; --accent-border: #e4cfda;
      --ink: #231b21; --ink-2: #2d232a; --ink-line: #3b2f37; --ink-fg: #c0b4bb; --ink-fg-2: #a3949c; --ink-icon: #e6adc8;
    }
    /* Controle de ponto (cdp): verde-oliva, nenhum outro módulo usa esse tom (o verde do Medições é mais azulado). Ponto lido da planilha do sistema de folha */
    :root[data-modulo="cdp"] {
      --bg: #f3f5ec; --surface-2: #f8faf2; --surface-3: #ecf0df; --border: #e0e6cf; --border-strong: #c8d1a9;
      --accent: #5b7a1a; --accent-strong: #465f11; --accent-soft: #eef4dc; --accent-border: #cfe0a0;
      --ink: #1f2a0c; --ink-2: #2b3a10; --ink-line: #3a4c16; --ink-fg: #b8c894; --ink-fg-2: #94a86b; --ink-icon: #c6e07a;
    }
    /* News Obras (radar): o azul institucional da Cetenco (#2352AC, o mesmo do painel "Cenário Político x Obras" da equipe dela), a pedido do
       dono — é o módulo apresentado à Cetenco. Da família do cobalto do Custos, mas mais aberto e menos saturado; fundos quase neutros. */
    :root[data-modulo="radar"] {
      --bg: #eef2f9; --surface-2: #f4f7fc; --surface-3: #e6ecf6; --border: #d9e1ef; --border-strong: #b3c3df;
      --accent: #2352ac; --accent-strong: #173a7a; --accent-soft: #eef2fb; --accent-border: #b8c9ea;
      --ink: #0f2147; --ink-2: #16305f; --ink-line: #214079; --ink-fg: #a9bde3; --ink-fg-2: #8199c8; --ink-icon: #8fb4ff;
    }

    /* Demandas: azul-petróleo (pedido do dono), da família do azul do Link (Gestão da Plataforma, #2b7a9f), mas mais fechado e um pouco mais
       verde; mais escuro que o petróleo claro do Mológa. Sóbrio, para não disputar com as cores de prazo e de prioridade dos cartões (ver 28-demandas.css). */
    :root[data-modulo="demandas"] {
      --bg: #edf3f4; --surface-2: #f4f8f9; --surface-3: #e5eef0; --border: #d8e4e7; --border-strong: #b9ced3;
      --accent: #1f5f73; --accent-strong: #164a5a; --accent-soft: #e4f0f2; --accent-border: #b2d1d8;
      --ink: #0c2830; --ink-2: #13363f; --ink-line: #1d4651; --ink-fg: #9fbec6; --ink-fg-2: #7ea0aa; --ink-icon: #86d0de;
    }

    /* Alojamentos: tijolo/terracota (telha, casa), nenhum outro módulo usa. --alo-t1…t6 são as cores das empresas terceiras no mapa de
       leitos e na linha do tempo (uma por empresa, pela ordem de cadastro): tons de categoria, longe do âmbar e do vermelho de status. */
    :root[data-modulo="alojamentos"] {
      --bg: #f6f1ee; --surface-2: #faf6f3; --surface-3: #f1e8e3; --border: #ebe0d9; --border-strong: #d8c3b7;
      --accent: #a14f2f; --accent-strong: #7e3a22; --accent-soft: #f8ece6; --accent-border: #e6c4b4;
      --ink: #2a1610; --ink-2: #3a2018; --ink-line: #4d2b20; --ink-fg: #dcbcae; --ink-fg-2: #b99282; --ink-icon: #f0a986;
      --alo-t1: #0f7c86; --alo-t1-soft: #e0f2f3; --alo-t2: #4f56c8; --alo-t2-soft: #e9eafb; --alo-t3: #ad3d82; --alo-t3-soft: #f8e6f1;
      --alo-t4: #6c7a19; --alo-t4-soft: #eff2dc; --alo-t5: #2a6fa8; --alo-t5-soft: #e3eef8; --alo-t6: #7a5a3a; --alo-t6-soft: #f1e9e0;
    }

    /* o que aparece em cada módulo (troca no meio da animação: data-modulo-ativo) */
    /* Cada módulo tem o seu grupo de menu e as suas páginas (data-mod). Só as do módulo ativo aparecem;
       cada módulo guarda a própria aba ativa, então voltar a ele reabre onde estava. */
    .nav-grupo { display: none; }
    html[data-modulo-ativo="linkana"] .nav-grupo[data-modulo="linkana"],
    html[data-modulo-ativo="fd"] .nav-grupo[data-modulo="fd"],
    html[data-modulo-ativo="custos"] .nav-grupo[data-modulo="custos"],
    html[data-modulo-ativo="apropriacao"] .nav-grupo[data-modulo="apropriacao"],
    html[data-modulo-ativo="medicoes"] .nav-grupo[data-modulo="medicoes"],
    html[data-modulo-ativo="vendor"] .nav-grupo[data-modulo="vendor"],
    html[data-modulo-ativo="mologa"] .nav-grupo[data-modulo="mologa"],
    html[data-modulo-ativo="colaboradores"] .nav-grupo[data-modulo="colaboradores"],
    html[data-modulo-ativo="cdp"] .nav-grupo[data-modulo="cdp"],
    html[data-modulo-ativo="radar"] .nav-grupo[data-modulo="radar"],
    html[data-modulo-ativo="alojamentos"] .nav-grupo[data-modulo="alojamentos"],
    html[data-modulo-ativo="demandas"] .nav-grupo[data-modulo="demandas"],
    html[data-modulo-ativo="plataforma"] .nav-grupo[data-modulo="plataforma"] { display: contents; }
    .main > .view[data-mod] { display: none !important; }
    html[data-modulo-ativo="linkana"] .main > .view.active[data-mod="linkana"],
    html[data-modulo-ativo="fd"] .main > .view.active[data-mod="fd"],
    html[data-modulo-ativo="custos"] .main > .view.active[data-mod="custos"],
    html[data-modulo-ativo="apropriacao"] .main > .view.active[data-mod="apropriacao"],
    html[data-modulo-ativo="medicoes"] .main > .view.active[data-mod="medicoes"],
    html[data-modulo-ativo="vendor"] .main > .view.active[data-mod="vendor"],
    html[data-modulo-ativo="mologa"] .main > .view.active[data-mod="mologa"],
    html[data-modulo-ativo="colaboradores"] .main > .view.active[data-mod="colaboradores"],
    html[data-modulo-ativo="cdp"] .main > .view.active[data-mod="cdp"],
    html[data-modulo-ativo="radar"] .main > .view.active[data-mod="radar"],
    html[data-modulo-ativo="alojamentos"] .main > .view.active[data-mod="alojamentos"],
    html[data-modulo-ativo="demandas"] .main > .view.active[data-mod="demandas"],
    html[data-modulo-ativo="plataforma"] .main > .view.active[data-mod="plataforma"] { display: block !important; }
    /* Apropriação tem tipos (data-ap-tipo no <html>, modulos.js): Agregados e Equipamentos. Cada tipo tem o seu grupo de menu e as suas abas
       (as do PP com data-tipo="pp"); cada tipo guarda a sua aba ativa (navegacao.js), e aqui só se esconde a do tipo que não está à vista. */
    html[data-ap-tipo="pp"] .nav-grupo[data-modulo="apropriacao"]:not([data-tipo="pp"]),
    html:not([data-ap-tipo="pp"]) .nav-grupo[data-modulo="apropriacao"][data-tipo="pp"] { display: none; }
    html[data-modulo-ativo="apropriacao"][data-ap-tipo="pp"] .main > .view.active[data-mod="apropriacao"]:not([data-tipo="pp"]),
    html[data-modulo-ativo="apropriacao"]:not([data-ap-tipo="pp"]) .main > .view.active[data-mod="apropriacao"][data-tipo="pp"] { display: none !important; }
    html:not([data-modulo-ativo="linkana"]) #progress { display: none; }
    html:not([data-modulo-ativo="colaboradores"]) #progress-col { display: none; }
    .mod-cab { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
    /* Linkana e Colaboradores: o cabeçalho divide o espaço com o monitor da coleta (#progress / #progress-col), separado por um fio */
    html[data-modulo-ativo="linkana"] .mod-cab, html[data-modulo-ativo="colaboradores"] .mod-cab { flex: none; order: -1; }
    html[data-modulo-ativo="linkana"] .live-progress-card,
    html[data-modulo-ativo="colaboradores"] .live-progress-card { padding-left: 22px; border-left: 1px solid var(--border-strong); }
    .mod-cab-logo { width: 42px; height: 42px; border-radius: 12px; object-fit: contain; flex: none; filter: drop-shadow(0 3px 6px color-mix(in srgb, var(--accent) 28%, transparent)); }
    .mod-cab-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
    .mod-cab-nome { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.015em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .mod-cab-sub { font-size: var(--fs-sm); color: var(--text-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .mod-cab-sub:empty { display: none; }
    /* o cabeçalho ganha a cor do módulo: fundo em degradê suave e um fio de acento na base */
    .top-header { background: linear-gradient(100deg, var(--accent-soft), var(--surface) 62%); }
    .top-header::after {
      content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none;
      background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 0%, transparent) 55%);
    }
    @media (max-width: 1160px) { html[data-modulo-ativo="linkana"] .mod-cab-sub, html[data-modulo-ativo="colaboradores"] .mod-cab-sub { display: none; } }
    @media (max-width: 760px) { html[data-modulo-ativo="linkana"] .mod-cab-txt, html[data-modulo-ativo="colaboradores"] .mod-cab-txt { display: none; } }
    @media (max-width: 960px) {
      .mod-cab-logo { width: 32px; height: 32px; border-radius: 9px; }
      .mod-cab-nome { font-size: var(--fs-lg); }
      .mod-cab-sub { display: none; }
    }

    .nav-vazio {
      margin: 8px 2px; padding: 22px 6px; border: 1px dashed var(--ink-line); border-radius: 12px;
      text-align: center; font-size: 11px; line-height: 1.45; color: var(--ink-fg-2);
    }
    .fd-vazio {
      max-width: 460px; min-height: calc(100vh - 230px); margin: 0 auto;
      display: grid; place-content: center; justify-items: center; text-align: center; gap: 12px;
    }
    .fd-vazio-ico {
      width: 78px; height: 78px; border-radius: 24px; display: grid; place-items: center;
      background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-border);
    }
    .fd-vazio-ico svg { width: 38px; height: 38px; }
    .fd-vazio h2 { font-size: var(--fs-xl); letter-spacing: -.015em; }
    .fd-vazio p { font-size: var(--fs-sm); color: var(--text-mut); line-height: 1.6; }

    /* lista de módulos */
    .modulo-item { transition: background .3s; }
    .modulo-logo.modulo-fd {
      display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .04em;
      background: linear-gradient(135deg, #5d7ba6, #2c4266);
    }
    .modulo-check { opacity: 0; transform: scale(.5); transition: opacity .3s, transform .4s var(--ease); }
    .modulo-item.ativo .modulo-check { opacity: 1; transform: none; }

    /* a troca: sai (~0,3 s) → conteúdo muda por baixo → entra em cascata (~1 s) */
    @keyframes modItemSai    { to { opacity: 0; transform: translateX(-16px) scale(.92); } }
    @keyframes modItemEntra  { from { opacity: 0; transform: translateX(16px) scale(.92); } }
    @keyframes modPaginaSai  { to { opacity: 0; transform: translateY(10px) scale(.992); } }
    @keyframes modPaginaEntra { from { opacity: 0; transform: translateY(18px) scale(.99); } }
    @keyframes modCabSai     { to { opacity: 0; transform: translateY(-6px); } }
    @keyframes modCabEntra   { from { opacity: 0; transform: translateY(10px); } }
    .mod-saindo .nav-grupo > * { animation: modItemSai .28s var(--ease) both; animation-delay: calc(var(--i, 0) * 18ms); }
    .mod-entrando .nav-grupo > * { animation: modItemEntra .6s var(--ease) backwards; animation-delay: calc(80ms + var(--i, 0) * 45ms); }
    .mod-entrando .nav-ind.on { animation: modItemEntra .6s var(--ease) .15s backwards; }
    .mod-saindo .main { animation: modPaginaSai .3s var(--ease) both; }
    .mod-entrando .main { animation: modPaginaEntra .75s var(--ease) .05s both; }
    .mod-saindo .top-header > * { animation: modCabSai .28s var(--ease) both; }
    .mod-entrando .top-header > * { animation: modCabEntra .6s var(--ease) .1s backwards; }

    @media (prefers-reduced-motion: reduce) {
      :root { transition: none; }
      .mod-saindo *, .mod-entrando * { animation: none !important; }
    }

    /* miolo do anel: total de documentos solicitados */
    .rs-anel { position: relative; }
    .rs-anel-centro { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; pointer-events: none; }
    .rs-anel-centro b { font-size: 17px; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
    .rs-anel-centro small { font-size: 10px; font-weight: 500; color: var(--text-mut); margin-top: 2px; }

    /* Ícone do módulo no topo do menu: o do módulo que sai encolhe e gira enquanto o
       do que entra cresce no mesmo lugar (ligado ao data-modulo: acompanha a fusão das cores) */

    /* ── Cartão dos módulos: se expande do botão até a borda direita ─────────
       Ancorado embaixo, alinhado ao botão (left/bottom vêm do JS) e com folga
       visível à direita. O 1º "quadrado" do cartão repete o botão apertado, por
       isso a expansão parece nascer dele. */
    .modulo-veu { position: fixed; inset: 0; z-index: 80; background: color-mix(in srgb, var(--ink) 38%, transparent); opacity: 0; pointer-events: none; transition: opacity .45s ease; }
    .modulo-veu.on { opacity: 1; pointer-events: auto; }
    .modulo-painel {
      position: fixed; z-index: 90; display: grid; grid-template-columns: var(--bw, 76px) minmax(0, 1fr); align-items: end;
      background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: 18px;
      box-shadow: 0 24px 60px rgba(0, 0, 0, .38);
    }
    .modulo-painel[hidden] { display: none; }
    .modulo-fechar {
      display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
      height: var(--bh, 62px); border: none; background: none; cursor: pointer;
      font: inherit; font-size: 11px; font-weight: 500; color: var(--ink-fg-hi);
    }
    .modulo-fechar svg { width: 26px; height: 26px; color: #fff; transition: transform .5s var(--ease); }
    .modulo-painel.abrindo .modulo-fechar svg { transform: rotate(90deg); }
    .modulo-corpo { padding: 16px 18px 16px 8px; min-width: 0; }
    .modulo-painel .modulo-menu-tit { padding: 0 6px 10px; }
    .modulo-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
    .modulo-painel .modulo-item {
      padding: 14px 16px; gap: 14px; border-radius: 14px; border: 1px solid var(--ink-line);
      background: color-mix(in srgb, var(--ink) 55%, transparent);
    }
    .modulo-painel .modulo-item:hover { background: var(--ink); border-color: var(--ink-icon); }
    .modulo-painel .modulo-item.ativo { background: color-mix(in srgb, var(--ink-icon) 14%, transparent); border-color: color-mix(in srgb, var(--ink-icon) 55%, transparent); }
    .modulo-painel .modulo-item .mark { width: 44px; height: 44px; border-radius: 12px; }
    .modulo-painel .modulo-logo.modulo-fd { font-size: 15px; }
    .modulo-painel .modulo-txt b { font-size: var(--fs-md); }
    .modulo-painel .modulo-txt small { margin-top: 2px; }
    /* o conteúdo aparece depois que o cartão já abriu, em cascata */
    @keyframes moduloConteudo { from { opacity: 0; transform: translateY(10px); } }
    .modulo-painel.abrindo .modulo-menu-tit { animation: moduloConteudo .45s var(--ease) .2s backwards; }
    .modulo-painel.abrindo .modulo-item { animation: moduloConteudo .5s var(--ease) backwards; }
    .modulo-painel.fechando .modulo-corpo { opacity: 0; transition: opacity .18s ease; }
    @media (prefers-reduced-motion: reduce) { .modulo-painel *, .modulo-veu { animation: none !important; transition: none !important; } }
    .modulo-menu-tit { font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-fg-2); }

    /* Cartão dos módulos, versão final: uma faixa ao lado do menu, na altura do botão,
       até a borda direita (left/right/top/height vêm do JS). O véu fica ABAIXO do menu:
       o botão continua à vista, apertado. */
    .modulo-veu { z-index: 35; }
    .modulo-painel {
      display: flex; align-items: stretch; padding: 9px 10px; grid-template-columns: none; min-height: 0; gap: 10px;
      background: var(--ink); border: 1px solid var(--ink-line);
    }
    .modulo-btn.aberto { background: color-mix(in srgb, var(--ink-icon) 16%, var(--ink-2)); }
    .modulo-corpo { padding: 0; display: flex; flex: 1; min-width: 0; }
    .modulo-menu-tit { display: none; }
    /* os cartões encolhem até 200px para caber na faixa (com 8 módulos não cabem todos a 286px); passando disso, a lista rola de lado com a
       roda do mouse (modulos.js), sem barra de rolagem. As pontas esmaecem só do lado em que ainda há cartões (--fe/--fd, ligadas por modulos.js), sem corte seco. */
    @property --fe { syntax: "<length>"; inherits: false; initial-value: 0px; }
    @property --fd { syntax: "<length>"; inherits: false; initial-value: 0px; }
    .modulo-lista {
      display: flex; gap: 10px; flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; scroll-behavior: smooth;
      -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fe), #000 calc(100% - var(--fd)), transparent);
      mask-image: linear-gradient(90deg, transparent, #000 var(--fe), #000 calc(100% - var(--fd)), transparent);
      transition: --fe .3s var(--ease), --fd .3s var(--ease);
    }
    .modulo-lista::-webkit-scrollbar { display: none; }
    .modulo-lista.mais-esq { --fe: 36px; }
    .modulo-lista.mais-dir { --fd: 36px; }
    .modulo-painel .modulo-item { flex: 0 1 286px; width: auto; min-width: 200px; padding: 0 16px; gap: 12px; }
    .modulo-painel .modulo-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .modulo-painel .modulo-item .mark { width: 38px; height: 38px; }
    .modulo-painel .modulo-txt { min-width: 0; }
    .modulo-painel .modulo-txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
    /* atraso em cascata só entre os cartões visíveis: --k é numerado pelo modulos.js ao abrir (coligada com poucos módulos não espera cartões escondidos) */
    .modulo-painel.abrindo .modulo-item { animation-delay: calc(.2s + var(--k, 0) * .08s); }

    /* Minhas Demandas em destaque (pedido do dono): é o módulo pessoal, de todo dia, e não de uma coligada. Cartão mais largo, sempre na luz
       do petróleo dele (--ink-demandas, não a do módulo em uso), com um brilho que atravessa uma vez ao abrir e um fio separando-o dos módulos
       da coligada. O selo "Pessoal" diz por que ele é diferente. */
    .modulo-painel .modulo-pessoal {
      position: relative; flex: 0 0 320px; margin-right: 11px;
      border-color: color-mix(in srgb, var(--ink-demandas) 45%, transparent);
      /* 1ª camada: o brilho (fora do cartão em repouso, ver moduloBrilho); 2ª: o degradê do petróleo. Numa variável porque o hover e o ativo
         dos outros cartões trocam o fundo inteiro e têm de ser repetidos aqui. */
      --fundo-pessoal:
        linear-gradient(100deg, transparent 38%, color-mix(in srgb, var(--ink-demandas) 24%, transparent) 50%, transparent 62%) 100% 0 / 250% 100% no-repeat,
        linear-gradient(110deg, color-mix(in srgb, var(--ink-demandas) 20%, transparent), color-mix(in srgb, var(--ink-demandas) 4%, transparent) 75%);
      background: var(--fundo-pessoal);
      box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ink-demandas) 22%, transparent);
      transition: border-color .3s, box-shadow .3s;
    }
    .modulo-painel .modulo-pessoal:hover, .modulo-painel .modulo-pessoal.ativo {
      background: var(--fundo-pessoal); border-color: var(--ink-demandas);
      box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ink-demandas) 22%, transparent), inset 0 0 0 100vmax color-mix(in srgb, var(--ink-demandas) 8%, transparent);
    }
    .modulo-painel .modulo-pessoal .mark { box-shadow: 0 0 0 2px color-mix(in srgb, var(--ink-demandas) 35%, transparent), 0 4px 14px color-mix(in srgb, var(--ink-demandas) 30%, transparent); }
    .modulo-painel .modulo-pessoal .modulo-txt b { display: flex; align-items: center; gap: 8px; color: var(--ink-fg-hi); }
    .modulo-painel .modulo-pessoal .modulo-check { color: var(--ink-demandas); }
    .modulo-selo {
      flex: none; padding: 1px 7px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; line-height: 1.5;
      color: var(--ink-demandas); background: color-mix(in srgb, var(--ink-demandas) 16%, transparent);
      border: 1px solid color-mix(in srgb, var(--ink-demandas) 40%, transparent);
    }
    /* o fio que separa o pessoal dos módulos da coligada, no meio do vão (margem de 11px + o gap de 10px da lista) */
    .modulo-painel .modulo-pessoal::after {
      content: ''; position: absolute; right: -12px; top: 18%; bottom: 18%; width: 1px; background: var(--ink-line); pointer-events: none;
    }
    .modulo-painel.expandido .modulo-pessoal { margin-right: 0; }
    .modulo-painel.expandido .modulo-pessoal::after { display: none; }
    /* brilho: a faixa clara atravessa o cartão uma vez, da esquerda para a direita, logo depois de ele entrar na cascata. O cartão já tem a
       animação de entrada (moduloConteudo), então as duas vão juntas na mesma regra. */
    @keyframes moduloBrilho { from { background-position: 100% 0, 0 0; } to { background-position: 0 0, 0 0; } }
    .modulo-painel.abrindo .modulo-pessoal {
      animation: moduloConteudo .5s var(--ease) backwards, moduloBrilho 1.2s var(--ease) both;
      animation-delay: calc(.2s + var(--k, 0) * .08s), calc(.6s + var(--k, 0) * .08s);
    }

    /* Tipos de um módulo (hoje a Apropriação: Agregados e Equipamentos): ao passar o mouse no cartão, a faixa ganha uma aba logo acima
       dele (.aba, a posição vem do modulos.js). A aba é a própria faixa que cresce: mesmo fundo, sem borda embaixo, cobrindo o fio de cima da
       faixa nesse trecho, com as quinas de baixo curvadas para fora (::before/::after) e subindo a partir da faixa. Na gaveta expandida o
       cartão não está na borda e a lista flutua acima (ou embaixo, .abaixo). O tipo em uso ganha o ✓ como os cartões. */
    @keyframes moduloTipos { from { opacity: 0; transform: translateY(6px); } }
    @keyframes moduloTiposAbaixo { from { opacity: 0; transform: translateY(-6px); } }
    @keyframes moduloTiposAba { from { clip-path: inset(100% -12px 0 -12px); } to { clip-path: inset(-40px -12px 0 -12px); } }
    @keyframes moduloTiposItem { from { opacity: 0; transform: translateY(8px); } }
    .modulo-tipos {
      position: fixed; z-index: 91; display: flex; flex-direction: column; gap: 4px; padding: 6px; box-sizing: border-box;
      background: var(--ink); border: 1px solid var(--ink-line); border-radius: 14px;
      box-shadow: 0 16px 40px color-mix(in srgb, var(--ink) 70%, transparent);
      animation: moduloTipos .22s var(--ease);
    }
    .modulo-tipos.abaixo { animation-name: moduloTiposAbaixo; }
    .modulo-tipos[hidden] { display: none; }
    .modulo-tipos.aba {
      padding: 8px 8px 9px; border-bottom: none; border-radius: 16px 16px 0 0;
      box-shadow: 0 -14px 32px color-mix(in srgb, var(--ink) 45%, transparent);
      animation: moduloTiposAba .32s var(--ease);
    }
    .modulo-tipos.aba > .modulo-tipo { animation: moduloTiposItem .3s var(--ease) backwards; }
    .modulo-tipos.aba > .modulo-tipo:nth-child(1) { animation-delay: .08s; }
    .modulo-tipos.aba > .modulo-tipo:nth-child(2) { animation-delay: .14s; }
    /* saída: o caminho inverso da entrada (a aba desce de volta para dentro da faixa; a lista flutuante esmaece). A duração casa com
       TIPOS_SAIDA no modulos.js, que só esconde a lista depois dela. */
    @keyframes moduloTiposSai { to { opacity: 0; transform: translateY(6px); } }
    @keyframes moduloTiposAbaixoSai { to { opacity: 0; transform: translateY(-6px); } }
    @keyframes moduloTiposAbaSai { from { clip-path: inset(-40px -12px 0 -12px); } to { clip-path: inset(100% -12px 0 -12px); } }
    .modulo-tipos.saindo { animation: moduloTiposSai .22s var(--ease) both; pointer-events: none; }
    .modulo-tipos.abaixo.saindo { animation-name: moduloTiposAbaixoSai; }
    .modulo-tipos.aba.saindo { animation-name: moduloTiposAbaSai; }
    .modulo-tipos.saindo > .modulo-tipo { opacity: 0; transition: opacity .14s ease; }
    /* quinas côncavas: o fio do lado da aba faz a curva e vira o fio de cima da faixa */
    .modulo-tipos.aba::before, .modulo-tipos.aba::after {
      content: ''; position: absolute; bottom: 0; width: 10px; height: 10px; pointer-events: none;
    }
    .modulo-tipos.aba::before {
      left: -10px;
      background: radial-gradient(circle at 0 0, transparent 9px, var(--ink-line) 9px, var(--ink-line) 10px, var(--ink) 10px);
    }
    .modulo-tipos.aba::after {
      right: -10px;
      background: radial-gradient(circle at 100% 0, transparent 9px, var(--ink-line) 9px, var(--ink-line) 10px, var(--ink) 10px);
    }
    /* o cartão continua aceso enquanto o mouse está na aba dele */
    .modulo-painel .modulo-item[aria-expanded="true"]:not(.ativo) { background: var(--ink-2); border-color: var(--ink-icon); }
    .modulo-tipo {
      display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 10px; border: 1px solid transparent;
      background: none; font: inherit; color: var(--ink-fg); text-align: left; cursor: pointer; transition: background .25s, border-color .25s;
    }
    .modulo-tipo:hover { background: var(--ink-2); border-color: var(--ink-line); }
    .modulo-tipo.ativo { background: color-mix(in srgb, var(--ink-icon) 14%, transparent); border-color: color-mix(in srgb, var(--ink-icon) 45%, transparent); }
    .modulo-tipo[aria-disabled="true"] { cursor: default; }
    .modulo-tipo[aria-disabled="true"]:hover { background: none; border-color: transparent; }
    .modulo-tipo[aria-disabled="true"] .modulo-tipo-ico, .modulo-tipo[aria-disabled="true"] .modulo-tipo-txt { opacity: .6; }
    .modulo-tipo-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--ink-2); color: var(--ink-icon); }
    .modulo-tipo-ico svg { width: 18px; height: 18px; }
    .modulo-tipo-txt { flex: 1; min-width: 0; }
    .modulo-tipo-txt b { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; white-space: nowrap; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-fg-hi); }
    .modulo-tipo-txt small { display: block; margin-top: 2px; font-size: var(--fs-xs); line-height: 1.35; color: var(--ink-fg-2); }   /* quebra a linha em vez de cortar com "…" */
    .modulo-tipo-selo { flex: none; padding: 0 7px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 500; line-height: 1.5; color: var(--ink-fg-2); border: 1px solid var(--ink-line); }
    .modulo-tipo .modulo-check { flex: none; width: 16px; height: 16px; color: var(--ink-ok); }
    .modulo-tipo.ativo .modulo-check { opacity: 1; transform: none; }
    @media (prefers-reduced-motion: reduce) { .modulo-tipos, .modulo-tipos > .modulo-tipo { animation: none !important; } }

