/* =========================================================================
   HD-UI — Tokens do redesign (Fase 1) — Painel RH HD
   -------------------------------------------------------------------------
   ÚNICA fonte de cor/medida/raio/duração do redesign. Carregado DEPOIS de
   styles.css e painel.css de propósito: os tokens antigos (--bg, --radius,
   --shadow…) são REDEFINIDOS aqui em função dos novos — assim as 21 telas
   ganham o visual novo sem renomear classe nenhuma (342 ids e 69 classes
   usados pelo JS ficam intactos; a lista está em auditoria-ids-classes.txt).

   A SIDEBAR NÃO MUDA (pedido do RH): ela usa --hd-blue/--hd-blue-dark/
   --accent, que mantêm exatamente os valores de sempre — por isso estes três
   NÃO são redefinidos aqui.
   ========================================================================= */

:root {
  /* ---- Marca (briefing) ---- */
  --hd-blue-900: #0B2266;
  --hd-blue-800: #10318F;   /* = --hd-blue de styles.css: mesma cor, nome novo */
  --hd-blue-700: #1B41B0;
  --hd-blue-500: #4A74E3;
  --hd-blue-300: #93AEF0;
  --hd-blue-100: #DCE5FA;
  --hd-blue-50:  #F0F4FE;
  --hd-orange-700: #B85D0D;
  --hd-orange:     #E57818; /* = --accent: o laranja oficial não muda */
  --hd-orange-400: #F5943F;
  --hd-orange-100: #FDEBD9;
  --hd-ink: #222222;
  --hd-ink-70: #5A5A5A;
  --hd-ink-45: #8C8C8C;
  --hd-bg: #F2F2F2;
  --hd-line: #E2E5EC;

  /* ---- Semânticas dessaturadas (briefing) ---- */
  --ok:   #1E7A4D;
  --warn: #B07B12;
  --err:  #B4443A;

  /* ---- Superfícies: vidro SEM blur (camada + borda + sombra) ---- */
  --surf-1: rgba(255, 255, 255, .72);
  --surf-2: rgba(255, 255, 255, .86);
  --surf-solid: #FFFFFF;
  --glass-line: 1px solid rgba(255, 255, 255, .65);

  /* ---- Sombras com tinta da marca ---- */
  --sh-sm: 0 1px 2px rgba(16, 49, 143, .06);
  --sh-md: 0 4px 14px rgba(16, 49, 143, .09);
  --sh-lg: 0 14px 36px rgba(16, 49, 143, .14);

  /* ---- Forma e ritmo ---- */
  --r-ctrl: 8px;
  --r-card: 12px;
  --r-modal: 16px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px;

  /* ---- Movimento (nenhuma animação acima de 250ms) ---- */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 120ms;
  --t-base: 180ms;

  /* =======================================================================
     PONTE: tokens antigos passam a valer os novos. É isto que re-veste as
     telas inteiras de uma vez — os componentes continuam lendo --radius,
     --shadow etc., só que agora esses nomes apontam para o redesign.
     ======================================================================= */
  --bg: var(--hd-bg);
  --border: var(--hd-line);
  --text: var(--hd-ink);
  --text-muted: var(--hd-ink-70);
  --text-faint: var(--hd-ink-70);   /* o antigo 45% reprova no AA; 70% passa */
  --radius: var(--r-card);
  --radius-sm: var(--r-ctrl);
  --shadow: var(--sh-sm);
  --shadow-lg: var(--sh-lg);
  --green: var(--ok);
  --amber: var(--warn);
  --red: var(--err);
  --blue: var(--hd-blue-700);

  /* painel.css lê estes para vidro/movimento; blur real só onde a tabela do
     briefing permite (sidebar/topbar 12px, overlay 8px) */
  --vidro: var(--surf-2);
  --vidro-borda: rgba(255, 255, 255, .65);
  --dur-toque: var(--t-fast);
  --dur-rapida: var(--t-base);
  --dur-media: 250ms;
}

/* ---- Fundo com profundidade (só no claro; o escuro define o dele) ---- */
:root:not([data-theme="dark"]) body {
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(16, 49, 143, .07), transparent 60%),
    radial-gradient(700px 450px at 92% 8%, rgba(74, 116, 227, .06), transparent 62%),
    var(--hd-bg);
  background-attachment: fixed;
}

/* ---- Tema escuro: variantes dos tokens novos (decisão: manter o recurso).
   Os tokens antigos do escuro continuam definidos em styles.css e vencem por
   especificidade — aqui entram só os NOVOS nomes que o redesign usa. ---- */
:root[data-theme="dark"] {
  --hd-bg: #0e1420;
  --hd-line: #2a3242;
  --hd-ink: #e7eaf0;
  --hd-ink-70: #9aa4b2;
  --hd-ink-45: #727c8b;
  --ok: #37c97e;
  --warn: #e6a53a;
  --err: #ef5d5d;
  --surf-1: rgba(22, 29, 43, .72);
  --surf-2: rgba(22, 29, 43, .86);
  --surf-solid: #161d2b;
  --glass-line: 1px solid rgba(255, 255, 255, .08);
  --sh-sm: 0 1px 2px rgba(0, 0, 0, .45);
  --sh-md: 0 4px 14px rgba(0, 0, 0, .40);
  --sh-lg: 0 14px 36px rgba(0, 0, 0, .55);
  --vidro: var(--surf-2);
  --vidro-borda: rgba(255, 255, 255, .08);
}

/* =========================================================================
   UTILITÁRIOS DO BRIEFING
   ========================================================================= */

/* Vidro: por padrão é OPACO (camada+borda+sombra). O blur de verdade entra
   só via @supports e só onde for aplicado de propósito (sidebar/topbar). */
.hd-glass { background: var(--surf-2); border: var(--glass-line); }
@supports (backdrop-filter: blur(12px)) {
  .hd-glass { backdrop-filter: blur(12px); background: var(--surf-1); }
}

/* Toque/hover com resposta imediata */
.hd-press {
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-base) var(--ease);
}
.hd-press:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }
.hd-press:active { transform: scale(.985); box-shadow: var(--sh-sm); }

/* Quem pediu menos movimento no sistema operacional manda em tudo */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =========================================================================
   FASE 2 — COMPONENTES BASE
   -------------------------------------------------------------------------
   Só sobrescreve classes que JÁ existem (styles.css/painel.css) — nomes
   novos entram apenas para papéis que ainda não tinham classe (.btn-text,
   .btn-danger). A sidebar fica de fora por decisão do RH.
   ========================================================================= */

/* ---- Botões: 4 pesos ----
   O código já usa a hierarquia certa na prática: .btn-accent (laranja) é a
   ação principal, .btn-ghost é o resto. Aqui ela vira regra visual. */
.btn {
  border-radius: var(--r-ctrl);
  font-weight: 600;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-base) var(--ease),
              background-color var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease),
              color var(--t-base) var(--ease);
}
.btn:active { transform: scale(.985); }
.btn:focus-visible { outline: 2px solid var(--hd-blue-500); outline-offset: 2px; }

/* 1) PRIMÁRIO — laranja sólido. Um por bloco; o laranja não aparece em mais
   nada além disto, do item ativo do menu, de badge crítico e de KPI positivo.
   O tom é o laranja-700 da paleta, não o oficial: branco sobre #E57818 dá
   2,9:1 (reprova no AA que o briefing exige); sobre #B85D0D dá 4,6:1. O
   laranja oficial segue intacto no item ativo do menu e no hover. */
.btn-accent, .btn-primary {
  background: var(--hd-orange-700);
  color: #fff;
  box-shadow: var(--sh-sm);
}
.btn-accent:hover, .btn-primary:hover {
  background: var(--hd-orange);
  box-shadow: var(--sh-md);
}

