/*
 * PROMP / ZPRO - Customização Desacoplada (/home/deployzdg/zpro_custom/frontend/custom.css)
 * Arquitetura Zero-Touch Core — NÃO altera código nativo.
 */

/* ===== [REMOVIDO] Regra genérica de ocultamento de botões amber =====
   A regra anterior (button.bg-amber-500 { display: none }) escondia TODOS
   os botões nativos do ZPRO que usam amber-500, incluindo "Nova Meta",
   botões de ação, etc. Foi removida para restaurar a funcionalidade.
   Se precisar ocultar o botão "Publicar/Agendar" no widget de posts,
   fazer via JS com seletor contextual específico. */

/* ===== SELO VISUAL & SISTEMA DE PILLS DO ASSISTENTE IAGO ===== */
.zpro-ia-ticket-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  vertical-align: middle;
}

/* ===== SUPORTE ROBUSTO PARA SIDEBAR LATERAL COLAPSADA (ZERO-TOUCH) ===== */
aside:has(svg.lucide-panel-left) [data-zpro-custom-ia="true"],
aside[style*="width: 68px"] [data-zpro-custom-ia="true"],
aside[style*="width:68px"] [data-zpro-custom-ia="true"] {
  overflow: hidden !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

aside:has(svg.lucide-panel-left) [data-zpro-custom-ia="true"] #zpro-ia-toggle-btn span:not(.h-3\.5),
aside:has(svg.lucide-panel-left) [data-zpro-custom-ia="true"] #zpro-ia-toggle-btn svg,
aside:has(svg.lucide-panel-left) [data-zpro-custom-ia="true"] a span,
aside:has(svg.lucide-panel-left) [data-zpro-custom-ia="true"] span.truncate,
aside[style*="width: 68px"] [data-zpro-custom-ia="true"] #zpro-ia-toggle-btn span:not(.h-3\.5),
aside[style*="width: 68px"] [data-zpro-custom-ia="true"] #zpro-ia-toggle-btn svg,
aside[style*="width: 68px"] [data-zpro-custom-ia="true"] a span,
aside[style*="width: 68px"] [data-zpro-custom-ia="true"] span.truncate,
aside[style*="width:68px"] [data-zpro-custom-ia="true"] #zpro-ia-toggle-btn span:not(.h-3\.5),
aside[style*="width:68px"] [data-zpro-custom-ia="true"] #zpro-ia-toggle-btn svg,
aside[style*="width:68px"] [data-zpro-custom-ia="true"] a span,
aside[style*="width:68px"] [data-zpro-custom-ia="true"] span.truncate {
  display: none !important;
}

aside:has(svg.lucide-panel-left) [data-zpro-custom-ia="true"] #zpro-ia-toggle-btn,
aside[style*="width: 68px"] [data-zpro-custom-ia="true"] #zpro-ia-toggle-btn,
aside[style*="width:68px"] [data-zpro-custom-ia="true"] #zpro-ia-toggle-btn {
  justify-content: center !important;
  padding: 0 !important;
  width: 100% !important;
  height: 28px !important;
  background: transparent !important;
}

aside:has(svg.lucide-panel-left) [data-zpro-custom-ia="true"] a,
aside[style*="width: 68px"] [data-zpro-custom-ia="true"] a,
aside[style*="width:68px"] [data-zpro-custom-ia="true"] a {
  justify-content: center !important;
  padding: 0 !important;
  width: 100% !important;
  height: 36px !important;
}

aside:has(svg.lucide-panel-left) [data-zpro-custom-ia="true"] .ia-subitems-container,
aside:has(svg.lucide-panel-left) [data-zpro-custom-ia="true"] .ia-collapsed-subitems,
aside[style*="width: 68px"] [data-zpro-custom-ia="true"] .ia-subitems-container,
aside[style*="width: 68px"] [data-zpro-custom-ia="true"] .ia-collapsed-subitems,
aside[style*="width:68px"] [data-zpro-custom-ia="true"] .ia-subitems-container,
aside[style*="width:68px"] [data-zpro-custom-ia="true"] .ia-collapsed-subitems {
  margin-left: 0 !important;
  width: 100% !important;
}

/* ==========================================================================
   🧠 IAGO AI PILL SYSTEM (ELEMENTO CHAVE DE IDENTIDADE VISUAL DA IA)
   Inspirado no design minimalista de alta tecnologia (x.ai/bot Pill)
   ========================================================================== */

.iago-ai-pill {
  display: inline-flex;
  align-items: center;
  height: 32px;
  min-height: 32px;
  padding: 0 12px 0 5px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
  border: 1px solid rgba(56, 189, 248, 0.38);
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  text-decoration: none;
  gap: 6px;
  position: relative;
  outline: none;
  vertical-align: middle;
}

.dark .iago-ai-pill,
[data-theme='dark'] .iago-ai-pill {
  background: rgba(14, 165, 233, 0.18);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.15), inset 0 0 0 1px rgba(56, 189, 248, 0.2);
}

.iago-ai-pill:hover {
  background: rgba(2, 132, 199, 0.22);
  border-color: rgba(56, 189, 248, 0.7);
  color: #0369a1;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.22);
}

.dark .iago-ai-pill:hover,
[data-theme='dark'] .iago-ai-pill:hover {
  background: rgba(14, 165, 233, 0.3);
  color: #e0f2fe;
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.35);
}

.iago-ai-pill:active {
  transform: translateY(0);
}

.iago-pill-avatar-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  overflow: hidden;
}

.iago-pill-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  background: #0a0a0c;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.iago-ai-pill:hover .iago-pill-avatar {
  transform: scale(1.08);
}

.iago-pill-avatar-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.iago-pill-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
}

