/* ============================================================
   Pack Less — App Prototype
   Design tokens derivados do branding visual (v2)
   ============================================================ */

:root {
  /* Cores de marca (Pack Less Desenvolvimento e Inova&ccedil;&atilde;o) */
  --pl-blue:        #1E4189;   /* Azul Pack — primaria (manual de marca v2.0) */
  --pl-blue-navy:   #142E66;   /* Azul Navy — hover/profundidade (manual) */
  --pl-blue-soft:   #E5EDF7;
  --pl-blue-sky:    #7AAED8;   /* azul claro do gradiente do logo */
  --pl-green:       #FFFFFF;   /* Branco (era Verde Pack) */
  --pl-green-lime:  #FFFFFF;   /* Branco (era Verde Lima) */
  --pl-green-dark:  #FFFFFF;   /* Branco (era Verde Escuro) */
  --pl-green-soft:  #FFFFFF;

  /* Neutros */
  --pl-charcoal:    #1A1A1A;
  --pl-gray-900:    #2B2F33;
  --pl-gray-700:    #5C6B73;
  --pl-gray-600:    #63707A;   /* interpolado 500↔700 — era usado sem estar definido */
  --pl-gray-500:    #6B7680;   /* AA: ~4.6:1 em texto secundario (era #8B96A0 ~3:1) */
  --pl-gray-400:    #9AA3AB;   /* interpolado 300↔500 — era usado sem estar definido */
  --pl-gray-300:    #C8CFD4;
  --pl-gray-200:    #E0E2DE;
  --pl-gray-100:    #EEF0EC;
  --pl-bg:          #F5F7F2;
  --pl-white:       #FFFFFF;
  --pl-on-accent:   #FFFFFF;   /* texto sobre fundo colorido fixo (azul/verde) — NÃO inverte no tema escuro */
  --pl-blue-text:   #1E4189;   /* azul usado como TEXTO/ícone — clareia no dark p/ contraste (NÃO usar como fundo) */
  --pl-danger-dark: #C0392B;   /* vermelho usado como TEXTO — clareia no dark p/ contraste (gêmeo de --pl-green-dark/--pl-warning-dark) */

  /* Estados */
  --pl-success:     #FFFFFF;
  --pl-warning:     #E5A823;
  --pl-warning-soft:#FBF1D9;
  --pl-warning-dark:#92691A;   /* âmbar p/ TEXTO (contraste AA em fundo claro) — par do -soft */
  --pl-danger:      #C0392B;
  --pl-danger-soft: #F8E0DC;
  --pl-info:        #1E4189;
  --pl-info-soft:   #E8EDF8;

  /* Radius */
  --pl-r-sm: 4px;
  --pl-r-md: 6px;
  --pl-r-lg: 8px;
  --pl-r-xl: 12px;
  --pl-r-pill: 999px;

  /* Sombras */
  --pl-shadow-sm: 0 1px 2px rgba(20, 46, 102, 0.06);
  --pl-shadow:    0 2px 6px rgba(20, 46, 102, 0.08);
  --pl-shadow-lg: 0 8px 24px rgba(20, 46, 102, 0.12);

  /* Tipografia */
  --pl-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Layout */
  --pl-sidebar-w: 240px;
  --pl-topbar-h:  64px;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--pl-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--pl-charcoal);
  background: var(--pl-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

/* ============================================================
   Layout — Sidebar + Main
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: var(--pl-sidebar-w) 1fr;
  min-height: 100vh;
}

/* ----- Sidebar ----- */
.sidebar {
  background: var(--pl-white);
  border-right: 1px solid var(--pl-gray-200);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  padding: 20px 24px;
  border-bottom: 1px solid var(--pl-gray-200);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-brand img { width: 36px; height: 36px; }
.sidebar-brand .brand-name {
  font-weight: 800;
  font-size: 16px;
  color: var(--pl-blue);
  letter-spacing: -0.2px;
}
.sidebar-brand .brand-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pl-gray-500);
  margin-top: 2px;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  overflow-y: auto;
}
.sidebar-nav-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--pl-gray-500);
  font-weight: 600;
  padding: 12px 12px 6px;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--pl-r-md);
  color: var(--pl-gray-700);
  font-weight: 500;
  margin-bottom: 2px;
  position: relative;
  transition: background 120ms, color 120ms;
}
.sidebar-nav a:hover {
  background: var(--pl-gray-100);
  color: var(--pl-charcoal);
}
.sidebar-nav a.active {
  background: var(--pl-blue-soft);
  color: var(--pl-blue);
  font-weight: 600;
}
.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--pl-green-lime);
  border-radius: 0 3px 3px 0;
}
.sidebar-nav a .nav-count {
  margin-left: auto;
  background: var(--pl-gray-200);
  color: var(--pl-gray-700);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--pl-r-pill);
}
.sidebar-nav a.active .nav-count {
  background: var(--pl-blue);
  color: var(--pl-white);
}

.sidebar-user {
  padding: 16px;
  border-top: 1px solid var(--pl-gray-200);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user .avatar {
  width: 36px; height: 36px;
  min-width: 36px;
  background: var(--pl-blue);
  color: var(--pl-white);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  aspect-ratio: 1;
}
.sidebar-user {
  cursor: pointer;
  transition: background 120ms;
}
.sidebar-user:hover { background: var(--pl-bg); }
.sidebar-user .flex-1 { min-width: 0; overflow: hidden; }
.sidebar-user .name,
.sidebar-user .email {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user .name { font-weight: 600; font-size: 13px; }
.sidebar-user .email { font-size: 11px; color: var(--pl-gray-500); }
.sidebar-user .logout {
  background: transparent;
  border: none;
  padding: 4px;
  border-radius: var(--pl-r-sm);
  color: var(--pl-gray-500);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.sidebar-user .logout:hover { color: var(--pl-danger); background: var(--pl-danger-soft); }

/* ----- Main ----- */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: var(--pl-topbar-h);
  background: var(--pl-white);
  border-bottom: 1px solid var(--pl-gray-200);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.3px;
}
.topbar .breadcrumb {
  color: var(--pl-gray-500);
  font-size: 13px;
}
.topbar-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.content {
  padding: 32px;
  max-width: 1400px;
}

/* ============================================================
   Navegação mobile — a barra lateral vira gaveta (drawer) ≤900px.
   Técnicos/gestores 40+ usam no celular; antes a sidebar fixa de
   240px engolia a tela e não havia como recolhê-la (princípio #9).
   O botão hambúrguer é injetado pelo app.js (.nav-toggle).
   ============================================================ */
.nav-toggle { display: none; }      /* escondido no desktop */
.sidebar-backdrop { display: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }   /* uma coluna no celular */

  .sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: 264px;
    max-width: 84vw;
    transform: translateX(-100%);
    transition: transform 200ms ease;
    z-index: 60;
    box-shadow: var(--pl-shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 46, 102, 0.45);
    z-index: 50;
  }
  .sidebar-backdrop.show { display: block; }

  body.nav-locked { overflow: hidden; }  /* trava o scroll do fundo com a gaveta aberta */

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-height: 44px;
    margin-left: -8px;
    border: none;
    background: transparent;
    border-radius: var(--pl-r-md);
    color: var(--pl-charcoal);
    flex-shrink: 0;
  }
  .nav-toggle:hover { background: var(--pl-gray-100); }
  .nav-toggle .icon { width: 24px; height: 24px; }

  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
}

/* ============================================================
   Tipografia
   ============================================================ */
.h-display {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--pl-blue);
  line-height: 1.15;
}
.h-display em {
  font-style: italic;
  color: var(--pl-green);
  font-weight: 800;
}
h2 { font-size: 18px; font-weight: 700; margin: 0; letter-spacing: -0.2px; }
h3 { font-size: 15px; font-weight: 700; margin: 0; }
.muted { color: var(--pl-gray-500); }
.label-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
  color: var(--pl-green-dark);
}

/* ============================================================
   Botoes
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--pl-r-lg);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  background: var(--pl-white);
  color: var(--pl-charcoal);
  transition: background 120ms, border-color 120ms, transform 80ms;
}
.btn:hover { background: var(--pl-gray-100); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--pl-blue);
  color: var(--pl-on-accent);   /* fundo azul é fixo nos dois temas → texto sempre branco */
  border-color: var(--pl-blue);
  min-height: 48px;
  padding: 11px 22px;
}
.btn-primary:hover { background: var(--pl-blue-navy); border-color: var(--pl-blue-navy); }

.btn-success {
  background: var(--pl-green-dark);   /* AA: branco s/ verde-escuro (#5C9128) vs verde claro reprovava ~2,4:1 */
  color: var(--pl-white);
  border-color: var(--pl-green-dark);
  min-height: 48px;
  padding: 11px 22px;
}
.btn-success:hover { background: #4F7D22; border-color: #4F7D22; }

.btn-outline {
  background: var(--pl-white);
  color: var(--pl-blue);
  border-color: var(--pl-blue);
}
.btn-outline:hover { background: var(--pl-blue-soft); }

.btn-ghost {
  background: transparent;
  color: var(--pl-gray-700);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--pl-gray-100); color: var(--pl-charcoal); }

.btn-danger {
  background: var(--pl-white);
  color: var(--pl-danger);
  border-color: var(--pl-gray-200);
}
.btn-danger:hover { background: var(--pl-danger-soft); border-color: var(--pl-danger); }

.btn-sm { min-height: 36px; padding: 7px 12px; font-size: 13px; }
.btn-icon {
  width: 44px; height: 44px;
  min-height: 44px;
  padding: 0;
  justify-content: center;
}

/* ----- Estado de carregamento / desabilitado (anti-duplo-clique) ----- */
.btn:disabled, .btn.is-loading { opacity: 0.65; cursor: not-allowed; }
.btn.is-loading { cursor: progress; }
.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  animation: pl-spin 600ms linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation-duration: 1.6s; }
}

/* Botão vermelho sólido — usado no confirmar de ações destrutivas */
.btn-danger-solid {
  background: var(--pl-danger);
  color: var(--pl-white);
  border-color: var(--pl-danger);
}
.btn-danger-solid:hover { background: #9C2B1F; border-color: #9C2B1F; }

/* ============================================================
   Modal de confirmação (PL.confirm) — substitui o confirm() nativo
   ============================================================ */
.pl-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 46, 102, 0.45);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pl-modal {
  background: var(--pl-white);
  border-radius: var(--pl-r-xl);
  box-shadow: var(--pl-shadow-lg);
  max-width: 460px;
  width: 100%;
  padding: 24px;
}
.pl-modal-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--pl-charcoal);
}
.pl-modal-body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--pl-gray-700);
  margin-bottom: 22px;
  white-space: pre-line;   /* respeita quebras de linha da mensagem */
}
.pl-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
@media (max-width: 480px) {
  .pl-modal-actions { flex-direction: column-reverse; }   /* no celular, empilha: confirmar em cima do polegar */
  .pl-modal-actions .btn { width: 100%; }
}
/* Campo de entrada do PL.prompt */
.pl-modal-field { display: block; margin-bottom: 22px; }
.pl-modal-label { display: block; font-size: 14px; font-weight: 600; color: var(--pl-gray-700); margin-bottom: 6px; }
.pl-modal-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--pl-gray-300);
  border-radius: var(--pl-r-md);
  font-size: 16px;
  outline: none;
}
.pl-modal-input:focus { border-color: var(--pl-blue); box-shadow: 0 0 0 3px var(--pl-blue-soft); }

/* ---- Aviso + popup "a Polly atualizou seu briefing" (PL.styleNotice) ----
   O autoaprendizado grava sozinho; este aviso é o que impede virar caixa-preta.
   Fica fixo no rodapé, acima do balão da Polly, até o cliente revisar. */
.pl-style-notice {
  position: fixed;
  /* ANCORADO À ESQUERDA, não no canto inferior direito: aquele canto já é disputado
     por .help-fab (bottom 24, z100), .pl-polly-bubble (bottom 96, z795),
     .help-panel (bottom 96) e .toast-container (bottom 24, z1000) — o balão da Polly
     (z795) cobriria este aviso (z190). Aqui, ao lado da sidebar, o espaço é livre. */
  left: calc(var(--pl-sidebar-w, 92px) + 20px);
  bottom: 24px;
  z-index: 190;                 /* abaixo do modal (200) */
  max-width: min(420px, calc(100vw - var(--pl-sidebar-w, 92px) - 40px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  /* Acento ÂMBAR (não o --pl-blue): no tema Polaris o "azul" é cinza de propósito
     (design monocromático), e a barra de destaque sumiria. Âmbar = "pendente de
     revisão" e existe com cor viva nos dois temas. */
  border-left: 4px solid var(--pl-warning);
  border-radius: var(--pl-r-lg, 12px);
  box-shadow: var(--pl-shadow-lg);
  cursor: pointer;
}
.pl-style-notice:hover { border-color: var(--pl-warning); }
.pl-sn-ico { color: var(--pl-warning); flex: 0 0 auto; display: flex; }
.pl-sn-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.pl-sn-txt b { font-size: 13px; color: var(--pl-charcoal); }
.pl-sn-txt span {
  font-size: 12px; color: var(--pl-gray-600);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pl-sn-x {
  flex: 0 0 auto; background: none; border: 0; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--pl-gray-500); padding: 0 2px;
}
.pl-sn-x:hover { color: var(--pl-charcoal); }

/* popup de revisão: mais largo que o modal padrão (mostra textos longos) */
.pl-modal-wide { max-width: 640px; max-height: 86vh; display: flex; flex-direction: column; }
.pl-modal-wide .pl-modal-body { overflow-y: auto; }
.pl-sn-sub { font-size: 13px; color: var(--pl-gray-600); margin: 0 0 14px; }
.pl-sn-field { margin-bottom: 18px; }
.pl-sn-field label {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--pl-charcoal); margin-bottom: 6px;
}
.pl-sn-field textarea {
  width: 100%; padding: 10px 12px; font-size: 14px; line-height: 1.5;
  /* background/color EXPLÍCITOS: sem eles o textarea cai no padrão do navegador
     (fundo BRANCO) dentro do modal escuro, com o texto herdado em cinza-claro —
     fica ilegível. Os tokens acompanham o tema (claro e escuro). */
  background: var(--pl-white);
  color: var(--pl-charcoal);
  border: 1px solid var(--pl-gray-300); border-radius: var(--pl-r-md);
  font-family: inherit; resize: vertical; outline: none;
}
.pl-sn-field textarea::placeholder { color: var(--pl-gray-500); }
/* Foco: --pl-blue é cinza no tema Polaris e o anel sumiria — usa o mesmo âmbar do aviso. */
.pl-sn-field textarea:focus {
  border-color: var(--pl-gray-500);
  box-shadow: 0 0 0 3px rgba(245, 180, 84, 0.22);
}
/* O .btn-outline do tema fica em ~2.5:1 sobre a superfície escura (ilegível). Sobe o
   contraste APENAS dentro deste popup, sem mexer no botão global do app. */
.pl-sn-actions .btn-outline { color: var(--pl-charcoal); border-color: var(--pl-gray-500); }
.pl-sn-before { margin-top: 6px; }
.pl-sn-before summary {
  font-size: 12px; color: var(--pl-gray-600); cursor: pointer; user-select: none;
}
/* Painel do "antes": no tema escuro o --pl-gray-100 (#1A1A1D) é quase idêntico à
   superfície do modal (#1A1A1E) e o bloco sumiria. A BORDA é o que garante que ele
   se leia como um painel embutido nos dois temas — não confiar só no fundo. */
.pl-sn-before-txt {
  font-size: 12px; color: var(--pl-gray-600); margin-top: 6px;
  padding: 8px 10px; background: var(--pl-gray-100);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md); white-space: pre-wrap;
}
.pl-sn-actions { align-items: center; }
/* ≤900px a sidebar sai da tela: o aviso ocupa a largura, mas RESERVA o canto
   direito (right:92px) para não passar por baixo do FAB da Polly (24px + 56px). */
@media (max-width: 900px) {
  .pl-style-notice { left: 12px; right: 92px; bottom: 12px; max-width: none; }
}
@media (max-width: 480px) {
  .pl-sn-actions { flex-direction: column-reverse; align-items: stretch; }
  .pl-sn-actions .flex-1 { display: none; }
}

/* Ícone de ajuda (?) ao lado de labels não óbvios — reusa o tooltip de .term
   (aparece no hover no desktop e no foco/toque no celular, pois é focável). */
.field-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  padding: 0;
  border: 1px solid var(--pl-gray-300);
  border-radius: 50%;
  background: var(--pl-gray-100);
  color: var(--pl-gray-700);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
  margin-left: 5px;
}
.field-help:hover { background: var(--pl-blue-soft); color: var(--pl-blue); border-color: var(--pl-blue-sky); }
.field-help:focus-visible { outline: 2px solid var(--pl-blue); outline-offset: 1px; }

/* ============================================================
   Skeleton loading — aplique .skeleton (e .skeleton-line) nos blocos
   enquanto a lista/tabela carrega, em vez de tela em branco (Tier 3).
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--pl-gray-100) 25%, var(--pl-gray-200) 37%, var(--pl-gray-100) 63%);
  background-size: 200% 100%;
  animation: pl-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--pl-r-md);
  color: transparent !important;
  user-select: none;
}
.skeleton-line { height: 14px; margin: 8px 0; }
.skeleton-line.sk-60 { width: 60%; }
.skeleton-line.sk-40 { width: 40%; }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* ============================================================
   Cards / Surfaces
   ============================================================ */
.card {
  background: var(--pl-white);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--pl-r-lg);
  padding: 20px;
  box-shadow: var(--pl-shadow-sm);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}

/* Stats row */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--pl-green-lime);
}
.stat .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--pl-gray-500);
  font-weight: 600;
}
.stat .value {
  font-size: 26px;
  font-weight: 800;
  color: var(--pl-blue);
  letter-spacing: -0.5px;
  margin-top: 4px;
}
.stat .delta {
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  color: var(--pl-green-dark);
}
.stat .delta.down { color: var(--pl-danger); }

/* ============================================================
   Badges / Tags
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--pl-r-pill);
  background: var(--pl-gray-100);
  color: var(--pl-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.novo      { background: var(--pl-info-soft);    color: var(--pl-info); }
.badge.contatado { background: var(--pl-warning-soft); color: #92691A; }
.badge.respondeu { background: var(--pl-green-soft);   color: var(--pl-green-dark); }
.badge.convertido{ background: var(--pl-green); color: var(--pl-white); }
.badge.perdido   { background: var(--pl-danger-soft);  color: var(--pl-danger); }

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--pl-r-sm);
  background: var(--pl-gray-100);
  color: var(--pl-gray-700);
}

/* ============================================================
   Tabela de leads
   ============================================================ */
.table-card {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  /* tabelas largas (ex.: leads) rolam dentro do card em vez de estourar a pagina */
  overflow-x: auto;
  overflow-y: hidden;
}
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--pl-gray-200);
  background: var(--pl-white);
}
.table-toolbar .search {
  flex: 1;
  max-width: 360px;
  position: relative;
}
.table-toolbar input[type="search"] {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  background: var(--pl-bg);
  outline: none;
  transition: border-color 120ms, background 120ms;
}
.table-toolbar input[type="search"]:focus {
  border-color: var(--pl-blue);
  background: var(--pl-white);
}
.table-toolbar .search::before {
  content: '';
  position: absolute;
  left: 10px; top: 50%;
  width: 16px; height: 16px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C6B73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--pl-gray-700);
  background: var(--pl-white);
  cursor: pointer;
}
.filter-chip:hover { border-color: var(--pl-blue); color: var(--pl-blue); }
/* bandeira do pais nos chips de filtro (imagem; emoji de bandeira nao renderiza no Windows) */
.chip-flag {
  width: 16px;
  height: 12px;
  border-radius: 2px;
  object-fit: cover;
  margin-right: 2px;
  vertical-align: -1px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}
.filter-chip.active {
  background: var(--pl-blue);
  border-color: var(--pl-blue);
  color: var(--pl-white);
}

table.leads {
  width: 100%;
  border-collapse: collapse;
}
table.leads th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--pl-gray-500);
  font-weight: 600;
  padding: 12px 20px;
  background: var(--pl-bg);
  border-bottom: 1px solid var(--pl-gray-200);
}
table.leads td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--pl-gray-100);
  vertical-align: middle;
}
table.leads tr:hover td { background: var(--pl-bg); }

.lead-cell { display: flex; align-items: center; gap: 12px; }
.lead-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--pl-blue-soft);
  color: var(--pl-blue);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.lead-avatar.g { background: var(--pl-green-soft); color: var(--pl-green-dark); }
.lead-avatar.n { background: var(--pl-blue-navy); color: var(--pl-white); }

.lead-name { font-weight: 600; }
.lead-role { font-size: 12px; color: var(--pl-gray-500); }

.row-actions {
  display: flex;
  gap: 6px;
  opacity: 0.4;
  transition: opacity 120ms;
}
tr:hover .row-actions { opacity: 1; }

/* ============================================================
   Composer
   ============================================================ */
.composer-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}
.lead-panel { position: sticky; top: calc(var(--pl-topbar-h) + 32px); }

.lead-profile {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  overflow: hidden;
}
.lead-profile-cover {
  height: 84px;
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  position: relative;
  overflow: hidden;
}
.lead-profile-cover::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 18' preserveAspectRatio='none'><path d='M0,18 L0,9 C18,15 32,3 50,8 C68,13 84,4 100,7 L100,18 Z' fill='%23A4CE3F'/></svg>");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.lead-profile-body {
  padding: 0 20px 20px;
  margin-top: -32px;
}
.lead-profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--pl-white);
  border: 4px solid var(--pl-white);
  color: var(--pl-blue);
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 800;
  box-shadow: var(--pl-shadow);
  background: var(--pl-blue-soft);
}
.lead-profile h3 { margin-top: 12px; font-size: 17px; }
.lead-profile .role { font-size: 13px; color: var(--pl-gray-700); margin-top: 2px; }
.lead-profile .company { font-size: 13px; color: var(--pl-blue); font-weight: 600; margin-top: 4px; }

.lead-fact {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--pl-gray-100);
  font-size: 13px;
}
.lead-fact:last-child { border-bottom: 0; }
.lead-fact .k { color: var(--pl-gray-500); }
.lead-fact .v { font-weight: 600; }

.ai-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: linear-gradient(90deg, var(--pl-blue) 0%, var(--pl-green-dark) 100%);
  color: var(--pl-white);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--pl-r-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.composer {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  overflow: hidden;
}
.composer-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--pl-gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.composer-fields { padding: 16px 20px; }
.composer-fields .field { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--pl-gray-100); }
.composer-fields .field:last-child { border-bottom: 0; }
.composer-fields label { font-size: 14px; text-transform: uppercase; color: var(--pl-gray-500); font-weight: 600; letter-spacing: 0.5px; width: 72px; }
.composer-fields input { flex: 1; border: none; outline: none; font-size: 14px; background: transparent; }

.composer-body {
  padding: 20px;
  min-height: 280px;
}
.composer-body textarea {
  width: 100%;
  min-height: 280px;
  border: none;
  outline: none;
  resize: vertical;
  font-size: 14px;
  line-height: 1.6;
  color: var(--pl-charcoal);
  font-family: inherit;
}

.composer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--pl-gray-200);
  background: var(--pl-bg);
  display: flex;
  align-items: center;
  gap: 8px;
}
.composer-footer .left { display: flex; gap: 8px; }
.composer-footer .right { margin-left: auto; display: flex; gap: 8px; }
/* Em telas estreitas o rodapé empilha e os botões (Copiar/Abrir/Enviar) dividem a largura. */
@media (max-width: 640px) {
  .composer-footer { flex-direction: column; align-items: stretch; }
  .composer-footer .right { margin-left: 0; }
  .composer-footer .right .btn { flex: 1 1 auto; justify-content: center; }
}

.ai-suggestions {
  background: var(--pl-blue-soft);
  border: 1px dashed var(--pl-blue);
  border-radius: var(--pl-r-md);
  padding: 14px 16px;
  margin: 16px 20px;
}
.ai-suggestions h4 {
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--pl-blue);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-suggestions ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--pl-gray-700); }
.ai-suggestions ul li { padding: 2px 0; }

/* ============================================================
   Inbox
   ============================================================ */
.inbox-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 0;
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  overflow: hidden;
  min-height: 70vh;
}
.thread-list { border-right: 1px solid var(--pl-gray-200); overflow-y: auto; }
.thread-list .thread {
  padding: 14px 18px;
  border-bottom: 1px solid var(--pl-gray-100);
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: background 120ms;
}
.thread-list .thread:hover { background: var(--pl-bg); }
.thread-list .thread.active { background: var(--pl-blue-soft); border-left: 3px solid var(--pl-green-lime); padding-left: 15px; }
.thread .preview { flex: 1; min-width: 0; }
.thread .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.thread .name { font-weight: 600; font-size: 13px; }
.thread .time { font-size: 11px; color: var(--pl-gray-500); }
.thread .snippet {
  font-size: 12px;
  color: var(--pl-gray-700);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}
.thread .meta { display: flex; gap: 6px; margin-top: 6px; }

.thread-view { display: flex; flex-direction: column; min-width: 0; }
.thread-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--pl-gray-200);
  display: flex;
  align-items: center;
  gap: 12px;
}
.thread-header .name { font-weight: 700; }
.thread-header .sub { font-size: 12px; color: var(--pl-gray-500); }

.thread-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--pl-bg);
}
.message {
  max-width: 70%;
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: var(--pl-shadow-sm);
}
.message .meta { font-size: 11px; color: var(--pl-gray-500); margin-top: 8px; }
.message.outgoing {
  align-self: flex-end;
  background: var(--pl-blue);
  color: var(--pl-white);
  border-color: var(--pl-blue);
}
.message.outgoing .meta { color: rgba(255,255,255,0.7); }

.thread-reply {
  padding: 16px 24px;
  border-top: 1px solid var(--pl-gray-200);
  background: var(--pl-white);
}
.thread-reply textarea {
  width: 100%;
  min-height: 80px;
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 10px 12px;
  resize: vertical;
  outline: none;
}
.thread-reply textarea:focus { border-color: var(--pl-blue); }
.thread-reply .actions { display: flex; gap: 8px; margin-top: 10px; align-items: center; }

/* ============================================================
   Campanhas
   ============================================================ */
.campaign-card {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.campaign-head { display: flex; align-items: flex-start; gap: 16px; }
.campaign-head .info { flex: 1; }
.campaign-head h3 { font-size: 16px; }
.campaign-head .audience { font-size: 12px; color: var(--pl-gray-500); margin-top: 4px; }
.campaign-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--pl-gray-100);
}
.metric .v { font-size: 20px; font-weight: 800; color: var(--pl-blue); letter-spacing: -0.3px; }
.metric .k { font-size: 11px; color: var(--pl-gray-500); text-transform: uppercase; letter-spacing: 0.5px; }

.sequence {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.step {
  flex: 1;
  min-width: 180px;
  background: var(--pl-bg);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 12px 14px;
  position: relative;
}
.step .when {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: var(--pl-green-dark);
}
.step .what { font-size: 13px; font-weight: 600; margin-top: 4px; }
.step .who  { font-size: 11px; color: var(--pl-gray-500); margin-top: 4px; }
.step + .step::before {
  content: '→';
  position: absolute;
  left: -14px; top: 50%;
  transform: translateY(-50%);
  color: var(--pl-gray-500);
  font-weight: 700;
}

/* ============================================================
   Setup
   ============================================================ */
.setup-hero {
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-white);
  padding: 40px;
  border-radius: var(--pl-r-lg);
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}
.setup-hero::after {
  content: '';
  position: absolute;
  right: -40px; bottom: -40px;
  width: 240px; height: 240px;
  background: var(--pl-green-lime);
  border-radius: 50%;
  opacity: 0.15;
}
.setup-hero h1 {
  font-size: 32px;
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: -0.6px;
}
.setup-hero h1 em { color: var(--pl-green-lime); font-style: italic; }
.setup-hero p { font-size: 15px; opacity: 0.9; max-width: 540px; margin: 0; }

.setup-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.step-card {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  padding: 24px;
  position: relative;
}
.step-card .step-num {
  position: absolute;
  top: -12px; left: 20px;
  background: var(--pl-blue);
  color: var(--pl-white);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--pl-shadow);
}
.step-card.done .step-num { background: var(--pl-green); }
.step-card h3 { margin-top: 8px; margin-bottom: 6px; font-size: 15px; }
.step-card .desc { font-size: 13px; color: var(--pl-gray-700); margin-bottom: 16px; }

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--pl-r-pill);
  background: var(--pl-gray-100);
  color: var(--pl-gray-700);
  margin-bottom: 12px;
}
.status-indicator.connected {
  background: var(--pl-green-soft);
  color: var(--pl-green-dark);
}
.status-indicator .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Briefing form */
.briefing {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  padding: 24px;
  margin-top: 24px;
}
.form-row { margin-bottom: 14px; }
.form-row label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--pl-gray-700);
  margin-bottom: 4px;
}
.form-row input, .form-row textarea, .form-row select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  outline: none;
  background: var(--pl-white);
  transition: border-color 120ms;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { border-color: var(--pl-blue); }
.form-row textarea { min-height: 100px; resize: vertical; line-height: 1.6; }

/* ============================================================
   Utility
   ============================================================ */
.row { display: flex; align-items: center; gap: 12px; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.stack { display: flex; flex-direction: column; }
.flex-1 { flex: 1; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.fw-700 { font-weight: 700; }
.text-blue { color: var(--pl-blue); }
.text-green { color: var(--pl-green-dark); }
.text-italic { font-style: italic; }
.divider { height: 1px; background: var(--pl-gray-200); margin: 16px 0; }

/* Icons inline svg style */
.icon { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-lg { width: 20px; height: 20px; }
.icon-sm { width: 14px; height: 14px; }

/* ============================================================
   Lead row clic&aacute;vel (tela Poss&iacute;veis Leads)
   ============================================================ */
table.leads tr.clickable { cursor: pointer; transition: background 120ms; }
table.leads tr.clickable td:last-child { color: var(--pl-gray-300); transition: color 120ms; }
table.leads tr.clickable:hover td { background: var(--pl-blue-soft); }
table.leads tr.clickable:hover td:last-child { color: var(--pl-blue); }

.ai-priority {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--pl-green-dark);
  background: var(--pl-green-soft);
  padding: 2px 6px;
  border-radius: var(--pl-r-sm);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-left: 6px;
}

.activity-snippet {
  font-size: 12px;
  color: var(--pl-gray-700);
  line-height: 1.4;
  max-width: 320px;
}
.activity-snippet em { color: var(--pl-charcoal); font-style: italic; }

/* Leads: colunas compactas para a tabela caber sem rolar nem cortar info.
   Nomes longos (LEAD/EMPRESA) truncam com reticencias; o sinal limita a 2 linhas. */
table.leads td:nth-child(1) { max-width: 215px; }   /* LEAD */
table.leads td:nth-child(2) { max-width: 205px; }   /* EMPRESA */
table.leads td:nth-child(5) { max-width: 180px; }   /* SINAL / MOTIVO */
table.leads .lead-cell > div:last-child { min-width: 0; }
table.leads .lead-name,
table.leads .lead-role,
table.leads td:nth-child(2) > div {
  max-width: 205px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table.leads .activity-snippet {
  max-width: 180px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   Tela Acompanhamento
   ============================================================ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--pl-gray-200);
  margin-bottom: 24px;
}
.tabs .tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  font-weight: 600;
  font-size: 14px;
  color: var(--pl-gray-700);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  position: relative;
  bottom: -1px;
  transition: color 120ms, border-color 120ms;
}
.tabs .tab:hover { color: var(--pl-charcoal); }
.tabs .tab.active {
  color: var(--pl-blue-text);
  border-bottom-color: var(--pl-green-lime);
}
.tabs .tab .count {
  background: var(--pl-gray-100);
  color: var(--pl-gray-700);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--pl-r-pill);
}
.tabs .tab.active .count {
  background: var(--pl-blue);
  color: var(--pl-on-accent);
}
.tabs .tab .dot-new {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--pl-warning);
  margin-left: 4px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.deep-card {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--pl-shadow-sm);
}
.deep-card-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--pl-gray-100);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.deep-card-head .lead-info { flex: 1; min-width: 0; }
.deep-card-head .lead-info .name { font-weight: 700; font-size: 14px; }
.deep-card-head .lead-info .meta { font-size: 12px; color: var(--pl-gray-700); margin-top: 2px; }
.deep-card-head .lead-info .company { font-size: 12px; color: var(--pl-blue-text); font-weight: 600; margin-top: 2px; }
.deep-card-head .status-stack { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }

.deep-section {
  padding: 12px 18px;
  border-bottom: 1px solid var(--pl-gray-100);
}
.deep-section:last-of-type { border-bottom: 0; }
.deep-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  color: var(--pl-gray-500);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.deep-section-label .label-icon { color: var(--pl-blue); }

