/* Hub Elev — identidade visual Elev v1.0 (Identidade elev/Elev Identidade Visual.html)
   Papel ou preto no fundo · navy só como bloco (1 por tela) · amarelo só no asterisco e em 1 acento
   Unbounded (display) · Hanken Grotesk (texto) · Chivo Mono (dados e rótulos) · raios 16/24/999 */

:root {
  --papel: #F1EFE8; --preto: #0E0E10; --navy: #030C31; --amarelo: #FFD434;
  --manteiga: #EFE2B0; --nevoa: #C9CFDD; --areia: #E2DBCA; --po: #A6B1C9; --cinza: #8C8A83; --relatorio: #FAF9F5;

  --display: 'Unbounded', 'Arial Black', Arial, sans-serif;
  --texto: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --dados: 'Chivo Mono', 'Courier New', monospace;

  --r-card: 16px; --r-painel: 24px; --r-pilula: 999px;

  /* movimento */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-sai: cubic-bezier(.4, 0, 1, 1);
  --ease-mola: cubic-bezier(.34, 1.4, .64, 1);
  --t-rapido: 140ms; --t-medio: 240ms; --t-lento: 420ms;
  --escalonar: 38ms;

  --lateral: 252px;
}

/* Tema claro (papel) — as "camadas" do manual: 1 / .64 / .32 / .12 */
:root, [data-tema="claro"] {
  color-scheme: light; /* Windows no modo escuro: sem isto, caixa de marcar e botão de opção vazios saíam pretos no tema claro */
  --fundo: var(--papel);
  --superficie: var(--relatorio);
  --superficie-2: #EAE6DB;
  --tinta: var(--navy);
  --tinta-2: rgba(3, 12, 49, .68);
  --tinta-3: rgba(3, 12, 49, .40);
  --linha: rgba(3, 12, 49, .12);
  --linha-suave: rgba(3, 12, 49, .07);
  --foco: var(--navy);
  --bloco: var(--navy); --bloco-tinta: var(--papel);
  --sombra: 0 1px 2px rgba(3, 12, 49, .05), 0 10px 28px -18px rgba(3, 12, 49, .35);
  --sombra-alta: 0 2px 6px rgba(3, 12, 49, .06), 0 24px 60px -24px rgba(3, 12, 49, .45);
  --ok: #196A4B; --ok-fundo: rgba(30, 122, 85, .12); /* verde mais escuro: o selo "ok" ficava com 4,3:1, abaixo dos 4,5:1 do texto pequeno */
  --erro: #B3362F; --erro-fundo: rgba(179, 54, 47, .10);
  --aviso: #8A5A00; --aviso-fundo: rgba(239, 226, 176, .75);
  --grao: .12;
  --logo-fundo: transparent;
}
[data-tema="escuro"] {
  color-scheme: dark; /* calendário e relógio nativos dos inputs no escuro */
  --fundo: var(--preto);
  --superficie: #17171B;
  --superficie-2: #1F1F24;
  --tinta: var(--papel);
  --tinta-2: rgba(241, 239, 232, .68);
  --tinta-3: rgba(241, 239, 232, .40);
  --linha: rgba(241, 239, 232, .12);
  --linha-suave: rgba(241, 239, 232, .06);
  --foco: var(--amarelo);
  --bloco: var(--navy); --bloco-tinta: var(--papel);
  --sombra: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -18px rgba(0, 0, 0, .7);
  --sombra-alta: 0 2px 6px rgba(0, 0, 0, .35), 0 28px 70px -24px rgba(0, 0, 0, .8);
  --ok: #5FC99A; --ok-fundo: rgba(95, 201, 154, .12);
  --erro: #EF7B72; --erro-fundo: rgba(239, 123, 114, .12);
  --aviso: #E9CF7A; --aviso-fundo: rgba(239, 226, 176, .12);
  --grao: .24;
  --logo-fundo: var(--papel);   /* no preto, o selo fica numa placa papel (sem inverter cores) */
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fundo); color: var(--tinta);
  font: 500 calc(15px * var(--fs, 1))/1.5 var(--texto); -webkit-font-smoothing: antialiased;
  transition: background-color var(--t-lento) var(--ease), color var(--t-lento) var(--ease);
}
/* grão do papel (12%) / do preto (24%) */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: var(--grao); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 500; letter-spacing: -.01em; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; }
code, kbd, .mono { font-family: var(--dados); font-size: .86em; }
code { background: var(--linha-suave); padding: 1px 6px; border-radius: 6px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--foco); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--manteiga); color: var(--navy); }

.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.rotulo { font-family: var(--dados); font-size: calc(11.5px * var(--fs, 1)); letter-spacing: .12em; text-transform: uppercase; color: var(--tinta-2); font-weight: 400; }
.rotulo--mini { font-size: calc(10.5px * var(--fs, 1)); letter-spacing: .1em; }
.mudo { color: var(--tinta-2); }
.pular { position: absolute; left: -999px; top: 8px; z-index: 300; background: var(--tinta); color: var(--fundo); padding: 8px 14px; border-radius: var(--r-pilula); }
.pular:focus { left: 8px; }