/* Tamanhos */
.iago-ai-pill.iago-pill-sm {
  height: 26px;
  min-height: 26px;
  padding: 0 10px 0 4px;
  font-size: 11.5px;
  gap: 5px;
}
.iago-ai-pill.iago-pill-sm .iago-pill-avatar-wrapper {
  width: 20px;
  height: 20px;
}
.iago-ai-pill.iago-pill-sm .iago-pill-avatar {
  width: 18px;
  height: 18px;
}
.iago-ai-pill.iago-pill-sm .iago-pill-label {
  font-size: 11.5px;
}

.iago-ai-pill.iago-pill-lg {
  height: 38px;
  min-height: 38px;
  padding: 0 16px 0 6px;
  font-size: 14px;
  gap: 8px;
}
.iago-ai-pill.iago-pill-lg .iago-pill-avatar-wrapper {
  width: 32px;
  height: 32px;
}
.iago-ai-pill.iago-pill-lg .iago-pill-avatar {
  width: 26px;
  height: 26px;
}
.iago-ai-pill.iago-pill-lg .iago-pill-label {
  font-size: 13.5px;
}

/* Variantes de Cor Temáticas do IAGO */
.iago-ai-pill.iago-pill-indigo {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  border-color: rgba(129, 140, 248, 0.4);
}
.dark .iago-ai-pill.iago-pill-indigo {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.iago-ai-pill.iago-pill-amber,
.iago-ai-pill.iago-pill-warning {
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
  border-color: rgba(251, 191, 36, 0.45);
}
.dark .iago-ai-pill.iago-pill-amber,
.dark .iago-ai-pill.iago-pill-warning {
  background: rgba(245, 158, 11, 0.22);
  color: #fcd34d;
}

.iago-ai-pill.iago-pill-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
  border-color: rgba(248, 113, 113, 0.45);
  animation: iagoPulseDanger 2.5s infinite;
}
.dark .iago-ai-pill.iago-pill-danger {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
}

@keyframes iagoPulseDanger {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0); }
}

.iago-ai-pill.iago-pill-success {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  border-color: rgba(52, 211, 153, 0.45);
}
.dark .iago-ai-pill.iago-pill-success {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
}

.iago-ai-pill.iago-pill-purple {
  background: rgba(168, 85, 247, 0.14);
  color: #9333ea;
  border-color: rgba(192, 132, 252, 0.45);
}
.dark .iago-ai-pill.iago-pill-purple {
  background: rgba(168, 85, 247, 0.22);
  color: #d8b4fe;
}

/* Modo Badge Estático */
.iago-ai-pill.iago-badge-mode {
  cursor: default;
}

.iago-input-suggest-pill {
  display: none !important;
}

/* Ícone Inline do Avatar Estático do IAGO (Substituto de Sparkles, Lucide Bot e Estrelinhas) */
.iago-inline-avatar-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  border-radius: 9999px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  background: #0a0a0c !important;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.4) !important;
  vertical-align: middle !important;
  margin-right: 6px !important;
  transition: transform 0.2s cubic-bezier(0.34, 1.3, 0.64, 1) !important;
}

[role="menuitem"]:hover .iago-inline-avatar-icon,
button:hover .iago-inline-avatar-icon,
[data-radix-collection-item]:hover .iago-inline-avatar-icon {
  transform: scale(1.18) rotate(5deg) !important;
}

.iago-inline-avatar-icon.iago-avatar-xs {
  width: 13px !important;
  height: 13px !important;
  min-width: 13px !important;
  min-height: 13px !important;
  margin-right: 4px !important;
}

.iago-inline-avatar-icon.iago-avatar-sm {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  margin-right: 5px !important;
}

.iago-inline-avatar-icon.iago-avatar-md {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  margin-right: 8px !important;
}

.iago-inline-avatar-icon.iago-avatar-lg {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  margin-right: 8px !important;
}

/* Card de Insights do IAGO no Dashboard */
.zpro-iago-dashboard-insights-card {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(99, 102, 241, 0.06) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.06) !important;
}
.dark .zpro-iago-dashboard-insights-card {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(99, 102, 241, 0.1) 100%) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4) !important;
}

/* Oculta o ícone nativo de estrelinhas/svg antes do título no card */
.zpro-iago-dashboard-insights-card svg.lucide-sparkles:not(button svg),
.zpro-iago-dashboard-insights-card .flex > svg:first-child {
  display: none !important;
}

.zpro-iago-dashboard-insights-card .flex::before,
.zpro-iago-dashboard-insights-card div::before {
  content: none !important;
}

/* Único avatar do IAGO no cabeçalho, com o texto alinhado à esquerda */
.zpro-iago-dashboard-insights-card h3 {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  text-align: left !important;
  margin: 0 !important;
}
.zpro-iago-dashboard-insights-card h3::before {
  content: "" !important;
  display: inline-block !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  border-radius: 9999px !important;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='g1' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%230284c7'/%3E%3Cstop offset='50%25' stop-color='%230f172a'/%3E%3Cstop offset='100%25' stop-color='%230369a1'/%3E%3C/linearGradient%3E%3ClinearGradient id='g2' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%2338bdf8'/%3E%3Cstop offset='100%25' stop-color='%23818cf8'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='50' cy='50' r='47' stroke='url(%23g2)' stroke-width='4'/%3E%3Ccircle cx='50' cy='50' r='43' fill='url(%23g1)'/%3E%3Cellipse cx='40' cy='24' rx='18' ry='8' fill='white' opacity='0.16' transform='rotate(-15 40 24)'/%3E%3Cellipse cx='38' cy='48' rx='6.5' ry='12.5' fill='%23FFFFFF' transform='rotate(-6 38 48)'/%3E%3Cellipse cx='62' cy='48' rx='6.5' ry='12.5' fill='%23FFFFFF' transform='rotate(6 62 48)'/%3E%3Ccircle cx='74' cy='30' r='3' fill='%2338bdf8' opacity='0.9'/%3E%3C/svg%3E") no-repeat center / contain !important;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.4) !important;
  flex-shrink: 0 !important;
}