.exchange {
  font-size: 12.5px;
  line-height: 1.5;
  padding: 8px 0;
  border-left: 2px solid var(--pl-gray-200);
  padding-left: 12px;
  margin-bottom: 6px;
}
.exchange.you { border-color: var(--pl-blue); }
.exchange.them { border-color: var(--pl-green); }
.exchange .who {
  font-size: 11px;
  font-weight: 700;
  color: var(--pl-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.exchange.you .who { color: var(--pl-blue); }
.exchange.them .who { color: var(--pl-green-dark); }
.exchange .text {
  color: var(--pl-gray-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}
.exchange .when { font-size: 11px; color: var(--pl-gray-500); margin-top: 2px; }

.engagement {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  font-size: 11px;
}
.engagement .item {
  background: var(--pl-bg);
  padding: 8px 10px;
  border-radius: var(--pl-r-sm);
  text-align: center;
}
.engagement .item .v {
  font-size: 16px;
  font-weight: 800;
  color: var(--pl-blue);
}
.engagement .item .k {
  color: var(--pl-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
  font-size: 9.5px;
  margin-top: 2px;
}

.next-step {
  background: linear-gradient(90deg, var(--pl-blue-soft) 0%, transparent 100%);
  border-radius: var(--pl-r-md);
  padding: 10px 12px;
  border-left: 3px solid var(--pl-green-lime);
  font-size: 12.5px;
  line-height: 1.45;
}
.next-step .ai-tag {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--pl-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.next-step .text { color: var(--pl-charcoal); }

.deep-card-footer {
  padding: 12px 18px;
  background: var(--pl-bg);
  border-top: 1px solid var(--pl-gray-100);
  display: flex;
  gap: 8px;
  align-items: center;
}
.deep-card-footer .btn { flex: 1; justify-content: center; }

/* ============================================================
   Profile tabs (dentro do composer)
   ============================================================ */
.profile-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--pl-gray-200);
  padding: 0 12px;
  margin-top: 14px;
}
.ptab {
  background: transparent;
  border: none;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pl-gray-700);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  position: relative;
  bottom: -1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 120ms, border-color 120ms;
}
.ptab:hover { color: var(--pl-charcoal); }
.ptab.active {
  color: var(--pl-blue);
  border-bottom-color: var(--pl-green-lime);
}

.ptab-content { display: none; padding: 16px 20px 4px; }
.ptab-content.active { display: block; }

/* IA Insights */
.insight-score {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-white);
  padding: 14px 16px;
  border-radius: var(--pl-r-md);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.insight-score::after {
  content: '';
  position: absolute;
  right: -30px; bottom: -30px;
  width: 100px; height: 100px;
  background: var(--pl-green-lime);
  border-radius: 50%;
  opacity: 0.18;
}
.insight-score .score-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--pl-green-lime);
  color: var(--pl-blue-navy);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
  flex-shrink: 0;
  z-index: 1;
}
.insight-score .score-meta { flex: 1; z-index: 1; }
.insight-score .score-meta .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.85;
  font-weight: 700;
}
.insight-score .score-meta .verdict {
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
}

.insight-block {
  padding: 12px 0;
  border-bottom: 1px solid var(--pl-gray-100);
}
.insight-block:last-child { border-bottom: 0; padding-bottom: 4px; }
.insight-block-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 700;
  color: var(--pl-gray-500);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.insight-block-label .ico { color: var(--pl-blue); }
.insight-figure {
  font-size: 22px;
  font-weight: 800;
  color: var(--pl-blue);
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.insight-figure.green { color: var(--pl-green-dark); }
.insight-sub {
  font-size: 11px;
  color: var(--pl-gray-500);
  margin-top: 4px;
  line-height: 1.4;
}

.insight-list { margin: 0; padding: 0; list-style: none; }
.insight-list li {
  font-size: 12.5px;
  line-height: 1.5;
  padding: 5px 0 5px 22px;
  position: relative;
  color: var(--pl-gray-900);
}
.insight-list.reasons li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 12px; height: 2px;
  background: var(--pl-blue);
  border-radius: 1px;
}
.insight-list.pros li::before {
  content: '\2713';
  position: absolute;
  left: 0; top: 4px;
  width: 16px; height: 16px;
  background: var(--pl-green-soft);
  color: var(--pl-green-dark);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}
.insight-list.cons li::before {
  content: '!';
  position: absolute;
  left: 0; top: 4px;
  width: 16px; height: 16px;
  background: var(--pl-warning-soft);
  color: #92691A;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

/* ============================================================
   Briefing layout
   ============================================================ */
.briefing-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.briefing-aside { position: sticky; top: calc(var(--pl-topbar-h) + 32px); display: flex; flex-direction: column; gap: 16px; }

.cta-card {
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-white);
  padding: 20px;
  border-radius: var(--pl-r-lg);
  position: relative;
  overflow: hidden;
  box-shadow: var(--pl-shadow);
}
.cta-card::after {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 120px; height: 120px;
  background: var(--pl-green-lime);
  border-radius: 50%;
  opacity: 0.18;
}
.cta-card h3 {
  font-size: 16px;
  margin: 0 0 4px;
  position: relative; z-index: 1;
}
.cta-card p {
  font-size: 12.5px;
  opacity: 0.9;
  margin: 0 0 14px;
  position: relative; z-index: 1;
  line-height: 1.5;
}
.cta-card .btn {
  position: relative; z-index: 1;
  width: 100%;
  justify-content: center;
}

.next-actions { padding: 0; }
.next-actions .action {
  padding: 10px 14px;
  border-bottom: 1px solid var(--pl-gray-100);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.next-actions .action:last-child { border-bottom: 0; }
.next-actions .action .num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--pl-blue-soft);
  color: var(--pl-blue);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  flex-shrink: 0;
}

/* ============================================================
   Composer slim — mini lead card
   ============================================================ */
.lead-mini-card {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.lead-mini-card .mini-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--pl-blue-soft);
  color: var(--pl-blue);
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}
.lead-mini-card .info { flex: 1; min-width: 0; }
.lead-mini-card .name { font-weight: 700; font-size: 14px; }
.lead-mini-card .role { font-size: 12px; color: var(--pl-gray-700); }
.lead-mini-card .company { font-size: 12px; color: var(--pl-blue); font-weight: 600; }
.lead-mini-card .score-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--pl-green-soft);
  color: var(--pl-green-dark);
  padding: 4px 10px;
  border-radius: var(--pl-r-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.composer-layout.slim {
  grid-template-columns: 280px 1fr;
}

.tab-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.tab-stats .ts {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 12px 16px;
  position: relative;
  overflow: hidden;
}
.tab-stats .ts::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--pl-green-lime);
}
.tab-stats .ts .k { font-size: 10px; text-transform: uppercase; color: var(--pl-gray-500); letter-spacing: 0.6px; font-weight: 600; }
.tab-stats .ts .v { font-size: 20px; font-weight: 800; color: var(--pl-charcoal); margin-top: 2px; letter-spacing: -0.3px; }
.tab-stats .ts .sub { font-size: 11px; color: var(--pl-gray-500); }

/* Accent borders by status */
.deep-card.s-contatado  { border-left: 3px solid var(--pl-warning); }
.deep-card.s-respondeu  { border-left: 3px solid var(--pl-green); }
.deep-card.s-convertido { border-left: 3px solid var(--pl-green-dark); }
.deep-card.s-perdido    { border-left: 3px solid var(--pl-danger); }

/* Tab sections */
.tab-section { display: none; }
.tab-section.active { display: block; animation: tab-fade 200ms ease-out; }
@keyframes tab-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Empty / removed card animation */
.deep-card.removing {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 220ms, transform 220ms;
  pointer-events: none;
}

/* Funnel viz at top */
.funnel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.funnel-step {
  padding: 14px 18px;
  border-right: 1px solid var(--pl-gray-200);
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}
.funnel-step:last-child { border-right: 0; }
.funnel-step::after {
  content: '';
  position: absolute;
  right: -8px; top: 50%;
  width: 16px; height: 16px;
  background: var(--pl-white);
  border-top: 1px solid var(--pl-gray-200);
  border-right: 1px solid var(--pl-gray-200);
  transform: translateY(-50%) rotate(45deg);
  z-index: 1;
}
.funnel-step:last-child::after { display: none; }
.funnel-step .ico {
  width: 32px; height: 32px;
  border-radius: var(--pl-r-md);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.funnel-step.captured .ico { background: var(--pl-blue-soft); color: var(--pl-blue); }
.funnel-step.contatado .ico { background: var(--pl-warning-soft); color: #92691A; }
.funnel-step.respondeu .ico { background: var(--pl-green-soft); color: var(--pl-green-dark); }
.funnel-step.convertido .ico { background: var(--pl-green); color: var(--pl-white); }
.funnel-step .v { font-size: 20px; font-weight: 800; color: var(--pl-charcoal); letter-spacing: -0.3px; line-height: 1; }
.funnel-step .k { font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--pl-gray-500); font-weight: 700; margin-top: 2px; }
.funnel-step .rate { font-size: 11px; color: var(--pl-gray-700); margin-top: 2px; }

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--pl-charcoal);
  color: var(--pl-white);
  padding: 12px 16px;
  border-radius: var(--pl-r-md);
  box-shadow: var(--pl-shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  min-width: 280px;
  animation: toast-in 220ms ease-out;
  pointer-events: auto;
}
.toast.success { background: var(--pl-green-dark); }
.toast.danger { background: var(--pl-danger); }
.toast.info { background: var(--pl-blue); }
.toast.fade-out { animation: toast-out 220ms ease-in forwards; }
/* toast clicável (ex.: "a Polly atualizou seu briefing" → abre o popup de revisão) */
.toast-clickable { cursor: pointer; }
.toast-clickable:hover { filter: brightness(1.08); }
.toast-clickable small { opacity: .85; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(10px); }
}

/* Empty state for tab */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--pl-gray-500);
}
.empty-state .ico {
  width: 64px; height: 64px;
  background: var(--pl-bg);
  border-radius: 50%;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  color: var(--pl-gray-300);
}
.empty-state h3 { color: var(--pl-charcoal); margin-bottom: 4px; }
.empty-state p { margin: 0; font-size: 13px; }

/* ============================================================
   Onboarding / "Comece aqui" — checklist de ativacao (dashboard)
   ============================================================ */
.onboarding {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  box-shadow: var(--pl-shadow-sm);
  padding: 20px 22px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.onboarding::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(var(--pl-blue), var(--pl-green));
}
.onb-close {
  position: absolute;
  top: 14px; right: 14px;
  background: transparent; border: none;
  color: var(--pl-gray-500);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--pl-r-sm);
  display: grid; place-items: center;
}
.onb-close:hover { background: var(--pl-gray-100); color: var(--pl-charcoal); }
.onb-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 14px; padding-right: 28px; }
.onb-head .onb-title {
  font-size: 16px; font-weight: 800; color: var(--pl-blue);
  letter-spacing: -0.2px; display: flex; align-items: center; gap: 8px;
}
.onb-head .onb-sub { font-size: 13px; color: var(--pl-gray-700); margin-top: 2px; }
.onb-progress-wrap { margin-left: auto; min-width: 140px; }
.onb-progress-label { font-size: 12px; font-weight: 700; color: var(--pl-gray-700); margin-bottom: 6px; text-align: right; }
.onb-progress { height: 6px; background: var(--pl-gray-100); border-radius: var(--pl-r-pill); overflow: hidden; }
.onb-progress .bar { height: 100%; background: #FFFFFF; border-radius: var(--pl-r-pill); transition: width 400ms ease; }
.onb-steps { display: flex; flex-direction: column; gap: 8px; }
.onb-step {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  background: var(--pl-bg);
}
.onb-step.done { background: var(--pl-green-soft); border-color: transparent; }
.onb-step.next { border-color: var(--pl-blue); background: var(--pl-white); box-shadow: var(--pl-shadow-sm); }
.onb-step .onb-check {
  width: 26px; height: 26px; border-radius: 50%;
  flex-shrink: 0; display: grid; place-items: center;
  font-weight: 800; font-size: 13px;
}
.onb-step .onb-check.todo { background: var(--pl-white); border: 2px solid var(--pl-gray-300); color: var(--pl-gray-500); }
.onb-step.next .onb-check.todo { border-color: var(--pl-blue); color: var(--pl-blue); }
.onb-step .onb-check.ok { background: var(--pl-green); color: var(--pl-white); }
.onb-step .onb-info { flex: 1; min-width: 0; }
.onb-step .onb-step-title { font-weight: 700; font-size: 14px; }
.onb-step.done .onb-step-title { color: var(--pl-green-dark); }
.onb-step .onb-step-desc { font-size: 12px; color: var(--pl-gray-700); margin-top: 1px; }
.onb-cta { flex-shrink: 0; }
.onb-done-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--pl-green-dark); }

/* Icon button hover */
.btn-icon[title="Marcar convertido"]:hover {
  background: var(--pl-green-soft);
  color: var(--pl-green-dark);
}
.btn-icon[title="Marcar perdido"]:hover {
  background: var(--pl-danger-soft);
  color: var(--pl-danger);
}

/* Tab hover bg */
.tabs .tab { transition: background 120ms, color 120ms, border-color 120ms; }
.tabs .tab:hover:not(.active) { background: var(--pl-gray-100); }

/* ============================================================
   Login / Onboarding
   ============================================================ */
body.login-page {
  margin: 0;
  min-height: 100vh;
  background: var(--pl-bg);
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Lado esquerdo: brand hero */
.login-hero {
  position: relative;
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-white);
  padding: 48px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.login-hero::before {
  content: '';
  position: absolute;
  right: -120px; top: -120px;
  width: 360px; height: 360px;
  background: var(--pl-green-lime);
  border-radius: 50%;
  opacity: 0.18;
}
.login-hero::after {
  content: '';
  position: absolute;
  left: -80px; bottom: 120px;
  width: 240px; height: 240px;
  background: var(--pl-green);
  border-radius: 50%;
  opacity: 0.20;
}
.login-hero .hero-content { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; }

.hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.hero-brand img { width: 48px; height: 48px; }
.hero-brand .brand-text { font-weight: 800; font-size: 20px; letter-spacing: -0.3px; }
.hero-brand .brand-sub { font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; opacity: 0.7; margin-top: 2px; }

.hero-headline {
  margin: auto 0;
}
.hero-headline h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.1;
  margin: 0 0 14px;
}
.hero-headline h1 em {
  color: var(--pl-green-lime);
  font-style: italic;
  font-weight: 800;
}
.hero-headline p {
  font-size: 16px;
  opacity: 0.85;
  max-width: 420px;
  margin: 0 0 32px;
  line-height: 1.5;
}

.hero-features { display: flex; flex-direction: column; gap: 12px; }
.hero-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.hero-feature .check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--pl-green-lime);
  color: var(--pl-blue-navy);
  display: grid; place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.hero-feature b { display: block; font-weight: 700; }
.hero-feature span { opacity: 0.85; font-size: 13px; }

.hero-footer {
  position: relative;
  z-index: 1;
  font-size: 12px;
  opacity: 0.6;
  margin-top: 32px;
  font-style: italic;
}

/* Lado direito: card de auth */
.login-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--pl-bg);
}

.auth-card {
  background: var(--pl-white);
  border-radius: var(--pl-r-xl);
  padding: 32px 36px;
  box-shadow: var(--pl-shadow-lg);
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--pl-gray-200);
}

.auth-tabs {
  display: flex;
  background: var(--pl-bg);
  border-radius: var(--pl-r-md);
  padding: 4px;
  margin-bottom: 24px;
  gap: 4px;
}
.auth-tabs .auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 13px;
  color: var(--pl-gray-700);
  cursor: pointer;
  border-radius: var(--pl-r-sm);
  transition: background 120ms, color 120ms;
}
.auth-tabs .auth-tab.active {
  background: var(--pl-white);
  color: var(--pl-blue);
  box-shadow: var(--pl-shadow-sm);
}

.auth-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px;
  color: var(--pl-charcoal);
  letter-spacing: -0.3px;
}
.auth-sub {
  font-size: 13px;
  color: var(--pl-gray-700);
  margin: 0 0 24px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.auth-field label {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--pl-gray-700);
}
.auth-field input,
.auth-field select {
  padding: 11px 14px;
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  background: var(--pl-white);
  outline: none;
  font-size: 16px;
  transition: border-color 120ms, box-shadow 120ms;
}
.auth-field input:focus,
.auth-field select:focus {
  border-color: var(--pl-blue);
  box-shadow: 0 0 0 3px var(--pl-blue-soft);
}
.auth-field .helper {
  font-size: 14px;
  color: var(--pl-gray-500);
}

.auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 18px;
  font-size: 12px;
}
.auth-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--pl-gray-700);
  cursor: pointer;
}
.auth-options a { color: var(--pl-blue); font-weight: 600; }

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 14px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--pl-gray-500);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--pl-gray-200);
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px;
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  color: var(--pl-charcoal);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 120ms, border-color 120ms;
}
.google-btn:hover {
  background: var(--pl-bg);
  border-color: var(--pl-gray-300);
}

.config-step {
  background: var(--pl-bg);
  border-radius: var(--pl-r-md);
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid var(--pl-gray-200);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.config-step.done { background: var(--pl-green-soft); border-color: transparent; }
.config-step .step-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--pl-gray-200);
  color: var(--pl-gray-700);
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.config-step.done .step-dot {
  background: var(--pl-green-dark);
  color: var(--pl-white);
}
.config-step .step-info { flex: 1; }
.config-step .step-info .step-title { font-weight: 600; color: var(--pl-charcoal); }
.config-step .step-info .step-desc { font-size: 11px; color: var(--pl-gray-500); margin-top: 1px; }
.config-step.done .step-info .step-desc { color: var(--pl-green-dark); font-weight: 600; }

.config-step .btn { padding: 5px 10px; font-size: 11px; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { padding: 32px 24px; min-height: 360px; }
  .login-form-side { padding: 24px; }
  .hero-headline h1 { font-size: 32px; }
}

/* ============================================================
   Login mono-usu&aacute;rio
   ============================================================ */
.login-waiting {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.waiting-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--pl-r-md);
  backdrop-filter: blur(4px);
}
.waiting-item.hot {
  background: rgba(255, 196, 122, 0.12);
  border-color: rgba(255, 196, 122, 0.3);
}
.waiting-item.commission {
  background: rgba(164, 206, 63, 0.18);
  border-color: rgba(164, 206, 63, 0.4);
}
.waiting-num {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--pl-green-lime);
  min-width: 44px;
  line-height: 1;
}
.waiting-num.cur { font-size: 18px; min-width: 70px; }
.waiting-info { flex: 1; }
.waiting-title { font-size: 13px; font-weight: 700; line-height: 1.2; }
.waiting-sub { font-size: 11.5px; opacity: 0.8; margin-top: 2px; line-height: 1.3; }

/* Auth card mono-usu&aacute;rio */
.auth-card.single-user {
  padding: 36px 36px 28px;
}
.user-greeting {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--pl-gray-100);
}
.big-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-on-accent);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: var(--pl-shadow);
  position: relative;
}
.big-avatar::after {
  content: '';
  position: absolute;
  bottom: 2px; right: 2px;
  width: 14px; height: 14px;
  background: var(--pl-green);
  border: 3px solid var(--pl-white);
  border-radius: 50%;
}
.greet-text { flex: 1; min-width: 0; }
.greet-name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.2px;
}
.greet-email {
  font-size: 12px;
  color: var(--pl-gray-500);
  margin-top: 2px;
}

.password-wrap {
  position: relative;
}
.password-wrap input {
  width: 100%;
  padding-right: 40px;
}
.pwd-toggle {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--pl-gray-500);
  cursor: pointer;
  padding: 4px;
  display: grid;
  place-items: center;
  transition: color 120ms;
}
.pwd-toggle:hover { color: var(--pl-blue); }

.auth-secondary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 12px;
}
.auth-secondary a {
  color: var(--pl-blue);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.auth-secondary a:hover { text-decoration: underline; }

.auth-divider {
  position: relative;
  text-align: center;
  margin: 20px 0;
}
.auth-divider span {
  background: var(--pl-white);
  padding: 0 12px;
  color: var(--pl-gray-500);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.auth-divider::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: var(--pl-gray-200);
}

.single-user-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--pl-gray-100);
  font-size: 11px;
  color: var(--pl-gray-500);
  text-align: center;
}
.single-user-foot a {
  color: var(--pl-blue);
  font-weight: 600;
  text-decoration: none;
}
.single-user-foot a:hover { text-decoration: underline; }

/* Headline do hero do login */
.login-page .hero-headline h1 {
  font-size: 38px;
  margin-bottom: 12px;
}
.login-page .hero-headline p {
  margin-bottom: 18px;
}

/* ============================================================
   Minha conta (setup.html)
   ============================================================ */
.profile-hero {
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-white);
  border-radius: var(--pl-r-lg);
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
  margin: 24px 0;
  display: flex;
  gap: 24px;
  align-items: center;
}
.profile-hero::after {
  content: '';
  position: absolute;
  right: -50px; bottom: -50px;
  width: 220px; height: 220px;
  background: var(--pl-green-lime);
  border-radius: 50%;
  opacity: 0.18;
}
.profile-photo {
  position: relative;
  flex-shrink: 0;
  z-index: 1;
}
.big-avatar.lg {
  width: 96px; height: 96px;
  font-size: 36px;
  box-shadow: 0 0 0 6px rgba(255,255,255,0.15);
}
.photo-edit {
  position: absolute;
  bottom: 0; right: 0;
  width: 32px; height: 32px;
  background: var(--pl-green-lime);
  color: var(--pl-blue-navy);
  border: 3px solid var(--pl-blue-navy);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 120ms;
}
.photo-edit:hover { transform: scale(1.1); }
.profile-id { position: relative; z-index: 1; flex: 1; }
.profile-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.1;
}
.profile-role {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 4px;
}
.profile-stats {
  display: flex;
  gap: 28px;
  margin-top: 16px;
}
.ps .ps-v {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--pl-green-lime);
  line-height: 1;
}
.ps .ps-k {
  font-size: 11px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  margin-top: 4px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.account-card {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  padding: 20px 22px;
}
.account-card-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--pl-gray-100);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--pl-blue);
}
.account-card .form-row { margin-bottom: 12px; }

.session-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--pl-gray-100);
}
.session-row:last-of-type { border-bottom: 0; }
.session-row > svg { color: var(--pl-gray-500); flex-shrink: 0; }

.agreement-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--pl-gray-100);
  font-size: 13px;
}
.agreement-line:last-of-type { border-bottom: 0; }
.agreement-line .ag-k { color: var(--pl-gray-500); }
.agreement-line .ag-v { font-weight: 700; color: var(--pl-charcoal); text-align: right; }

.danger-zone {
  background: var(--pl-danger-soft);
  border: 1px solid #E8B7B0;
  border-radius: var(--pl-r-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}
.dz-title {
  font-weight: 700;
  color: var(--pl-danger);
  font-size: 14px;
}
.dz-sub {
  font-size: 12px;
  color: #7A2A20;
  margin-top: 2px;
}

/* Preferences row */
.pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--pl-gray-100);
  cursor: pointer;
}
.pref-row:last-of-type { border-bottom: 0; }
.pref-info { flex: 1; }
.pref-title { font-weight: 600; font-size: 13.5px; color: var(--pl-charcoal); }
.pref-sub { font-size: 11.5px; color: var(--pl-gray-500); margin-top: 2px; }

.ts-wrap {
  position: relative;
  display: inline-block;
  width: 36px; height: 20px;
}
.ts-wrap input { display: none; }
.ts-wrap .track {
  position: absolute;
  inset: 0;
  background: var(--pl-gray-300);
  border-radius: 999px;
  transition: background 160ms;
}
.ts-wrap .track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: var(--pl-white);
  border-radius: 50%;
  transition: transform 160ms;
}
.ts-wrap input:checked + .track { background: var(--pl-green); }
.ts-wrap input:checked + .track::after { transform: translateX(16px); }

/* Meta progress */
.meta-progress {
  background: var(--pl-bg);
  border-radius: var(--pl-r-md);
  padding: 14px 16px;
  margin-top: 4px;
}
.mp-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.mp-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--pl-gray-500); font-weight: 700; }
.mp-val { font-size: 18px; font-weight: 800; color: var(--pl-blue); letter-spacing: -0.3px; }
.mp-val .muted { color: var(--pl-gray-500); font-weight: 500; }
.mp-bar {
  height: 8px;
  background: var(--pl-gray-200);
  border-radius: 999px;
  overflow: hidden;
}
.mp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pl-green-lime) 0%, var(--pl-green) 100%);
  border-radius: 999px;
  transition: width 400ms ease-out;
}
.mp-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11.5px;
}
.mp-foot .muted { color: var(--pl-gray-500); }

/* Account input alignment */
.account-card .form-row input,
.account-card .form-row textarea,
.account-card .form-row select { font-size: 16px; }

@media (max-width: 1100px) {
  .account-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Tema escuro
   ============================================================ */
body.theme-dark {
  --pl-charcoal:    #E8EBEF;
  --pl-gray-900:    #C5C9D0;
  --pl-gray-700:    #98A0AC;
  --pl-gray-600:    #828B99;
  --pl-gray-500:    #6B7280;
  --pl-gray-400:    #525A6B;
  --pl-gray-300:    #3A4150;
  --pl-gray-200:    #2A3140;
  --pl-gray-100:    #232936;
  --pl-bg:          #0F1419;
  --pl-white:       #1A1F2E;
  --pl-blue-text:   #6BA3E8;   /* azul-texto clareado p/ manter contraste no tema escuro */
  --pl-danger-dark: #EC6B5E;   /* vermelho-texto clareado p/ manter contraste no tema escuro */
  --pl-blue-soft:   #1E2B4D;
  --pl-info-soft:   #1E2B4D;
  --pl-green-soft:  #1F3220;
  --pl-warning-soft:#3B2E14;
  --pl-warning-dark:#E0A93A;   /* no dark o âmbar de texto precisa clarear p/ manter contraste */
  --pl-danger-soft: #3A1F1A;
  --pl-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --pl-shadow:    0 2px 8px rgba(0, 0, 0, 0.5);
  --pl-shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.6);
}
body.theme-dark .sidebar,
body.theme-dark .topbar,
body.theme-dark .card,
body.theme-dark .stat,
body.theme-dark .kpi:not(.featured),
body.theme-dark .chart-card,
body.theme-dark .account-card,
body.theme-dark .case-card,
body.theme-dark .integ-card,
body.theme-dark .enrich-card,
body.theme-dark .notif,
body.theme-dark .step-card,
body.theme-dark .table-card,
body.theme-dark .lead-profile,
body.theme-dark .composer,
body.theme-dark .deep-card,
body.theme-dark .lead-mini-card,
body.theme-dark .activity-item,
body.theme-dark .funnel,
body.theme-dark .toast {
  background: var(--pl-white);
  border-color: var(--pl-gray-200);
}
body.theme-dark table.leads th,
body.theme-dark .table-toolbar,
body.theme-dark .composer-footer,
body.theme-dark .deep-card-footer,
body.theme-dark .meta-progress,
body.theme-dark .case-card .case-footer,
body.theme-dark .enrich-card,
body.theme-dark .lead-fact:hover {
  background: var(--pl-bg);
}
body.theme-dark .auth-card,
body.theme-dark .login-form-side { background: var(--pl-bg); }
body.theme-dark .auth-card { background: var(--pl-white); }
body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select {
  background: var(--pl-bg) !important;
  color: var(--pl-charcoal) !important;
  border-color: var(--pl-gray-300) !important;
}
body.theme-dark .filter-chip,
body.theme-dark .google-btn,
body.theme-dark .btn:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-outline) {
  background: var(--pl-bg);
  color: var(--pl-charcoal);
}
body.theme-dark .filter-chip.active {
  background: var(--pl-blue);
  color: var(--pl-white);
}
body.theme-dark .badge,
body.theme-dark .tag { background: var(--pl-gray-200); color: var(--pl-charcoal); }
body.theme-dark .topbar-bell { background: var(--pl-white); border-color: var(--pl-gray-200); }

/* ============================================================
   Briefing redesign &mdash; sub-tabs + materiais
   ============================================================ */
.briefing-shell {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  overflow: hidden;
}
.briefing-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--pl-gray-200);
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-white);
}
.briefing-header .bh-info { flex: 1; }
.briefing-header h3 { font-size: 16px; color: var(--pl-white); margin: 0; }
.briefing-header .bh-sub { font-size: 12.5px; opacity: 0.85; margin-top: 2px; }
.briefing-completeness {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0,0,0,0.18);
  padding: 10px 16px;
  border-radius: var(--pl-r-md);
}
.completeness-ring {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: conic-gradient(var(--pl-green-lime) calc(var(--p, 78%)), rgba(255,255,255,0.18) 0);
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.completeness-ring::after {
  content: '';
  position: absolute;
  inset: 5px;
  background: var(--pl-blue-navy);
  border-radius: 50%;
}
.completeness-ring span {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 800;
  color: var(--pl-green-lime);
}
.completeness-text .v { font-size: 13px; font-weight: 700; }
.completeness-text .k { font-size: 11px; opacity: 0.8; }

.briefing-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--pl-gray-200);
  background: var(--pl-bg);
  overflow-x: auto;
}
.bnav-item {
  background: transparent;
  border: none;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pl-gray-700);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 3px solid transparent;
  position: relative;
  bottom: -1px;
  white-space: nowrap;
  transition: color 120ms, border-color 120ms;
}
.bnav-item:hover { color: var(--pl-charcoal); }
.bnav-item.active {
  color: var(--pl-blue);
  border-bottom-color: var(--pl-green-lime);
  background: var(--pl-white);
}
.bnav-item .b-warn {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--pl-warning);
}

.briefing-panes { padding: 28px; }
.bpane { display: none; }
.bpane.active { display: block; animation: tab-fade 220ms ease-out; }

.bpane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
}
.bpane-header h3 { font-size: 16px; margin: 0; }
.bpane-header .bpane-sub { font-size: 12.5px; color: var(--pl-gray-500); margin-top: 2px; }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--pl-gray-300);
  border-radius: var(--pl-r-lg);
  padding: 36px 24px;
  text-align: center;
  background: var(--pl-bg);
  transition: border-color 160ms, background 160ms;
  cursor: pointer;
  margin-bottom: 20px;
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--pl-blue);
  background: var(--pl-blue-soft);
}
.upload-zone .uz-icon {
  width: 56px; height: 56px;
  background: var(--pl-blue-soft);
  color: var(--pl-blue);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
}
.upload-zone h4 { font-size: 15px; margin: 0 0 4px; }
.upload-zone p { font-size: 13px; color: var(--pl-gray-700); margin: 0; }
.upload-zone .uz-hint {
  font-size: 11px;
  color: var(--pl-gray-500);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}

