@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f5f6f8;
  color: #1f2937;
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

/* Sem isso, <button>/<input>/<select> usam a fonte do sistema operacional
   em vez do Inter — é por isso que os botões pareciam "de outra fonte"
   mesmo com o mesmo tamanho. */
button, input, select, textarea { font-family: inherit; }

/* Scrollbar fina e discreta (Chrome/Edge/Safari) */
* {
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #d5d5da transparent; /* Firefox */
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: #d5d5da;
  border-radius: 10px;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: #b8b8c0;
}

:root {
  --vmz-pink: #e12155;
  --vmz-orange: #fdbc1f;
  --vmz-green: #a5cd38;
  --vmz-navy: #1f2937;
  --vmz-muted: #6b7280;
  --vmz-border: #eceff3;
  --vmz-pink-bg: #fce4f1;
  --vmz-orange-bg: #fff2df;
  --vmz-green-bg: #e6f7e9;
  --altura-botao-padrao: 38px;
}

/* ===================== MODO ESCURO ===================== */
/* Técnica de "invert + hue-rotate" — inverte a página inteira (fundo claro
   vira escuro, texto escuro vira claro) e o hue-rotate(180deg) devolve as
   cores de marca (rosa/laranja/verde) pro tom quase original, em vez de
   ficarem com a cor complementar. Escolhido de propósito: cobre TUDO de uma
   vez, inclusive cor em hex direto dentro de JS (dropdowns, modais, gráficos
   SVG dos dashboards) sem precisar caçar arquivo por arquivo — o preço é que
   fotos/imagens reais (uploads do chat, avatar, logo) ficam com cor de
   "negativo" se não forem tratadas à parte, por isso o segundo bloco abaixo
   inverte elas de volta, cancelando o efeito só nelas. */
html.modo-escuro body {
  filter: invert(1) hue-rotate(180deg);
  background: #fff;
}
html.modo-escuro img,
html.modo-escuro video {
  filter: invert(1) hue-rotate(180deg);
}
/* Emojis do sistema operacional (usados soltos em textos, ex: 📅 ✅) também
   viram "negativo" com o filtro — como são pouca coisa e específicos,
   marcamos manualmente com essa classe onde incomodar, em vez de tentar
   travar todo emoji da página (não dá pra distinguir emoji de texto no CSS). */
html.modo-escuro .emoji-nao-inverter {
  filter: invert(1) hue-rotate(180deg);
}

/* ===================== TOPBAR ===================== */

.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border-bottom: 1px solid var(--vmz-border);
  padding: 10px 24px;
  height: 64px;
}

.app-topnav { display: flex; gap: 28px; flex: 1; overflow-x: auto; }

.topnav-hamburguer {
  display: none; /* só aparece em telas estreitas, via media query abaixo */
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  color: var(--vmz-navy);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.topnav-hamburguer svg { width: 20px; height: 20px; }

.topnav-mobile-dropdown {
  display: none;
  flex-direction: column;
  gap: 4px;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--vmz-border);
  padding: 10px;
  z-index: 150;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* Telas estreitas (ex: metade de uma tela dividida): vira menu hambúrguer vertical.
   A largura da sidebar (240px fixa vs tela cheia) fica só no bloco "MODO
   CELULAR" mais abaixo — juntei os dois breakpoints no mesmo valor (860px)
   de propósito, senão sobra uma faixa de largura (ex: 700-800px) onde um
   breakpoint já pegou e o outro não, e a tela fica com a sidebar estreita
   do lado da página de trás (foi exatamente o bug que aconteceu). */
@media (max-width: 860px) {
  .app-topnav { display: none; }
  .topnav-hamburguer { display: flex; }
}


.topnav-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 4px 11px 4px;
  font-size: 14px;
  font-weight: 600;
  color: #6b6478;
  text-decoration: none;
  border-bottom: 2.5px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.topnav-icon { width: 17px; height: 17px; display: flex; flex-shrink: 0; }
.topnav-icon svg { width: 100%; height: 100%; }

.topnav-item:hover { color: var(--vmz-navy); }

.topnav-item.ativo {
  color: var(--vmz-pink);
  border-bottom-color: var(--vmz-pink);
}

.topbar-acoes { display: flex; align-items: center; gap: 10px; }

.icone-botao {
  position: relative;
  background: #f5f6f8;
  border: none;
  cursor: pointer;
  color: var(--vmz-muted);
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.icone-botao svg { width: 18px; height: 18px; }

.badge-notif {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--vmz-pink);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-usuario { position: relative; display: inline-flex; align-items: center; }

.avatar-circulo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--vmz-navy);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.avatar-online {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--vmz-green);
  border: 2px solid #fff;
}

