/* ════════════════════════════════════════════════════════════
   dashboard39.css — Dashboard novo (Etapa 3.9, 09/11/2026)
   Protótipo aprovado: Dash39Ultrawide / Dash39PC / Dash39Notebook /
   Dash39Celular / Dash39Vendedor (sem o bloco Ocorrências — decisão do
   usuário). Montado por js/dashboard39.js + js/dashboard39-blocos.js.

   COMO O LAYOUT FUNCIONA
   · <main class="d39-main"> ganha do JS:
       data-t    = uw | pc | nb | cel   (tamanhos do protótipo, abaixo)
       data-modo = fit  → PC/notebook/ultrawide: a página CABE na tela
                          (topo + indicadores + grade + atalhos; a grade
                          ocupa o resto e cada coluna termina no mesmo
                          ponto: um bloco "elástico" por coluna absorve a
                          sobra e as listas mostram quantos itens couberem,
                          trocando o resto por "+N … · Ver todos");
                   rola → tablet/celular: rolagem normal da página.
   · Nunca sobra vão entre cartões (a sobra fica dentro do elástico) e
     nenhum item sai cortado pela metade (o JS esconde o item inteiro).
   · Tema: tokens claros aqui e escuros em html[data-tema="escuro"].
   · Movimento: só transform/opacity; entrada em cascata uma vez por carga;
     :active scale(.97); hover só com mouse; reduced-motion = sem
     deslocamento; reduced-transparency = vidro sólido.
   ════════════════════════════════════════════════════════════ */

/* ── Tokens (claro) ─────────────────────────────────────────── */
main.d39-main {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --bg: #eef2f8; --card: #ffffff; --el: #ffffff; --tx: #0f172a; --tx2: #556070; --tx3: #334155;
  --ln: rgba(15, 23, 42, 0.07); --ln2: rgba(15, 23, 42, 0.12); --fill: #f1f4f9; --fill2: #e6ebf2;
  --azul: #2563eb; --azul2: #1d4ed8; --azul-l: rgba(37, 99, 235, 0.10); --link: #1d4ed8;
  --verde: #15803d; --verde-l: rgba(22, 163, 74, 0.12); --lar: #b45309; --lar-l: rgba(245, 158, 11, 0.16);
  --verm: #c81e1e; --verm-l: rgba(239, 68, 68, 0.11); --roxo: #6d28d9; --roxo-l: rgba(139, 92, 246, 0.13);
  --teal: #0f766e; --teal-l: rgba(13, 148, 136, 0.13); --rosa: #be185d; --rosa-l: rgba(236, 72, 153, 0.12);
  --g-azul: #3b82f6; --g-verde: #16a34a; --g-cinza: #a7b1c2;
  --sombra: 0 0 0 1px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(30, 64, 175, 0.06);
  --sombra-h: 0 0 0 1px rgba(15, 23, 42, 0.05), 0 2px 4px rgba(15, 23, 42, 0.05), 0 14px 32px rgba(30, 64, 175, 0.10);
  --sombra-pop: 0 24px 60px rgba(15, 23, 42, 0.20), 0 0 0 1px rgba(15, 23, 42, 0.06);
  --vidro: rgba(255, 255, 255, 0.72); --raio: 20px;
  /* tamanhos (padrão = PC 1920×1080; os outros abaixo) */
  --fs: 13.5px; --h1: 25px; --h2: 15.5px; --h3: 16.5px; --pad: 18px; --gap: 16px; --gapc: 18px; --chmb: 12px;
  --hic: 30px; --kic: 44px; --kn: 27px; --kl: 13px; --kpih: 86px; --kpipad: 16px; --kpigap: 12px;
  --spw: 76px; --sph: 38px; --btnh: 40px; --buscaw: 420px; --toph: 52px;
  --atlh: 72px; --atlpad: 9px; --atlgap: 7px; --atlfs: 12px; --atlic: 19px; --pillh: 22px; --av: 32px; --gic: 30px;
  --ok: 24px; --linha-pad: 6px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter Variable", "Segoe UI", sans-serif;
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased; color: var(--tx);
  background: radial-gradient(1400px 720px at 18% -12%, rgba(59, 130, 246, 0.11), transparent 62%),
              radial-gradient(1100px 640px at 100% -4%, rgba(14, 165, 233, 0.08), transparent 60%), var(--bg);
  -webkit-tap-highlight-color: transparent;
}
html[data-tema="escuro"] main.d39-main {
  --bg: #0b0e14; --card: #161a22; --el: #1f2430; --tx: #f1f5f9; --tx2: #a3adbd; --tx3: #d5dbe5;
  --ln: rgba(255, 255, 255, 0.08); --ln2: rgba(255, 255, 255, 0.14); --fill: #1f2430; --fill2: #2a303d;
  --azul-l: rgba(59, 130, 246, 0.18); --link: #8ab8ff; --verde: #4ade80; --verde-l: rgba(34, 197, 94, 0.17);
  --lar: #fbbf24; --lar-l: rgba(245, 158, 11, 0.18); --verm: #fb8a8a; --verm-l: rgba(239, 68, 68, 0.18);
  --roxo: #c4b5fd; --roxo-l: rgba(139, 92, 246, 0.22); --teal: #5eead4; --teal-l: rgba(20, 184, 166, 0.18);
  --rosa: #f9a8d4; --rosa-l: rgba(236, 72, 153, 0.2);
  --g-azul: #3d84f5; --g-verde: #2ba84a; --g-cinza: #5b6475;
  --sombra: 0 0 0 1px rgba(255, 255, 255, 0.06); --sombra-h: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 14px 32px rgba(0, 0, 0, 0.5);
  --sombra-pop: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08); --vidro: rgba(31, 36, 48, 0.72);
  background: radial-gradient(1400px 720px at 18% -12%, rgba(59, 130, 246, 0.12), transparent 62%), var(--bg);
}
/* Os cartões de comunicado (comunicado-cartao.css) usam os mesmos tons do dashboard */
main.d39-main .com37 { --c-card: var(--card); --c-tx: var(--tx); --c-tx2: var(--tx2); --c-tx3: var(--tx3); --c-fill: var(--fill); --c-fill2: var(--fill2); --c-azul: var(--azul); --c-link: var(--link); --c-linha: var(--ln); }

main.d39-main[data-t="uw"] {
  --fs: 14.5px; --h1: 30px; --h2: 17px; --h3: 19px; --pad: 22px; --gap: 20px; --gapc: 24px; --chmb: 14px;
  --hic: 34px; --kic: 54px; --kn: 34px; --kl: 14px; --kpih: 112px; --kpipad: 22px; --kpigap: 16px;
  --spw: 200px; --sph: 56px; --btnh: 44px; --buscaw: 560px; --toph: 62px;
  --atlh: 92px; --atlpad: 12px; --atlgap: 10px; --atlfs: 13.5px; --atlic: 22px; --pillh: 24px; --av: 38px; --gic: 34px;
  --linha-pad: 7px;
}
main.d39-main[data-t="nb"] {
  --fs: 12.5px; --h1: 20px; --h2: 14px; --h3: 14px; --pad: 14px; --gap: 12px; --gapc: 12px; --chmb: 8px;
  --hic: 26px; --kic: 36px; --kn: 21px; --kl: 12px; --kpih: 62px; --kpipad: 12px; --kpigap: 10px;
  --spw: 56px; --sph: 28px; --btnh: 40px; --buscaw: 300px; --toph: 44px;
  --atlh: 56px; --atlpad: 7px; --atlgap: 6px; --atlfs: 11px; --atlic: 16px; --pillh: 20px; --av: 28px; --gic: 26px;
  --ok: 20px; --linha-pad: 5px;
}
main.d39-main[data-t="cel"] {
  --fs: 14px; --h1: 24px; --h2: 16px; --h3: 17px; --pad: 16px; --gap: 12px; --gapc: 12px; --chmb: 12px;
  --hic: 30px; --kic: 40px; --kn: 26px; --kl: 13px; --kpipad: 14px; --btnh: 40px; --pillh: 22px; --av: 32px; --gic: 30px;
  --spw: 54px; --sph: 34px; --linha-pad: 9px;
}