/* Botão Flutuante / Header de Insights IAGO nos Painéis */
.iago-dashboard-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(99, 102, 241, 0.06) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}
.dark .iago-dashboard-summary-bar {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(99, 102, 241, 0.1) 100%);
  border-color: rgba(56, 189, 248, 0.3);
}

/* Modal de Insights do IAGO */
.iago-insight-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: iagoFadeIn 0.2s ease;
}

.iago-insight-modal-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(2, 132, 199, 0.1);
  animation: iagoSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.dark .iago-insight-modal-card {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

/* ===== DIAGRAMAÇÃO DA PÁGINA /ia-atendimento (PADRÃO NATIVO ZPRO) ===== */

#zpro-custom-ia-wrapper {
  width: 100%;
  height: 100%;
  max-height: 100vh;
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 180px !important;
}

main:has(#zpro-custom-ia-wrapper) {
  overflow-y: auto !important;
  height: 100% !important;
}

.zpro-ia-container {
  padding: 24px 32px 180px 32px !important;
  max-width: 1280px;
  margin: 0 auto;
  min-height: min-content;
  background-color: transparent;
  color: #0f172a;
  font-family: inherit;
}

.zpro-ia-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.zpro-ia-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.zpro-ia-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}

/* BARRA DE ABAS ESTILIZADA NATIVA (TabsList / TabsTrigger) */
.zpro-ia-tabs-container {
  overflow-x: auto;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.zpro-ia-tabs-container::-webkit-scrollbar {
  display: none;
}

.zpro-ia-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: hsl(var(--muted, 240 4.8% 95.9%));
  border: none;
  border-radius: var(--radius, 8px);
  width: max-content;
  max-width: 100%;
}

.zpro-ia-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: hsl(var(--muted-foreground, 240 3.8% 46.1%));
  background: transparent;
  border: none;
  border-radius: calc(var(--radius, 8px) - 2px);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.2, 0, 0, 1);
  user-select: none;
  line-height: 1.25;
}

.zpro-ia-tab-btn:hover {
  color: hsl(var(--foreground, 240 10% 3.9%));
  background: hsla(var(--background, 0 0% 100%), 0.5);
}

.zpro-ia-tab-btn.active {
  color: hsl(var(--foreground, 240 10% 3.9%));
  background: hsl(var(--card, 0 0% 100%));
  font-weight: 600;
  border: none;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 3px 0 rgba(0, 0, 0, 0.03);
}

/* CARDS E SEÇÕES DO FORMULÁRIO */
.zpro-ia-card {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.zpro-ia-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 10px;
}

.zpro-ia-form-group {
  margin-bottom: 18px;
}

.zpro-ia-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #475569;
  margin-bottom: 8px;
}

.zpro-ia-input, .zpro-ia-select, .zpro-ia-textarea {
  width: 100%;
  padding: 10px 14px;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  color: #0f172a !important;
  font-size: 13px !important;
  outline: none;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
}

.zpro-ia-input:focus, .zpro-ia-select:focus, .zpro-ia-textarea:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

/* BOTÃO DE SALVAR DE ALTO CONTRASTE */
.zpro-ia-btn-primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background-color: #4f46e5 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 10px 22px !important;
  border: 1px solid #4338ca !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1) !important;
  transition: background-color 0.15s ease !important;
  margin-top: 8px !important;
}

.zpro-ia-btn-primary:hover {
  background-color: #4338ca !important;
}

/* BADGES E TABELAS */
.zpro-ia-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

.zpro-ia-badge-success {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.zpro-ia-badge-warning {
  background: #fef9c3;
  color: #a16207;
  border: 1px solid #fef08a;
}

.zpro-ia-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.zpro-ia-table th, .zpro-ia-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
}

.zpro-ia-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ===== ESTILOS ADICIONAIS DO PAINEL DE METAS & RISCO ===== */

.zpro-metas-container {
  padding: 8px 0;
  color: #0f172a;
}

.zpro-metas-filters {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 24px;
}