/* File list */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--pl-bg);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  transition: border-color 120ms;
}
.file-item:hover { border-color: var(--pl-blue); }
.file-ico {
  width: 40px; height: 48px;
  border-radius: var(--pl-r-sm);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--pl-white);
  flex-shrink: 0;
}
.file-ico.pdf   { background: #C0392B; }
.file-ico.docx  { background: #2A5494; }
.file-ico.pptx  { background: #D24726; }
.file-ico.xlsx  { background: #1D6F42; }
.file-ico.img   { background: #6B3FB2; }
.file-ico.mp4   { background: #1A1A1A; }
.file-ico.mp3   { background: #FF7A59; }
.file-ico.txt   { background: var(--pl-gray-500); }
.file-info { flex: 1; min-width: 0; }
.file-name { font-weight: 600; font-size: 13.5px; }
.file-meta { font-size: 11.5px; color: var(--pl-gray-500); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.file-meta .indexed {
  color: var(--pl-green-dark);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.file-actions {
  display: flex;
  gap: 4px;
  opacity: 0.5;
  transition: opacity 120ms;
}
.file-item:hover .file-actions { opacity: 1; }
.file-actions .btn-ico {
  width: 30px; height: 30px;
  background: transparent;
  border: none;
  color: var(--pl-gray-500);
  border-radius: var(--pl-r-sm);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 120ms, color 120ms;
}
.file-actions .btn-ico:hover { background: var(--pl-gray-100); color: var(--pl-blue); }
.file-actions .btn-ico.danger:hover { background: var(--pl-danger-soft); color: var(--pl-danger); }

.file-summary {
  display: flex;
  gap: 16px;
  padding: 14px 18px;
  background: linear-gradient(90deg, var(--pl-green-soft) 0%, transparent 100%);
  border-left: 3px solid var(--pl-green);
  border-radius: var(--pl-r-md);
  margin-top: 20px;
  font-size: 13px;
}
.file-summary .fs-item .v { font-weight: 800; color: var(--pl-blue); font-size: 16px; letter-spacing: -0.3px; }
.file-summary .fs-item .k { font-size: 11px; color: var(--pl-gray-500); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }

/* Visao geral cards */
.briefing-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.bo-card {
  background: var(--pl-bg);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 14px 16px;
}
.bo-card .bo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.bo-card .bo-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--pl-gray-500); font-weight: 700; }
.bo-card .bo-status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--pl-r-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.bo-card .bo-status.full { background: var(--pl-green-soft); color: var(--pl-green-dark); }
.bo-card .bo-status.partial { background: var(--pl-warning-soft); color: #92691A; }
.bo-card .bo-status.empty { background: var(--pl-danger-soft); color: var(--pl-danger); }
.bo-card .bo-title { font-weight: 700; font-size: 14px; }
.bo-card .bo-desc { font-size: 12px; color: var(--pl-gray-700); margin-top: 4px; line-height: 1.4; }
.bo-card .bo-foot { font-size: 11px; color: var(--pl-gray-500); margin-top: 8px; }

/* Persona Polly form */
.persona-slider {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--pl-gray-100);
}
.persona-slider:last-child { border-bottom: 0; }
.persona-label { flex: 0 0 140px; font-weight: 600; font-size: 13px; }
.persona-range {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--pl-gray-500);
}
.persona-range input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: var(--pl-gray-200);
  border-radius: 999px;
  outline: none;
}
.persona-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--pl-blue);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--pl-white);
  box-shadow: var(--pl-shadow-sm);
}
.persona-current {
  font-size: 12px;
  font-weight: 700;
  color: var(--pl-blue);
  flex: 0 0 80px;
  text-align: right;
}

/* ICP persona cards */
.icp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.icp-card {
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 14px 16px;
  background: var(--pl-white);
}
.icp-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.icp-emoji {
  width: 36px; height: 36px;
  background: var(--pl-blue-soft);
  border-radius: var(--pl-r-md);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.icp-name { font-weight: 700; font-size: 14px; }
.icp-sub { font-size: 11.5px; color: var(--pl-gray-500); }
.icp-row {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
  border-top: 1px solid var(--pl-gray-100);
}
.icp-row:first-of-type { border-top: 0; }
.icp-row .k { color: var(--pl-gray-500); flex: 0 0 90px; }
.icp-row .v { flex: 1; }

/* Polly decisions log */
.decision-log { display: flex; flex-direction: column; gap: 0; }
.decision-item {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--pl-gray-100);
}
.decision-item:last-child { border-bottom: 0; }
.decision-time {
  flex: 0 0 90px;
  font-size: 11.5px;
  color: var(--pl-gray-500);
  font-weight: 600;
}
.decision-body { flex: 1; }
.decision-title { font-weight: 600; font-size: 13px; }
.decision-reason { font-size: 12px; color: var(--pl-gray-700); margin-top: 4px; line-height: 1.45; }
.decision-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--pl-r-sm);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-right: 6px;
}
.decision-tag.choose { background: var(--pl-blue-soft); color: var(--pl-blue); }
.decision-tag.send { background: var(--pl-green-soft); color: var(--pl-green-dark); }
.decision-tag.skip { background: var(--pl-warning-soft); color: #92691A; }
.decision-tag.schedule { background: var(--pl-info-soft); color: var(--pl-blue); }
.decision-tag.escalate { background: var(--pl-danger-soft); color: var(--pl-danger); }

/* No tooltips mode */
body.no-tooltips .term {
  border-bottom: none;
  font-weight: inherit;
  color: inherit;
  cursor: text;
}
body.no-tooltips .term::after,
body.no-tooltips .term::before { display: none; }

/* ============================================================
   Comiss&atilde;o &mdash; regras
   ============================================================ */
.commission-rules {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rule-card {
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  overflow: hidden;
  background: var(--pl-white);
  transition: border-color 120ms;
}
.rule-card:hover { border-color: var(--pl-blue); }
.rule-card.highlight {
  border-color: var(--pl-green);
  background: linear-gradient(90deg, var(--pl-green-soft) 0%, transparent 100%);
}
.rule-head {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--pl-gray-100);
}
.rule-card.highlight .rule-head { border-bottom-color: rgba(122, 183, 59, 0.25); }
.rule-trigger {
  font-size: 13px;
  line-height: 1.4;
  flex: 1;
}
.rule-when {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: var(--pl-gray-500);
  display: block;
  margin-bottom: 2px;
}
.rule-event {
  color: var(--pl-charcoal);
  font-size: 14px;
}
.rule-event b { font-weight: 800; color: var(--pl-blue); }
.rule-card.highlight .rule-event b { color: var(--pl-green-dark); }
.rule-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--pl-blue);
  letter-spacing: -0.3px;
  white-space: nowrap;
  text-align: right;
  flex-shrink: 0;
}
.rule-card.highlight .rule-value { color: var(--pl-green-dark); }
.rule-value .rule-unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--pl-gray-500);
  display: block;
  margin-top: 2px;
}

.rule-detail {
  padding: 8px 16px 12px;
  background: var(--pl-bg);
}
.rule-detail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-size: 12.5px;
}
.rule-detail-row > span { color: var(--pl-gray-700); flex: 0 0 200px; }
.rule-detail-row input,
.rule-detail-row select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-sm);
  background: var(--pl-white);
  font-size: 12.5px;
  outline: none;
}
.rule-detail-row input:focus,
.rule-detail-row select:focus { border-color: var(--pl-blue); }

/* ============================================================
   Cases aprofundamento
   ============================================================ */
.cases-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.cs-stat {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cs-stat .cs-ico {
  width: 40px; height: 40px;
  background: var(--pl-blue-soft);
  color: var(--pl-blue);
  border-radius: var(--pl-r-md);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.cs-stat.green .cs-ico { background: var(--pl-green-soft); color: var(--pl-green-dark); }
.cs-stat.warning .cs-ico { background: var(--pl-warning-soft); color: #92691A; }
.cs-stat.info .cs-ico { background: var(--pl-info-soft); color: var(--pl-blue); }
.cs-stat .cs-v {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--pl-charcoal);
  line-height: 1;
}
.cs-stat .cs-k {
  font-size: 11px;
  color: var(--pl-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  margin-top: 4px;
}
.cs-stat .cs-sub { font-size: 11px; color: var(--pl-gray-700); margin-top: 2px; }

/* Toolbar de cases */
.cases-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cases-toolbar .search {
  flex: 1;
  max-width: 320px;
  position: relative;
}
.cases-toolbar input[type="search"] {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  background: var(--pl-white);
  outline: none;
  font-size: 13px;
  transition: border-color 120ms;
}
.cases-toolbar input[type="search"]:focus {
  border-color: var(--pl-blue);
}
.cases-toolbar .search::before {
  content: '';
  position: absolute;
  left: 10px; top: 50%;
  width: 16px; height: 16px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C6B73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
}
.cases-toolbar select {
  padding: 8px 12px;
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  background: var(--pl-white);
  font-size: 12px;
  outline: none;
  cursor: pointer;
  color: var(--pl-charcoal);
}
.cases-toolbar select:focus { border-color: var(--pl-blue); }

/* Case card aprofundado */
.case-card .case-status {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 9.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--pl-r-pill);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: rgba(255,255,255,0.18);
  color: var(--pl-white);
  backdrop-filter: blur(4px);
}
.case-card .case-status.approved { background: rgba(122, 183, 59, 0.28); color: var(--pl-white); }
.case-card .case-status.review { background: rgba(229, 168, 35, 0.28); color: var(--pl-white); }
.case-card .case-status.draft { background: rgba(192, 57, 43, 0.28); color: var(--pl-white); }
.case-card .case-cover { position: relative; }

.case-performance {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--pl-bg);
  border-top: 1px solid var(--pl-gray-100);
  font-size: 11px;
}
.case-perf-bar {
  flex: 1;
  height: 4px;
  background: var(--pl-gray-200);
  border-radius: 999px;
  overflow: hidden;
}
.case-perf-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pl-green-lime) 0%, var(--pl-green) 100%);
  border-radius: 999px;
}
.case-perf-label {
  font-weight: 700;
  color: var(--pl-green-dark);
  white-space: nowrap;
}

/* Modal de detalhe do case */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 46, 102, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  animation: fade-in 200ms ease-out;
}
.modal-overlay.active { display: flex; }
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-shell {
  background: var(--pl-white);
  border-radius: var(--pl-r-xl);
  max-width: 880px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--pl-shadow-lg);
  animation: slide-up 240ms ease-out;
}
@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-cover {
  height: 160px;
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 32px;
  color: var(--pl-white);
}
.modal-cover .modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.18);
  border: none;
  border-radius: 50%;
  color: var(--pl-white);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 120ms;
}
.modal-cover .modal-close:hover { background: rgba(255,255,255,0.3); }
.modal-cover .case-sector {
  align-self: flex-start;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.18);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--pl-r-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}
.modal-cover h2 {
  font-size: 26px;
  margin: 0;
  letter-spacing: -0.4px;
  line-height: 1.15;
  color: var(--pl-white);
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--pl-gray-200);
  padding: 0 24px;
  background: var(--pl-bg);
}
.modal-tabs .mtab {
  background: transparent;
  border: none;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pl-gray-700);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  position: relative;
  bottom: -1px;
  transition: color 120ms;
}
.modal-tabs .mtab:hover { color: var(--pl-charcoal); }
.modal-tabs .mtab.active { color: var(--pl-blue); border-bottom-color: var(--pl-green-lime); }

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
}
.mtab-pane { display: none; }
.mtab-pane.active { display: block; }

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-top: 1px solid var(--pl-gray-200);
  background: var(--pl-bg);
}

/* Case detail metrics */
.case-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.case-metric {
  background: var(--pl-bg);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 12px 14px;
  text-align: center;
}
.case-metric .cm-v {
  font-size: 22px;
  font-weight: 800;
  color: var(--pl-blue);
  letter-spacing: -0.4px;
  line-height: 1;
}
.case-metric .cm-k {
  font-size: 10px;
  color: var(--pl-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  margin-top: 6px;
}
.case-metric .cm-sub { font-size: 11px; color: var(--pl-gray-700); margin-top: 2px; }

.testimonial {
  background: linear-gradient(135deg, var(--pl-green-soft) 0%, transparent 100%);
  border-left: 4px solid var(--pl-green);
  border-radius: var(--pl-r-md);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.testimonial blockquote {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  font-style: italic;
  color: var(--pl-charcoal);
}
.testimonial cite {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--pl-gray-700);
  font-style: normal;
  font-weight: 700;
}

.used-by-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.used-by-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--pl-bg);
  border-radius: var(--pl-r-md);
  border: 1px solid var(--pl-gray-200);
  font-size: 13px;
}
.used-by-item .lead-avatar { width: 32px; height: 32px; font-size: 12px; }
.used-by-item .ub-name { font-weight: 700; }
.used-by-item .ub-sub { font-size: 11.5px; color: var(--pl-gray-500); }
.used-by-item .ub-result {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--pl-r-pill);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.used-by-item .ub-result.converted { background: var(--pl-green-soft); color: var(--pl-green-dark); }
.used-by-item .ub-result.maturing { background: var(--pl-info-soft); color: var(--pl-blue); }
.used-by-item .ub-result.lost { background: var(--pl-danger-soft); color: var(--pl-danger); }

/* Hidden state for filtered cards/rows */
.is-hidden { display: none !important; }

/* ============================================================
   Cases — visão acional (atividade ao vivo + comissão)
   ============================================================ */

/* Hero "Pra você hoje" */
.cases-today {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.case-live {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  overflow: hidden;
}
.case-live-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--pl-gray-100);
  display: flex;
  align-items: center;
  gap: 10px;
}
.case-live-head h3 { font-size: 14px; margin: 0; flex: 1; }
.case-live-head .live-dot {
  width: 8px; height: 8px;
  background: var(--pl-green);
  border-radius: 50%;
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(122, 183, 59, 0.6); }
  50% { box-shadow: 0 0 0 6px rgba(122, 183, 59, 0); }
}
.case-live-head .live-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--pl-green-dark);
}

.case-activity {
  display: flex;
  flex-direction: column;
}
.case-act-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--pl-gray-100);
  cursor: pointer;
  transition: background 120ms;
}
.case-act-row:hover { background: var(--pl-bg); }
.case-act-row:last-child { border-bottom: 0; }
.case-act-row .ca-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.case-act-row .ca-dot.sent { background: var(--pl-blue); }
.case-act-row .ca-dot.replied { background: var(--pl-green); }
.case-act-row .ca-dot.meeting { background: var(--pl-green-dark); }
.case-act-row .ca-dot.no-reply { background: var(--pl-warning); }
.case-act-row .ca-info { min-width: 0; }
.case-act-row .ca-lead { font-weight: 700; font-size: 13px; }
.case-act-row .ca-meta { font-size: 11px; color: var(--pl-gray-500); margin-top: 1px; }
.case-act-row .ca-case {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  background: var(--pl-blue-soft);
  color: var(--pl-blue);
  border-radius: var(--pl-r-sm);
  white-space: nowrap;
}
.case-act-row .ca-time {
  font-size: 11px;
  color: var(--pl-gray-500);
  font-weight: 600;
  white-space: nowrap;
}
.case-act-row.replied .ca-case { background: var(--pl-green-soft); color: var(--pl-green-dark); }
.case-act-row.meeting .ca-case { background: var(--pl-green); color: var(--pl-white); }

/* KPI grande de comissão */
.case-commission {
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-white);
  border-radius: var(--pl-r-lg);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.case-commission::after {
  content: '';
  position: absolute;
  right: -40px; bottom: -40px;
  width: 160px; height: 160px;
  background: var(--pl-green-lime);
  border-radius: 50%;
  opacity: 0.18;
}
.case-commission .cc-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 800;
  opacity: 0.85;
  margin-bottom: 6px;
  position: relative; z-index: 1;
}
.case-commission .cc-value {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  color: var(--pl-green-lime);
  position: relative; z-index: 1;
}
.case-commission .cc-sub {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 6px;
  position: relative; z-index: 1;
}
.case-commission .cc-breakdown {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.15);
  position: relative; z-index: 1;
}
.case-commission .cc-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 3px 0;
}
.case-commission .cc-row .cc-k { opacity: 0.85; }
.case-commission .cc-row .cc-v { font-weight: 700; color: var(--pl-green-lime); }

/* Ranking de cases */
.case-ranking {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.case-ranking-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--pl-gray-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.case-ranking-head h3 { font-size: 14px; margin: 0; }
.case-ranking-head .sub { font-size: 11px; color: var(--pl-gray-500); margin-top: 1px; }

.rank-row {
  display: grid;
  grid-template-columns: 32px 1fr 110px 140px 90px;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--pl-gray-100);
  cursor: pointer;
  transition: background 120ms;
}
.rank-row:hover { background: var(--pl-bg); }
.rank-row:last-child { border-bottom: 0; }
.rank-position {
  font-size: 18px;
  font-weight: 800;
  color: var(--pl-gray-300);
  letter-spacing: -0.4px;
  text-align: center;
}
.rank-row.gold .rank-position { color: var(--pl-warning); }
.rank-row.silver .rank-position { color: #9CA3AF; }
.rank-row.bronze .rank-position { color: #B07D38; }
.rank-name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.rank-name .rn-sector {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pl-gray-500);
  font-weight: 600;
  padding: 2px 6px;
  background: var(--pl-bg);
  border-radius: var(--pl-r-sm);
}
.rank-uses { font-size: 12.5px; color: var(--pl-gray-700); }
.rank-uses b { color: var(--pl-charcoal); font-weight: 700; }

.rank-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--pl-gray-700);
}
.rank-bar {
  flex: 1;
  height: 6px;
  background: var(--pl-gray-200);
  border-radius: 999px;
  overflow: hidden;
}
.rank-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pl-green-lime) 0%, var(--pl-green) 100%);
}
.rank-bar-label { font-weight: 700; color: var(--pl-green-dark); white-space: nowrap; }

.rank-revenue {
  text-align: right;
  font-weight: 800;
  font-size: 15px;
  color: var(--pl-green-dark);
  letter-spacing: -0.3px;
}

/* Action panel embaixo do case (alerta de leads compatíveis) */
.case-candidates-banner {
  background: linear-gradient(90deg, var(--pl-green-soft) 0%, transparent 100%);
  border-left: 3px solid var(--pl-green);
  padding: 10px 14px;
  margin-top: 8px;
  border-radius: var(--pl-r-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.case-candidates-banner .ccb-text { flex: 1; }
.case-candidates-banner .ccb-action {
  font-weight: 800;
  color: var(--pl-green-dark);
  text-decoration: none;
  white-space: nowrap;
}

/* ============================================================
   Case "Abordagem" — técnica de uso
   ============================================================ */
.technique-intro {
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-white);
  border-radius: var(--pl-r-md);
  padding: 16px 18px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.technique-intro::after {
  content: '';
  position: absolute;
  right: -30px; bottom: -30px;
  width: 130px; height: 130px;
  background: var(--pl-green-lime);
  border-radius: 50%;
  opacity: 0.16;
}
.technique-intro h4 {
  font-size: 13px;
  margin: 0 0 4px;
  color: var(--pl-green-lime);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  position: relative; z-index: 1;
}
.technique-intro p {
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  opacity: 0.95;
  position: relative; z-index: 1;
}

/* Estrutura da abordagem (steps) */
.technique-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.tstep {
  background: var(--pl-bg);
  border: 1px solid var(--pl-gray-200);
  border-left: 3px solid var(--pl-blue);
  border-radius: var(--pl-r-md);
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.tstep-num {
  width: 26px; height: 26px;
  background: var(--pl-blue);
  color: var(--pl-white);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.tstep-body { flex: 1; min-width: 0; }
.tstep-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--pl-charcoal);
}
.tstep-desc {
  font-size: 12px;
  color: var(--pl-gray-700);
  line-height: 1.5;
}
.tstep-example {
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--pl-white);
  border: 1px dashed var(--pl-gray-300);
  border-radius: var(--pl-r-sm);
  font-size: 12px;
  font-style: italic;
  color: var(--pl-charcoal);
  line-height: 1.5;
}
.tstep-example::before {
  content: 'Ex:';
  font-style: normal;
  font-weight: 800;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pl-blue);
  margin-right: 6px;
}

/* Mensagem exemplo */
.tmessage-toolbar {
  display: flex;
  gap: 4px;
  background: var(--pl-bg);
  padding: 4px;
  border-radius: var(--pl-r-md);
  margin-bottom: 12px;
}
.tmessage-toolbar .channel-tab {
  flex: 1;
  padding: 6px 10px;
  font-size: 12px;
}

.tmessage-preview {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  overflow: hidden;
}
.tmessage-head {
  background: var(--pl-bg);
  padding: 10px 14px;
  border-bottom: 1px solid var(--pl-gray-200);
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  align-items: center;
}
.tmessage-head .th-k { color: var(--pl-gray-500); font-weight: 600; }
.tmessage-head .th-v { color: var(--pl-charcoal); font-weight: 600; }
.tmessage-body {
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--pl-charcoal);
  white-space: pre-line;
}
.tmessage-body mark {
  background: rgba(164, 206, 63, 0.35);
  color: var(--pl-charcoal);
  padding: 1px 3px;
  border-radius: 2px;
  font-weight: 600;
}
.tmessage-body mark.hook { background: rgba(122, 183, 59, 0.32); }
.tmessage-body mark.case-ref { background: rgba(30, 65, 137, 0.18); color: var(--pl-blue); }
.tmessage-body mark.cta { background: rgba(229, 168, 35, 0.32); }

.tmessage-legend {
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--pl-gray-100);
  background: var(--pl-bg);
  font-size: 11px;
  flex-wrap: wrap;
}
.tlegend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--pl-gray-700);
}
.tlegend-item .ti-sw {
  width: 10px; height: 10px;
  border-radius: 2px;
}
.tlegend-item .ti-sw.hook { background: rgba(122, 183, 59, 0.5); }
.tlegend-item .ti-sw.case-ref { background: rgba(30, 65, 137, 0.3); }
.tlegend-item .ti-sw.cta { background: rgba(229, 168, 35, 0.5); }

/* CTA recomendado destacado */
.tcta-card {
  background: linear-gradient(135deg, var(--pl-green-dark) 0%, var(--pl-green) 100%);
  color: var(--pl-white);
  border-radius: var(--pl-r-md);
  padding: 14px 16px;
  margin-top: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.tcta-card .tcta-ico {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.tcta-card .tcta-info { flex: 1; }
.tcta-card .tcta-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 800;
  opacity: 0.85;
}
.tcta-card .tcta-text {
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
  line-height: 1.4;
}

/* Lista de objeções comuns */
.tobjections {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.tobjection {
  background: var(--pl-warning-soft);
  border-left: 3px solid var(--pl-warning);
  border-radius: var(--pl-r-md);
  padding: 10px 14px;
}
.tobj-q {
  font-size: 12.5px;
  font-weight: 700;
  color: #92691A;
  margin-bottom: 4px;
}
.tobj-a {
  font-size: 12px;
  line-height: 1.5;
  color: var(--pl-gray-900);
}

/* ============================================================
   Multinacional — flags, regions
   ============================================================ */
.flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 14px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--pl-white);
  flex-shrink: 0;
  vertical-align: -1px;
}
.flag.br { background: linear-gradient(180deg, #009C3B 50%, #FEDF00 50%); color: #002776; }
.flag.de { background: linear-gradient(180deg, #000 33%, #DD0000 33% 66%, #FFCE00 66%); color: #fff; }
.flag.fr { background: linear-gradient(90deg, #002654 33%, #FFFFFF 33% 66%, #ED2939 66%); color: #002654; }
.flag.it { background: linear-gradient(90deg, #008C45 33%, #FFFFFF 33% 66%, #CD212A 66%); color: #008C45; }
.flag.uk { background: #012169; }
.flag.us { background: linear-gradient(180deg, #B22234 50%, #FFFFFF 50%); color: #3C3B6E; }
.flag.cn { background: #DE2910; color: #FFDE00; }
.flag.jp { background: #FFFFFF; color: #BC002D; border: 1px solid var(--pl-gray-200); }
.flag.kr { background: #FFFFFF; color: #003478; border: 1px solid var(--pl-gray-200); }
.flag.nl { background: linear-gradient(180deg, #AE1C28 33%, #FFFFFF 33% 66%, #21468B 66%); color: #21468B; }
.flag.es { background: linear-gradient(180deg, #AA151B 25%, #F1BF00 25% 75%, #AA151B 75%); color: #AA151B; }

.region-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--pl-r-pill);
  background: var(--pl-bg);
  color: var(--pl-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.region-chip.br { background: rgba(0, 156, 59, 0.12); color: #008C2F; }
.region-chip.eu { background: rgba(33, 70, 139, 0.12); color: #21468B; }
.region-chip.cn { background: rgba(222, 41, 16, 0.12); color: #C42810; }
.region-chip.us { background: rgba(60, 59, 110, 0.12); color: #3C3B6E; }

/* ============================================================
   INBOX
   ============================================================ */
.inbox-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 0;
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  overflow: hidden;
  min-height: 70vh;
}
.inbox-list-col {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--pl-gray-200);
  overflow: hidden;
}
.inbox-filters {
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--pl-gray-200);
  background: var(--pl-bg);
  flex-wrap: wrap;
}
.inbox-filter {
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 10px;
  border-radius: var(--pl-r-pill);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--pl-gray-700);
}
.inbox-filter:hover { background: var(--pl-white); }
.inbox-filter.active { background: var(--pl-blue); color: var(--pl-white); }

.inbox-list {
  flex: 1;
  overflow-y: auto;
}
.inbox-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--pl-gray-100);
  cursor: pointer;
  transition: background 120ms;
  position: relative;
}
.inbox-item:hover { background: var(--pl-bg); }
.inbox-item.active {
  background: var(--pl-blue-soft);
  border-left: 3px solid var(--pl-green-lime);
  padding-left: 13px;
}
.inbox-item.unread { font-weight: 600; }
.inbox-item.unread::before {
  content: '';
  position: absolute;
  left: 4px; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  background: var(--pl-blue);
  border-radius: 50%;
}
.inbox-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--pl-blue-soft);
  color: var(--pl-blue);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12.5px;
  position: relative;
}
.inbox-avatar.g { background: var(--pl-green-soft); color: var(--pl-green-dark); }
.inbox-avatar.n { background: var(--pl-blue-navy); color: var(--pl-white); }
.inbox-avatar .channel-badge {
  position: absolute;
  bottom: -3px; right: -3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--pl-white);
  display: grid;
  place-items: center;
  font-size: 8px;
  font-weight: 800;
  color: var(--pl-white);
}
.inbox-avatar .channel-badge.email { background: var(--pl-blue); }
.inbox-avatar .channel-badge.linkedin { background: #0A66C2; }
.inbox-avatar .channel-badge.whatsapp { background: #25D366; }
.inbox-item .ii-body { min-width: 0; }
.inbox-item .ii-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.inbox-item .ii-name { font-size: 13px; color: var(--pl-charcoal); }
.inbox-item .ii-time { font-size: 11px; color: var(--pl-gray-500); white-space: nowrap; }
.inbox-item .ii-subject {
  font-size: 12.5px;
  color: var(--pl-gray-700);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}
.inbox-item .ii-meta {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  align-items: center;
}
.inbox-item.unread .ii-name { color: var(--pl-charcoal); font-weight: 700; }
.inbox-item.unread .ii-subject { color: var(--pl-charcoal); font-weight: 600; }

.inbox-thread {
  display: flex;
  flex-direction: column;
  background: var(--pl-bg);
  overflow: hidden;
}
.thread-h {
  background: var(--pl-white);
  padding: 14px 22px;
  border-bottom: 1px solid var(--pl-gray-200);
  display: flex;
  align-items: center;
  gap: 14px;
}
.thread-h .th-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--pl-green-soft);
  color: var(--pl-green-dark);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}
.thread-h .th-info { flex: 1; min-width: 0; }
.thread-h .th-name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.thread-h .th-meta { font-size: 12px; color: var(--pl-gray-500); margin-top: 1px; }
.thread-h .th-actions { display: flex; gap: 6px; }

.thread-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tmsg {
  max-width: 78%;
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: var(--pl-shadow-sm);
}
.tmsg.outgoing {
  align-self: flex-end;
  background: var(--pl-blue);
  color: var(--pl-white);
  border-color: var(--pl-blue);
}
.tmsg.outgoing.polly {
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
}
.tmsg .tmsg-head {
  display: flex;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  align-items: center;
}
.tmsg .tmsg-from { opacity: 0.85; }
.tmsg .tmsg-time { opacity: 0.65; }
.tmsg.outgoing .tmsg-head { opacity: 0.9; }
.tmsg .polly-tag {
  background: var(--pl-green-lime);
  color: var(--pl-blue-navy);
  padding: 2px 6px;
  border-radius: var(--pl-r-sm);
  font-size: 9.5px;
  font-weight: 800;
}

.thread-reply-zone {
  background: var(--pl-white);
  border-top: 1px solid var(--pl-gray-200);
  padding: 14px 22px;
}
.polly-suggest {
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-white);
  border-radius: var(--pl-r-md);
  padding: 12px 14px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}
.polly-suggest .ps-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 800;
  color: var(--pl-green-lime);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.polly-suggest .ps-text {
  font-size: 13px;
  line-height: 1.5;
}
.polly-suggest .ps-actions {
  margin-top: 10px;
  display: flex;
  gap: 6px;
}
.polly-suggest .ps-actions .btn {
  padding: 5px 10px;
  font-size: 11.5px;
}
.polly-suggest .ps-actions .btn.btn-primary {
  background: var(--pl-green-lime);
  color: var(--pl-blue-navy);
  border-color: var(--pl-green-lime);
}
.polly-suggest .ps-actions .btn.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: var(--pl-white);
}
.thread-reply textarea {
  width: 100%;
  min-height: 60px;
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 10px 12px;
  font-size: 13px;
  resize: vertical;
  outline: none;
}
.thread-reply textarea:focus { border-color: var(--pl-blue); }
.thread-reply-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

/* ============================================================
   AGENDA
   ============================================================ */
.agenda-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}
.agenda-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--pl-topbar-h) + 32px);
}
.mini-cal {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  padding: 16px;
}
.mini-cal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.mini-cal-head .month { font-weight: 700; font-size: 14px; }
.mini-cal-head button {
  background: transparent;
  border: none;
  padding: 4px 6px;
  cursor: pointer;
  color: var(--pl-gray-700);
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--pl-r-sm);
}
.mini-cal-head button:hover { background: var(--pl-bg); color: var(--pl-blue); }
.mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font-size: 11px;
}
.mini-cal-grid .dow {
  text-align: center;
  color: var(--pl-gray-500);
  font-weight: 700;
  padding: 4px;
  text-transform: uppercase;
  font-size: 9.5px;
}
.mini-cal-grid .day {
  text-align: center;
  padding: 6px 0;
  border-radius: var(--pl-r-sm);
  cursor: pointer;
  position: relative;
  font-weight: 600;
}
.mini-cal-grid .day:hover { background: var(--pl-bg); }
.mini-cal-grid .day.other { color: var(--pl-gray-300); }
.mini-cal-grid .day.today { background: var(--pl-blue); color: var(--pl-white); }
.mini-cal-grid .day.has-event::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--pl-green);
  border-radius: 50%;
}
.mini-cal-grid .day.today.has-event::after { background: var(--pl-green-lime); }
.mini-cal-grid .day.selected { border: 2px solid var(--pl-blue); }

.tz-card {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  padding: 14px 16px;
}
.tz-card h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; margin: 0 0 10px; color: var(--pl-gray-500); font-weight: 700; }
.tz-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  padding: 4px 0;
  border-top: 1px solid var(--pl-gray-100);
}
.tz-row:first-of-type { border-top: 0; }
.tz-row .tz-loc { color: var(--pl-gray-700); display: inline-flex; align-items: center; gap: 6px; }
.tz-row .tz-t { font-weight: 700; }

.agenda-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.agenda-day {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  overflow: hidden;
}
.agenda-day-head {
  background: var(--pl-bg);
  padding: 12px 18px;
  border-bottom: 1px solid var(--pl-gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.agenda-day-head .day-label { font-weight: 700; font-size: 14px; }
.agenda-day-head .day-label .day-num { font-size: 18px; color: var(--pl-blue); margin-right: 6px; }
.agenda-day-head .day-count {
  font-size: 11px;
  color: var(--pl-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.meeting-row {
  display: grid;
  grid-template-columns: 80px 4px 1fr auto;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--pl-gray-100);
  cursor: pointer;
  transition: background 120ms;
  align-items: center;
}
.meeting-row:hover { background: var(--pl-bg); }
.meeting-row:last-child { border-bottom: 0; }
.meeting-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--pl-blue);
  letter-spacing: -0.2px;
}
.meeting-time .tz-suffix { display: block; font-size: 10px; color: var(--pl-gray-500); font-weight: 600; margin-top: 2px; }
.meeting-bar {
  width: 4px;
  align-self: stretch;
  background: var(--pl-blue);
  border-radius: 999px;
}
.meeting-row.t-discovery .meeting-bar { background: var(--pl-blue); }
.meeting-row.t-demo .meeting-bar { background: var(--pl-green); }
.meeting-row.t-followup .meeting-bar { background: var(--pl-warning); }
.meeting-row.t-internal .meeting-bar { background: var(--pl-gray-500); }
.meeting-row.t-close .meeting-bar { background: var(--pl-green-dark); }
.meeting-body { min-width: 0; }
.meeting-title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.meeting-meta { display: flex; gap: 10px; margin-top: 4px; font-size: 11.5px; color: var(--pl-gray-500); flex-wrap: wrap; }
.meeting-meta .mm-item { display: inline-flex; align-items: center; gap: 4px; }
.meeting-actions { display: flex; gap: 4px; }
.meeting-action {
  width: 32px; height: 32px;
  border-radius: var(--pl-r-md);
  border: 1px solid var(--pl-gray-200);
  background: var(--pl-white);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--pl-gray-700);
  transition: border-color 120ms, color 120ms;
}
.meeting-action:hover { border-color: var(--pl-blue); color: var(--pl-blue); }

.meeting-brief {
  background: linear-gradient(90deg, var(--pl-blue-soft) 0%, transparent 100%);
  border-left: 3px solid var(--pl-blue);
  border-radius: var(--pl-r-sm);
  padding: 10px 14px;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
}
.meeting-brief .mb-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--pl-blue);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ============================================================
   TAREFAS
   ============================================================ */
.task-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.task-col {
  background: var(--pl-bg);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.task-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--pl-gray-200);
  margin-bottom: 4px;
}
.task-col-title {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.task-col-title.urgent { color: var(--pl-danger); }
.task-col-title.today { color: var(--pl-warning); }
.task-col-title.week { color: var(--pl-blue); }
.task-col-count {
  font-size: 14px;
  font-weight: 800;
  color: var(--pl-charcoal);
}
.task-card {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 120ms, transform 120ms;
}
.task-card:hover { border-color: var(--pl-blue); transform: translateY(-1px); }
.task-card .tc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.task-card .tc-source {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--pl-r-sm);
}
.task-card .tc-source.polly {
  background: var(--pl-blue-soft);
  color: var(--pl-blue);
}
.task-card .tc-source.me {
  background: var(--pl-gray-100);
  color: var(--pl-gray-700);
}
.task-card .tc-source.deadline {
  background: var(--pl-danger-soft);
  color: var(--pl-danger);
}
.task-card .tc-time {
  font-size: 11px;
  color: var(--pl-gray-500);
  margin-left: auto;
}
.task-card .tc-title {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
}
.task-card .tc-context {
  font-size: 11.5px;
  color: var(--pl-gray-700);
  margin-top: 4px;
  line-height: 1.4;
}
.task-card .tc-foot {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.task-card .tc-lead {
  font-size: 11px;
  color: var(--pl-gray-500);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.task-card .tc-cta {
  font-size: 11px;
  font-weight: 700;
  color: var(--pl-blue);
}
.task-card.done {
  opacity: 0.55;
}
.task-card.done .tc-title { text-decoration: line-through; }

/* Pra fazer hoje (widget no dashboard) */
.today-widget {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  margin-bottom: 24px;
  overflow: hidden;
}
.today-widget-head {
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-white);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.today-widget-head::after {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 140px; height: 140px;
  background: var(--pl-green-lime);
  border-radius: 50%;
  opacity: 0.16;
}
.today-widget-head h3 { font-size: 14px; color: var(--pl-white); margin: 0; position: relative; z-index: 1; }
.today-widget-head .twh-count {
  background: var(--pl-green-lime);
  color: var(--pl-blue-navy);
  padding: 3px 10px;
  border-radius: var(--pl-r-pill);
  font-size: 11px;
  font-weight: 800;
  position: relative; z-index: 1;
}
.today-widget-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.today-widget-cell {
  padding: 14px 18px;
  border-right: 1px solid var(--pl-gray-100);
}
.today-widget-cell:last-child { border-right: 0; }
.today-widget-cell h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--pl-gray-500);
  font-weight: 700;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.today-widget-cell .tw-item {
  padding: 8px 0;
  border-top: 1px solid var(--pl-gray-100);
  font-size: 12.5px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}
.today-widget-cell .tw-item:first-child { border-top: 0; padding-top: 0; }
.today-widget-cell .tw-item:hover { color: var(--pl-blue); }
.today-widget-cell .tw-ico {
  width: 16px; height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--pl-white);
}