/* ── <main> e a raiz ────────────────────────────────────────── */
main.d39-main { overflow-x: hidden; }
@media (min-width: 1025px) {
  main.d39-main { padding: 22px 28px 20px; }
  main.d39-main[data-t="uw"] { padding: 26px 36px 24px; }
  main.d39-main[data-t="nb"] { padding: 14px 18px 14px; }
  main.d39-main[data-modo="fit"] { overflow-y: hidden; }
}
.d39 { display: flex; flex-direction: column; gap: var(--gap); min-height: 100%; min-width: 0; }
main.d39-main[data-modo="fit"] .d39 { height: 100%; min-height: 0; }
.d39 *, .d39 *::before, .d39 *::after { box-sizing: border-box; }
:where(.d39) :where(button) { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; padding: 0; text-align: inherit; }
:where(.d39) :where(a) { color: var(--link); text-decoration: none; touch-action: manipulation; }
.d39 :focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; border-radius: 10px; }
.d39 h1, .d39 h2, .d39 h3, .d39 p { margin: 0; }
.d39-sr { position: absolute !important; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.press { transition: transform 120ms var(--ease-out), background-color 160ms ease, color 160ms ease, box-shadow 200ms var(--ease-out); }
.press:active { transform: scale(0.97); }

/* Até os dados chegarem (≤ 2,5 s), indicadores e grade ficam invisíveis
   (nada visível "pula"); depois entram em cascata, uma vez. */
.d39[data-carregando] .d39-topo, .d39[data-carregando] .d39-kpis, .d39[data-carregando] .d39-grade, .d39[data-carregando] .d39-atl { visibility: hidden; }
@keyframes dz-sobe { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.d39-entra .dz-in { animation: dz-sobe 420ms var(--ease-out) both; animation-delay: var(--d, 0ms); }

/* ── Topo ───────────────────────────────────────────────────── */
.d39-topo { position: relative; display: flex; align-items: center; gap: calc(var(--gap) * 0.6); min-height: var(--toph); flex: none; }
.d39-ola { min-width: 0; flex: none; }
.d39-ola h1 { font-size: var(--h1); line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; white-space: nowrap; color: var(--tx); }
.d39-ola p { font-size: calc(var(--fs) - 0.5px); color: var(--tx2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Barra de busca: ocupa o espaço livre entre a saudação e os botões (320–720 px,
   centrada no que sobrar). É um <button>: cursor normal, abre a busca do Ctrl+K. */
.dz-busca {
  display: flex; align-items: center; gap: 10px; flex: 1 1 320px; min-width: min(320px, 100%); max-width: 720px; margin-inline: auto;
  height: max(var(--btnh), 42px); padding: 0 14px 0 calc(var(--btnh) * 0.38);
  background: var(--card); border-radius: 999px; box-shadow: var(--sombra), inset 0 0 0 1px var(--linha, rgba(15, 23, 42, 0.06)); color: var(--tx2); font-size: var(--fs); cursor: default;
  transition: box-shadow 180ms var(--ease-out), background-color 180ms ease;
}
.dz-busca svg { flex: none; color: var(--tx3); }
@media (hover: hover) and (pointer: fine) { .dz-busca:hover { box-shadow: var(--sombra-h, var(--sombra)), inset 0 0 0 1px rgba(37, 99, 235, 0.35); } }
.dz-busca:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
.dz-busca > span:not(.dz-kbd) { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-kbd { font-size: 11.5px; font-weight: 600; color: var(--tx2); background: var(--fill); border-radius: 6px; padding: 3px 7px; white-space: nowrap; flex: none; }
.d39-acoes { display: flex; align-items: center; gap: calc(var(--gap) * 0.6); flex: none; }
.dz-tema, .dz-ibtn { position: relative; display: grid; place-items: center; width: var(--btnh); height: var(--btnh); border-radius: 999px; background: var(--card); box-shadow: var(--sombra); color: var(--tx3); flex: none; }
.dz-cont {
  position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: #e5243b; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg);
}
.dz-cont[hidden] { display: none; }
.dz-prim {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: var(--btnh); padding: 0 calc(var(--btnh) * 0.36);
  border-radius: 12px; background: var(--azul); color: #fff !important; font-weight: 600; font-size: var(--fs); white-space: nowrap;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}
.dz-sec {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: var(--btnh); padding: 0 calc(var(--btnh) * 0.36);
  border-radius: 12px; background: var(--card); color: var(--tx) !important; font-weight: 600; font-size: var(--fs); white-space: nowrap; box-shadow: var(--sombra);
}
/* Registrar ponto: o botão mais didático do topo — texto sempre visível no
   PC/tablet, alvo de 44 px, ícone num círculo verde */
.dz-sec.d39-ponto { height: 44px; padding: 0 16px 0 7px; gap: 9px; border-radius: 999px; font-size: max(var(--fs), 14px); }
.d39-ponto-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--verde-l); color: var(--verde); flex: none; }
.d39-ponto-curto { display: none; }
.d39-ancora { position: relative; display: flex; flex: none; }
.dz-pop {
  position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; border-radius: 18px; background: var(--el); box-shadow: var(--sombra-pop);
  transform-origin: top right; transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out); color: var(--tx);
}
.dz-pop[hidden] { display: none; }
@starting-style { .dz-pop { opacity: 0; transform: scale(0.97) translateY(-4px); } }
.d39-pop-notif { width: 380px; max-width: calc(100vw - 24px); padding: 14px; }
.d39-pop-novo { width: 280px; padding: 8px; }
.dz-menu a, .dz-menu button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; text-align: left; color: var(--tx) !important; min-height: 48px; }
.dz-menu b { display: block; font-size: 14.5px; }
.dz-menu small { font-size: 12.5px; color: var(--tx2); }
.d39-pop-cab { display: flex; align-items: center; gap: 8px; margin: 2px 4px 10px; }
.d39-pop-cab b { font-size: 15px; }
.d39-pop-vazio { padding: 14px 8px 8px; color: var(--tx2); font-size: 14px; }
.d39-veu { position: fixed; inset: 0; z-index: 39; background: transparent; }
.d39-veu[hidden] { display: none; }

/* ── Indicadores ────────────────────────────────────────────── */
.d39-kpis { display: grid; gap: var(--gap); flex: none; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
.dz-kpi {
  position: relative; display: flex; align-items: center; gap: var(--kpigap); height: var(--kpih); padding: 0 var(--kpipad);
  background: var(--card); border-radius: var(--raio); box-shadow: var(--sombra); text-align: left; width: 100%; min-width: 0; overflow: hidden; color: var(--tx);
}
.dz-kic { flex: none; width: var(--kic); height: var(--kic); border-radius: 50%; display: grid; place-items: center; color: #fff; }
.dz-kic svg { width: calc(var(--kic) * 0.46); height: calc(var(--kic) * 0.46); }
.dz-kcorpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
main.d39-main[data-t="nb"] .dz-kcorpo { gap: 2px; }
.dz-klinha { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.dz-kn { font-size: var(--kn); font-weight: 700; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; line-height: 1.05; white-space: nowrap; }
.dz-kl { font-size: var(--kl); color: var(--tx2); font-weight: 500; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: calc(var(--fs) - 1.5px); overflow: hidden; text-overflow: ellipsis; }
.dz-delta.bom { color: var(--verde); } .dz-delta.ruim { color: var(--verm); } .dz-delta.neutro { color: var(--tx2); }
main.d39-main[data-t="nb"] .dz-kcorpo > .dz-delta { display: none; }
main.d39-main:not([data-t="nb"]) .dz-klinha > .dz-delta { display: none; }
.dz-kmini { flex: none; display: flex; align-items: center; }
.dz-spark { display: block; flex: none; overflow: visible; }
@keyframes dz-traco { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes dz-fade { from { opacity: 0; } to { opacity: 1; } }
.d39-entra .dz-spark-l { stroke-dasharray: 1; animation: dz-traco 900ms var(--ease-out) both; animation-delay: calc(var(--d, 0ms) + 180ms); }
.d39-entra .dz-spark-a, .d39-entra .dz-spark-p, .d39-entra .dz-spark-g { animation: dz-fade 500ms ease both; animation-delay: calc(var(--d, 0ms) + 700ms); }
.dz-kmbar { width: var(--spw); }
.dz-kmbar small { display: flex; justify-content: space-between; gap: 6px; font-size: calc(var(--fs) - 2.5px); color: var(--tx2); margin-top: 6px; font-weight: 600; white-space: nowrap; }
main.d39-main[data-t="nb"] .dz-kmbar small { display: none; }
.dz-kspark-vazio { width: var(--spw); font-size: calc(var(--fs) - 2.5px); color: var(--tx2); font-weight: 600; text-align: right; line-height: 1.3; }
.dz-mbar { display: block; height: 6px; border-radius: 3px; background: var(--fill2); overflow: hidden; }
.dz-mbar b { display: block; height: 100%; border-radius: 3px; transform-origin: left; }
@keyframes dz-cresce-x { from { transform: scaleX(0); } to { transform: none; } }
.d39-entra .dz-mbar b { animation: dz-cresce-x 800ms var(--ease-out) both; animation-delay: calc(var(--d, 0ms) + 200ms); }
.dz-avs { display: flex; flex: none; }
.dz-avs > span { box-shadow: 0 0 0 2px var(--card); margin-left: -6px; }
.dz-avs > span:first-child { margin-left: 0; }
.dz-av { flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #1d1d1f; overflow: hidden; }
.dz-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* celular: indicadores num carrossel com encaixe */
.d39-kpis.is-carrossel {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; padding: 2px 16px 6px; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left)));
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.d39-kpis.is-carrossel::-webkit-scrollbar { display: none; }
.d39-kpis.is-carrossel .dz-kpi { flex: 0 0 214px; scroll-snap-align: start; flex-direction: column; align-items: stretch; height: auto; padding: 14px; gap: 8px; }
.d39-kpis.is-carrossel .dz-kcab { display: flex; align-items: center; gap: 10px; }
.d39-kpis.is-carrossel .dz-kcab .dz-kn { flex: 1; }

/* ── Grade ──────────────────────────────────────────────────── */
.d39-grade { display: grid; gap: var(--gapc); min-width: 0; align-items: stretch; }
main.d39-main[data-modo="fit"] .d39-grade { flex: 1 1 0; min-height: 0; }
.d39-col { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; min-height: 0; }
.dz-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tx2); flex: none; height: 18px; }
.dz-eyebrow i { width: 8px; height: 8px; border-radius: 50%; }
.d39-linha { display: grid; gap: var(--gap); min-height: 0; min-width: 0; flex: none; }
.d39-linha > * { min-width: 0; min-height: 0; }
.d39-linha.dz-elast { flex: 1 1 0; }
.dz-card {
  background: var(--card); border-radius: var(--raio); box-shadow: var(--sombra); display: flex; flex-direction: column; min-height: 0; min-width: 0;
  padding: var(--pad); flex: none; transition: box-shadow 220ms var(--ease-out), background-color 240ms ease; position: relative;
}
.dz-card.dz-elast { flex: 1 1 0; min-height: var(--elmin, 110px); }
main.d39-main[data-modo="rola"] .dz-card.dz-elast { flex: 1 1 auto; min-height: 0; }
.dz-card.foco { animation: dz-foco 1400ms var(--ease-out); }
@keyframes dz-foco { 0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0), var(--sombra); } 20% { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.55), var(--sombra-h); } 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0), var(--sombra); } }
.dz-ch { display: flex; align-items: center; gap: 10px; flex: none; margin-bottom: var(--chmb); min-width: 0; }
.dz-ch h2 { font-size: var(--h2); font-weight: 700; letter-spacing: -0.012em; white-space: nowrap; color: var(--tx); }
.dz-hic { flex: none; display: grid; place-items: center; width: var(--hic); height: var(--hic); border-radius: 10px; }
.dz-hic svg { width: calc(var(--hic) * 0.56); height: calc(var(--hic) * 0.56); }
.dz-num { font-weight: 700; border-radius: 999px; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; min-width: calc(var(--h2) + 7px); height: calc(var(--h2) + 7px); padding: 0 7px; font-size: calc(var(--fs) - 1px); white-space: nowrap; flex: none; }
.dz-ch .dz-sub { font-size: calc(var(--fs) - 0.5px); min-width: 0; }
/* o texto secundário do cabeçalho nunca vira "2 atr…": sem espaço para ~10
   letras, ele desce para a linha de baixo (o cabeçalho quebra linha) */