/* ---------- Estrutura ---------- */
.app { display: grid; grid-template-columns: var(--lateral) 1fr; min-height: 100vh; transition: grid-template-columns var(--t-lento) var(--ease); }
[data-lateral="recolhida"] .app { --lateral: 76px; }

.lateral {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px;
  padding: 18px 14px; border-right: 1px solid var(--linha); background: color-mix(in srgb, var(--superficie-2) 55%, var(--fundo));
  overflow: hidden auto; scrollbar-width: none; z-index: 50;
}
.lateral__topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.marca { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.marca img { width: 30px; height: 30px; background: var(--logo-fundo); border-radius: 9px; padding: 2px; transition: transform var(--t-lento) var(--ease-mola); }
.marca:hover img { transform: rotate(-8deg) scale(1.05); }
.marca__nome { font-family: var(--display); font-weight: 500; font-size: calc(19px * var(--fs, 1)); letter-spacing: -.02em; white-space: nowrap; }
.marca__nome sup { color: var(--amarelo); font-size: .7em; margin-left: 1px; -webkit-text-stroke: .3px var(--navy); }

.busca-gatilho {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: var(--r-pilula);
  border: 1px solid var(--linha); background: var(--superficie); color: var(--tinta-2); cursor: pointer; text-align: left;
  transition: border-color var(--t-rapido), box-shadow var(--t-medio) var(--ease), transform var(--t-rapido);
}
.busca-gatilho span { flex: 1; white-space: nowrap; }
.busca-gatilho:hover { border-color: var(--tinta-3); box-shadow: var(--sombra); }
.busca-gatilho:active { transform: scale(.985); }
kbd { font-family: var(--dados); font-size: calc(10.5px * var(--fs, 1)); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--linha); color: var(--tinta-2); background: var(--fundo); white-space: nowrap; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__grupo { margin: 12px 10px 4px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px;
  text-decoration: none; color: var(--tinta-2); font-weight: 500; white-space: nowrap;
  transition: background-color var(--t-rapido), color var(--t-rapido);
}
.nav a:hover { background: var(--linha-suave); color: var(--tinta); }
.nav a[aria-current="page"] { color: var(--tinta); background: var(--superficie); box-shadow: var(--sombra); }
/* o único acento amarelo da navegação */
.nav a::before {
  content: ''; position: absolute; left: -14px; top: 50%; width: 4px; height: 0; border-radius: 0 4px 4px 0; background: var(--amarelo);
  transform: translateY(-50%); transition: height var(--t-medio) var(--ease-mola);
}
.nav a[aria-current="page"]::before { height: 22px; }
.nav a .ico { transition: transform var(--t-medio) var(--ease-mola); }
.nav a:hover .ico { transform: translateX(1px) scale(1.06); }
.nav__cont { margin-left: auto; font-family: var(--dados); font-size: calc(11px * var(--fs, 1)); color: var(--tinta-3); }
/* Selo de contagem sem urgência (ex.: Conversas com mensagens que não são para você): cinza em vez do selo escuro. */
.nav__conta--suave { background: var(--superficie-2); color: var(--tinta-2); border: 1px solid var(--linha); }

/* Carteira consolidada (#/carteira-dashboard): os selos de status e a coluna "Atrasadas" usavam cores fixas (o amarelo dava 1,8:1 no
   tema claro e o verde e o vermelho ficavam apagados no escuro). Aqui usam os tokens do tema; o seletor mais específico vence o trabalho.css. */
.carteira-tabela .carteira-status--ok { color: var(--ok); background: var(--ok-fundo); }
.carteira-tabela .carteira-status--atencao { color: var(--aviso); background: var(--aviso-fundo); }
.carteira-tabela .carteira-status--critico { color: var(--erro); background: var(--erro-fundo); }
.carteira-tabela .carteira-atrasadas { color: var(--erro); }

/* Seletor de área: no menu aberto só o texto (com as três colunas iguais e ícone, "Escritório" aparecia cortado); recolhido, só o ícone.
   O seletor mora no shell, então fica aqui e não no CSS do Trabalho (que é carregado depois: o seletor mais específico garante a vez). */
.lateral .area-seletor { grid-template-columns: auto auto auto; }
.lateral .area-seletor button { position: relative; padding: 0 8px; }
.lateral .area-seletor button .ico { display: none; }
[data-lateral="recolhida"] .lateral .area-seletor { grid-template-columns: 1fr; }
[data-lateral="recolhida"] .lateral .area-seletor button .ico { display: block; width: 18px; height: 18px; }
/* Conversa não lida: bolinha com o número no canto do botão Escritório (quando a pessoa está em outra área). */
.lateral .area-seletor button[data-nao]::after {
  content: attr(data-nao); position: absolute; top: -6px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-pilula);
  background: var(--tinta); color: var(--fundo); font: 600 calc(9.5px * var(--fs, 1))/16px var(--dados); text-align: center;
}