/* ============================================================
   Help widget flutuante
   ============================================================ */
.help-fab {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 52px; height: 52px;
  background: var(--pl-blue);
  color: var(--pl-white);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--pl-shadow-lg);
  border: none;
  z-index: 800;
  transition: transform 160ms, background 120ms;
}
.help-fab:hover { transform: scale(1.08); background: var(--pl-blue-navy); }
.help-fab .help-dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 10px; height: 10px;
  background: var(--pl-green-lime);
  border: 2px solid var(--pl-blue);
  border-radius: 50%;
}
.help-panel {
  position: fixed;
  bottom: 88px; right: 28px;
  width: 320px;
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  box-shadow: var(--pl-shadow-lg);
  z-index: 800;
  display: none;
  flex-direction: column;
  overflow: hidden;
  max-height: 70vh;
  /* NOTA: 'animation: slide-up' removido — esta regra antiga é substituída pela nova
     .help-panel (busque "substitui help-panel antigo"). O 'display:flex' da regra nova
     vencia a cascata e mantinha o painel sempre renderizado, mas a animação aqui vazava
     e tocava a cada load → painel "abria e fechava sozinho" ao trocar de página. */
}
.help-panel.open { display: flex; }
.help-panel-head {
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-white);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.help-panel-head .hp-avatar {
  width: 32px; height: 32px;
  background: var(--pl-green-lime);
  color: var(--pl-blue-navy);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
}
.help-panel-head .hp-info h4 { font-size: 13px; margin: 0; color: var(--pl-white); }
.help-panel-head .hp-info .hp-sub { font-size: 11px; opacity: 0.85; display: inline-flex; align-items: center; gap: 4px; }
.help-panel-head .hp-info .hp-sub::before {
  content: ''; width: 6px; height: 6px; background: var(--pl-green-lime); border-radius: 50%;
}
.help-panel-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12.5px;
  overflow-y: auto;
}
.help-quick {
  background: var(--pl-bg);
  border: 1px solid var(--pl-gray-200);
  padding: 8px 12px;
  border-radius: var(--pl-r-md);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.help-quick:hover { border-color: var(--pl-blue); color: var(--pl-blue); }
.help-panel-foot {
  border-top: 1px solid var(--pl-gray-200);
  padding: 10px 14px;
  display: flex;
  gap: 8px;
}
.help-panel-foot input {
  flex: 1;
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 8px 10px;
  font-size: 12.5px;
  outline: none;
}
.help-panel-foot input:focus { border-color: var(--pl-blue); }

/* ============================================================
   Sidebar com nav-pulse pra inbox/agenda/tarefas
   ============================================================ */
.sidebar-nav-label.hoje { color: var(--pl-warning); }

/* ============================================================
   Relatório mensal pro sócio
   ============================================================ */
.rel-hero {
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-on-accent);
  border-radius: var(--pl-r-lg);
  padding: 24px 28px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}
.rel-hero::after {
  content: '';
  position: absolute;
  right: -50px; bottom: -50px;
  width: 200px; height: 200px;
  background: var(--pl-green-lime);
  border-radius: 50%;
  opacity: 0.16;
}
.rel-hero-info { position: relative; z-index: 1; }
.rel-hero h2 {
  font-size: 24px;
  margin: 0;
  letter-spacing: -0.4px;
  color: var(--pl-on-accent);
}
.rel-hero .rel-sub {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 4px;
}
.rel-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 24px;
  margin-top: 16px;
}
.rel-hero-stats .rh-s .v {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--pl-green-lime);
  line-height: 1;
}
.rel-hero-stats .rh-s .k {
  font-size: 11px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  margin-top: 4px;
}
.rel-hero-actions {
  position: relative; z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

/* Section de delivery */
.delivery-list {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  overflow: hidden;
  margin-bottom: 16px;
}
.delivery-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--pl-gray-200);
  background: var(--pl-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.delivery-head h3 { font-size: 14px; margin: 0; }
.delivery-head .sub { font-size: 11.5px; color: var(--pl-gray-500); margin-top: 2px; }
.delivery-head .approval-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--pl-r-pill);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.delivery-head .approval-badge.approved {
  background: var(--pl-green-soft);
  color: var(--pl-green-dark);
}
.delivery-head .approval-badge.pending {
  background: var(--pl-warning-soft);
  color: var(--pl-warning-dark);
}

.delivery-row {
  display: grid;
  grid-template-columns: 1fr 104px 90px 124px 108px;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--pl-gray-100);
  font-size: 12.5px;
}
.delivery-row:last-child { border-bottom: 0; }
.delivery-row:hover { background: var(--pl-bg); }
.delivery-row .dr-flag { display: grid; place-items: center; }
.delivery-row .dr-lead { font-weight: 700; }
.delivery-row .dr-lead .dr-sub { font-weight: 500; color: var(--pl-gray-500); font-size: 11px; }
.delivery-row .dr-date { color: var(--pl-gray-500); }
.delivery-row .dr-value { font-weight: 700; color: var(--pl-green-dark); text-align: right; }
.delivery-row .dr-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--pl-r-pill);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  justify-self: start;
}
.delivery-row .dr-status.approved { background: var(--pl-green-soft); color: var(--pl-green-dark); }
.delivery-row .dr-status.pending { background: var(--pl-warning-soft); color: var(--pl-warning-dark); }
.delivery-row .dr-status.rejected { background: var(--pl-danger-soft); color: var(--pl-danger-dark); }
/* closed era branco sobre --pl-green (2.25:1 no light) → pílula soft legível nos 2 temas */
.delivery-row .dr-status.closed { background: var(--pl-green-soft); color: var(--pl-green-dark); }
.delivery-row .dr-action {
  text-align: right;
  font-size: 11px;
  color: var(--pl-blue);
  font-weight: 700;
  cursor: pointer;
}

.delivery-summary {
  background: var(--pl-bg);
  padding: 14px 18px;
  border-top: 1px solid var(--pl-gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.delivery-summary .ds-total { font-size: 14px; font-weight: 700; }
.delivery-summary .ds-val { font-size: 20px; font-weight: 800; color: var(--pl-green-dark); letter-spacing: -0.3px; }

/* History timeline meses anteriores */
.history-months {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.history-card {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 120ms;
}
.history-card:hover { border-color: var(--pl-blue); }
.history-card .hc-month {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--pl-gray-500);
  font-weight: 700;
  margin-bottom: 6px;
}
.history-card .hc-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--pl-blue);
  letter-spacing: -0.3px;
}
.history-card .hc-sub {
  font-size: 11px;
  color: var(--pl-gray-500);
  margin-top: 4px;
}

/* ============================================================
   Feedback loop Polly (agente.html)
   ============================================================ */
.polly-learning {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  overflow: hidden;
}
.learning-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 18px;
}
.learning-item {
  background: var(--pl-bg);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 12px 14px;
  display: flex;
  gap: 12px;
}
.learning-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.learning-icon.positive { background: var(--pl-green-soft); color: var(--pl-green-dark); }
.learning-icon.negative { background: var(--pl-danger-soft); color: var(--pl-danger); }
.learning-icon.adjustment { background: var(--pl-info-soft); color: var(--pl-blue); }
.learning-body { flex: 1; min-width: 0; }
.learning-title { font-weight: 700; font-size: 13px; }
.learning-desc { font-size: 12px; color: var(--pl-gray-700); margin-top: 4px; line-height: 1.45; }
.learning-meta { display: flex; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--pl-gray-500); }

/* Feedback buttons on Polly messages */
.tmsg-feedback {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.tmsg-fb-btn {
  background: rgba(255,255,255,0.12);
  border: none;
  color: rgba(255,255,255,0.85);
  padding: 4px 10px;
  border-radius: var(--pl-r-sm);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tmsg-fb-btn:hover { background: rgba(255,255,255,0.22); }
.tmsg-fb-btn.up.active { background: var(--pl-green-lime); color: var(--pl-blue-navy); }
.tmsg-fb-btn.down.active { background: var(--pl-danger); color: var(--pl-white); }

/* ============================================================
   Manual lead capture modal
   ============================================================ */
.lead-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 20px 24px;
}
.lead-form-grid .form-row.full { grid-column: span 2; }

/* Demo mode banner */
.demo-banner {
  position: fixed;
  bottom: 24px; left: 24px;
  background: var(--pl-warning);
  color: var(--pl-blue-navy);
  padding: 8px 14px;
  border-radius: var(--pl-r-pill);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  box-shadow: var(--pl-shadow-lg);
  z-index: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.demo-banner::before {
  content: '●';
  color: var(--pl-blue-navy);
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
body.demo-mode .demo-banner { display: flex; }
.demo-banner { display: none; }

/* ============================================================
   Polly Analysis — fluxo visual de como escolhe o case
   ============================================================ */
.polly-analysis {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  overflow: hidden;
}
.polly-analysis-header {
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-white);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.polly-analysis-header::after {
  content: '';
  position: absolute;
  right: -40px; bottom: -40px;
  width: 160px; height: 160px;
  background: var(--pl-green-lime);
  border-radius: 50%;
  opacity: 0.16;
}
.pa-avatar {
  width: 52px; height: 52px;
  background: var(--pl-green-lime);
  color: var(--pl-blue-navy);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 22px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.15);
}
.pa-text { position: relative; z-index: 1; flex: 1; }
.pa-text h3 { font-size: 17px; color: var(--pl-white); margin: 0 0 2px; letter-spacing: -0.2px; }
.pa-text h3 em { color: var(--pl-green-lime); font-style: normal; }
.pa-text p { font-size: 13px; opacity: 0.9; margin: 0; }

.polly-analysis-body {
  padding: 28px;
}

.criteria-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--pl-gray-500);
  font-weight: 700;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.criteria-section-title::before {
  content: '';
  width: 18px; height: 2px;
  background: var(--pl-blue);
  border-radius: 1px;
}

.criteria-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.criterion {
  background: var(--pl-bg);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 14px 12px;
  text-align: center;
  position: relative;
  transition: transform 160ms, border-color 160ms, box-shadow 160ms;
  cursor: default;
}
.criterion:hover {
  transform: translateY(-2px);
  border-color: var(--pl-blue);
  box-shadow: var(--pl-shadow);
}
.criterion .crit-num {
  position: absolute;
  top: -8px; left: 8px;
  width: 20px; height: 20px;
  background: var(--pl-blue);
  color: var(--pl-white);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
}
.criterion .crit-ico {
  width: 36px; height: 36px;
  background: var(--pl-blue-soft);
  color: var(--pl-blue);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 6px auto 8px;
}
.criterion .crit-title { font-size: 12px; font-weight: 700; color: var(--pl-charcoal); }
.criterion .crit-sub { font-size: 10.5px; color: var(--pl-gray-500); margin-top: 4px; line-height: 1.35; }

/* Exemplo concreto — match visual */
.match-example {
  background: linear-gradient(135deg, var(--pl-bg) 0%, var(--pl-white) 100%);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  padding: 24px;
  position: relative;
}
.match-example-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--pl-gray-500);
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.match-example-title::before {
  content: '';
  width: 18px; height: 2px;
  background: var(--pl-green);
  border-radius: 1px;
}

.match-flow {
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  align-items: stretch;
  gap: 8px;
}

.match-card {
  background: var(--pl-white);
  border: 2px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.match-card .mc-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--pl-gray-500);
  font-weight: 700;
  margin-bottom: 10px;
}
.match-card .mc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.match-card .mc-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--pl-blue-soft);
  color: var(--pl-blue);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.match-card .mc-avatar.g { background: var(--pl-green-soft); color: var(--pl-green-dark); }
.match-card .mc-name { font-weight: 700; font-size: 14px; letter-spacing: -0.1px; }
.match-card .mc-role { font-size: 12px; color: var(--pl-gray-500); margin-top: 1px; }

.match-card.lead-card { border-color: var(--pl-blue); }
.match-card.lead-card .mc-label { color: var(--pl-blue); }
.match-card.case-card { border-color: var(--pl-green); }
.match-card.case-card .mc-label { color: var(--pl-green-dark); }

.match-attrs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.match-attr {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  padding: 4px 8px;
  background: var(--pl-bg);
  border-radius: var(--pl-r-sm);
  align-items: center;
}
.match-attr .ma-k { color: var(--pl-gray-500); font-weight: 600; text-transform: uppercase; font-size: 9.5px; letter-spacing: 0.4px; }
.match-attr .ma-v { font-weight: 600; color: var(--pl-charcoal); font-size: 11.5px; }
.match-attr.matched { background: var(--pl-green-soft); border-left: 2px solid var(--pl-green); }
.match-attr.matched .ma-k { color: var(--pl-green-dark); }
.match-attr.matched .ma-v { color: var(--pl-green-dark); font-weight: 700; }

.match-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.match-arrow .ma-score {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: conic-gradient(var(--pl-green) calc(var(--score, 94%) * 1%), var(--pl-gray-200) 0);
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.match-arrow .ma-score::after {
  content: '';
  position: absolute;
  inset: 5px;
  background: var(--pl-white);
  border-radius: 50%;
}
.match-arrow .ma-score span {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 800;
  color: var(--pl-green-dark);
  letter-spacing: -0.3px;
}
.match-arrow .ma-arrow {
  color: var(--pl-gray-300);
  font-size: 20px;
}
.match-arrow .ma-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--pl-green-dark);
  text-align: center;
  line-height: 1.2;
}

.match-conclusion {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--pl-green-soft);
  border-left: 3px solid var(--pl-green);
  border-radius: var(--pl-r-md);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--pl-gray-900);
}
.match-conclusion b { color: var(--pl-green-dark); }

@media (max-width: 1100px) {
  .criteria-grid { grid-template-columns: repeat(3, 1fr); }
  .match-flow { grid-template-columns: 1fr; }
  .match-arrow { flex-direction: row; }
}

/* ============================================================
   Análise da Polly (briefing.html) — redesign
   ============================================================ */

/* Score hero novo */
.pa-score-hero {
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-white);
  border-radius: var(--pl-r-lg);
  padding: 18px 20px;
  margin: 0 20px 16px;
  position: relative;
  overflow: hidden;
}
.pa-score-hero::after {
  content: '';
  position: absolute;
  right: -30px; bottom: -30px;
  width: 130px; height: 130px;
  background: var(--pl-green-lime);
  border-radius: 50%;
  opacity: 0.18;
}
.pa-score-row {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.pa-score-big {
  width: 64px; height: 64px;
  background: var(--pl-green-lime);
  color: var(--pl-blue-navy);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 28px;
  flex-shrink: 0;
  letter-spacing: -1px;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.12);
}
.pa-score-meta { flex: 1; min-width: 0; }
.pa-score-meta .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  opacity: 0.85;
  font-weight: 700;
}
.pa-score-meta .verdict {
  font-size: 16px;
  font-weight: 800;
  margin-top: 2px;
  letter-spacing: -0.2px;
}
.pa-score-summary {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 12.5px;
  line-height: 1.5;
  opacity: 0.95;
  position: relative;
  z-index: 1;
}
.pa-score-summary b { color: var(--pl-green-lime); }

/* KPI cards do potencial */
.pa-potential {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 20px 16px;
}
.pa-kpi {
  background: var(--pl-bg);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 12px 14px;
  position: relative;
}
.pa-kpi::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--pl-blue);
  border-radius: 999px 0 0 999px;
}
.pa-kpi.green::before { background: var(--pl-green); }
.pa-kpi .pa-kpi-label {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--pl-gray-500);
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.pa-kpi .pa-kpi-label svg { color: var(--pl-blue); }
.pa-kpi.green .pa-kpi-label svg { color: var(--pl-green-dark); }
.pa-kpi .pa-kpi-v {
  font-size: 18px;
  font-weight: 800;
  color: var(--pl-blue);
  letter-spacing: -0.4px;
  line-height: 1.15;
}
.pa-kpi.green .pa-kpi-v { color: var(--pl-green-dark); }
.pa-kpi .pa-kpi-sub {
  font-size: 10.5px;
  color: var(--pl-gray-500);
  margin-top: 4px;
  line-height: 1.35;
}

/* Reasons grid (por que é um lead) */
.pa-section { padding: 12px 20px; }
.pa-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--pl-gray-500);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.pa-section-label::before {
  content: '';
  width: 14px; height: 2px;
  background: var(--pl-blue);
  border-radius: 1px;
}
.pa-section-label.pros::before { background: var(--pl-green); }
.pa-section-label.cons::before { background: var(--pl-warning); }

.pa-reasons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pa-reason {
  background: var(--pl-bg);
  border-left: 2px solid var(--pl-blue);
  border-radius: var(--pl-r-sm);
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--pl-gray-900);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.pa-reason .pa-r-num {
  background: var(--pl-blue);
  color: var(--pl-white);
  width: 16px; height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9.5px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Prós e contras lado a lado */
.pa-balance {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pa-balance-side {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 12px;
  overflow: hidden;
}
.pa-balance-side.pros { border-color: rgba(122, 183, 59, 0.4); background: linear-gradient(180deg, var(--pl-green-soft) 0%, var(--pl-white) 60%); }
.pa-balance-side.cons { border-color: rgba(229, 168, 35, 0.4); background: linear-gradient(180deg, var(--pl-warning-soft) 0%, var(--pl-white) 60%); }
.pa-balance-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--pl-gray-100);
}
.pa-balance-side.pros .pa-balance-head { color: var(--pl-green-dark); }
.pa-balance-side.cons .pa-balance-head { color: #92691A; }
.pa-balance-head .pa-count {
  margin-left: auto;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.pa-bullet {
  font-size: 12px;
  line-height: 1.45;
  padding: 6px 0;
  border-top: 1px solid rgba(0,0,0,0.04);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.pa-bullet:first-of-type { border-top: 0; padding-top: 0; }
.pa-bullet-ico {
  width: 14px; height: 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}
.pa-balance-side.pros .pa-bullet-ico {
  background: var(--pl-green-dark);
  color: var(--pl-white);
}
.pa-balance-side.cons .pa-bullet-ico {
  background: var(--pl-warning);
  color: var(--pl-white);
}

/* Next action sugerida */
.pa-next-action {
  margin: 16px 20px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--pl-green-dark) 0%, var(--pl-green) 100%);
  color: var(--pl-white);
  border-radius: var(--pl-r-md);
  position: relative;
  overflow: hidden;
}
.pa-next-action::after {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 80px; height: 80px;
  background: var(--pl-green-lime);
  border-radius: 50%;
  opacity: 0.2;
}
.pa-next-action .pa-na-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--pl-green-lime);
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative; z-index: 1;
}
.pa-next-action .pa-na-text {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  position: relative; z-index: 1;
}

/* ============================================================
   V2 — EXPANSÃO (R$ 5k tier)
   ESG, Enriquecimento, Multi-canal, Dashboard, Agente IA,
   Cases, Notificações, Integrações, Impacto
   ============================================================ */

/* --- Topbar com notification bell --- */
.topbar-bell {
  position: relative;
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  width: 36px; height: 36px;
  border-radius: var(--pl-r-md);
  display: grid; place-items: center;
  color: var(--pl-gray-700);
  cursor: pointer;
  transition: background 120ms, border-color 120ms;
}
.topbar-bell:hover { border-color: var(--pl-blue); color: var(--pl-blue); }
.topbar-bell .bell-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--pl-danger);
  border: 2px solid var(--pl-white);
  border-radius: 50%;
}

/* --- ESG Score gauge / badge --- */
.esg-gauge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px 3px 3px;
  border-radius: var(--pl-r-pill);
  background: var(--pl-green-soft);
  color: var(--pl-green-dark);
}
.esg-gauge .gauge-ring {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: conic-gradient(var(--pl-green) var(--p, 75%), var(--pl-gray-200) 0);
  position: relative;
}
.esg-gauge .gauge-ring::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--pl-green-soft);
  border-radius: 50%;
}
.esg-gauge.low { background: var(--pl-warning-soft); color: #92691A; }
.esg-gauge.low .gauge-ring { background: conic-gradient(var(--pl-warning) var(--p, 35%), var(--pl-gray-200) 0); }
.esg-gauge.low .gauge-ring::after { background: var(--pl-warning-soft); }
.esg-gauge.mid { background: var(--pl-info-soft); color: var(--pl-blue); }
.esg-gauge.mid .gauge-ring { background: conic-gradient(var(--pl-blue) var(--p, 55%), var(--pl-gray-200) 0); }
.esg-gauge.mid .gauge-ring::after { background: var(--pl-info-soft); }

.esg-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--pl-r-sm);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.esg-pill.adv  { background: var(--pl-green-dark); color: var(--pl-white); }
.esg-pill.med  { background: var(--pl-info-soft); color: var(--pl-blue); }
.esg-pill.ini  { background: var(--pl-warning-soft); color: #92691A; }

/* --- Multi-channel chip --- */
.channel-chips { display: inline-flex; gap: 4px; }
.channel-chip {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--pl-white);
}
.channel-chip.email   { background: var(--pl-blue); }
.channel-chip.linkedin{ background: #0A66C2; }
.channel-chip.whatsapp{ background: #25D366; }
.channel-chip.muted   { background: var(--pl-gray-300); }

/* --- Buying signal indicator --- */
.signal-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--pl-r-sm);
  background: linear-gradient(90deg, #FFE6CC 0%, #FFD49E 100%);
  color: #92520A;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  animation: pulse-warm 2s ease-in-out infinite;
}
@keyframes pulse-warm {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 168, 35, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(229, 168, 35, 0); }
}

/* --- Dashboard: KPI cards --- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 640px) {
  /* mobile: 2×2 em vez de 4 colunas de ~72px que cortavam valor/rótulo */
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}
.kpi {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.kpi.featured {
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-white);
  border-color: transparent;
}
.kpi.featured::after {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 130px; height: 130px;
  background: var(--pl-green-lime);
  border-radius: 50%;
  opacity: 0.18;
}
.kpi .kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  opacity: 0.85;
  margin-bottom: 4px;
}
.kpi .kpi-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.1;
  position: relative; z-index: 1;
}
.kpi:not(.featured) .kpi-value { color: var(--pl-blue); }
.kpi .kpi-delta {
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.kpi:not(.featured) .kpi-delta { color: var(--pl-green-dark); }
.kpi .kpi-delta.down { color: var(--pl-danger) !important; }

/* --- Dashboard: Chart cards --- */
.chart-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.chart-card {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  padding: 20px;
}
.chart-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.chart-card-head h3 { font-size: 14px; }
.chart-card-head .sub { font-size: 12px; color: var(--pl-gray-500); }

/* Simple bar chart (SVG-free, divs) */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 180px;
  padding-top: 16px;
  border-bottom: 1px solid var(--pl-gray-200);
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}
.bar-col .bar {
  width: 100%;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 100%);
  border-radius: 4px 4px 0 0;
  position: relative;
  min-height: 4px;
  transition: opacity 120ms;
}
.bar-col .bar:hover { opacity: 0.8; }
.bar-col .bar::before {
  content: attr(data-v);
  position: absolute;
  top: -22px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  color: var(--pl-charcoal);
  white-space: nowrap;
}
.bar-col .bar.b2 { background: linear-gradient(180deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%); }
.bar-labels {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--pl-gray-500);
  font-weight: 600;
}
.bar-labels span { flex: 1; text-align: center; }

/* Donut */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 0;
}
.donut {
  width: 130px; height: 130px;
  border-radius: 50%;
  background: conic-gradient(
    #FFFFFF 0% var(--seg1, 42%),
    var(--pl-blue) var(--seg1, 42%) var(--seg2, 70%),
    var(--pl-warning) var(--seg2, 70%) var(--seg3, 88%),
    var(--pl-gray-300) var(--seg3, 88%) 100%
  );
  position: relative;
  flex-shrink: 0;
}
.donut::after {
  content: '';
  position: absolute;
  inset: 22px;
  background: var(--pl-white);
  border-radius: 50%;
}
.donut .donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
}
.donut .donut-center .v { font-size: 24px; font-weight: 800; color: var(--pl-blue); letter-spacing: -0.4px; }
.donut .donut-center .k { font-size: 10px; color: var(--pl-gray-500); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; }
.donut-legend { flex: 1; }
.donut-legend .item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
}
.donut-legend .item .swatch { width: 10px; height: 10px; border-radius: 3px; }
.donut-legend .item .pct { margin-left: auto; font-weight: 700; }