main.d39-main[data-modo="rola"] .dz-ch { flex-wrap: wrap; row-gap: 2px; }
main.d39-main[data-modo="rola"] .dz-ch .dz-sub { flex: 0 1 auto; min-width: min(11ch, 100%); }
.dz-lk { margin-left: auto; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; border-radius: 8px; font-size: calc(var(--fs) - 0.5px); color: var(--link) !important; flex: none; }
.dz-lk svg { transition: transform 160ms var(--ease-out); }
.dz-pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; font-weight: 600; white-space: nowrap; line-height: 1; height: var(--pillh); padding: 0 calc(var(--pillh) * 0.42); font-size: calc(var(--fs) - 2px); flex: none; }
.dz-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.p-azul { background: var(--azul-l); color: var(--link); } .p-verde { background: var(--verde-l); color: var(--verde); } .p-lar { background: var(--lar-l); color: var(--lar); }
.p-verm { background: var(--verm-l); color: var(--verm); } .p-roxo { background: var(--roxo-l); color: var(--roxo); } .p-cinza { background: var(--fill); color: var(--tx2); }
.p-teal { background: var(--teal-l); color: var(--teal); } .p-rosa { background: var(--rosa-l); color: var(--rosa); }
.t-azul { color: var(--link); } .t-verde { color: var(--verde); } .t-lar { color: var(--lar); } .t-verm { color: var(--verm); } .t-roxo { color: var(--roxo); } .t-teal { color: var(--teal); } .t-rosa { color: var(--rosa); }
.bg-azul { background: var(--azul-l); } .bg-verde { background: var(--verde-l); } .bg-lar { background: var(--lar-l); } .bg-verm { background: var(--verm-l); } .bg-roxo { background: var(--roxo-l); } .bg-teal { background: var(--teal-l); } .bg-rosa { background: var(--rosa-l); }
.dz-sub { color: var(--tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-tit { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tx); }
.dz-tit2 { font-weight: 600; color: var(--tx); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.dz-tt { display: block; font-size: var(--fs); }
.dz-ts { display: block; font-size: calc(var(--fs) - 2px); }
.dz-row { display: flex; align-items: center; gap: 12px; min-width: 0; border-radius: 12px; padding: var(--linha-pad) 6px; color: inherit; transition: background-color 160ms ease; }
.dz-row + .dz-row { box-shadow: 0 -1px 0 var(--ln); }
.dz-lista { flex: 1 1 auto; min-height: 0; overflow: hidden; margin: 0 -4px; display: flex; flex-direction: column; }
main.d39-main[data-modo="rola"] .dz-lista { flex: none; }
.dz-lista > [hidden], .dz-lista .is-fora { display: none !important; }
.dz-mais { flex: none; font-size: calc(var(--fs) - 1.5px); color: var(--tx2); padding: 4px 10px 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-mais a { font-weight: 600; }
.dz-mais[hidden] { display: none; }
.dz-vazio { display: flex; align-items: center; gap: 10px; color: var(--tx2); font-size: var(--fs); padding: 6px 6px; }
.dz-vazio svg { flex: none; color: var(--verde); }
.dz-gic { flex: none; width: var(--gic); height: var(--gic); border-radius: 50%; display: grid; place-items: center; color: #fff; }
.dz-gic svg { width: calc(var(--gic) * 0.5); height: calc(var(--gic) * 0.5); }
.g-alta { background: #e5243b; } .g-media { background: #f59e0b; } .g-baixa { background: #3b82f6; } .g-ok { background: #16a34a; } .g-roxo { background: #7c3aed; }
.dz-quando { font-size: calc(var(--fs) - 2px); color: var(--tx2); white-space: nowrap; }
.dz-fim { flex: none; display: flex; align-items: center; gap: 10px; }
.dz-esq { flex: 1; min-width: 0; }

/* "Minhas | Equipe" (quem gerencia tarefas) */
.d39-seg { display: inline-flex; padding: 2px; border-radius: 10px; background: var(--fill); flex: none; }
.d39-seg button { height: calc(var(--pillh) + 4px); padding: 0 10px; border-radius: 8px; font-size: calc(var(--fs) - 1.5px); font-weight: 600; color: var(--tx2); transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease; }
.d39-seg button[aria-pressed="true"] { background: var(--card); color: var(--tx); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.d39-tar-pane { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.d39-tar-pane[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) { .d39-seg button:not([aria-pressed="true"]):hover { color: var(--tx); } }

/* Tarefa: círculo de concluir */
.dz-ok { flex: none; width: var(--ok); height: var(--ok); border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.8px var(--ln2); color: transparent; transition: background-color 200ms ease, box-shadow 200ms ease, color 200ms ease, transform 120ms var(--ease-out); }
.dz-ok svg { width: calc(var(--ok) * 0.6); height: calc(var(--ok) * 0.6); }
.dz-ok svg path { stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset 320ms var(--ease-out) 40ms; }
.dz-ok.on { background: var(--g-verde); box-shadow: none; color: #fff; }
.dz-ok.on svg path { stroke-dashoffset: 0; }
.dz-ok[aria-busy="true"] { opacity: 0.6; }
span.dz-ok { cursor: default; }
.dz-tar.feita .dz-tit { color: var(--tx2); text-decoration: line-through; text-decoration-color: var(--ln2); }
.dz-tar.feita .dz-pill { opacity: .55; }

/* Próximo compromisso / agenda */
.dz-hora { flex: none; text-align: center; border-radius: 12px; background: var(--fill); font-variant-numeric: tabular-nums; padding: 8px 14px; min-width: 82px; }
.dz-hora b { display: block; font-weight: 700; letter-spacing: -0.02em; color: var(--tx); font-size: 24px; line-height: 1.1; }
.dz-hora small { display: block; color: var(--tx2); font-weight: 600; font-size: calc(var(--fs) - 2.5px); text-transform: uppercase; letter-spacing: .06em; }
main.d39-main[data-t="nb"] .dz-hora { padding: 6px 10px; min-width: 62px; }
main.d39-main[data-t="nb"] .dz-hora b { font-size: 19px; }
.d39-prox-v .dz-hora { padding: 12px 16px; min-width: 104px; }
.d39-prox-v .dz-hora b { font-size: 34px; }
.d39-prox-v .dz-hora small { font-size: 12px; }
.d39-prox-meta { display: grid; gap: 9px; font-size: var(--fs); color: var(--tx3); }
.d39-prox-meta > span { display: flex; align-items: center; gap: 9px; min-width: 0; }
.d39-prox-meta > span > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d39-quem { display: flex; align-items: center; gap: 7px; font-size: calc(var(--fs) - 1.5px); color: var(--tx2); white-space: nowrap; min-width: 0; }
.d39-quem b { color: var(--tx); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.d39-pauta { margin-top: 12px; padding: 9px 12px; border-radius: 12px; background: var(--fill); font-size: calc(var(--fs) - 1.5px); color: var(--tx3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d39-pauta b { color: var(--tx2); }
.dz-cat { flex: none; width: 4px; border-radius: 2px; align-self: stretch; }
.d39-ag-grade { flex: 1 1 auto; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); gap: calc(var(--gap) * 0.6); overflow: hidden; }
.d39-ag-col { min-width: 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.d39-ag-dia { font-size: calc(var(--fs) - 2px); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--tx2); padding: 0 6px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; }
.d39-ag-dia.hoje { color: var(--link); }
.d39-ag-lista .d39-ag-dia { padding: 10px 10px 4px; }
.d39-ag-lista .d39-ag-dia:first-child { padding-top: 0; }
.d39-ag-h { flex: none; width: 46px; font-size: calc(var(--fs) - 0.5px); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--tx); }
main.d39-main[data-t="nb"] .d39-ag-h { width: 38px; }
.d39-ag-it { gap: 10px; }
.d39-ag-it .dz-tt, .d39-ag-it .dz-tit2 { font-size: calc(var(--fs) - 0.5px); }

/* Checklists: rosca, barras por loja e o gráfico de 7 dias */
.dz-don { position: relative; flex: none; }
.dz-don svg { display: block; }
.d39-entra .dz-don-s { animation: dz-fade 600ms ease both; animation-delay: calc(var(--d, 0ms) + var(--i) * 90ms + 200ms); }
.dz-don-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dz-don-c b { font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; color: var(--tx); }
.dz-don-c small { color: var(--tx2); font-weight: 600; margin-top: 2px; font-size: calc(var(--fs) - 1px); }
.dz-leg { display: inline-flex; align-items: center; gap: 6px; color: var(--tx2); font-weight: 500; white-space: nowrap; font-size: calc(var(--fs) - 1.5px); }
.dz-leg i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.d39-legd { display: grid; gap: 7px; min-width: 0; }
main.d39-main[data-t="nb"] .d39-legd { gap: 3px; }
.d39-legd .dz-leg { justify-content: space-between; gap: 10px; font-size: calc(var(--fs) - 1px); }
.d39-legd .dz-leg > span { display: inline-flex; align-items: center; gap: 7px; }
.d39-legd b { color: var(--tx); font-variant-numeric: tabular-nums; }
.dz-loja { display: flex; align-items: center; min-width: 0; gap: 10px; height: var(--lojah, 26px); flex: none; }
.dz-loja > .dz-sub { flex: none; width: 44%; font-size: calc(var(--fs) - 1.5px); color: var(--tx3); }
.dz-loja > .dz-mbar { flex: 1; }
.dz-loja > b { flex: none; width: 74px; text-align: right; font-size: calc(var(--fs) - 1.5px); font-weight: 600; font-variant-numeric: tabular-nums; display: flex; justify-content: flex-end; }
.dz-loja .dz-pill { height: 18px; padding: 0 6px; font-size: 10.5px; }
.d39-faltam-tit { font-size: calc(var(--fs) - 2px); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--tx2); margin-bottom: 2px; }
.d39-lojas2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gap); }
.dz-plotw { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding-left: 22px; }
.dz-plotbox { position: relative; flex: 1 1 auto; min-height: var(--plotmin, 60px); }
.dz-plot { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-between; }
.dz-plot::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ln2); }
.dz-gl { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--ln2); }
.dz-gl b { position: absolute; right: calc(100% + 6px); top: -7px; font-size: 10.5px; font-weight: 600; color: var(--tx2); font-variant-numeric: tabular-nums; }
.dz-dia { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; border-radius: 10px; position: relative; cursor: default; }
.dz-par { display: flex; align-items: flex-end; gap: 3px; height: 100%; }
.dz-b { display: block; border-radius: 5px 5px 0 0; width: var(--bw, 11px); transform-origin: bottom; transition: opacity 160ms ease; min-height: 1px; }
.d39-entra .dz-b { animation: dz-cresce 700ms var(--ease-out) both; animation-delay: calc(var(--d, 0ms) + var(--bd, 0ms)); }
@keyframes dz-cresce { from { transform: scaleY(0); } to { transform: none; } }
.dz-b.t { background: var(--g-azul); } .dz-b.c { background: var(--g-verde); }
.dz-plot.hov .dz-dia:not(.on) .dz-b { opacity: .35; }
.dz-xls { display: flex; justify-content: space-between; margin-top: 6px; flex: none; }
.dz-xl { flex: 1; text-align: center; color: var(--tx2); font-weight: 600; white-space: nowrap; font-size: calc(var(--fs) - 2px); }
.dz-xl.hoje { color: var(--tx); font-weight: 700; }
.dz-tip { position: absolute; z-index: 5; top: -6px; transform: translate(-50%, -100%); background: var(--tx); color: var(--card); border-radius: 10px; padding: 7px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; box-shadow: var(--sombra-pop); }
.dz-tip[hidden] { display: none; }
.d39-res7 { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; flex: none; min-width: 0; }
.d39-res7 > span:first-child { font-size: calc(var(--fs) - 1.5px); color: var(--tx2); font-weight: 600; }
.d39-res7 .d39-legs { margin-left: auto; display: inline-flex; gap: 12px; }
.d39-sep-t { box-shadow: 0 -1px 0 var(--ln); }
.d39-sep-l { box-shadow: -1px 0 0 var(--ln); }
.d39-etapas { flex: 1 1 auto; min-height: 0; overflow: hidden; display: grid; align-content: start; gap: 2px; padding: 0 6px; }
.d39-etapa { display: flex; align-items: center; gap: 10px; height: 30px; font-size: calc(var(--fs) - 0.5px); color: var(--tx); min-width: 0; }
.d39-etapa > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d39-etapa.feita { color: var(--tx2); }
.d39-etapa .dz-ok { width: 20px; height: 20px; }

/* Almoxarifado */
.d39-janela { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--fill); flex: none; min-width: 0; }
main.d39-main[data-t="nb"] .d39-janela { padding: 8px; }
.d39-janela .dz-mbar { margin: 9px 0 5px; height: 7px; }
main.d39-main[data-t="nb"] .d39-janela .dz-mbar { margin: 6px 0 5px; }
.d39-janela-rod { display: flex; justify-content: space-between; gap: 8px; font-size: calc(var(--fs) - 2px); color: var(--tx2); white-space: nowrap; min-width: 0; }
.d39-janela-rod b { overflow: hidden; text-overflow: ellipsis; }
.d39-aviso { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 12px; font-size: calc(var(--fs) - 1.5px); flex: none; min-width: 0; }
.d39-aviso > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d39-aviso svg { flex: none; }
.d39-almox-tit { display: flex; align-items: center; margin: 12px 2px 2px; font-size: calc(var(--fs) - 0.5px); flex: none; }
main.d39-main[data-t="nb"] .d39-almox-tit { margin-top: 6px; }

/* Aniversários */
.d39-aniv-linha { display: grid; gap: calc(var(--gap) * 0.5); }
.d39-aniv-linha .dz-row { box-shadow: none; padding: 2px 6px; }
.d39-aniv-curto { margin: 0; }
.d39-aniv-curto .dz-sub { flex: 1; }

/* Impressão */
.d39-imp .dz-row { padding: var(--linha-pad) 4px; }

/* Comunicados no dashboard: cartões da 3.7 sem moldura própria */
.d39-com .cc-card { background: none; box-shadow: none; padding: 0; border-radius: 0; container-type: inline-size; }
.d39-com .cc-card.is-hov:hover { box-shadow: none; }
.d39-com .cc-titulo { margin-top: 0; font-size: var(--h3); }
.d39-com .cc-mais { display: none !important; }   /* o título abre o comunicado inteiro */
.d39-com .cc-cab { margin-bottom: 10px; }
main.d39-main[data-t="nb"] .d39-com .cc-cab { margin-bottom: 6px; }
.d39-com .cc-av { width: var(--av); height: var(--av); font-size: calc(var(--av) * 0.4); }
.d39-com .cc-autor { font-size: var(--fs); }
.d39-com .cc-texto { font-size: var(--fs); margin-top: 4px; max-width: none; }
.d39-com .cc-mid { aspect-ratio: auto; height: var(--mh, 220px); max-height: none; margin-top: 10px; background: var(--fill2); }
/* foto ainda chegando: fundo neutro com um brilho discreto (nunca um quadro preto) */
.d39-com .cc-slide:not(:has(.cc-foto.is-ok)):not(:has(.cc-vid)) { background: var(--fill2); }
.d39-com .cc-slide:not(:has(.cc-foto.is-ok)):not(:has(.cc-vid))::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(127, 127, 127, 0.12) 50%, transparent 70%);
  transform: translateX(-100%); animation: d39-brilho 1400ms ease-in-out infinite;
}
@keyframes d39-brilho { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .d39-com .cc-slide::before { animation: none !important; } }
.d39-com .cc-rodape { min-height: 0; padding-top: 10px; flex-wrap: nowrap; }
/* "Lido por…" chega depois: ocupa o lugar que já tem (nunca quebra a linha) */
.d39-com .cc-lido { min-width: 0; overflow: hidden; flex: 0 1 auto; }
.d39-com .cc-lido-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.d39-com .cc-ciente, .d39-com .cc-prazo { flex: none; }
main.d39-main[data-t="cel"] .d39-com .cc-rodape { flex-wrap: wrap; }
@container cc (max-width: 440px) { main.d39-main[data-modo="rola"] .d39-com .cc-rodape { flex-wrap: wrap; } }
.d39-com .cc-ciente { min-height: calc(var(--btnh) - 4px); }
.d39-com .cc-pontos { padding-top: 9px; }
.d39-com-duas { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); min-height: 0; }
.d39-com-duas > .d39-com-esq { padding-right: var(--pad); box-shadow: 1px 0 0 var(--ln); display: flex; flex-direction: column; min-width: 0; }
.d39-com-duas > .d39-com-dir { padding-left: var(--pad); display: flex; flex-direction: column; min-width: 0; }
.d39-com-duas.um > .d39-com-esq { padding-right: 0; box-shadow: none; }
.d39-com-div { height: 1px; background: var(--ln); margin: calc(var(--pad) * 0.8) 0; flex: none; }
.d39-com-pags { display: grid; min-height: 0; }
.d39-com-pags > .d39-com-pag { grid-area: 1 / 1; min-width: 0; display: flex; flex-direction: column; }
.d39-com-pags > .d39-com-pag:not(.on) { visibility: hidden; pointer-events: none; }
.d39-pager { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.d39-pager button { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--ln); color: var(--tx3); }
.d39-pager span { font-size: calc(var(--fs) - 1.5px); font-weight: 600; color: var(--tx2); min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; }
/* linha horizontal (notebook): miniatura + texto */
.d39-com-h { display: flex; gap: 12px; min-width: 0; min-height: var(--comh, 116px); }
.d39-com-h .cc-texto { -webkit-line-clamp: 1 !important; }
.d39-com-h .cc-prazo, .d39-com-h .cc-selo:not(.is-importante), .d39-com-h .cc-pontos { display: none; }
.d39-com-h .cc-rodape { padding-top: 6px; flex-wrap: nowrap; gap: 8px; }
.d39-com-h .cc-lido { min-height: 30px; }
.d39-com-h .cc-avs { display: none; }   /* sobra espaço para o texto inteiro de quem leu */
.d39-com-h .cc-ciente { min-height: 30px; padding: 0 12px; }
.d39-com-th { flex: none; width: 124px; align-self: stretch; min-height: var(--comh, 116px); border-radius: 12px; background: var(--fill2) center / cover no-repeat; position: relative; overflow: hidden; }
.d39-com-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d39-com-th .dz-pill { position: absolute; left: 6px; bottom: 6px; height: 20px; padding: 0 7px; font-size: 11px; background: rgba(29, 29, 31, 0.55); color: #fff; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.d39-com-h .cc-card { flex: 1; min-width: 0; }
.d39-com-h .cc-titulo { font-size: var(--h3); -webkit-line-clamp: 1 !important; }
.d39-com-ant-tit { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tx2); margin: 0 0 6px 6px; flex: none; }
.d39-com-ant { margin-top: auto; padding-top: var(--pad); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.d39-com-ant .dz-row { gap: 12px; padding: 8px 6px; }
.d39-com-ic { width: 44px; height: 44px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--fill); color: var(--tx2); overflow: hidden; }
.d39-com-ic img { width: 100%; height: 100%; object-fit: cover; }