.lateral__favoritos { display: flex; flex-direction: column; gap: 2px; }
.lateral__favoritos a { display: flex; gap: 10px; align-items: center; padding: 6px 12px; border-radius: 10px; text-decoration: none; color: var(--tinta-2); font-size: calc(14px * var(--fs, 1)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lateral__favoritos a:hover { background: var(--linha-suave); color: var(--tinta); }
.lateral__rodape { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 6px 4px 0; }

[data-lateral="recolhida"] .marca__nome, [data-lateral="recolhida"] .busca-gatilho span, [data-lateral="recolhida"] .busca-gatilho kbd,
[data-lateral="recolhida"] .nav a span, [data-lateral="recolhida"] .nav__grupo, [data-lateral="recolhida"] .nav__cont,
[data-lateral="recolhida"] .lateral__favoritos, [data-lateral="recolhida"] .lateral__rodape .rotulo { display: none; }
[data-lateral="recolhida"] .lateral__topo { flex-direction: column; }
[data-lateral="recolhida"] .nav a, [data-lateral="recolhida"] .busca-gatilho { justify-content: center; padding-inline: 0; }
[data-lateral="recolhida"] .lateral__rodape { flex-direction: column; }

.principal { min-width: 0; display: flex; flex-direction: column; }
.topo {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 14px clamp(18px, 3vw, 40px);
  background: color-mix(in srgb, var(--fundo) 82%, transparent); backdrop-filter: blur(14px) saturate(110%); -webkit-backdrop-filter: blur(14px) saturate(110%);
  border-bottom: 1px solid transparent; transition: border-color var(--t-medio);
}
.topo.rolou { border-bottom-color: var(--linha); }
.icone-botao.topo__menu { display: none; }
.migalhas { display: flex; align-items: center; gap: 8px; min-width: 0; font-family: var(--dados); font-size: calc(12px * var(--fs, 1)); letter-spacing: .06em; color: var(--tinta-2); }
.migalhas a { text-decoration: none; white-space: nowrap; }
.migalhas a:hover { color: var(--tinta); text-decoration: underline; text-underline-offset: 3px; }
.migalhas [aria-current] { color: var(--tinta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.migalhas .sep { opacity: .5; }
.topo__acoes { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.conteudo { padding: 10px clamp(18px, 3vw, 40px) 64px; max-width: 1480px; width: 100%; outline: none; }

/* ---------- Entrada das telas ---------- */
.vista > * { animation: subir var(--t-lento) var(--ease) backwards; animation-delay: calc(var(--i, 0) * var(--escalonar)); }
@keyframes subir { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes surgir { from { opacity: 0; } to { opacity: 1; } }
@keyframes escalar { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
.entrou > * { animation: subir var(--t-lento) var(--ease) both; }
.escalonado > * { animation: escalar var(--t-lento) var(--ease) both; animation-delay: calc(min(var(--i, 0), 16) * var(--escalonar)); }
::view-transition-old(root) { animation: 120ms var(--ease-sai) both surgir reverse; }
::view-transition-new(root) { animation: 260ms var(--ease) both surgir; }

/* ---------- Cabeçalho de página ---------- */
.cabeca { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 18px 0 26px; }
.cabeca h1 { font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -.025em; }
.cabeca p { color: var(--tinta-2); margin-top: 8px; max-width: 70ch; }
.cabeca__acoes { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Botões ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: var(--r-pilula);
  border: 1px solid transparent; font-weight: 600; font-size: calc(14.5px * var(--fs, 1)); cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--tinta); color: var(--fundo);
  transition: transform var(--t-rapido) var(--ease), box-shadow var(--t-medio) var(--ease), background-color var(--t-rapido), opacity var(--t-rapido);
}
.botao:hover { box-shadow: var(--sombra); transform: translateY(-1px); }
.botao:active { transform: translateY(0) scale(.97); box-shadow: none; }
.botao:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.botao .ico { width: 18px; height: 18px; }
.botao--fantasma { background: transparent; color: var(--tinta); border-color: var(--linha); }
.botao--fantasma:hover { background: var(--superficie); border-color: var(--tinta-3); }
.botao--perigo { background: var(--erro); color: #fff; }
.botao--pequeno { padding: 6px 14px; font-size: calc(13px * var(--fs, 1)); }
.botao.carregando { pointer-events: none; }
.botao.carregando::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: girar .7s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

.icone-botao {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; color: var(--tinta-2);
  transition: background-color var(--t-rapido), color var(--t-rapido), transform var(--t-rapido);
}
.icone-botao:hover { background: var(--linha-suave); color: var(--tinta); }
.icone-botao:active { transform: scale(.92); }
.icone-botao.girando .ico { animation: girar .8s var(--ease) infinite; }
.favorito[aria-pressed="true"] { color: var(--tinta); }
.favorito[aria-pressed="true"] .ico { fill: var(--amarelo); stroke: var(--navy); animation: estalo var(--t-lento) var(--ease-mola); }
@keyframes estalo { 40% { transform: scale(1.3) rotate(-10deg); } }

/* ---------- Superfícies ---------- */
.cartao { background: var(--superficie); border: 1px solid var(--linha-suave); border-radius: var(--r-card); padding: 20px; box-shadow: var(--sombra); }
.cartao h2 { font-size: calc(17px * var(--fs, 1)); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.cartao__cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cartao__cab h2 { margin: 0; }
.grade { display: grid; gap: 16px; }
.grade--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grade--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grade--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.pilha { display: flex; flex-direction: column; gap: 16px; }

/* O bloco navy da tela (um por tela) */
.bloco {
  position: relative; overflow: hidden; background: var(--bloco); color: var(--bloco-tinta); border-radius: var(--r-painel); padding: clamp(22px, 3vw, 34px);
  isolation: isolate;
}
.bloco::after { content: ''; position: absolute; inset: auto -10% -60% 40%; height: 120%; z-index: -1; background: radial-gradient(closest-side, rgba(201, 207, 221, .16), transparent); }
.bloco .rotulo { color: rgba(241, 239, 232, .64); }
.bloco h1 { font-size: clamp(28px, 3.6vw, 46px); letter-spacing: -.03em; }
.bloco p { color: rgba(241, 239, 232, .72); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 22px; margin-top: 28px; }
.kpi .n { font-family: var(--display); font-size: clamp(28px, 3vw, 38px); line-height: 1.05; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.02em; display: block; margin-top: 6px; }
.kpi small { display: block; margin-top: 4px; font-family: var(--dados); font-size: calc(11px * var(--fs, 1)); opacity: .7; }

/* ---------- Status ---------- */
.ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--tinta-3); flex: none; position: relative; }
.ponto--online { background: var(--ok); }
.ponto--online::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--ok); opacity: 0; animation: pulsar 2.4s var(--ease) infinite; }
.ponto--erro { background: var(--erro); }
.ponto--nao-configurado { background: transparent; border: 1.5px dashed var(--tinta-3); }
@keyframes pulsar { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

.selo { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pilula); font-family: var(--dados); font-size: calc(11px * var(--fs, 1)); letter-spacing: .04em; border: 1px solid var(--linha); color: var(--tinta-2); white-space: nowrap; background: var(--fundo); }
.selo--ok { color: var(--ok); background: var(--ok-fundo); border-color: transparent; }
.selo--erro { color: var(--erro); background: var(--erro-fundo); border-color: transparent; }
.selo--aviso { color: var(--aviso); background: var(--aviso-fundo); border-color: transparent; }
.selo--forte { background: var(--tinta); color: var(--fundo); border-color: transparent; }
.selo i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.status-lista { display: flex; flex-direction: column; }
.status-item { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-top: 1px solid var(--linha-suave); text-decoration: none; }
.status-item:first-child { border-top: 0; }
.status-item strong { font-weight: 600; }
.status-item .mono { margin-left: auto; color: var(--tinta-2); font-size: calc(12px * var(--fs, 1)); text-align: right; }

/* ---------- Campos ---------- */
.campo { display: grid; gap: 6px; }
.campo > span { font-family: var(--dados); font-size: calc(11px * var(--fs, 1)); letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-2); }
.campo small { color: var(--tinta-2); font-size: calc(12.5px * var(--fs, 1)); line-height: 1.4; }
input[type=text], input[type=number], input[type=search], input[type=url], input[type=email], input[type=password], input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  font: 500 calc(15px * var(--fs, 1)) var(--texto); color: var(--tinta); background: var(--superficie); border: 1px solid var(--linha); border-radius: 12px;
  padding: 10px 13px; width: 100%; transition: border-color var(--t-rapido), box-shadow var(--t-medio) var(--ease);
}
textarea { font-family: var(--dados); font-size: calc(13px * var(--fs, 1)); min-height: 96px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--tinta-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--tinta); box-shadow: 0 0 0 4px var(--linha-suave); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--navy); margin-top: 2px; flex: none; }
.busca-local { position: relative; min-width: min(100%, 280px); }
.busca-local .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--tinta-3); width: 18px; height: 18px; pointer-events: none; }
.busca-local input { padding-left: 38px; border-radius: var(--r-pilula); }
.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filtros select { width: auto; border-radius: var(--r-pilula); padding-right: 32px; }