/* Heatmap */
.heatmap {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  gap: 4px;
  font-size: 11px;
}
.heatmap .hm-time { color: var(--pl-gray-500); display: grid; place-items: center; height: 30px; }
.heatmap .hm-label { color: var(--pl-gray-500); display: grid; place-items: center; height: 24px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.heatmap .hm-cell {
  height: 30px;
  border-radius: 4px;
  background: var(--pl-gray-100);
  display: grid; place-items: center;
  font-size: 10px;
  color: var(--pl-gray-500);
  cursor: pointer;
  transition: transform 120ms;
}
.heatmap .hm-cell:hover { transform: scale(1.1); }
.heatmap .hm-cell.l1 { background: #E8EDF8; color: var(--pl-blue); }
.heatmap .hm-cell.l2 { background: #B7C9E8; color: var(--pl-blue-navy); }
.heatmap .hm-cell.l3 { background: var(--pl-blue); color: var(--pl-white); font-weight: 700; }
.heatmap .hm-cell.l4 { background: var(--pl-blue-navy); color: var(--pl-green-lime); font-weight: 700; }

/* Forecast list */
.forecast-list { display: flex; flex-direction: column; }
.forecast-row {
  display: grid;
  grid-template-columns: 1fr 100px 90px 60px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--pl-gray-100);
  gap: 8px;
}
.forecast-row:last-child { border-bottom: 0; }
.forecast-row .co { font-weight: 600; font-size: 13px; }
.forecast-row .stage { font-size: 11px; color: var(--pl-gray-500); }
.forecast-row .value { font-weight: 700; color: var(--pl-blue); text-align: right; }
.forecast-row .prob {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--pl-r-pill);
  background: var(--pl-green-soft);
  color: var(--pl-green-dark);
  justify-self: center;
}
.forecast-row .prob.med { background: var(--pl-info-soft); color: var(--pl-blue); }
.forecast-row .prob.low { background: var(--pl-warning-soft); color: #92691A; }
.forecast-row .pct { font-size: 12px; font-weight: 700; color: var(--pl-gray-700); text-align: right; }

/* AB Test card */
.ab-test {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ab-variant {
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 14px;
  position: relative;
}
.ab-variant.winner { border-color: var(--pl-green); background: var(--pl-green-soft); }
.ab-variant .ab-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: var(--pl-gray-500);
  margin-bottom: 4px;
}
.ab-variant.winner .ab-label { color: var(--pl-green-dark); }
.ab-variant .ab-subj { font-size: 13px; font-weight: 600; line-height: 1.4; margin-bottom: 10px; }
.ab-variant .ab-metric { font-size: 24px; font-weight: 800; color: var(--pl-blue); letter-spacing: -0.4px; }
.ab-variant .ab-key { font-size: 11px; color: var(--pl-gray-500); }
.ab-variant .winner-tag {
  position: absolute;
  top: -8px; right: 10px;
  background: var(--pl-green);
  color: var(--pl-white);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--pl-r-pill);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* --- Notificações feed --- */
.notif-feed { display: flex; flex-direction: column; gap: 8px; }
.notif {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  padding: 14px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
  transition: border-color 120ms, background 120ms;
  cursor: pointer;
}
.notif:hover { border-color: var(--pl-blue); }
.notif.unread {
  background: linear-gradient(90deg, var(--pl-blue-soft) 0%, var(--pl-white) 30%);
  border-left: 3px solid var(--pl-blue);
}
.notif .notif-ico {
  width: 36px; height: 36px;
  border-radius: var(--pl-r-md);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.notif.t-buying .notif-ico { background: linear-gradient(135deg, #FFD49E 0%, #FFA94D 100%); color: #7A3D08; }
.notif.t-esg .notif-ico { background: var(--pl-green-soft); color: var(--pl-green-dark); }
.notif.t-reply .notif-ico { background: var(--pl-info-soft); color: var(--pl-blue); }
.notif.t-news .notif-ico { background: var(--pl-blue-soft); color: var(--pl-blue); }
.notif.t-risk .notif-ico { background: var(--pl-danger-soft); color: var(--pl-danger); }
/* Dark: ícone navy/vermelho sobre o chip escuro (soft) perde contraste (medido 1.44/2.78:1) →
   clareia como TEXTO/ícone (Regra Nº2). Cobre também o popover do sino (.notif-mini). */
body.theme-dark .notif.t-reply .notif-ico,
body.theme-dark .notif.t-news .notif-ico { color: var(--pl-blue-text); }
body.theme-dark .notif.t-risk .notif-ico { color: var(--pl-danger-dark); }
.notif .notif-body { flex: 1; min-width: 0; }
.notif .notif-title { font-weight: 700; font-size: 13px; }
.notif .notif-desc { font-size: 12.5px; color: var(--pl-gray-700); margin-top: 3px; line-height: 1.45; }
.notif .notif-meta { display: flex; gap: 10px; margin-top: 6px; font-size: 11px; color: var(--pl-gray-500); }
.notif .notif-time { font-size: 11px; color: var(--pl-gray-500); white-space: nowrap; }

/* ============================================================
   Sino do topbar — prévia de notificações (popover ancorado).
   Aberto pelo app.js (wireNotifBell): mostra os últimos eventos
   numa visualização menor, com "Ver mais" pra página inteira.
   ============================================================ */
.notif-pop {
  position: fixed;
  z-index: 60;
  width: 360px;
  max-width: calc(100vw - 16px);
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  box-shadow: 0 18px 50px rgba(20, 46, 102, 0.18);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}
.notif-pop.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.notif-pop-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--pl-gray-200);
}
.notif-pop-title { font-weight: 700; font-size: 14px; }
.notif-pop-read {
  background: none; border: none; padding: 0;
  color: var(--pl-blue); font-size: 12px; font-weight: 600; cursor: pointer;
}
.notif-pop-read:hover { text-decoration: underline; }
.notif-pop-body {
  max-height: 360px; overflow-y: auto;
  padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.notif-pop .notif-mini { padding: 10px 12px; gap: 10px; cursor: default; }
.notif-pop .notif-mini:hover { border-color: var(--pl-gray-200); }
.notif-pop .notif-mini.unread:hover { border-left-color: var(--pl-blue); }
.notif-pop .notif-mini .notif-ico { width: 32px; height: 32px; }
.notif-pop .notif-mini .notif-ico .icon { width: 17px; height: 17px; }
.notif-pop .notif-mini .notif-title { font-size: 12.5px; }
.notif-pop .notif-mini .notif-desc {
  font-size: 11.5px; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notif-pop .notif-mini .notif-time { font-size: 10.5px; }
.notif-pop-empty {
  padding: 26px 18px; text-align: center;
  color: var(--pl-gray-500); font-size: 12.5px; line-height: 1.5;
}
.notif-pop-sk { padding: 4px; display: flex; flex-direction: column; gap: 8px; }
.notif-pop-sk .skeleton { height: 52px; border-radius: var(--pl-r-md); }
.notif-pop-more {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px;
  border-top: 1px solid var(--pl-gray-200);
  font-size: 13px; font-weight: 700; color: var(--pl-blue);
  text-decoration: none;
  transition: background 120ms;
}
.notif-pop-more:hover { background: var(--pl-blue-soft); }
.notif-pop-more svg { width: 15px; height: 15px; }
body.theme-dark .notif-pop { background: var(--pl-white); border-color: var(--pl-gray-200); }

/* Notification filters */
.notif-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* --- Cases library --- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.case-card {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 160ms, box-shadow 160ms;
}
.case-card:hover { transform: translateY(-2px); box-shadow: var(--pl-shadow-lg); }
.case-card .case-cover {
  height: 110px;
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  position: relative;
  display: grid;
  place-items: center;
  color: var(--pl-white);
}
.case-card .case-cover .case-logo {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.6px;
}
.case-card .case-cover .case-sector {
  position: absolute;
  top: 10px; left: 12px;
  font-size: 10px;
  background: rgba(255,255,255,0.18);
  padding: 3px 8px;
  border-radius: var(--pl-r-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}
.case-card .case-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.case-card h4 { font-size: 15px; margin: 0 0 6px; font-weight: 700; }
.case-card .case-desc { font-size: 12.5px; color: var(--pl-gray-700); line-height: 1.5; flex: 1; }
.case-card .case-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.case-card .case-stat {
  background: var(--pl-bg);
  padding: 8px 10px;
  border-radius: var(--pl-r-sm);
}
.case-card .case-stat .v { font-size: 16px; font-weight: 800; color: var(--pl-blue); letter-spacing: -0.3px; }
.case-card .case-stat .k { font-size: 10px; color: var(--pl-gray-500); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
.case-card .case-footer {
  padding: 12px 16px;
  background: var(--pl-bg);
  border-top: 1px solid var(--pl-gray-100);
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.case-card .ai-match {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--pl-green-dark);
  background: var(--pl-green-soft);
  padding: 3px 8px;
  border-radius: var(--pl-r-pill);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* --- Enriquecimento BR cards (CNPJ, news, Glassdoor, Reclame Aqui) --- */
.enrich-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0;
}
.enrich-card {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 14px;
}
.enrich-card .enrich-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--pl-gray-500);
  font-weight: 700;
}
.enrich-card .enrich-head .src {
  background: var(--pl-bg);
  padding: 2px 6px;
  border-radius: var(--pl-r-sm);
  color: var(--pl-gray-700);
}
.enrich-card .enrich-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12.5px;
}
.enrich-card .enrich-row .k { color: var(--pl-gray-500); }
.enrich-card .enrich-row .v { font-weight: 600; }
.enrich-news {
  font-size: 12.5px;
  line-height: 1.5;
  padding: 6px 0;
  border-top: 1px solid var(--pl-gray-100);
  margin-top: 6px;
}
.enrich-news:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.enrich-news .date { font-size: 10px; color: var(--pl-gray-500); text-transform: uppercase; font-weight: 600; letter-spacing: 0.4px; }
.enrich-news .title { font-weight: 600; margin-top: 2px; }
.enrich-news .source { font-size: 11px; color: var(--pl-blue); margin-top: 2px; }
.enrich-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.enrich-rating .stars { color: var(--pl-warning); letter-spacing: -1px; font-size: 16px; }
.enrich-rating .num { font-weight: 800; font-size: 18px; color: var(--pl-blue); }

/* --- Multi-canal cadence builder (composer) --- */
.channel-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  background: var(--pl-bg);
  padding: 4px;
  border-radius: var(--pl-r-md);
}
.channel-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: var(--pl-r-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--pl-gray-700);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 120ms, color 120ms;
}
.channel-tab.active {
  background: var(--pl-white);
  color: var(--pl-blue);
  box-shadow: var(--pl-shadow-sm);
}
.channel-tab .channel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.channel-tab .channel-dot.email { background: var(--pl-blue); }
.channel-tab .channel-dot.linkedin { background: #0A66C2; }
.channel-tab .channel-dot.whatsapp { background: #25D366; }

/* Aba ativa ganha o acento do canal (sublinhado colorido) — deixa óbvio onde você está. */
.channel-tab.ch-email.active    { color: var(--pl-blue); box-shadow: inset 0 -2px 0 var(--pl-blue), var(--pl-shadow-sm); }
.channel-tab.ch-linkedin.active { color: #0A66C2; box-shadow: inset 0 -2px 0 #0A66C2, var(--pl-shadow-sm); }
.channel-tab.ch-whatsapp.active { color: #1DA851; box-shadow: inset 0 -2px 0 #25D366, var(--pl-shadow-sm); }

/* Barra de acento no topo do composer, na cor do canal selecionado. */
.composer { position: relative; }
.composer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--ch-accent, var(--pl-blue));
  z-index: 1;
}

/* Campos exclusivos de e-mail somem em LinkedIn/WhatsApp (a classe vence o display:flex). */
.composer-fields .field[hidden] { display: none; }
/* No modo compacto (1 só campo visível) o "Para" não mostra divisória embaixo. */
.composer-fields.compact #row-para { border-bottom: 0; }

/* Botões de ação do rodapé que não valem pro canal atual ficam realmente ocultos. */
.composer-footer .btn[hidden] { display: none !important; }

/* Orientação contextual do canal (sem assunto, link do perfil do LinkedIn, etc.). */
.channel-note {
  margin: 0 20px 4px;
  padding: 10px 12px;
  background: var(--pl-bg);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  font-size: 12px;
  color: var(--pl-gray-700);
  line-height: 1.5;
}
.channel-note > div + div { margin-top: 4px; }
.channel-note a { color: var(--pl-blue); font-weight: 600; text-decoration: underline; word-break: break-all; }
.channel-note .stale { color: #92400e; font-weight: 600; margin-bottom: 6px; }
.channel-note.warn { color: #92400e; background: var(--pl-warning-soft); border-color: #f0d48a; }

/* Contador de caracteres (LinkedIn/WhatsApp). */
.composer-charcount {
  margin-top: 8px;
  font-size: 11px;
  color: var(--pl-gray-500);
  text-align: right;
}
.composer-charcount.warn { color: var(--pl-danger); font-weight: 600; }

.cadence-builder {
  background: var(--pl-bg);
  border: 1px dashed var(--pl-gray-300);
  border-radius: var(--pl-r-md);
  padding: 14px 16px;
  margin: 16px 20px;
}
.cadence-builder h4 {
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--pl-blue);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cadence-steps {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
}
.cadence-step {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 8px 10px;
  flex: 1;
  min-width: 120px;
  position: relative;
}
.cadence-step + .cadence-step::before {
  content: '→';
  position: absolute;
  left: -10px; top: 50%;
  transform: translateY(-50%);
  color: var(--pl-gray-300);
  font-weight: 700;
}
.cadence-step .day {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--pl-gray-500);
  font-weight: 700;
}
.cadence-step .ch {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}
.cadence-step .ch.email { color: var(--pl-blue); }
.cadence-step .ch.linkedin { color: #0A66C2; }
.cadence-step .ch.whatsapp { color: #25D366; }
.cadence-step .what { font-size: 10.5px; color: var(--pl-gray-700); margin-top: 2px; }

/* --- Agente IA monitor --- */
.agent-hero {
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-white);
  border-radius: var(--pl-r-lg);
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  display: flex;
  gap: 28px;
  align-items: center;
}
.agent-hero::after {
  content: '';
  position: absolute;
  right: -50px; bottom: -50px;
  width: 220px; height: 220px;
  background: var(--pl-green-lime);
  border-radius: 50%;
  opacity: 0.18;
}
.agent-avatar {
  width: 80px; height: 80px;
  background: var(--pl-green-lime);
  color: var(--pl-blue-navy);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 36px;
  font-weight: 800;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 6px rgba(255,255,255,0.15);
}
.agent-avatar::after {
  content: '';
  position: absolute;
  bottom: 4px; right: 4px;
  width: 16px; height: 16px;
  background: var(--pl-green);
  border-radius: 50%;
  border: 3px solid var(--pl-blue-navy);
}
.agent-info { position: relative; z-index: 1; flex: 1; }
.agent-info h1 { font-size: 24px; margin: 0 0 4px; font-weight: 800; letter-spacing: -0.4px; }
.agent-info h1 em { color: var(--pl-green-lime); font-style: italic; }
.agent-info p { font-size: 14px; opacity: 0.9; margin: 0; max-width: 540px; }
.agent-quick-stats {
  display: flex;
  gap: 24px;
  margin-top: 14px;
}
.agent-quick-stats .qs .v { font-size: 22px; font-weight: 800; letter-spacing: -0.4px; }
.agent-quick-stats .qs .k { font-size: 11px; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.5px; }

.agent-activity {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.activity-item {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-md);
  padding: 12px 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
}
.activity-item .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pl-green);
  margin-top: 6px;
  flex-shrink: 0;
}
.activity-item.escalate .dot { background: var(--pl-warning); }
.activity-item.handoff .dot { background: var(--pl-info); }
.activity-item .a-body { flex: 1; min-width: 0; }
.activity-item .a-title { font-size: 13px; font-weight: 600; }
.activity-item .a-snippet { font-size: 12px; color: var(--pl-gray-700); margin-top: 2px; line-height: 1.4; }
.activity-item .a-meta { display: flex; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--pl-gray-500); }
.activity-item .a-time { font-size: 11px; color: var(--pl-gray-500); }

.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.toggle-switch input { display: none; }
.toggle-switch .track {
  width: 36px; height: 20px;
  background: var(--pl-gray-300);
  border-radius: 999px;
  position: relative;
  transition: background 160ms;
}
.toggle-switch .track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: var(--pl-white);
  border-radius: 50%;
  transition: transform 160ms;
}
.toggle-switch input:checked + .track { background: var(--pl-green); }
.toggle-switch input:checked + .track::after { transform: translateX(16px); }

/* --- Integrações grid --- */
.integ-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.integ-card {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: var(--pl-r-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.integ-card .integ-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.integ-card .integ-logo {
  width: 44px; height: 44px;
  border-radius: var(--pl-r-md);
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--pl-white);
  flex-shrink: 0;
}
.integ-card .integ-name { font-weight: 700; font-size: 14px; }
.integ-card .integ-cat { font-size: 11px; color: var(--pl-gray-500); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.integ-card .integ-desc { font-size: 12.5px; color: var(--pl-gray-700); line-height: 1.45; flex: 1; margin-bottom: 14px; }
.integ-card .integ-footer { display: flex; gap: 8px; align-items: center; justify-content: space-between; }

/* --- Public impact page --- */
.impact-page {
  background: linear-gradient(180deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  min-height: 100vh;
  color: var(--pl-white);
}
.impact-page .impact-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 32px;
}
.impact-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}
.impact-header img { width: 44px; height: 44px; }
.impact-header .brand { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
.impact-header .brand-sub { font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; opacity: 0.7; margin-top: 2px; }

.impact-headline {
  text-align: center;
  margin-bottom: 40px;
}
.impact-headline .label-tag { color: var(--pl-green-lime); margin-bottom: 8px; display: inline-block; }
.impact-headline h1 {
  font-size: 42px;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.8px;
  line-height: 1.1;
}
.impact-headline h1 em { color: var(--pl-green-lime); font-style: italic; }
.impact-headline p { font-size: 16px; opacity: 0.85; max-width: 580px; margin: 0 auto; line-height: 1.5; }

.impact-numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
@media (max-width: 880px) {
  .impact-numbers { grid-template-columns: repeat(2, 1fr); }
}
.impact-num {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border-radius: var(--pl-r-lg);
  padding: 24px;
  text-align: center;
}
.impact-num .ico {
  width: 44px; height: 44px;
  background: var(--pl-green-lime);
  color: var(--pl-blue-navy);
  border-radius: 50%;
  display: grid; place-items: center;
  margin: 0 auto 12px;
}
.impact-num .v {
  font-size: 32px;
  font-weight: 800;
  color: var(--pl-green-lime);
  letter-spacing: -0.6px;
  line-height: 1;
}
.impact-num .unit { font-size: 13px; opacity: 0.8; margin-top: 2px; }
.impact-num .k { font-size: 12px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 8px; font-weight: 700; }

.impact-equiv {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--pl-r-lg);
  padding: 28px;
  margin-bottom: 32px;
}
.impact-equiv h3 { font-size: 16px; margin: 0 0 16px; opacity: 0.85; }
.impact-equiv .equiv-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.impact-equiv .equiv-row:last-child { border-bottom: 0; }
.impact-equiv .equiv-row .ico {
  width: 32px; height: 32px;
  background: var(--pl-green-lime);
  color: var(--pl-blue-navy);
  border-radius: var(--pl-r-md);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.impact-equiv .equiv-row .txt b { color: var(--pl-green-lime); font-weight: 800; }

.impact-cta {
  background: var(--pl-green);
  border-radius: var(--pl-r-lg);
  padding: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.impact-cta::after {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 160px; height: 160px;
  background: var(--pl-green-lime);
  border-radius: 50%;
  opacity: 0.3;
}
.impact-cta h2 { font-size: 22px; margin: 0 0 8px; position: relative; z-index: 1; }
.impact-cta p { font-size: 14px; opacity: 0.95; margin: 0 0 18px; position: relative; z-index: 1; }
.impact-cta .btn {
  background: var(--pl-white);
  color: var(--pl-green-dark);
  position: relative; z-index: 1;
  font-weight: 700;
}
.impact-cta .btn:hover { background: var(--pl-bg); }

.impact-footer {
  text-align: center;
  margin-top: 32px;
  font-size: 11px;
  opacity: 0.6;
}

/* --- Sidebar: nav badge new --- */
.sidebar-nav a .nav-pulse {
  margin-left: auto;
  background: var(--pl-danger);
  color: var(--pl-white);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--pl-r-pill);
  letter-spacing: 0.3px;
}

/* --- ESG card big --- */
.esg-card-big {
  background: linear-gradient(135deg, var(--pl-green-dark) 0%, var(--pl-green) 100%);
  color: var(--pl-white);
  border-radius: var(--pl-r-lg);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
}
.esg-card-big::after {
  content: '';
  position: absolute;
  right: -30px; bottom: -30px;
  width: 120px; height: 120px;
  background: var(--pl-green-lime);
  border-radius: 50%;
  opacity: 0.22;
}
.esg-card-big .esg-row { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.esg-card-big .esg-score-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--pl-green-lime);
  color: var(--pl-blue-navy);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
}
.esg-card-big .esg-meta { flex: 1; }
.esg-card-big .esg-meta .label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.7px; opacity: 0.85; font-weight: 700; }
.esg-card-big .esg-meta .verdict { font-size: 16px; font-weight: 700; margin-top: 2px; }
.esg-card-big .esg-stage { font-size: 11px; opacity: 0.9; margin-top: 4px; }
.esg-flags {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  position: relative; z-index: 1;
  flex-wrap: wrap;
}
.esg-flag {
  background: rgba(255,255,255,0.18);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--pl-r-pill);
  font-weight: 700;
  letter-spacing: 0.3px;
}
.esg-flag.no { background: rgba(0,0,0,0.18); opacity: 0.7; }

/* --- Composer add-ons --- */
.composer-side-suggestion {
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-white);
  border-radius: var(--pl-r-lg);
  padding: 14px 16px;
  margin: 16px 20px;
  position: relative;
  overflow: hidden;
}
.composer-side-suggestion h4 {
  font-size: 11px;
  margin: 0 0 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--pl-green-lime);
  display: flex;
  align-items: center;
  gap: 6px;
}
.composer-side-suggestion .case-suggest {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
.composer-side-suggestion .case-reason { font-size: 11.5px; opacity: 0.85; margin-top: 6px; line-height: 1.4; }
.composer-side-suggestion .actions { display: flex; gap: 6px; margin-top: 10px; }
.composer-side-suggestion .actions .btn { padding: 4px 10px; font-size: 11px; }
.composer-side-suggestion .actions .btn.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: var(--pl-white);
}
.composer-side-suggestion .actions .btn.btn-ghost:hover { background: rgba(255,255,255,0.25); }
.composer-side-suggestion .actions .btn.btn-primary {
  background: var(--pl-green-lime);
  color: var(--pl-blue-navy);
  border-color: var(--pl-green-lime);
}

/* --- Mini dashboard widgets in pages --- */
.mini-trend {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 24px;
  margin-top: 4px;
}
.mini-trend .mt-bar {
  flex: 1;
  background: var(--pl-green);
  border-radius: 2px;
  min-height: 3px;
  opacity: 0.7;
}
.mini-trend .mt-bar:last-child { opacity: 1; }

/* --- Empty / placeholder helpers --- */
.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--pl-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 24px 0 12px;
}
.section-title:first-child { margin-top: 0; }

/* ============================================================
   Gloss&aacute;rio &mdash; termos t&eacute;cnicos com tooltip
   ============================================================ */
.term {
  position: relative;
  display: inline;
  cursor: help;
  border-bottom: 1.5px dotted var(--pl-blue);
  text-decoration: none;
  font-weight: 700;
  color: var(--pl-blue);
  transition: background 120ms, color 120ms, border-bottom-color 120ms;
  padding: 0 1px;
}
.term:hover {
  background: var(--pl-blue-soft);
  color: var(--pl-blue-navy);
  border-bottom-color: var(--pl-blue-navy);
  border-radius: 3px;
}
/* Em superficies escuras o termo fica claro */
.kpi.featured .term,
.agent-hero .term,
.cta-card .term,
.impact-page .term,
.composer-side-suggestion .term,
.message.outgoing .term,
.esg-card-big .term {
  color: var(--pl-green-lime);
  border-bottom-color: var(--pl-green-lime);
}

/* Pre-styled em contextos coloridos (sobre fundo escuro) */
.kpi.featured .term:hover,
.agent-hero .term:hover,
.cta-card .term:hover,
.impact-page .term:hover,
[style*="var(--pl-blue)"] > .term:hover {
  background: rgba(255,255,255,0.15);
  color: inherit;
  border-bottom-color: var(--pl-green-lime);
}

/* Tooltip via pseudo-elemento DESATIVADO - agora usa o tooltip global #pl-tooltip
   injetado no body pelo JS (resolve corte por overflow:hidden de containers) */
.term::after,
.term::before,
.term.term-left::after,
.term.term-left::before,
.term.term-right::after,
.term.term-right::before,
.term:hover::after,
.term:hover::before {
  content: none !important;
  display: none !important;
}

/* Tooltip global no body - flutuante, position: fixed, fora de qualquer container */
#pl-tooltip {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  background: var(--pl-charcoal, #1f2937);
  color: var(--pl-white);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  max-width: 300px;
  text-align: left;
  letter-spacing: 0.1px;
  text-transform: none;
  font-style: normal;
  font-variant: normal;
  text-decoration: none;
  font-family: var(--pl-font);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22), 0 4px 12px rgba(15, 23, 42, 0.12);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}
#pl-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}
#pl-tooltip::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: inherit;
  transform: rotate(45deg);
  left: 50%;
  margin-left: -6px;
}
#pl-tooltip.top::before {
  bottom: -5px;
}
#pl-tooltip.bottom::before {
  top: -5px;
}

/* ============================================================
   CONTRASTE EM FUNDOS ESCUROS - garante texto claro
   (corrige bug do "color: var(--pl-gray-900)" global em h1/h2/h3)
   ============================================================ */

/* LOGIN HERO (lado esquerdo da tela de login - fundo azul-navy) */
.login-hero,
.login-hero h1,
.login-hero h2,
.login-hero h3,
.login-hero h4,
.login-hero p,
.login-hero span,
.login-hero div,
.login-hero .hero-headline h1,
.login-hero .hero-headline p,
.login-hero .hero-footer,
.login-hero .brand-text,
.login-hero .brand-sub,
.login-hero .waiting-title,
.login-hero .waiting-sub,
.login-hero .waiting-num {
  color: var(--pl-on-accent) !important;   /* hero tem fundo azul fixo → texto branco nos dois temas */
}
.login-hero .hero-headline p,
.login-hero .brand-sub,
.login-hero .waiting-sub,
.login-hero .hero-footer {
  color: rgba(255, 255, 255, 0.78) !important;
}
.login-hero .hero-headline h1 em {
  /* Mantem o gradiente verde no nome */
  color: transparent !important;
  background: linear-gradient(90deg, var(--pl-green-lime, #A4CE3F), var(--pl-green, #8BC23B));
  -webkit-background-clip: text;
  background-clip: text;
}

/* IMPACTO (proposta pro cliente - fundo escuro) */
.impact-page,
.impact-page h1,
.impact-page h2,
.impact-page h3,
.impact-page h4,
.impact-page p,
.impact-page span:not(.term),
.impact-page .impact-headline h1,
.impact-page .impact-headline p,
.impact-page .impact-num .v,
.impact-page .impact-num .unit,
.impact-page .impact-num .k,
.impact-page .equiv-row .txt,
.impact-page .impact-cta h2,
.impact-page .impact-cta p,
.impact-page .impact-footer,
.impact-page .brand,
.impact-page .brand-sub {
  color: var(--pl-white) !important;
}
.impact-page .impact-headline h1 em {
  color: var(--pl-green-lime, #A4CE3F) !important;
}
.impact-page .impact-num .k,
.impact-page .brand-sub,
.impact-page .impact-headline p,
.impact-page .impact-cta p,
.impact-page .impact-footer {
  color: rgba(255, 255, 255, 0.78) !important;
}

/* HEADER do chat com a Polly (gradiente de acento) — fundo colorido fixo nos dois
   temas → texto SEMPRE claro. Usar --pl-on-accent (branco, não inverte), nunca
   --pl-white, que no tema escuro vira #1A1A1E e some sobre o gradiente. */
.help-panel-head,
.help-panel-head h4,
.help-panel-head .hp-sub,
.help-panel-head .hp-info,
.help-panel-head .hp-info div {
  color: var(--pl-on-accent) !important;
}
.help-panel-head .hp-sub {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* TCO HEADLINE (banner azul de resultados no simulador) — fundo colorido fixo:
   texto claro nos 2 temas (--pl-on-accent, nunca --pl-white que escurece no dark) */
.tco-headline,
.tco-headline .th-block,
.tco-headline .th-block .k,
.tco-headline .th-block .v,
.tco-headline .th-block .vk {
  color: var(--pl-on-accent) !important;
}
.tco-headline .th-block .k,
.tco-headline .th-block .vk {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* TREE RESULT (resultado da calculadora de arvores - fundo verde escuro) */
.tree-result,
.tree-result .tr-label,
.tree-result .tr-big,
.tree-result .tr-sub,
.tree-result .tree-icons {
  color: var(--pl-on-accent) !important;
}
.tree-result .tr-label,
.tree-result .tr-sub {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* MENSAGENS DO USUARIO no chat (bolha azul FIXA → on-accent; --pl-white dava 1.7:1 no dark) */
.chat-msg.user .chat-msg-bubble,
.chat-msg.user .chat-msg-bubble * {
  color: var(--pl-on-accent) !important;
}

/* HOT card e waiting-item.commission do login */
.waiting-item .waiting-num.cur {
  /* Mantem gradiente verde caso ja exista */
}

/* Btn-primary, btn-success, btn-danger (fundos azul/verde/vermelho) */
.btn-primary,
.btn-primary *,
.btn-success,
.btn-success *,
.btn-danger,
.btn-danger * {
  color: var(--pl-on-accent) !important;   /* fundos azul/verde/vermelho são fixos → texto branco nos dois temas */
}
.btn-primary svg, .btn-success svg, .btn-danger svg {
  stroke: var(--pl-on-accent) !important;
}

/* TOPBAR escuro (se houver - login, impacto) - sino e botoes claros */
.impact-page .btn,
.impact-page .btn * {
  color: var(--pl-white) !important;
}
/* EXCEÇÃO: o botão do CTA verde tem fundo BRANCO (6712) — o branco !important acima
   o deixava branco-sobre-branco (medido 1:1, "Agendar reunião" invisível). O fundo
   também vai !important: senão `body.theme-dark .btn:not(...)` (0,5,1) pinta o botão
   de escuro e o texto navy some. on-accent = branco fixo nos 2 temas. */
.impact-page .impact-cta .btn,
.impact-page .impact-cta .btn * {
  color: var(--pl-blue-navy) !important;
}
.impact-page .impact-cta .btn { background: var(--pl-on-accent) !important; }
.impact-page .impact-cta .btn svg { stroke: var(--pl-blue-navy) !important; }

/* RELATORIO: rel-hero tem fundo azul fixo - texto sempre claro nos 2 temas
   (--pl-on-accent, NUNCA --pl-white que vira #1A1F2E no dark = 1.45:1) */
.rel-hero,
.rel-hero h2,
.rel-hero .rel-sub,
.rel-hero .rh-s .v,
.rel-hero .rh-s .k {
  color: var(--pl-on-accent) !important;
}
.rel-hero .rel-sub,
.rel-hero .rh-s .k {
  color: rgba(255, 255, 255, 0.78) !important;
}

/* CASE COVER (banner colorido nos cards de case) — fundo colorido fixo → on-accent
   (o inline `cover_dark_text` do cardHtml usa !important e vence quando a capa é clara) */
.case-cover,
.case-cover .case-sector,
.case-cover .case-status,
.case-cover .case-logo {
  color: var(--pl-on-accent) !important;
}

/* Deck slide cover (apresentacao auto) */
.deck-slide.cover,
.deck-slide.cover *,
.deck-slide.cta,
.deck-slide.cta * {
  color: var(--pl-on-accent) !important;
}
.deck-slide.stat,
.deck-slide.stat * {
  /* stat tem fundo branco - mantem azul */
  color: var(--pl-blue-navy, var(--pl-blue)) !important;
}

/* Modal cover (cabecalho colorido dos modais) */
.modal-cover,
.modal-cover h2,
.modal-cover p,
.modal-cover .modal-close {
  color: var(--pl-on-accent) !important;
}

/* Quando termo est&aacute; perto da borda esquerda da tela */
.term.term-left::after {
  left: 0;
  transform: translateX(0) translateY(4px);
}
.term.term-left:hover::after {
  transform: translateX(0) translateY(0);
}
.term.term-left::before { left: 14px; }

/* Quando termo est&aacute; perto da borda direita */
.term.term-right::after {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(4px);
}
.term.term-right:hover::after {
  transform: translateX(0) translateY(0);
}
.term.term-right::before { left: auto; right: 14px; }

/* ============================================================
   BUSCA AVAN&Ccedil;ADA EM LEADS (filtro por campo + chips de cargo)
   ============================================================ */
.search-advanced {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.search-field {
  height: 38px;
  padding: 0 32px 0 14px;
  border: 1px solid var(--pl-gray-200);
  background: var(--pl-white);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pl-gray-700);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-field:hover { border-color: var(--pl-blue); }
.search-field:focus {
  outline: none;
  border-color: var(--pl-blue);
  box-shadow: 0 0 0 3px rgba(46, 88, 148, 0.12);
}
.search-input-wrap {
  flex: 1;
  min-width: 280px;
  position: relative;
  display: flex;
  align-items: center;
}
.search-input-wrap .search-ico {
  position: absolute;
  left: 12px;
  color: var(--pl-gray-400);
  pointer-events: none;
}
.search-input-wrap input {
  width: 100%;
  height: 38px;
  padding: 0 36px 0 36px;
  border: 1px solid var(--pl-gray-200);
  border-radius: 8px;
  font-size: 13px;
  background: var(--pl-white);
  color: var(--pl-gray-800);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input-wrap input::placeholder { color: var(--pl-gray-400); }
.search-input-wrap input:focus {
  outline: none;
  border-color: var(--pl-blue);
  box-shadow: 0 0 0 3px rgba(46, 88, 148, 0.12);
}
.search-clear-btn {
  position: absolute;
  right: 8px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pl-gray-100);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--pl-gray-600);
  transition: background 0.15s;
}
.search-clear-btn:hover { background: var(--pl-gray-200); }
.search-count {
  font-size: 12px;
  color: var(--pl-gray-500);
  font-weight: 600;
  white-space: nowrap;
}
.quick-role-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--pl-gray-200);
}
.role-chip {
  padding: 5px 12px;
  height: 28px;
  border: 1px solid var(--pl-gray-200);
  background: var(--pl-white);
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pl-gray-700);
  cursor: pointer;
  transition: all 0.15s;
}
.role-chip:hover {
  border-color: var(--pl-blue);
  color: var(--pl-blue);
  background: var(--pl-blue-soft);
}
.role-chip.active {
  background: var(--pl-blue);
  color: var(--pl-white);
  border-color: var(--pl-blue);
}
.toolbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

/* ============================================================
   SIMULADOR COMERCIAL (TCO + &aacute;rvores + apresenta&ccedil;&atilde;o)
   ============================================================ */
.sim-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--pl-gray-200);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.sim-tab {
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-size: 14px;
  font-weight: 700;
  color: var(--pl-gray-500);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}
.sim-tab:hover { color: var(--pl-blue-text); }
.sim-tab.active {
  color: var(--pl-blue);
  border-bottom-color: var(--pl-blue);
}
.sim-pane { display: none; }
.sim-pane.active { display: block; }

.sim-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}
@media (max-width: 1100px) {
  .sim-layout { grid-template-columns: 1fr; }
}
.sim-form {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: 12px;
  padding: 20px;
  position: sticky;
  top: 16px;
  align-self: start;
}
.sim-form h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--pl-gray-800);
  margin: 0 0 4px;
}
.sim-form .form-sub {
  font-size: 12px;
  color: var(--pl-gray-500);
  margin-bottom: 16px;
}
.sim-form .form-row { margin-bottom: 14px; }
.sim-form label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pl-gray-600);
  margin-bottom: 6px;
}
.sim-form input,
.sim-form select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--pl-gray-200);
  border-radius: 8px;
  font-size: 13px;
  background: var(--pl-white);
  color: var(--pl-gray-800);
}
.sim-form input:focus,
.sim-form select:focus {
  outline: none;
  border-color: var(--pl-blue);
  box-shadow: 0 0 0 3px rgba(46, 88, 148, 0.12);
}
.sim-results { min-width: 0; }

/* TCO Matrix */
.tco-matrix {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: 12px;
  overflow: hidden;
}
.tco-matrix table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tco-matrix th, .tco-matrix td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--pl-gray-100);
}
.tco-matrix thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pl-gray-600);
  background: var(--pl-gray-50);
  font-weight: 700;
}
.tco-matrix .tco-cat {
  font-weight: 700;
  color: var(--pl-gray-800);
}
.tco-matrix .tco-wood { color: var(--pl-warning-dark); font-variant-numeric: tabular-nums; }
.tco-matrix .tco-pl { color: var(--pl-green-dark); font-weight: 700; font-variant-numeric: tabular-nums; }
.tco-matrix .tco-diff { font-weight: 700; font-variant-numeric: tabular-nums; }
.tco-matrix .tco-diff.positive { color: var(--pl-green-dark); }
.tco-matrix .tco-diff.negative { color: var(--pl-danger-dark); }
.tco-matrix tfoot td {
  background: var(--pl-blue-soft);
  font-weight: 800;
  font-size: 15px;
  border-top: 2px solid var(--pl-blue);
}
.tco-matrix tfoot .tco-pl { font-size: 16px; }

.tco-headline {
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-white);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}
@media (max-width: 768px) { .tco-headline { grid-template-columns: 1fr; } }
.tco-headline .th-block .k {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
  margin-bottom: 6px;
}
.tco-headline .th-block .v {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}
.tco-headline .th-block .vk {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 4px;
}
.tco-headline .th-block .v.green { color: var(--pl-green-lime); }

/* Calculadora de arvores */
.tree-result {
  background: linear-gradient(135deg, var(--pl-green-dark) 0%, var(--pl-green) 100%);
  color: var(--pl-white);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin-bottom: 20px;
}
.tree-result .tr-big {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  margin: 8px 0;
}
.tree-result .tr-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
}
.tree-result .tr-sub {
  font-size: 14px;
  opacity: 0.9;
  margin-top: 8px;
}
.tree-icons {
  font-size: 32px;
  margin: 16px 0;
  letter-spacing: 4px;
  line-height: 1.2;
  word-break: break-word;
}
.tree-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 768px) { .tree-stats { grid-template-columns: repeat(2, 1fr); } }
.tree-stat {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}
.tree-stat .ts-v {
  font-size: 24px;
  font-weight: 800;
  color: var(--pl-green-dark);
  font-variant-numeric: tabular-nums;
}
.tree-stat .ts-k {
  font-size: 11px;
  color: var(--pl-gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
  font-weight: 600;
}

/* Apresentacao automatica */
.deck-builder {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: 12px;
  padding: 24px;
}
.deck-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.deck-slide {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: var(--pl-white);
  border-radius: 10px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.deck-slide:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.deck-slide .ds-num {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 10px;
  opacity: 0.6;
}
.deck-slide .ds-title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}
.deck-slide .ds-body {
  font-size: 10px;
  opacity: 0.85;
  line-height: 1.4;
}
.deck-slide.cover {
  background: linear-gradient(135deg, var(--pl-blue-navy) 0%, var(--pl-blue) 60%, var(--pl-green) 100%);
}
.deck-slide.cta {
  background: linear-gradient(135deg, var(--pl-green-dark) 0%, var(--pl-green) 100%);
}
.deck-slide.stat {
  background: var(--pl-white);
  color: var(--pl-blue-navy);
  border: 1px solid var(--pl-gray-200);
}
.deck-slide.stat .ds-big {
  font-size: 36px;
  font-weight: 800;
  color: var(--pl-blue);
  line-height: 1;
}

/* ============================================================
   BRIEFING: layout single-column + TCO embutido no lead
   ============================================================ */
.briefing-layout.single {
  grid-template-columns: 1fr !important;
  max-width: 980px;
  margin: 0 auto;
}
.lead-tco-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  background: var(--pl-gray-50);
  border-radius: 10px;
  border: 1px solid var(--pl-gray-200);
}
@media (max-width: 760px) {
  .lead-tco-form { grid-template-columns: 1fr; }
}
.lead-tco-form .form-row.inline { margin: 0; }
.lead-tco-form label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pl-gray-600);
  margin-bottom: 6px;
}
.lead-tco-form input,
.lead-tco-form select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--pl-gray-200);
  border-radius: 8px;
  font-size: 13px;
  background: var(--pl-white);
  color: var(--pl-gray-800);
}
.lead-tco-form input:focus,
.lead-tco-form select:focus {
  outline: none;
  border-color: var(--pl-blue);
  box-shadow: 0 0 0 3px rgba(46, 88, 148, 0.12);
}
.lead-tco-result {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
@media (max-width: 760px) {
  .lead-tco-result { grid-template-columns: 1fr; }
}
.ltr-block {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}
.ltr-block .k {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pl-gray-600);
  font-weight: 700;
  margin-bottom: 6px;
}
.ltr-block .v {
  font-size: 26px;
  font-weight: 800;
  color: var(--pl-blue-navy);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.ltr-block .v.green { color: var(--pl-green-dark); }
.ltr-block .vk {
  font-size: 11px;
  color: var(--pl-gray-500);
  margin-top: 6px;
}
.lead-tco-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.lead-tco-actions .btn { min-width: 0; }

/* ============================================================
   FLOW NEXT: banner "pr&oacute;ximo passo" pra dar circularidade ao app
   ============================================================ */
.flow-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(90deg, var(--pl-blue-soft) 0%, transparent 100%);
  border: 1px solid var(--pl-blue);
  border-left-width: 4px;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.flow-next .fn-info {
  flex: 1;
  min-width: 220px;
}
.flow-next .fn-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--pl-blue-text);
  font-weight: 800;
  margin-bottom: 4px;
}
.flow-next .fn-text {
  font-size: 13.5px;
  color: var(--pl-gray-800);
  line-height: 1.5;
}
.flow-next .fn-text b { color: var(--pl-blue-navy); }
.flow-next .btn {
  white-space: nowrap;
}