/* 2) SECUNDÁRIO — contorno azul */
.btn-ghost {
  background: transparent;
  color: var(--hd-blue-800);
  border: 1px solid var(--hd-blue-300);
}
.btn-ghost:hover {
  background: var(--hd-blue-50);
  border-color: var(--hd-blue-500);
  color: var(--hd-blue-900);
}
:root[data-theme="dark"] .btn-ghost { color: var(--hd-blue-300); border-color: rgba(147, 174, 240, .35); }
:root[data-theme="dark"] .btn-ghost:hover { background: rgba(147, 174, 240, .12); border-color: var(--hd-blue-300); color: #cdd9f7; }

/* 3) TERCIÁRIO — só texto */
.btn-text {
  background: none;
  border: none;
  color: var(--hd-blue-800);
  padding: 8px 10px;
  border-radius: var(--r-ctrl);
}
.btn-text:hover { background: var(--hd-blue-50); }
:root[data-theme="dark"] .btn-text { color: var(--hd-blue-300); }
:root[data-theme="dark"] .btn-text:hover { background: rgba(147, 174, 240, .12); }

/* 4) DESTRUTIVO */
.btn-danger { background: var(--err); color: #fff; box-shadow: var(--sh-sm); }
.btn-danger:hover { filter: brightness(.92); box-shadow: var(--sh-md); }

/* ---- Cartões: vidro de camada (sem blur, conforme a tabela do briefing) ---- */
.rh-card {
  background: var(--surf-2);
  border: var(--glass-line);
  box-shadow: var(--sh-md);
}
/* Cartão aberto/expandido lê melhor sobre superfície sólida */
.rh-card.corpo-aberto, .modal .rh-card { background: var(--surf-solid); }

/* ---- Campos de formulário ---- */
.field input, .field select, .field textarea {
  border-radius: var(--r-ctrl);
  border-color: var(--hd-line);
  min-height: 40px;
}
/* Checkbox não é campo de digitação: sem a altura mínima acima ele volta ao
   tamanho de checkbox (era o "quadradão" do Desconsiderar Cartão Ponto na
   aba Dados — pedido de 14/08/2026). A especificidade maior vence também o
   min-height de 44px do modo toque, lá embaixo. */
.field input[type="checkbox"] { min-height: 0; height: 16px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--hd-blue-500);
  box-shadow: 0 0 0 3px var(--hd-blue-100);
}
:root[data-theme="dark"] .field input:focus,
:root[data-theme="dark"] .field select:focus,
:root[data-theme="dark"] .field textarea:focus { box-shadow: 0 0 0 3px rgba(147, 174, 240, .25); }

/* ---- Tabelas ---- */
table.data th {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--hd-ink-70);
  border-bottom: 1px solid var(--hd-line);
}
table.data td { border-bottom: 1px solid var(--hd-line); }
table.data tbody tr { transition: background-color var(--t-fast) var(--ease); }
table.data tbody tr:hover { background: var(--hd-blue-50); }
:root[data-theme="dark"] table.data tbody tr:hover { background: rgba(147, 174, 240, .08); }

/* ---- Modal ---- */
.modal {
  border-radius: var(--r-modal);
  background: var(--surf-solid);
  box-shadow: var(--sh-lg);
}
/* Overlay: um dos 3 únicos lugares com blur real (8px), com queda segura */
.modal-backdrop, .backdrop { background: rgba(11, 34, 102, .28); }
@supports (backdrop-filter: blur(8px)) {
  .modal-backdrop, .backdrop { backdrop-filter: blur(8px); }
}
:root[data-theme="dark"] .modal-backdrop, :root[data-theme="dark"] .backdrop { background: rgba(0, 0, 0, .45); }

/* ---- Topbar: vidro com blur de verdade (12px), com queda para camada ---- */
.topbar { background: var(--surf-2); border-bottom: 1px solid var(--hd-line); }
@supports (backdrop-filter: blur(12px)) {
  .topbar { backdrop-filter: blur(12px); background: var(--surf-1); }
}

/* ---- KPI: o número é a informação ---- */
.kpi .value { font-weight: 800; letter-spacing: -.6px; }
.kpi .delta.up { color: var(--ok); }
.kpi .delta.down { color: var(--err); }

/* ---- Barra de rolagem discreta (a da sidebar fica como está) ---- */
.content ::-webkit-scrollbar, .modal ::-webkit-scrollbar { width: 8px; height: 8px; }
.content ::-webkit-scrollbar-thumb, .modal ::-webkit-scrollbar-thumb {
  background: var(--hd-line); border-radius: 8px;
}
.content ::-webkit-scrollbar-thumb:hover, .modal ::-webkit-scrollbar-thumb:hover { background: var(--hd-ink-45); }

/* ---- Sparkline SVG (fase 4): traço 2px azul, área azul-claro. As cores
   ficam AQUI (não em atributo do SVG) para o tema escuro trocar sozinho. ---- */
.hd-spark { display: block; width: 100%; height: 48px; }
.tv-spark .hd-spark { height: 100%; }
.hd-spark-linha {
  fill: none;
  stroke: var(--hd-blue-500);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.hd-spark-area { fill: var(--hd-blue-100); }
.hd-spark-barra { fill: var(--hd-blue-300); }
:root[data-theme="dark"] .hd-spark-area { fill: rgba(147, 174, 240, .18); }
:root[data-theme="dark"] .hd-spark-barra { fill: rgba(147, 174, 240, .55); }

/* ---- Foco visível para navegação por teclado, em tudo ---- */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--hd-blue-500);
  outline-offset: 2px;
}

/* =========================================================================
   FASE 6 — PASSE FINAL: toque, responsivo, marcadores
   ========================================================================= */

/* Bolinha vermelha de "desligado" na lista de funcionários (substituiu o
   emoji 🔴 na fase 5 — o emoji não acompanhava o tema). */
.flag-off {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--err);
  margin-right: 4px;
  vertical-align: middle;
}

/* Ícone dentro de rótulo/botão alinha pela linha do texto */
.btn svg.ico, label svg.ico, h3 svg.ico, .card-titulo svg.ico { vertical-align: -2px; }

/* Dedo no lugar de mouse: todo alvo de toque com pelo menos 44px de altura
   (o briefing exige; em desktop os tamanhos continuam os de sempre). */
@media (pointer: coarse) {
  .btn, .icon-btn, .tab-btn, .filtro-btn, [data-modo], [data-mover],
  .field input, .field select { min-height: 44px; }
  .icon-btn { min-width: 44px; }
  /* .card-recolher sem altura mínima: deixava o quadro recolhido com 90px de
     caixa vazia. O alvo de toque vem do ::after (abaixo) e do cabeçalho todo. */
}

/* =========================================================================
   CELULAR E TABLET (ajuste de 14/08/2026) — abaixo de 768px
   -------------------------------------------------------------------------
   Tabela vira CARD: o rh-comum.js carimba em cada célula o cabeçalho da sua
   coluna (data-rot) e aqui cada linha vira um cartão de pares rótulo/valor.
   Nenhuma coluna some — só muda o desenho. Tabela com data-cards="nao" e
   célula sem rótulo (coluna de ações) ficam de fora do par.
   ========================================================================= */
@media (max-width: 768px) {
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data thead { display: none; }
  table.data tbody tr {
    border: 1px solid var(--hd-line);
    border-radius: var(--r-ctrl);
    margin-bottom: var(--s3);
    padding: var(--s2) var(--s3);
    background: var(--surf-solid);
  }
  table.data td {
    border-bottom: none;
    padding: 6px 0;
    display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3);
    text-align: right;
  }
  table.data td[data-rot]::before {
    content: attr(data-rot);
    font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
    color: var(--hd-ink-70);
    text-align: left; flex: none;
  }
  table.data td.num { text-align: right; }
  /* Tabela que preferir continuar tabela: rola de lado dentro do quadro */
  table.data[data-cards="nao"] { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.data[data-cards="nao"] thead { display: table-header-group; }
  table.data[data-cards="nao"] tbody { display: table-row-group; }
  table.data[data-cards="nao"] tr { display: table-row; border: none; margin: 0; padding: 0; }
  table.data[data-cards="nao"] td { display: table-cell; width: auto; text-align: left; }

  /* Campo ocupa a largura toda — nada de input espremido no canto */
  .field input, .field select, .field textarea { width: 100%; }

  /* Abas da ficha: rolagem horizontal em vez de quebrar em 3 andares */
  .ficha-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .ficha-tabs button { flex: none; }

  /* Modal toma quase a tela inteira (sobra borda para tocar fora e fechar) */
  .modal {
    left: 2vw; right: 2vw; top: 2vh; bottom: auto;
    transform: none;
    width: 96vw; max-width: none; max-height: 96vh;
  }
}

/* ---- Toque em controle miniatura (19/08/2026) ----
   O RH pediu botões pequenos em várias telas (btn-mini, ações do topo do
   Desenvolvimento, x dos atalhos) — visualmente ficam como estão, mas no
   dedo 24–30px erra fácil. No toque, cada um ganha uma area de toque
   invisivel maior que o desenho (::after esticado): o alvo passa de ~44px
   sem mudar UM pixel na tela. Nas laterais estica menos (-4px) para
   botões vizinhos não disputarem o mesmo dedo. */
@media (pointer: coarse) {
  .btn-mini, .dev-btn-acao, .atalho-x, .dev-lt-x, .cv-del,
  .sidebar .user .logout, .nota-icone, #link-esqueci, .card-recolher {
    position: relative;
  }
  .btn-mini::after, .dev-btn-acao::after, .atalho-x::after, .dev-lt-x::after,
  .cv-del::after, .sidebar .user .logout::after, .nota-icone::after,
  #link-esqueci::after, .card-recolher::after {
    content: "";
    position: absolute;
    top: -8px; bottom: -8px; left: -4px; right: -4px;
  }
}

/* =========================================================================
   BLOQUEIO DE IMPRESSÃO (21/08/2026) — ver assets/js/print-guard.js
   ========================================================================= */