.segmentado { display: inline-flex; padding: 3px; border: 1px solid var(--linha); border-radius: var(--r-pilula); background: var(--superficie); }
.segmentado button { border: 0; background: transparent; padding: 6px 14px; border-radius: var(--r-pilula); cursor: pointer; font-size: calc(13.5px * var(--fs, 1)); color: var(--tinta-2); transition: background-color var(--t-medio) var(--ease), color var(--t-rapido); }
.segmentado button[aria-pressed="true"] { background: var(--tinta); color: var(--fundo); }

/* ---------- Abas ---------- */
.abas { position: relative; display: flex; gap: 4px; border-bottom: 1px solid var(--linha); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.abas [role=tab] { border: 0; background: transparent; padding: 10px 14px; cursor: pointer; color: var(--tinta-2); font-weight: 600; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; border-radius: 10px 10px 0 0; transition: color var(--t-rapido); }
.abas [role=tab]:hover { color: var(--tinta); }
.abas [role=tab][aria-selected="true"] { color: var(--tinta); }
.abas__marca { position: absolute; left: 0; bottom: -1px; height: 2px; background: var(--tinta); border-radius: 2px; transition: transform var(--t-medio) var(--ease), width var(--t-medio) var(--ease); }
.painel-aba { animation: surgir var(--t-medio) var(--ease); }

/* ---------- Tabelas ---------- */
.tabela-rolagem { overflow-x: auto; margin: 0 -4px; }
table.tabela { width: 100%; border-collapse: collapse; font-size: calc(14px * var(--fs, 1)); }
.tabela th { text-align: left; font-family: var(--dados); font-weight: 400; font-size: calc(10.5px * var(--fs, 1)); letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-2); padding: 8px 10px; border-bottom: 1px solid var(--linha); white-space: nowrap; }
.tabela td { padding: 11px 10px; border-bottom: 1px solid var(--linha-suave); vertical-align: middle; }
.tabela tbody tr { transition: background-color var(--t-rapido); }
.tabela tbody tr:hover { background: var(--linha-suave); }
.tabela tr.clicavel { cursor: pointer; }
.tabela .num { text-align: right; font-family: var(--dados); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabela .fraco { color: var(--tinta-2); }
.tabela a { text-decoration: none; }
.tabela a:hover { text-decoration: underline; text-underline-offset: 3px; }
.celula-titulo { font-weight: 600; max-width: 52ch; }

/* ---------- Clientes ---------- */
.cliente-cartao {
  display: flex; flex-direction: column; gap: 14px; text-decoration: none; position: relative;
  transition: transform var(--t-medio) var(--ease), box-shadow var(--t-medio) var(--ease), border-color var(--t-medio);
}
.cliente-cartao:hover { transform: translateY(-3px); box-shadow: var(--sombra-alta); border-color: var(--linha); }
.cliente-cartao:active { transform: translateY(-1px) scale(.99); }
.cliente-cartao__topo { display: flex; gap: 12px; align-items: center; }
.cliente-cartao h3 { font-size: calc(16.5px * var(--fs, 1)); }
.avatar { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-family: var(--display); font-size: calc(14px * var(--fs, 1)); font-weight: 500; background: var(--superficie-2); color: var(--tinta); flex: none; transition: transform var(--t-medio) var(--ease-mola); }
.cliente-cartao:hover .avatar { transform: rotate(-6deg); }
.avatar--grande { width: 64px; height: 64px; border-radius: 20px; font-size: calc(20px * var(--fs, 1)); }
.fontes { display: flex; flex-wrap: wrap; gap: 6px; }
.metricas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 12px; border-top: 1px solid var(--linha-suave); }
.metricas b { display: block; font-family: var(--display); font-weight: 500; font-size: calc(18px * var(--fs, 1)); font-variant-numeric: tabular-nums; }
.metricas span { font-family: var(--dados); font-size: calc(10px * var(--fs, 1)); letter-spacing: .08em; text-transform: uppercase; color: var(--tinta-2); }
/* Central → Clientes: 4 números (tarefas, horas, execuções, IA); a métrica de tarefas leva à lista de tarefas. */
.metricas--4 { grid-template-columns: repeat(4, 1fr); }
.metricas__link { border-radius: 8px; margin: -4px; padding: 4px; transition: background .15s; }
.metricas__link:hover { background: var(--linha-suave); }
.metricas__link:hover b { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 520px) { .metricas--4 { grid-template-columns: repeat(2, 1fr); row-gap: 10px; } }
.seta-canto { position: absolute; top: 18px; right: 18px; color: var(--tinta-3); opacity: 0; transform: translateX(-4px); transition: opacity var(--t-medio), transform var(--t-medio) var(--ease); }
.cliente-cartao:hover .seta-canto { opacity: 1; transform: none; }