/* ── Faixa de atalhos ───────────────────────────────────────── */
.dz-atl { display: flex; align-items: center; background: var(--card); border-radius: var(--raio); box-shadow: var(--sombra); height: var(--atlh); padding: var(--atlpad); gap: var(--atlgap); flex: none; min-width: 0; }
.dz-atl-cab { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 calc(var(--atlpad) * 0.6); font-weight: 700; font-size: calc(var(--h2) - 1px); white-space: nowrap; color: var(--tx); }
.dz-atl-cab svg { color: var(--azul); }
main.d39-main[data-t="nb"] .dz-atl-cab span { display: none; }
.dz-atl-it {
  flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: 14px; box-shadow: inset 0 0 0 1px var(--ln); color: var(--tx) !important; font-weight: 600; text-align: center; font-size: var(--atlfs);
}
main.d39-main[data-t="nb"] .dz-atl-it { gap: 3px; }
.dz-atl-it span { white-space: nowrap; padding: 0 10px; }
/* rótulo nunca cortado: cada atalho tem pelo menos a largura do próprio nome */
.dz-atl .dz-atl-it { flex: 1 0 auto; min-width: max-content; }
.dz-atl.is-medindo .dz-atl-it { flex: none; }
.dz-atl .d39-atl-mais-w { flex: 1 0 auto; height: 100%; }
.dz-atl .d39-atl-mais-w > .dz-atl-it { width: 100%; }
.d39-pop-atl { bottom: calc(100% + 8px); top: auto; right: 0; width: min(360px, calc(100vw - 32px)); max-height: min(60vh, 520px); overflow-y: auto; padding: 10px; transform-origin: bottom right; overscroll-behavior: contain; }
.d39-atl-todos { display: grid; gap: 2px; }
.d39-atl-todos .dz-row { padding: 10px 8px; color: var(--tx) !important; }
.d39-atl-todos svg { width: 20px; height: 20px; flex: none; color: var(--azul); }
html[data-tema="escuro"] .d39-atl-todos svg { color: var(--link); }
.d39-atl-grade .d39-atl-mais-w { display: flex; }
.d39-atl-grade .d39-atl-mais-w > .dz-atl-it { width: 100%; }
.d39-atl-grade .d39-pop-atl { position: fixed; left: 12px; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: auto; }
.dz-atl-it svg { color: var(--azul); width: var(--atlic); height: var(--atlic); flex: none; }
html[data-tema="escuro"] .dz-atl-it svg, html[data-tema="escuro"] .dz-atl-cab svg { color: var(--link); }
/* celular: atalhos numa grade de 4 (sempre linhas cheias — o JS escolhe quantos) */
.d39-atl-grade { display: grid; grid-template-columns: repeat(var(--ac, 4), minmax(0, 1fr)); gap: 8px; }
.d39-atl-grade .dz-atl-it { height: auto; min-height: 76px; padding: 8px 2px; font-size: 12px; }
.d39-atl-grade .dz-atl-it span { white-space: normal; padding: 0 2px; line-height: 1.2; text-align: center; overflow-wrap: normal; word-break: normal; hyphens: manual; }
.d39-atl-grade .dz-atl-it svg { width: 22px; height: 22px; }