.auth-body {
  min-height: 100vh;
  margin: 0;
  background-image: url('/login-bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-logo {
  width: 132px;
  display: block;
  margin: 0 auto 18px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(12, 32, 66, 0.08);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(12, 32, 66, 0.18);
  padding: 34px 30px;
  backdrop-filter: blur(10px);
}

.auth-card-topo {
  text-align: center;
}

.auth-card-topo h2 {
  margin: 0 0 6px;
  font-size: 28px;
  color: var(--vmz-navy);
}

.auth-card-topo p {
  margin: 0 0 20px;
  color: var(--vmz-muted);
}

.auth-form { display: grid; gap: 12px; }
.auth-submit { margin-top: 8px; width: 100%; justify-content: center; }

.auth-erro,
.auth-aviso {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
}

.auth-erro {
  background: rgba(217, 54, 79, 0.08);
  color: #b42318;
}

.auth-aviso {
  background: rgba(247, 148, 29, 0.12);
  color: #9a5b00;
}

@media (max-width: 900px) {
  .auth-layout { padding: 16px; }
  .auth-card { padding: 22px; }
}

/* ===================== PÁGINA ATENDIMENTO (3 colunas) ===================== */

.atendimento-layout {
  display: flex;
  height: 100%;
  overflow: hidden;
}

/* --- Coluna de conversas --- */

.coluna-conversas {
  width: 340px;
  min-width: 340px;
  background: #fff;
  border-right: 1px solid var(--vmz-border);
  display: flex;
  flex-direction: column;
}

.conversas-header {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.conversas-header h2 { font-size: 18px; }

.btn-nova-conversa {
  background: var(--vmz-pink);
  color: #fff;
  border: none;
  height: var(--altura-botao-padrao);
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.abas-conversas {
  display: flex;
  gap: 4px;
  padding: 0 16px 10px 16px;
  border-bottom: 1px solid var(--vmz-border);
  overflow-x: auto;
}

.aba-conversa {
  background: none;
  border: none;
  height: var(--altura-botao-padrao);
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--vmz-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.aba-conversa.ativa {
  color: var(--vmz-pink);
  border-bottom-color: var(--vmz-pink);
}

.lista-conversas { overflow-y: auto; flex: 1; }

.item-conversa {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
}

.item-conversa:hover { background: #fafafa; }
.item-conversa.selecionada { background: var(--vmz-pink-bg); }

.item-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.item-corpo { flex: 1; overflow: hidden; }

.item-linha-topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.item-nome { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-hora { font-size: 11px; color: var(--vmz-muted); flex-shrink: 0; }

.item-status-linha {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0;
}

.badge-status {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.badge-aguardando { background: var(--vmz-orange-bg); color: var(--vmz-orange); }
.badge-atendimento { background: var(--vmz-pink-bg); color: var(--vmz-pink); }
.badge-finalizado { background: var(--vmz-green-bg); color: var(--vmz-green); }
.badge-no-bot { background: #ece6fb; color: #6b3fd4; }

.item-preview {
  font-size: 12px;
  color: var(--vmz-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Coluna do chat --- */

.coluna-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #efeae2;
  min-width: 0;
}

.chat-topo {
  background: #fff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--vmz-border);
}

.chat-topo-clicavel {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  flex: 1;
  text-align: left;
}

.chat-topo-clicavel:hover { background: #f5f6f8; }

.chat-topo-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #555;
}

.chat-topo-info { flex: 1; }
.chat-topo-nome { font-size: 15px; font-weight: 700; }
.chat-topo-canal { font-size: 12px; color: var(--vmz-green); display: flex; align-items: center; gap: 4px; }

.chat-topo-acoes { display: flex; gap: 8px; }

.chat-botao-acao {
  padding: 8px 14px;
  border: 1px solid var(--vmz-border);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--vmz-navy);
  white-space: nowrap;
}

.chat-botao-acao:hover { background: #f5f6f8; }

.chat-botao-acao-perigo {
  border-color: #d9364f;
  color: #d9364f;
}

.chat-botao-acao-perigo:hover { background: #fde2e2; }

.mensagens {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: #efeae2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='none' stroke='%23d8cfc0' stroke-width='1.4' opacity='0.55'%3E%3C!-- bússola --%3E%3Ccircle cx='20' cy='20' r='10'/%3E%3Cpath d='M20 13l3 7-3 7-3-7z'/%3E%3C!-- castelo --%3E%3Cpath d='M75 30v-6h4v3h4v-3h4v3h4v-3h4v6l-2 2v8H77v-8z'/%3E%3C!-- montanha-russa --%3E%3Cpath d='M15 90c4-8 8-8 12 0s8 8 12 0 8-8 12 0'/%3E%3C!-- orelhas mickey --%3E%3Ccircle cx='105' cy='95' r='9'/%3E%3Ccircle cx='97' cy='87' r='4'/%3E%3Ccircle cx='113' cy='87' r='4'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
}

.bolha {
  max-width: 60%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 1px 1px rgba(0,0,0,0.06);
  position: relative;
}

.bolha.entrada { align-self: flex-start; background: #fff; }
.bolha.saida { align-self: flex-end; background: #d9fdd3; }
.bolha.interna { align-self: flex-end; background: #fff3cd; border: 1px dashed #e0b23a; }

.bolha-rotulo-interna {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #8a6d1f;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.bolha .hora { display: block; font-size: 10px; color: #888; margin-top: 4px; text-align: right; }

.bolha-com-midia { padding: 6px; }
.bolha-midia-imagem { display: block; max-width: 260px; max-height: 260px; border-radius: 8px; cursor: pointer; object-fit: cover; }
.bolha-midia-video { display: block; max-width: 260px; border-radius: 8px; }
.player-audio { display: flex; align-items: center; gap: 8px; width: 240px; }

.player-audio-play {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--vmz-pink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.player-audio-play:hover { opacity: 0.9; }
.player-audio-play .icone-play { margin-left: 1px; }

.player-audio-onda-wrap { position: relative; flex: 1; height: 20px; overflow: hidden; }

.player-audio-onda {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 100%;
  width: 100%;
}
.player-audio-onda i {
  display: inline-block;
  width: 3px;
  flex-shrink: 0;
  font-style: normal;
  font-size: 0;
  background: currentColor;
  border-radius: 2px;
}
.player-audio-onda-wrap .player-audio-onda:first-child { color: #c8ccd1; }
.player-audio-onda-progresso { width: 0%; color: var(--vmz-pink); overflow: hidden; }

.player-audio-tempo { font-size: 11px; color: var(--vmz-muted); flex-shrink: 0; min-width: 30px; }
.bolha-midia-legenda { padding: 6px 6px 0; font-size: 13.5px; color: var(--vmz-navy); white-space: pre-wrap; word-break: break-word; }
.bolha-midia-documento {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: rgba(255,255,255,0.6);
  border-radius: 8px;
  text-decoration: none;
  color: var(--vmz-navy);
  font-size: 13px;
  font-weight: 600;
  max-width: 240px;
}
.bolha-midia-documento svg { flex-shrink: 0; color: var(--vmz-pink); }
.bolha-midia-documento span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tique-entrega { display: inline-block; vertical-align: -1px; margin-left: 3px; color: #8696a0; }
.chat-botao-icone {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--vmz-pink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-botao-icone:hover { opacity: 0.9; background: var(--vmz-pink); }

.painel-biblioteca {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100%;
  background: #fff;
  border-left: 1px solid var(--vmz-border);
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.08);
  z-index: 205;
  display: flex;
  flex-direction: column;
  transition: right 0.25s ease;
}
.painel-biblioteca.aberto { right: 0; }

.painel-biblioteca-header { padding: 16px 18px; border-bottom: 1px solid var(--vmz-border); }
.painel-biblioteca-header h3 { font-size: 15px; margin: 0; color: var(--vmz-navy); }

.painel-biblioteca-abas {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--vmz-border);
}
.painel-biblioteca-aba {
  border: none;
  background: #f5f6f8;
  color: var(--vmz-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 14px;
  cursor: pointer;
}
.painel-biblioteca-aba.ativa { background: var(--vmz-pink); color: #fff; }

.painel-biblioteca-corpo { flex: 1; overflow-y: auto; padding: 12px; }
.painel-biblioteca-vazio { color: var(--vmz-muted); font-size: 13px; text-align: center; padding: 30px 10px; }

.painel-biblioteca-grid-fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.painel-biblioteca-foto-item { aspect-ratio: 1; border-radius: 6px; overflow: hidden; cursor: pointer; }
.painel-biblioteca-foto-item img, .painel-biblioteca-foto-item video { width: 100%; height: 100%; object-fit: cover; }

.painel-biblioteca-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.painel-biblioteca-item:hover { background: #f5f6f8; }
.painel-biblioteca-item-icone {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 8px;
  background: #eef0f3;
  color: var(--vmz-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.painel-biblioteca-item-texto { flex: 1; min-width: 0; overflow: hidden; }
.painel-biblioteca-item-nome { font-size: 12.5px; color: var(--vmz-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.painel-biblioteca-item-data { font-size: 11px; color: var(--vmz-muted); }

.tique-entrega.entregue { color: #8696a0; }
.tique-entrega.enviando { color: #8696a0; opacity: 0.7; }
.tique-entrega.lido { color: #53bdeb; }
.tique-entrega.falhou { color: #d9364f; }

.btn-menu-msg {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--vmz-border);
  background: #fff;
  color: var(--vmz-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.bolha.entrada .btn-menu-msg { right: auto; left: -8px; }
.bolha:hover .btn-menu-msg { opacity: 1; }

.bolha-reacao-badge {
  position: absolute;
  bottom: -10px;
  right: 8px;
  background: #fff;
  border: 1px solid var(--vmz-border);
  border-radius: 10px;
  padding: 1px 5px;
  font-size: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.bolha.entrada .bolha-reacao-badge { right: auto; left: 8px; }

.bolha-citacao {
  border-left: 3px solid var(--vmz-pink);
  background: rgba(0,0,0,0.04);
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--vmz-muted);
  margin-bottom: 5px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-msg-popup {
  position: absolute;
  top: 16px;
  right: 0;
  z-index: 200;
  background: #fff;
  border: 1px solid var(--vmz-border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  width: 220px;
  padding: 8px;
  font-size: 13px;
}
.bolha.entrada .menu-msg-popup { right: auto; left: 0; }

.menu-msg-reacoes {
  display: flex;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--vmz-border);
}
.menu-msg-emoji {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  border-radius: 6px;
  padding: 2px 4px;
  line-height: 1;
}
.menu-msg-emoji:hover { background: #f1f1f4; transform: scale(1.15); }

.menu-msg-opcoes { display: flex; flex-direction: column; }
.menu-msg-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  text-align: left;
  padding: 7px 6px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--vmz-navy);
  font-size: 13px;
  text-decoration: none;
}
.menu-msg-item:hover { background: #f1f1f4; }
.menu-msg-item svg { flex-shrink: 0; color: var(--vmz-muted); }

.menu-msg-status-bloco { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--vmz-border); display: flex; flex-direction: column; gap: 4px; }
.menu-msg-status { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--vmz-muted); }
.menu-msg-status .lido { color: #53bdeb; font-weight: 600; }
.menu-msg-status span:last-child { margin-left: auto; }

.barra-respondendo {
  padding: 8px 16px;
  background: #f5f5f7;
  border-top: 1px solid var(--vmz-border);
}
.barra-respondendo-linha {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--vmz-muted);
  font-size: 12.5px;
}
.barra-respondendo-texto { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--vmz-navy); }
.barra-respondendo-linha button { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--vmz-muted); line-height: 1; }
.barra-respondendo-linha button:hover { color: #d9364f; }

.chat-toolbar-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border: none;
  background: none;
  color: var(--vmz-muted);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.chat-toolbar-btn svg { width: 17px; height: 17px; }
.chat-toolbar-btn:hover { background: #f5f6f8; color: var(--vmz-navy); }
.chat-toolbar-btn.ativo { background: #fff3cd; color: #8a6d1f; }
.chat-toolbar-btn#btnAudio.ativo { background: #ffe0e3; color: #d9364f; animation: pulsar-gravando 1.2s infinite; }
@keyframes pulsar-gravando { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.form-envio.gravando-audio > *:not(#painelGravacaoAudio) { display: none !important; }

.painel-gravacao-audio {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding: 4px 6px;
}

.gravacao-audio-ponto {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d9364f;
  flex-shrink: 0;
  animation: pulsar-gravando 1.2s infinite;
}
.gravacao-audio-ponto.pausado { animation: none; opacity: 0.4; }

.gravacao-audio-tempo { font-size: 13px; font-weight: 600; color: var(--vmz-navy); min-width: 40px; }

.gravacao-audio-botao {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--vmz-border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--vmz-navy);
}
.gravacao-audio-botao:hover { border-color: var(--vmz-pink); color: var(--vmz-pink); }
.gravacao-audio-botao.descartar:hover { border-color: #d9364f; color: #d9364f; }
.gravacao-audio-botao.enviar { background: var(--vmz-pink); border-color: var(--vmz-pink); color: #fff; }
.gravacao-audio-botao.enviar:hover { opacity: 0.9; color: #fff; }

.gravacao-audio-onda-wrap { position: relative; flex: 1; height: 20px; overflow: hidden; }

.gravacao-audio-onda {
  display: flex;
  align-items: center;
  gap: 1px;
  height: 100%;
  width: 100%;
}
.gravacao-audio-onda i {
  display: inline-block;
  flex: 1;
  min-width: 1px;
  max-width: 2.5px;
  font-style: normal;
  font-size: 0;
  background: var(--vmz-pink);
  border-radius: 1px;
  height: 8%;
  opacity: 0.22;
  transition: height 0.12s ease-out;
}
.gravacao-audio-onda i.revelada { opacity: 1; }

.btn-enviar-template { color: var(--vmz-pink); }
.btn-enviar-template:hover { background: var(--vmz-pink-bg); color: var(--vmz-pink); }

.chat-barra-busca {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid var(--vmz-border);
}

#chatBuscaAvisoCarregar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  font-size: 12.5px;
  color: var(--vmz-muted);
}

#chatBuscaCampo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  background: #f5f6f8;
  border-radius: 8px;
  padding: 0 10px;
  height: 36px;
  color: var(--vmz-muted);
}

#chatBuscaCampo input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 13px;
  color: var(--vmz-navy);
  height: 100%;
}

#chatBuscaContador { font-size: 11.5px; color: var(--vmz-muted); white-space: nowrap; }

#chatBuscaCampo button, #btnFecharBuscaChat {
  width: 26px;
  height: 26px;
  border: none;
  background: none;
  border-radius: 6px;
  color: var(--vmz-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

#chatBuscaCampo button:hover, #btnFecharBuscaChat:hover { background: #eceff3; color: var(--vmz-navy); }
#btnFecharBuscaChat { font-size: 18px; }

.bolha-resultado-busca { box-shadow: 0 0 0 2px var(--vmz-orange) inset; border-radius: 10px; }
.bolha-resultado-busca-ativo { box-shadow: 0 0 0 2px var(--vmz-pink) inset; }

.aviso-janela-fechada {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fdeaf0;
  color: #a3134f;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 20px;
  border-top: 3px solid var(--vmz-pink);
}
.aviso-janela-fechada svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--vmz-pink); }


.template-busca-modal {
  margin: 4px 0 14px;
  padding: 9px 12px;
  border: 1px solid var(--vmz-border);
  border-radius: 8px;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
}
.template-busca-modal:focus { outline: none; border-color: var(--vmz-pink); }

.template-modal-acordeao { border-bottom: 1px solid var(--vmz-border); }
.template-modal-acordeao:last-child { border-bottom: none; }

.template-modal-acordeao-titulo {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 14px 4px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--vmz-navy);
  text-align: left;
}
.template-modal-acordeao-titulo svg { transition: transform 0.15s; flex-shrink: 0; }
.template-modal-acordeao.aberto .template-modal-acordeao-titulo svg { transform: rotate(90deg); }
.template-modal-acordeao-titulo span { font-weight: 500; color: var(--vmz-muted); text-transform: none; }

.template-modal-acordeao-corpo { display: none; padding: 0 4px 14px; }
.template-modal-acordeao.aberto .template-modal-acordeao-corpo { display: block; }

.template-modal-vazio { font-size: 12.5px; color: var(--vmz-muted); padding: 6px 0 10px; }

.template-modal-linha {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--vmz-border);
  border-radius: 10px;
  margin-bottom: 8px;
}
.template-modal-linha:hover { border-color: var(--vmz-pink); background: #fff8fa; }
.template-modal-linha-texto { flex: 1; min-width: 0; }
.template-modal-linha-topo { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.template-modal-linha-usar { white-space: nowrap; flex-shrink: 0; }

.template-modal-item-nome { font-size: 13.5px; font-weight: 700; color: var(--vmz-navy); }
.template-modal-item-tipo {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--vmz-muted);
  background: #eef0f3;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.template-modal-item-corpo {
  font-size: 12px;
  color: var(--vmz-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.op-abas { display: flex; gap: 4px; border-bottom: 1px solid var(--vmz-border); }
.op-aba {
  border: none;
  background: none;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--vmz-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.op-aba.ativa { color: var(--vmz-pink); border-bottom-color: var(--vmz-pink); }

.op-oportunidade-lista { display: flex; flex-direction: column; gap: 10px; }
.op-oportunidade-vazio { color: var(--vmz-muted); font-size: 13px; text-align: center; padding: 30px 10px; }

.op-oportunidade-card {
  border: 1px solid var(--vmz-border);
  border-radius: 10px;
  padding: 12px;
}
.op-oportunidade-card-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.op-oportunidade-funil { font-size: 13px; font-weight: 700; color: var(--vmz-navy); }
.op-oportunidade-status {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  text-transform: uppercase;
}
.op-oportunidade-status.aberto { background: #eef0f3; color: var(--vmz-muted); }
.op-oportunidade-status.ganho { background: #e3f7e9; color: #1a8a4a; }
.op-oportunidade-status.perdido { background: #fde2e2; color: #d9364f; }
.op-oportunidade-status.analise_falha { background: #eef0f3; color: var(--vmz-muted); }

.op-oportunidade-linha { display: flex; justify-content: space-between; font-size: 12.5px; padding: 3px 0; }
.op-oportunidade-linha span:first-child { color: var(--vmz-muted); }
.op-oportunidade-linha span:last-child { color: var(--vmz-navy); font-weight: 600; }

.op-oportunidade-abrir-topo {
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
  padding: 7px;
  border-radius: 8px;
  border: none;
  background: var(--vmz-pink);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}
.op-oportunidade-abrir-topo:hover { opacity: 0.9; }

.op-oportunidade-timeline { margin-top: 10px; border-top: 1px solid var(--vmz-border); padding-top: 6px; }

#popoverEmoji {
  position: absolute;
  bottom: 58px;
  left: 16px;
  background: #fff;
  border: none;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(20, 15, 25, 0.16);
  z-index: 50;
  max-width: calc(100% - 32px);
  overflow: hidden;
}

#popoverEmoji emoji-picker {
  width: 340px;
  max-width: 100%;
  height: 380px;
  color-scheme: light;
  border-radius: 16px;
  --num-columns: 8;
  --background: #ffffff;
  --border-color: #f0f0f0;
  --indicator-color: var(--vmz-pink);
  --input-border-color: #e5e5e5;
  --input-font-color: #1f2937;
  --input-placeholder-color: #999;
  --category-font-color: #6b6478;
  --button-active-background: var(--vmz-pink-bg);
  --button-hover-background: #f5f6f8;
  --outline-color: var(--vmz-pink);
}

#popoverRespostaRapida {
  display: flex;
  flex-direction: column;
  min-width: 220px;
  max-height: 240px;
  overflow-y: auto;
  padding: 8px;
}

.btn-editar-dados-cliente {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 8px;
  border: 1px solid var(--vmz-border);
  background: #fff;
  color: var(--vmz-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.btn-editar-dados-cliente:hover { border-color: var(--vmz-pink); color: var(--vmz-pink); }

.info-icone-canal {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.info-icone-whatsapp { background: #e6f7ea; color: #25D366; }
.info-icone-telefone {
  background: var(--vmz-pink-bg);
  color: var(--vmz-pink);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.info-icone-telefone:hover { opacity: 0.8; }
.info-icone-telefone:disabled { cursor: default; }

.chat-popover {
  position: absolute;
  bottom: 58px;
  left: 12px;
  width: 320px;
  max-height: 320px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--vmz-border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 50;
}

.chat-popover-resposta-busca {
  height: var(--altura-botao-padrao);
  padding: 0 14px;
  border: 1px solid var(--vmz-border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  margin-bottom: 6px;
  width: 100%;
}

.chat-popover-resposta-busca:focus { border-color: var(--vmz-pink); }

.chat-popover-resposta {
  text-align: left;
  border: none;
  background: none;
  padding: 8px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 6px;
}
.chat-popover-resposta:hover { background: #f5f6f8; }

.anexar-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 24px 24px 24px;
}

.anexar-opcao {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--vmz-border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: var(--vmz-navy);
  transition: background 0.12s ease, border-color 0.12s ease;
}
.anexar-opcao:hover { background: #fafafa; border-color: #ddd; }
.anexar-opcao span:last-child { font-weight: 600; text-align: left; }

.anexar-opcao-icone {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.anexar-opcao-icone svg { width: 19px; height: 19px; }

.anexar-cor-azul { background: #e8f0fe; color: #3b6fd6; }
.anexar-cor-roxo { background: #f0ebfd; color: #8B5CF6; }
.anexar-cor-amarelo { background: #fff3cd; color: #c9960c; }
.anexar-cor-verde { background: #e6f7ea; color: #39B54A; }
.anexar-cor-rosa { background: var(--vmz-pink-bg); color: var(--vmz-pink); }

.modal-sussurro {
  border-radius: 20px;
  overflow: hidden;
}

.sussurro-faixa {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #fff9e8 0%, #fff0c2 100%);
}

.sussurro-titulos { flex: 1; }
.sussurro-titulos h3 { font-size: 16px; color: #6b4f04; margin-bottom: 2px; }
.sussurro-titulos span { font-size: 12px; color: #9a7d1f; }

.sussurro-icone {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 13px;
  background: #f5a623;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(245, 166, 35, 0.35);
}
.sussurro-icone svg { width: 20px; height: 20px; }

.modal-sussurro .modal-habla-fechar {
  color: #9a7d1f;
  flex-shrink: 0;
}

.modal-sussurro .modal-habla-corpo { padding-top: 20px; }

.sussurro-aviso {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #8a6d1f;
  background: #fffaf0;
  border: 1px solid #fbe7b6;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.sussurro-aviso svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

.sussurro-textarea {
  border-radius: 12px !important;
  resize: vertical;
}

.sussurro-textarea:focus {
  outline: none;
  border-color: #f5a623 !important;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}

.sussurro-anexo-linha {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.sussurro-anexo-linha .btn-secundario { font-size: 12px; height: 32px; padding: 0 12px; }

.btn-sussurro-salvar {
  background: linear-gradient(90deg, #f5a623, #e8940f) !important;
  box-shadow: 0 3px 10px rgba(245, 166, 35, 0.3);
}
.btn-sussurro-salvar:hover { opacity: 0.92; }

.form-envio {
  display: flex;
  align-items: flex-end;
  padding: 8px 16px;
  background: #fff;
  border-top: 1px solid var(--vmz-border);
  gap: 6px;
  position: relative;
  flex-wrap: nowrap;
}

.form-envio textarea {
  flex: 1;
  min-width: 0;
  padding: 9px 14px;
  border: 1px solid #ddd;
  border-radius: 20px;
  outline: none;
  resize: none;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.35;
  max-height: 120px;
  overflow-y: auto;
}

.form-envio button.btn-enviar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: var(--vmz-pink);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.form-envio button:disabled,
.form-envio textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.estado-vazio {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vmz-muted);
  font-size: 14px;
}

/* --- Coluna de oportunidade (placeholder do CRM) --- */

.coluna-oportunidade {
  width: 400px;
  min-width: 400px;
  background: #fff;
  border-left: 1px solid var(--vmz-border);
  padding: 20px;
  overflow-y: auto;
}

.oportunidade-titulo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-weight: 700;
  font-size: 15px;
}

.oportunidade-campo { margin-bottom: 14px; }
.oportunidade-label { font-size: 12px; color: var(--vmz-muted); margin-bottom: 4px; }
.oportunidade-valor { font-size: 13px; font-weight: 600; }

.oportunidade-aviso {
  background: #f5f6f8;
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  color: var(--vmz-muted);
  margin-top: 20px;
}

.oportunidade-timeline-titulo {
  font-size: 12px;
  font-weight: 700;
  color: var(--vmz-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 18px 0 10px 0;
  padding-top: 14px;
  border-top: 1px solid var(--vmz-border);
}

.oportunidade-timeline-lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - 420px);
  overflow-y: auto;
}

.oportunidade-timeline-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.oportunidade-timeline-bolinha {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.oportunidade-timeline-data { font-size: 10px; color: var(--vmz-muted); }
.oportunidade-timeline-evento-titulo { font-size: 12px; font-weight: 600; color: var(--vmz-navy); }

/* ===================== PESSOAS ===================== */

.pagina-container {
  width: 100%;
  padding: 24px;
  overflow-x: hidden;
}

.pagina-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.pagina-header-compacto h2 {
  font-size: 19px;
  font-weight: 700;
  color: var(--vmz-navy);
}

.pagina-header-acoes {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pessoas-linha-acoes-busca {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.pessoas-linha-acoes-busca .pessoas-busca-input {
  flex: 1;
  min-width: 220px;
  margin: 0;
}

.pessoas-busca-input {
  height: var(--altura-botao-padrao);
  padding: 0 14px;
  border: 1px solid var(--vmz-border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}

.badge-bloqueado {
  background: #fde2e2;
  color: #d9364f;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.filtro-status-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filtro-status-checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1.5px solid var(--vmz-border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--vmz-navy);
  cursor: pointer;
  background: #fafafa;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.filtro-status-checklist label:hover { border-color: var(--vmz-pink); background: #fff; }

.filtro-status-checklist input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--vmz-pink);
  cursor: pointer;
  flex-shrink: 0;
}

.filtros-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 25, 0.35);
  z-index: 9999;
  display: flex;
  justify-content: flex-end;
}

.template-conexao-grupo { margin-bottom: 24px; }
.template-conexao-titulo { font-size: 14px; font-weight: 700; color: var(--vmz-navy); margin-bottom: 12px; }
.template-categoria-grupo { margin-bottom: 16px; margin-left: 12px; }
.template-categoria-titulo { font-size: 12px; font-weight: 700; color: var(--vmz-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 6px; }

.template-tipo-cards { display: flex; flex-direction: column; gap: 8px; }
.template-tipo-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--vmz-border);
  border-radius: 10px;
  padding: 12px;
  opacity: 0.5;
}
.template-tipo-card.selecionado { opacity: 1; border-color: var(--vmz-pink); background: var(--vmz-pink-bg); }
.template-tipo-card svg:first-child { flex-shrink: 0; margin-top: 2px; color: var(--vmz-navy); }
.template-tipo-card-titulo { font-size: 13px; font-weight: 700; color: var(--vmz-navy); }
.template-tipo-card-desc { font-size: 11.5px; color: var(--vmz-muted); margin-top: 2px; line-height: 1.4; }
.template-tipo-card-check { flex-shrink: 0; color: var(--vmz-pink); margin-left: auto; }

.template-tabela {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--vmz-border);
  border-radius: 10px;
  overflow: hidden;
  font-size: 13px;
}
.template-tabela thead th {
  text-align: left;
  padding: 10px 14px;
  background: #f9f9fb;
  color: var(--vmz-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--vmz-border);
}
.template-tabela tbody tr {
  cursor: pointer;
  border-bottom: 1px solid var(--vmz-border);
}
.template-tabela tbody tr:last-child { border-bottom: none; }
.template-tabela tbody tr:hover { background: #f9f9fb; }
.template-tabela td {
  padding: 11px 14px;
  color: var(--vmz-navy);
  vertical-align: middle;
}
.template-tabela-nome { font-weight: 600; }
.template-tabela-acoes { width: 40px; text-align: right; }
.template-tabela-excluir {
  width: 28px;
  height: 28px;
  border: 1px solid var(--vmz-border);
  border-radius: 6px;
  background: #fff;
  color: var(--vmz-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.template-tabela-excluir:hover { border-color: #d9364f; color: #d9364f; }

.filtros-drawer.template-drawer {
  width: 62%;
  min-width: 760px;
  max-width: 1100px;
  padding: 24px 24px 0 24px;
}

.template-drawer-corpo {
  display: flex;
  flex: 1;
  gap: 24px;
  overflow: hidden;
  padding-bottom: 16px;
}

.template-drawer-form {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding-right: 12px;
}

.template-drawer-preview {
  width: 320px;
  flex-shrink: 0;
  border-left: 1px solid var(--vmz-border);
  padding-left: 24px;
  display: flex;
  flex-direction: column;
}

.template-preview-tela {
  flex: 1;
  border-radius: 16px;
  background-color: #efeae2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='none' stroke='%23d8cfc0' stroke-width='1.4' opacity='0.55'%3E%3Ccircle cx='20' cy='20' r='10'/%3E%3Cpath d='M20 13l3 7-3 7-3-7z'/%3E%3C/g%3E%3C/svg%3E");
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 320px;
}

.template-preview-bolha {
  max-width: 90%;
  white-space: pre-wrap;
  word-break: break-word;
}

.template-preview-botao {
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: #00a5f4;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.06);
}

.template-botao-linha {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  align-items: center;
}
.template-botao-linha .template-botao-tipo { flex: 0 0 150px; }
.template-botao-linha .template-botao-texto { flex: 1; }
.template-botao-linha .template-botao-valor { flex: 1; }
.template-botao-linha .template-botao-remover { flex-shrink: 0; color: #d9364f; }
.template-botao-linha .template-botao-remover:hover { border-color: #d9364f; }

.filtros-drawer {
  width: 400px;
  height: 100%;
  background: #fff;
  padding: 24px;
  box-shadow: -8px 0 24px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.filtros-drawer .modal-habla-header-linha {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--vmz-border);
}

.filtros-drawer .modal-habla-header-linha h3 { font-size: 18px; }

.filtros-secao {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--vmz-border);
}

.filtros-secao:last-of-type { border-bottom: none; }

.filtros-secao-titulo {
  font-size: 11px;
  font-weight: 700;
  color: var(--vmz-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.filtros-linha-datas {
  display: flex;
  gap: 10px;
}

.filtros-linha-datas > div { flex: 1; }

.filtros-drawer input[type="date"],
.filtros-drawer input[type="number"],
.filtros-drawer select,
.filtros-drawer .modal-habla-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--vmz-border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--vmz-navy);
  background: #fafafa;
  transition: border-color 0.15s ease;
}

.filtros-drawer input[type="date"]:focus,
.filtros-drawer select:focus {
  outline: none;
  border-color: var(--vmz-pink);
  background: #fff;
}

.tabela-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.tabela-padrao {
  width: 100%;
  background: #fff;
  border-collapse: collapse;
}

.tabela-padrao th, .tabela-padrao td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--vmz-border);
  font-size: 13px;
}

.celula-numero-linha { color: var(--vmz-muted); font-variant-numeric: tabular-nums; width: 1%; white-space: nowrap; }

.linha-atendimento-fila { cursor: pointer; }
.linha-atendimento-fila:hover { background: #f7f8fa; }

.tabela-padrao th { color: var(--vmz-muted); font-weight: 700; font-size: 12px; text-transform: uppercase; }

.vazio { text-align: center; color: var(--vmz-muted); padding: 30px 0; }

/* ===================== EM CONSTRUÇÃO ===================== */

.em-construcao {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--vmz-muted);
  gap: 8px;
  height: 100%;
}

.em-construcao h2 { color: #555; }

.grid-cards-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.card-dashboard-placeholder {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  opacity: 0.55;
}

.card-dashboard-placeholder h3 { font-size: 14px; color: var(--vmz-navy); margin-bottom: 8px; }
.card-dashboard-placeholder p { font-size: 12.5px; color: var(--vmz-muted); line-height: 1.5; margin-bottom: 14px; }

.badge-em-desenvolvimento {
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  color: var(--vmz-muted);
  background: #eceff3;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Cards do hub /dashboard — cada um agora é um link pra página própria */
.card-dashboard-link {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  transition: box-shadow 0.15s, transform 0.15s;
}
.card-dashboard-link:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-1px); }
.card-dashboard-link h3 { font-size: 14px; color: var(--vmz-navy); margin-bottom: 8px; }
.card-dashboard-link p { font-size: 12.5px; color: var(--vmz-muted); line-height: 1.5; margin-bottom: 14px; }
.card-dashboard-link-seta { font-size: 12px; font-weight: 700; color: var(--vmz-pink); }

/* Link "← Dashboard" no topo das páginas dedicadas */
.pagina-header-compacto { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.dash-voltar { font-size: 12.5px; color: var(--vmz-muted); text-decoration: none; font-weight: 600; }
.dash-voltar:hover { color: var(--vmz-pink); }

/* ===================== DASHBOARD: cards cheios (Atendimentos/Sessões) ===================== */

.card-dashboard-cheio {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 16px;
}

.dash-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.dash-card-header h3 { font-size: 15px; color: var(--vmz-navy); margin-bottom: 4px; }
.dash-card-acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* -- Resumo (barra de métricas no topo, estilo Hablla) -- */
.dash-resumo-barra {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  background: #f7f7f9;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.dash-resumo-item { display: flex; flex-direction: column; gap: 4px; cursor: default; }
.dash-resumo-label { font-size: 11px; color: var(--vmz-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.dash-resumo-valor { font-size: 20px; font-weight: 700; color: var(--vmz-navy); }

/* -- Colunas por atendente -- */
.dash-colunas-atendentes {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.dash-coluna-atendente {
  flex: 0 0 260px;
  background: #f7f7f9;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  max-height: 520px;
}
.dash-coluna-atendente-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--vmz-border);
}
.dash-avatar-atendente {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--vmz-navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.dash-avatar-atendente img { width: 100%; height: 100%; object-fit: cover; }
.dash-avatar-status {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d1d5db;
  border: 2px solid #f7f7f9;
}
.dash-avatar-status.online { background: var(--vmz-green); }
.dash-coluna-atendente-nome { flex: 1; font-size: 13px; font-weight: 600; color: var(--vmz-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-coluna-atendente-total {
  background: var(--vmz-pink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.dash-coluna-atendente-lista { overflow-y: auto; padding: 8px; }
.dash-conversa-item {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.dash-conversa-item:hover { box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.dash-conversa-item-topo { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.dash-conversa-nome { font-size: 12.5px; font-weight: 600; color: var(--vmz-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-conversa-hora { font-size: 10.5px; color: var(--vmz-muted); flex-shrink: 0; }
.dash-conversa-preview { font-size: 11.5px; color: var(--vmz-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.dash-conversa-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.dash-conversa-tag { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--vmz-border); color: var(--vmz-muted); }
.dash-conversa-tag-status.status-aguardando { background: var(--vmz-orange-bg); color: #b8790a; }
.dash-conversa-tag-status.status-no_bot { background: #e6e9ff; color: #3b3fb0; }
.dash-conversa-tag-status.status-em_atendimento { background: var(--vmz-green-bg); color: #4c7a12; }
.dash-conversa-tag-status.status-finalizado { background: var(--vmz-border); color: var(--vmz-muted); }

/* -- Sessões de mensageria: totais -- */
.dash-totais-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.dash-total-card {
  background: #f7f7f9;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-total-label { font-size: 11px; color: var(--vmz-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.dash-total-valor { font-size: 24px; font-weight: 700; color: var(--vmz-navy); }
.dash-total-recebidas .dash-total-valor { color: var(--vmz-green); }
.dash-total-enviadas .dash-total-valor { color: var(--vmz-pink); }

/* -- Sessões de mensageria: gráficos -- */
.dash-sessoes-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
}
.dash-sessoes-bloco-largo { grid-column: 1 / -1; }
.dash-sessoes-bloco h4 { font-size: 12.5px; color: var(--vmz-navy); margin-bottom: 10px; font-weight: 600; }

.dash-legenda { display: flex; gap: 16px; margin-top: 6px; }
.dash-legenda-item { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--vmz-muted); }
.dash-legenda-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.dash-barra-conexao { margin-bottom: 12px; }
.dash-barra-conexao-nome { font-size: 12px; color: var(--vmz-navy); margin-bottom: 4px; }
.dash-barra-conexao-trilha { background: var(--vmz-border); border-radius: 6px; height: 8px; margin-bottom: 3px; overflow: hidden; }
.dash-barra-conexao-fill { height: 100%; border-radius: 6px; }
.dash-barra-recebidas { background: var(--vmz-green); }
.dash-barra-enviadas { background: var(--vmz-pink); }

.dash-barras-hora { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.dash-barra-hora { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.dash-barra-hora-fill { width: 100%; background: var(--vmz-pink); border-radius: 3px 3px 0 0; min-height: 2px; }
.dash-barra-hora-label { font-size: 8px; color: var(--vmz-muted); margin-top: 3px; }

@media (max-width: 900px) {
  .dash-sessoes-grid { grid-template-columns: 1fr; }
}

/* ===================== DASHBOARD: Funil invertido (5 gráficos) ===================== */

.dash-funil-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dash-funil-bloco-linha { grid-column: 1 / -1; }
@media (max-width: 980px) {
  .dash-funil-grid { grid-template-columns: 1fr; }
}

.dash-gauge-clicavel { padding: 10px 0; }
.dash-gauge-clicavel:hover { opacity: 0.9; }

.dash-funil-camadas { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; }
.dash-funil-camada-linha { display: flex; justify-content: center; }
.dash-funil-camada-barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: width 0.3s;
}
.dash-funil-camada-valor { font-weight: 700; }

.dash-camada-valores {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 2px 10px;
  background: #f7f7f9;
  border-radius: 8px;
  padding: 8px 10px;
  max-height: 140px;
  overflow-y: auto;
}

.dash-heatmap-tabela {
  display: grid;
  gap: 3px;
  font-size: 11px;
}
.dash-heatmap-cabecalho { text-align: center; font-weight: 700; color: var(--vmz-muted); padding: 4px 0; }
.dash-heatmap-linha-label { display: flex; align-items: center; font-size: 10.5px; color: var(--vmz-muted); padding-right: 6px; white-space: nowrap; }
.dash-heatmap-celula {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  min-height: 26px;
  font-weight: 600;
}

/* ===================== MODAL ===================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal-caixa {
  background: #fff;
  border-radius: 12px;
  width: 480px;
  max-width: 92vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--vmz-border);
}

.modal-header h3 { font-size: 16px; }

.modal-fechar {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--vmz-muted);
  line-height: 1;
}

.modal-corpo {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.campo-form { margin-bottom: 14px; }

.campo-form label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--vmz-muted);
  margin-bottom: 4px;
}

.campo-form input, .campo-form select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
}

.campos-personalizados-secao {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--vmz-border);
}

.campos-personalizados-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.campos-personalizados-header label {
  font-size: 12px;
  font-weight: 700;
  color: var(--vmz-muted);
}

.link-adicionar {
  background: none;
  border: none;
  color: var(--vmz-pink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.modal-rodape {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--vmz-border);
}

.btn-secundario {
  background: #fff;
  border: 1px solid #ddd;
  height: var(--altura-botao-padrao);
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--vmz-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.badge-filtros-ativos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--vmz-pink);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.celula-acoes-pessoa { display: flex; gap: 4px; }

.btn-acao-pessoa {
  background: none;
  border: 1px solid var(--vmz-border);
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 7px;
  cursor: pointer;
  color: var(--vmz-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-acao-pessoa svg { width: 12px; height: 12px; }
.btn-acao-pessoa:hover { background: var(--vmz-green-bg); }
.btn-acao-pessoa[data-telefone] { color: var(--vmz-muted); }
.btn-acao-pessoa[data-telefone]:hover { background: #f5f6f8; }

.btn-editar-pessoa {
  background: none;
  border: 1px solid var(--vmz-border);
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 7px;
  cursor: pointer;
  color: var(--vmz-pink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-editar-pessoa svg { width: 12px; height: 12px; }
.btn-editar-pessoa:hover { background: var(--vmz-pink-bg); }

.btn-excluir-pessoa {
  background: none;
  border: 1px solid var(--vmz-border);
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 7px;
  cursor: pointer;
  color: #d9364f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-excluir-pessoa svg { width: 12px; height: 12px; }
.btn-excluir-pessoa:hover { background: #fdecef; }

/* ===================== FILA DE ATENDIMENTO ===================== */

.fila-topo {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.fila-topo h2 { font-size: 20px; display: flex; align-items: center; gap: 10px; }

.status-online { font-size: 12px; color: var(--vmz-green); font-weight: 700; }

.fila-subtitulo { font-size: 13px; color: var(--vmz-muted); margin-top: 4px; }

.cards-metricas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.card-metrica {
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  min-width: 0;
}

.card-metrica-label { font-size: 11px; color: var(--vmz-muted); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-metrica-valor { font-size: 20px; font-weight: 800; color: var(--vmz-navy); }
.card-metrica-sub { font-size: 10px; color: var(--vmz-muted); }

.celula-cliente { display: flex; align-items: center; gap: 10px; }

.fila-nome-cliente { font-weight: 700; font-size: 13px; }
.fila-telefone-cliente { font-size: 12px; color: var(--vmz-muted); }
.fila-hora-mensagem { font-size: 11px; color: var(--vmz-muted); margin-top: 2px; }

.canal-whatsapp {
  color: var(--vmz-green);
  font-weight: 600;
  font-size: 13px;
}

.select-prioridade {
  border: none;
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.prioridade-normal { background: var(--vmz-green-bg); color: var(--vmz-green); }
.prioridade-alta { background: #fde2e2; color: #d9364f; }
.prioridade-baixa { background: #e3ecfb; color: #3b6fd6; }

.btn-atender {
  background: #fff;
  border: 1px solid var(--vmz-pink);
  color: var(--vmz-pink);
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-atender:hover { background: var(--vmz-pink-bg); }

/* ===================== CRM / KANBAN ===================== */

.pagina-crm { max-width: 100%; }

.crm-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.crm-toolbar-esquerda { display: flex; align-items: center; gap: 12px; }
.crm-toolbar-esquerda h2 { font-size: 19px; font-weight: 800; color: var(--vmz-navy); }

.crm-toolbar-direita { display: flex; align-items: center; gap: 10px; }

.btn-crm-criar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--vmz-pink);
  color: #fff;
  border: none;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.btn-crm-criar:hover { opacity: 0.92; }

.dropdown-select-funil { position: relative; }

.select-funil {
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--vmz-navy);
  height: 38px;
  min-width: 190px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.select-funil .dropdown-custom-seta { color: #707585; }

.dropdown-select-funil .dropdown-custom-lista { min-width: 220px; }

.btn-icone-discreto {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  color: var(--vmz-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.btn-icone-discreto:hover { color: var(--vmz-pink); border-color: var(--vmz-pink); background: var(--vmz-pink-bg); }

.crm-busca-grande {
  position: relative;
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--vmz-border);
  border-radius: 8px;
  padding: 0 16px;
  height: 38px;
}
.crm-busca-grande svg { color: var(--vmz-muted); flex-shrink: 0; }
.crm-busca-grande input {
  border: none;
  background: none;
  outline: none;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  color: var(--vmz-navy);
}

.crm-filtro-chip {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--vmz-pink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.crm-filtro-chip button {
  background: rgba(255, 255, 255, 0.25);
  border: none;
  color: #fff;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.crm-filtros-rapidos-dropdown {
  display: none;
  position: absolute;
  top: 46px;
  left: 0;
  width: 260px;
  background: #fff;
  border: 1px solid var(--vmz-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 6px;
  z-index: 30;
}
.crm-filtros-rapidos-dropdown.aberto { display: block; }
.crm-filtros-rapidos-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--vmz-navy);
  cursor: pointer;
}
.crm-filtros-rapidos-dropdown button:hover { background: var(--vmz-pink-bg); color: var(--vmz-pink); }

.kanban-wrapper {
  position: relative;
  min-height: calc(100vh - 260px);
}

.kanban-container {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 20px;
  align-items: flex-start;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Edge legado */
}
.kanban-container::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.btn-scroll-kanban {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--vmz-border);
  background: #fff;
  color: var(--vmz-muted);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.btn-scroll-kanban:hover { color: var(--vmz-pink); border-color: var(--vmz-pink); }
.btn-scroll-kanban-esquerda { left: -6px; }
.btn-scroll-kanban-direita { right: -6px; }

.coluna-kanban {
  background: #eef0f3;
  border: 1px solid var(--vmz-border);
  border-radius: 12px;
  min-width: 320px;
  max-width: 320px;
  min-height: calc(100vh - 260px);
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.coluna-kanban-fixa { background: #f5f6f8; }

.kanban-separador-fechamento {
  min-width: 1px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 6px;
}
.kanban-separador-fechamento::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 20px;
  left: 50%;
  width: 0;
  border-left: 2px dashed #d5d5da;
}
.kanban-separador-fechamento span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: #f9f9fb;
  color: var(--vmz-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 2px;
  z-index: 1;
}

.coluna-kanban-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  padding: 5px 20px 5px 12px;
  min-height: 30px;
  border-radius: 8px 0 0 8px;
  margin-bottom: 8px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}
.coluna-kanban-header[draggable="true"] { cursor: grab; }
.coluna-kanban-header[draggable="true"]:active { cursor: grabbing; }

.coluna-kanban-nome[data-renomear-etapa-id] { cursor: pointer; border-bottom: 1px dashed rgba(255,255,255,0.5); }

.coluna-kanban-contador {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 11px;
  color: #fff;
  font-weight: 700;
}

.btn-nova-coluna-inline, .btn-excluir-coluna-inline {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-nova-coluna-inline:hover, .btn-excluir-coluna-inline:hover { background: rgba(255, 255, 255, 0.45); }

.coluna-kanban-valor {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  padding: 10px 14px;
  margin: 0 0 10px 0;
}
.coluna-kanban-valor-label { font-size: 10.5px; color: var(--vmz-muted); margin-bottom: 3px; }
.coluna-kanban-valor-numero { font-size: 19px; font-weight: 800; color: var(--vmz-navy); }

.coluna-kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 40px;
  flex: 1;
}

.card-oportunidade {
  position: relative;
  width: 299px;
  background: #fff;
  border: 1px solid var(--vmz-border);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  cursor: grab;
  transition: box-shadow 0.12s ease, border-color 0.12s ease;
}
.card-oportunidade:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); border-color: #ddd; }
.card-oportunidade:active { cursor: grabbing; }

.btn-excluir-cartao {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--vmz-muted);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
.card-oportunidade:hover .btn-excluir-cartao { display: inline-flex; }
.btn-excluir-cartao:hover { background: var(--vmz-pink-bg); color: var(--vmz-pink); }

.card-oportunidade-titulo { font-size: 13px; font-weight: 700; margin-bottom: 4px; color: var(--vmz-navy); padding-right: 20px; }
.card-oportunidade-cliente { font-size: 12.5px; font-weight: 700; color: var(--vmz-pink); margin-bottom: 8px; }
.card-oportunidade-valor { font-size: 15px; font-weight: 700; color: var(--vmz-navy); margin-bottom: 8px; }
.card-oportunidade-tempo { font-size: 11px; color: var(--vmz-muted); margin-bottom: 8px; }

.card-oportunidade-acoes-rapidas {
  position: absolute;
  top: 6px;
  right: 30px;
  display: none;
  gap: 2px;
}
.card-oportunidade:hover .card-oportunidade-acoes-rapidas { display: flex; }
.btn-acao-rapida-ganho, .btn-acao-rapida-perdido {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-acao-rapida-ganho { color: #0ea968; }
.btn-acao-rapida-ganho:hover { background: rgba(14,169,104,0.12); }
.btn-acao-rapida-perdido { color: #dc2626; }
.btn-acao-rapida-perdido:hover { background: rgba(220,38,38,0.12); }

.card-oportunidade-rodape {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--vmz-border);
}
.card-oportunidade-icones { display: flex; align-items: center; gap: 8px; color: var(--vmz-muted); }
.card-oportunidade-icones svg { display: block; }
.card-oportunidade-badge-atividade {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #eef0f3;
  color: var(--vmz-muted);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.card-oportunidade-add-atividade {
  font-size: 11px;
  font-weight: 600;
  color: var(--vmz-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-top: 8px;
}
.card-oportunidade-add-atividade:hover { color: var(--vmz-pink); }

.btn-add-oportunidade {
  background: #fff;
  border: 1px dashed #d5d5da;
  border-radius: 8px;
  height: 32px;
  width: 100%;
  padding: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--vmz-muted);
  cursor: pointer;
  margin: 0 0 10px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-add-oportunidade:hover { border-color: var(--vmz-pink); color: var(--vmz-pink); background: var(--vmz-pink-bg); }

.btn-carregar-mais-cards {
  background: none;
  border: none;
  color: var(--vmz-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 0;
  cursor: pointer;
  text-align: center;
  width: 100%;
}
.btn-carregar-mais-cards:hover { color: var(--vmz-pink); }

.tabela-finalizadas { margin-top: 8px; }

/* ===================== AUTOMAÇÕES — LISTA DE FLUXOS ===================== */

.tag-ambiente {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.tag-whatsapp { background: var(--vmz-green-bg); color: var(--vmz-green); }
.tag-crm { background: var(--vmz-pink-bg); color: var(--vmz-pink); }
.tag-agendador { background: var(--vmz-orange-bg); color: #9a6b0a; }

.btn-excluir-componente {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--vmz-muted);
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===================== Painel Master (feature flags) ===================== */

.lista-feature-flags {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 640px;
}

.card-feature-flag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--vmz-border);
  border-radius: 12px;
  padding: 16px 20px;
}

.card-feature-flag strong { font-size: 14px; color: var(--vmz-navy); }
.card-feature-flag .fila-subtitulo { margin-top: 2px; }

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  cursor: pointer;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch-trilho {
  position: absolute;
  inset: 0;
  background: #d8dbe2;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.toggle-switch-trilho::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-switch-trilho { background: var(--vmz-pink); }
.toggle-switch input:checked + .toggle-switch-trilho::after { transform: translateX(16px); }

/* ===================== EDITOR DE FLUXO (workspace) ===================== */

.fluxo-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid var(--vmz-border);
}

.fluxo-corpo {
  height: calc(100% - 57px);
  display: flex;
  position: relative;
  overflow: hidden;
}

/* ===================== Abas do editor de fluxo (Editor / Histórico) ===================== */

.fluxo-abas {
  display: flex;
  gap: 4px;
  background: var(--vmz-border);
  border-radius: 999px;
  padding: 3px;
  margin-left: 16px;
}

.fluxo-aba {
  border: none;
  background: transparent;
  color: var(--vmz-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.fluxo-aba.ativa {
  background: var(--vmz-pink);
  color: #fff;
}

.fluxo-execucao-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--vmz-border);
  border-radius: 999px;
  padding: 6px 8px 6px 14px;
  margin-left: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--vmz-navy);
}

.fluxo-execucao-pill-status {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.fluxo-execucao-pill-status.status-concluido { background: var(--vmz-green-bg); color: #3f7d1f; }
.fluxo-execucao-pill-status.status-erro { background: var(--vmz-pink-bg); color: var(--vmz-pink); }
.fluxo-execucao-pill-status.status-executando { background: var(--vmz-orange-bg); color: #9a6b0a; }

.fluxo-execucao-pill button {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--vmz-muted);
  font-size: 16px;
  line-height: 1;
}

/* ===================== Aba Histórico de execuções ===================== */

.fluxo-historico {
  height: calc(100% - 57px);
  overflow-y: auto;
  padding: 24px;
}

.fluxo-historico-cabecalho {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.fluxo-historico-cabecalho h2 { font-size: 18px; margin-bottom: 4px; }

.fluxo-historico-acoes {
  display: flex;
  gap: 8px;
  align-items: center;
}

.fluxo-historico-acoes .modal-habla-input {
  height: var(--altura-botao-padrao);
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.fluxo-historico-total-card {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  background: var(--vmz-pink-bg);
  border-radius: 12px;
  padding: 14px 22px;
  margin-bottom: 18px;
}

.fluxo-historico-total-card strong { font-size: 26px; color: var(--vmz-pink); }

.fluxo-historico-tabela {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--vmz-border);
  border-radius: 10px;
}

.fluxo-historico-tabela th {
  text-align: left;
  font-size: 12px;
  color: var(--vmz-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--vmz-border);
}

.fluxo-historico-tabela td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--vmz-border);
}

.fluxo-historico-tabela tbody tr {
  cursor: pointer;
}

.fluxo-historico-tabela tbody tr:hover {
  background: var(--vmz-pink-bg);
}

.fluxo-historico-paginacao {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  padding: 16px 0;
}

.etiqueta-status-execucao {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
}
.etiqueta-status-execucao.status-concluido { background: var(--vmz-green-bg); color: #3f7d1f; }
.etiqueta-status-execucao.status-erro { background: var(--vmz-pink-bg); color: var(--vmz-pink); }
.etiqueta-status-execucao.status-executando { background: var(--vmz-orange-bg); color: #9a6b0a; }

/* ===================== Painel de inspeção do node (entrada/saída) ===================== */

.modal-cliquetur-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 25, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.modal-cliquetur-card {
  width: 94vw;
  height: 92vh;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-cliquetur-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--vmz-border);
}

.modal-cliquetur-iframe {
  flex: 1;
  border: none;
  width: 100%;
}

.painel-inspecao-node {
  display: none;
  position: fixed;
  top: 57px;
  right: 0;
  bottom: 0;
  width: 1240px;
  max-width: 98vw;
  background: #fff;
  border-left: 1px solid var(--vmz-border);
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.08);
  z-index: 40;
}

.painel-inspecao-node.aberto {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
}

.painel-inspecao-coluna {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid var(--vmz-border);
}
.painel-inspecao-coluna:first-child { border-left: none; }

.painel-inspecao-cabecalho {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--vmz-border);
}

.painel-inspecao-info { padding: 14px 16px; }

.painel-inspecao-corpo {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 10px 16px 10px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 12px;
}

.json-node summary {
  cursor: pointer;
  list-style: none;
  padding: 3px 0;
  display: flex;
  flex-wrap: wrap;
  word-break: break-word;
}
.json-node summary::-webkit-details-marker { display: none; }
.json-linha {
  padding: 3px 0;
  display: flex;
  flex-wrap: wrap;
  word-break: break-word;
}

.json-chave { color: var(--vmz-navy); font-weight: 600; margin-right: 6px; flex-shrink: 0; }
.json-tipo { color: var(--vmz-muted); }
.json-valor { color: #0f766e; white-space: pre-wrap; word-break: break-word; }
.json-string { color: #b45309; }
.json-null { color: var(--vmz-muted); font-style: italic; }
.json-primitivo { color: #1d4ed8; }

.json-linha[data-caminho], .json-node summary[data-caminho] {
  cursor: grab;
}
.json-linha[data-caminho]:hover, .json-node summary[data-caminho]:hover {
  background: var(--vmz-pink-bg);
  border-radius: 4px;
}

/* ===================== Resumo de config do componente (painel de inspeção, centro) ===================== */

.resumo-campo-linha {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--vmz-border);
}
.resumo-campo-linha:last-child { border-bottom: none; }

.resumo-campo-label { font-size: 11px; color: var(--vmz-muted); font-weight: 600; }
.resumo-campo-valor { font-size: 13px; color: var(--vmz-navy); word-break: break-word; }

/* ===================== Painel "Variáveis disponíveis" (editor) ===================== */

.painel-variaveis-disponiveis {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  width: 320px;
  height: 100%;
  background: #fff;
  border-left: 1px solid var(--vmz-border);
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.06);
  z-index: 19;
  flex-direction: column;
}

.painel-variaveis-disponiveis.aberto { display: flex; }

.painel-variaveis-header {
  padding: 18px 16px 8px 16px;
}

.fluxo-canvas-wrapper {
  position: relative;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  height: 100%;
  background-image: radial-gradient(#d9dce2 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  background-color: #fafafa;
}

.canvas-fluxo, .svg-conexoes {
  position: absolute;
  top: 0;
  left: 0;
  width: 4000px;
  height: 3000px;
}

.svg-conexoes { pointer-events: none; z-index: 3; overflow: visible; }
.svg-conexoes path { pointer-events: stroke; }

.node-fluxo {
  position: absolute;
  width: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: grab;
  user-select: none;
  z-index: 2;
}

.node-fluxo:active { cursor: grabbing; }

.node-fluxo-caixa {
  position: relative;
  width: 170px;
  height: 56px;
  border-radius: 8px;
  border: 1px solid #e2e4e9;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(20,15,25,0.08);
  transition: box-shadow 0.12s ease, border-color 0.12s ease;
  z-index: 2;
}

.node-fluxo-selecionado .node-fluxo-caixa {
  border-color: var(--vmz-pink);
  box-shadow: 0 0 0 3px var(--vmz-pink-bg);
}

.node-fluxo-faixa {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.node-fluxo-icone {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--vmz-navy);
}

.node-fluxo-texto {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.node-fluxo-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--vmz-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-fluxo-sublabel {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--vmz-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Painel lateral (à direita) de configuração do node clicado */
.painel-pipelines-tuneis {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: #f7f7fa;
  z-index: 9999;
  transition: right 0.22s ease;
  display: flex;
  flex-direction: column;
}

.painel-pipelines-tuneis.aberto { right: 0; }

.painel-pipelines-header {
  position: relative;
  background: #fff;
  padding: 24px 32px;
  border-bottom: 1px solid var(--vmz-border);
}

.painel-pipelines-header h2 { font-size: 20px; }
.painel-pipelines-header .modal-habla-fechar { position: absolute; top: 20px; right: 28px; }

.painel-pipelines-corpo {
  flex: 1;
  overflow: auto;
  padding: 24px 32px 80px 32px;
  position: relative;
}

.automacao-crm-coluna-cards { display: flex; flex-direction: column; padding: 0 10px; }

.automacao-crm-card-conector { width: 2px; height: 12px; background: var(--vmz-border); margin: 0 auto; }

.automacao-crm-card-linha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--vmz-border);
  border-radius: 8px;
  font-size: 12.5px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  margin-bottom: 8px;
}
.automacao-crm-card-linha span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.automacao-crm-card-linha button {
  border: none; background: none; color: var(--vmz-muted); cursor: pointer; font-size: 16px; line-height: 1; flex-shrink: 0;
}
.automacao-crm-card-linha button:hover { color: #d9364f; }

.automacao-crm-coluna-add {
  margin: 0 10px 10px 10px;
  border: 1.5px dashed var(--vmz-border);
  background: #fff;
  color: var(--vmz-muted);
  border-radius: 8px;
  padding: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.automacao-crm-coluna-add:hover { border-color: var(--vmz-pink); border-style: solid; color: var(--vmz-pink); }

.btn-canvas-coluna-automacao {
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.btn-canvas-coluna-automacao:hover { background: rgba(255,255,255,0.3); }

/* Modal central de catálogo — categorias à esquerda, itens à direita */
.modal-habla-card.catalogo-automacao-modal {
  width: min(1000px, 94vw);
  height: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.catalogo-automacao-modal .modal-habla-header-linha { gap: 14px; }
.catalogo-automacao-modal .modal-habla-header-linha h3 { flex: 1; }

.catalogo-automacao-busca {
  width: 220px;
  padding: 8px 12px;
  border: 1.5px solid var(--vmz-border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}

.catalogo-automacao-corpo { display: flex; flex: 1; overflow: hidden; min-height: 400px; }

.catalogo-automacao-grupos {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--vmz-border);
  overflow-y: auto;
  padding: 12px 8px;
}

.catalogo-automacao-grupo-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--vmz-navy);
  cursor: pointer;
}
.catalogo-automacao-grupo-item:hover { background: #f5f6f8; }
.catalogo-automacao-grupo-item.ativo { background: var(--vmz-pink-bg); color: var(--vmz-pink); font-weight: 700; }

.catalogo-automacao-itens { flex: 1; overflow-y: auto; padding: 16px 20px; }

.catalogo-automacao-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--vmz-border);
}
.catalogo-automacao-item:last-child { border-bottom: none; }
.catalogo-automacao-item-nome { font-size: 13.5px; font-weight: 700; color: var(--vmz-navy); }
.catalogo-automacao-item-tag {
  font-size: 10px; font-weight: 700; color: var(--vmz-pink); background: var(--vmz-pink-bg);
  padding: 2px 6px; border-radius: 4px; margin-left: 4px;
}
.catalogo-automacao-item-desc { font-size: 12px; color: var(--vmz-muted); margin-top: 2px; }
.catalogo-automacao-item button { flex-shrink: 0; }

.motor-infotera-abas-topo {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 4px 4px 16px 4px;
  border-bottom: 1px solid var(--vmz-border);
  margin: 4px 0 24px 0;
  overflow-x: auto;
}

.motor-infotera-aba-topo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  padding: 4px 2px 10px 2px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--vmz-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.motor-infotera-aba-topo:hover:not(.desabilitado) { color: var(--vmz-navy); }
.motor-infotera-aba-topo.ativo { color: var(--vmz-pink); border-bottom-color: var(--vmz-pink); }
.motor-infotera-aba-topo.desabilitado { opacity: 0.4; cursor: not-allowed; }

.motor-infotera-aba-topo-icone { width: 26px; height: 26px; color: inherit; }
.motor-infotera-aba-topo-icone svg { width: 100%; height: 100%; }

.motor-infotera-card {
  background: #fff;
  border: 1px solid var(--vmz-border);
  border-radius: 14px;
  padding: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.motor-infotera-card-titulo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--vmz-pink);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--vmz-border);
  margin-bottom: 20px;
}
.motor-infotera-card-titulo .motor-infotera-aba-topo-icone { width: 20px; height: 20px; }

.motor-infotera-form {
  display: grid;
  grid-template-columns: 1.6fr 1.3fr 0.8fr;
  gap: 20px;
}

.motor-infotera-campo { display: flex; flex-direction: column; gap: 6px; position: relative; }
.motor-infotera-campo label { font-size: 12.5px; font-weight: 600; color: var(--vmz-navy); }
.motor-infotera-campo input {
  padding: 11px 12px;
  border: none;
  background: #f5f6f8;
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--vmz-navy);
}
.motor-infotera-campo input:focus { outline: 2px solid var(--vmz-pink-bg); }

.motor-infotera-periodo-grupo { display: flex; gap: 2px; background: #f5f6f8; border-radius: 8px; overflow: hidden; }
.motor-infotera-periodo-grupo input { background: transparent; border-radius: 0; flex: 1; }

.motor-infotera-form-rodape {
  display: flex;
  align-items: end;
  gap: 20px;
  margin-top: 20px;
}
.motor-infotera-campo-cupom { flex: 1; max-width: 260px; }

.motor-infotera-btn-buscar {
  background: var(--vmz-navy);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.motor-infotera-btn-buscar:hover { opacity: 0.9; }

.motor-busca-infotera-corpo { padding: 24px; max-width: 1000px; margin: 0 auto; }

.motor-busca-infotera-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.motor-busca-infotera-tab {
  border: 1.5px solid var(--vmz-border);
  background: #fff;
  color: var(--vmz-muted);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.motor-busca-infotera-tab.ativo { border-color: var(--vmz-pink); color: var(--vmz-pink); background: var(--vmz-pink-bg); }

.motor-busca-infotera-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 0.7fr auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 20px;
}

.motor-busca-infotera-campo { display: flex; flex-direction: column; gap: 4px; position: relative; }
.motor-busca-infotera-campo label { font-size: 11px; font-weight: 700; color: var(--vmz-muted); text-transform: uppercase; }
.motor-busca-infotera-campo input {
  padding: 9px 10px;
  border: 1.5px solid var(--vmz-border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}

.motor-busca-infotera-sugestoes {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--vmz-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  z-index: 20;
  max-height: 200px;
  overflow-y: auto;
}
.motor-busca-infotera-sugestoes button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
}
.motor-busca-infotera-sugestoes button:hover { background: #f5f6f8; }

.motor-busca-infotera-resultado { display: flex; flex-direction: column; gap: 14px; max-width: 1100px; margin: 20px auto 0 auto; }

.motor-infotera-card-resultado {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  background: #fff;
  border: 1.5px solid var(--vmz-border);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.motor-infotera-card-resultado:hover { border-color: var(--vmz-pink); box-shadow: 0 4px 16px rgba(0,0,0,0.06); }

.motor-infotera-card-resultado-imagem {
  width: 84px;
  height: 84px;
  border-radius: 10px;
  background: #f0f0f3;
  flex-shrink: 0;
  overflow: hidden;
}
.motor-infotera-card-resultado-imagem img { width: 100%; height: 100%; object-fit: cover; display: block; }

.motor-infotera-card-resultado-info { flex: 1; min-width: 0; }
.motor-infotera-card-resultado-nome { font-size: 14.5px; font-weight: 700; color: var(--vmz-navy); margin-bottom: 4px; }
.motor-infotera-card-resultado-desc {
  font-size: 12.5px;
  color: var(--vmz-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.motor-infotera-card-resultado-preco-bloco { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.motor-infotera-card-resultado-preco { font-size: 17px; font-weight: 700; color: var(--vmz-navy); }
.motor-infotera-btn-selecionar {
  background: var(--vmz-navy);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.motor-infotera-btn-selecionar:hover { opacity: 0.9; }

.svg-conectores-tunel {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}

.bolhas-conectores-tunel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.pipeline-tunel-linha-svg { fill: none; stroke: var(--vmz-pink); stroke-width: 2; }
.pipeline-tunel-linha-temp { stroke: var(--vmz-pink); stroke-width: 2; stroke-dasharray: 5 4; opacity: 0.8; }

body.arrastando-tunel, body.arrastando-tunel * { cursor: grabbing !important; }

.pipeline-tunel-bolha {
  position: absolute;
  background: #fff;
  border: 1px solid var(--vmz-pink);
  color: var(--vmz-pink);
  font-size: 9.5px;
  font-weight: 700;
  border-radius: 999px;
  height: 22px;
  width: 68px;
  padding: 0 6px 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  letter-spacing: 0.03em;
  pointer-events: auto;
}

.pipeline-tunel-bolha-remover {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  background: var(--vmz-pink);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.pipeline-tunel-bolha-remover:hover { background: #b5115f; }

.pipeline-tunel-bolha {
  background: #fff;
  border: 1px solid var(--vmz-pink);
  color: var(--vmz-pink);
  font-size: 9.5px;
  font-weight: 700;
  border-radius: 999px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.03em;
}

#listaPipelines { position: relative; z-index: 2; }

.pipeline-linha {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  padding: 16px 20px;
  margin-bottom: 40px;
}

.pipeline-linha.arrastando { opacity: 0.4; }

.pipeline-linha-lateral {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 170px;
  min-width: 170px;
  flex-shrink: 0;
}

.pipeline-drag-handle { color: #c7cad1; cursor: grab; flex-shrink: 0; }
.pipeline-drag-handle:active { cursor: grabbing; }

.pipeline-nome { font-size: 14px; font-weight: 700; color: var(--vmz-navy); }

.pipeline-etapas-linha {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
}

.pipeline-etapas-normais, .pipeline-etapas-fixas {
  display: flex;
  align-items: center;
}

.pipeline-etapas-fixas { padding-left: 24px; border-left: 1px dashed var(--vmz-border); flex-shrink: 0; }

.pipeline-chevron {
  height: 30px;
  width: 168px;
  flex-shrink: 0;
  padding: 0 18px 0 16px;
  margin-right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
  user-select: none;
}

.pipeline-chevron-fixa { cursor: grab; position: relative; }
.pipeline-chevron-fixa:active { cursor: grabbing; }
.pipeline-chevron-fixa:hover { filter: brightness(1.08); }
.pipeline-chevron-com-tunel::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--vmz-pink);
}

.pipeline-chevron-alvo-possivel { outline: 3px dashed var(--vmz-pink); outline-offset: 2px; }

.popover-tunel {
  position: absolute;
  z-index: 10000;
  width: 260px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  padding: 14px;
}

.popover-tunel-titulo { font-size: 12.5px; color: var(--vmz-navy); margin-bottom: 10px; line-height: 1.4; }
.popover-tunel-rodape { display: flex; justify-content: flex-end; margin-top: 8px; }

.painel-config-node {
  position: absolute;
  top: 0;
  right: -440px;
  width: 420px;
  height: 100%;
  background: #fff;
  border-left: 1px solid var(--vmz-border);
  box-shadow: -4px 0 16px rgba(0,0,0,0.08);
  transition: right 0.18s ease;
  z-index: 20;
  display: flex;
  flex-direction: column;
}

.painel-config-node.aberto { right: 0; }

.painel-config-node-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--vmz-border);
  flex-shrink: 0;
}

.painel-config-node-corpo { padding: 18px 20px; overflow-y: auto; flex: 1; }

.painel-config-node-rodape {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--vmz-border);
  flex-shrink: 0;
}
.painel-config-node-rodape .btn-modal-habla-primario { margin-left: auto; }

/* Selects dos formulários (campos de config, coleções etc.) — remove o
   visual "cru" padrão do sistema operacional e usa uma seta consistente
   com o resto do design. */
select.modal-habla-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23555555' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}
select.modal-habla-input::-ms-expand { display: none; }

.porta {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--vmz-muted);
  opacity: 1;
  top: 50%;
  transform: translateY(-50%);
  cursor: crosshair;
  z-index: 5;
  transition: transform 0.12s ease;
}

.porta-entrada { left: -5px; border-color: var(--vmz-navy); }
.porta:hover { transform: translateY(-50%) scale(1.35); }


/* Controle de zoom flutuante, canto inferior esquerdo do canvas */
.workspace-zoom-controles {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 2px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(20,15,25,0.15);
  padding: 4px;
  z-index: 10;
}

.workspace-zoom-controles button {
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  border-radius: 7px;
  font-size: 16px;
  color: var(--vmz-navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.workspace-zoom-controles button:hover { background: #f5f6f8; }

.workspace-zoom-controles #labelZoom {
  font-size: 12px;
  font-weight: 600;
  color: var(--vmz-muted);
  width: 40px;
  text-align: center;
}


/* Botão flutuante que abre a sidebar de componentes */
.workspace-add-botao {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--vmz-pink);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(230,1,126,0.35);
  transition: transform 0.12s ease;
  z-index: 15;
}

.workspace-add-botao.visivel { display: flex; }
.workspace-add-botao:hover { transform: scale(1.06); }

/* Sidebar de componentes — docked (ocupa espaço de verdade, não é overlay
   por cima do canvas), fica aberta por padrão. Fechar não é "esconder", é
   width:0 — o canvas expande sozinho pra ocupar o espaço, como no RD Station. */
.sidebar-componentes {
  width: 420px;
  flex-shrink: 0;
  height: 100%;
  background: #fff;
  border-left: 1px solid var(--vmz-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.18s ease;
}

.sidebar-componentes:not(.aberto) {
  width: 0;
  border-left: none;
}

.sidebar-componentes-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 16px 12px 16px;
  border-bottom: 1px solid var(--vmz-border);
}

.sidebar-componentes-header strong { flex: 1; font-size: 15px; color: var(--vmz-navy); }

.sidebar-componentes-busca { padding: 12px 16px; }

.sidebar-componentes-busca input {
  width: 100%;
  border: 1px solid var(--vmz-border);
  border-radius: 8px;
  height: var(--altura-botao-padrao);
  padding: 0 14px;
  font-size: 13px;
  outline: none;
}

.sidebar-componentes-busca input:focus { border-color: var(--vmz-pink); }

.sidebar-componentes-dica { padding: 0 16px 10px 16px; font-size: 12px; color: var(--vmz-muted); }

.sidebar-componentes-lista {
  flex: 1;
  overflow-y: auto;
  padding: 4px 12px 16px 12px;
}

/* --- Categoria (accordion) --- */
.sidebar-componentes-categoria { margin-bottom: 4px; }

.sidebar-componentes-categoria-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--vmz-navy);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.sidebar-componentes-categoria-seta {
  width: 11px;
  height: 11px;
  color: var(--vmz-muted);
  transition: transform 0.15s ease;
  margin-left: auto;
  flex-shrink: 0;
}

.sidebar-componentes-categoria.aberta .sidebar-componentes-categoria-seta { transform: rotate(180deg); }

.sidebar-componentes-categoria-corpo { display: none; padding: 0 0 8px 0; }
.sidebar-componentes-categoria.aberta .sidebar-componentes-categoria-corpo { display: block; }

/* --- Linha de componente: estilo lista/tabela (ícone + nome + badge + alça), arrastável --- */
.sidebar-componentes-linha {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  margin-bottom: 4px;
  border: 1px solid var(--vmz-border);
  background: #fff;
  border-radius: 8px;
  cursor: grab;
  text-align: left;
}

.sidebar-componentes-linha:active { cursor: grabbing; }
.sidebar-componentes-linha:hover { background: #f7f8fa; border-color: #d8dbe0; }

.sidebar-componentes-icone {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-componentes-icone svg { width: 13px; height: 13px; }

.sidebar-componentes-nome { flex: 1; font-size: 13px; color: var(--vmz-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-componentes-alca { color: #c7cad1; flex-shrink: 0; }
.sidebar-componentes-alca svg { width: 14px; height: 14px; }


/* ===================== CONFIGURAÇÕES ===================== */

.config-layout {
  display: flex;
  flex-direction: column;
}

.config-subabas {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 4px;
  padding: 0 8px;
  margin-bottom: 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.config-conteudo { flex: 1; min-width: 0; }

.config-subaba {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--vmz-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.config-subaba svg { width: 16px; height: 16px; flex-shrink: 0; }

.config-subaba:hover { color: var(--vmz-pink); }

.config-subaba.ativa {
  color: var(--vmz-pink);
  border-bottom-color: var(--vmz-pink);
}

.config-card-conteudo {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.config-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.config-card-header h3 { font-size: 16px; }

.btn-excluir-item {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.grid-ramais {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.lista-simples {
  display: flex;
  flex-direction: column;
}

.item-lista-simples {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--vmz-border);
  cursor: pointer;
}

.item-lista-simples:last-child { border-bottom: none; }
.item-lista-simples:hover { background: #fafafa; }

.item-lista-simples-nome { font-weight: 600; font-size: 14px; color: var(--vmz-navy); }
.item-lista-simples-sub { font-size: 12px; color: var(--vmz-muted); margin-top: 2px; }
.item-lista-simples-editar { font-size: 12px; font-weight: 700; color: var(--vmz-pink); }

.id-visual {
  font-size: 12px;
  color: var(--vmz-navy);
  letter-spacing: 0.3px;
}

.btn-copiar-id {
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 6px;
  color: var(--vmz-muted);
  padding: 2px;
  vertical-align: middle;
  display: inline-flex;
}

.btn-copiar-id svg { width: 13px; height: 13px; }
.btn-copiar-id:hover { color: var(--vmz-pink); }

.card-ramal {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5f6f8;
  border-radius: 10px;
  padding: 12px;
}

.card-ramal-numero {
  margin-left: auto;
  font-size: 11px;
  color: var(--vmz-muted);
  text-align: right;
}

.card-ramal-numero strong { color: var(--vmz-navy); font-size: 14px; }

.grid-etiquetas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-etiqueta {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip-etiqueta button { background: none; border: none; cursor: pointer; font-size: 11px; }

/* ===================== SIDEBAR GLOBAL (fixa, presente em todas as páginas) ===================== */

.app-shell-global {
  display: flex;
  height: 100vh;
}

.app-shell-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.app-shell-main {
  flex: 1;
  overflow: auto;
  min-width: 0;
}

.sidebar-global {
  width: 300px;
  height: 100%;
  background: #fff;
  border-right: 1px solid var(--vmz-border);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: width 0.2s ease, padding 0.2s ease;
  padding: 16px 0;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-global.colapsada {
  width: 0;
  padding: 0;
  border-right: none;
}

.topnav-logo { display: flex; align-items: center; margin-right: 8px; }
.topnav-logo-img { height: 32px; width: auto; object-fit: contain; }

/* Botão de recolher/expandir: fica FORA da sidebar (posição fixa na tela),
   assim continua visível e clicável mesmo com a sidebar 100% recolhida. */
.sidebar-global-toggle {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: var(--vmz-pink);
  color: #fff;
  border: none;
  box-shadow: 0 2px 6px rgba(225, 33, 85, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 200;
  transition: left 0.2s ease;
}

.sidebar-global-toggle svg { width: 13px; height: 13px; transition: transform 0.2s ease; }
.sidebar-global.colapsada ~ .sidebar-global-toggle svg { transform: rotate(180deg); }

/* Botão "← voltar" no topo do chat — só existe visualmente no modo mobile
   abaixo. No desktop a sidebar de conversas e o chat sempre convivem lado
   a lado, não faz sentido ter botão de voltar lá. */
.chat-topo-voltar-mobile {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  margin-right: 4px;
  border-radius: 50%;
  color: var(--vmz-navy);
}
.chat-topo-voltar-mobile:hover { background: var(--vmz-border); }

/* ===================== MODO CELULAR (tela cheia, estilo app do WhatsApp) =====================
   Abaixo de 860px vira 2 telas só: lista de conversas OU chat, nunca os
   dois juntos (não cabe). Controlado pela classe "mobile-chat-aberto" no
   <html> — ligada em selecionarConversa() (app.js), desligada no botão
   "← voltar" acima. O topbar (64px, ver .topbar) continua sempre visível
   por cima, é onde fica hambúrguer/avatar/logout mesmo em modo lista. */
@media (max-width: 860px) {
  .sidebar-global-toggle { display: none; }
  /* "Resto da plataforma ignora" — no celular nem o menu hambúrguer some,
     só sobra logo + avatar (login/logout). Não é só a lista de conversas
     cobrindo a tela, o acesso às outras páginas some de propósito. */
  .topnav-hamburguer { display: none !important; }

  #global-sidebar-container {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    background: #fff;
  }
  .sidebar-global,
  .sidebar-global.colapsada {
    width: 100% !important;
    height: 100%;
    min-width: 0;
  }

  .app-shell-main { display: none; }
  .chat-topo-voltar-mobile { display: inline-flex; }

  html.mobile-chat-aberto #global-sidebar-container { display: none; }
  html.mobile-chat-aberto .app-shell-main { display: block; }
}

/* ===================== PADRÃO DE MODAL (reutilizável) ===================== */

.modal-habla-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 25, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-habla-overlay-empilhado { z-index: 110; background: rgba(20, 15, 25, 0.55); }

.modal-habla-card {
  background: #fff;
  border-radius: 20px;
  width: 560px;
  max-width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  position: relative;
}

.modal-habla-card-centralizado { text-align: center; padding-top: 32px; }

.modal-habla-header-linha {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 24px 16px 24px;
}

.modal-habla-header-linha h3 { flex: 1; font-size: 17px; }

.modal-habla-icone-pequeno {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: var(--vmz-pink-bg);
  color: var(--vmz-pink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-habla-icone-pequeno svg { width: 18px; height: 18px; }

.modal-habla-icone-grande {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--vmz-pink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}

.modal-habla-icone-grande svg { width: 28px; height: 28px; }

.modal-habla-titulo-centralizado { font-size: 19px; margin-bottom: 20px; }

.modal-habla-fechar {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--vmz-muted);
  line-height: 1;
}

.modal-habla-fechar-absoluto { position: absolute; top: 20px; right: 20px; }

.modal-habla-corpo { padding: 0 24px 20px 24px; overflow-y: auto; text-align: left; }

.secao-credenciais-meta {
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  background: var(--vmz-bg-soft, #f7f7fa);
  border: 1px solid var(--vmz-border);
}
.secao-credenciais-meta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.badge-status-meta {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.badge-status-meta.conectado { background: rgba(37, 211, 102, 0.15); color: #1c8a4a; }
.badge-status-meta.pendente { background: rgba(247, 148, 29, 0.15); color: #b5680e; }

.modal-habla-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--vmz-navy);
  margin-bottom: 6px;
}

.modal-habla-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  background: #f7f7f9;
  font-size: 14px;
  margin-bottom: 16px;
}

.modal-habla-input:focus { outline: 2px solid var(--vmz-pink-bg); border-color: var(--vmz-pink); }

.preview-template-hsm {
  background: #0b1220;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
}
.preview-template-hsm-corpo {
  color: #e5e7eb;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 8px;
  white-space: pre-wrap;
}
.preview-template-hsm-botao {
  background: #1c2536;
  color: #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  text-align: center;
  margin-top: 6px;
}

.campo-telefone-ddi { display: flex; gap: 8px; }
.campo-telefone-ddi select { width: 130px; flex-shrink: 0; }
.campo-telefone-ddi input { flex: 1; }

/* Dropdown customizado (substitui <select> nativo nos modais de motivo) —
   a caixinha usa a mesma classe .modal-habla-input pra ficar igual aos
   outros campos, e a lista aberta é HTML/CSS nosso, não do navegador. */
.dropdown-custom { position: relative; }

.dropdown-custom-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  color: var(--vmz-navy);
}

.dropdown-custom-seta {
  width: 12px;
  height: 8px;
  flex-shrink: 0;
  color: #555555;
  transition: transform 0.15s ease;
}

.dropdown-custom.aberto .dropdown-custom-trigger { border-color: var(--vmz-pink); }
.dropdown-custom.aberto .dropdown-custom-seta { transform: rotate(180deg); }

.dropdown-custom-lista {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 10;
  padding: 6px;
}

.dropdown-custom.aberto .dropdown-custom-lista { display: block; }

.dropdown-custom-item {
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 14px;
  color: var(--vmz-navy);
  cursor: pointer;
}

.dropdown-custom-item:hover { background: var(--vmz-pink-bg); }
.dropdown-custom-item.selecionado { background: var(--vmz-pink-bg); color: var(--vmz-pink); font-weight: 600; }
.dropdown-custom-item-destaque { color: var(--vmz-pink); font-weight: 700; border-top: 1px solid var(--vmz-border); margin-top: 4px; padding-top: 12px; }

.modal-habla-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.dias-semana-seletor { display: flex; gap: 6px; margin-bottom: 14px; }

.setores-multi-lista {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.setor-multi-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--vmz-navy);
  background: #f5f6f8;
  border: 1px solid var(--vmz-border);
  border-radius: 999px;
  padding: 6px 12px 6px 10px;
  cursor: pointer;
}

.setor-multi-item:has(input:checked) { background: var(--vmz-pink-bg); border-color: var(--vmz-pink); color: var(--vmz-pink); font-weight: 600; }
.setor-multi-item input { margin: 0; }

.dia-semana-botao {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--vmz-border);
  background: #fff;
  color: var(--vmz-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.dia-semana-botao:hover { border-color: var(--vmz-pink); }
.dia-semana-botao.ativo { background: var(--vmz-pink); border-color: var(--vmz-pink); color: #fff; }

.modal-habla-input-telefone {
  display: flex;
  align-items: center;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  background: #f7f7f9;
  margin-bottom: 16px;
  overflow: hidden;
}

.modal-habla-prefixo { padding: 11px 10px; font-size: 13px; color: var(--vmz-muted); border-right: 1px solid #e5e5ea; white-space: nowrap; }

.modal-habla-input-sem-borda { border: none; background: transparent; margin-bottom: 0; }

.modal-habla-secao-titulo { font-size: 13px; font-weight: 700; margin: 4px 0 14px 0; }

.link-modal-habla {
  background: none;
  border: none;
  color: var(--vmz-pink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
}

.modal-habla-campos-extra {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--vmz-border);
}

.modal-habla-novo-cadastro {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #f7f7f9;
  border-radius: 12px;
  margin-bottom: 16px;
}

.modal-habla-icone-inline {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  background: var(--vmz-pink-bg);
  color: var(--vmz-pink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-habla-icone-inline svg { width: 16px; height: 16px; }

.modal-habla-novo-cadastro-texto { flex: 1; }
.modal-habla-novo-cadastro-texto strong { font-size: 13px; display: block; margin-bottom: 2px; }
.modal-habla-novo-cadastro-texto p { font-size: 12px; color: var(--vmz-muted); }

.modal-habla-lista-resultados {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
}

.modal-habla-resultado-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}

.modal-habla-resultado-item:hover { background: #f7f7f9; }
.modal-habla-resultado-item.selecionado { background: var(--vmz-pink-bg); }

.modal-habla-vazio { font-size: 13px; color: var(--vmz-muted); padding: 12px 0; }

.modal-habla-rodape {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid var(--vmz-border);
}

.modal-habla-rodape-centralizado { justify-content: center; border-top: none; }

.modal-habla-passo { font-size: 12px; color: var(--vmz-muted); }

.btn-modal-habla-primario {
  background: var(--vmz-pink);
  color: #fff;
  border: none;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-modal-habla-primario:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-modal-habla-secundario {
  background: var(--vmz-pink);
  color: #fff;
  border: none;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-global-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 4px 16px 16px 16px;
}

.sidebar-global-header h3 { text-align: center; }

.sidebar-global-header-botoes {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  position: relative;
}

.sidebar-global-btn-nova { flex: 1; }

.sidebar-global-btn-filtro {
  width: var(--altura-botao-padrao);
  height: var(--altura-botao-padrao);
  min-width: var(--altura-botao-padrao);
  border-radius: 8px;
  border: 1px solid var(--vmz-border);
  background: #fff;
  color: var(--vmz-navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-global-btn-filtro svg { width: 15px; height: 15px; }
.sidebar-global-btn-filtro:hover { border-color: var(--vmz-pink); color: var(--vmz-pink); }

.sidebar-global-filtro-dropdown {
  position: absolute;
  top: 40px;
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 8px;
  min-width: 190px;
  z-index: 20;
  flex-direction: column;
}

.sidebar-global-filtro-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  color: var(--vmz-navy);
}

.sidebar-global-filtro-dropdown button:hover { background: var(--vmz-pink-bg); }
.sidebar-global-filtro-divisor { height: 1px; background: var(--vmz-border); margin: 4px 0; }

.sidebar-global-linha-selecao {
  padding: 0 16px 12px 16px;
}

.sidebar-global-btn-selecao {
  width: 100%;
  height: var(--altura-botao-padrao);
  border-radius: 8px;
  border: 1.5px dashed var(--vmz-border);
  background: #fff;
  color: var(--vmz-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}

.sidebar-global-btn-selecao svg { width: 15px; height: 15px; flex-shrink: 0; }
.sidebar-global-btn-selecao:hover { border-color: var(--vmz-pink); color: var(--vmz-pink); }
.sidebar-global-btn-selecao.ativo {
  background: var(--vmz-pink);
  border-color: var(--vmz-pink);
  border-style: solid;
  color: #fff;
}

.sidebar-global-checkbox {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--vmz-pink);
}

.sidebar-global-item.selecionado { background: var(--vmz-pink-bg); }

.sidebar-global-barra-selecao {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--vmz-border);
  background: #fff;
  font-size: 12px;
  color: var(--vmz-navy);
}

.btn-encerrar-selecao {
  background: #d9364f;
  color: #fff;
  border: none;
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-global-header h3 {
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--vmz-navy);
}

.sidebar-global-btn-nova {
  white-space: nowrap;
  flex-shrink: 0;
}

.sidebar-global.colapsada .sidebar-global-header { display: none; }

.sidebar-global-busca {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 12px 16px;
  padding: 8px 12px;
  background: #f5f6f8;
  border-radius: 10px;
}

.sidebar-global-busca svg { width: 15px; height: 15px; color: var(--vmz-muted); flex-shrink: 0; }

.sidebar-global-busca input {
  border: none;
  background: none;
  outline: none;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  color: var(--vmz-navy);
}

.sidebar-global.colapsada .sidebar-global-busca { display: none; }

.sidebar-global-abas {
  display: flex;
  gap: 4px;
  margin: 0 16px 12px 16px;
  padding: 4px;
  background: #f5f6f8;
  border-radius: 10px;
}

.sidebar-global-abas .aba-conversa {
  flex: 1;
  text-align: center;
  padding: 7px 8px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  border-bottom: none;
  color: var(--vmz-muted);
}

.sidebar-global-abas .aba-conversa.ativa {
  background: #fff;
  color: var(--vmz-pink);
  border-bottom: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sidebar-global.colapsada .sidebar-global-abas { display: none; }

.sidebar-global-lista {
  flex: 1;
  overflow-y: auto;
  padding: 8px 8px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-global-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 10px;
  border-radius: 10px;
  border-bottom: 1px solid var(--vmz-border);
  text-decoration: none;
  color: var(--vmz-navy);
  cursor: pointer;
}

.sidebar-global-item:last-child { border-bottom: none; }
.sidebar-global-item:hover { background: #f7f8fa; }
.sidebar-global-item.ativa {
  background: #f2f7f5;
  box-shadow: inset 3px 0 0 var(--vmz-green);
}

.sidebar-global.colapsada .sidebar-global-item { justify-content: center; }
.sidebar-global.colapsada .sidebar-global-info { display: none; }

.sidebar-global-avatar-wrap { position: relative; flex-shrink: 0; }

.sidebar-global-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.sidebar-global-canal-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.sidebar-global-canal-badge svg { width: 9px; height: 9px; }

.sidebar-global-info { overflow: hidden; flex: 1; min-width: 0; }

.sidebar-global-linha-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; min-width: 0; }
.sidebar-global-nome-linha { display: flex; align-items: baseline; gap: 4px; min-width: 0; overflow: hidden; }
.sidebar-global-nome { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; max-width: 100%; }
.sidebar-global-etiquetas-inline { font-size: 11.5px; font-weight: 600; color: var(--vmz-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-global-preview { font-size: 12px; color: var(--vmz-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 3px 0; }

.sidebar-global-tags-linha { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.sidebar-global-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: #eef0f3;
  color: var(--vmz-muted);
  white-space: nowrap;
}

.sidebar-global-tag-conexao {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #0ea968;
  background: #e6f7ee;
}
.sidebar-global-tag-conexao svg { width: 9px; height: 9px; }

.sidebar-global-etiqueta {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: #eef0f3;
  color: #495057;
  white-space: nowrap;
}

.sidebar-global-etiquetas-linha { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

.sidebar-global-contador-msg {
  font-size: 10.5px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--vmz-pink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

/* Coluna da direita: hora em cima, menu de ações (☰) embaixo — mesmo
   espírito do Hablla, evita a hora "roubar" espaço da linha do nome. */
.sidebar-global-lado-direito {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.sidebar-global-hora { font-size: 11px; color: var(--vmz-muted); }

/* Botão de ações rápidas (☰) + o menu que abre a partir dele */
.sidebar-global-menu-btn {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 7px;
  border: none;
  background: none;
  color: var(--vmz-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-global-menu-btn:hover { background: #eceff3; color: var(--vmz-navy); }
.sidebar-global-menu-btn svg { width: 15px; height: 15px; }

.sidebar-global-menu-dropdown {
  display: none;
  position: absolute;
  top: 40px;
  right: 8px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  padding: 6px;
  min-width: 160px;
  z-index: 30;
}

.sidebar-global-menu-dropdown.aberto { display: block; }

.sidebar-global-menu-etiquetas {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 8px 10px 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--vmz-border);
  max-width: 220px;
}

.sidebar-global-menu-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--vmz-navy);
  cursor: pointer;
}

.sidebar-global-menu-dropdown button:hover { background: var(--vmz-pink-bg); }
.sidebar-global-menu-dropdown button svg { width: 14px; height: 14px; flex-shrink: 0; }

.sidebar-global-vazio {
  padding: 12px 16px;
  font-size: 12px;
  color: var(--vmz-muted);
}
/* ===================== TIMELINE DA PESSOA ===================== */

.timeline-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--vmz-muted);
  margin-bottom: 16px;
}

.timeline-voltar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--vmz-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vmz-navy);
  text-decoration: none;
  font-size: 15px;
}

.timeline-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.timeline-lateral {
  width: 320px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  max-height: 100vh;
  overflow-y: auto;
}

.timeline-card-topo {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.timeline-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--vmz-pink-bg);
  color: var(--vmz-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 10px;
}

.timeline-nome-linha {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.timeline-nome-linha h2 { font-size: 18px; }

.timeline-contato-linha {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--vmz-muted);
}

.btn-whatsapp-timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 38px;
  margin-top: 14px;
  padding: 0;
  background: var(--vmz-green);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-whatsapp-timeline svg { width: 15px; height: 15px; }
.btn-whatsapp-timeline:hover { opacity: 0.9; }

.timeline-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.timeline-card-header h3 { font-size: 14px; }

.timeline-info-item {
  margin-bottom: 12px;
}

.timeline-info-label {
  display: block;
  font-size: 11px;
  color: var(--vmz-muted);
  margin-bottom: 2px;
}

.timeline-info-valor {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--vmz-navy);
}

.timeline-resumo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 6px 0;
  color: var(--vmz-navy);
}

.timeline-principal {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.timeline-principal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.timeline-principal-header h2 { font-size: 16px; }

.timeline-lista {
  position: relative;
  padding-left: 4px;
}

.timeline-dia-bloco { margin-bottom: 10px; }
.timeline-dia-bloco:last-child { margin-bottom: 0; }

.timeline-dia-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: #f7f7fa;
  border: 1px solid var(--vmz-border);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.timeline-dia-seta {
  width: 10px;
  height: 7px;
  flex-shrink: 0;
  color: var(--vmz-muted);
  transition: transform 0.15s ease;
}

.timeline-dia-bloco.aberto .timeline-dia-seta { transform: rotate(180deg); }

.timeline-dia-rotulo { font-size: 13px; font-weight: 700; color: var(--vmz-navy); flex: 1; }

.timeline-dia-contador {
  font-size: 11px;
  font-weight: 700;
  color: var(--vmz-muted);
  background: #eceff3;
  border-radius: 10px;
  padding: 1px 8px;
}

.timeline-dia-corpo {
  display: none;
  padding: 16px 4px 0 4px;
}

.timeline-dia-bloco.aberto .timeline-dia-corpo { display: block; }

.timeline-item {
  display: flex;
  gap: 14px;
  position: relative;
  padding-bottom: 22px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: var(--vmz-border);
}

.timeline-item:last-child::before { display: none; }

.timeline-item-icone {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.timeline-item-icone svg { width: 16px; height: 16px; }

.timeline-item-card {
  background: #f9f9fb;
  border-radius: 10px;
  padding: 12px 14px;
  flex: 1;
}

.timeline-item-data { font-size: 11px; color: var(--vmz-muted); margin-bottom: 3px; }

.timeline-item-linha-topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timeline-item-titulo { font-size: 13px; font-weight: 700; color: var(--vmz-navy); }
.timeline-item-descricao { font-size: 12px; color: var(--vmz-muted); margin-top: 4px; }

/* Card de atendimento na Timeline — cabeçalho estático + ações (Ver
   conversa / Abrir em nova guia), sem mais o expandir-mensagens-inline */
.timeline-atendimento-card { padding: 0; }
.timeline-atendimento-cabecalho { padding: 12px 14px; }

.timeline-atendimento-acoes {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 12px 14px;
}

.btn-ver-conversa {
  background: #fff;
  border: 1px solid var(--vmz-border);
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--vmz-navy);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.btn-ver-conversa svg { width: 15px; height: 15px; }
.btn-ver-conversa:hover { border-color: var(--vmz-pink); color: var(--vmz-pink); }

.btn-abrir-nova-guia {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border: 1px solid var(--vmz-border);
  border-radius: 8px;
  background: #fff;
  color: var(--vmz-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
}
.btn-abrir-nova-guia svg { width: 15px; height: 15px; }
.btn-abrir-nova-guia:hover { border-color: var(--vmz-pink); color: var(--vmz-pink); }

.timeline-item-abrir-chat {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--vmz-border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 12px;
  flex-shrink: 0;
}

/* Modal "Ver conversa" (janela de atendimento) e a página standalone
   /atendimentos/:id compartilham essas classes */
.modal-atendimento-card { width: 720px; height: 640px; }
.modal-atendimento-card .modal-habla-header-linha { padding-right: 16px; }
.modal-atendimento-info {
  padding: 0 24px 14px 24px;
  font-size: 12.5px;
  color: var(--vmz-muted);
  border-bottom: 1px solid var(--vmz-border);
}
.modal-atendimento-mensagens { border-radius: 0 0 20px 20px; }

.atendimento-view-body { display: flex; flex-direction: column; height: 100vh; }
.atendimento-view-topo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--vmz-border);
  background: #fff;
}
.atendimento-view-topo img { height: 28px; }
.atendimento-view-titulo { font-size: 15px; font-weight: 700; color: var(--vmz-navy); }
.atendimento-view-info { font-size: 12.5px; color: var(--vmz-muted); margin-top: 2px; }

.separador-data {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
  align-self: center;
}
.separador-data span {
  background: #fff;
  border: 1px solid var(--vmz-border);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--vmz-muted);
}

.chat-marcador-sistema {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin: 6px 0;
}
.chat-marcador-sistema span {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--vmz-muted);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.separador-data-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin: 10px 0;
}
.separador-data-chat span {
  background: rgba(255,255,255,0.9);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--vmz-muted);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.btn-carregar-anteriores {
  align-self: center;
  background: #fff;
  border: 1px solid var(--vmz-border);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--vmz-navy);
  cursor: pointer;
  margin-bottom: 10px;
}
.btn-carregar-anteriores:hover { border-color: var(--vmz-pink); color: var(--vmz-pink); }

/* ===================== RESPONSIVO: CONFIGURAÇÕES (tem que ficar no final do
   arquivo de propósito — regras de mesmo peso definidas depois vencem as de
   antes, então isso evita o bug de ela ser "vencida" por uma regra posterior) ===================== */
@media (max-width: 1070px) {
  .config-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
  }

  .config-subabas {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-x: visible;
    overflow-y: auto;
    max-height: 70vh;
    width: 210px;
    min-width: 210px;
    padding: 8px;
    margin-bottom: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  }

  .config-subaba {
    width: 100%;
    text-align: left;
    border-radius: 8px;
    border-bottom: none;
    border-left: 3px solid transparent;
    background: none;
    padding: 10px 12px;
  }

  .config-subaba:hover { background: #f5f6f8; }

  .config-subaba.ativa {
    background: var(--vmz-pink-bg);
    border-left-color: var(--vmz-pink);
  }
}

/* ===================================================================
   PAGINAÇÃO NUMERADA (Pessoas, Fila e outras listas grandes)
   =================================================================== */
.paginacao-padrao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--vmz-border);
}

.paginacao-info {
  font-size: 12px;
  color: var(--vmz-muted);
  margin-right: 10px;
}

.paginacao-botao {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--vmz-border);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--vmz-navy);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.paginacao-botao:hover:not(:disabled) { border-color: var(--vmz-pink); }
.paginacao-botao:disabled { opacity: 0.4; cursor: not-allowed; }

.paginacao-botao.ativa {
  background: var(--vmz-pink);
  border-color: var(--vmz-pink);
  color: #fff;
}

.paginacao-reticencias {
  color: var(--vmz-muted);
  font-size: 13px;
  padding: 0 4px;
}

/* ===================================================================
   AÇÕES DA FILA (botão espiar) + SIDEBAR DE "ESPIAR" CONVERSA
   =================================================================== */

.celula-acoes-fila { padding-top: 8px; padding-bottom: 8px; }

.celula-acoes-fila-wrap { display: flex; align-items: center; gap: 8px; }

.btn-espiar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border: 1px solid var(--vmz-border);
  border-radius: 8px;
  background: #fff;
  color: var(--vmz-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.btn-espiar svg { width: 17px; height: 17px; }
.btn-espiar:hover { border-color: var(--vmz-pink); color: var(--vmz-pink); }

.espiar-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  justify-content: flex-end;
  background: rgba(20, 15, 25, 0.35);
}

.espiar-sidebar {
  width: 380px;
  max-width: 92vw;
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 32px rgba(31, 41, 55, 0.14);
}

.espiar-cabecalho {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--vmz-border);
}

.espiar-nome { font-size: 15px; font-weight: 700; color: var(--vmz-navy); }
.espiar-telefone { font-size: 12px; color: var(--vmz-muted); margin-top: 2px; }

.espiar-mensagens {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fafbfc;
}

.espiar-msg {
  max-width: 82%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
}

.espiar-msg-entrada { align-self: flex-start; background: #fff; border: 1px solid var(--vmz-border); color: var(--vmz-navy); }
.espiar-msg-saida { align-self: flex-end; background: var(--vmz-pink-bg); color: var(--vmz-navy); }
.espiar-msg-interna { align-self: center; background: var(--vmz-orange-bg); color: #8a5a00; font-style: italic; max-width: 92%; }

.espiar-msg-hora { font-size: 10px; color: var(--vmz-muted); margin-top: 4px; text-align: right; }

.espiar-rodape {
  padding: 12px 20px;
  border-top: 1px solid var(--vmz-border);
  text-align: center;
}

/* ===================================================================
   SELETOR DE STATUS DISPONÍVEL/INDISPONÍVEL (rodapé fixo da sidebar global)
   =================================================================== */

.sidebar-global-rodape-status {
  border-top: 1px solid var(--vmz-border);
  padding: 12px;
  flex-shrink: 0;
}

.status-seletor {
  display: flex;
  gap: 6px;
  background: #f5f6f8;
  padding: 4px;
  border-radius: 10px;
}

.status-opcao {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--altura-botao-padrao);
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--vmz-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.status-opcao-bolinha {
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.status-opcao-disponivel.status-opcao-ativa {
  background: #e6f7ee;
  color: #1f9254;
}
.status-opcao-disponivel.status-opcao-ativa .status-opcao-bolinha { background: #35b06a; opacity: 1; }

.status-opcao-indisponivel.status-opcao-ativa {
  background: #fdeaee;
  color: #c81a3f;
}
.status-opcao-indisponivel.status-opcao-ativa .status-opcao-bolinha { background: #d9364f; opacity: 1; }

.status-opcao-legenda {
  margin-top: 8px;
  font-size: 11px;
  color: var(--vmz-muted);
  text-align: center;
  line-height: 1.4;
}

/* Sidebar recolhida: some o rodapé de status, só a lista fica visível */
.sidebar-global.colapsada .sidebar-global-rodape-status { display: none; }

/* ===================================================================
   MENU SUSPENSO DO AVATAR (clique na bolinha de iniciais no topo)
   =================================================================== */

.menu-avatar {
  position: absolute;
  top: 46px;
  right: 0;
  width: 260px;
  background: #fff;
  border: 1px solid var(--vmz-border);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(31, 41, 55, 0.16);
  overflow: hidden;
  z-index: 99999;
  text-align: left;
  cursor: default;
  padding: 6px;
}

.menu-avatar-cabecalho {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 8px;
}

.menu-avatar-circulo-grande {
  width: 40px;
  height: 40px;
  min-width: 40px;
  font-size: 13px;
  cursor: default;
}

.menu-avatar-nome {
  font-size: 13px;
  font-weight: 700;
  color: var(--vmz-navy);
  word-break: break-word;
  line-height: 1.3;
}

.menu-avatar-email {
  font-size: 11px;
  color: var(--vmz-muted);
  word-break: break-all;
  margin-top: 2px;
}

.menu-avatar-divisor {
  height: 1px;
  background: var(--vmz-border);
  margin: 4px 0;
}

.menu-avatar-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border: none;
  border-radius: 8px;
  background: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--vmz-navy);
  text-align: left;
  cursor: pointer;
}

.menu-avatar-item svg { width: 16px; height: 16px; min-width: 16px; color: var(--vmz-muted); }

.menu-avatar-item:hover { background: #f5f6f8; }

.menu-avatar-item-sair { color: #d9364f; }
.menu-avatar-item-sair svg { color: #d9364f; }

/* Linhas de tabela clicáveis (Time, e outras que abrem modal ao clicar na linha) */
.linha-clicavel { cursor: pointer; }
.linha-clicavel:hover { background: #fafbfc; }

/* Checklist de pessoas dentro do modal de Automação (transferência em massa) */
.automacao-checklist {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--vmz-border);
  border-radius: 8px;
  padding: 6px;
}

.automacao-checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--vmz-navy);
  cursor: pointer;
}

.automacao-checklist-item:hover { background: #f5f6f8; }
.automacao-checklist-item input { cursor: pointer; }

.fila-topo-botoes { display: flex; align-items: center; gap: 10px; }

/* ===================== CRM: nova barra de busca/ordenar/visualização ===================== */
.crm-linha-acoes {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.crm-linha-acoes .pessoas-busca-input { flex: 1; min-width: 220px; }
.crm-linha-acoes .select-funil { height: 38px; }

/* ===================================================================
   MATRIZ DE PERMISSÕES (Configurações > Permissões)
   =================================================================== */

.btn-voltar-perfis {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--vmz-pink);
  cursor: pointer;
}

.bloco-modulo {
  border: 1px solid var(--vmz-border);
  border-radius: 14px;
  overflow: hidden;
}

.bloco-modulo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #fafbfc;
  border-bottom: 1px solid var(--vmz-border);
}

.bloco-modulo-header h4 { font-size: 14px; font-weight: 700; color: var(--vmz-navy); }
.bloco-modulo-header p { font-size: 12px; color: var(--vmz-muted); margin-top: 2px; }
.bloco-modulo-header .btn-secundario { white-space: nowrap; }

.bloco-modulo-acoes { padding: 4px 0; }

.linha-permissao {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 16px;
  cursor: pointer;
}

.linha-permissao:hover { background: #fafafa; }
.linha-permissao-travada { cursor: default; opacity: 0.75; }
.linha-permissao-travada:hover { background: none; }

.badge-permissao-nova {
  font-size: 9.5px;
  font-weight: 700;
  color: #fff;
  background: var(--vmz-pink);
  padding: 2px 6px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 4px;
}

.check-permissao { position: absolute; opacity: 0; width: 0; height: 0; }

.check-visual {
  width: 19px;
  height: 19px;
  min-width: 19px;
  border: 1.5px solid #d3d7de;
  border-radius: 6px;
  background: #fff;
  position: relative;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.check-visual::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6.5px;
  width: 4px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.12s ease;
}

.check-permissao:checked + .check-visual { background: var(--vmz-pink); border-color: var(--vmz-pink); }
.check-permissao:checked + .check-visual::after { transform: rotate(45deg) scale(1); }
.check-permissao:focus-visible + .check-visual { outline: 2px solid var(--vmz-pink); outline-offset: 2px; }

.linha-permissao-texto { flex: 1; font-size: 13px; color: var(--vmz-navy); }

.linha-permissao-chave {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  color: #a8aeb8;
  background: #f7f7f9;
  padding: 2px 7px;
  border-radius: 5px;
}

@media (max-width: 720px) {
  .linha-permissao-chave { display: none; }
}

/* ===================================================================
   ABAS DE CATEGORIA (Motivos de finalização, e reaproveitável em outros
   lugares que também vão ganhar categoria — Respostas rápidas, Etiquetas)
   =================================================================== */
.abas-categoria-motivo {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--vmz-border);
  padding-bottom: 2px;
}

.aba-categoria-motivo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 4px 11px 4px;
  margin-right: 20px;
  border: none;
  border-bottom: 2.5px solid transparent;
  background: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--vmz-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.aba-categoria-motivo:hover { color: var(--vmz-navy); }

.aba-categoria-motivo.ativa {
  color: var(--vmz-pink);
  border-bottom-color: var(--vmz-pink);
}

.aba-categoria-motivo-contador {
  background: #eef0f3;
  color: var(--vmz-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}

.aba-categoria-motivo.ativa .aba-categoria-motivo-contador {
  background: var(--vmz-pink-bg);
  color: var(--vmz-pink);
}

/* Botão menor — usado só onde queremos algo discreto (ex: + Nova resposta rápida) */
.btn-nova-conversa-pequeno {
  height: 30px !important;
  padding: 0 12px !important;
}
/* ===================== CRM: modal de criar negócio ===================== */

.modal-habla-card.modal-habla-largo { width: 480px; max-width: 92vw; }

/* Usado no modal de mostrarSelecao() — a lista do dropdown customizado
   precisa poder crescer pra fora do card (senão o overflow:hidden do card
   corta ela no meio, obrigando a rolar dentro de uma faixa minúscula). */
.modal-habla-card-dropdown-livre { overflow: visible; }
.modal-habla-card-dropdown-livre .modal-habla-corpo { overflow: visible; }

.campo-valor-moeda { display: flex; gap: 10px; }
.campo-valor-moeda input { flex: 1; }
.campo-moeda-fixa {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1.5px solid var(--vmz-border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--vmz-muted);
  background: #f9f9fb;
  white-space: nowrap;
}

.busca-cliente-wrap { position: relative; }
.busca-cliente-selecionado {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid var(--vmz-border);
  border-radius: 8px;
  background: #f9f9fb;
  font-size: 13px;
  color: var(--vmz-navy);
}
.busca-cliente-selecionado.visivel { display: flex; }
.busca-cliente-selecionado button {
  border: none;
  background: none;
  color: var(--vmz-muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.busca-cliente-resultados {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--vmz-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  max-height: 220px;
  overflow-y: auto;
  z-index: 20;
}
.busca-cliente-item {
  padding: 9px 12px;
  font-size: 13px;
  color: var(--vmz-navy);
  cursor: pointer;
}
.busca-cliente-item:hover { background: var(--vmz-pink-bg); color: var(--vmz-pink); }
.busca-cliente-item small { display: block; color: var(--vmz-muted); font-size: 11px; }
.busca-cliente-vazio { padding: 10px 12px; font-size: 12.5px; color: var(--vmz-muted); }

.chips-participantes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip-participante {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--vmz-pink-bg);
  color: var(--vmz-pink);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
}
.chip-participante button { border: none; background: rgba(255,255,255,0.5); color: inherit; width: 16px; height: 16px; border-radius: 50%; cursor: pointer; font-size: 11px; line-height: 1; }

.campos-personalizados-lista { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.campo-personalizado-linha { position: relative; }
.campo-personalizado-linha button.remover-campo {
  position: absolute;
  top: 0;
  right: 0;
  border: none;
  background: none;
  color: var(--vmz-muted);
  cursor: pointer;
  font-size: 12px;
}
.campo-personalizado-linha button.remover-campo:hover { color: #d9364f; }

/* ===================== CRM: sidebar de detalhe do negócio ===================== */

.odt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 25, 0.35);
  z-index: 9999;
  display: flex;
  justify-content: flex-end;
}

.odt-drawer {
  width: min(1500px, 94vw);
  height: 100%;
  background: #f5f6f8;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(0,0,0,0.12);
}

.odt-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid var(--vmz-border);
}
.odt-header h2 { font-size: 18px; font-weight: 700; color: var(--vmz-navy); margin: 0; }
.odt-header-funil { font-size: 12.5px; color: var(--vmz-muted); }
.odt-header-fechar {
  margin-left: auto;
  border: none;
  background: none;
  font-size: 20px;
  color: var(--vmz-muted);
  cursor: pointer;
  line-height: 1;
}
.odt-header-fechar:hover { color: var(--vmz-pink); }

.odt-abas {
  display: flex;
  gap: 4px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--vmz-border);
  overflow-x: auto;
}
.odt-aba {
  border: none;
  background: none;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--vmz-muted);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.odt-aba.ativa { color: var(--vmz-pink); border-bottom-color: var(--vmz-pink); }
.odt-aba:hover { color: var(--vmz-navy); }

.odt-aba-config {
  border: none;
  background: none;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--vmz-muted);
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
}
.odt-aba-config:hover { color: var(--vmz-navy); }
.odt-aba-config.ativa { color: var(--vmz-pink); font-weight: 700; }

.odt-abas-arrastando .odt-aba {
  cursor: grab;
  background: #f5f6f8;
  border-radius: 6px;
  margin: 6px 0;
}
.odt-abas-arrastando .odt-aba.odt-aba-arrastando-item { opacity: 0.4; }

.odt-corpo { flex: 1; overflow-y: auto; padding: 20px 24px; }

.odt-corpo:has(.odt-iframe-cliquetur) { padding: 0; overflow: hidden; }
.odt-iframe-cliquetur { width: 100%; height: 100%; border: none; display: block; }
.odt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 760px) { .odt-grid { grid-template-columns: 1fr; } }

.odt-caixa { background: #fff; border: 1px solid var(--vmz-border); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.odt-caixa-titulo { font-size: 11px; font-weight: 700; color: var(--vmz-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 14px; }
.odt-linha { margin-bottom: 14px; }
.odt-linha:last-child { margin-bottom: 0; }
.odt-linha-label { font-size: 11.5px; color: var(--vmz-muted); margin-bottom: 3px; }
.odt-linha-valor { font-size: 14px; color: var(--vmz-navy); font-weight: 600; }
.odt-linha-valor-grande { font-size: 24px; font-weight: 700; color: var(--vmz-navy); }
.odt-etapa-badge { display: inline-flex; padding: 3px 10px; border-radius: 999px; background: var(--vmz-pink-bg); color: var(--vmz-pink); font-size: 12px; font-weight: 700; }

.odt-pencil {
  border: none;
  background: none;
  color: var(--vmz-muted);
  cursor: pointer;
  font-size: 12px;
  vertical-align: middle;
}
.odt-pencil:hover { color: var(--vmz-pink); }

.odt-vazio { font-size: 12.5px; color: var(--vmz-muted); }

.odt-acoes-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.odt-acao-tab {
  border: none;
  background: #eef0f3;
  color: var(--vmz-muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.odt-acao-tab.ativa { background: var(--vmz-pink); color: #fff; }

.odt-acao-textarea {
  width: 100%;
  border: 1.5px solid var(--vmz-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
}

.odt-acao-rodape { display: flex; justify-content: flex-end; margin-top: 8px; }

.odt-timeline-grupo-titulo {
  font-size: 11px;
  font-weight: 700;
  color: var(--vmz-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 18px 0 8px;
}

.odt-evento {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--vmz-border);
}
.odt-evento:last-child { border-bottom: none; }
.odt-evento-icone {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: #eef0f3;
  color: var(--vmz-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.odt-evento-texto { font-size: 13px; color: var(--vmz-navy); }
.odt-evento-meta { font-size: 11px; color: var(--vmz-muted); margin-top: 2px; }

.odt-em-construcao { text-align: center; padding: 60px 20px; color: var(--vmz-muted); font-size: 13px; }

/* ===================== Template: modal com pré-visualização ===================== */

.template-preview-modal { width: min(1160px, 96vw); max-height: 92vh; }

.template-preview-corpo { display: flex; gap: 0; max-height: calc(92vh - 130px); overflow-y: auto; }
.template-preview-form { flex: 1; min-width: 0; }

.template-preview-lado {
  width: 460px;
  min-width: 460px;
  border-left: 1px solid var(--vmz-border);
  padding: 28px;
  background: #f9f9fb;
}
.template-preview-titulo { font-size: 12px; font-weight: 700; color: var(--vmz-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 14px; }

.template-preview-tela {
  background: #e9edf1;
  border-radius: 12px;
  padding: 26px;
  min-height: 340px;
  display: flex;
  align-items: flex-start;
}

.template-preview-bolha {
  background: #fff;
  border-radius: 12px;
  border-top-left-radius: 2px;
  padding: 16px 18px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--vmz-navy);
  white-space: pre-wrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}