/* Suporte para Dark Mode nativo do ZPRO (classe .dark no HTML/body) */
.dark .zpro-metas-filters {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

.dark .zpro-ia-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

.dark .zpro-ia-card-title {
  color: #f8fafc !important;
  border-bottom-color: #334155 !important;
}

.dark .zpro-ia-title {
  color: #f8fafc !important;
}

.dark .zpro-ia-label {
  color: #94a3b8 !important;
}

.dark .zpro-ia-input, .dark .zpro-ia-select, .dark .zpro-ia-textarea {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

.dark .zpro-ia-input:focus, .dark .zpro-ia-select:focus, .dark .zpro-ia-textarea:focus {
  border-color: #6366f1 !important;
}

.dark .zpro-ia-table th {
  background: #0f172a !important;
  color: #94a3b8 !important;
  border-bottom-color: #334155 !important;
}

.dark .zpro-ia-table td {
  border-bottom-color: #334155 !important;
  color: #cbd5e1 !important;
}

.dark .zpro-ia-tabs {
  background: hsl(var(--muted, 240 3.7% 15.9%)) !important;
  border-color: transparent !important;
}

.dark .zpro-ia-tab-btn {
  color: hsl(var(--muted-foreground, 240 5% 64.9%)) !important;
}

.dark .zpro-ia-tab-btn:hover {
  color: hsl(var(--foreground, 0 0% 98%)) !important;
  background: hsla(var(--background, 240 10% 3.9%), 0.4) !important;
}

.dark .zpro-ia-tab-btn.active {
  color: hsl(var(--foreground, 0 0% 98%)) !important;
  background: hsl(var(--card, 240 10% 3.9%)) !important;
  border-color: transparent !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

/* ===== CARD DE SELEÇÃO DA COR DA BARRA SUPERIOR (PWA / SAFARI / MOBILE) ===== */
.zpro-theme-color-card {
  background: var(--card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s ease;
}

.dark .zpro-theme-color-card {
  background: var(--card, #0f172a);
  border-color: var(--border, #1e293b);
}

.zpro-theme-color-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.dark .zpro-theme-color-header {
  border-bottom-color: var(--border, #1e293b);
}

.zpro-theme-color-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--foreground, #0f172a);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dark .zpro-theme-color-title {
  color: var(--foreground, #f8fafc);
}

.zpro-theme-color-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.zpro-theme-color-presets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.zpro-theme-preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border, #cbd5e1);
  background: var(--background, #ffffff);
  color: var(--foreground, #334155);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dark .zpro-theme-preset-btn {
  background: var(--background, #1e293b);
  border-color: var(--border, #334155);
  color: var(--foreground, #e2e8f0);
}

.zpro-theme-preset-btn:hover {
  border-color: #6366f1;
  transform: translateY(-1px);
}

.zpro-theme-preset-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  display: inline-block;
}

.zpro-theme-preview-box {
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
  overflow: hidden;
  margin-top: 16px;
  background: var(--background, #ffffff);
}

.dark .zpro-theme-preview-box {
  border-color: var(--border, #1e293b);
  background: var(--background, #0f172a);
}

/* ===== MODAL ELEVENLABS-STYLE RAG URL CRAWL ===== */
.zpro-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 16px;
  animation: zproFadeIn 0.2s ease-out;
}

@keyframes zproFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.zpro-url-modal {
  max-width: 480px;
  width: 100%;
  border-radius: 16px;
  background: #ffffff;
  color: #0f172a;
  padding: 24px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
}

.zpro-url-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.zpro-url-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.zpro-url-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: #f9fafb;
}

.zpro-url-close-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #6b7280;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.15s;
}

.zpro-url-close-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

.zpro-url-tabs {
  display: flex;
  background: #f3f4f6;
  padding: 4px;
  border-radius: 10px;
  margin-top: 20px;
  margin-bottom: 20px;
  gap: 4px;
}

.zpro-url-tab-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.zpro-url-tab-btn.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.zpro-url-label {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 6px;
  display: block;
}

.zpro-url-hint {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
  line-height: 1.4;
}

.zpro-url-input, .zpro-url-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  color: #111827 !important;
  outline: none;
  background: #ffffff !important;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.zpro-url-input:focus, .zpro-url-select:focus {
  border-color: #111827 !important;
}

/* TOGGLE SWITCHES */
.zpro-url-switch-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid #f3f4f6;
  margin-top: 12px;
}

.zpro-url-switch-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.zpro-url-switch-label strong {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.zpro-url-switch-label span {
  font-size: 12px;
  color: #6b7280;
}

.zpro-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.zpro-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.zpro-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #e5e7eb;
  transition: .2s;
  border-radius: 24px;
}

.zpro-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.zpro-switch input:checked + .zpro-slider {
  background-color: #111827;
}

.zpro-switch input:checked + .zpro-slider:before {
  transform: translateX(20px);
}

/* DEPTH SELECTOR */
.zpro-depth-selector {
  display: flex;
  background: #f3f4f6;
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
  margin-top: 6px;
}

.zpro-depth-btn {
  flex: 1;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.zpro-depth-btn.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.zpro-url-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.zpro-url-submit-btn {
  width: 100%;
  background: #000000;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.zpro-url-submit-btn:hover {
  background: #1f2937;
}

/* CRAWL PROGRESS VIEW (IMAGE 4) */
.zpro-crawl-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  background: #ffffff;
  margin-top: 16px;
}

.zpro-crawl-card-header {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 12px;
}

.zpro-crawl-status-line {
  font-size: 13px;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.zpro-crawl-tree {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 20px;
  border-left: 2px solid #e5e7eb;
  margin-left: 12px;
}

.zpro-crawl-tree-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #4b5563;
}

.zpro-crawl-item-label {
  flex: 1;
}

.zpro-crawl-item-val {
  font-weight: 700;
  color: #111827;
}

.zpro-crawl-wait-msg {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  margin-top: 20px;
  margin-bottom: 16px;
}

.zpro-crawl-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.zpro-crawl-cancel-btn {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.zpro-crawl-cancel-btn:hover {
  background: #f9fafb;
}

.zpro-crawl-close-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: #000000;
  color: #ffffff;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.zpro-crawl-close-btn:hover {
  background: #1f2937;
}

/* ===== MODAL ADICIONAR ARQUIVOS RAG ===== */
.zpro-file-dropzone {
  border: 1.5px dashed #d1d5db;
  background: #f9fafb;
  padding: 32px 20px;
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 16px;
  margin-bottom: 20px;
}

.zpro-file-dropzone:hover, .zpro-file-dropzone.dragover {
  border-color: #111827;
  background: #f3f4f6;
}

.zpro-file-dropzone-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
  font-size: 22px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.zpro-file-dropzone-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.zpro-file-dropzone-subtitle {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 14px;
}

.zpro-file-ext-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.zpro-file-ext-badge {
  display: inline-block;
  padding: 3px 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.zpro-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.zpro-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 13px;
}

.zpro-file-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.zpro-file-item-name {
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.zpro-file-item-size {
  font-size: 11px;
  color: #6b7280;
}

.zpro-file-item-remove {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s;
}

.zpro-file-item-remove:hover {
  color: #ef4444;
}

/* ===== ESTILOS DO CONSTRUTOR VISUAL DE WORKFLOWS E CANVAS ===== */

.zpro-wf-canvas-wrap {
  position: relative;
  width: 100%;
  height: 640px;
  background-color: #f8fafc;
  background-image: radial-gradient(#cbd5e1 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}

.zpro-wf-svg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.zpro-wf-nodes-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.zpro-wf-node {
  position: absolute;
  width: 270px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  user-select: none;
  cursor: grab;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.zpro-wf-node:active {
  cursor: grabbing;
}

.zpro-wf-node:hover {
  border-color: #6366f1;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.18);
}

.zpro-wf-node-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
  font-weight: 700;
  font-size: 13px;
}

.zpro-wf-node-start .zpro-wf-node-header {
  background: #f0fdf4;
  color: #15803d;
  border-bottom-color: #dcfce7;
}

.zpro-wf-node-agent .zpro-wf-node-header {
  background: #eff6ff;
  color: #1d4ed8;
  border-bottom-color: #dbeafe;
}

.zpro-wf-node-condition .zpro-wf-node-header {
  background: #fffbeb;
  color: #b45309;
  border-bottom-color: #fef3c7;
}

.zpro-wf-node-transfer .zpro-wf-node-header {
  background: #fdf2f8;
  color: #be185d;
  border-bottom-color: #fce7f3;
}

.zpro-wf-node-body {
  padding: 12px 14px;
  font-size: 12px;
  color: #334155;
  line-height: 1.45;
}

.zpro-wf-node-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #fafafa;
  border-top: 1px solid #f1f5f9;
  border-bottom-left-radius: 11px;
  border-bottom-right-radius: 11px;
}

.zpro-wf-btn-icon {
  background: transparent;
  border: none;
  font-size: 12px;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  color: #64748b;
  transition: background 0.15s, color 0.15s;
}

.zpro-wf-btn-icon:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Modal de Edição de Nós do Workflow */
.zpro-wf-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.zpro-wf-modal-card {
  background: #ffffff;
  border-radius: 14px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  animation: zproWfModalPop 0.2s ease-out;
}

@keyframes zproWfModalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== CATÁLOGO DE FERRAMENTAS IA ===== */
.zpro-ia-tool-card {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s;
}

.zpro-ia-tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
}

.zpro-tools-cat-pill:hover {
  filter: brightness(0.96);
}

/* ===================================================
   🧠 WIDGET ASSISTENTE IAGO & PERSONAGEM BLOUB OFICIAL
   ===========================/* Botão Flutuante Gatilho do IAGO (Formato Circular com Sombra Orgânica) */
#zpro-iago-trigger {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 76px;
  height: 76px;
  border-radius: 50% !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  z-index: 999990;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: zproBloubFloat 3.8s ease-in-out infinite;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

#zpro-iago-trigger canvas {
  border-radius: 50%;
  display: block;
}

#zpro-iago-trigger:hover {
  transform: scale(1.12) translateY(-4px);
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.45));
}

#zpro-iago-trigger:active {
  transform: scale(0.95);
}

@keyframes zproBloubFloat {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

/* Janela Principal do IAGO (Glassmorphism Ultra-Moderno) */
/* =========================================================================
   NOVA INTERFACE DO IAGO: IDENTIDADE VISUAL EXATA (REFERÊNCIA ENVIADA)
   ========================================================================= */

#zpro-iago-trigger {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 76px;
  height: 76px;
  border-radius: 50% !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  z-index: 999990;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: zproBloubFloat 3.8s ease-in-out infinite;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.55));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  user-select: none;
}

#zpro-iago-trigger:hover {
  transform: scale(1.12) translateY(-4px);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.7));
}