/* ---------- Ferramentas (PDF Service) ---------- */
.ferramenta {
  display: flex; flex-direction: column; gap: 10px; text-align: left; cursor: pointer; font: inherit; color: inherit; width: 100%;
  transition: transform var(--t-medio) var(--ease), box-shadow var(--t-medio) var(--ease), border-color var(--t-medio);
}
.ferramenta:hover { transform: translateY(-3px); box-shadow: var(--sombra-alta); border-color: var(--linha); }
.ferramenta:active { transform: scale(.985); }
.ferramenta__ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--superficie-2); transition: transform var(--t-medio) var(--ease-mola); }
.ferramenta:hover .ferramenta__ico { transform: translateY(-2px) rotate(-6deg); }
.ferramenta h3 { font-size: calc(15.5px * var(--fs, 1)); }
.ferramenta p { color: var(--tinta-2); font-size: calc(14px * var(--fs, 1)); line-height: 1.45; }
.ferramenta .rota { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }

.soltar { border: 1.5px dashed var(--tinta-3); border-radius: var(--r-card); padding: 26px; text-align: center; display: grid; gap: 8px; justify-items: center; cursor: pointer; transition: background-color var(--t-medio), border-color var(--t-medio), transform var(--t-medio) var(--ease); }
.soltar:hover, .soltar.sobre { border-color: var(--tinta); background: var(--linha-suave); }
.soltar.sobre { transform: scale(1.01); }
.soltar .ico { width: 28px; height: 28px; color: var(--tinta-2); transition: transform var(--t-medio) var(--ease-mola); }
.soltar.sobre .ico { transform: translateY(-4px); }

