  :root {
    --azul: #1f3b5c; --azul-2: #2c5282; --azul-claro: #dbe6f3; --selecao: #c7dbf2;
    --cinza-0: #f3f4f6; --cinza-1: #e6e8eb; --cinza-2: #cfd4da; --cinza-3: #9aa3ad; --texto: #1f2933; --suave: #5f6b77;
    --vermelho: #b42318; --verde: #1d7a43; --amarelo: #8a6100;
    --topo: #2154a6; --topo-2: #1b438a; --topo-3: #173a78; --topo-hover: #0f2c5e;
    --lateral: #2a5cb3; --lateral-ico: #fff; --lateral-ico-cor: #1b438a;
  }
  /* temas do topo e do painel lateral: escolhidos no botão de paleta do rodapé (guardado no navegador) */
  html[data-tema="preto"] { --topo: #3b4042; --topo-2: #313638; --topo-3: #313638; --topo-hover: #24282a; --lateral: #505658; --lateral-ico: #3b4042; --lateral-ico-cor: #fff; }
  html[data-tema="cinza"] { --topo: #65686a; --topo-2: #5c5e5f; --topo-3: #5b5e5f; --topo-hover: #484a4b; --lateral: #8e9295; --lateral-ico: #797c7f; --lateral-ico-cor: #fff; }
  html[data-tema="verde"] { --topo: #0a404f; --topo-2: #013643; --topo-3: #013643; --topo-hover: #00242d; --lateral: #1d5a6a; --lateral-ico: #0e4d5f; --lateral-ico-cor: #fff; }
  :root {
  }
  * { box-sizing: border-box; }
  html, body { height: 100%; }
  body { margin: 0; font: 12px/1.35 "Segoe UI", Tahoma, Arial, sans-serif; color: var(--texto); background: var(--cinza-0); display: flex; flex-direction: column; }
  a { color: var(--azul-2); }
  .ico { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }

  /* topo no padrão de sistema desktop: marca num bloco, menu em texto com submenus e atalhos em ícone */
  .topo { background: var(--topo); color: #fff; display: flex; align-items: stretch; min-height: 96px; position: relative; z-index: 30; }
  .marca { background: var(--topo-2); color: #fff; text-decoration: none; display: flex; align-items: center; gap: 8px; padding: 0 22px; font-size: 16px; letter-spacing: .3px; }
  .marca b { font-weight: 700; }
  .topo-meio { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 6px 14px; min-width: 0; }
  .menu-topo { display: flex; gap: 2px; }
  .menu-topo .m { position: relative; }
  .m-titulo { all: unset; box-sizing: border-box; display: flex; align-items: center; height: 26px; padding: 0 9px; font-size: 14px; color: #fff; cursor: pointer; text-decoration: none; border-radius: 2px 2px 0 0; }
  .m-titulo:hover, .m-titulo:focus-visible { background: rgba(255,255,255,.14); outline: none; }
  .m-titulo.ativo { box-shadow: inset 0 -2px 0 #fff; }
  .m.aberto > .m-titulo { background: #fff; color: var(--texto); box-shadow: none; }
  .m-titulo u, .sub u { text-underline-offset: 2px; }
  .bolha { margin-left: 5px; background: #e02424; color: #fff; border-radius: 9px; font-size: 10px; font-weight: 700; padding: 0 5px; line-height: 16px; }
  .sub { display: none; position: absolute; left: 0; top: 26px; min-width: 260px; background: #fff; color: var(--texto); padding: 4px 0; box-shadow: 0 8px 22px rgba(0,0,0,.28); z-index: 50; }
  .m.aberto > .sub { display: block; }
  .sub a { display: block; padding: 3px 22px; color: var(--texto); text-decoration: none; white-space: nowrap; }
  .sub a:hover, .sub a:focus-visible { background: #e2e5e9; outline: none; }
  .sub hr { border: 0; border-top: 1px solid var(--cinza-2); margin: 3px 18px; }
  /* menu mais alto que a tela (ex.: Utilitários em tela baixa): aperta os itens em vez de a página rolar */
  .sub.apertado a, .sub.apertado .it > .grp { padding-top: 1px; padding-bottom: 1px; }
  .sub.apertado hr { margin: 1px 18px; }
  body:has(.menu-topo) { overflow: hidden; }
  button.marca { all: unset; box-sizing: border-box; background: var(--topo-2); color: #fff; display: flex; align-items: center; gap: 8px; padding: 0 22px; font-size: 16px; letter-spacing: .3px; cursor: pointer; }
  button.marca:hover, button.marca:focus-visible, html.lateral-aberta button.marca { background: var(--topo-3); }
  .lateral { display: none; position: fixed; left: 0; top: 96px; bottom: 28px; width: 240px; background: var(--lateral); color: #fff; padding: 12px 0; overflow: auto; z-index: 20; }
  /* aberto, o painel fica fixo à esquerda e empurra a área (fica assim em todas as páginas até clicar de novo em Contábil) */
  html.lateral-aberta .lateral { display: block; }
  html.lateral-aberta body:has(.lateral) .area { margin-left: 240px; }
  .lateral-busca { display: flex; margin: 0 14px 12px; background: #fff; }
  .lateral-busca input { flex: 1; min-width: 0; border: 0; padding: 4px 8px; font: inherit; outline: none; }
  .lateral-busca .ico { width: 22px; height: 22px; padding: 3px; background: var(--topo-2); color: #fff; align-self: stretch; height: auto; }
  .lateral a { display: flex; align-items: center; gap: 10px; padding: 6px 16px; color: #fff; text-decoration: none; font-size: 13px; }
  .lateral a:hover, .lateral a:focus-visible { background: rgba(255,255,255,.14); outline: none; }
  .lateral a.ativo { background: rgba(0,0,0,.18); font-weight: 600; }
  .lateral a[hidden], .lateral-grupo[hidden] { display: none; }
  .lateral-titulo { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 16px; color: #fff; font-size: 13px; cursor: pointer; }
  .lateral-titulo:hover, .lateral-titulo:focus-visible { background: rgba(255,255,255,.14); }
  .lateral-titulo.ativo { font-weight: 600; }
  .lateral-titulo .seta { margin-left: auto; font-size: 11px; }
  .lateral-grupo.aberto .lateral-titulo { background: rgba(255,255,255,.22); }
  .lateral-filhos { display: none; position: fixed; left: 240px; min-width: 240px; background: #fff; padding: 4px 0; box-shadow: 0 8px 22px rgba(0,0,0,.28); z-index: 60; }
  .lateral-grupo.aberto .lateral-filhos { display: block; }
  .lateral .lateral-filhos a { color: var(--texto); padding: 5px 22px; font-size: 12px; }
  .lateral .lateral-filhos a:hover, .lateral .lateral-filhos a:focus-visible { background: #e2e5e9; }
  .lateral .lateral-filhos a.ativo { background: none; font-weight: 600; }
  .lateral-ico { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; background: var(--lateral-ico); color: var(--lateral-ico-cor); border-radius: 2px; flex: none; }
  .lateral-ico .ico { width: 16px; height: 16px; }
  .atalhos { display: flex; gap: 10px; }
  .atalhos a { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--topo-3); color: #fff; border-radius: 2px; }
  .atalhos a:hover, .atalhos a:focus-visible { background: var(--topo-hover); outline: 2px solid rgba(255,255,255,.35); }
  .atalhos .ico { width: 20px; height: 20px; }
  .topo .direita { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 4px; padding: 6px 14px; font-size: 12px; }
  .topo .direita .linha { display: flex; align-items: center; gap: 6px; }
  .topo .direita .usuario { opacity: .92; letter-spacing: .2px; }
  .topo .direita .data { opacity: .85; padding-right: 4px; }

  /* área de trabalho */
  .area { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
  .titulo-tela { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--suave); }
  .titulo-tela b { color: var(--texto); }
  .painel { background: #fff; border: 1px solid var(--cinza-2); }
  .painel-titulo { background: linear-gradient(#f8f9fa, #eceef1); border-bottom: 1px solid var(--cinza-2); padding: 4px 8px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
  .lista-escritorios { display:none; position:absolute; right:0; top:30px; width:480px; max-height:360px; overflow:auto; background:#fff; border:1px solid #7b8794; box-shadow:0 8px 24px rgba(0,0,0,.25); z-index:40; color:var(--texto); text-align:left; }
  .lista-escritorios.aberta { display:block; }
  .lista-escritorios .painel-titulo { position:sticky; top:0; z-index:1; }
  .lista-escritorios form button { all:unset; box-sizing:border-box; width:100%; display:flex; justify-content:space-between; gap:10px; padding:4px 8px; cursor:pointer; border-bottom:1px solid var(--cinza-1); }
  .lista-escritorios form button:hover { background:#eef4fb; }
  .lista-escritorios form button.atual { background:var(--selecao); font-weight:600; }
  .busca-escritorios { position:sticky; top:25px; z-index:1; background:#fff; padding:6px 8px; border-bottom:1px solid var(--cinza-2); display:flex; align-items:center; gap:8px; }
  .busca-escritorios input { flex:1; }
  .item-escritorio[hidden] { display:none; }
  .painel-corpo { padding: 8px; }

  /* barra de ferramentas e botões */
  .ferramentas { display: flex; align-items: center; gap: 2px; padding: 3px; background: linear-gradient(#fbfbfc, #eef0f3); border: 1px solid var(--cinza-2); }
  .ferramentas .sep { width: 1px; align-self: stretch; background: var(--cinza-2); margin: 2px 4px; }
  .bt { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; font: inherit; color: var(--texto); background: transparent; border: 1px solid transparent; border-radius: 2px; cursor: pointer; text-decoration: none; white-space: nowrap; }
  .bt:hover:not([disabled]) { background: #e3ebf5; border-color: #a9c0dd; }
  .bt[disabled] { color: var(--cinza-3); cursor: default; }
  .bt-padrao { background: linear-gradient(#fff, #eceff2); border-color: var(--cinza-2); }
  .bt-primario { background: var(--azul-2); border-color: var(--azul); color: #fff; }
  .bt-primario:hover:not([disabled]) { background: var(--azul); border-color: var(--azul); }
  /* botão só com ícone (nas linhas das listas): o nome aparece ao passar o mouse */
  /* botões de ícone: tamanho fixo em todas as telas (Josiel, 02/12/2026: não podem ficar uns maiores que outros) */
  .bt-ico { position: relative; width: 28px; min-width: 28px; height: 22px; padding: 0; flex: none; justify-content: center; background: linear-gradient(#fff, #eceff2); border-color: var(--cinza-2); }
  .bt-ico .ico { width: 16px; height: 16px; color: var(--azul-2); }
  .bt-ico.perigo .ico { color: var(--vermelho); }
  .bt-ico.perigo:hover:not([disabled]) { background: #fef3f2; border-color: #f0b8b3; }
  /* o número (ex.: quantas pastas) vira um selo no canto: o botão não alarga */
  .bt-ico .cont { position: absolute; top: -5px; right: -5px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px; background: var(--azul-2); color: #fff; font-size: 9px; font-weight: 700; line-height: 14px; text-align: center; pointer-events: none; }
  /* coluna das ações sempre da mesma largura (3 botões), botões alinhados à direita: não mudam de lugar entre as pastas */
  .acoes { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
  .grade .acoes { width: 96px; min-width: 96px; margin-left: auto; }
  .grade td:has(> .acoes), .grade th.col-acoes { width: 104px; min-width: 104px; padding-top: 2px; padding-bottom: 2px; }
  .bt-primario .ico { color: #fff; }
  .topo .bt { color: #fff; }
  .topo .bt:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); }

  /* campos */
  .campos { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
  .campo label { display: block; color: var(--suave); margin-bottom: 2px; }
  input, select { font: inherit; height: 24px; padding: 0 5px; border: 1px solid var(--cinza-2); border-radius: 2px; background: #fff; color: var(--texto); }
  input:focus, select:focus { outline: none; border-color: var(--azul-2); box-shadow: 0 0 0 2px var(--azul-claro); }

  /* grade */
  .grade-caixa { flex: 1; min-height: 0; overflow: auto; background: #fff; border: 1px solid var(--cinza-2); }
  .grade { border-collapse: separate; border-spacing: 0; width: 100%; }
  .grade th, .grade td { padding: 3px 6px; border-right: 1px solid var(--cinza-1); border-bottom: 1px solid var(--cinza-1); white-space: nowrap; text-align: left; }
  .grade thead th { background: linear-gradient(#f7f8f9, #e9ecef); color: #3c4650; font-weight: 600; position: sticky; z-index: 1; border-bottom-color: var(--cinza-2); }
  .grade thead tr:first-child th { top: 0; }
  .grade thead tr:nth-child(2) th { top: 23px; }
  .grade th.grupo { text-align: center; }
  .grade tbody tr:nth-child(even) td { background: #fafbfc; }
  .grade tbody tr.linha { cursor: default; }
  .grade tbody tr.linha:hover td { background: #eef4fb; }
  .grade tbody tr.selecionada td { background: var(--selecao) !important; }
  .num { text-align: right !important; font-variant-numeric: tabular-nums; }
  .mono { font-family: Consolas, "Courier New", monospace; }
  .suave { color: var(--suave); }
  .sit { font-weight: 600; }
  .sit.cancelada { color: var(--vermelho); }
  .sit.resumo { color: var(--amarelo); }
  .sit.ok { color: var(--verde); }

  /* rodapé da grade e barra de status */
  .paginacao { display: flex; align-items: center; gap: 6px; padding: 4px 6px; background: #f7f8f9; border: 1px solid var(--cinza-2); border-top: none; }
  /* barra do rodapé no padrão desktop: fica no fim de toda página, na cor do tema; o dock fica colado em cima dela */
  .status { position: fixed; left: 0; right: 0; bottom: 0; z-index: 44; height: 28px; background: var(--topo-2); color: #fff; display: flex; align-items: center; gap: 18px; padding: 0 10px; font-size: 13px; }
  .status .grupo { display: flex; align-items: center; gap: 4px; }
  .status .grupo > b { font-weight: 400; margin-right: 4px; opacity: .95; }
  .status .grupo a { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.22); color: var(--topo-2); border-radius: 2px; }
  .status .grupo a:hover, .status .grupo a:focus-visible { background: #fff; outline: none; }
  .status .grupo a .ico { width: 13px; height: 13px; color: #fff; }
  .status .grupo a:hover .ico, .status .grupo a:focus-visible .ico { color: var(--topo-2); }
  .status .fim { margin-left: auto; }
  .status .luz { width: 14px; height: 14px; border-radius: 50%; background: #22e05a; box-shadow: 0 0 0 2px rgba(255,255,255,.15); }
  .status .luz.off { background: #e02424; }
  .status > span { display: flex; align-items: center; gap: 4px; }

  /* mensagens */
  .msg { padding: 6px 10px; border: 1px solid; border-left-width: 4px; background: #fff; }
  .msg.erro { border-color: #f0b8b3; border-left-color: var(--vermelho); color: var(--vermelho); }
  .msg.ok { border-color: #b7dcc5; border-left-color: var(--verde); color: #14532d; }
  .msg.info { border-color: #ecd9a3; border-left-color: #c48a00; color: #6b4b00; }

  /* janela (diálogo) */
  .janela-fundo { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); display: none; align-items: flex-start; justify-content: center; padding-top: 80px; z-index: 50; }
  .janela-fundo.aberta { display: flex; }
  .janela { background: #fff; border: 1px solid #7b8794; box-shadow: 0 8px 24px rgba(0,0,0,.25); width: 560px; }
  .janela-titulo { background: var(--azul); color: #fff; padding: 6px 10px; font-weight: 600; display: flex; align-items: center; }
  .janela-titulo button, .janela-titulo a { margin-left: auto; background: none; border: none; color: #fff; font-size: 16px; cursor: pointer; line-height: 1; text-decoration: none; }
  .janela .msg { margin: 10px 10px 0; }
  .janela-corpo { padding: 10px; }
  .janela-rodape { padding: 8px 10px; border-top: 1px solid var(--cinza-1); background: #f7f8f9; display: flex; justify-content: flex-end; gap: 6px; }
  .ficha { width: 100%; border-collapse: collapse; }
  .ficha th { width: 130px; text-align: left; color: var(--suave); font-weight: 400; padding: 3px 6px; background: #f7f8f9; border: 1px solid var(--cinza-1); }
  .ficha td { padding: 3px 6px; border: 1px solid var(--cinza-1); }

  /* menu em dock no rodapé (mesmo padrão do projeto Apps; a ampliação está em public/js/dock.js) */
  body:has(.status) { padding-bottom: 28px; } /* a barra do rodapé fica presa no fim da janela, mesmo rolando */
  /* o dock fica escondido; aparece ao passar o mouse no botão Menu do rodapé (e fica enquanto o mouse estiver nele) */
  #dock { opacity: 0; pointer-events: none; transition: opacity .15s, translate .15s; translate: 0 8px; }
  body.dock-visivel #dock { opacity: 1; pointer-events: auto; translate: 0 0; }
  .bt-menu-dock { all: unset; box-sizing: border-box; position: absolute; left: 50%; transform: translateX(-50%); height: 22px; padding: 0 12px; display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.18); border-radius: 2px; cursor: pointer; color: #fff; }
  .bt-menu-dock:hover, .bt-menu-dock:focus-visible, body.dock-visivel .bt-menu-dock { background: #fff; color: var(--topo-2); }
  .bt-menu-dock .ico { width: 14px; height: 14px; }
  /* tamanho igual ao Baixa Notas: botão de 36px que cresce até 62px */
  #dock .di { --base:36px; --cresce:26px; --s:36px; }
  #dock { position:fixed; left:50%; bottom:calc(30px + env(safe-area-inset-bottom, 0px)); transform:translateX(-50%); z-index:45; max-width:calc(100% - 16px); }
  #dockIn { display:flex; align-items:flex-end; gap:5px; padding:5px 7px; background:rgba(255,255,255,.06); border-radius:16px; backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); box-shadow:inset 0 0 0 1px rgba(31,59,92,.10); } /* quase transparente: só um contorno leve */
  .di { all:unset; box-sizing:border-box; position:relative; flex:none; width:var(--s,46px); height:var(--s,46px); cursor:pointer; transition:width .14s ease-out, height .14s ease-out; }
  .di .tile { position:absolute; inset:0; border-radius:24%; display:grid; place-items:center; background:linear-gradient(160deg, color-mix(in srgb, var(--c) 80%, #fff 20%), color-mix(in srgb, var(--c) 60%, #000 40%)); box-shadow:0 4px 12px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.35); }
  .di svg { width:54%; height:54%; fill:none; stroke:#fff; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
  .di .tip { position:absolute; bottom:calc(100% + 12px); left:50%; transform:translateX(-50%); white-space:nowrap; background:rgba(14,18,38,.94); color:#eef2f7; padding:5px 10px; border-radius:8px; font:500 12px "Segoe UI", Arial, sans-serif; opacity:0; pointer-events:none; transition:opacity .12s; box-shadow:inset 0 0 0 1px rgba(255,255,255,.14); }
  .di:hover .tip, .di:focus-visible .tip { opacity:1; }
  .di:focus-visible .tile { outline:2px solid #fff; outline-offset:2px; }
  .di::after { content:""; position:absolute; bottom:-5px; left:50%; width:4px; height:4px; margin-left:-2px; border-radius:50%; background:#fff; opacity:0; transition:opacity .2s; }
  .di.on::after { opacity:.95; }
  #dockIn .sep { flex:none; width:1px; align-self:stretch; margin:6px 3px; background:rgba(31,59,92,.22); }
  @media (max-width:860px) { #dockIn { overflow-x:auto; scrollbar-width:none; } #dock .di { --base:34px; --s:34px; } }
  @media print { #dock, .status { display:none; } body:has(.status) { padding-bottom:0; } body:has(#dock) .area { padding-bottom:8px; } }
  .temas { display:none; position:absolute; bottom:calc(100% + 10px); right:0; background:#fff; border:1px solid #7b8794; box-shadow:0 8px 24px rgba(0,0,0,.25); padding:6px; z-index:50; color:var(--texto); }
  .temas.aberta { display:block; }
  .temas .painel-titulo { margin:-6px -6px 6px; }
  .temas button { all:unset; box-sizing:border-box; display:flex; align-items:center; gap:8px; width:150px; padding:5px 6px; cursor:pointer; border-radius:2px; }
  .temas button:hover, .temas button:focus-visible { background:#eef4fb; }
  .temas button[aria-pressed="true"] { background:var(--selecao); font-weight:600; }
  .temas i { width:28px; height:18px; border-radius:2px; box-shadow:inset 0 0 0 1px rgba(0,0,0,.2); }
  /* tela estreita: nada espreme o texto; barras quebram linha ou rolam de lado */
  .bt, .m-titulo, .status span, .topo > * { white-space: nowrap; flex-shrink: 0; }
  .ferramentas { flex-wrap: wrap; row-gap: 3px; }
  .status { overflow-x: auto; scrollbar-width: none; }
  .status::-webkit-scrollbar { display: none; }
  .janela { max-width: calc(100vw - 24px); }
  @media (max-width: 1100px) { .atalhos { display: none; } .topo { min-height: 64px; } .topo .direita .data { display: none; } .lateral { top: 64px; } }
  @media (max-width: 760px) { .menu-topo { flex-wrap: wrap; } .marca b { display: none; } }

  /* cartões de indicadores (dashboards) */
  .cartoes { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:8px; }
  .cartao { border:1px solid var(--cinza-2); border-left:4px solid var(--azul-2); padding:8px 10px; background:#fff; }
  .cartao span { color:var(--suave); display:block; }
  .cartao b { font-size:22px; font-variant-numeric:tabular-nums; color:var(--azul); }
  .cartao.verde { border-left-color:var(--verde); } .cartao.verde b { color:var(--verde); }
  .cartao.amarelo { border-left-color:#c48a00; } .cartao.amarelo b { color:var(--amarelo); }
  .cartao.vermelho { border-left-color:var(--vermelho); } .cartao.vermelho b { color:var(--vermelho); }
  /* loading: o logo do login num cartão de vidro translúcido, com a tela desfocada por trás */
  .aguarde { position: fixed; inset: 0; background: rgba(31,59,92,.18); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; z-index: 60; }
  .aguarde.aberto { display: flex; }
  .aguarde > div { background: rgba(255,255,255,.62); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid rgba(255,255,255,.7); border-radius: 14px; box-shadow: 0 18px 48px rgba(15,23,42,.28), inset 0 1px 0 rgba(255,255,255,.8); padding: 22px 26px 18px; min-width: 340px; max-width: 440px; text-align: center; }
  .aguarde-logo { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 12px; }
  .aguarde-logo b { font-size: 17px; color: var(--azul); }
  .aguarde-topo { display: flex; align-items: center; gap: 10px; }
  .gira { width: 18px; height: 18px; flex: none; border: 3px solid var(--azul-claro); border-top-color: var(--azul-2); border-radius: 50%; animation: gira .8s linear infinite; }
  .aguarde-tempo { color: var(--suave); font-size: 12px; margin-top: 6px; }
  .barra { height: 6px; background: var(--cinza-1); margin-top: 8px; overflow: hidden; border-radius: 3px; }
  .barra i { display: block; height: 100%; width: 35%; background: var(--azul-2); border-radius: 3px; animation: corre 1.2s ease-in-out infinite; }
  @keyframes corre { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
  @keyframes gira { to { transform: rotate(360deg); } }
  @media (prefers-reduced-motion: reduce) { .gira, .barra i { animation-duration: 3s; } }

  /* tema Claro: topo e painel em cinza-claro com letra e ícones escuros (estilo clássico do Windows) */
  html[data-tema="claro"] { --topo: #e9edf2; --topo-2: #dde3ea; --topo-3: #cfd8e2; --topo-hover: #bfcad6; --lateral: #f4f6f9; --lateral-ico: #dde3ea; --lateral-ico-cor: #1f3b5c; }
  html[data-tema="claro"] .topo, html[data-tema="claro"] .marca, html[data-tema="claro"] .marca-sistema, html[data-tema="claro"] .m-titulo,
  html[data-tema="claro"] .topo .bt, html[data-tema="claro"] .topo .bt-topo, html[data-tema="claro"] .atalhos a, html[data-tema="claro"] .lateral,
  html[data-tema="claro"] .lateral a, html[data-tema="claro"] .lateral-titulo, html[data-tema="claro"] .status, html[data-tema="claro"] .bt-menu-dock { color: #1f2933; }
  html[data-tema="claro"] .topo { border-bottom: 1px solid #c5ced8; }
  html[data-tema="claro"] .status { border-top: 1px solid #c5ced8; }
  html[data-tema="claro"] .lateral { border-right: 1px solid #d5dce4; }
  html[data-tema="claro"] .m-titulo:hover, html[data-tema="claro"] .lateral a:hover, html[data-tema="claro"] .lateral-titulo:hover,
  html[data-tema="claro"] .topo .bt:hover, html[data-tema="claro"] .topo .bt-topo:hover { background: rgba(0,0,0,.07); border-color: transparent; }
  html[data-tema="claro"] .m-titulo.ativo { box-shadow: inset 0 -2px 0 #1f3b5c; }
  html[data-tema="claro"] .m.aberto > .m-titulo { background: #fff; }
  html[data-tema="claro"] .lateral a.ativo { background: rgba(0,0,0,.09); }
  html[data-tema="claro"] .atalhos a { box-shadow: inset 0 0 0 1px #b8c3cf; }
  html[data-tema="claro"] .atalhos a:hover { outline-color: #1f3b5c; }
  html[data-tema="claro"] .status .grupo a { background: rgba(0,0,0,.08); }
  html[data-tema="claro"] .status .grupo a .ico, html[data-tema="claro"] .status .grupo a svg { color: #1f3b5c; }
  html[data-tema="claro"] .bt-menu-dock { background: rgba(0,0,0,.08); }
  html[data-tema="claro"] .lateral-busca .ico, html[data-tema="claro"] .lateral-busca svg { color: #1f3b5c; }
  /* ===== estilo clássico de sistema desktop (cadastros e listagens): fundo cinza, campos afundados, botões com relevo, grade compacta ===== */
  html body { font-family: Tahoma, "Segoe UI", Arial, sans-serif; }
  html .painel, html .area-monitor, html .ferramentas, html .paginacao { background: #f0f0f0; }
  html .ferramentas { border-color: #d5d5d5; }
  /* campos: borda afundada; os que não se editam ficam cinza */
  html input:not([type=checkbox]):not([type=radio]):not([type=file]), html select, html textarea {
    height: 21px; padding: 0 4px; border: 1px solid; border-color: #a0a0a0 #e3e3e3 #e3e3e3 #a0a0a0; border-radius: 0;
    box-shadow: inset 1px 1px 0 #696969; background: #fff; color: #000; font: inherit; }
  html textarea { height: auto; padding: 3px 4px; }
  html input[readonly], html input:disabled, html select:disabled, html textarea[readonly], html textarea:disabled { background: #f0f0f0; color: #000; }
  html input:focus, html select:focus, html textarea:focus { outline: 1px solid #0078d7; outline-offset: 0; border-color: #a0a0a0 #e3e3e3 #e3e3e3 #a0a0a0; box-shadow: inset 1px 1px 0 #696969; }
  html input[type=search]::-webkit-search-cancel-button { cursor: pointer; }
  /* botões com relevo (o principal ganha a borda azul de botão padrão do Windows) */
  html .bt-padrao, html .bt-primario, html .bt-ico { height: 23px; background: linear-gradient(#fdfdfd, #e1e1e1); border: 1px solid #adadad; border-radius: 0; color: #000; }
  html .bt-padrao:hover:not([disabled]), html .bt-primario:hover:not([disabled]), html .bt-ico:hover:not([disabled]) { background: linear-gradient(#f2f8fe, #dcecfc); border-color: #0078d7; }
  html .bt-padrao:active, html .bt-primario:active, html .bt-ico:active { background: #cce4f7; border-color: #005499; }
  html .bt-primario { border-color: #0078d7; box-shadow: inset 0 0 0 1px #0078d7; }
  html .bt-primario .ico { color: var(--azul-2); }
  html .bt[disabled] { color: #a0a0a0; background: #f4f4f4; border-color: #d5d5d5; }
  html .bt-ico { width: 25px; }
  /* listagem: cabeçalho claro com divisórias, linha compacta, seleção azul forte */
  html .grade-caixa { background: #fff; border: 1px solid; border-color: #828790 #e3e3e3 #e3e3e3 #828790; }
  html .grade th, html .grade td { padding: 1px 5px; height: 19px; border-right: 1px solid #f0f0f0; border-bottom: 1px solid #f4f4f4; }
  html .grade thead th { background: #fff; color: #000; font-weight: 400; border-right: 1px solid #e5e5e5; border-bottom: 1px solid #d5d5d5; height: 21px; }
  /* todas as linhas da grade com a mesma altura, com ou sem botões (Josiel, 02/12/2026) */
  html .grade tbody td { height: 26px; }
  html .grade tbody td:has(> .acoes) { padding-top: 1px; padding-bottom: 1px; }
  html .grade thead tr:nth-child(2) th { top: 21px; }
  html .grade tbody tr:nth-child(even) td { background: #fff; }
  html .grade tbody tr.linha:hover td { background: #e5f3ff; }
  html .grade tbody tr.selecionada td, html .grade tbody tr.selecionada td * { background: #0078d7 !important; color: #fff !important; }
  /* janelas de cadastro como janela do Windows */
  html .janela { background: #f0f0f0; border: 1px solid #6f8fb5; box-shadow: 0 0 0 5px #c9daf0, 0 10px 28px rgba(0,0,0,.35); }
  html .janela-titulo { background: linear-gradient(#eaf1f9, #d3e1f0); color: #000; font-weight: 400; padding: 4px 4px 4px 10px; }
  html .janela-titulo button, html .janela-titulo a { width: 42px; height: 18px; display: flex; align-items: center; justify-content: center; background: linear-gradient(#e8a493, #c75050); border: 1px solid #8d3a3a; color: #fff; font-size: 13px; }
  html .janela-titulo button:hover, html .janela-titulo a:hover { background: linear-gradient(#f2b6a6, #e04343); }
  html .janela-rodape { background: #f0f0f0; border-top: 0; }
  /* formulário: rótulo simples à esquerda e campo afundado */
  html .ficha th { background: none; border: 0; color: #000; padding: 3px 8px 3px 0; }
  html .ficha td { border: 0; padding: 2px 0; }
  /* caixa de grupo com borda em relevo (como "Período", "Seleção" das telas de filtro) */
  html fieldset { border: 1px solid #d5d5d5; box-shadow: inset 1px 1px 0 #fff, 1px 1px 0 #fff; border-radius: 0; margin: 6px 0; padding: 6px 10px 8px; }
  html input[type=checkbox], html input[type=radio] { accent-color: #0078d7; width: 13px; height: 13px; margin: 0 5px 0 0; vertical-align: -2px; }
  /* filtros e buscas: viram caixa de grupo "Filtros", com o nome à esquerda de cada campo */
  html form.campos { position: relative; background: #f0f0f0; border: 1px solid #d5d5d5; box-shadow: inset 1px 1px 0 #fff, 1px 1px 0 #fff; padding: 14px 10px 8px !important; margin-top: 8px; gap: 6px 16px; align-items: center; }
  html form.campos::before { content: "Filtros"; position: absolute; top: -8px; left: 8px; padding: 0 4px; background: #f0f0f0; color: #000; }
  html .campo { display: flex; align-items: center; gap: 5px; }
  html .campo label { margin: 0; color: #000; white-space: nowrap; }
  html legend { padding: 0 4px; color: #000; }
  /* abas como as do Windows */
  html .abas-monitor { border-bottom: 1px solid #adadad; gap: 0; padding-left: 4px; }
  html .abas-monitor a { background: #f0f0f0; border: 1px solid #adadad; border-bottom: 0; margin: 2px -1px 0 0; padding: 2px 10px; color: #000; font-weight: 400; }
  html .abas-monitor a:hover { background: #e5f1fb; }
  html .abas-monitor a.ativa { background: #fff; margin-top: 0; padding: 3px 10px 4px; margin-bottom: -1px; position: relative; z-index: 1; }