#zpro-iago-trigger:active {
  transform: scale(0.95);
}

@keyframes zproBloubFloat {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

/* Janela Principal: Container 100% Transparente com Elementos Flutuantes */
#zpro-iago-window {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 380px;
  max-width: calc(100vw - 36px);
  height: auto;
  max-height: calc(100vh - 60px);
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0;
  overflow: visible;
  z-index: 999991;
  opacity: 0;
  transform: translateY(24px) scale(0.94);
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  color: #f8fafc;
}

#zpro-iago-window.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all !important;
}

/* Botão Fechar Discreto Flutuante no Topo */
.zpro-iago-close-btn {
  position: absolute;
  top: 0px;
  right: 0px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(24, 25, 29, 0.85);
  backdrop-filter: blur(16px);
  color: rgba(255, 255, 255, 0.7);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  z-index: 999999 !important;
  pointer-events: all !important;
}

.zpro-iago-close-btn:hover {
  background: rgba(24, 25, 29, 1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.1);
}

/* Palco Central do Avatar (No Topo Absoluto em Evidência) */
.zpro-iago-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  margin-top: 2px;
}

.zpro-iago-avatar-holder {
  width: 104px;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible !important;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.65));
}

.zpro-iago-avatar-holder canvas {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible !important;
  background: transparent !important;
}

/* Área de Resposta e Mensagens Fluidas (Card Flutuante Escuro com Blur) */
.zpro-iago-speech-bubble {
  width: 100%;
  max-height: 240px;
  overflow-y: auto;
  margin-top: 14px;
  padding: 16px 18px;
  background: rgba(24, 25, 29, 0.92);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  font-size: 13px;
  line-height: 1.5;
  color: #e2e8f0;
  text-align: left;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.05);
}

.zpro-iago-speech-bubble:empty {
  display: none;
}

/* Sugestões Rápidas em Linha Única Horizontal (Carrossel Compacto) */
.zpro-iago-horizontal-chips {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 6px 0 10px 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 2px;
}

.zpro-iago-horizontal-chips::-webkit-scrollbar {
  display: none;
}

.zpro-iago-vchip {
  background: rgba(30, 32, 38, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.zpro-iago-vchip:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 12px rgba(56, 189, 248, 0.3);
}

.zpro-iago-vchip:active {
  transform: scale(0.96);
}

/* Animações Escalonadas dos Componentes ao Abrir o IAGO */
#zpro-iago-window.active .zpro-iago-speech-bubble {
  animation: zproSlideInUp 0.44s cubic-bezier(0.16, 1, 0.3, 1) 0.08s backwards;
}

#zpro-iago-window.active .zpro-iago-horizontal-chips {
  animation: zproSlideInUp 0.44s cubic-bezier(0.16, 1, 0.3, 1) 0.16s backwards;
}

#zpro-iago-window.active .zpro-iago-capsule-container {
  animation: zproSlideInUp 0.44s cubic-bezier(0.16, 1, 0.3, 1) 0.22s backwards;
}