/* ── Avisos (toast) ─────────────────────────────────────────── */
.d39-toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); z-index: 1200; transform: translateX(-50%);
  background: var(--tx); color: var(--card); border-radius: 14px; padding: 12px 18px; font-size: 14px; font-weight: 600; box-shadow: var(--sombra-pop);
  transition: opacity 200ms var(--ease-out), transform 240ms var(--ease-drawer); max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 12px;
}
.d39-toast[hidden] { display: none; }
@starting-style { .d39-toast { opacity: 0; transform: translate(-50%, 12px); } }
.d39-toast button { color: #8ab8ff; font-weight: 700; }

/* ── Banner de notificações push (o mesmo de antes, no visual novo) ── */
#push-permission-banner { display: none; align-items: center; gap: 14px; padding: 12px 16px; background: var(--card); border-radius: 16px; box-shadow: var(--sombra); font-size: 13.5px; color: var(--tx); flex: none; }
#push-permission-banner.visivel { display: flex; }
#push-permission-banner svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--azul); }
#push-permission-banner .push-banner-texto { flex: 1; min-width: 0; }
#push-permission-banner .push-banner-texto strong { display: block; margin-bottom: 2px; }
#push-permission-banner .push-banner-texto span { color: var(--tx2); font-size: 12.5px; }
#push-permission-banner .push-banner-acoes { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
#push-permission-banner .btn-push-ativar { padding: 8px 16px; background: var(--azul); color: #fff; border: none; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
#push-permission-banner .btn-push-fechar { background: none; border: none; cursor: pointer; color: var(--tx2); font-size: 1.2rem; line-height: 1; padding: 2px 6px; min-width: 32px; min-height: 32px; }

/* Registros rápidos (contadores de tarefa marcados para o dashboard) */
.d39-cont { display: grid; gap: 10px; }
.d39-cont-it { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: var(--fill); }
.d39-cont-it b { font-size: var(--fs); }
.d39-cont-it small { color: var(--tx2); font-size: calc(var(--fs) - 1.5px); }
.d39-cont-acao { display: flex; gap: 8px; }
.d39-cont-acao select, .d39-cont-acao input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--ln2); background: var(--card); color: var(--tx); font: inherit; font-size: 14px; }
.d39-cont-acao button { height: 36px; padding: 0 12px; border-radius: 10px; background: var(--azul); color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; }