/* Breadcrumb da jornada (mostra onde voce esta no ciclo) */
.journey-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--pl-gray-500);
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.journey-crumb .jc-step {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 12px;
  background: var(--pl-gray-100);
  color: var(--pl-gray-600);
}
.journey-crumb .jc-step.done {
  background: var(--pl-green-soft, #E8F5D5);
  color: var(--pl-green-dark);
}
.journey-crumb .jc-step.current {
  background: var(--pl-blue);
  color: var(--pl-white);
}
.journey-crumb .jc-arrow {
  color: var(--pl-gray-300);
  font-size: 10px;
}

/* ============================================================
   JOURNEY STEPPER - 5 fases visuais (substitui journey-crumb)
   ============================================================ */
.journey-stepper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  align-items: stretch;
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-100);
  border-radius: 14px;
  padding: 18px 8px 14px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.js-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 12px;
  cursor: pointer;
  transition: transform var(--pl-dur-fast) var(--pl-ease);
}
.js-step[data-href]:hover {
  transform: translateY(-2px);
}
.js-step[data-href]:hover .js-step-num {
  border-color: var(--pl-blue);
  color: var(--pl-blue);
}

/* Linha conectora entre etapas (atras dos circulos) */
.js-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: calc(50% + 22px);
  right: calc(-50% + 22px);
  height: 2px;
  background: var(--pl-gray-200);
  z-index: 0;
}
.js-step.done:not(:last-child)::after,
.js-step.current:not(:last-child)::after {
  background: linear-gradient(90deg, var(--pl-green) 0%, var(--pl-gray-200) 100%);
}
.js-step.done + .js-step.done::after,
.js-step.done + .js-step.current::after {
  background: var(--pl-green);
}

.js-step-num {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--pl-gray-200);
  background: var(--pl-white);
  color: var(--pl-gray-400);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  transition: all var(--pl-dur-med) var(--pl-ease);
}
.js-step.done .js-step-num {
  background: var(--pl-green);
  border-color: var(--pl-green);
  color: var(--pl-on-accent);
}
.js-step.current .js-step-num {
  background: var(--pl-blue);
  border-color: var(--pl-blue);
  color: var(--pl-on-accent);
  box-shadow: 0 0 0 5px rgba(46, 88, 148, 0.15);
  animation: pl-step-pulse 2.2s ease-in-out infinite;
}
@keyframes pl-step-pulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(46, 88, 148, 0.12); }
  50%      { box-shadow: 0 0 0 8px rgba(46, 88, 148, 0.18); }
}
.js-step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--pl-gray-600);
  letter-spacing: -0.01em;
}
.js-step.done .js-step-label {
  color: var(--pl-gray-700);
}
.js-step.current .js-step-label {
  color: var(--pl-blue-navy, var(--pl-blue));
  font-weight: 700;
}
.js-step-sub {
  font-size: 10.5px;
  color: var(--pl-gray-400);
  margin-top: 2px;
  min-height: 14px;
}
.js-step.current .js-step-sub {
  color: var(--pl-blue);
  font-weight: 500;
}

@media (max-width: 760px) {
  .journey-stepper {
    grid-template-columns: repeat(5, 1fr);
    padding: 14px 4px 10px;
  }
  .js-step { padding: 0 4px; }
  .js-step-num { width: 28px; height: 28px; font-size: 12px; }
  .js-step:not(:last-child)::after { top: 14px; left: calc(50% + 16px); right: calc(-50% + 16px); }
  .js-step-label { font-size: 11px; }
  .js-step-sub { font-size: 9.5px; }
}

/* ============================================================
   MOTION / ANIMATIONS  ?  curva su&aacute;ve, performance-first
   ============================================================ */

/* Tokens */
:root {
  --pl-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --pl-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --pl-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --pl-dur-fast: 180ms;
  --pl-dur-med: 320ms;
  --pl-dur-slow: 520ms;
}

/* Respeita acessibilidade */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Keyframes ---------- */
@keyframes pl-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pl-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pl-fade-down {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pl-fade-left {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pl-fade-right {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pl-scale-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pl-pop {
  0%   { transform: scale(0.85); opacity: 0; }
  60%  { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes pl-pulse-soft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 88, 148, 0.45); }
  50%      { box-shadow: 0 0 0 10px rgba(46, 88, 148, 0); }
}
@keyframes pl-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pl-spin {
  to { transform: rotate(360deg); }
}
@keyframes pl-bounce-x {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(3px); }
}
@keyframes pl-grow-bar {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes pl-count-up {
  from { transform: translateY(0.5em); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ---------- Page load: body fade-in (todas as paginas) ---------- */
body {
  animation: pl-fade-in var(--pl-dur-med) var(--pl-ease) both;
}

/* ---------- SIDEBAR: brand + items entram em cascade ---------- */
.sidebar-brand {
  animation: pl-fade-right 420ms var(--pl-ease-out) both;
}
.sidebar-nav a {
  animation: pl-fade-right 360ms var(--pl-ease-out) backwards;
  transition: background-color var(--pl-dur-fast) var(--pl-ease),
              color var(--pl-dur-fast) var(--pl-ease),
              transform var(--pl-dur-fast) var(--pl-ease),
              padding-left var(--pl-dur-fast) var(--pl-ease);
}
.sidebar-nav a:nth-child(1)  { animation-delay: 40ms; }
.sidebar-nav a:nth-child(2)  { animation-delay: 80ms; }
.sidebar-nav a:nth-child(3)  { animation-delay: 110ms; }
.sidebar-nav a:nth-child(4)  { animation-delay: 140ms; }
.sidebar-nav a:nth-child(5)  { animation-delay: 170ms; }
.sidebar-nav a:nth-child(6)  { animation-delay: 195ms; }
.sidebar-nav a:nth-child(7)  { animation-delay: 220ms; }
.sidebar-nav a:nth-child(8)  { animation-delay: 245ms; }
.sidebar-nav a:nth-child(9)  { animation-delay: 270ms; }
.sidebar-nav a:nth-child(10) { animation-delay: 295ms; }
.sidebar-nav a:nth-child(11) { animation-delay: 320ms; }
.sidebar-nav a:nth-child(12) { animation-delay: 345ms; }
.sidebar-nav a:nth-child(13) { animation-delay: 370ms; }
.sidebar-nav a:nth-child(14) { animation-delay: 395ms; }
.sidebar-nav a:nth-child(15) { animation-delay: 420ms; }
.sidebar-nav a:nth-child(16) { animation-delay: 445ms; }
.sidebar-nav a:nth-child(17) { animation-delay: 470ms; }
.sidebar-nav a:hover {
  transform: translateX(2px);
}
.sidebar-nav a.active {
  animation-delay: 0ms;
}
.sidebar-user {
  animation: pl-fade-up 500ms 200ms var(--pl-ease-out) both;
}

/* ---------- TOPBAR + jornada/breadcrumb ---------- */
.topbar {
  animation: pl-fade-down 360ms var(--pl-ease-out) both;
}
.journey-crumb {
  animation: pl-fade-down 360ms 80ms var(--pl-ease-out) backwards;
}
.journey-crumb .jc-step {
  transition: transform var(--pl-dur-fast) var(--pl-ease),
              background-color var(--pl-dur-fast) var(--pl-ease);
}
.journey-crumb .jc-step:hover {
  transform: translateY(-1px);
}
.journey-crumb .jc-step.current {
  animation: pl-pop 460ms var(--pl-ease-spring) backwards;
  animation-delay: 380ms;
}

/* ---------- FLOW NEXT: banner desliza de cima ---------- */
.flow-next {
  animation: pl-fade-down 480ms 160ms var(--pl-ease-out) backwards;
}
.flow-next .btn svg {
  transition: transform var(--pl-dur-fast) var(--pl-ease);
}
.flow-next .btn:hover svg {
  animation: pl-bounce-x 600ms var(--pl-ease) infinite;
}

/* ---------- STATS / cards do dashboard: stagger ---------- */
.stats .stat,
.case-grid .case-card,
.deck-preview .deck-slide,
.tree-stat,
.ltr-block,
.impact-num,
.equiv-row {
  animation: pl-fade-up 480ms var(--pl-ease-out) backwards;
}
.stats .stat:nth-child(1),
.case-grid .case-card:nth-child(1),
.tree-stat:nth-child(1),
.ltr-block:nth-child(1),
.impact-num:nth-child(1) { animation-delay: 120ms; }
.stats .stat:nth-child(2),
.case-grid .case-card:nth-child(2),
.tree-stat:nth-child(2),
.ltr-block:nth-child(2),
.impact-num:nth-child(2) { animation-delay: 180ms; }
.stats .stat:nth-child(3),
.case-grid .case-card:nth-child(3),
.tree-stat:nth-child(3),
.ltr-block:nth-child(3),
.impact-num:nth-child(3) { animation-delay: 240ms; }
.stats .stat:nth-child(4),
.case-grid .case-card:nth-child(4),
.tree-stat:nth-child(4),
.impact-num:nth-child(4) { animation-delay: 300ms; }
.case-grid .case-card:nth-child(5) { animation-delay: 360ms; }
.case-grid .case-card:nth-child(6) { animation-delay: 420ms; }
.case-grid .case-card:nth-child(7) { animation-delay: 480ms; }
.case-grid .case-card:nth-child(8) { animation-delay: 540ms; }

.stats .stat,
.case-card,
.lead-tco-result .ltr-block,
.tree-stat {
  transition: transform var(--pl-dur-med) var(--pl-ease-out),
              box-shadow var(--pl-dur-med) var(--pl-ease-out);
}
.stats .stat:hover,
.case-card:hover,
.tree-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

/* ---------- LEADS TABLE: linhas entram em cascade ---------- */
table.leads tbody tr {
  animation: pl-fade-up 360ms var(--pl-ease-out) backwards;
  transition: background-color var(--pl-dur-fast) var(--pl-ease),
              transform var(--pl-dur-fast) var(--pl-ease);
}
table.leads tbody tr:nth-child(1) { animation-delay: 80ms; }
table.leads tbody tr:nth-child(2) { animation-delay: 130ms; }
table.leads tbody tr:nth-child(3) { animation-delay: 170ms; }
table.leads tbody tr:nth-child(4) { animation-delay: 210ms; }
table.leads tbody tr:nth-child(5) { animation-delay: 240ms; }
table.leads tbody tr:nth-child(6) { animation-delay: 270ms; }
table.leads tbody tr:nth-child(7) { animation-delay: 290ms; }
table.leads tbody tr:nth-child(n+8) { animation-delay: 310ms; }
table.leads tbody tr:hover {
  transform: translateX(2px);
}

/* ---------- BOT&Otilde;ES: micro-feedback ---------- */
.btn, button.btn, a.btn {
  transition: transform var(--pl-dur-fast) var(--pl-ease),
              box-shadow var(--pl-dur-fast) var(--pl-ease),
              background-color var(--pl-dur-fast) var(--pl-ease);
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 60ms;
}

/* ---------- CHIPS / FILTROS / TAGS ---------- */
.filter-chip, .role-chip, .channel-chip, .signal-pill, .tag, .esg-flag {
  transition: transform var(--pl-dur-fast) var(--pl-ease),
              background-color var(--pl-dur-fast) var(--pl-ease),
              border-color var(--pl-dur-fast) var(--pl-ease),
              color var(--pl-dur-fast) var(--pl-ease);
}
.filter-chip:hover, .role-chip:hover {
  transform: translateY(-1px);
}
.role-chip.active, .filter-chip.active {
  animation: pl-pop 360ms var(--pl-ease-spring);
}

/* ---------- TABS (briefing, simulador, cases modal) ---------- */
.ptab, .sim-tab, .mtab {
  transition: color var(--pl-dur-fast) var(--pl-ease),
              border-color var(--pl-dur-fast) var(--pl-ease),
              background-color var(--pl-dur-fast) var(--pl-ease);
}
.ptab-content.active,
.sim-pane.active,
.mtab-pane.active {
  animation: pl-fade-up 320ms var(--pl-ease-out) both;
}

/* ---------- MODAIS / OVERLAYS ---------- */
.modal-overlay {
  transition: opacity var(--pl-dur-med) var(--pl-ease);
}
.modal-overlay.active .modal-shell {
  animation: pl-scale-in 360ms var(--pl-ease-spring) backwards;
}

/* ---------- NAV PULSE / BADGES ---------- */
.nav-pulse, .bell-dot {
  animation: pl-pulse-soft 2.2s ease-in-out infinite;
}

/* ---------- LOADING (skeletons) ---------- */
.skeleton, .loading-shimmer {
  background: linear-gradient(90deg,
    var(--pl-gray-100) 0%,
    var(--pl-gray-50) 50%,
    var(--pl-gray-100) 100%);
  background-size: 200% 100%;
  animation: pl-shimmer 1.4s linear infinite;
  border-radius: 6px;
}

/* ---------- ESG GAUGES: barra cresce ---------- */
.esg-gauge .gauge-ring,
.case-perf-fill,
.rank-bar-fill {
  transform-origin: left center;
  animation: pl-grow-bar 760ms var(--pl-ease-out) both;
  animation-delay: 240ms;
}

/* ---------- VALORES NUM&Eacute;RICOS: count-up sutil ---------- */
.stat .value,
.ltr-block .v,
.tree-stat .ts-v,
.impact-num .v,
.rel-hero-stats .v {
  display: inline-block;
  animation: pl-count-up 600ms var(--pl-ease-out) both;
  animation-delay: 200ms;
}

/* ---------- LOGIN: motion especial ---------- */
.login-page {
  background-color: var(--pl-blue-navy, #0c2545);
}
.login-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 20% 30%, rgba(46, 88, 148, 0.35), transparent 60%),
    radial-gradient(ellipse 600px 500px at 80% 70%, rgba(139, 194, 59, 0.18), transparent 60%);
  z-index: 0;
  pointer-events: none;
  animation: pl-bg-drift 18s ease-in-out infinite alternate;
}
@keyframes pl-bg-drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(20px, -10px) scale(1.06); }
}
.login-shell { position: relative; z-index: 1; }

.login-hero .hero-brand        { animation: pl-fade-down 520ms var(--pl-ease-out) backwards; animation-delay: 80ms; }
.login-hero .hero-headline h1  { animation: pl-fade-up 600ms var(--pl-ease-out) backwards; animation-delay: 200ms; }
.login-hero .hero-headline p   { animation: pl-fade-up 600ms var(--pl-ease-out) backwards; animation-delay: 320ms; }
.login-waiting .waiting-item   { animation: pl-fade-up 520ms var(--pl-ease-out) backwards; }
.login-waiting .waiting-item:nth-child(1) { animation-delay: 440ms; }
.login-waiting .waiting-item:nth-child(2) { animation-delay: 540ms; }
.login-waiting .waiting-item:nth-child(3) { animation-delay: 640ms; }
.login-waiting .waiting-item:nth-child(4) { animation-delay: 740ms; }
.login-hero .hero-footer       { animation: pl-fade-in 800ms 900ms backwards; }

.auth-card.single-user         { animation: pl-fade-up 600ms 120ms var(--pl-ease-out) backwards; }
.auth-card .user-greeting      { animation: pl-pop 600ms 240ms var(--pl-ease-spring) backwards; }
.auth-card .auth-field         { animation: pl-fade-up 500ms 380ms var(--pl-ease-out) backwards; }
.auth-card .btn-primary        { animation: pl-fade-up 500ms 460ms var(--pl-ease-out) backwards; }
.auth-card .auth-secondary,
.auth-card .auth-divider,
.auth-card .google-btn         { animation: pl-fade-up 500ms 540ms var(--pl-ease-out) backwards; }

.login-page .big-avatar {
  animation: pl-pop 700ms var(--pl-ease-spring) backwards;
  animation-delay: 320ms;
}
.login-page .waiting-num {
  display: inline-block;
  animation: pl-count-up 500ms var(--pl-ease-out) backwards;
}
.login-page .waiting-item:nth-child(1) .waiting-num { animation-delay: 540ms; }
.login-page .waiting-item:nth-child(2) .waiting-num { animation-delay: 640ms; }
.login-page .waiting-item:nth-child(3) .waiting-num { animation-delay: 740ms; }
.login-page .waiting-item:nth-child(4) .waiting-num { animation-delay: 840ms; }

.login-page .waiting-item.hot .waiting-num {
  animation: pl-pop 600ms var(--pl-ease-spring) backwards,
             pl-pulse-soft 2.4s ease-in-out 1.2s infinite;
  animation-delay: 540ms, 1.2s;
}

/* Botao Entrar com micro-shine */
.auth-card .btn-primary {
  position: relative;
  overflow: hidden;
}
.auth-card .btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 70%);
  background-size: 200% 100%;
  background-position: -100% 0;
  pointer-events: none;
}
.auth-card .btn-primary:hover::after {
  animation: pl-shimmer 1.2s linear;
}

/* ---------- TOASTS: slide-in da direita ---------- */
.toast {
  animation: pl-fade-left 360ms var(--pl-ease-spring);
}

/* ---------- HOVER em cards de lead/case ---------- */
tr.clickable {
  transition: background-color var(--pl-dur-fast) var(--pl-ease),
              transform var(--pl-dur-fast) var(--pl-ease);
}
tr.clickable:hover {
  transform: translateX(3px);
}

/* ---------- ACOMPANHAMENTO: cards do pipeline ---------- */
.pipeline-col .pipeline-card,
.kanban-card,
.activity-item,
.notif-item,
.tmsg,
.tnotif {
  animation: pl-fade-up 400ms var(--pl-ease-out) backwards;
}
.pipeline-col .pipeline-card:nth-child(1),
.kanban-card:nth-child(1),
.activity-item:nth-child(1),
.notif-item:nth-child(1),
.tmsg:nth-child(1),
.tnotif:nth-child(1) { animation-delay: 80ms; }
.pipeline-col .pipeline-card:nth-child(2),
.kanban-card:nth-child(2),
.activity-item:nth-child(2),
.notif-item:nth-child(2),
.tmsg:nth-child(2),
.tnotif:nth-child(2) { animation-delay: 140ms; }
.pipeline-col .pipeline-card:nth-child(3),
.kanban-card:nth-child(3),
.activity-item:nth-child(3),
.notif-item:nth-child(3),
.tmsg:nth-child(3),
.tnotif:nth-child(3) { animation-delay: 200ms; }
.pipeline-col .pipeline-card:nth-child(n+4),
.kanban-card:nth-child(n+4),
.activity-item:nth-child(n+4),
.notif-item:nth-child(n+4),
.tmsg:nth-child(n+4),
.tnotif:nth-child(n+4) { animation-delay: 260ms; }

/* ---------- IMPACT-PAGE (proposta cliente): hero + nums ---------- */
.impact-page .impact-header     { animation: pl-fade-down 500ms var(--pl-ease-out) both; }
.impact-page .impact-headline   { animation: pl-fade-up 600ms 180ms var(--pl-ease-out) backwards; }
.impact-page .impact-numbers    { animation: pl-fade-in 500ms 360ms backwards; }
.impact-page .impact-equiv      { animation: pl-fade-up 500ms 480ms var(--pl-ease-out) backwards; }
.impact-page .impact-cta        { animation: pl-fade-up 500ms 600ms var(--pl-ease-out) backwards; }

/* ---------- SUMARIO LATERAL / blocos genericos ---------- */
.next-step, .cta-card, .card, .insight-block {
  animation: pl-fade-up 480ms var(--pl-ease-out) backwards;
  animation-delay: 200ms;
}

/* ---------- ICONES nos botoes: rotate sutil ---------- */
.btn .icon {
  transition: transform var(--pl-dur-fast) var(--pl-ease);
}
.btn:active .icon {
  transform: scale(0.9);
}

/* ---------- LOGOUT: rotate no hover ---------- */
.logout {
  transition: transform var(--pl-dur-fast) var(--pl-ease),
              color var(--pl-dur-fast) var(--pl-ease);
}
.logout:hover {
  transform: rotate(8deg);
}

/* ---------- AVATAR: zoom sutil ---------- */
.lead-avatar, .big-avatar, .avatar {
  transition: transform var(--pl-dur-fast) var(--pl-ease);
}
.lead-avatar:hover, .big-avatar:hover, .avatar:hover {
  transform: scale(1.06);
}

/* ---------- ESG GAUGE: rotate sutil no hover ---------- */
.esg-gauge {
  transition: transform var(--pl-dur-med) var(--pl-ease-out);
}
.esg-gauge:hover {
  transform: scale(1.08);
}

/* ============================================================
   MOTION FASE 2 - SUPERVALORIZA&Ccedil;&Atilde;O
   ============================================================ */

/* ---------- REVEAL ON SCROLL ---------- */
.pl-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms var(--pl-ease-out),
              transform 600ms var(--pl-ease-out);
  will-change: opacity, transform;
}
.pl-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- STAGGER CHILD ---------- */
.pl-stagger-child {
  animation: pl-fade-up 480ms var(--pl-ease-out) backwards;
}

/* ---------- PAGE TRANSITION (saindo da pagina) ---------- */
body {
  transition: opacity 200ms var(--pl-ease);
}
body.pl-leaving {
  opacity: 0;
  transform: translateY(-4px);
}

/* ---------- RIPPLE INK em botoes ---------- */
.pl-ripple-on {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.pl-ripple-ink {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.22;
  transform: scale(0);
  animation: pl-ripple 600ms var(--pl-ease-out) forwards;
  pointer-events: none;
  z-index: 0;
}
@keyframes pl-ripple {
  to { transform: scale(1); opacity: 0; }
}
.btn > * { position: relative; z-index: 1; }

/* ---------- LOGO IDLE ---------- */
.pl-logo-idle {
  animation: pl-logo-breathe 4.6s ease-in-out infinite;
  transform-origin: center;
}
@keyframes pl-logo-breathe {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50%      { transform: scale(1.04) rotate(-1deg); }
}

/* ---------- INPUTS: focus glow + lift ---------- */
input, select, textarea {
  transition: border-color var(--pl-dur-fast) var(--pl-ease),
              box-shadow var(--pl-dur-fast) var(--pl-ease),
              transform var(--pl-dur-fast) var(--pl-ease),
              background-color var(--pl-dur-fast) var(--pl-ease);
}
input.pl-focused, select.pl-focused, textarea.pl-focused {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(46, 88, 148, 0.12), 0 0 0 3px rgba(46, 88, 148, 0.12);
}

/* ---------- LINKS: subline animada ---------- */
a:not(.btn):not(.sidebar-nav a):not(.ptab):not(.sim-tab):not(.role-chip):not(.filter-chip):not(.tab) {
  position: relative;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--pl-dur-med) var(--pl-ease-out),
              color var(--pl-dur-fast) var(--pl-ease);
}
a:not(.btn):not(.sidebar-nav a):not(.ptab):not(.sim-tab):not(.role-chip):not(.filter-chip):not(.tab):hover {
  background-size: 100% 1px;
}

/* ---------- ICONES: girar/escalar no hover do pai ---------- */
.btn:hover .icon,
.filter-chip:hover .icon,
.role-chip:hover .icon {
  transform: scale(1.1);
}
.sidebar-nav a:hover .icon {
  transform: rotate(-6deg) scale(1.08);
}
.icon {
  transition: transform var(--pl-dur-fast) var(--pl-ease);
}

/* ---------- CHECKBOX / RADIO custom motion ---------- */
input[type="checkbox"], input[type="radio"] {
  transition: transform var(--pl-dur-fast) var(--pl-ease-spring);
}
input[type="checkbox"]:checked, input[type="radio"]:checked {
  animation: pl-pop 320ms var(--pl-ease-spring);
}

/* ---------- LOGIN: orbes flutuantes decorativos ---------- */
.login-hero {
  position: relative;
  overflow: hidden;
}
.login-hero::before,
.login-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}
.login-hero::before {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(139, 194, 59, 0.28), transparent 70%);
  top: -60px;
  right: -80px;
  animation: pl-orb-float-1 14s ease-in-out infinite;
}
.login-hero::after {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(46, 88, 148, 0.45), transparent 70%);
  bottom: -120px;
  left: -100px;
  animation: pl-orb-float-2 18s ease-in-out infinite;
}
@keyframes pl-orb-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, 30px) scale(1.1); }
  66%      { transform: translate(-20px, 50px) scale(0.95); }
}
@keyframes pl-orb-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(60px, -40px) scale(1.15); }
}
.login-hero > * { position: relative; z-index: 1; }

/* ---------- LOGIN: hero-headline letter highlight ---------- */
.hero-headline h1 em {
  background: linear-gradient(90deg, var(--pl-green-lime, #A4CE3F), var(--pl-green, #8BC23B));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  background-size: 200% 100%;
  animation: pl-shimmer 4s linear infinite;
  font-style: normal;
  font-weight: 800;
}

/* ---------- WAITING ITEM hot: pulse vermelho sutil ---------- */
.waiting-item.hot {
  position: relative;
}
.waiting-item.hot::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 2px solid var(--pl-danger, #E61439);
  opacity: 0;
  animation: pl-ring-pulse 2.6s ease-in-out 2s infinite;
  pointer-events: none;
}
@keyframes pl-ring-pulse {
  0%, 100% { opacity: 0; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(1.02); }
}

/* ---------- DASHBOARD: titulo principal slide ---------- */
.topbar h1 {
  background: linear-gradient(90deg, var(--pl-gray-900), var(--pl-blue-navy));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- TABELAS: cabecalho subtle ---------- */
table.leads thead th,
.tco-matrix thead th {
  position: relative;
  transition: color var(--pl-dur-fast) var(--pl-ease);
}

/* ---------- CHIPS DE CANAL ---------- */
.channel-chip {
  transition: transform var(--pl-dur-fast) var(--pl-ease-spring),
              background-color var(--pl-dur-fast) var(--pl-ease);
}
.channel-chip:hover {
  transform: scale(1.18) rotate(-4deg);
}

/* ---------- BADGES (novo, contatado etc) ---------- */
.badge, .ai-priority {
  transition: transform var(--pl-dur-fast) var(--pl-ease);
}
.badge:hover, .ai-priority:hover {
  transform: scale(1.06);
}

/* ---------- SCROLL: smooth ---------- */
html { scroll-behavior: smooth; }

/* ---------- FOCUS-VISIBLE: ring premium ---------- */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 88, 148, 0.35), 0 0 0 5px rgba(255, 255, 255, 0.8);
  border-radius: 6px;
}

/* ---------- SELECTION ---------- */
::selection {
  background: var(--pl-blue);
  color: var(--pl-white);
}

/* ---------- SCROLLBAR: discreta + animada ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--pl-gray-200);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background-color var(--pl-dur-fast) var(--pl-ease);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--pl-gray-400);
  background-clip: padding-box;
  border: 2px solid transparent;
}

/* ---------- PROGRESS BARS / NAV PULSE com glow extra ---------- */
.nav-pulse {
  position: relative;
}
.nav-pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: inherit;
  opacity: 0.45;
  filter: blur(6px);
  z-index: -1;
}

/* ---------- TOPBAR ACTIONS hover ---------- */
.topbar-bell {
  transition: transform var(--pl-dur-fast) var(--pl-ease-spring);
}
.topbar-bell:hover {
  transform: rotate(-12deg) scale(1.08);
}

/* ---------- ESG SCORE CIRCLE: girar idle ---------- */
.esg-score-circle, .pa-score-big {
  position: relative;
}
.esg-score-circle::before,
.pa-score-big::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px dashed rgba(46, 88, 148, 0.3);
  animation: pl-spin 12s linear infinite;
  pointer-events: none;
}

/* ---------- KPI cards: barra superior animada ---------- */
.pa-kpi {
  position: relative;
  overflow: hidden;
}
.pa-kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pl-blue), var(--pl-green));
  transform: scaleX(0);
  transform-origin: left;
  animation: pl-grow-bar 800ms 300ms var(--pl-ease-out) both;
}

/* ---------- DECK SLIDES: leve flutua&ccedil;&atilde;o ---------- */
.deck-slide:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}
.deck-slide {
  transition: transform 360ms var(--pl-ease-spring), box-shadow 360ms var(--pl-ease);
}

/* ---------- COMPOSER: textarea com glow extra ---------- */
.composer-editor:focus-within,
.compose-area:focus-within {
  box-shadow: 0 6px 20px rgba(46, 88, 148, 0.12);
}

/* ---------- IMPACT NUM: numero pulsa ao revelar ---------- */
.impact-num .v {
  display: inline-block;
}
.impact-num.pl-revealed .v {
  animation: pl-pop 700ms var(--pl-ease-spring);
}

/* ---------- ENRICH CARD: cabecalho icone gira no hover ---------- */
.enrich-card:hover .enrich-head svg {
  transform: rotate(360deg);
  transition: transform 700ms var(--pl-ease);
}
.enrich-card {
  transition: transform var(--pl-dur-med) var(--pl-ease-out),
              box-shadow var(--pl-dur-med) var(--pl-ease-out);
}
.enrich-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

/* ---------- TREE ICONS: float continuo ---------- */
.tree-icons {
  animation: pl-tree-sway 6s ease-in-out infinite;
  transform-origin: bottom center;
}
@keyframes pl-tree-sway {
  0%, 100% { transform: rotate(0); }
  25%      { transform: rotate(1.2deg); }
  75%      { transform: rotate(-1.2deg); }
}

/* ---------- LOGIN-PAGE: brilho sutil no hero footer ---------- */
.login-hero .hero-footer::before {
  content: '? ';
  display: inline-block;
  color: var(--pl-green);
  animation: pl-pulse-soft 2s infinite;
}

/* ---------- AVATAR (sidebar e cells): glow no hover ---------- */
.lead-avatar:hover,
.big-avatar:hover {
  box-shadow: 0 0 0 4px rgba(46, 88, 148, 0.15);
}

/* ============================================================
   MINIMALISMO / RESPIRO  -  override final pra reduzir poluicao
   ============================================================ */

/* ---------- Tipografia: pesos menos extremos, melhor leitura ---------- */
body {
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
}
h1, h2, h3, h4 {
  font-weight: 700;          /* era 800 em varios lugares */
  letter-spacing: -0.015em;
  color: var(--pl-gray-900);
}
.topbar h1 {
  font-weight: 700;
  font-size: 22px;            /* era ~26 */
}
.breadcrumb {
  font-size: 12.5px;
  color: var(--pl-gray-500);
  font-weight: 400;
}
.section-title {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--pl-gray-500);
  margin-bottom: 14px;
}

/* ---------- Stats / cards: sombras MUITO mais suaves ---------- */
.stat, .card, .case-card, .impact-num, .ltr-block, .tree-stat,
.enrich-card, .pa-kpi, .insight-block, .next-step, .cta-card,
.table-card, .deck-builder, .tco-matrix {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03) !important;
  border-color: var(--pl-gray-100) !important;
}
.stat:hover, .case-card:hover, .impact-num:hover,
.ltr-block:hover, .tree-stat:hover, .enrich-card:hover {
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06) !important;
}