#zpro-iago-window.active .zpro-iago-close-btn {
  animation: zproFadeIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) 0.18s backwards;
}

@keyframes zproSlideInUp {
  0% { opacity: 0; transform: translateY(24px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes zproFadeIn {
  0% { opacity: 0; transform: scale(0.7); }
  100% { opacity: 1; transform: scale(1); }
}

/* Barra de Entrada Unificada: Cápsula Horizontal com Aurora Glow */
.zpro-iago-capsule-container {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.zpro-iago-capsule-bar {
  width: 100%;
  height: 52px;
  border-radius: 26px;
  background: #0f1014;
  border: 1px solid rgba(56, 189, 248, 0.35);
  display: flex;
  align-items: center;
  padding: 4px 8px 4px 8px;
  gap: 10px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 18px rgba(56, 189, 248, 0.15);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.zpro-iago-capsule-bar:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 24px rgba(56, 189, 248, 0.3);
}

.zpro-iago-capsule-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13.5px;
  color: #ffffff;
  font-family: inherit;
  padding: 0 4px;
}

.zpro-iago-capsule-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.zpro-iago-capsule-mic-btn,
.zpro-iago-capsule-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.zpro-iago-capsule-mic-btn:hover,
.zpro-iago-capsule-send-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.08);
}

/* O listening NUNCA deve aparecer no modo texto */
.zpro-iago-listening-wave {
  display: none !important;
}

/* Botão preenchendo toda a barra no Modo Ligação */
.zpro-iago-call-btn-content {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 600;
  font-size: 14.5px;
  width: 100%;
  height: 100%;
  user-select: none;
}

/* =========================================================================
   MODO LIGAÇÃO DO IAGO (VOICE CALL MODE)
   ========================================================================= */

#zpro-iago-window.mode-call {
  height: auto !important;
  justify-content: flex-end;
  gap: 16px;
}

#zpro-iago-window.mode-call .zpro-iago-stage {
  margin-top: 10px;
  width: 100%;
}

/* Avatar Ampliado em Destaque Imersivo no Modo Ligação (220px) */
#zpro-iago-window.mode-call .zpro-iago-avatar-holder {
  width: 220px !important;
  height: 220px !important;
  margin: 12px auto 16px auto !important;
  cursor: pointer !important;
  pointer-events: all !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  filter: drop-shadow(0 24px 52px rgba(0, 0, 0, 0.9));
}

/* Oculta 100% de TUDO da aba de texto no Modo Ligação */
#zpro-iago-window.mode-call .zpro-iago-speech-bubble,
#zpro-iago-window.mode-call #zpro-iago-speech-bubble,
#zpro-iago-window.mode-call .zpro-iago-horizontal-chips,
#zpro-iago-window.mode-call #zpro-iago-chips,
#zpro-iago-window.mode-call .zpro-iago-vchip,
#zpro-iago-window.mode-call .zpro-iago-quickview,
#zpro-iago-window.mode-call #zpro-iago-call-quickview,
#zpro-iago-window.mode-call .zpro-iago-top-actions,
#zpro-iago-window.mode-call .zpro-iago-header-actions,
#zpro-iago-window.mode-call .zpro-iago-call-pane {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Legenda Dinâmica Palavra por Palavra no Modo Ligação */
.zpro-iago-call-caption-box {
  display: none;
}

#zpro-iago-window.mode-call .zpro-iago-call-caption-box {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  max-height: 76px;
  margin: 0 auto 14px auto;
  padding: 0 16px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  pointer-events: none;
}

#zpro-iago-window.mode-call .zpro-iago-call-caption-text {
  font-size: 15.5px;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.45;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
  letter-spacing: -0.01em;
  word-break: break-word;
  display: inline-block;
  transition: all 0.15s ease;
}

#zpro-iago-window.mode-call .zpro-iago-caption-placeholder {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13.5px;
  font-style: italic;
}

#zpro-iago-window.mode-call .zpro-iago-caption-word {
  display: inline-block;
  animation: zproWordPop 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  margin-right: 4.5px;
}

@keyframes zproWordPop {
  0% { opacity: 0; transform: translateY(6px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* No Modo Ligação, a Barra de Cápsula vira um Botão Vermelho Único Preenchendo Toda a Barra */
#zpro-iago-window.mode-call .zpro-iago-capsule-container {
  display: flex !important;
  margin-top: 0;
  width: 100%;
}

#zpro-iago-window.mode-call .zpro-iago-capsule-bar {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  border: 1px solid #fca5a5 !important;
  box-shadow: 0 10px 32px rgba(239, 68, 68, 0.55), 0 0 22px rgba(239, 68, 68, 0.4) !important;
  justify-content: center !important;
  cursor: pointer !important;
  height: 56px;
  border-radius: 28px;
  padding: 0 16px;
  animation: zproMicPulse 1.6s infinite;
}

#zpro-iago-window.mode-call .zpro-iago-capsule-input,
#zpro-iago-window.mode-call .zpro-iago-capsule-mic-btn,
#zpro-iago-window.mode-call .zpro-iago-capsule-send-btn {
  display: none !important;
}

#zpro-iago-window.mode-call .zpro-iago-call-btn-content {
  display: flex;
}

@keyframes zproMicPulse {
  0% { transform: scale(1); box-shadow: 0 10px 32px rgba(239, 68, 68, 0.55), 0 0 15px rgba(239, 68, 68, 0.35); }
  50% { transform: scale(1.02); box-shadow: 0 14px 40px rgba(239, 68, 68, 0.7), 0 0 30px rgba(239, 68, 68, 0.55); }
  100% { transform: scale(1); box-shadow: 0 10px 32px rgba(239, 68, 68, 0.55), 0 0 15px rgba(239, 68, 68, 0.35); }
}