/* ── Tablet em pé (rola, 700–1023 px): indicadores 2×2, busca só ícone ── */
main.d39-main[data-modo="rola"][data-t="pc"] .d39-kpis[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
main.d39-main[data-modo="rola"] .dz-busca { width: 44px; height: 44px; min-width: 0; max-width: none; margin-inline: 0; padding: 0; justify-content: center; flex: none; border-radius: 999px; }
main.d39-main[data-modo="rola"] .dz-busca > span { display: none; }
main.d39-main[data-modo="rola"] .d39-ola { flex: 1 1 auto; min-width: 0; }
/* indicador: o minigráfico some se não couber ao lado do texto inteiro */
.dz-kpi { container-type: inline-size; }
@container (max-width: 300px) { .dz-kpi:not(.is-col) .dz-kmini { display: none; } }

/* ── Celular e tablet (rolagem normal) ──────────────────────── */
main.d39-main[data-t="cel"] { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
/* celular: a saudação na 1ª linha; na 2ª, [Ponto] à esquerda e busca, tema,
   sino e Novo à direita (as ações viram itens do próprio topo) */
main.d39-main[data-t="cel"] .d39-topo { flex-wrap: wrap; row-gap: 12px; column-gap: 8px; }
main.d39-main[data-t="cel"] .d39-ola { flex: 1 0 100%; min-width: 0; order: 0; }
main.d39-main[data-t="cel"] .d39-ola h1, main.d39-main[data-t="cel"] .d39-ola p { white-space: normal; overflow-wrap: anywhere; }
main.d39-main[data-t="cel"] .d39-acoes { display: contents; }
main.d39-main[data-t="cel"] .d39-ponto { order: 1; margin-right: auto; }
main.d39-main[data-t="cel"] .dz-busca { order: 2; }
main.d39-main[data-t="cel"] .dz-tema { order: 3; }
main.d39-main[data-t="cel"] .d39-acoes > .d39-ancora { order: 4; }
main.d39-main[data-t="cel"] .dz-tema, main.d39-main[data-t="cel"] .dz-ibtn { width: 44px; height: 44px; }
main.d39-main[data-t="cel"] .d39-ponto-txt { display: none; }
main.d39-main[data-t="cel"] .d39-ponto-curto { display: inline; }
main.d39-main[data-t="cel"] .d39-novo-txt { display: none; }
main.d39-main[data-t="cel"] .d39-pop-novo { width: 250px; }
main.d39-main[data-t="cel"] .dz-menu button, main.d39-main[data-t="cel"] .dz-menu a { min-height: 48px; padding: 12px 10px; }
main.d39-main[data-t="cel"] .d39-pop-notif { position: fixed; top: 64px; left: 12px; right: 12px; width: auto; }
main.d39-main[data-t="cel"] .dz-prim.d39-novo { width: 44px; height: 44px; padding: 0; }
main.d39-main[data-t="cel"] .d39-novo .d39-seta { display: none; }
@media (max-width: 340px) {
  main.d39-main[data-t="cel"] .d39-ponto { padding: 0 7px; }
  main.d39-main[data-t="cel"] .d39-ponto-curto { display: none; }
}
/* Telas estreitas (≤ 340 px: celular pequeno 320×568, Split View 1/3 do iPhone
   Duo 296 px): o cabeçalho do cartão quebra linha, a hora do próximo compromisso
   fica em cima do título, o anel do checklist encolhe — nada mais largo que a tela. */
@media (max-width: 340px) {
  main.d39-main .dz-ch { flex-wrap: wrap; row-gap: 4px; }
  main.d39-main .dz-ch h2 { white-space: normal; }
  main.d39-main .dz-ch .dz-sub { white-space: normal; }
  main.d39-main .d39-prox-linha { flex-direction: column; align-items: flex-start !important; }
  main.d39-main .dz-don { width: 72px !important; height: 72px !important; }
  main.d39-main .dz-don svg { width: 100%; height: 100%; }
  main.d39-main .dz-don-c b { font-size: 16px !important; }
  main.d39-main .d39-legd .dz-leg { gap: 6px; font-size: 12px; }
  main.d39-main .dz-row { gap: 8px; }
  main.d39-main .dz-pill { padding: 0 6px; }
  main.d39-main .dz-loja > b { width: auto; min-width: 44px; }
  main.d39-main .d39-res7 { flex-wrap: wrap; white-space: normal; row-gap: 4px; }
  main.d39-main .dz-busca { padding: 0 12px; }
  main.d39-main .d39-acoes { gap: 6px; }
  main.d39-main .cc-rodape { flex-wrap: wrap; }
}

/* ── Hover só com mouse ─────────────────────────────────────── */
@media (hover: hover) and (pointer: fine) {
  .dz-card.hov:hover, .dz-kpi:hover { box-shadow: var(--sombra-h); }
  .dz-kpi { transition: box-shadow 220ms var(--ease-out), transform 120ms var(--ease-out); }
  a.dz-row:hover, .dz-row.hl:hover, .dz-menu a:hover, .dz-menu button:hover { background: var(--fill); }
  .dz-lk:hover svg { transform: translateX(2px); }
  .dz-atl-it:hover { background: var(--fill); box-shadow: inset 0 0 0 1px var(--ln2); }
  .dz-prim:hover { background: var(--azul2); }
  button.dz-ok:not(.on):hover { box-shadow: inset 0 0 0 1.8px var(--g-verde); color: var(--g-verde); }
  .d39-pager button:hover, .dz-tema:hover, .dz-ibtn:hover { background: var(--fill); }
}

@media (prefers-reduced-motion: reduce) {
  .d39-entra .dz-in, .d39-entra .dz-spark-l, .d39-entra .dz-spark-a, .d39-entra .dz-spark-p, .d39-entra .dz-spark-g, .d39-entra .dz-b, .d39-entra .dz-mbar b, .d39-entra .dz-don-s { animation: none; }
  .d39-entra .dz-in { animation: dz-fade 200ms ease both; }
  .dz-card.foco { animation: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.55); }
  .press:active, .dz-ok:active { transform: none; }
  .dz-pop { transition: opacity 160ms ease; transform: none; }
  .d39-toast { transition: opacity 160ms ease; }
}
@media (prefers-reduced-transparency: reduce) {
  .d39-com-th .dz-pill { background: rgba(29, 29, 31, 0.9); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* cabeçalho com "Minhas | Equipe": quebra linha em vez de espremer o título */
.dz-ch:has(.d39-seg) { flex-wrap: wrap; row-gap: 6px; }

/* "Últimos 7 dias 82% ↑ 2 p.p." nunca vira "↑ 2 p…": no celular a legenda desce */
.d39-res7 .dz-delta { flex: none; }
main.d39-main[data-t="cel"] .d39-res7 { flex-wrap: wrap; row-gap: 4px; }

/* tablet/celular: a linha de baixo da saudação quebra em vez de virar "você h…" */
main.d39-main[data-modo="rola"] .d39-ola p { white-space: normal; }

/* ── Comunicados: dois lado a lado (PC e iPad deitado) e um só ocupando o bloco ── */
.d39-com-par { display: grid; grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); column-gap: var(--pad); min-height: 0; flex: 1 1 auto; }
.d39-com-par.is-so { grid-template-columns: minmax(0, 1fr); }
.d39-com-pardiv { background: var(--ln); align-self: stretch; }
.d39-com-parc { min-width: 0; display: flex; flex-direction: column; }
.d39-com-parc .cc-card { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.d39-com-parc .cc-mid { height: calc(var(--mh, 176px) * 0.6); }
.d39-com-parc .cc-pontos { display: none; }
.d39-com-parc .cc-titulo { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* rodapé de altura fixa (quem leu chega depois e não muda nada de lugar) */
.d39-com-par .cc-rodape { flex-direction: column; align-items: flex-start; gap: 6px; margin-top: auto; }
.d39-com-par .cc-lido { max-width: 100%; }
.d39-com-par .cc-avs { display: none; }
.d39-com-um { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.d39-com-um .cc-card { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.d39-com-um .cc-mid { flex: 1 1 var(--mh, 240px); height: auto; min-height: min(var(--mh, 240px), 160px); }

/* ════════════════════════════════════════════════════════════
   Painéis (js/dashboard39-paineis.js): folha acessível — central/lateral
   no PC, de baixo no celular; atalhos com busca e editor; notificações;
   leitura do comunicado. Só transform/opacity no movimento.
   ════════════════════════════════════════════════════════════ */
.d39-fveu { position: fixed; inset: 0; z-index: 80; background: rgba(15, 23, 42, 0.32); opacity: 0; transition: opacity 200ms ease; }
.d39-fveu.is-leve { background: rgba(15, 23, 42, 0.08); }
html[data-tema="escuro"] .d39-fveu { background: rgba(0, 0, 0, 0.5); }
html[data-tema="escuro"] .d39-fveu.is-leve { background: rgba(0, 0, 0, 0.2); }
.d39-fveu.on { opacity: 1; }
.d39-folha {
  position: fixed; z-index: 81; display: flex; flex-direction: column; background: var(--el); color: var(--tx);
  box-shadow: var(--sombra-pop); opacity: 0; transition: opacity 200ms var(--ease-out), transform 260ms var(--ease-drawer); overscroll-behavior: contain;
}
.d39-folha.on { opacity: 1; transform: none; }
.d39-folha.is-centro { left: 50%; top: 50%; width: min(560px, calc(100vw - 32px)); max-height: min(720px, calc(100vh - 48px)); border-radius: 20px; transform: translate(-50%, -48%) scale(0.98); }
.d39-folha.is-centro.on { transform: translate(-50%, -50%); }
.d39-folha.is-centro.is-ancora { left: auto; top: 0; width: min(420px, calc(100vw - 24px)); max-height: min(640px, calc(100vh - 96px)); transform: translateY(-6px) scale(0.98); transform-origin: top right; border-radius: 18px; }
.d39-folha.is-centro.is-ancora.on { transform: none; }
.d39-folha.is-lado { top: 0; right: 0; bottom: 0; width: min(640px, 100vw); border-radius: 22px 0 0 22px; transform: translateX(24px); }
.d39-folha.is-baixo { left: 0; right: 0; bottom: 0; max-height: 92vh; border-radius: 22px 22px 0 0; transform: translateY(40px); padding-bottom: env(safe-area-inset-bottom); }
.d39-f-ler.is-baixo { height: 92vh; }
.d39-falca { display: grid; place-items: center; height: 22px; flex: none; touch-action: none; cursor: grab; }
.d39-falca i { width: 38px; height: 5px; border-radius: 999px; background: var(--ln2); }
.d39-fcab { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px 20px; flex: none; touch-action: none; }
.d39-folha.is-baixo .d39-fcab { padding-top: 2px; }
.d39-fcab h2 { flex: 1; min-width: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.d39-ffechar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--tx2); background: var(--fill); flex: none; }
.d39-flk { font-size: 13px; font-weight: 600; color: var(--link) !important; padding: 6px 8px; border-radius: 8px; white-space: nowrap; }
.d39-fcorpo { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 20px 16px; -webkit-overflow-scrolling: touch; }
.d39-frod { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--ln); flex: none; }
.d39-fesp { flex: 1; }
.d39-fbtn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 600; font-size: 14px; background: var(--fill); color: var(--tx) !important; }
.d39-fbtn.is-prim { background: var(--azul); color: #fff !important; }
.d39-fbtn.is-sec { background: var(--fill); }
.d39-fbtn:disabled { opacity: 0.6; }
.d39-fsec { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tx2); margin: 14px 0 6px; }
.d39-fsub { font-size: 12.5px; font-weight: 600; color: var(--tx2); margin: 12px 0 4px; }
.d39-fnada { color: var(--tx2); padding: 18px 4px; text-align: center; }
.d39-fbusca { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 12px; background: var(--fill); color: var(--tx2); position: sticky; top: 0; z-index: 1; margin-bottom: 4px; box-shadow: 0 6px 10px -8px var(--el); }
.d39-folha .d39-fbusca input[type="search"] {
  flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0 !important; border-radius: 0; background: transparent !important; box-shadow: none !important;
  outline: none !important; font: inherit; font-size: 16px; color: var(--tx); -webkit-appearance: none; appearance: none;
}
.d39-folha .d39-fbusca input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.d39-fbusca:focus-within { box-shadow: 0 0 0 2px var(--azul); }
.d39-arow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 8px; border-radius: 12px; color: var(--tx) !important; text-align: left; }
.d39-arow[hidden] { display: none; }
.d39-arow.is-ativo, .d39-arow:focus-visible { background: var(--azul-l); outline: none; }
@media (hover: hover) and (pointer: fine) { .d39-arow:hover { background: var(--fill); } }
.d39-aic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--azul-l); color: var(--link); flex: none; }
.d39-aic svg { width: 18px; height: 18px; }
.d39-atx { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.d39-atx b { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d39-atx small { color: var(--tx2); font-size: 12.5px; }
section[data-f="sec"][hidden] { display: none; }
/* editor de atalhos */
.d39-f-ed.is-centro { width: min(860px, calc(100vw - 32px)); }
.d39-ed { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.d39-folha.is-baixo .d39-ed { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.d39-ed-dica { color: var(--tx2); font-size: 12.5px; margin: -2px 0 8px; }
.d39-ed-lista { display: flex; flex-direction: column; gap: 6px; list-style: none; margin: 0; padding: 0; }
.d39-ed-it { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 6px; border-radius: 12px; background: var(--card); box-shadow: 0 0 0 1px var(--ln); user-select: none; -webkit-user-select: none; }
.d39-ed-it.is-arrastando { box-shadow: 0 0 0 2px var(--azul), 0 10px 24px rgba(15, 23, 42, 0.18); position: relative; z-index: 2; }
@media (pointer: fine) { .d39-ed-it { cursor: grab; } .d39-ed-it.is-arrastando { cursor: grabbing; } }
.d39-ed-alca { width: 32px; height: 44px; display: grid; place-items: center; color: var(--tx2); border-radius: 8px; flex: none; touch-action: none; cursor: grab; }
.d39-ed-b { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--tx2); flex: none; }
.d39-ed-b:disabled { opacity: 0.3; }
.d39-ed-b.is-tirar { color: var(--verm); }
@media (hover: hover) and (pointer: fine) { .d39-ed-b:not(:disabled):hover, .d39-ed-alca:hover { background: var(--fill); } }
.d39-ed-vazio { color: var(--tx2); padding: 16px 8px; }
.d39-ed-mk { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--tx2); flex: none; }
.d39-arow.is-add[aria-pressed="true"] .d39-ed-mk { background: var(--verde-l); color: var(--verde); }
.dz-atl-ed { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--tx2) !important; background: var(--fill); margin-left: 2px; }
.dz-atl-ed svg { color: currentColor !important; }
/* notificações */
.d39-f-notif .d39-fcorpo { padding: 0 10px 10px; }
.d39-n-filtros { display: flex; gap: 6px; overflow-x: auto; padding: 0 10px 8px; scrollbar-width: none; flex: none; }
.d39-n-filtros[hidden] { display: none; }
.d39-chip { flex: none; min-height: 34px; padding: 0 12px; border-radius: 999px; background: var(--fill); color: var(--tx2); font-weight: 600; font-size: 13px; white-space: nowrap; }
.d39-chip[aria-pressed="true"] { background: var(--azul); color: #fff; }
.d39-chip b { font-weight: 700; margin-left: 2px; }
.d39-f-notif .d39-fsec { margin: 12px 10px 4px; }
.d39-n-it { position: relative; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 30px 8px 10px; border-radius: 14px; color: var(--tx) !important; }
@media (hover: hover) and (pointer: fine) { .d39-n-it:hover { background: var(--fill); } }
.d39-n-it:focus-visible { outline: 2px solid var(--azul); outline-offset: -2px; }
.d39-n-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.d39-n-tx { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.d39-n-tx b { font-weight: 600; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.d39-n-it:not(.is-nova) .d39-n-tx b { font-weight: 500; color: var(--tx3); }
.d39-n-tx small { color: var(--tx2); font-size: 12.5px; }
.d39-n-ponto { position: absolute; right: 12px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--azul); }
.d39-n-mais { width: calc(100% - 20px); margin: 8px 10px 4px; }
.d39-n-carr { color: var(--tx2); padding: 24px 10px; text-align: center; }
.d39-n-vazio { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 30px 20px 26px; color: var(--tx2); }
.d39-n-vazio b { color: var(--tx); font-size: 16px; }
.d39-n-vazio p { max-width: 280px; font-size: 13.5px; line-height: 1.45; }
.d39-n-vic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--azul-l); color: var(--link); margin-bottom: 6px; }
/* leitura do comunicado */
.d39-f-ler .d39-fcorpo { padding: 0 24px 24px; }
.d39-ler .cc-card { background: none; box-shadow: none; padding: 0; }
.d39-ler .cc-mid { max-height: 60vh; }
.d39-ler-painel { margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: var(--fill); }
.d39-ler-pcab { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.d39-ler-pcab small { color: var(--tx2); font-size: 12.5px; }
.d39-ler-todos { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-weight: 600; color: var(--link) !important; min-height: 44px; }
/* o título e o texto do cartão no dashboard abrem a leitura */
.d39-com .cc-titulo, .d39-com .cc-texto { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .d39-folha, .d39-fveu { transition: opacity 120ms linear; transform: none !important; } .d39-folha.is-centro { transform: translate(-50%, -50%) !important; } .d39-folha.is-centro.is-ancora { transform: none !important; } }
/* (a ordem importa: a folha aberta não fica deslocada) */
.d39-folha.is-lado.on, .d39-folha.is-baixo.on { transform: none; }
/* botões das folhas sem a borda padrão do site */
.d39-folha :where(button) { border: 0; font-family: inherit; line-height: 1.2; cursor: pointer; }
.d39-folha :where(button):focus-visible, .d39-folha a:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
.dz-atl-ed { border: 0; }
/* celular: a comparação inteira ("vs ontem neste horário") quebra linha em vez de cortar */
.d39-kpis.is-carrossel .dz-kpi .dz-delta { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.3; }
/* fundos sempre dos tokens (o estilo global de <button> do site deixava as linhas e
   os botões subir/descer/tirar cinza-claros no tema escuro) */
.d39-folha .d39-arow, .d39-folha .d39-ed-b, .d39-folha .d39-ed-alca { background: transparent; color: var(--tx2); }
.d39-folha .d39-arow { color: var(--tx) !important; }
.d39-folha .d39-arow.is-add { background: transparent; box-shadow: inset 0 0 0 1px var(--ln); margin-bottom: 6px; }
.d39-folha .d39-arow.is-add[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--ln2); }
.d39-folha .d39-arow.is-add:disabled { opacity: 0.45; cursor: not-allowed; }
.d39-folha .d39-ed-b.is-tirar { color: var(--verm); }
.d39-folha .d39-ed-it { background: var(--card); }
html[data-tema="escuro"] .d39-folha .d39-ed-it { background: var(--fill); box-shadow: 0 0 0 1px var(--ln2); }
html[data-tema="escuro"] .d39-folha .d39-ed-b.is-tirar { color: #ff8a8a; }
html[data-tema="escuro"] .d39-folha .d39-ed-mk { background: var(--fill2); color: var(--tx3); }
@media (hover: hover) and (pointer: fine) { .d39-folha .d39-arow.is-add:not(:disabled):hover, .d39-folha .d39-ed-b:not(:disabled):hover, .d39-folha .d39-ed-alca:hover { background: var(--fill); } }
html[data-tema="escuro"] .d39-folha .d39-arow.is-add:not(:disabled):hover { background: var(--fill2); }
.d39-ed-limite { margin: -2px 0 8px; padding: 8px 10px; border-radius: 10px; background: var(--lar-l); color: var(--lar); font-size: 13px; font-weight: 600; }
.d39-ed-limite[hidden] { display: none; }
.d39-atl-vazio { color: var(--tx2); font-size: 14px; padding: 4px 2px 2px; }
html[data-tema="escuro"] .d39-folha .d39-fbtn:not(.is-prim), html[data-tema="escuro"] .d39-folha .d39-ffechar, html[data-tema="escuro"] .d39-folha .d39-chip:not([aria-pressed="true"]), html[data-tema="escuro"] .d39-folha .d39-fbusca { background: var(--fill2); }

/* ── Etapa 4b da Agenda: mídia do evento no Próximo compromisso e na
   Agenda dos próximos dias (agenda-midia.css tem a fileira/YouTube) ── */
.d39-prox-midia { margin-top: 12px; }
.d39-prox-mid-h { flex: none; display: flex; align-items: center; }
.d39-prox-mid-h .agm-resumo { margin-top: 0; }
.d39-ag-mid { flex: none; display: inline-flex; gap: 3px; margin-left: 6px; align-self: center; }
.d39-ag-it-mid { padding-right: 4px; }
.d39-ag-lk { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: inherit; border-radius: 10px; }
.d39-ag-lk:focus-visible { outline: 2px solid var(--azul, #2563eb); outline-offset: 2px; }
.d39-ag-mid-it {
  position: relative; width: 32px; height: 32px; border-radius: 8px; overflow: hidden; background: var(--fill); cursor: zoom-in;
  box-shadow: inset 0 0 0 1px var(--ln2); padding: 0; border: 0; flex: none; touch-action: manipulation;
  transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
}
.d39-ag-mid-it:active { transform: scale(0.94); }
.d39-ag-mid-it:focus-visible { outline: 2px solid var(--azul, #2563eb); outline-offset: 2px; }
@media (pointer: coarse) { .d39-ag-mid-it { width: 40px; height: 40px; } }
.d39-ag-mid-it img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.d39-ag-mid-it i { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, 0.28); }
@media (max-width: 420px) { .d39-ag-mid-it:nth-child(2) { display: none; } }