/* Aviso na tela quando alguém tenta Ctrl+P */
.hd-aviso-print {
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translateX(-50%) translateY(8px);
  z-index: 9999;
  max-width: 92vw;
  padding: 12px 18px;
  border-radius: var(--r-ctrl);
  background: var(--err);
  color: #fff;
  font-size: 14px; font-weight: 600; text-align: center;
  box-shadow: var(--sh-lg);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.hd-aviso-print.mostrar {
  opacity: 1; transform: translateX(-50%) translateY(0);
  pointer-events: auto; cursor: pointer;
}

@media print {
  /* REDE DE SEGURANÇA: por padrão nada do conteúdo vai para o papel — sai só
     o aviso. Vale mesmo se o Ctrl+P escapar da interceptação do JavaScript.
     A impressão do PRÓPRIO sistema (window.print dos botões de relatório)
     marca .hd-imprimir-ok na raiz e passa normalmente. */
  html:not(.hd-imprimir-ok) body > * { display: none !important; }
  /* O aviso precisa PARECER um aviso (09/09/2026): antes era uma linha de 18px
     no alto de uma folha vazia, e quem via jurava que a impressão estava
     quebrada — não que tinha sido barrada. Agora ocupa a folha e explica o
     caminho certo, que é o botão de impressora do próprio painel. */
  html:not(.hd-imprimir-ok) body::before {
    content: "Impressão não autorizada por aqui.\A\A Use o botão de impressora no alto da tela do painel — por ele o documento sai normalmente, com o registro de quem imprimiu.\A\A (O Ctrl+P e o menu do navegador ficam bloqueados de propósito: a tela mostra salário, ficha e documento pessoal.)";
    display: block;
    white-space: pre-line;
    padding: 80px 40px;
    font-family: var(--font, "Montserrat", sans-serif);
    font-size: 17px; font-weight: 600; line-height: 1.6; text-align: center;
    color: #000;
  }
  /* o aviso de tela nunca é impresso */
  .hd-aviso-print { display: none !important; }

  /* RODAPÉ DE RASTREIO (decisão da diretoria, 21/08/2026): todo relatório
     impresso pelo sistema sai identificado, em TODAS as páginas — nenhuma
     folha solta fica anônima.
     23/09/2026: o rodapé saiu da página e foi para a MARGEM da folha
     (@bottom-center). Antes era um div position:fixed no pé da página, por
     cima do conteúdo: a linha da tabela que caía ali ficava escondida atrás
     dele — no relatório de Benefícios de Set/26 sumiu o Lucas Erik (o texto
     estava no PDF, mas invisível). Na margem não há como cobrir nada.
     O texto vem de --hd-rodape, que o print-guard.js só preenche na impressão
     autorizada; sem ele o var() fica vazio e a margem sai em branco. */
  @page {
    margin-bottom: 14mm;
    @bottom-center {
      content: var(--hd-rodape);
      font-family: "Montserrat", sans-serif;
      font-size: 9px;
      color: #444;
      border-top: 1px solid #bbb;
    }
    /* o rodapé do próprio navegador ("1/2") some quando a margem é nossa */
    @bottom-right {
      content: counter(page) "/" counter(pages);
      font-family: "Montserrat", sans-serif;
      font-size: 9px;
      color: #444;
    }
  }
}

/* =========================================================================
   LUPINHA NOS CAMPOS DE BUSCA (28/08/2026)
   -------------------------------------------------------------------------
   Vem por CSS, e não no texto do campo, por dois motivos:
   · placeholder é TEXTO — não aceita ícone nem imagem;
   · pegando input[type="search"], todos os 8 campos de busca do sistema
     ganham a lupa de uma vez, inclusive os que o JavaScript cria na hora e
     os que forem criados amanhã. Não é preciso lembrar de nada.

   A imagem vai embutida no próprio CSS (data:), então não há requisição
   extra e funciona offline. A CSP permite: img-src libera data:.
   ========================================================================= */
input[type="search"],
.busca-input {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C8C8C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 11px center;
  background-size: 15px 15px;
  /* espaço para a lupa não encostar no texto digitado */
  padding-left: 34px;
}
/* No tema escuro o cinza escuro sumiria no fundo — troca por um mais claro. */
:root[data-theme="dark"] input[type="search"],
:root[data-theme="dark"] .busca-input {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239AA4B2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
}
/* Campo de busca dentro de um bloco que já desenha a própria lupa
   (se algum dia houver) pode escapar com data-lupa="nao". */
input[type="search"][data-lupa="nao"],
.busca-input[data-lupa="nao"] {
  background-image: none;
  padding-left: 12px;
}

/* =========================================================================
   Telas que mostram um site de fora aqui dentro (Ponto/Secullum)
   -------------------------------------------------------------------------
   O quadro ocupa a altura da janela menos a barra do topo: o site de fora
   rola dentro dele, e a página do painel não ganha uma segunda barra de
   rolagem (duas barras é o que mais incomoda em tela embutida).
   ========================================================================= */
.content-cheia { max-width: none; padding-bottom: var(--sp-3); }
.tela-embutida { display: flex; flex-direction: column; gap: 10px; }
.embutida-nota { margin: 0; }
.embutida-aviso { color: var(--accent-texto); font-weight: 600; }
.embutida-caixa {
  position: relative;
  height: calc(100vh - 190px);
  min-height: 420px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.embutida-frame { width: 100%; height: 100%; border: 0; display: block; background: var(--surface); }
.embutida-carregando { position: absolute; inset: 0; padding: 18px; background: var(--surface); }
@media (max-width: 900px) { .embutida-caixa { height: calc(100vh - 230px); } }

/* Botões de abrir o WhatsApp: em coluna no celular, lado a lado no
   computador — e o botão principal não encolhe para caber. */
.wa-abrir { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.wa-abrir .btn { flex: 0 0 auto; }

/* =========================================================================
   Páginas que o RH cria (paginas.html / pagina.html)
   ========================================================================= */
.pag-grade { align-items: start; }
.pag-card { display: flex; flex-direction: column; }
.pag-card .linha-acoes { margin-top: auto; }
/* Tabela larga rola DENTRO do quadro; a página nunca ganha rolagem lateral. */
.tabela-rolagem { overflow-x: auto; max-height: 60vh; overflow-y: auto; }
.pg-controles { margin-bottom: 12px; }
.pg-grafico { position: relative; height: 340px; }
.pg-imagem img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }
.pg-texto {
  white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.55; max-height: 65vh; overflow: auto; margin: 0;
}

/* =========================================================================
   Painel flutuante (Tarefas + Anotações)
   -------------------------------------------------------------------------
   Fica preso no canto de baixo à direita e acompanha a rolagem. z-index 240:
   acima do conteúdo e dos avisos de aniversário (205, que nascem no mesmo
   canto), e ABAIXO dos toasts do sistema (250) e do diálogo de confirmação
   (260) — a pergunta "Apagar esta tarefa?" nunca pode ficar atrás do painel.
   ========================================================================= */
.flut { position: fixed; right: 18px; bottom: 18px; z-index: 240; display: flex; flex-direction: column;
        align-items: flex-end; gap: 10px; }
.flut-bt {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--hd-blue); color: #fff; border: 0; cursor: pointer;
  border-radius: 999px; padding: 12px 18px; font: inherit; font-size: 13.5px; font-weight: 700;
  box-shadow: var(--shadow-lg);
}
.flut-bt:hover { background: var(--hd-blue-2); }
.flut-bt:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.flut-painel {
  width: 390px; max-width: calc(100vw - 36px);
  max-height: min(72vh, 620px);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.flut-topo { display: flex; align-items: center; gap: 8px; padding: 10px 10px 0 12px; border-bottom: 1px solid var(--border); }
.flut-abas { display: flex; gap: 4px; flex: 1; }
.flut-aba {
  background: none; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700;
  color: var(--text-muted); padding: 8px 12px; border-bottom: 2px solid transparent;
}
.flut-aba.ativa { color: var(--text); border-bottom-color: var(--accent); }
.flut-fechar { background: none; border: 0; cursor: pointer; color: var(--text-muted); padding: 6px; border-radius: 8px; }
.flut-fechar:hover { background: var(--surface-2); color: var(--text); }
.flut-corpo { padding: 12px; overflow-y: auto; }
/* O quadro de Tarefas entra aqui SEM a moldura de cartão (seria caixa dentro
   de caixa) — e a lista dele rola junto com o corpo do painel. */
.flut-tarefas { padding: 0; border: 0; box-shadow: none; background: none; }
/* O título "Tarefas do RH" repetia a aba "Tarefas" logo acima e só ocupava
   espaço (09/10/2026, "não precisa desse branco"). */
.flut-tarefas > .card-header { display: none; }
.flut-rotulo { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.flut-notas {
  width: 100%; min-height: 240px; resize: vertical;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 10px 12px; font: inherit; font-size: 13.5px; line-height: 1.55;
  background: var(--surface); color: var(--text);
}
.flut-notas:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Duas folhas (uma por pessoa do RH): pílulas pequenas acima do campo. */
.flut-folhas { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.flut-folha, .flut-folha-nome {
  font: inherit; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-muted);
}
.flut-folha { cursor: pointer; }
.flut-folha:hover { color: var(--text); }
.flut-folha.ativa { background: var(--accent); border-color: var(--accent); color: #fff; }
.flut-folha-nome { width: 130px; color: var(--text); outline: 2px solid var(--accent); }
.flut-status { margin: 6px 0 0; }
/* No celular o painel vira uma folha que ocupa a largura toda. */
@media (max-width: 600px) {
  .flut { right: 12px; left: 12px; bottom: 12px; align-items: stretch; }
  .flut-painel { width: auto; max-height: 70vh; }
  .flut-bt { justify-content: center; }
}
/* Botão arrastável (01/09/2026): o JS ancora o conjunto pelo lado mais
   próximo e liga estas classes conforme a metade da tela em que ele está. */
.flut.flut-esquerda { align-items: flex-start; }
.flut.flut-para-baixo { flex-direction: column-reverse; }
.flut.flut-arrastando .flut-bt { cursor: grabbing; }
.flut-bt { touch-action: none; }   /* sem isso, o toque rola a página em vez de arrastar */
/* Bolinha que traz o botão de volta depois do X (07/10/2026). Discreta
   (meio apagada) até o mouse ou o Tab chegar nela. */
.flut-mini {
  position: fixed; right: 18px; bottom: 18px; z-index: 240;
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--hd-blue); color: #fff; cursor: pointer;
  box-shadow: var(--shadow-lg); opacity: .6;
  transition: opacity var(--t-fast, 120ms) var(--ease, ease);
}
.flut-mini:hover, .flut-mini:focus-visible { opacity: 1; background: var(--hd-blue-2); }
.flut-mini:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media print { .flut, .flut-mini { display: none; } }

/* =========================================================================
   CABECALHO DE TABELA QUE ACOMPANHA A ROLAGEM (31/08/2026)
   -------------------------------------------------------------------------
   A tela de Beneficios tem 110 linhas e 7,7 telas de rolagem. Passada a
   primeira tela, os nomes das colunas somem e a pessoa fica olhando uma
   parede de numeros sem saber qual e VT, qual e VR e qual e VA — ou volta ao
   topo so para conferir. O cabecalho grudado resolve isso sem tirar nada da
   tela.

   O topo fica em 72px porque a barra de cima do painel e fixa e termina por
   volta dessa altura; grudar em 0 esconderia o cabecalho atras dela.

   O fundo solido e obrigatorio: sem ele, as linhas passam POR BAIXO e o
   texto do cabecalho fica ilegivel, embaralhado com os dados.
   ========================================================================= */
.rh-tabela th,
.data th,
.aud-tabela th,
.equipe-tabela th,
.tabela-beneficios th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface-2, #f4f6f9);
  /* A borda de baixo vira sombra: numa celula grudada, border-bottom some
     junto com a rolagem em alguns navegadores. */
  box-shadow: inset 0 -1px 0 var(--border, #d7dde5);
}

/* Linha inteira responde ao mouse: ajuda a nao trocar de linha com o olho
   numa tabela larga. */
.rh-tabela tbody tr:hover td,
.rh-tabela tr:hover td,
.data tbody tr:hover td,
.aud-tabela tbody tr:hover td { background: var(--surface-2, #f4f6f9); }

@media print {
  /* No papel nada gruda — cabecalho fixo viraria uma faixa repetida por cima
     do conteudo. */
  .rh-tabela th, .data th, .aud-tabela th, .equipe-tabela th, .tabela-beneficios th { position: static; box-shadow: none; }
}

/* Em tela estreita (celular) a tabela vira cartao e nao ha cabecalho para
   grudar. */
@media (max-width: 767px) {
  .rh-tabela th, .data th, .aud-tabela th, .equipe-tabela th, .tabela-beneficios th { position: static; }
}

/* Os avisos de aniversário nascem no MESMO canto do painel flutuante: sobem
   o suficiente para não taparem o botão "Tarefas e anotações". */
#aniv-toasts { bottom: 76px; }

/* =========================================================================
   AREA PROPRIA DE ROLAGEM PARA TABELA LONGA (31/08/2026)
   -------------------------------------------------------------------------
   A tela de Beneficios tinha 110 linhas e 7,7 TELAS de rolagem: para ver o
   ultimo colaborador a pessoa rolava sete vezes a altura do monitor, e no
   caminho perdia de vista os nomes das colunas e o menu.

   Dando altura maxima a tabela, ela passa a rolar por dentro. A pagina volta
   a caber em uma tela e meia, o cabecalho fica sempre visivel (o sticky acima
   passa a valer, porque agora o dono da rolagem e este quadro), e o resto da
   tela — filtros, totais, botoes — nao sai de vista enquanto se procura
   alguem no meio da lista.

   Vale so quando a tabela e MAIOR que o espaco: lista curta continua exibida
   inteira, sem area de rolagem e sem barra nenhuma.
   ========================================================================= */
.table-wrap,
.tabela-wrap {
  max-height: 68vh;
  overflow: auto;
  /* Sem isto o Chrome no Windows desenha uma barra de rolagem larga e cinza
     por cima do conteudo da ultima coluna. */
  scrollbar-width: thin;
}

/* Em tela estreita a tabela vira cartao empilhado (nao ha cabecalho nem
   colunas), e uma area de rolagem dentro de outra deixa o dedo confuso. */
@media (max-width: 767px) {
  .table-wrap,
  .tabela-wrap { max-height: none; }
}

@media print {
  /* No papel a lista sai inteira: cortar em 68vh imprimiria so o comeco. */
  .table-wrap,
  .tabela-wrap { max-height: none; overflow: visible; }
}

/* Rodapé das notificações: "Limpar tudo" à esquerda, "Ver tudo na Central" à
   direita. Sem o flex os dois ficavam colados um no outro. */
.notif-rodape { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; }
.notif-limpar {
  background: none; border: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--text-muted); padding: 4px 8px; border-radius: 8px; white-space: nowrap;
}
.notif-limpar:hover { background: var(--surface-2); color: var(--red); }
.notif-limpar:disabled { opacity: .6; cursor: default; }

/* A trilha de auditoria (575 registros, 10,7 telas de rolagem) nao usa
   .table-wrap: a tabela e filha direta do quadro. O :has() alcanca justamente
   o quadro que contem essa tabela, sem precisar mexer no HTML de todas as
   telas — e sem afetar quadro nenhum que nao tenha tabela dentro. */
.rh-card:has(> .aud-tabela) {
  max-height: 68vh;
  overflow: auto;
  scrollbar-width: thin;
}
@media (max-width: 767px) { .rh-card:has(> .aud-tabela) { max-height: none; } }
@media print { .rh-card:has(> .aud-tabela) { max-height: none; overflow: visible; } }

/* =========================================================================
   Personalizar menu: linha da aba com as setas ↑ ↓
   -------------------------------------------------------------------------
   Com as setas de volta são QUATRO botões na mesma linha, e a barra lateral
   tem 248px. Sem apertar folgas e tamanhos, o nome da aba quebrava em sílabas
   ("Funcion / ários") — que é justamente o que a pessoa precisa ler.
   ========================================================================= */
.nav-edit-item { gap: 2px; padding: 6px; }
.nav-edit-item button { width: 24px; height: 24px; }
.nav-edit-item .ico { width: 15px; height: 15px; }
.nav-edit-nome { font-size: 12px; margin-right: 2px; }

/* =========================================================================
   Arrastar os quadros da tela
   -------------------------------------------------------------------------
   O pegador (⠿) fica no cabeçalho, antes do título, e é discreto: só ganha
   cor ao passar o mouse pelo quadro. touch-action:none só nele — se fosse no
   quadro inteiro, no tablet o dedo não rolaria mais a página.
   ========================================================================= */
.card-pegar {
  background: none; border: 0; padding: 2px; margin-right: 2px; border-radius: 6px;
  color: transparent; cursor: grab; display: inline-flex; align-items: center;
  touch-action: none; flex: none; align-self: center;
}
.rh-card:hover .card-pegar, .card-pegar:focus-visible { color: var(--text-faint); }
.card-pegar:hover { background: var(--surface-2); color: var(--text); }
.card-pegar:active { cursor: grabbing; }
/* No toque não existe "passar o mouse": lá o pegador fica sempre visível. */
@media (hover: none) { .card-pegar { color: var(--text-faint); } }
/* Quadro SEM cabeçalho (blocos de número): o pegador flutua no canto de cima
   à direita, fora do fluxo, para não empurrar o conteúdo (03/09/2026). */
.rh-card.card-com-pegador { position: relative; }
.card-pegar-solto { position: absolute; top: 6px; right: 6px; z-index: 2; }

/* O pegador DENTRO do cabeçalho também sai do fluxo (09/09/2026).
   O .card-header é flex com justify-content: space-between — feito para DOIS
   filhos: o bloco de título à esquerda e a ação à direita. Ao acrescentar o
   pegador como primeiro filho viraram TRÊS, e a distribuição jogou o título
   para o meio/direita — foi o que deixou os títulos "alinhados à direita" em
   várias telas. Fora do fluxo, o cabeçalho volta a ter dois filhos e o título
   volta para a esquerda. O recuo só existe quando há pegador, para o texto não
   ficar por baixo dele. */
.card-header { position: relative; }
.card-header:has(> .card-pegar) { padding-left: 22px; }
.card-header > .card-pegar { position: absolute; left: 0; top: 1px; margin: 0; }
.rh-card.bloco-arrastando {
  outline: 2px dashed var(--accent); outline-offset: 2px;
  box-shadow: var(--shadow-lg); opacity: .92;
}
/* Coluna que ficou vazia continua existindo como alvo — sem altura mínima ela
   viraria uma linha de 0px e não daria para largar nada nela. */
body.arrastando-bloco { user-select: none; -webkit-user-select: none; }
body.arrastando-bloco .content > .grid > div { min-height: 90px; }
@media print { .card-pegar { display: none; } }

/* =========================================================================
   FLUTUANTE EM TODAS AS TELAS (01/09/2026)
   -------------------------------------------------------------------------
   O X esconde o botão pelo resto do dia; a lista leve de tarefas aparece
   fora da Central (concluir + adicionar; o resto mora na Central).
   ========================================================================= */
.flut-bt-wrap { position: relative; display: inline-flex; }
.flut-x {
  position: absolute; top: -7px; right: -7px;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surf-solid, #fff);
  color: var(--text-muted); font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: var(--sh-sm); padding: 0;
}
.flut-x:hover { color: var(--err, #B4443A); border-color: var(--err, #B4443A); }
/* O X só aparece com o mouse em cima (pedido de 01/09/2026). Fica escondido
   por opacidade — e não por display:none — para nascer/sumir suave e para
   continuar existindo para o teclado e o leitor de tela: quem chega nele
   por Tab o vê (:focus-visible). Só onde o mouse EXISTE: em telas de toque
   (@media hover: none) não há como "passar por cima", então ele fica
   sempre visível, senão viraria um botão inalcançável no celular.
   Enquanto escondido ele também não recebe clique (pointer-events): um alvo
   invisível no canto do botão viraria "escondi sem querer". */
@media (hover: hover) {
  .flut-x {
    opacity: 0; pointer-events: none;
    transition: opacity var(--t-fast, 120ms) var(--ease, ease);
  }
  .flut-bt-wrap:hover .flut-x,
  .flut-bt-wrap:focus-within .flut-x,
  .flut-x:focus-visible { opacity: 1; pointer-events: auto; }
}
.flut-mini-add { display: flex; gap: 8px; margin-bottom: 10px; }
.flut-mini-add input {
  flex: 1; min-width: 0; padding: 8px 10px; font: inherit; font-size: 13px;
  border: 1px solid var(--border); border-radius: var(--r-ctrl, 8px);
  background: var(--surf-solid, #fff); color: var(--text);
}
.flut-mini-add input:focus { outline: 2px solid var(--hd-blue-500, #4A74E3); outline-offset: 1px; }
.flut-mini-tarefa {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 4px; border-bottom: 1px solid var(--border);
  font-size: 13px; cursor: pointer;
}
.flut-mini-tarefa:last-child { border-bottom: 0; }
/* Subtarefa na lista leve: indentada e menor (21/09/2026). */
.flut-mini-sub { padding-left: 22px; font-size: 12.5px; }
.flut-mini-tarefa input { margin-top: 2px; flex: none; }
.flut-mini-atrasada { color: var(--err, #B4443A); font-weight: 700; }
/* Pegador de linha: arrastar muda a ordem das tarefas (15/09/2026). */
.linha-pegar {
  background: none; border: 0; padding: 1px; margin: 0; border-radius: 6px;
  color: var(--text-faint); cursor: grab; display: inline-flex; align-items: center;
  flex: none; touch-action: none; opacity: .35;
}
.flut-mini-tarefa:hover .linha-pegar, .tarefa-linha:hover .linha-pegar, .linha-pegar:focus-visible { opacity: 1; }
.linha-pegar:hover { background: var(--surface-2); color: var(--text); }
.linha-pegar:active { cursor: grabbing; }
.linha-arrastando { background: var(--surface-2); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); position: relative; z-index: 1; }
@media (hover: none) { .linha-pegar { opacity: 1; } }
@media print { .linha-pegar { display: none; } }

/* =========================================================================
   Agenda (compromissos do calendário publicado do Outlook)
   ========================================================================= */
.ag-item { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.ag-item:first-of-type { border-top: 0; }
.ag-hora { flex: none; width: 96px; font-size: 12.5px; font-weight: 700; color: var(--accent-texto); white-space: nowrap; }
.ag-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ag-txt strong { font-size: 13.5px; font-weight: 700; overflow-wrap: anywhere; }
.ag-txt small { font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }
.ag-dia.ag-hoje { border-left: 3px solid var(--accent); }
.ag-rodape { margin-top: 4px; }
/* Calendário da Agenda (17/09/2026): barra + Mês / Semana (quadro) / Lista */
.ag-cal { padding: 16px; }
.ag-barra { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ag-nav { display: flex; align-items: center; gap: 6px; }
.ag-cal-titulo { margin: 0; font-size: 20px; font-weight: 800; flex: 1; min-width: 160px; }
.ag-modos { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; background: var(--surface-2); }
.ag-modos button { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px; cursor: pointer; color: var(--text-muted); }
.ag-modos button.ativo { background: var(--hd-blue); color: #fff; }

.ag-mes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.ag-sem { padding: 8px 10px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.ag-cel { min-height: 112px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ag-mes > :nth-child(7n) { border-right: 0; }
.ag-cel.ag-fds { background: var(--surface-2); }
.ag-cel.ag-fora { opacity: .45; }
.ag-num { align-self: flex-start; width: 28px; height: 28px; border-radius: 50%; border: 0; background: none; font: inherit;
  font-size: 13px; font-weight: 700; color: inherit; cursor: pointer; }
.ag-num:hover { background: var(--hd-blue-soft); }
.ag-cel.ag-hoje { box-shadow: inset 0 0 0 2px var(--hd-blue); }
.ag-cel.ag-hoje .ag-num { background: var(--hd-blue); color: #fff; }
.ag-chip { display: block; font-size: 12px; line-height: 1.3; padding: 3px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--hd-blue-soft); color: inherit; text-decoration: none; border-left: 3px solid var(--hd-blue); }
.ag-chip.ag-inteiro { background: var(--accent-soft); border-left-color: var(--accent); font-weight: 700; }
.ag-chip b { font-weight: 800; }
a.ag-chip:hover, a.ag-tarefa:hover { filter: brightness(.95); }
.ag-mais { align-self: flex-start; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 700; color: var(--hd-blue); cursor: pointer; padding: 0 6px; }
.ag-passou .ag-chip, .ag-passou .ag-tarefa { opacity: .6; }

.ag-quadro { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.ag-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 260px; min-width: 0; }
.ag-col.ag-hoje { border-color: var(--hd-blue); box-shadow: 0 0 0 1px var(--hd-blue); }
.ag-col-cab { display: flex; align-items: baseline; gap: 6px; padding: 2px 4px 6px; border-bottom: 1px solid var(--border); }
.ag-col-cab span { font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--text-muted); }
.ag-col-cab strong { font-size: 20px; font-weight: 800; }
.ag-col.ag-hoje .ag-col-cab strong { color: var(--hd-blue); }
.ag-qtd { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 800; background: var(--border); border-radius: 999px; padding: 1px 7px; }
.ag-tarefa { display: flex; flex-direction: column; gap: 3px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--hd-blue);
  border-radius: 8px; padding: 8px 9px; color: inherit; text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.ag-tarefa.ag-inteiro { border-left-color: var(--accent); }
.ag-tarefa strong { font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.ag-tarefa small { font-size: 11.5px; color: var(--text-muted); overflow-wrap: anywhere; }
.ag-t-hora { font-size: 11px; font-weight: 800; color: var(--accent-texto); }
.ag-vazio { margin: 0; text-align: center; color: var(--text-muted); font-size: 13px; }

/* Agenda EDITÁVEL (01/10/2026, Outlook do computador): o compromisso vira
   botão (abre a janela de mudar/apagar) e cada dia ganha um "+". */
button.ag-chip, button.ag-tarefa, button.ag-item { font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; }
button.ag-chip { border: 0; border-left: 3px solid var(--hd-blue); }
button.ag-item { background: none; border: 0; border-radius: 8px; }
button.ag-chip:hover, button.ag-tarefa:hover, button.ag-item:hover { filter: brightness(.95); }
button.ag-item:hover { background: var(--surface-2); filter: none; }
.ag-cel { position: relative; }
.ag-add { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: none;
  font: inherit; font-size: 17px; font-weight: 700; line-height: 1; color: var(--hd-blue); cursor: pointer; opacity: .3; }
.ag-cel:hover .ag-add, .ag-add:focus-visible { opacity: 1; }
.ag-add:hover { background: var(--hd-blue-soft); }
.ag-col-cab .ag-add { position: static; margin-left: auto; opacity: .6; }
.ag-col-cab .ag-qtd + .ag-add { margin-left: 4px; }
.ag-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.hd-modal .ag-apagar { margin-right: auto; color: var(--danger, #b42318); }
@media (hover: none) { .ag-add { opacity: .8; } }

.ag-lista-dia { padding: 10px 0; border-top: 1px solid var(--border); }
.ag-lista-dia:first-child { border-top: 0; }
.ag-lista-cab { font-weight: 800; font-size: 14px; margin-bottom: 4px; }
.ag-lista-dia.ag-hoje .ag-lista-cab { color: var(--hd-blue); }

/* Cores por tipo (02/10/2026): cada compromisso carrega --ag-cor pela classe
   ag-c-<tipo> (agenda.js, TIPOS). Fundo = a cor bem clara sobre a superfície. */
.ag-c-desligamento { --ag-cor: #DC2626; }
.ag-c-entrevista   { --ag-cor: #7C3AED; }
.ag-c-admissao     { --ag-cor: #16A34A; }
.ag-c-contrato     { --ag-cor: #0D9488; }
.ag-c-pagamento    { --ag-cor: #EA580C; }
.ag-c-ausencia     { --ag-cor: #CA8A04; }
.ag-c-reuniao      { --ag-cor: #2563EB; }
.ag-c-evento       { --ag-cor: #DB2777; }
.ag-c-outro        { --ag-cor: #64748B; }
:root[data-theme="dark"] .ag-c-desligamento { --ag-cor: #F87171; }
:root[data-theme="dark"] .ag-c-entrevista   { --ag-cor: #A78BFA; }
:root[data-theme="dark"] .ag-c-admissao     { --ag-cor: #4ADE80; }
:root[data-theme="dark"] .ag-c-contrato     { --ag-cor: #2DD4BF; }
:root[data-theme="dark"] .ag-c-pagamento    { --ag-cor: #FB923C; }
:root[data-theme="dark"] .ag-c-ausencia     { --ag-cor: #FACC15; }
:root[data-theme="dark"] .ag-c-reuniao      { --ag-cor: #60A5FA; }
:root[data-theme="dark"] .ag-c-evento       { --ag-cor: #F472B6; }
:root[data-theme="dark"] .ag-c-outro        { --ag-cor: #94A3B8; }
.ag-chip[class*="ag-c-"] {
  background: color-mix(in srgb, var(--ag-cor) 14%, var(--surface)); border-left-color: var(--ag-cor); }
.ag-chip[class*="ag-c-"].ag-inteiro { background: color-mix(in srgb, var(--ag-cor) 26%, var(--surface)); }
.ag-tarefa[class*="ag-c-"], .ag-tarefa[class*="ag-c-"].ag-inteiro {
  border-left-color: var(--ag-cor); background: color-mix(in srgb, var(--ag-cor) 7%, var(--surface)); }
.ag-tarefa[class*="ag-c-"] .ag-t-hora { color: var(--ag-cor); }
.ag-item-cor { box-shadow: inset 4px 0 0 var(--ag-cor); padding-left: 12px; align-items: center; }
.ag-item-cor .ag-txt { flex: 1; }
.ag-tipo { flex: none; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  color: var(--text); background: color-mix(in srgb, var(--ag-cor) 16%, var(--surface)); }
.ag-bola { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ag-cor, var(--border)); }
/* Legenda: também é filtro — clicar esconde/mostra aquele tipo. */
.ag-legenda { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 12px; }
.ag-leg { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: inherit;
  font: inherit; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.ag-leg em { font-style: normal; font-weight: 800; color: var(--text-muted); }
.ag-leg:hover { border-color: var(--ag-cor); }
.ag-leg-off { opacity: .45; text-decoration: line-through; }
.ag-leg-off .ag-bola { background: transparent; box-shadow: inset 0 0 0 2px var(--ag-cor); }
.ag-leg-todos { font-size: 12px; margin-left: 4px; }
/* Escolher a cor na janela do compromisso. */
.ag-cores { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ag-cores legend { font-size: 13px; font-weight: 700; margin-bottom: 6px; padding: 0; }
.ag-cor-op { position: relative; cursor: pointer; }
.ag-cor-op input { position: absolute; opacity: 0; pointer-events: none; }
.ag-cor-op > span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 5px 10px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.ag-cor-op:hover > span { border-color: var(--ag-cor, var(--hd-blue)); }
.ag-cor-op input:checked + span { border-color: var(--ag-cor, var(--hd-blue)); box-shadow: 0 0 0 2px var(--ag-cor, var(--hd-blue));
  background: color-mix(in srgb, var(--ag-cor, var(--hd-blue)) 12%, var(--surface)); }
.ag-cor-op input:focus-visible + span { outline: 2px solid var(--hd-blue); outline-offset: 2px; }

@media (max-width: 1100px) { .ag-quadro { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .ag-cal { padding: 10px; }
  .ag-cel { min-height: 64px; padding: 3px; }
  .ag-sem { padding: 6px 2px; text-align: center; font-size: 10px; }
  .ag-chip { font-size: 0; padding: 0; height: 5px; border-left: 0; background: var(--hd-blue); }
  .ag-chip.ag-inteiro { background: var(--accent); }
  .ag-chip[class*="ag-c-"], .ag-chip[class*="ag-c-"].ag-inteiro { background: var(--ag-cor); }
  .ag-tipo { display: none; }
  .ag-num { width: 24px; height: 24px; font-size: 12px; }
  .ag-quadro { grid-template-columns: 1fr; }
  .ag-col { min-height: 0; }
}
@media print { .ag-nav, .ag-modos { display: none; } }
/* Botão que parece link (usado no "trocar o endereço" da agenda). */
.btn-link {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  color: var(--hd-blue); font-weight: 700; text-decoration: underline;
}
.btn-link:hover { color: var(--hd-blue-2); }
@media (max-width: 600px) { .ag-hora { width: 74px; } }

/* =========================================================================
   EDITAR A TELA (09/09/2026)
   -------------------------------------------------------------------------
   O lápis do topo liga o modo de edição em qualquer tela: barra de ações no
   alto do conteúdo, ✕ em cada quadro e quadro do RH (planilha, PDF, endereço)
   incluído no fim. Fora do modo de edição nada disto aparece — a tela do dia a
   dia continua exatamente como era.
   ========================================================================= */
.editar-barra {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 10px 12px;
  border: 1px dashed var(--accent); border-radius: 12px;
  background: var(--surface); box-shadow: var(--sh-sm, 0 2px 8px rgba(0,0,0,.06));
}
.editar-dica { font-size: 12.5px; color: var(--text-muted); }
.editar-barra .spacer { flex: 1 1 auto; }
#btn-editar-tela.ativo { background: var(--accent); color: #fff; border-color: var(--accent); }

/* O quadro ganha uma moldura tracejada enquanto a tela está em edição: é o que
   mostra, sem texto nenhum, o que dá para mover e tirar dali. */
body.editando-tela .rh-card[data-tirar-ligado] {
  outline: 1px dashed var(--border); outline-offset: 3px;
}
/* O ✕ só existe no modo de edição — fora dele, nem para o teclado: um botão
   invisível que apaga quadro seria armadilha. */
.card-tirar { display: none; }
body.editando-tela .card-tirar {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; padding: 0; border-radius: 7px;
  border: 1px solid var(--border); background: var(--surf-solid, #fff);
  color: var(--text-muted); cursor: pointer;
}
body.editando-tela .card-tirar:hover { color: var(--err, #B4443A); border-color: var(--err, #B4443A); }
body.editando-tela .card-tirar-volta { color: var(--accent); border-color: var(--accent); }
/* O pegador solto mora no mesmo canto: sai da frente do ✕ enquanto edita. */
body.editando-tela .card-pegar-solto { right: 36px; }

/* Quadro tirado da tela: some de verdade no dia a dia e volta esmaecido
   durante a edição, senão não haveria como trazê-lo de volta. */
.rh-card.bloco-oculto { display: none; }
body.editando-tela .rh-card.bloco-oculto {
  display: block; opacity: .45; filter: grayscale(1);
}

/* ---- Quadro que o RH incluiu (planilha, PDF, imagem, endereço) ---- */
.bloco-do-rh .bloco-corpo { margin-top: 8px; }
.bloco-do-rh .bloco-img { max-width: 100%; height: auto; border-radius: 10px; }
.bloco-do-rh .bloco-grafico { height: 220px; margin-bottom: 10px; }
.bloco-do-rh .bloco-grafico .hd-spark { width: 100%; height: 100%; }
.bloco-do-rh .embutida-caixa { min-height: 420px; }
.bloco-do-rh pre.pg-texto { max-height: 340px; overflow: auto; }

.hd-modal.hd-modal-largo { width: min(560px, 100%); }
.hd-modal-largo .form-grid { margin-top: 12px; }

@media print { .editar-barra, .card-tirar, #btn-editar-tela { display: none !important; } }

/* =========================================================================
   A explicação da tela dentro do "?" (09/09/2026)
   -------------------------------------------------------------------------
   O parágrafo que abria a tela agora mora no "?" ao lado do título e aparece
   no CLIQUE, numa caixinha pequena que se encaixa na tela (o rh-comum.js
   calcula a posição). Pequena de propósito: o pedido foi "não quero grande".
   ========================================================================= */
.nota-guardada { display: none !important; }
.nota-bt { cursor: pointer; }
.nota-bt .tooltip { display: none !important; }   /* o texto passou para a caixinha */
.nota-popup {
  position: fixed; z-index: 320;
  width: max-content; max-width: min(340px, calc(100vw - 20px));
  max-height: 56vh; overflow: auto;
  padding: 11px 30px 11px 13px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .22);
  font-size: 12.6px; line-height: 1.55; font-weight: 500; text-align: left;
}
.nota-popup p { margin: 0 0 7px; }
.nota-popup p:last-of-type { margin-bottom: 0; }
.nota-popup-x {
  position: absolute; top: 5px; right: 5px;
  width: 22px; height: 22px; padding: 0; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: none; color: var(--text-muted); cursor: pointer;
}
.nota-popup-x:hover { background: var(--surface-2); color: var(--text); }
@media print { .nota-popup { display: none; } }

/* Atalho (endereço) na barra de cima — ver atalhoNoTopo no rh-comum.js. */
.atalho-topo { position: relative; display: inline-flex; }
.rel-cab-titulo { display: inline-flex; align-items: center; gap: 8px; }
.atalhos-inline { display: inline-flex; align-items: center; gap: 6px; }
.atalhos-inline .icon-btn { width: 30px; height: 30px; }
.atalho-topo-x { display: none; }
body.editando-tela .atalho-topo-x {
  display: inline-flex; align-items: center; justify-content: center;
  position: absolute; top: -5px; right: -5px; width: 18px; height: 18px;
  padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--border); background: var(--surf-solid, #fff); color: var(--text-muted);
}
body.editando-tela .atalho-topo-x:hover { color: var(--err, #B4443A); border-color: var(--err, #B4443A); }
/* Botões fixos do topo no modo de edição (10/09/2026): o botão inteiro vira
   interruptor — selo ✕ tira, ↺ traz de volta (aplicarOcultosTopo). Selo no
   canto ESQUERDO: o direito é do contador do sino. */
.topbar > .icon-btn.topo-oculto { display: none; }
#btn-topo-mais { display: none; }
body.editando-tela #btn-topo-mais { display: inline-flex; border-style: dashed; border-color: var(--accent); color: var(--accent); }
body.editando-tela .topbar > [data-topo-chave] { outline: 1px dashed var(--border); outline-offset: 3px; }
body.editando-tela .topbar > [data-topo-chave]::after {
  content: "✕"; position: absolute; top: -6px; left: -6px; width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  font-size: 9px; line-height: 1; border: 1px solid var(--border);
  background: var(--surf-solid, #fff); color: var(--text-muted);
}
body.editando-tela .topbar > [data-topo-chave]:hover::after { color: var(--err, #B4443A); border-color: var(--err, #B4443A); }
body.editando-tela .topbar > .icon-btn.topo-oculto { display: inline-flex; opacity: .45; filter: grayscale(1); }
body.editando-tela .topbar > .icon-btn.topo-oculto::after { content: "↺"; color: var(--accent); border-color: var(--accent); }
/* Topo padrão (10/09/2026): no topo só 🔔 ✏️ ⓘ em todas as telas; o que era de
   cada tela (Imprimir, TV, Backup, Atualizar…) mora nesta linha, no alto do
   conteúdo, à direita. Sem nada visível dentro, ela some. */
.tela-acoes { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.tela-acoes:not(:has(> :not(.oculto))) { display: none; }
.tela-acoes .crumb { color: var(--text-faint); font-size: 13px; }
body.modo-tv .tela-acoes { display: none; }
@media print { .tela-acoes { display: none !important; } }
@media print { .atalho-topo { display: none; } }

/* =========================================================================
   Banco de dados: escolher pelo ASSUNTO (09/09/2026)
   -------------------------------------------------------------------------
   A lista de nomes técnicos virou cartões com o nome em português e uma linha
   do que a tabela guarda. O nome técnico continua ali, pequeno e cinza: é ele
   que aparece numa mensagem de erro.
   ========================================================================= */
.bd-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.bd-item {
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); cursor: pointer;
}
.bd-item:hover { border-color: var(--accent); background: var(--surface-2); }
.bd-item-nome { font-weight: 700; font-size: 13px; }
.bd-item-exp { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.bd-item-pe { font-size: 11.5px; color: var(--text-faint); }
.bd-item-tec, .bd-col-tec { font-family: ui-monospace, monospace; font-size: 10.5px; color: var(--text-faint); font-weight: 400; }
.bd-col-tec { display: block; text-transform: none; letter-spacing: 0; }

/* Banco de dados: a ficha de um registro (09/09/2026) */
.bd-linha { cursor: pointer; }
.bd-linha:hover td, .bd-linha:focus-visible td { background: var(--surface-2); }
.bd-ficha { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.bd-ficha-linha {
  display: grid; grid-template-columns: minmax(140px, 220px) 1fr auto;
  gap: 10px; align-items: center; padding: 7px 12px;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.bd-ficha-linha:last-child { border-bottom: 0; }
.bd-ficha-linha:nth-child(odd) { background: var(--surface-2); }
.bd-ficha-rot { color: var(--text-muted); font-weight: 600; }
.bd-ficha-val { word-break: break-word; }
.bd-ficha-bt { opacity: 0; }
.bd-ficha-linha:hover .bd-ficha-bt, .bd-ficha-bt:focus-visible { opacity: 1; }
@media (hover: none) { .bd-ficha-bt { opacity: 1; } }
@media (max-width: 640px) {
  .bd-ficha-linha { grid-template-columns: 1fr auto; }
  .bd-ficha-rot { grid-column: 1 / -1; }
}

/* =========================================================================
   TOQUE — celular e tablet (09/09/2026)
   -------------------------------------------------------------------------
   Vale só onde o dedo é o ponteiro (@media pointer: coarse). No computador
   com mouse NADA muda.
   1) Campo com letra menor que 16px faz o iPhone/iPad DAR ZOOM sozinho ao
      tocar — a tela fica torta e não volta. 16px resolve na origem.
   2) Caixinhas de marcar vinham com 13px: menor que a ponta do dedo.
   3) Botõezinhos de fechar/arrastar ganham área de toque invisível ao redor
      (mesmo truque já usado acima para .btn-mini e companhia).
   ========================================================================= */
@media (pointer: coarse) {

  /* 1) zoom automático do iOS */
  input[type="text"], input[type="search"], input[type="email"],
  input[type="password"], input[type="tel"], input[type="number"],
  input[type="date"], input[type="month"], input[type="url"],
  select, textarea, .busca-input, .nav-busca-campo,
  .select-cargo, .sel-inline {
    font-size: 16px;
  }

  /* campos de busca: altura de dedo */
  .busca-input, .nav-busca-campo, .sel-inline { min-height: 40px; }

  /* 2) caixinhas de marcar e bolinhas */
  input[type="checkbox"], input[type="radio"] {
    width: 20px; height: 20px; min-width: 20px; min-height: 20px;
  }

  /* 3) área de toque dos botõezinhos soltos */
  .notif-x, .flut-x, .card-pegar, .notif-conf-bt, .notif-limpar,
  .modo-link, .fer-graf-col { position: relative; }
  .notif-x::after, .flut-x::after, .card-pegar::after,
  .notif-conf-bt::after, .notif-limpar::after, .modo-link::after {
    content: ""; position: absolute;
    top: -10px; bottom: -10px; left: -8px; right: -8px;
  }

  /* abas e links de modo: alvo mais alto */
  .modo-link, .nav-grupo { min-height: 40px; }
}


/* =========================================================================
   CELULAR — menos moldura, mais conteúdo (09/09/2026)
   -------------------------------------------------------------------------
   O RH abriu no celular e não gostou. Medido antes de mexer: a barra de cima
   tinha 133px e é STICKY — ficava grudada no alto gastando 16% da tela o
   tempo todo, porque o título mais os 7 botões de 44px não cabiam numa linha
   e quebravam em duas fileiras. Somando o título de 26px, os 22px de recheio
   de cada cartão e as bordas de 18px, o primeiro nome da lista só começava a
   254px do topo.

   O título de cima SOME no celular porque ele se repete logo abaixo, dentro
   do conteúdo, em todas as telas ("Funcionários" / "Fichas dos
   funcionários"). As duas exceções — atalho.html e pagina.html, que não têm
   título no conteúdo — continuam com ele, pelo :has().
   ========================================================================= */
@media (max-width: 640px) {
  .topbar { gap: 6px; padding: 8px 10px; }
  .topbar h1 { display: none; }
  .main:has(.content-cheia) .topbar h1 {
    display: block; font-size: 17px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .topbar .icon-btn, .topbar .btn.btn-sm {
    width: 40px; min-width: 40px; height: 40px; min-height: 40px;
  }

  .content { padding: 12px 10px 64px; }
  .content > h2 { font-size: 20px; }
  .rh-card { padding: 14px; }
}

/* =========================================================================
   CELULAR E TABLET — quadros legíveis (10/09/2026)
   -------------------------------------------------------------------------
   Pedido do RH ("bem ruim de entender"): quadro recolhido virava caixa alta
   e vazia com setinhas e alças soltas; tamanho gravado no computador deixava
   quadros de larguras diferentes; o botão de tarefas cobria o conteúdo.
   ========================================================================= */
.card-recolhido .card-header { margin-bottom: 0; }
@media (max-width: 768px) {
  /* Tamanho escolhido no computador não vale aqui: um quadro por linha. */
  .content .rh-card.card-redimensionado { width: auto !important; height: auto !important; }
  .rec-topo > .rh-card, .rec-topo > div:has(> .rh-card) { flex: 1 1 100% !important; max-width: none !important; }
  /* Mover e redimensionar são coisa de mouse — no dedo eram só riscos soltos. */
  .card-tamanho, .card-pegar { display: none !important; }
  .card-header:has(> .card-pegar) { padding-left: 0; }
  /* Uma seta só (a da direita), num tamanho que se enxerga. */
  .card-seta-esq { display: none; }
  .card-recolher { font-size: 15px; color: var(--text); }
  .card-header-clicavel { align-items: center; min-height: 40px; flex-wrap: nowrap; }
  .card-header-clicavel > div { flex: 1; min-width: 0; }   /* sem isso a seta caía para a linha de baixo */
  /* Botão de tarefas vira só o ícone, no canto dele. */
  .flut-bt > span { display: none; }
  .flut-bt { padding: 14px; }
  .flut:not(.flut-esquerda) .flut-bt-wrap { align-self: flex-end; }
}
/* Celular estreito: os ícones do topo cabem numa linha só. */
@media (max-width: 420px) {
  .topbar .icon-btn, .topbar .btn.btn-sm { width: 36px; min-width: 36px; height: 36px; min-height: 36px; }
}

/* Tema do mês — só o laço, na cor do mês (tema-mes.js). Clique: o tema;
   botão direito: os próximos meses. --tema vem do JS (compatível com a CSP). */
#tema-mes { display: inline-flex; align-items: center; justify-content: center; margin-left: -10px; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .15s; }
#tema-mes:hover { transform: scale(1.12); }
#tema-mes > svg { width: 30px; height: 30px; flex: none; }
/* Login: só a fita, na cor do mês, sem clique (tema-mes.js). */
#tema-mes.no-login { margin-left: 12px; vertical-align: middle; cursor: default; }
#tema-mes.no-login:hover { transform: none; }
#tema-mes.no-login > svg { width: 36px; height: 36px; }
#tema-mes-bolha { --tema: #f2c200; position: fixed; z-index: 3000; width: 260px; max-width: calc(100vw - 16px); max-height: min(70vh, 520px); overflow-y: auto; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--hd-line); border-top: 4px solid var(--tema); background: var(--surface, #fff); box-shadow: 0 8px 24px rgba(0,0,0,.14); font-size: 12px; line-height: 1.45; color: var(--text-faint); }
#tema-mes-bolha > b { display: block; font-size: 15px; color: var(--text, inherit); }
#tema-mes-bolha > p { margin: 2px 0 0; font-size: 12.5px; }
#tema-mes-bolha .tema-mes-ev { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--hd-line); font-size: 12px; font-weight: 600; color: #b35400; }
#tema-mes-bolha .ico-presente { width: 13px; height: 13px; flex: none; }
#tema-mes-bolha .tema-mes-cal-tit { margin-bottom: 4px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
#tema-mes-bolha ul { list-style: none; margin: 0; padding: 0; }
#tema-mes-bolha li { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; }
#tema-mes-bolha li > svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
#tema-mes-bolha li strong { display: block; font-size: 12.5px; font-weight: 600; color: var(--text, inherit); }
#tema-mes-bolha li small { display: block; font-size: 11.5px; }
#tema-mes-bolha.oculto { display: none; }
@media (max-width: 640px) { #tema-mes { margin-left: -2px; } #tema-mes > svg { width: 26px; height: 26px; } }
@media print { #tema-mes, #tema-mes-bolha { display: none !important; } }

/* Painel flutuante — 3ª rodada de visual (29/09/2026, "não está tão bom de olhar").
   Tudo preso ao .flut-painel: o quadro da Central continua como estava. */
.flut-painel { width: 420px; max-height: min(78vh, 680px); border-radius: 14px; box-shadow: 0 18px 48px rgba(16, 17, 20, .18), 0 2px 8px rgba(16, 17, 20, .06); }
.flut-topo { padding: 8px 8px 0 14px; }
.flut-aba { padding: 10px 10px 9px; display: inline-flex; align-items: center; gap: 6px; }
.flut-aba-conta {
  min-width: 20px; padding: 0 6px; border-radius: 999px; font-size: 11px; line-height: 18px;
  text-align: center; background: var(--surface-2); color: var(--text-muted); font-variant-numeric: tabular-nums;
}
.flut-aba.ativa .flut-aba-conta { background: var(--accent); color: #fff; }
.flut-corpo { padding: 0; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.flut-corpo > .flut-conteudo { padding: 14px 14px 12px; }

/* Campo de nova tarefa: uma peça só, botão da mesma altura. */
.flut-mini-add {
  gap: 0; margin-bottom: 8px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface); overflow: hidden; transition: border-color .15s, box-shadow .15s;
}
.flut-mini-add:focus-within { border-color: var(--hd-blue); box-shadow: 0 0 0 3px var(--hd-blue-soft); }
.flut-mini-add input { border: 0; border-radius: 0; padding: 10px 12px; font-size: 13.5px; background: transparent; }
.flut-mini-add input:focus { outline: none; }
.flut-mini-add .btn { border-radius: 0; margin: 0; padding: 0 16px; box-shadow: none; min-height: 0; }

/* Linhas: separador fino, título normal (não negrito), mais leitura. */
.flut-painel .tarefa-linha {
  gap: 10px; padding: 10px 8px 10px 4px; border-radius: 8px; align-items: flex-start;
  border-bottom: 1px solid var(--border);
}
.flut-painel .tarefa-linha:last-of-type { border-bottom: 0; }
.flut-painel .tarefa-linha:hover { background: var(--surface-2); border-bottom-color: transparent; }
.flut-painel .tarefa-titulo { font-weight: 500; font-size: 13.5px; line-height: 1.4; color: var(--text); }
.flut-painel .tarefa-tags { margin-top: 5px; }
.flut-painel .tar-ok { width: 19px; height: 19px; margin-top: 0; border: 1.5px solid var(--border-strong); }
.flut-painel .tarefa-feita .tar-ok-feito { border-color: transparent; }
/* Pegador ⠿: só aparece na linha do mouse (antes ficava um pontilhado em todas). */
.flut-painel .tarefa-linha > .linha-pegar { opacity: 0; margin: 1px -6px 0 0; }
.flut-painel .tarefa-linha:hover > .linha-pegar,
.flut-painel .tarefa-linha > .linha-pegar:focus-visible,
.flut-painel .tarefa-linha.linha-arrastando > .linha-pegar { opacity: 1; }
@media (hover: none) { .flut-painel .tarefa-linha > .linha-pegar { opacity: .6; } }
.flut-painel .tarefa-subs { margin-left: 33px; }

/* Concluídas: rodapé com a contagem numa pílula. */
.flut-painel .tar-feitas-bt { margin-top: 6px; padding: 10px 6px 4px; }
.flut-painel .tar-conta {
  margin-left: 2px; padding: 0 7px; border-radius: 999px; line-height: 18px;
  background: var(--surface-2); font-variant-numeric: tabular-nums;
}
.flut-painel .tar-feitas .tarefa-linha { padding-top: 7px; padding-bottom: 7px; }
.flut-painel .tar-feitas .tarefa-titulo { font-weight: 400; }
.flut-painel .flut-status { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.flut-painel .tarefa-linha:has(+ .tar-feitas-bt) { border-bottom: 0; }
/* No celular continua a folha de largura toda (a regra de 420px acima venceria). */
@media (max-width: 600px) { .flut-painel { width: auto; max-height: 70vh; } }