.zpro-iago-voice-mic-trigger {
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.35);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.zpro-iago-voice-mic-trigger:hover {
  transform: scale(1.08);
  background: #0284c7;
}

.zpro-iago-voice-mic-trigger.recording {
  background: #ef4444 !important;
  animation: zproVoicePulse 1.4s infinite;
}

@keyframes zproVoicePulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 16px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Área de Mensagens (Modo Texto) */
.zpro-iago-messages {
  flex: 1;
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
}

.zpro-iago-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  font-size: 13.5px;
  line-height: 1.5;
  animation: zproIagoFadeIn 0.25s ease-out;
}

@keyframes zproIagoFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.zpro-iago-msg.user {
  align-self: flex-end;
}

.zpro-iago-msg.assistant {
  align-self: flex-start;
}

.zpro-iago-bubble {
  padding: 11px 16px;
  border-radius: 18px;
  word-break: break-word;
}

.zpro-iago-msg.user .zpro-iago-bubble {
  background: #0f172a;
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.zpro-iago-msg.assistant .zpro-iago-bubble {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* Sugestões Rápidas */
.zpro-iago-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 10px 16px;
}

.zpro-iago-chip {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.zpro-iago-chip:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* Footer / Input de Texto */
.zpro-iago-footer {
  padding: 12px 16px 16px 16px;
  background: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 8px;
}

.zpro-iago-input {
  flex: 1;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 13.5px;
  outline: none;
  transition: all 0.15s ease;
}

.zpro-iago-input:focus {
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

.zpro-iago-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #0f172a;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.zpro-iago-send-btn:hover {
  background: #0284c7;
  transform: scale(1.08);
}

/* Dark mode do ZPRO */
.dark #zpro-iago-window {
  background: rgba(15, 23, 42, 0.94);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 60px -15px rgba(0, 0, 0, 0.6);
}

.dark .zpro-iago-header {
  background: rgba(15, 23, 42, 0.7);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.dark .zpro-iago-title-area h4 {
  color: #f8fafc;
}

.dark .zpro-iago-mode-switcher {
  background: #1e293b;
}

.dark .zpro-iago-mode-btn.active {
  background: #334155;
  color: #ffffff;
}

.dark .zpro-iago-close-btn {
  background: #1e293b;
  color: #94a3b8;
}

.dark .zpro-iago-msg.assistant .zpro-iago-bubble {
  background: #1e293b;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.08);
}

.dark .zpro-iago-footer {
  background: rgba(15, 23, 42, 0.7);
  border-top-color: rgba(255, 255, 255, 0.08);
}

.dark .zpro-iago-input {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

.dark .zpro-iago-audio-visualizer-card {
  background: #1e293b;
}

/* Botões de Ação e Navegação do IAGO */
.zpro-iago-action-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  margin: 6px 2px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

.zpro-iago-action-nav-btn:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.dark .zpro-iago-action-nav-btn {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  border-color: rgba(255, 255, 255, 0.15);
}

.dark .zpro-iago-action-nav-btn:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

/* Badges de Cores do IAGO */
.zpro-iago-color-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.05);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 600;
  vertical-align: middle;
  margin: 0 2px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.dark .zpro-iago-color-badge {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

/* Gráficos de Barra e Métricas do IAGO */
.zpro-iago-chart-container {
  margin: 10px 0;
  padding: 12px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.dark .zpro-iago-chart-container {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.zpro-iago-chart-row {
  margin-bottom: 8px;
}

.zpro-iago-chart-row:last-child {
  margin-bottom: 0;
}

.zpro-iago-chart-header {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  margin-bottom: 3px;
  color: inherit;
}

.zpro-iago-chart-track {
  height: 8px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.dark .zpro-iago-chart-track {
  background: rgba(255, 255, 255, 0.1);
}

.zpro-iago-chart-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Grid de Métricas / KPIs */
.zpro-iago-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.zpro-iago-kpi-card {
  padding: 10px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  text-align: center;
}

.dark .zpro-iago-kpi-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.zpro-iago-kpi-val {
  font-size: 18px;
  font-weight: 700;
  color: #0284c7;
}

.dark .zpro-iago-kpi-val {
  color: #38bdf8;
}

.zpro-iago-kpi-label {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 3px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dark .zpro-iago-kpi-label {
  color: #94a3b8;
}

.zpro-iago-kpi-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 4px;
  font-style: italic;
}

.dark .zpro-iago-kpi-sub {
  color: rgba(255, 255, 255, 0.5);
}

/* =============================================================================
   MÉTRICA DE SAÚDE DO PIPELINE, GARGALOS, MoM E PLAYBOOK DE REVERSÃO (FUNIL)
   Exclusivo para Supervisores e Administradores em /funil/dashboard
   ============================================================================= */

.zpro-funnel-health-section {
  width: 100%;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  transition: all 0.2s ease;
}

.dark .zpro-funnel-health-section {
  border-color: #1e293b;
  background: #0f172a;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
}

.zpro-health-header-bar {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.04) 0%, rgba(14, 165, 233, 0.04) 100%);
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dark .zpro-health-header-bar {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(14, 165, 233, 0.08) 100%);
  border-color: #1e293b;
}

.zpro-health-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.zpro-health-icon-box {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
  flex-shrink: 0;
}

.zpro-health-badge-super {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.dark .zpro-health-badge-super {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

.zpro-health-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.zpro-health-select {
  height: 2.25rem;
  padding: 0 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  color: #0f172a;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dark .zpro-health-select {
  background-color: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

.zpro-health-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.zpro-health-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.25rem;
  padding: 0 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dark .zpro-health-btn-action {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

.zpro-health-btn-action:hover {
  background-color: #f1f5f9;
  border-color: #94a3b8;
}

.dark .zpro-health-btn-action:hover {
  background-color: #334155;
  color: #ffffff;
}

/* Scorecard & Top Gauges */
.zpro-health-score-container {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .zpro-health-score-container {
    grid-template-columns: 340px 1fr;
  }
}

.zpro-score-main-card {
  padding: 1.5rem;
  border-radius: 0.875rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.dark .zpro-score-main-card {
  background: #131d31;
  border-color: #1e293b;
}

.zpro-score-gauge-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 1rem;
  background: conic-gradient(var(--score-color, #10b981) calc(var(--score-val, 80) * 1%), #e2e8f0 0);
  padding: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.dark .zpro-score-gauge-ring {
  background: conic-gradient(var(--score-color, #10b981) calc(var(--score-val, 80) * 1%), #1e293b 0);
}

.zpro-score-gauge-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dark .zpro-score-gauge-inner {
  background: #0f172a;
}

.zpro-score-number {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.dark .zpro-score-number {
  color: #f8fafc;
}

.zpro-score-max {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
}

.zpro-score-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 700;
  border: 1px solid transparent;
}

/* Pilares de Saúde */
.zpro-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.zpro-pillar-card {
  padding: 1rem 1.15rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.dark .zpro-pillar-card {
  background: #1e293b;
  border-color: #334155;
}

.zpro-pillar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.zpro-pillar-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.dark .zpro-pillar-title {
  color: #94a3b8;
}

.zpro-pillar-val {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
}

.dark .zpro-pillar-val {
  color: #f8fafc;
}

.zpro-pillar-sub {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.dark .zpro-pillar-sub {
  color: #94a3b8;
}

.zpro-progress-bar-bg {
  width: 100%;
  height: 0.4rem;
  border-radius: 9999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: 0.6rem;
}

.dark .zpro-progress-bar-bg {
  background: #334155;
}

.zpro-progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s ease;
}

/* Month over Month (MoM) Comparison Grid */
.zpro-mom-section {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.zpro-section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.dark .zpro-section-title-bar {
  border-color: #1e293b;
}

.zpro-section-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dark .zpro-section-title {
  color: #f8fafc;
}

.zpro-mom-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.875rem;
}

.zpro-mom-kpi-card {
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  position: relative;
}

.dark .zpro-mom-kpi-card {
  background: #1e293b;
  border-color: #334155;
}

.zpro-mom-kpi-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.dark .zpro-mom-kpi-label {
  color: #94a3b8;
}

.zpro-mom-kpi-values {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.zpro-mom-kpi-current {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.dark .zpro-mom-kpi-current {
  color: #f8fafc;
}

.zpro-mom-delta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.7rem;
  font-weight: 700;
}

.zpro-mom-delta-up {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.dark .zpro-mom-delta-up {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.zpro-mom-delta-down {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.dark .zpro-mom-delta-down {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.zpro-mom-delta-neutral {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}

.dark .zpro-mom-delta-neutral {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
}

.zpro-mom-prev-label {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.35rem;
}

.dark .zpro-mom-prev-label {
  color: #64748b;
}

/* Bottlenecks Stage Table & Diagnostics */
.zpro-bottleneck-section {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.zpro-bottlenecks-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
}

.dark .zpro-bottlenecks-table-wrap {
  border-color: #334155;
}

.zpro-bottlenecks-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  text-align: left;
}

.zpro-bottlenecks-table th {
  background: #f8fafc;
  padding: 0.75rem 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}

.dark .zpro-bottlenecks-table th {
  background: #1e293b;
  color: #94a3b8;
  border-color: #334155;
}

.zpro-bottlenecks-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.dark .zpro-bottlenecks-table td {
  border-color: #1e293b;
  color: #e2e8f0;
}

.zpro-bottlenecks-table tr:last-child td {
  border-bottom: none;
}

.zpro-bottlenecks-table tr:hover td {
  background: #f8fafc;
}

.dark .zpro-bottlenecks-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.zpro-stage-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.zpro-risk-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.zpro-risk-critical {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.dark .zpro-risk-critical {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

.zpro-risk-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.dark .zpro-risk-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

.zpro-risk-healthy {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.dark .zpro-risk-healthy {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

/* Playbook de Reversão de Cenário */
.zpro-reversal-section {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.zpro-reversal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.zpro-reversal-card {
  padding: 1.25rem;
  border-radius: 0.875rem;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.dark .zpro-reversal-card {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-color: #334155;
}

.zpro-reversal-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.zpro-reversal-badge-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.zpro-reversal-item-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.15rem;
}

.dark .zpro-reversal-item-title {
  color: #f8fafc;
}

.zpro-reversal-diag-text {
  font-size: 0.775rem;
  color: #64748b;
  line-height: 1.4;
}

.dark .zpro-reversal-diag-text {
  color: #94a3b8;
}

.zpro-reversal-actions-box {
  margin-top: 0.25rem;
  padding: 0.85rem;
  border-radius: 0.5rem;
  background: rgba(79, 70, 229, 0.04);
  border: 1px solid rgba(79, 70, 229, 0.15);
}

.dark .zpro-reversal-actions-box {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.25);
}

.zpro-reversal-action-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.775rem;
  color: #334155;
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.dark .zpro-reversal-action-item {
  color: #cbd5e1;
}

.zpro-reversal-action-item:last-child {
  margin-bottom: 0;
}

.zpro-reversal-action-item input[type="checkbox"] {
  margin-top: 0.15rem;
  cursor: pointer;
  accent-color: #4f46e5;
}

/* Multi-pipeline overview cards */
.zpro-all-pipelines-section {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.zpro-pipelines-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.zpro-pipeline-card-item {
  padding: 1.15rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dark .zpro-pipeline-card-item {
  background: #1e293b;
  border-color: #334155;
}

.zpro-pipeline-card-item:hover {
  border-color: #6366f1;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(99, 102, 241, 0.12);
}

.zpro-pipeline-card-item.active {
  border-color: #4f46e5;
  background: rgba(79, 70, 229, 0.03);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.dark .zpro-pipeline-card-item.active {
  background: rgba(99, 102, 241, 0.1);
  border-color: #818cf8;
}