.resultado { border-radius: var(--r-card); background: var(--superficie-2); padding: 14px; max-height: 460px; overflow: auto; font-family: var(--dados); font-size: calc(12.5px * var(--fs, 1)); line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.resultado .k { color: var(--tinta-2); }
.resultado .s { color: var(--ok); }
.resultado .nb { color: var(--aviso); }
.progresso { height: 4px; border-radius: 4px; background: var(--linha); overflow: hidden; }
.progresso span { display: block; height: 100%; width: 40%; background: var(--tinta); border-radius: 4px; animation: vaivem 1.3s var(--ease) infinite; }
@keyframes vaivem { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.cronometro { font-family: var(--dados); font-size: calc(12px * var(--fs, 1)); color: var(--tinta-2); font-variant-numeric: tabular-nums; }

/* ---------- Kanban (GHL) ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kanban__col { background: var(--superficie-2); border-radius: var(--r-card); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.kanban__col h4 { font-family: var(--dados); font-weight: 400; font-size: calc(11px * var(--fs, 1)); letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-2); display: flex; justify-content: space-between; margin: 2px 4px 4px; }
.kanban__cartao { background: var(--superficie); border-radius: 12px; padding: 10px 12px; box-shadow: var(--sombra); font-size: calc(14px * var(--fs, 1)); display: grid; gap: 4px; }
.kanban__cartao small { font-family: var(--dados); font-size: calc(11px * var(--fs, 1)); color: var(--tinta-2); }

/* ---------- Listas ---------- */
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { display: flex; gap: 12px; align-items: center; padding: 11px 2px; border-top: 1px solid var(--linha-suave); }
.lista li:first-child { border-top: 0; }
.lista .fim { margin-left: auto; text-align: right; font-family: var(--dados); font-size: calc(12px * var(--fs, 1)); color: var(--tinta-2); white-space: nowrap; }
.lista a { text-decoration: none; }
.lista a:hover { text-decoration: underline; text-underline-offset: 3px; }
.linha-2 { display: flex; flex-direction: column; min-width: 0; }
.linha-2 small { color: var(--tinta-2); font-size: calc(12.5px * var(--fs, 1)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.corta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.atalho { display: flex; gap: 14px; align-items: center; text-decoration: none; transition: transform var(--t-medio) var(--ease), box-shadow var(--t-medio) var(--ease); }
.atalho:hover { transform: translateY(-2px); box-shadow: var(--sombra-alta); }
.atalho .ico--ext { margin-left: auto; color: var(--tinta-3); transition: transform var(--t-medio) var(--ease), color var(--t-rapido); }
.atalho:hover .ico--ext { transform: translate(2px, -2px); color: var(--tinta); }

/* ---------- Gráfico ---------- */
.barras { width: 100%; height: 110px; display: flex; align-items: flex-end; gap: 2px; }
.barras span { flex: 1 1 0; max-width: 28px; margin: 0 auto; border-radius: 3px 3px 0 0; background: var(--tinta-3); transform-origin: bottom; animation: crescer var(--t-lento) var(--ease) both; animation-delay: calc(var(--i) * 12ms); transition: background-color var(--t-rapido); }
.barras span.atual, .barras span:hover { background: var(--tinta); }
/* graficoBarras (ui.js): grade, eixo e dica, no tamanho real em pixels */
.grafico-barras { height: 220px; position: relative; }
.grafico-barras svg { display: block; overflow: visible; }
.gb-eixo { font: 400 11px var(--dados); fill: var(--tinta-2); }
.gb-grade { stroke: var(--linha-suave); stroke-width: 1; shape-rendering: crispEdges; }
.gb-barra { transform-origin: bottom; transform-box: fill-box; animation: crescer 700ms var(--ease) both; }
.gb-alvo { fill: transparent; cursor: crosshair; }
g.ativo .gb-barra { opacity: .78; }
.gb-dica { position: fixed; z-index: 9500; transform: translate(-50%, calc(-100% - 12px)); pointer-events: none; background: var(--tinta); color: var(--fundo); font: 400 12px/1.45 var(--dados); padding: 7px 10px; border-radius: 8px; white-space: nowrap; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
@keyframes crescer { from { transform: scaleY(0); } }
.eixo { display: flex; justify-content: space-between; font-family: var(--dados); font-size: calc(10.5px * var(--fs, 1)); color: var(--tinta-2); margin-top: 6px; }

/* ---------- Estados ---------- */
.estado { text-align: center; padding: 42px 20px; display: grid; justify-items: center; gap: 10px; max-width: 520px; margin: 0 auto; }
.estado h3 { font-size: calc(18px * var(--fs, 1)); }
.estado p { color: var(--tinta-2); }
.estado__marca { font-size: calc(30px * var(--fs, 1)); color: var(--tinta-3); animation: flutuar 3.6s ease-in-out infinite; }
@keyframes flutuar { 50% { transform: translateY(-5px) rotate(20deg); } }
.estado--config { background: var(--aviso-fundo); border-radius: var(--r-card); max-width: none; }
.estado--erro { background: var(--erro-fundo); border-radius: var(--r-card); max-width: none; }
.estado--erro h3 { color: var(--erro); font-family: var(--texto); font-weight: 600; font-size: calc(16px * var(--fs, 1)); }

.esqueleto { display: grid; gap: 12px; }
.esqueleto span { display: block; height: 16px; border-radius: 8px; background: linear-gradient(90deg, var(--linha-suave) 0%, var(--linha) 40%, var(--linha-suave) 80%); background-size: 300% 100%; animation: brilho 1.4s ease-in-out infinite; animation-delay: calc(var(--i) * 90ms); }
.esqueleto span:nth-child(3n) { width: 72%; }
.esqueleto span:nth-child(3n+2) { width: 88%; }
.esqueleto--cartao { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.esqueleto--cartao span { height: 150px; width: 100% !important; border-radius: var(--r-card); }
@keyframes brilho { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 250; align-items: flex-end; }
.toast { display: flex; gap: 10px; align-items: center; padding: 11px 16px; border-radius: var(--r-pilula); background: var(--tinta); color: var(--fundo); font-weight: 600; font-size: calc(14px * var(--fs, 1)); box-shadow: var(--sombra-alta); cursor: pointer; animation: toast-entra var(--t-lento) var(--ease-mola) both; max-width: min(92vw, 460px); }
.toast__ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--amarelo); flex: none; }
.toast--erro .toast__ponto { background: #EF7B72; }
.toast--saindo { animation: toast-sai 180ms var(--ease-sai) both; }
@keyframes toast-entra { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toast-sai { to { opacity: 0; transform: translateY(8px) scale(.97); } }

/* ---------- Modal e paleta (vidro fosco com luz pastel atrás) ---------- */
.modal-fundo, .paleta-fundo {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: start center; padding: 12vh 16px 16px;
  background: rgba(3, 12, 49, .28); animation: surgir var(--t-medio) var(--ease);
}
.modal-fundo.saindo { animation: surgir 180ms var(--ease-sai) reverse both; }
.modal-fundo::before, .paleta-fundo::before {
  content: ''; position: absolute; width: 640px; height: 420px; top: 8vh; left: 50%; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(239, 226, 176, .55), transparent), radial-gradient(closest-side at 70% 60%, rgba(201, 207, 221, .5), transparent);
  filter: blur(20px);
}
.modal, .paleta {
  position: relative; width: min(100%, var(--largura, 620px)); border-radius: var(--r-painel);
  background: color-mix(in srgb, var(--superficie) 90%, transparent); backdrop-filter: blur(22px) saturate(110%); -webkit-backdrop-filter: blur(22px) saturate(110%);
  border: 1px solid var(--linha); box-shadow: var(--sombra-alta); animation: escalar var(--t-medio) var(--ease-mola);
}
.modal { padding: 26px; max-height: 80vh; overflow: auto; }
.modal__titulo { font-size: calc(21px * var(--fs, 1)); margin-bottom: 10px; }
.modal p { color: var(--tinta-2); }
.modal__acoes { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal-fundo.saindo .modal { animation: escalar 160ms var(--ease-sai) reverse both; }

.paleta { --largura: 640px; overflow: hidden; }
.paleta__entrada { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--linha); }
.paleta__entrada input { border: 0; background: transparent; padding: 0; font-size: calc(17px * var(--fs, 1)); box-shadow: none !important; }
.paleta__lista { list-style: none; margin: 0; padding: 8px; max-height: 52vh; overflow-y: auto; }
.paleta__grupo { padding: 10px 12px 4px; }
.paleta__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; transition: background-color 80ms; }
.paleta__item[aria-selected="true"] { background: var(--linha-suave); }
.paleta__item[aria-selected="true"] .paleta__seta { opacity: 1; transform: none; }
.paleta__item small { color: var(--tinta-2); margin-left: auto; font-family: var(--dados); font-size: calc(11px * var(--fs, 1)); }
.paleta__seta { opacity: 0; transform: translateX(-4px); transition: opacity var(--t-rapido), transform var(--t-rapido); color: var(--tinta-2); }
.paleta__item mark { background: transparent; color: inherit; font-weight: 700; text-decoration: underline; text-decoration-color: var(--amarelo); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.paleta__rodape { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--linha); }

.divisor { height: 1px; background: var(--linha); margin: 22px 0; border: 0; }
.dica-linha { display: flex; gap: 8px; align-items: flex-start; font-size: calc(13.5px * var(--fs, 1)); color: var(--tinta-2); }
.dica-linha .ico { width: 16px; height: 16px; margin-top: 2px; }
.passos { counter-reset: p; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.passos li { counter-increment: p; display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.passos li::before { content: counter(p, decimal-leading-zero); font-family: var(--dados); font-size: calc(12px * var(--fs, 1)); color: var(--tinta-2); padding-top: 2px; }

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  /* Fechado, o menu sai da ordem do Tab e do leitor de tela (visibility só muda depois da animação de saída). */
  .lateral { position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-102%); visibility: hidden; transition: transform var(--t-lento) var(--ease), visibility 0s linear var(--t-lento); box-shadow: var(--sombra-alta); background: var(--fundo); }
  .lateral.aberta { transform: none; visibility: visible; transition: transform var(--t-lento) var(--ease), visibility 0s; }
  [data-lateral="recolhida"] .app { --lateral: 0; }
  .lateral__recolher { display: none; }
  .icone-botao.topo__menu { display: inline-grid; }
  .migalhas { overflow: hidden; }
  .migalhas a:not(:first-child), .migalhas a:not(:first-child) + .sep { display: none; }
  .lateral:not(.aberta) { box-shadow: none; }
  .conteudo { padding-bottom: 90px; }
  .metricas { grid-template-columns: repeat(3, 1fr); }
  .toasts { left: 16px; right: 16px; align-items: stretch; }
}
.veu { position: fixed; inset: 0; background: rgba(3, 12, 49, .3); z-index: 45; animation: surgir var(--t-medio); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; animation-delay: 0ms !important; }
  .ponto--online::after, .estado__marca { animation: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
@media (forced-colors: active) { .ponto { border: 1px solid CanvasText; } }

/* Tamanho da fonte (Configurações > Exibição): os tamanhos em px são multiplicados por --fs. Grande = tamanho original. */
:root { --fs: .92; }
[data-fonte="pequena"] { --fs: .85; }
[data-fonte="grande"] { --fs: 1; }

/* Asterisco da Elev girando: estados vazios e carregamento */
@keyframes girar-asterisco { to { transform: rotate(360deg); } }
.estado__marca { display: inline-block; color: var(--tinta-3); animation: girar-asterisco 6s linear infinite; }
.carregando-elev { display: grid; place-items: center; gap: 12px; padding: 20px; color: var(--tinta-3); font-size: calc(13px * var(--fs, 1)); }
.carregando-elev__marca { display: inline-block; font: 700 calc(34px * var(--fs, 1)) / 1 var(--titulo, sans-serif); color: var(--amarelo, #FFD434); animation: girar-asterisco 1.6s cubic-bezier(.6, .1, .4, .9) infinite; }
.estado--carregando::before { content: '✱'; display: block; font-size: calc(30px * var(--fs, 1)); color: var(--amarelo, #FFD434); animation: girar-asterisco 1.6s cubic-bezier(.6, .1, .4, .9) infinite; margin-bottom: 8px; }
@media (prefers-reduced-motion: reduce) { .carregando-elev__marca, .estado--carregando::before, .estado__marca { animation: none !important; } }

/* Menu do Trabalho: "Mais opções" recolhível */
.nav__mais { display: flex; align-items: center; justify-content: space-between; width: calc(100% - 20px); margin: 12px 10px 4px; padding: 4px 0; background: none; border: 0; color: var(--tinta-3); font: 500 11px var(--dados); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.nav__mais:hover { color: var(--tinta); }
.nav__mais i { font-style: normal; transition: transform .15s; }
.nav__mais--grupo { font-weight: 500; }
.nav__mais[aria-expanded="false"] i { transform: rotate(-90deg); }
[data-lateral="recolhida"] .nav__mais { display: none; }

/* Folga embaixo do conteúdo (o mini-cronômetro flutua no canto de baixo). A barra de voz e o "N online" do menu
   ficaram só no Gather (escritorio-barra.css), desde 19/10/2026. */
.conteudo { padding-bottom: 104px; }
@media (max-width: 860px) { .conteudo { padding-bottom: 120px; } }

/* Central → Clientes: 5 números no cartão e o painel de configuração (engrenagem; lista com busca e interruptores). */
.metricas--1 { grid-template-columns: 1fr; } .metricas--2 { grid-template-columns: repeat(2, 1fr); } .metricas--5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 520px) { .metricas--5 { grid-template-columns: repeat(3, 1fr); row-gap: 10px; } }
.cl-cfg { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; margin-top: 12px; }
.cl-cfg__nota { font-size: calc(13px * var(--fs, 1)); }
.cl-cfg__bloco { display: grid; gap: 10px; align-content: start; min-width: 0; }
.cl-cfg__bloco .busca-local { width: 100%; }
.cl-cfg__lista { list-style: none; margin: 0; padding: 0; max-height: min(46vh, 380px); overflow-y: auto; border: 1px solid var(--linha-suave); border-radius: 10px; }
.cl-cfg__lista .cl-cfg__linha { padding: 8px 12px; border-bottom: 1px solid var(--linha-suave); }
.cl-cfg__lista .cl-cfg__linha:last-child { border-bottom: 0; }
.cl-cfg__linha { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cl-cfg__linha > span { display: grid; min-width: 0; }
.cl-cfg__linha small { font-size: calc(12px * var(--fs, 1)); }
.cl-cfg__linha b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-cfg__vazio { padding: 12px; }
.cl-cfg__sub { margin-top: 6px; }
.cl-cfg__conta { font-size: calc(12px * var(--fs, 1)); }
@media (max-width: 720px) { .cl-cfg { grid-template-columns: 1fr; } .cl-cfg__lista { max-height: 40vh; } }

/* Select nativo escondido atrás do seletor padrão (seletor-lista.js): vale em todas as telas, não só nas tarefas */
.sel-nativo { position: absolute !important; width: 1px !important; min-width: 0 !important; max-width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; overflow: hidden; padding: 0 !important; border: 0 !important; }