/* ---------- Stats: numeros menos pesados ---------- */
.stat .value,
.rh-s .v {
  font-weight: 700;          /* era 800 */
  font-size: 28px;            /* era ~32 */
  color: var(--pl-gray-900);
}
.stat .label,
.rh-s .k {
  font-size: 11.5px;
  color: var(--pl-gray-500);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.stat .delta {
  font-size: 11.5px;
  color: var(--pl-gray-500);
  font-weight: 400;
}

/* ---------- Respiro maior: content e secoes ---------- */
.content {
  padding-top: 8px;
}
.stats {
  gap: 16px !important;
  margin-bottom: 28px;
}

/* ---------- Sidebar: menos contadores barulhentos ---------- */
.nav-count {
  background: transparent !important;
  color: var(--pl-gray-400) !important;
  font-weight: 500;
  font-size: 11px;
}
.nav-pulse {
  background: var(--pl-blue) !important;
  font-size: 10px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
}
.nav-pulse::after { display: none; }     /* desliga o glow extra de blur */

/* ---------- Filter chips: cores reduzidas, contadores discretos ---------- */
.filter-chip {
  background: transparent !important;
  border: 1px solid var(--pl-gray-200) !important;
  color: var(--pl-gray-600) !important;
  font-weight: 500 !important;
  font-size: 12.5px !important;
}
.filter-chip:hover {
  border-color: var(--pl-blue) !important;
  color: var(--pl-blue) !important;
  background: transparent !important;
}
.filter-chip.active {
  background: var(--pl-blue) !important;
  color: var(--pl-white) !important;
  border-color: var(--pl-blue) !important;
}
.filter-chip span {
  font-weight: 400;
  font-size: 11px;
  opacity: 0.55 !important;
}

/* ---------- Badges: paleta dessaturada ---------- */
.badge {
  background: var(--pl-gray-100);
  color: var(--pl-gray-700);
  font-weight: 500;
  font-size: 11px;
  padding: 3px 9px;
  letter-spacing: 0;
  text-transform: none;
}
.badge.novo      { background: rgba(46, 88, 148, 0.08); color: var(--pl-blue); }
.badge.contatado { background: rgba(139, 194, 59, 0.10); color: var(--pl-green-dark, #5C9128); }
.ai-priority {
  background: rgba(46, 88, 148, 0.07);
  color: var(--pl-blue);
  font-weight: 500;
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: none;
  letter-spacing: 0;
}

/* ---------- Botoes: pesos suaves, paddings respirando ---------- */
.btn {
  font-weight: 600;           /* era 700 */
  letter-spacing: 0;
}
.btn-primary {
  box-shadow: 0 1px 2px rgba(46, 88, 148, 0.12);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--pl-gray-200);
  color: var(--pl-gray-700);
}
.btn-ghost:hover {
  border-color: var(--pl-gray-300);
  background: var(--pl-gray-50);
}

/* ---------- Tabelas: linhas mais arejadas, headers discretos ---------- */
table.leads thead th,
.tco-matrix thead th {
  background: transparent !important;
  border-bottom: 1px solid var(--pl-gray-200) !important;
  color: var(--pl-gray-500);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.6px;
  padding: 12px 16px;
}
table.leads tbody td {
  padding: 16px;
  border-bottom: 1px solid var(--pl-gray-100);
}
table.leads tbody tr:hover {
  background: var(--pl-gray-50);
}

/* ---------- Flow-next (banner proximo passo): mais sussurro, menos grito ---------- */
.flow-next {
  background: var(--pl-gray-50) !important;
  border: 1px solid var(--pl-gray-200) !important;
  border-left-width: 3px !important;
  border-left-color: var(--pl-blue) !important;
  box-shadow: none !important;
  padding: 12px 16px !important;
}
.flow-next .fn-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
}
.flow-next .fn-text {
  font-size: 13px;
  color: var(--pl-gray-700);
  font-weight: 400;
}
.flow-next .fn-text b {
  font-weight: 600;
  color: var(--pl-gray-900);
}

/* ---------- Journey crumb: mais suave ---------- */
.journey-crumb .jc-step {
  background: transparent !important;
  border: 1px solid var(--pl-gray-200);
  color: var(--pl-gray-500) !important;
  font-weight: 500;
  font-size: 10.5px;
  padding: 2px 9px;
}
.journey-crumb .jc-step.done {
  border-color: rgba(139, 194, 59, 0.3);
  color: var(--pl-green-dark, #5C9128) !important;
}
.journey-crumb .jc-step.current {
  background: var(--pl-blue) !important;
  border-color: var(--pl-blue);
  color: var(--pl-white) !important;
  font-weight: 600;
}

/* ---------- Next-step / insight-block (CTAs internos): tom calmo ---------- */
.next-step, .insight-block {
  background: var(--pl-gray-50) !important;
  border: 1px solid var(--pl-gray-200) !important;
  border-radius: 10px !important;
  padding: 16px !important;
}
.ai-tag {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
  margin-bottom: 8px;
}
.insight-block-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--pl-gray-600);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 12px;
}

/* ---------- Cards mais arejados por padrao ---------- */
.card {
  padding: 20px !important;
}
.card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--pl-gray-800);
  margin-bottom: 14px;
}

/* ---------- ESG flags / tags: menores e neutras ---------- */
.esg-flag {
  background: var(--pl-gray-100);
  color: var(--pl-gray-700);
  font-weight: 500;
  font-size: 11px;
  padding: 4px 10px;
  border: none;
  text-transform: none;
  letter-spacing: 0;
}
.esg-flag.no {
  background: transparent;
  color: var(--pl-gray-400);
  text-decoration: line-through;
  text-decoration-color: var(--pl-gray-300);
}

/* ---------- ESG score circle / Pa score big: tipografia menos pesada ---------- */
.esg-score-circle, .pa-score-big {
  font-weight: 700;
}

/* ---------- Activity / pipeline / kanban items: cores mais lavadas ---------- */
.activity-item, .notif-item, .kanban-card, .pipeline-card,
.tmsg, .tnotif {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-100);
  box-shadow: none;
}
.activity-item:hover, .notif-item:hover {
  background: var(--pl-gray-50);
}

/* ---------- Tabs: cor neutra pra inativos ---------- */
.ptab, .sim-tab, .mtab {
  color: var(--pl-gray-500);
  font-weight: 500;
}
.ptab.active, .sim-tab.active, .mtab.active {
  color: var(--pl-blue-text);
  font-weight: 600;
}

/* ---------- Reducao de saturacao dos chips de canal ---------- */
.channel-chip {
  background: var(--pl-gray-100);
  color: var(--pl-gray-500);
  font-weight: 500;
}
.channel-chip.linkedin { background: rgba(10, 102, 194, 0.08); color: #0a66c2; }
.channel-chip.email    { background: rgba(46, 88, 148, 0.08); color: var(--pl-blue-text); }
.channel-chip.whatsapp { background: rgba(37, 211, 102, 0.10); color: #128c7e; }
/* no dark os chips de canal (azul/teal fixos) reprovam contraste — clareiam */
body.theme-dark .channel-chip.linkedin { color: var(--pl-blue-text); }
body.theme-dark .channel-chip.whatsapp { color: var(--pl-green); }

/* ---------- Inputs: bordas mais leves ---------- */
input, select, textarea {
  border-color: var(--pl-gray-200);
  font-weight: 400;
}

/* ---------- TCO matrix / tabelas internas: respiro ---------- */
.tco-matrix th, .tco-matrix td {
  padding: 14px 18px;
}

/* ---------- Signal pills / tags ---------- */
.signal-pill {
  background: var(--pl-gray-100);
  color: var(--pl-gray-600);
  font-weight: 500;
  font-size: 11px;
  border: none;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: none;
  letter-spacing: 0;
}

/* ---------- Reduz volume visual da agenda/inbox lista ---------- */
.tmsg, .tnotif {
  padding: 14px 16px;
}

/* ---------- Modal overlay: borda interna mais limpa ---------- */
.modal-shell {
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18), 0 8px 24px rgba(15, 23, 42, 0.08);
  border-radius: 16px;
}

/* ---------- Final touch: max-width pra leitura confort&aacute;vel em telas largas ---------- */
.main {
  max-width: none;
}
.main .content {
  /* layout FLUIDO: acompanha a largura da tela (sem coluna centralizada estreita) */
  max-width: none;
  min-width: 0;
  margin-left: 0;
  margin-right: 0;
}

/* ============================================================
   MOTION CONT&Iacute;NUO - elementos sempre vivos (idle animations)
   ============================================================ */

/* ---------- Keyframes idle extras ---------- */
@keyframes pl-soft-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
@keyframes pl-soft-tilt {
  0%, 100% { transform: rotate(0); }
  25%      { transform: rotate(1.5deg); }
  75%      { transform: rotate(-1.5deg); }
}
@keyframes pl-gradient-slide {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes pl-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 88, 148, 0); }
  50%      { box-shadow: 0 0 14px 2px rgba(46, 88, 148, 0.18); }
}
@keyframes pl-glow-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 194, 59, 0); }
  50%      { box-shadow: 0 0 14px 2px rgba(139, 194, 59, 0.28); }
}
@keyframes pl-glow-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 168, 35, 0); }
  50%      { box-shadow: 0 0 18px 3px rgba(229, 168, 35, 0.35); }
}
@keyframes pl-sparkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8) rotate(0); }
  50%      { opacity: 1; transform: scale(1) rotate(20deg); }
}
@keyframes pl-dot-bounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
  40%           { transform: scale(1.2); opacity: 1; }
}
@keyframes pl-wave-slow {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(6px); }
}
@keyframes pl-flame {
  0%, 100% { transform: scale(1) rotate(-2deg); opacity: 0.9; }
  50%      { transform: scale(1.08) rotate(2deg); opacity: 1; }
}
@keyframes pl-online-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(139, 194, 59, 0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(139, 194, 59, 0); }
  100% { box-shadow: 0 0 0 0 rgba(139, 194, 59, 0); }
}
@keyframes pl-bell-swing {
  0%, 90%, 100% { transform: rotate(0); }
  92%           { transform: rotate(-12deg); }
  94%           { transform: rotate(8deg); }
  96%           { transform: rotate(-4deg); }
  98%           { transform: rotate(2deg); }
}
@keyframes pl-caret-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes pl-arrow-nudge {
  0%, 60%, 100% { transform: translateX(0); }
  30%           { transform: translateX(3px); }
}
@keyframes pl-bg-pan {
  0%   { background-position: 0% 0; }
  100% { background-position: 100% 0; }
}
@keyframes pl-ring-rotate {
  to { transform: rotate(360deg); }
}
@keyframes pl-float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}

/* ---------- 1) Polly / AI tags - sempre brilhando suavemente ---------- */
.ai-tag, .ai-priority {
  position: relative;
  background: linear-gradient(
    90deg,
    rgba(46, 88, 148, 0.06) 0%,
    rgba(139, 194, 59, 0.12) 50%,
    rgba(46, 88, 148, 0.06) 100%
  );
  background-size: 200% 100%;
  animation: pl-gradient-slide 6s linear infinite;
  border-radius: 10px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ai-tag svg, .ai-priority svg {
  animation: pl-sparkle 2.6s ease-in-out infinite;
  color: var(--pl-blue);
}
.ai-tag {
  margin-bottom: 8px;
}

/* ---------- 2) Sidebar user: ponto verde "online" pulsando sempre ---------- */
.sidebar-user .avatar {
  position: relative;
}
.sidebar-user .avatar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pl-green, #8BC23B);
  border: 2px solid var(--pl-white);
  animation: pl-online-pulse 2.4s ease-out infinite;
}

/* ---------- 3) Bell icon do topbar: swing periodico ---------- */
.topbar-bell svg {
  transform-origin: top center;
  animation: pl-bell-swing 5s ease-in-out infinite;
}

/* ---------- 4) Badges "novo" / .ai-priority: pulse muito suave ---------- */
.badge.novo,
.ai-priority {
  animation: pl-glow 3.4s ease-in-out infinite;
}

/* ---------- 5) Status "Polly recomenda" / labels quentes: fogo ---------- */
.signal-pill,
.hot-flag,
.priority-flag {
  position: relative;
}
.signal-pill::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pl-green);
  margin-right: 6px;
  animation: pl-online-pulse 2s ease-out infinite;
  vertical-align: middle;
}

/* ---------- 6) Botoes primarios: faixa de luz contInua passando ---------- */
.btn-primary,
.btn-success {
  position: relative;
  overflow: hidden;
}
.btn-primary::before,
.btn-success::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 100%
  );
  animation: pl-btn-shine 4.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pl-btn-shine {
  0%, 60% { left: -120%; }
  100%    { left: 120%; }
}

/* ---------- 7) Stats: leve flutuacao do valor (3px) ---------- */
.stat .value,
.rh-s .v {
  display: inline-block;
  animation: pl-float-y 4s ease-in-out infinite;
}
.stat:nth-child(2) .value { animation-delay: 0.4s; }
.stat:nth-child(3) .value { animation-delay: 0.8s; }
.stat:nth-child(4) .value { animation-delay: 1.2s; }

/* ---------- 8) Comiss&atilde;o / valores em destaque: shimmer dourado ---------- */
.rh-s:nth-child(5) .v, /* "Receita ganha" (5º stat do rel-hero) — o shimmer é p/ valores R$ */
.waiting-item.commission .waiting-num.cur,
.cc-v,
.tco-headline .th-block .v.green {
  background: linear-gradient(
    90deg,
    var(--pl-green-dark, #5C9128) 0%,
    var(--pl-green-lime, #A4CE3F) 25%,
    var(--pl-green, #8BC23B) 50%,
    var(--pl-green-lime, #A4CE3F) 75%,
    var(--pl-green-dark, #5C9128) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  animation: pl-gradient-slide 5s linear infinite;
}

/* ---------- 9) Setas dos botoes "proximo passo" - nudge constante ---------- */
.flow-next .btn svg,
.btn[class*="primary"] > svg:last-child,
.btn[class*="success"] > svg:last-child {
  animation: pl-arrow-nudge 2.2s ease-in-out infinite;
}

/* ---------- 10) Cards da Polly (insights, next-step): leve gradiente passando atras ---------- */
.next-step {
  position: relative;
  overflow: hidden;
}
.next-step::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(46, 88, 148, 0.04) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: pl-bg-pan 8s linear infinite;
  pointer-events: none;
  z-index: 0;
}
.next-step > * {
  position: relative;
  z-index: 1;
}

/* ---------- 11) ESG gauges / barras de score: shimmer contInuo no preenchimento ---------- */
.gauge-ring,
.esg-bar .fill,
.case-perf-fill,
.rank-bar-fill {
  background: linear-gradient(
    90deg,
    var(--pl-blue) 0%,
    var(--pl-green) 50%,
    var(--pl-blue) 100%
  );
  background-size: 200% 100%;
  animation: pl-grow-bar 760ms var(--pl-ease-out) both, pl-gradient-slide 4s linear infinite 760ms;
}

/* ---------- 12) Logo: respirando + leve girada -- ja existia, reforco ---------- */
.pl-logo-idle {
  animation: pl-logo-breathe 4.6s ease-in-out infinite,
             pl-float-y 3.2s ease-in-out infinite;
}

/* ---------- 13) "3 dots" loader pra qualquer .loading-dots ---------- */
.loading-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.loading-dots::before,
.loading-dots::after,
.loading-dots > span {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  animation: pl-dot-bounce 1.4s ease-in-out infinite;
}
.loading-dots::after { animation-delay: 0.2s; }
.loading-dots > span { animation-delay: 0.4s; }

/* ---------- 14) Filter-chip ativo: leve glow contInuo ---------- */
.filter-chip.active,
.role-chip.active {
  animation: pl-glow 3s ease-in-out infinite;
}

/* ---------- 15) Tree icons na calculadora: balan&ccedil;o reforcado ---------- */
.tree-icons {
  animation: pl-tree-sway 6s ease-in-out infinite;
}
.tree-icons span,
.tree-icons {
  display: inline-block;
}

/* ---------- 16) NAV pulse: aro extra suave pulsando para fora ---------- */
.nav-pulse {
  position: relative;
}
.nav-pulse::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid var(--pl-blue);
  opacity: 0;
  animation: pl-ring-pulse-outward 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes pl-ring-pulse-outward {
  0%   { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.8); }
}

/* ---------- 17) Pa-score / ESG score grandes: ring tracejado j&aacute; gira (12s) - acelera ---------- */
.esg-score-circle::before,
.pa-score-big::before {
  animation-duration: 9s;
}

/* ---------- 18) Topbar h1: gradiente passando constante ---------- */
.topbar h1 {
  background: linear-gradient(
    90deg,
    var(--pl-gray-900) 0%,
    var(--pl-blue-navy, #0c2545) 25%,
    var(--pl-gray-900) 50%,
    var(--pl-blue-navy, #0c2545) 75%,
    var(--pl-gray-900) 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: pl-gradient-slide 14s linear infinite;
}

/* ---------- 19) Login page: ja tem orbs flutuantes, reforca pulsa&ccedil;&atilde;o de fundo ---------- */
.login-page::before {
  animation: pl-bg-drift 18s ease-in-out infinite alternate,
             pl-bg-pulse 8s ease-in-out infinite;
}
@keyframes pl-bg-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.7; }
}

/* ---------- 20) Cursor blink em campo focado simulando "typing" ---------- */
.composer-editor:focus-within::after,
.compose-area:focus-within::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 16px;
  background: var(--pl-blue);
  vertical-align: middle;
  animation: pl-caret-blink 1.1s steps(1) infinite;
}

/* ---------- 21) Ponto vermelho discreto em itens "hot" ---------- */
.waiting-item.hot::after,
.case-card[data-priority="hot"]::after,
tr.clickable[data-priority="hot"]::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pl-danger, #E61439);
  box-shadow: 0 0 0 0 rgba(230, 20, 57, 0.45);
  animation: pl-ring-pulse-outward 2.2s ease-out infinite;
}

/* ---------- 22) "Polly esta trabalhando" indicator (se aparecer) ---------- */
.polly-working {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--pl-blue);
}
.polly-working::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pl-blue);
  animation: pl-online-pulse 1.6s ease-out infinite;
}

/* ---------- 23) Card cover (cases): shine sutil constante ---------- */
.case-cover {
  position: relative;
  overflow: hidden;
}
.case-cover::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  animation: pl-card-shine 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pl-card-shine {
  0%, 80% { left: -100%; }
  100%    { left: 200%; }
}

/* ---------- 24) Big avatar (login): ring concentrico pulsando ---------- */
.login-page .big-avatar {
  position: relative;
}
.login-page .big-avatar::before,
.login-page .big-avatar::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--pl-blue);
  opacity: 0;
  pointer-events: none;
}
.login-page .big-avatar::before {
  animation: pl-avatar-rings 3.2s ease-out infinite;
}
.login-page .big-avatar::after {
  animation: pl-avatar-rings 3.2s ease-out infinite;
  animation-delay: 1.6s;
}
@keyframes pl-avatar-rings {
  0%   { transform: scale(1);   opacity: 0.55; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ---------- 25) Sidebar nav-label: sublinha sutil que respira ---------- */
.sidebar-nav-label {
  position: relative;
}
.sidebar-nav-label::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 16px;
  width: 16px;
  height: 1px;
  background: linear-gradient(90deg, var(--pl-blue), transparent);
  animation: pl-wave-slow 4s ease-in-out infinite;
}

/* ============================================================
   BUGFIX: correcao de botoes/chips que ficavam "imensos"
   ============================================================ */

/* 1) ai-tag / ai-priority: NaO vira pilula com padding/flex.
   Mantem so o gradiente sutil de fundo e cor, sem mexer no layout original. */
.ai-tag,
.ai-priority {
  background: none !important;
  background-size: auto !important;
  animation: none !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-bottom: 0 !important;
  border-radius: 0 !important;
}
.ai-tag svg, .ai-priority svg {
  animation: none !important;
}
/* Quando estiver dentro de .next-step ou .insight-block restaurar o respiro */
.next-step .ai-tag,
.insight-block .ai-tag,
.insight-block .insight-block-label {
  margin-bottom: 8px !important;
}

/* 2) Focus ring discreto: 2px no lugar de 5px halo */
:focus-visible {
  outline: 2px solid var(--pl-blue) !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
  border-radius: inherit !important;
}
.btn:focus-visible {
  outline-offset: 1px !important;
}

/* 3) Chip ativo: SEM pop (que zerava opacity), SEM glow (que estendia visualmente).
   Mant&eacute;m apenas o destaque visual normal. */
.filter-chip.active,
.role-chip.active {
  animation: none !important;
  transform: none !important;
}

/* 4) pl-pop NaO usado mais em estados ativos.
   So em entradas de modal/avatar one-shot. Aqui garantimos que se algum elemento
   ainda usar, fica controlado em escala. */
@keyframes pl-pop {
  0%   { transform: scale(0.94); opacity: 0; }
  60%  { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(1); }
}

/* 5) Botao primary/success: faixa de luz menos agressiva (no fundo, sem alterar layout) */
.btn-primary,
.btn-success {
  isolation: isolate;        /* garante que ::before nao saia */
}
.btn-primary::before,
.btn-success::before {
  z-index: 0;
}
.btn-primary > *,
.btn-success > * {
  position: relative;
  z-index: 1;
}

/* 6) Ripple ink esta desativado (ver regra mais abaixo). NAO herdar o raio do
      pai aqui: botoes com pai sem raio (ex.: .chat-input) ficavam quadrados. */
.pl-ripple-on {
  /* sem border-radius: cada botao mantem o proprio raio (.btn = 8px) */
}

/* 7) Botoes: hover/click sem transform/scale - so brilho.
      Garante que NUNCA ficam "imensos" por acumulo de animacoes. */
.btn,
button.btn,
a.btn {
  transform: none !important;
  flex-shrink: 0;
  vertical-align: middle;
  contain: layout paint;
}
.btn:hover,
button.btn:hover,
a.btn:hover {
  transform: none !important;
  filter: brightness(1.06);
}
.btn:active,
button.btn:active,
a.btn:active {
  transform: none !important;
  filter: brightness(0.94);
}
/* Desativa qualquer animacao "pop"/"scale" residual em botoes */
.btn, .btn::before, .btn::after {
  animation-name: none;
}
/* Restaura SO o shine permanente dos primarios/success (era animacao decorativa) */
.btn-primary::before,
.btn-success::before {
  animation-name: pl-btn-shine;
}
/* Restaura nudge da seta em botoes principais */
.btn-primary > svg:last-child,
.btn-success > svg:last-child,
.flow-next .btn svg {
  animation-name: pl-arrow-nudge;
}

/* Ripple ink: caso algo ainda crie, fica clamped ao botao */
.pl-ripple-ink {
  display: none !important;  /* desativado por enquanto */
}

/* 11) Simulador: valores dinamicos NaO devem ter count-up animation
       nem float-y (causavam conflito com renderTCO/renderTrees) */
.ltr-block .v,
.tree-stat .ts-v {
  animation: none !important;
}

/* 12) Tree-icons no simulador: garante que float nao explode */
.tree-icons {
  display: block;
  max-width: 100%;
  overflow: hidden;
  line-height: 1.4;
}

/* ============================================================
   TOOLBAR DE FILTROS EM LEADS - reorganizada em 3 linhas claras
   ============================================================ */
.table-toolbar#sector-filters {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  padding: 18px 20px !important;
  background: var(--pl-white);
  border-bottom: 1px solid var(--pl-gray-100);
}

/* Linha 1: busca avancada */
.table-toolbar .search-advanced {
  display: grid !important;
  grid-template-columns: 200px 1fr auto;
  gap: 10px !important;
  align-items: center;
  margin: 0 !important;
  width: 100%;
  flex-wrap: nowrap !important;
}
@media (max-width: 760px) {
  .table-toolbar .search-advanced {
    grid-template-columns: 1fr;
  }
}
.table-toolbar .search-field {
  width: 100%;
  height: 38px;
}
.table-toolbar .search-input-wrap {
  min-width: 0;
}
.table-toolbar .search-count {
  min-width: 0;
  padding-right: 4px;
}

/* Linha 2: cargos rapidos */
.table-toolbar .quick-role-chips {
  display: flex !important;
  align-items: center;
  gap: 6px !important;
  flex-wrap: wrap;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
.table-toolbar .quick-role-chips > span:first-child {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pl-gray-500);
  font-weight: 600;
  margin-right: 8px;
}

/* Linha 3: setores + regiao + filtros avancados */
.table-toolbar .toolbar-row {
  display: flex !important;
  align-items: center;
  gap: 6px !important;
  flex-wrap: wrap;
  margin: 0 !important;
  padding-top: 14px;
  border-top: 1px solid var(--pl-gray-100);
}

/* Linha 3: separador vertical entre setores e regioes - mais discreto */
.table-toolbar .toolbar-row > div[style*="border-left"] {
  height: 18px !important;
  margin: 0 6px !important;
  opacity: 0.5;
}

/* Filtros avancados (botao a direita) - estilo destacado */
.table-toolbar .toolbar-row > button[onclick*="openFiltersDrawer"] {
  margin-left: auto !important;
  border: 1px dashed var(--pl-gray-300) !important;
  color: var(--pl-gray-600) !important;
  background: transparent !important;
  font-size: 12px !important;
}
.table-toolbar .toolbar-row > button[onclick*="openFiltersDrawer"]:hover {
  border-style: solid !important;
  border-color: var(--pl-blue) !important;
  color: var(--pl-blue) !important;
}

/* Contadores dos filter-chips: mais discretos */
.filter-chip span[style*="opacity"] {
  font-weight: 400 !important;
  opacity: 0.5 !important;
  margin-left: 3px;
  font-size: 11px;
}

/* ============================================================
   PAGE TABS - navegacao entre paginas do mesmo grupo
   (Hoje: Mensagens/Reunioes/Tarefas, Leads: Novos/Em conversa, etc)
   ============================================================ */
.page-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--pl-white);
  border-bottom: 1px solid var(--pl-gray-100);
  padding: 0 24px;
  margin: -8px -24px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.page-tabs::-webkit-scrollbar { display: none; }
.main .content > .page-tabs:first-child,
.main .content > .journey-crumb + .flow-next + .page-tabs,
.main .content > .flow-next + .page-tabs,
.main .content > .journey-crumb + .page-tabs {
  margin-top: -8px;
}
.page-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 2px solid transparent;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--pl-gray-500);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--pl-dur-fast) var(--pl-ease),
              border-color var(--pl-dur-fast) var(--pl-ease),
              background-color var(--pl-dur-fast) var(--pl-ease);
  margin-bottom: -1px;
}
.page-tab:hover {
  color: var(--pl-blue-text);
  background: transparent;
}
.page-tab.active {
  color: var(--pl-blue-text);
  border-bottom-color: var(--pl-blue-text);
  font-weight: 600;
}
.page-tab .tab-icon {
  opacity: 0.7;
}
.page-tab.active .tab-icon {
  opacity: 1;
}
.page-tab .tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--pl-gray-100);
  color: var(--pl-gray-600);
  font-size: 11px;
  font-weight: 600;
}
.page-tab.active .tab-count {
  background: var(--pl-blue);
  color: var(--pl-on-accent);
}
.page-tab .tab-count.pulse {
  background: rgba(46, 88, 148, 0.1);
  color: var(--pl-blue-text);
  animation: pl-pulse-soft 2.2s ease-in-out infinite;
}
.page-tab.active .tab-count.pulse {
  background: var(--pl-blue);
  color: var(--pl-on-accent);
}

/* Tabs no impacto.html (background escuro) */
.impact-tabs-wrap {
  max-width: 920px;
  margin: 0 auto 20px;
  padding: 0;
}
.page-tabs.impact-tabs {
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px 10px 0 0;
  margin: 0;
  padding: 0 12px;
}
.page-tabs.impact-tabs .page-tab {
  color: rgba(255, 255, 255, 0.55);
}
.page-tabs.impact-tabs .page-tab:hover {
  color: rgba(255, 255, 255, 0.85);
}
.page-tabs.impact-tabs .page-tab.active {
  color: var(--pl-green-lime, #A4CE3F);
  border-bottom-color: var(--pl-green-lime, #A4CE3F);
}

/* ============================================================
   CHAT COM A POLLY - substitui help-panel antigo
   ============================================================ */
.help-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-green-dark, #5C9128) 100%);
  border: none;
  color: var(--pl-white);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(46, 88, 148, 0.32), 0 4px 12px rgba(15, 23, 42, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: transform var(--pl-dur-fast) var(--pl-ease-spring),
              box-shadow var(--pl-dur-fast) var(--pl-ease);
  animation: pl-fab-bounce 6s ease-in-out infinite;
}
@keyframes pl-fab-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.help-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 32px rgba(46, 88, 148, 0.4), 0 6px 16px rgba(15, 23, 42, 0.16);
  animation-play-state: paused;
}
.help-fab .help-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pl-green-lime, #A4CE3F);
  border: 2px solid var(--pl-white);
  animation: pl-online-pulse 2s ease-out infinite;
}

.help-panel {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: 380px;
  max-width: calc(100vw - 48px);
  max-height: 600px;
  background: var(--pl-white);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22), 0 8px 24px rgba(15, 23, 42, 0.1);
  z-index: 99;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity var(--pl-dur-med) var(--pl-ease-spring),
              transform var(--pl-dur-med) var(--pl-ease-spring);
}
.help-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* HEADER do chat */
.help-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy, #0c2545) 100%);
  color: var(--pl-white);
  position: relative;
  overflow: hidden;
}
.help-panel-head::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(139, 194, 59, 0.25), transparent 60%);
  pointer-events: none;
}
.hp-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pl-green-lime, #A4CE3F) 0%, var(--pl-green, #8BC23B) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  color: var(--pl-blue-navy, #0c2545);
  flex-shrink: 0;
  z-index: 1;
}
.hp-avatar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pl-green-lime, #A4CE3F);
  border: 2px solid var(--pl-blue-navy, #0c2545);
  animation: pl-online-pulse 2.4s ease-out infinite;
}
.hp-info {
  flex: 1;
  z-index: 1;
}
.hp-info h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--pl-white);
  display: flex;
  align-items: center;
  gap: 6px;
}
.hp-info h4 .hp-ai-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(139, 194, 59, 0.25);
  color: var(--pl-green-lime, #A4CE3F);
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hp-sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
}
.hp-close {
  background: none;
  border: none;
  color: var(--pl-white);
  cursor: pointer;
  opacity: 0.7;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: opacity var(--pl-dur-fast) var(--pl-ease), background var(--pl-dur-fast) var(--pl-ease);
}
.hp-close:hover { opacity: 1; background: rgba(255, 255, 255, 0.1); }

/* CORPO do chat */
.help-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--pl-gray-50);
  min-height: 280px;
  max-height: 380px;
}
.chat-msg {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  animation: pl-fade-up 320ms var(--pl-ease-out);
}
.chat-msg.user {
  flex-direction: row-reverse;
}
.chat-msg-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.chat-msg.polly .chat-msg-avatar {
  background: linear-gradient(135deg, var(--pl-green-lime, #A4CE3F) 0%, var(--pl-green, #8BC23B) 100%);
  color: var(--pl-blue-navy, #0c2545);
}
.chat-msg.user .chat-msg-avatar {
  background: var(--pl-blue);
  color: var(--pl-white);
}
.chat-msg-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
  position: relative;
}
.chat-msg.polly .chat-msg-bubble {
  background: var(--pl-white);
  color: var(--pl-gray-800);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.chat-msg.user .chat-msg-bubble {
  background: var(--pl-blue);
  color: var(--pl-white);
  border-bottom-right-radius: 4px;
}
.chat-msg-bubble b { font-weight: 700; }
.chat-msg-bubble a { color: var(--pl-blue-text); font-weight: 600; }
.chat-msg.user .chat-msg-bubble a { color: var(--pl-green-lime, #A4CE3F); }

/* Typing dots */
.chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}
.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pl-gray-400);
  animation: pl-typing-bounce 1.3s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes pl-typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40%           { transform: translateY(-4px); opacity: 1; }
}

/* Sugestoes rapidas (chips) */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0 0;
}
.chat-suggestion {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  color: var(--pl-gray-700);
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--pl-dur-fast) var(--pl-ease);
}
.chat-suggestion:hover {
  border-color: var(--pl-blue);
  color: var(--pl-blue);
  background: var(--pl-blue-soft);
}

/* FOOTER input */
.help-panel-foot {
  padding: 12px;
  background: var(--pl-white);
  border-top: 1px solid var(--pl-gray-100);
  display: flex;
  gap: 8px;
  align-items: center;
}
.help-panel-foot input {
  flex: 1;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--pl-gray-200);
  border-radius: 19px;
  background: var(--pl-gray-50);
  font-size: 13px;
}
.help-panel-foot input:focus {
  outline: none;
  border-color: var(--pl-blue);
  background: var(--pl-white);
  box-shadow: 0 0 0 3px rgba(46, 88, 148, 0.12);
}
.help-panel-foot .btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.help-panel-foot .hp-disclaimer {
  display: none;
}

.help-quick {
  /* Mantém compatibilidade com botoes antigos virando sugestoes */
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  color: var(--pl-gray-700);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  width: 100%;
  margin-bottom: 6px;
  transition: all var(--pl-dur-fast) var(--pl-ease);
}
.help-quick:hover {
  border-color: var(--pl-blue);
  color: var(--pl-blue);
}

/* 13) Reveal: garante que se IO falhar, conteudo ainda aparece */
.pl-reveal {
  /* fallback: depois de 1.5s sem trigger, mostra mesmo assim */
  animation: pl-reveal-fallback 0s 1.5s forwards;
}
@keyframes pl-reveal-fallback {
  to { opacity: 1; transform: translateY(0); }
}

/* 8) Sidebar nav-pulse: tirar aro extra duplicado que somava visualmente */
.nav-pulse::before {
  display: none;
}

/* 9) Bell swing - reduzir intensidade pra n&atilde;o assustar */
@keyframes pl-bell-swing {
  0%, 92%, 100% { transform: rotate(0); }
  94%           { transform: rotate(-8deg); }
  96%           { transform: rotate(5deg); }
  98%           { transform: rotate(-2deg); }
}

/* 10) Tilt 3D em cards: era 4&deg;, fica 2&deg; pra ser menos enjoativo */
/* (mantem o efeito mas suaviza visualmente) */

/* ---------- Performance: pausa todas as anim contInuas se a aba estiver oculta ---------- */
@media (prefers-reduced-motion: reduce) {
  .ai-tag, .ai-priority, .badge.novo, .signal-pill::before,
  .btn-primary::before, .btn-success::before,
  .stat .value, .rh-s .v, .rh-s:nth-child(4) .v, .waiting-item.commission .waiting-num.cur,
  .flow-next .btn svg, .topbar h1, .gauge-ring,
  .nav-pulse::before, .case-cover::after, .sidebar-user .avatar::after,
  .topbar-bell svg, .next-step::after, .pl-logo-idle,
  .login-page .big-avatar::before, .login-page .big-avatar::after,
  .sidebar-nav-label::after, .login-page::before,
  .filter-chip.active, .role-chip.active, .tree-icons {
    animation: none !important;
  }
}

/* ============================================================
   PADRAO "CLEAN" Pack Less - estilo limpo + legivel p/ publico 40+
   Aplicar: classe .pl-clean no .content da pagina.
   Inspirado na referencia: cards grandes, sombra suave, glass leve.
   Regras especificas de leads ficam sob .page-leads.
   ============================================================ */
/* fundo com leve profundidade (full-bleed nas paginas com tema clean) */
.main:has(> .content.pl-clean) {
  background:
    radial-gradient(820px 460px at 90% -6%, rgba(122, 183, 59, 0.16), transparent 55%),
    radial-gradient(900px 520px at -8% 108%, rgba(30, 65, 137, 0.14), transparent 55%),
    linear-gradient(155deg, #E8EFF9 0%, #F1F6EC 50%, #E6EDF8 100%);
}

/* cards: arredondados, sombra suave, borda discreta (mesma profundidade da leads em todas as telas) */
.pl-clean .table-card,
.pl-clean .stat,
.pl-clean .kpi,
.pl-clean .chart-card,
.pl-clean .card,
.pl-clean .deep-card,
.pl-clean .case-card,
.pl-clean .enrich-card {
  border-radius: 18px !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 14px 34px rgba(20, 46, 102, 0.10), 0 3px 8px rgba(20, 46, 102, 0.05) !important;
}

/* TEMA ESCURO no padrão "clean": o fundo full-bleed (gradiente claro) e a borda glass
   branca acima são FIXOS no tema claro — sem override, no dark o cliente via um gradiente
   CLARO atrás dos cards escuros e uma borda branca berrante. Aqui o gutter vira escuro e a
   borda vira discreta (var --pl-gray-200). !important + maior especificidade p/ vencer o
   glass. Vale p/ TODAS as páginas .pl-clean (dashboard, leads, campanhas, sequências, ...). */
body.theme-dark .main:has(> .content.pl-clean) {
  background:
    radial-gradient(820px 460px at 90% -6%, rgba(122, 183, 59, 0.10), transparent 55%),
    radial-gradient(900px 520px at -8% 108%, rgba(30, 65, 137, 0.18), transparent 55%),
    linear-gradient(155deg, #0F1419 0%, #121A18 50%, #0E131C 100%);
}
body.theme-dark .pl-clean .table-card,
body.theme-dark .pl-clean .stat,
body.theme-dark .pl-clean .kpi,
body.theme-dark .pl-clean .chart-card,
body.theme-dark .pl-clean .card,
body.theme-dark .pl-clean .deep-card,
body.theme-dark .pl-clean .case-card,
body.theme-dark .pl-clean .enrich-card {
  border-color: var(--pl-gray-200) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 3px 8px rgba(0, 0, 0, 0.30) !important;
}

/* KPIs (leads=.stat / dashboard=.kpi): glass + icone-chip + valor em destaque */
.pl-clean .stats,
.pl-clean .kpi-grid { gap: 18px; margin-bottom: 28px; }
.pl-clean .stat,
.pl-clean .kpi { padding: 20px 22px; display: flex; flex-direction: column; }
.pl-clean .stat,
.pl-clean .kpi:not(.featured) {
  background: rgba(255, 255, 255, 0.70);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.pl-clean .stat::before { display: none; }   /* o icone assume o acento, sem a barra lateral */
.pl-clean .stat-ico {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--pl-blue) 0%, var(--pl-blue-navy) 100%);
  color: #fff;
  margin-bottom: 14px;
  box-shadow: 0 6px 14px rgba(30, 65, 137, 0.30);
}
.pl-clean .stat-ico.ico-green {
  background: linear-gradient(135deg, #FFFFFF 0%, #FFFFFF 100%);
  color: #000;
  box-shadow: 0 6px 14px rgba(255, 255, 255, 0.32);
}
.pl-clean .kpi.featured .stat-ico {
  background: rgba(255, 255, 255, 0.20);
  color: #fff;
  box-shadow: none;
}
.pl-clean .stat-ico .icon { width: 23px; height: 23px; }
.pl-clean .stat .value,
.pl-clean .kpi .kpi-value { font-size: 32px; margin-top: 0; }
/* publico 40+: rotulo legivel (14px, escuro) em vez de cinza minusculo */
.pl-clean .stat .label,
.pl-clean .kpi .kpi-label {
  font-size: 14px; text-transform: none; letter-spacing: 0;
  font-weight: 600; margin-top: 4px; opacity: 1;
}
.pl-clean .kpi:not(.featured) .kpi-label { color: var(--pl-gray-900); }
.pl-clean .kpi .kpi-delta { font-size: 12.5px; margin-top: 3px; }

/* graficos: titulo/subtitulo legiveis (40+) */
.pl-clean .chart-card-head h3 { font-size: 16px; }
.pl-clean .chart-card-head .sub { font-size: 12.5px; }

/* tabela leads: respiro + legibilidade (header era 10.5px) */
.pl-clean .table-toolbar { padding: 18px 22px; background: transparent; border-bottom-color: var(--pl-gray-100); }
.pl-clean table.leads tbody td { padding-top: 18px; padding-bottom: 18px; }
.pl-clean table.leads tbody tr:hover td { background: rgba(30, 65, 137, 0.035); }
.pl-clean table.leads thead th {
  background: transparent !important;
  font-size: 12px !important;
  color: var(--pl-gray-700);
  font-weight: 600;
}
.pl-clean .lead-name { font-size: 14px; }
.pl-clean .activity-snippet { font-size: 13px; color: var(--pl-gray-900); }

/* pilulas, stepper, abas integradas */
.pl-clean .badge { padding: 4px 10px; font-weight: 600; }
.pl-clean .journey-stepper {
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(241, 246, 236, 0.82)) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 14px 34px rgba(20, 46, 102, 0.10), 0 3px 8px rgba(20, 46, 102, 0.05) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
/* TEMA ESCURO: o stepper glass acima é um painel BRANCO fixo (!important). Sem override, no
   dark ele fica um painel claro berrante com labels cinza em ~2.5:1. Aqui vira escuro; os
   textos/números internos já são theme-aware (label atual/sub em azul → --pl-blue-text). */
body.theme-dark .pl-clean .journey-stepper {
  background: var(--pl-white) !important;
  border-color: var(--pl-gray-200) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 3px 8px rgba(0, 0, 0, 0.30) !important;
}
body.theme-dark .js-step.current .js-step-label,
body.theme-dark .js-step.current .js-step-sub { color: var(--pl-blue-text); }
.pl-clean .page-tabs {
  background: transparent;
  margin-left: 0; margin-right: 0;
  padding-left: 0; padding-right: 0;
  border-bottom: 1px solid var(--pl-gray-200);
}

/* abas internas de filtro (Pendencias: Novos/Follow-up/Qualificados) -
   integradas + legiveis (40+), como um segmented control limpo */
.pl-clean .inbox-filters {
  background: transparent;
  border-bottom-color: var(--pl-gray-100);
  padding: 14px 16px;
  gap: 8px;
}
.pl-clean .inbox-filter {
  font-size: 13px;
  padding: 7px 14px;
  border-color: var(--pl-gray-200);
}
.pl-clean .inbox-filter:not(.active) { background: var(--pl-white); color: var(--pl-gray-700); }
.pl-clean .inbox-filter.active { background: var(--pl-blue); border-color: var(--pl-blue); color: #fff; }

/* Tarefas (kanban) - colunas com presenca, acento colorido por prioridade, vidro */
.pl-clean .task-grid { gap: 18px; }
.pl-clean .task-col {
  background: rgba(255, 255, 255, 0.70);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-top: 3px solid var(--pl-gray-300);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(20, 46, 102, 0.09);
  padding: 16px 16px 20px;
  min-height: 280px;
}
.pl-clean .task-col:has(.task-col-title.urgent) { border-top-color: var(--pl-danger); }
.pl-clean .task-col:has(.task-col-title.today)  { border-top-color: var(--pl-warning); }
.pl-clean .task-col:has(.task-col-title.week)   { border-top-color: var(--pl-blue); }
.pl-clean .task-col-title { font-size: 13px; }
.pl-clean .task-col-count {
  background: var(--pl-bg);
  border-radius: 999px;
  min-width: 26px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 9px; font-size: 13px;
}
.pl-clean .task-card { border-radius: 12px; padding: 13px 15px; }
/* form de nova tarefa como card limpo (sobrescreve o estilo .next-step) */
.pl-clean #task-form {
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 30px rgba(20, 46, 102, 0.09) !important;
  padding: 16px !important;
}
/* estado vazio amigavel (icone + frase) */
.pl-clean .col-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 26px 12px; color: var(--pl-gray-500); text-align: center; font-size: 13px;
}
.pl-clean .col-empty svg { width: 26px; height: 26px; opacity: 0.45; }

/* Alertas (notificacoes): cards com profundidade, chip de icone destacado, texto legivel */
.pl-clean .notif-feed { gap: 10px; }
.pl-clean .notif {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 18px rgba(20, 46, 102, 0.06);
  background: rgba(255, 255, 255, 0.86);
  padding: 16px 18px;
  transition: transform 140ms, box-shadow 140ms;
}
.pl-clean .notif:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(20, 46, 102, 0.11); }
.pl-clean .notif .notif-ico { width: 44px; height: 44px; border-radius: 13px; }
.pl-clean .notif .notif-ico .icon { width: 21px; height: 21px; }
.pl-clean .notif .notif-title { font-size: 14px; }
.pl-clean .notif .notif-desc { font-size: 13px; }
.pl-clean .notif .notif-time { font-size: 12px; }
/* .pl-clean .notif (border+background shorthand, mesma especificidade que .notif.unread)
   apagava por completo o realce de "não lida" (gradiente + borda esquerda azul) → medido
   idêntico a uma lida em ambos os temas. Restaura o cue com especificidade maior. */
.pl-clean .notif.unread {
  border-left: 3px solid var(--pl-blue);
  background: linear-gradient(90deg, var(--pl-blue-soft) 0%, var(--pl-white) 34%);
}
body.theme-dark .pl-clean .notif.unread { border-left-color: var(--pl-blue-text); }

/* Agenda (Reunioes): form como card limpo + cabe sem cortar o botao */
.pl-clean .ag-form {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(20, 46, 102, 0.09);
  padding: 16px;
}
.pl-clean .ag-form .f { min-width: 0; }
.pl-clean .ag-form input,
.pl-clean .ag-form select { min-width: 0; width: 100%; box-sizing: border-box; }
.pl-clean .ag-meeting {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(20, 46, 102, 0.06);
  padding: 16px 18px;
}

/* Inbox (Pendencias/Mensagens): painel unico com profundidade */
.pl-clean .inbox-grid {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 14px 34px rgba(20, 46, 102, 0.10), 0 3px 8px rgba(20, 46, 102, 0.05);
}

/* Relatorio: cards de "rendimento por campanha" - alinhamento + profundidade + legibilidade */
.delivery-row > div:last-child { text-align: right; }
.delivery-row .dr-lead { min-width: 0; overflow: hidden; }
.pl-clean .delivery-list {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 12px 30px rgba(20, 46, 102, 0.09);
}
.pl-clean .delivery-row .dr-lead { font-size: 14px; }
.pl-clean .delivery-row .dr-value { font-size: 13.5px; }
/* Dark: borda "glass" branca fixa do card vira fio berrante no tema escuro */
body.theme-dark .pl-clean .delivery-list {
  border-color: var(--pl-gray-200);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
/* Mobile: colunas fixas (104/90/124/108px) não cabem → o 1fr do nome colapsava a 0px
   e a linha era CORTADA (492>341 medido). Empilha: nome em cima, números embaixo. */
@media (max-width: 700px) {
  .delivery-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 6px;
  }
  .delivery-row .dr-lead { grid-column: 1 / -1; }
  .delivery-row .dr-value { text-align: left; }
  .delivery-row > div:last-child { text-align: left; }
  .rel-hero { grid-template-columns: 1fr; }
  .rel-hero-actions { flex-direction: row; align-items: flex-start; flex-wrap: wrap; }
  .rel-hero-stats { grid-template-columns: repeat(2, minmax(0, auto)); gap: 14px 20px; }
}

/* Simulador (Material pro cliente): painel de parametros e matriz com profundidade */
.pl-clean .sim-form {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 12px 30px rgba(20, 46, 102, 0.09);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.pl-clean .sim-form h3 { font-size: 15px; }
.pl-clean .tco-matrix {
  border-radius: 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 12px 30px rgba(20, 46, 102, 0.09) !important;
  overflow: hidden;
}
/* Dark: os painéis glass do simulador ficavam BRANCOS fixos (labels claras por cima
   = 2.26:1 medido) e a borda branca virava fio berrante */
body.theme-dark .pl-clean .sim-form {
  background: var(--pl-white);
  border-color: var(--pl-gray-200);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
body.theme-dark .pl-clean .tco-matrix {
  border-color: var(--pl-gray-200) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35) !important;
}
/* iOS: input <16px dá zoom automático ao focar — só no mobile pra não mexer no desktop */
@media (max-width: 640px) {
  .sim-form input,
  .sim-form select { font-size: 16px; }
}

/* Campanhas: form como card limpo, cards com profundidade, rotulos legiveis (40+) */
.pl-clean .camp-form {
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(20, 46, 102, 0.09);
  padding: 16px;
}
.pl-clean .camp-form .f { min-width: 0; }
.pl-clean .camp-form input,
.pl-clean .camp-form select { width: 100%; box-sizing: border-box; font-size: 14px; }
.pl-clean .camp-form label { font-size: 12px; color: var(--pl-gray-700); letter-spacing: 0.3px; }
.pl-clean .camp-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(20, 46, 102, 0.07);
  padding: 18px 20px;
}
.pl-clean .camp-target { font-size: 15.5px; }
.pl-clean .camp-meta { font-size: 12.5px; }
.pl-clean .camp-stat .v { font-size: 22px; }
.pl-clean .camp-stat .k { font-size: 12px; color: var(--pl-gray-600); letter-spacing: 0.3px; }

/* ===== Padronizacao de fontes entre as abas (legibilidade 40+) =====
   Titulos de secao e micro-rotulos uniformes e nunca minusculos demais. */
.pl-clean .section-title { font-size: 15px; font-weight: 700; color: var(--pl-charcoal); }
/* micro-rotulos (eram 10-11px) sobem para 12px; os rotulos de KPI seguem 14px da regra acima */
.pl-clean .camp-stat .k,
.pl-clean .sim-form label,
.pl-clean .ag-form label { font-size: 12px; }

/* Leads: barra de filtros alinhada a esquerda (a linha "Cargos rapidos" estava centralizada/flutuando) */
.pl-clean #sector-filters { align-items: stretch; }
.pl-clean .quick-role-chips { width: 100%; }

/* ===== Polly (Agente IA): landing centralizado (hero + composer + exemplos) ===== */
.polly-page .polly-stage {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  min-height: calc(100vh - 150px);
  display: flex;
  flex-direction: column;
  justify-content: center;   /* estado vazio: tudo centralizado verticalmente */
}
/* estado de conversa: thread cresce no topo, composer ancorado embaixo */
.polly-page.chatting .polly-stage { justify-content: flex-start; }
.polly-page.chatting .polly-hero,
.polly-page.chatting .polly-examples { display: none; }

/* Hero */
.polly-hero { text-align: center; margin-bottom: 28px; }
.polly-orb {
  width: 76px; height: 76px; margin: 0 auto 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #A4CE3F 0%, #2E5894 58%, #142E66 100%);
  box-shadow: 0 16px 40px rgba(46, 88, 148, 0.40),
              inset 0 -8px 16px rgba(0, 0, 0, 0.25),
              inset 0 8px 14px rgba(255, 255, 255, 0.45);
  animation: polly-float 5s ease-in-out infinite;
}
@keyframes polly-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.polly-greet { font-size: 30px; font-weight: 700; line-height: 1.28; color: var(--pl-charcoal); margin: 0; }
.polly-greet .grad {
  background: linear-gradient(90deg, var(--pl-blue), var(--pl-green));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Composer (input grande) */
.polly-composer {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--pl-gray-200);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(20, 46, 102, 0.10), 0 3px 8px rgba(20, 46, 102, 0.05);
  padding: 14px 16px;
}
.polly-composer .pc-input { display: flex; gap: 10px; align-items: flex-start; }
.polly-composer .pc-spark { width: 18px; height: 18px; color: var(--pl-blue); margin-top: 13px; flex: 0 0 18px; }
.polly-composer textarea {
  flex: 1; resize: none; border: none; outline: none; background: transparent;
  font-size: 15px; font-family: inherit; line-height: 1.5; color: var(--pl-charcoal);
  min-height: 46px; max-height: 180px; padding: 11px 0;
}
.polly-composer .pc-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.polly-composer .pc-hint { font-size: 12px; color: var(--pl-gray-500); }
.polly-composer .pc-send {
  width: 44px; height: 44px; padding: 0; border-radius: 50%; flex: 0 0 44px;
  justify-content: center; align-items: center;   /* centraliza a seta */
}
.polly-composer .pc-send svg { width: 18px; height: 18px; display: block; }
/* foco: realce no card inteiro (arredondado) em vez do outline azul quadrado do textarea */
.polly-composer:focus-within {
  border-color: var(--pl-blue);
  box-shadow: 0 0 0 3px rgba(46, 88, 148, 0.14), 0 14px 34px rgba(20, 46, 102, 0.10);
}
.polly-composer textarea:focus,
.polly-composer textarea:focus-visible,
.polly-composer textarea.pl-focused {
  outline: none !important;
  box-shadow: none !important;
  transform: none !important;
}
/* icone de brilho: tamanho fixo, sem distorcer no flex */
.polly-composer .pc-spark { flex: 0 0 18px; align-self: center; }

/* Exemplos */
.polly-examples { margin-top: 24px; }
.polly-examples .px-label { font-size: 11.5px; letter-spacing: 0.8px; color: var(--pl-gray-500); font-weight: 700; margin-bottom: 12px; }
.polly-examples .px-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.px-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  text-align: left; cursor: pointer; min-height: 96px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--pl-gray-200);
  border-radius: 14px; padding: 16px;
  font-size: 13.5px; font-weight: 500; color: var(--pl-charcoal);
  transition: transform 140ms, box-shadow 140ms, border-color 140ms;
}
.px-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(20, 46, 102, 0.10); border-color: var(--pl-blue); }
.px-card .px-txt { line-height: 1.4; }
.px-card .px-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--pl-blue-soft); color: var(--pl-blue); }

/* Thread (mensagens) - aparece quando ha conversa */
.polly-page .chat-log { display: none; }
.polly-page.chatting .chat-log {
  display: flex; flex-direction: column; gap: 14px;
  flex: 1; overflow-y: auto; min-height: 0;
  padding: 6px 2px; margin-bottom: 14px;
}
.polly-page .bubble { max-width: 80%; font-size: 14px; }
/* iOS: textarea <16px dá zoom automático ao focar */
@media (max-width: 640px) {
  .polly-composer textarea { font-size: 16px; }
}

/* leads-only: esconde o banner "Proximo passo" (na leads e ruido;
   no dashboard ele orienta o usuario 40+, entao permanece). */
.page-leads .flow-next { display: none !important; }

/* ============================================================
   TUTORIAL — tour guiado (holofote) + lancador "?" no topbar.
   Injetado por app.js (IIFE tutorial()). As dicas contextuais "(?)"
   reusam o componente .field-help/.term que ja existe (sem CSS novo aqui).
   Publico 40+/celular: alvos grandes, texto 15px, alto contraste, avanca
   so por botao (nada de clique acidental na area escurecida).
   ============================================================ */
.pl-help-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: none;
  border-radius: 50%;
  border: 1px solid var(--pl-gray-200, #e6e9ef);
  background: var(--pl-white, #fff);
  color: var(--pl-blue, #1E4189);
  font-size: 19px; font-weight: 800; line-height: 1;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}
.pl-help-btn:hover { background: var(--pl-blue-soft, #E5EDF7); transform: scale(1.06); }
.pl-help-btn:focus-visible { outline: 2px solid var(--pl-blue, #1E4189); outline-offset: 2px; }

/* Camada que bloqueia cliques na pagina durante o tour (o avanco e so por botao). */
.pl-tour-block { position: fixed; inset: 0; z-index: 9000; background: transparent; }
.pl-tour-block.dim { background: rgba(15, 23, 42, 0.62); }

/* Holofote: um retangulo transparente sobre o alvo; o box-shadow gigante escurece
   todo o resto. pointer-events:none = o clique "passa" pra camada de bloqueio. */
.pl-tour-spot {
  position: fixed; z-index: 9001; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.62), 0 0 0 3px var(--pl-green-lime, #A4CE3F);
  transition: top .26s ease, left .26s ease, width .26s ease, height .26s ease;
}

/* Balao do passo. */
.pl-tour-pop {
  position: fixed; z-index: 9002; box-sizing: border-box;
  width: 340px; max-width: calc(100vw - 28px);
  background: var(--pl-white, #fff); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.30);
  padding: 20px 20px 18px;
  font-family: var(--pl-font, 'Inter', sans-serif);
}
.pl-tour-pop .t { font-size: 17px; font-weight: 800; color: var(--pl-charcoal, #1f2937); margin: 0 0 7px; padding-right: 88px; }
.pl-tour-pop .d { font-size: 15px; line-height: 1.55; color: var(--pl-gray-700, #475569); margin: 0 0 16px; }
.pl-tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pl-tour-prog { font-size: 12px; font-weight: 700; color: var(--pl-gray-500, #94a3b8); white-space: nowrap; }
.pl-tour-btns { display: flex; gap: 8px; }
.pl-skip {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: var(--pl-gray-500, #94a3b8);
  font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px;
}
.pl-skip:hover { color: var(--pl-charcoal, #1f2937); text-decoration: underline; }
/* Passos centrais (boas-vindas / conclusao): sem holofote, balao no centro. */
.pl-tour-pop.center {
  left: 50% !important; top: 50% !important;
  transform: translate(-50%, -50%);
  width: 420px; text-align: center;
}
.pl-tour-pop.center .t { padding-right: 0; }
.pl-tour-pop.center .pl-tour-foot { justify-content: center; }

/* ============================================================
   Ajustes mobile + nível do lead (adicionados no fim p/ ter precedência)
   ============================================================ */
@media (max-width: 640px) {
  /* .stats (leads) e .kpi-grid (dashboard): 2×2 em vez de 4 colunas espremidas */
  .stats { grid-template-columns: 1fr 1fr; }
  /* topbar quebra em 2 linhas no mobile em vez de empurrar os botões pra fora
     da tela (o que criava scroll horizontal na página inteira) */
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 16px; row-gap: 8px; }
  .topbar-actions { margin-left: 0; width: 100%; flex-wrap: wrap; }
}

/* Nível do lead (número "Poder" + badge) — theme-aware p/ legibilidade no dark.
   Antes as cores eram hex escuros inline → Médio/Baixo sumiam na tabela escura. */
.power-num { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; line-height: 1; }
.power-num.nivel-alto        { color: var(--pl-green-dark); }
.power-num.nivel-medio       { color: #B45309; }
.power-num.nivel-baixo       { color: var(--pl-gray-700); }
.power-num.nivel-irrelevante { color: var(--pl-gray-500); }
.badge-nivel {
  display: inline-block; margin-top: 4px; padding: 2px 8px;
  border-radius: 999px; font-weight: 700; font-size: 11px;
}
.badge-nivel.nivel-alto        { color: #15803d; background: #dcfce7; }
.badge-nivel.nivel-medio       { color: #b45309; background: #fef3c7; }
.badge-nivel.nivel-baixo       { color: #475569; background: #f1f5f9; }
.badge-nivel.nivel-irrelevante { color: #64748b; background: #f1f5f9; }
body.theme-dark .power-num.nivel-alto  { color: #8BD450; }
body.theme-dark .power-num.nivel-medio { color: #F0A73B; }
body.theme-dark .badge-nivel.nivel-alto        { color: #8BD450; background: rgba(122,183,59,0.16); }
body.theme-dark .badge-nivel.nivel-medio       { color: #F0A73B; background: rgba(229,168,35,0.16); }
body.theme-dark .badge-nivel.nivel-baixo       { color: var(--pl-gray-700); background: var(--pl-gray-200); }
body.theme-dark .badge-nivel.nivel-irrelevante { color: var(--pl-gray-700); background: var(--pl-gray-200); }

/* ==============================================================
   PL.aiFx — experiência padrão "a Polly escreve pra você"
   (composer = abordagem · inbox = resposta · futuras telas)
   Peças: botão .pl-ai-btn (chamativo + aceno ao entrar na tela),
   balão proativo .pl-polly-bubble, bolinha .pl-hopball pulando
   até a caixa, entrega .pl-aiwrap.pl-rewriting + digitação.
   (Generaliza a animação que vivia inline no composer.html.)
   ============================================================== */

/* ---- botão de gerar com IA: perceptível, sem exagero ----------
   (minimalizado a pedido do usuário: sem "respiração" contínua;
   só um pulso curto e sutil quando o botão ENTRA na tela) */
.pl-ai-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  border: none; border-radius: 10px;
  font-weight: 800; font-size: 13px; letter-spacing: .2px;
  color: var(--pl-on-accent, #0c2545);
  background: linear-gradient(135deg, var(--pl-green-lime, #A4CE3F), var(--pl-green, #7AB73B));
  box-shadow: 0 4px 14px rgba(122, 183, 59, .38);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.pl-ai-btn:hover { transform: translateY(-1px) scale(1.03); filter: brightness(1.05); box-shadow: 0 8px 22px rgba(122, 183, 59, .5); }
.pl-ai-btn:active { transform: scale(.97); }
.pl-ai-btn .icon { width: 15px; height: 15px; stroke: currentColor; }
/* pulso único ao entrar na tela (IntersectionObserver no app.js).
   O nome pl-ai-wiggle é verificado no animationend do app.js — não renomear. */
.pl-ai-btn.pl-attn { animation: pl-ai-wiggle .7s ease-out both; }
@keyframes pl-ai-wiggle {
  0%   { transform: scale(1);     box-shadow: 0 4px 14px rgba(122, 183, 59, .38), 0 0 0 0 rgba(164, 206, 63, .45); }
  45%  { transform: scale(1.035); }
  100% { transform: scale(1);     box-shadow: 0 4px 14px rgba(122, 183, 59, .38), 0 0 0 9px rgba(164, 206, 63, 0); }
}

/* ---- balão proativo da Polly (ancorado acima do FAB) ---------- */
.pl-polly-bubble {
  position: fixed;
  right: 28px; bottom: 96px;
  width: min(340px, calc(100vw - 40px));
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-200);
  border-radius: 16px;
  box-shadow: var(--pl-shadow-lg);
  padding: 14px 16px 14px;
  z-index: 795;                 /* acima do conteúdo, abaixo do painel da Polly (800) */
  transform-origin: 100% 100%;  /* nasce "do FAB" */
  opacity: 0; transform: translateY(14px) scale(.72);
  transition: opacity .28s ease, transform .38s cubic-bezier(.34, 1.56, .64, 1);
  pointer-events: none;
}
.pl-polly-bubble.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.pl-polly-bubble::after { /* rabinho apontando pro FAB */
  content: ''; position: absolute; right: 26px; bottom: -7px;
  width: 14px; height: 14px; transform: rotate(45deg);
  background: var(--pl-white);
  border-right: 1px solid var(--pl-gray-200); border-bottom: 1px solid var(--pl-gray-200);
}
.pl-polly-bubble .ppb-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pl-polly-bubble .ppb-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pl-green-lime, #A4CE3F), var(--pl-green, #7AB73B));
  color: var(--pl-blue-navy, #16295c);
  display: grid; place-items: center; font-weight: 800; font-size: 12px;
  box-shadow: 0 2px 8px rgba(122, 183, 59, .4);
}
.pl-polly-bubble .ppb-head b { font-size: 13px; color: var(--pl-gray-800); }
.pl-polly-bubble .ppb-tag {
  font-size: 9px; font-weight: 800; letter-spacing: .6px; padding: 2px 6px;
  border-radius: 999px; background: rgba(164, 206, 63, .18); color: var(--pl-green-dark, #4c7a1e);
}
.pl-polly-bubble .ppb-text { font-size: 13px; line-height: 1.55; color: var(--pl-gray-700); }
.pl-polly-bubble .ppb-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 11px; align-items: center; }
.pl-polly-bubble .ppb-close {
  position: absolute; top: 8px; right: 8px;
  width: 24px; height: 24px; border: none; background: transparent; cursor: pointer;
  color: var(--pl-gray-500); border-radius: 6px; display: grid; place-items: center;
}
.pl-polly-bubble .ppb-close:hover { background: var(--pl-gray-100); color: var(--pl-gray-700); }
.pl-polly-bubble .ppb-nomore {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; font-size: 11.5px; color: var(--pl-gray-500);
  cursor: pointer; user-select: none;
}
.pl-polly-bubble .ppb-nomore:hover { color: var(--pl-gray-700); }
.pl-polly-bubble .ppb-nomore input { accent-color: var(--pl-green, #7AB73B); margin: 0; cursor: pointer; }
body.theme-dark .pl-polly-bubble { background: var(--pl-gray-100); }
body.theme-dark .pl-polly-bubble::after { background: var(--pl-gray-100); }

/* ---- bolinha da Polly pulando até a caixa de texto ------------ */
.pl-hopball {
  position: fixed; width: 26px; height: 26px; z-index: 900;
  margin: -13px 0 0 -13px;      /* centrado na coordenada */
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pl-green-lime, #A4CE3F), var(--pl-green, #7AB73B));
  color: var(--pl-blue-navy, #16295c);
  display: grid; place-items: center; font-weight: 800; font-size: 12px;
  box-shadow: 0 4px 14px rgba(122, 183, 59, .55), 0 0 0 3px rgba(255, 255, 255, .35) inset;
  pointer-events: none;
  will-change: transform;
}
.pl-hopball.land { animation: pl-hop-land .42s ease forwards; }
@keyframes pl-hop-land {
  0%   { transform: scale(1.45, .5); opacity: 1; }   /* "splash" ao cair */
  45%  { transform: scale(.85, 1.12); }
  100% { transform: scale(.15); opacity: 0; }
}

/* ---- entrega animada (generaliza .composer do composer.html) --- */
.pl-aiwrap { position: relative; }
.pl-aiwrap.pl-rewriting {
  box-shadow: 0 0 0 2px rgba(122, 183, 59, .55), 0 18px 50px rgba(30, 65, 137, .18);
  transition: box-shadow .3s ease;
}
.pl-aiwrap.pl-rewriting::before {  /* barra de luz no topo */
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 6;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--pl-green-lime, #A4CE3F), var(--pl-blue, #1E4189), transparent);
  background-size: 200% 100%; animation: pl-sweep 1s linear infinite;
}
@keyframes pl-sweep { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }
.pl-aiwrap.pl-rewriting::after {   /* varredura de brilho no corpo */
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 30%, rgba(164, 206, 63, .18) 50%, transparent 70%);
  background-size: 220% 100%; animation: pl-shine 1.15s ease-in-out infinite;
}
@keyframes pl-shine { 0% { background-position: 120% 0 } 100% { background-position: -120% 0 } }
textarea.pl-typing { caret-color: var(--pl-green, #7AB73B); }
textarea.pl-typing::selection { background: rgba(164, 206, 63, .4); }
.pl-aiwrap.pl-delivered { animation: pl-deliv 1.1s ease; }
@keyframes pl-deliv {
  0%   { box-shadow: 0 0 0 3px rgba(122, 183, 59, .6), 0 18px 50px rgba(30, 65, 137, .18); }
  100% { box-shadow: 0 0 0 0 rgba(122, 183, 59, 0), 0 10px 30px rgba(15, 23, 42, .08); }
}
.pl-aiwrap.pl-impact { animation: pl-impact .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes pl-impact { 0% { transform: scale(1) } 35% { transform: scale(1.012) } 100% { transform: scale(1) } }

/* selo "Polly escreveu" no canto do editor */
.pl-deliver-tag {
  position: absolute; top: 12px; right: 14px; z-index: 7;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: 11px; font-weight: 800;
  letter-spacing: .3px; color: var(--pl-on-accent, #0c2545); pointer-events: none;
  background: linear-gradient(135deg, var(--pl-green-lime, #A4CE3F), var(--pl-green, #7AB73B));
  box-shadow: 0 6px 18px rgba(122, 183, 59, .4);
  opacity: 0; transform: translateY(-6px) scale(.9);
  transition: opacity .3s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.pl-deliver-tag.show { opacity: 1; transform: translateY(0) scale(1); }
.pl-deliver-tag svg { width: 13px; height: 13px; }

/* flash num campo trocado (ex.: Assunto) */
.pl-flash { animation: pl-flash .8s ease; border-radius: 6px; }
@keyframes pl-flash { 0% { background: rgba(164, 206, 63, .35) } 100% { background: transparent } }

@media (prefers-reduced-motion: reduce) {
  .pl-ai-btn, .pl-ai-btn.pl-attn,
  .pl-polly-bubble, .pl-hopball,
  .pl-aiwrap.pl-rewriting::before, .pl-aiwrap.pl-rewriting::after,
  .pl-aiwrap.pl-delivered, .pl-aiwrap.pl-impact, .pl-flash {
    animation: none !important; transition: none !important;
  }
}


