/* Iris CRM - Estilos da extensao (base visual do CRM web). Copiado de whatsapp-crm/extension/content.css */

/* ==========================================
   VARIÁVEIS E RESET
   ========================================== */

:root {
  --iris-primary: #25D366;
  --iris-primary-dark: #128C7E;
  --iris-secondary: #075E54;
  --iris-bg: #ffffff;
  --iris-bg-secondary: #f0f2f5;
  --iris-bg-dark: #111b21;
  --iris-text: #111b21;
  --iris-text-secondary: #667781;
  --iris-text-light: #ffffff;
  --iris-border: #e9edef;
  --iris-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --iris-radius: 8px;
  --iris-menu-height: 52px;
  --iris-panel-width: 480px;
}

/* ==========================================
   MENU HORIZONTAL NO TOPO
   ========================================== */

.iris-menu-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--iris-menu-height);
  background: linear-gradient(180deg, #1fa855 0%, #6bfca3 100%);
  display: none;
  flex-direction: row;
  align-items: center;
  z-index: 10001;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 16px rgba(0, 0, 0, 0.3);
  padding: 0 12px;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Modo escuro: barra com azul escuro (estilo antigo) */
/* body.dark .iris-menu-bar {
  background: linear-gradient(180deg, #18293C 0%, #18293C 100%);
} */

/* Logo */
.iris-menu-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.iris-menu-logo .logo-icon {
  font-size: 16.8px;
  color: white;
}

.iris-menu-logo .logo-text {
  font-size: 18.6px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1.4px;
}

.iris-menu-logo:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.22);
}

/* Container dos itens do menu */
.iris-menu-items {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  margin-left: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.iris-menu-items::-webkit-scrollbar {
  display: none;
}

/* Item do menu */
.iris-menu-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.iris-menu-item .menu-icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.iris-menu-item .menu-label {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
  letter-spacing: 0.2px;
}

.iris-menu-item:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.iris-menu-item.active {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}

.iris-menu-item.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px 2px 0 0;
}

/* Logout button */
.iris-btn-logout {
  color: rgba(255, 255, 255, 0.85) !important;
}
.iris-btn-logout:hover {
  color: #fca5a5 !important;
  background: rgba(255, 255, 255, 0.15) !important;
}

/* Container direito (Configurações + Status) */
.iris-menu-right {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Separador visual antes da area direita */
.iris-menu-right::before {
  content: '';
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  margin-right: 6px;
}

/* Status no menu */
.iris-menu-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.iris-menu-status .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #555;
}

.iris-menu-status .status-dot.online {
  background: #25D366;
  box-shadow: 0 0 5px #25D366, 0 0 10px rgba(37, 211, 102, 0.5);
  animation: iris-pulse 2s ease-in-out infinite;
}

@keyframes iris-pulse {
  0%, 100% { box-shadow: 0 0 4px #25D366, 0 0 8px rgba(37, 211, 102, 0.3); }
  50%      { box-shadow: 0 0 6px #25D366, 0 0 14px rgba(37, 211, 102, 0.6); }
}

.iris-menu-status .status-text {
  font-size: 11px;
  color: #ffffff;
  font-weight: 600;
  text-shadow: 0 0 4px rgba(37, 211, 102, 0.4);
}

/* ==========================================
   PAINEL DE CONTEÚDO (OVERLAY/FLOATING)
   ========================================== */

/* Backdrop - fundo escurecido atrás do painel */
.iris-backdrop {
  position: fixed;
  top: var(--iris-menu-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.iris-backdrop.visible {
  opacity: 1;
  visibility: visible;
}

/* Painel flutuante */
.iris-panel {
  position: fixed;
  top: var(--iris-menu-height);
  left: 0;
  width: var(--iris-panel-width);
  height: calc(100vh - var(--iris-menu-height));
  background: var(--iris-bg);
  border-right: 1px solid var(--iris-border);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
}

.iris-panel.open {
  transform: translateX(0);
}

/* Header do painel */
.iris-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--iris-primary), var(--iris-primary-dark));
  color: white;
  min-height: 59px;
  box-sizing: border-box;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title .panel-icon {
  font-size: 18px;
  color: var(--iris-primary);
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.iris-panel-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.iris-panel-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Busca */
.iris-panel-search {
  padding: 12px 16px;
  background: var(--iris-bg-secondary);
  border-bottom: 1px solid var(--iris-border);
  position: relative;
}

.iris-panel-search::before {
  content: '\f002';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: #aebac1;
  font-size: 13px;
  z-index: 1;
  pointer-events: none;
}

.iris-panel-search input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 1px solid var(--iris-border);
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  background: var(--iris-bg);
  transition: all 0.2s;
  box-sizing: border-box;
}

.iris-panel-search input:focus {
  border-color: var(--iris-primary);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

/* Conteúdo */
.iris-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* Footer do painel */
.iris-panel-footer {
  padding: 12px 16px;
  background: var(--iris-bg-secondary);
  border-top: 1px solid var(--iris-border);
}

.iris-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--iris-text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ccc;
}

.status-dot.online {
  background: var(--iris-primary);
  box-shadow: 0 0 6px var(--iris-primary);
}

.status-dot.offline {
  background: #dc3545;
}

/* User Info Section */
.iris-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border-radius: 12px;
  margin-bottom: 12px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  color: white;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.user-name {
  font-weight: 600;
  color: white;
  font-size: 16px;
}

.user-email {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================
   BOTÃO TOGGLE (mantido para compatibilidade)
   ========================================== */

.status-dot.loading {
  background: #ffc107;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ==========================================
   BOTÃO TOGGLE (LEGADO - NÃO UTILIZADO)
   ========================================== */

.iris-toggle-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--iris-primary), var(--iris-primary-dark));
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.iris-toggle-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.iris-toggle-fab.active {
  background: var(--iris-secondary);
}

/* ==========================================
   SIDEBAR FLUTUANTE LATERAL (CHAT)
   Barra vertical de icones ao lado esquerdo do chat
   ========================================== */

.iris-chat-sidebar {
  position: fixed;
  /* left e bottom sao definidos dinamicamente via JS */
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 10000;
  transition: opacity 0.2s ease;
}

/* Container dos itens - recolhido por padrão */
.iris-csb-items {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease,
              transform 0.3s ease;
  transform: translateY(10px);
}

/* Quando expandido */
.iris-chat-sidebar.expanded .iris-csb-items {
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
  margin-bottom: 4px;
}

/* Botões de ação */
.iris-csb-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #54656f;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  position: relative;
}

.iris-csb-btn:hover {
  background: var(--iris-primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(37, 211, 102, 0.35);
}

.iris-csb-btn:active {
  transform: scale(0.95);
}

/* Tooltip ao passar o mouse */
.iris-csb-btn::after {
  content: attr(title);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: #333;
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10001;
}

.iris-csb-btn:hover::after {
  opacity: 1;
}

/* Botão toggle principal (Iris logo) */
.iris-csb-toggle {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: all 0.25s ease;
  flex-shrink: 0;
  padding: 0;
  overflow: visible;
  position: relative;
}

/* Efeito de pulso circular para evidenciar que e um menu */
.iris-csb-toggle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.2);
  transform: translate(-50%, -50%) scale(1);
  animation: iris-pulse-ring 2.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes iris-pulse-ring {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  50% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

/* Parar animacao quando expandido */
.iris-chat-sidebar.expanded .iris-csb-toggle::before {
  animation: none;
  opacity: 0;
}

.iris-csb-toggle:hover {
  transform: scale(1.1);
}

.iris-csb-toggle:active {
  transform: scale(0.95);
}

/* Logo dentro do botão toggle */
.iris-csb-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
}

/* Modo escuro */
body.dark .iris-csb-btn {
  background: rgba(42, 57, 66, 0.95);
  color: #aebac1;
}

body.dark .iris-csb-btn:hover {
  background: var(--iris-primary);
  color: #fff;
}

body.dark .iris-csb-btn::after {
  background: #111b21;
  color: #e9edef;
}

/* ==========================================
   SEÇÕES E LISTAS
   ========================================== */

.iris-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.iris-section-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--iris-text);
  margin: 0;
}

.iris-subheader {
  font-size: 12px;
  font-weight: 600;
  color: var(--iris-text-secondary);
  margin: 16px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.iris-btn-add {
  padding: 6px 12px;
  background: var(--iris-primary);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.iris-btn-add:hover {
  background: var(--iris-primary-dark);
  transform: translateY(-1px);
}

.iris-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.iris-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--iris-bg-secondary);
  border-radius: var(--iris-radius);
  cursor: pointer;
  transition: all 0.2s;
}

.iris-item:hover {
  background: #e8f5e9;
  transform: translateX(2px);
}

/* Empty State */
.iris-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--iris-text-secondary);
}

.iris-empty .empty-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.35;
  color: var(--iris-primary);
}

.iris-empty p {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--iris-text);
}

.iris-empty small {
  font-size: 13px;
}

.iris-empty-small {
  text-align: center;
  padding: 16px;
  color: var(--iris-text-secondary);
  font-size: 13px;
}

/* ==========================================
   TEMPLATES
   ========================================== */

.template-item {
  flex-direction: column;
  align-items: stretch;
}

.item-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-shortcut {
  background: var(--iris-primary);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.template-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--iris-text);
}

.item-preview {
  font-size: 13px;
  color: var(--iris-text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}

.item-actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.item-actions button {
  padding: 6px 10px;
  background: white;
  border: 1px solid var(--iris-border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  color: #667781;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
}

.item-actions button:hover {
  background: var(--iris-bg-secondary);
  color: var(--iris-primary);
}

.btn-delete:hover,
.btn-delete-contact:hover {
  background: #ffebee !important;
  border-color: #ef5350 !important;
  color: #ef5350 !important;
}

.btn-chat:hover {
  background: #e8f5e9 !important;
  border-color: var(--iris-primary) !important;
  color: var(--iris-primary) !important;
}

/* ==========================================
   CONTATOS
   ========================================== */

.contact-item {
  gap: 10px;
}

.contact-item.mini {
  padding: 8px 12px;
}

.contact-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--iris-primary), var(--iris-primary-dark));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.contact-info {
  flex: 1;
  min-width: 0;
}

.contact-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--iris-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-phone {
  display: block;
  font-size: 12px;
  color: var(--iris-text-secondary);
  margin-top: 2px;
}

.contact-category {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Categorias */
.cat-lead { background: #e9edef; color: #111b21; }
.cat-cliente { background: #e9edef; color: #111b21; }
.cat-vip { background: #e9edef; color: #111b21; }
.cat-fornecedor { background: #e9edef; color: #111b21; }
.cat-parceiro { background: #e9edef; color: #111b21; }
.cat-inativo { background: #e9edef; color: #111b21; }
.cat-default { background: #e9edef; color: #111b21; }

/* Filters */
.iris-filters {
  margin-bottom: 12px;
}

.iris-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--iris-border);
  border-radius: var(--iris-radius);
  font-size: 13px;
  background: white !important;
  color: #333 !important;
  cursor: pointer;
  outline: none;
  color-scheme: light;
  -webkit-appearance: menulist;
  appearance: menulist;
}

.iris-select option {
  background: white !important;
  color: #333 !important;
  padding: 6px 12px;
}

.iris-select option:checked,
.iris-select option:hover {
  background: var(--iris-primary) !important;
  color: white !important;
}

.iris-select:focus {
  border-color: var(--iris-primary);
}

/* Garantir que todos os selects do sistema tenham options com fundo branco */
.iris-footer-popup select option,
.iris-ia-container select option,
.autoatendimento-editor select option,
.iris-funil-modal select option,
.iris-modal select option,
.contacts-filter-select option {
  background: #ffffff !important;
  color: #1a2e35 !important;
}

.iris-footer-popup select option:checked,
.iris-ia-container select option:checked,
.autoatendimento-editor select option:checked,
.iris-funil-modal select option:checked,
.iris-modal select option:checked,
.contacts-filter-select option:checked {
  background: var(--iris-primary) !important;
  color: #ffffff !important;
}

/* Forçar tema claro em TODOS os selects do Iris */
.iris-footer-popup select,
.iris-ia-container select,
.autoatendimento-editor select,
.iris-funil-modal select,
.iris-modal select,
.iris-panel select,
select.iris-select,
select.ia-select-compact,
select.contacts-filter-select {
  background: #ffffff !important;
  color: #1a2e35 !important;
  color-scheme: light !important;
}

/* ==========================================
   AGENDAMENTOS
   ========================================== */

.schedule-item {
  gap: 10px;
}

.schedule-item.pending {
  border-left: 3px solid #ffc107;
}

.schedule-item.sent {
  opacity: 0.6;
  border-left: 3px solid var(--iris-primary);
}

.schedule-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 50px;
}

.schedule-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--iris-text);
}

.schedule-hour {
  font-size: 11px;
  color: var(--iris-text-secondary);
}

.schedule-info {
  flex: 1;
  min-width: 0;
}

.schedule-phone {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--iris-text);
}

.schedule-preview {
  display: block;
  font-size: 12px;
  color: var(--iris-text-secondary);
  margin-top: 2px;
}

/* ==========================================
   TAGS
   ========================================== */

.iris-tags-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.iris-tag-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  border-radius: var(--iris-radius);
  cursor: pointer;
  transition: all 0.2s;
}

.iris-tag-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--iris-shadow);
}

.tag-name {
  font-size: 12px;
  font-weight: 600;
}

.tag-count {
  font-size: 20px;
  font-weight: 700;
  margin-top: 4px;
}

.tag-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tag-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tag-card-actions {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.tag-card-actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--iris-text-secondary);
  transition: all 0.15s;
}

.tag-card-actions button:hover {
  background: rgba(0,0,0,0.08);
  color: #111b21;
}

/* Etiquetas Overlay */
.tags-overlay-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px 0;
}

.tag-overlay-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--iris-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 0;
}

.tag-overlay-card:hover {
  background: #f8f9fa;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.tag-overlay-card.expanded {
  border-radius: 10px 10px 0 0;
  border-bottom-color: transparent;
}

.tag-overlay-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tag-overlay-name {
  font-weight: 600;
  font-size: 14px;
  color: #111b21;
}

.tag-overlay-count {
  font-size: 11px;
  color: var(--iris-text-secondary);
  background: rgba(0,0,0,0.06);
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 500;
}

.tag-overlay-actions {
  display: flex;
  gap: 2px;
}

.tag-overlay-actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--iris-text-secondary);
  transition: all 0.15s;
}

.tag-overlay-actions button:hover {
  background: rgba(0,0,0,0.08);
  color: #111b21;
}

.tag-overlay-contacts {
  grid-column: 1 / -1;
  background: #ffffff;
  border: 1px solid var(--iris-border);
  border-radius: 10px;
  padding: 8px 18px 14px 24px;
  margin-bottom: 2px;
}

.tag-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  color: #111b21;
  border-bottom: 1px solid var(--iris-border);
}

.tag-contact-item:last-child {
  border-bottom: none;
}

.tag-contact-phone {
  color: var(--iris-text-secondary);
  font-size: 12px;
  flex: 1;
}

.tag-contact-item .btn-chat {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--iris-text-secondary);
  font-size: 13px;
  transition: all 0.15s;
}

.tag-contact-item .btn-chat:hover {
  color: var(--iris-primary);
  background: rgba(0,0,0,0.06);
}

/* Tag badges nos contatos */
.contact-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-top: 4px;
}

.contact-card-tags {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--iris-border);
}

.contact-tag-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* Tag input (digitar e Enter) no modal de contato */
.contact-tags-input-area {
  width: 100%;
}

.contact-tags-input-area .iris-input {
  margin-bottom: 8px;
}

.contact-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 8px;
}

.contact-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
}

.contact-tag-remove {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 11px;
  padding: 0;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.contact-tag-remove:hover {
  opacity: 1;
}

/* Color picker no modal de tag */
.tag-color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag-color-option {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}

.tag-color-option:hover {
  transform: scale(1.15);
}

.tag-color-option.selected {
  border-color: var(--iris-primary);
  box-shadow: 0 0 0 2px white, 0 0 0 4px var(--iris-primary);
}

.tag-color-custom {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  background: none;
}

/* ==========================================
   CONFIGURAÇÕES
   ========================================== */

.iris-settings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--iris-bg-secondary);
  border-radius: var(--iris-radius);
}

.setting-item.column {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.setting-info {
  flex: 1;
}

.setting-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--iris-text);
}

.setting-desc {
  display: block;
  font-size: 12px;
  color: var(--iris-text-secondary);
  margin-top: 2px;
}

/* Switch Toggle */
.switch {
  position: relative;
  width: 44px;
  height: 24px;
}

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

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

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--iris-primary);
}

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

/* Stats */
.iris-stats {
  display: flex;
  gap: 8px;
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 12px;
  background: var(--iris-bg-secondary);
  border-radius: var(--iris-radius);
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--iris-primary);
}

.stat-label {
  display: block;
  font-size: 11px;
  color: var(--iris-text-secondary);
  margin-top: 2px;
}

/* ==========================================
   INPUTS E BOTÕES
   ========================================== */

.iris-input,
.iris-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--iris-border);
  border-radius: var(--iris-radius);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.iris-input:focus,
.iris-textarea:focus {
  border-color: var(--iris-primary);
}

.iris-textarea {
  resize: vertical;
  min-height: 80px;
}

.iris-btn {
  width: 100%;
  padding: 10px 16px;
  background: var(--iris-primary);
  color: white;
  border: none;
  border-radius: var(--iris-radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.iris-btn:hover {
  background: var(--iris-primary-dark);
}

.iris-btn.secondary {
  background: var(--iris-bg-secondary);
  color: var(--iris-text);
  border: 1px solid var(--iris-border);
}

.iris-btn.secondary:hover {
  background: var(--iris-border);
}

.iris-btn.primary {
  background: var(--iris-primary);
}

.iris-btn.danger {
  background: #dc3545;
}

.iris-btn.danger:hover {
  background: #c82333;
}

/* Backup / Restaurar */
.iris-hint {
  font-size: 12px;
  color: #8696a0;
  margin: 4px 0 12px;
  line-height: 1.4;
}

.iris-backup-actions {
  display: flex;
  gap: 8px;
}

/* ==========================================
   DROPDOWN DE PRIVACIDADE & TOGGLE SWITCHES
   ========================================== */

.iris-dropdown-section {
  margin-top: 20px;
  border: 1px solid var(--iris-border);
  border-radius: var(--iris-radius);
  overflow: hidden;
  background: var(--iris-bg);
}

.iris-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  background: var(--iris-bg-secondary);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}

.iris-dropdown-header:hover {
  background: #e9edef;
}

.iris-dropdown-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--iris-text);
}

.iris-dropdown-title i {
  color: var(--iris-primary);
  font-size: 16px;
}

.iris-dropdown-arrow {
  color: var(--iris-text-secondary);
  font-size: 12px;
  transition: transform 0.3s;
}

.iris-dropdown-section.open .iris-dropdown-arrow {
  transform: rotate(180deg);
}

.iris-dropdown-body {
  border-top: 1px solid var(--iris-border);
}

.iris-toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--iris-border);
  transition: background 0.15s;
  min-height: 48px;
  box-sizing: border-box;
}

.iris-toggle-item:last-child {
  border-bottom: none;
}

.iris-toggle-item:hover {
  background: var(--iris-bg-secondary);
}

.iris-toggle-label {
  font-size: 13.5px;
  color: var(--iris-text);
  user-select: none;
  line-height: 1.3;
  flex: 1;
  margin-right: 12px;
}

/* Toggle Switch */
.iris-toggle {
  position: relative;
  display: block;
  width: 44px;
  min-width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.iris-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.iris-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  width: 44px;
  height: 24px;
  background: #ccc;
  border-radius: 24px;
  transition: all 0.3s;
}

.iris-toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.iris-toggle input:checked + .iris-toggle-slider {
  background: var(--iris-primary);
}

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

/* ==========================================
   DISPARADOR (Disparo em Massa)
   ========================================== */

.disparador-form .form-group {
  margin-bottom: 14px;
}

.disparador-select-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.iris-btn-small {
  padding: 4px 10px;
  font-size: 11px;
  border: 1px solid var(--iris-border);
  border-radius: var(--iris-radius);
  background: white;
  color: var(--iris-text);
  cursor: pointer;
  transition: all 0.15s;
}

.iris-btn-small:hover {
  background: var(--iris-bg-secondary);
}

.iris-btn-small.danger {
  color: #e53935;
  border-color: #e53935;
}

.iris-btn-small.danger:hover {
  background: #ffebee;
}

.disparador-count {
  font-size: 12px;
  color: var(--iris-text-secondary);
  margin-left: auto;
  font-weight: 500;
}

.disparador-filter {
  margin-bottom: 8px;
}

.disparador-list {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--iris-border);
  border-radius: var(--iris-radius);
  background: var(--iris-bg-secondary);
}

.disparador-recipient {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--iris-border);
  transition: background 0.15s;
}

.disparador-recipient:last-child {
  border-bottom: none;
}

.disparador-recipient:hover {
  background: rgba(37, 211, 102, 0.06);
}

.disparador-recipient input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--iris-primary);
  flex-shrink: 0;
}

.recipient-info {
  flex: 1;
  min-width: 0;
}

.recipient-name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--iris-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipient-phone {
  display: block;
  font-size: 11px;
  color: var(--iris-text-secondary);
}

/* Progresso do Disparo */
.disparador-progress {
  margin: 16px 0;
  padding: 14px;
  background: var(--iris-bg-secondary);
  border-radius: var(--iris-radius);
  border: 1px solid var(--iris-border);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.progress-header span {
  font-size: 13px;
  font-weight: 500;
  color: var(--iris-text);
}

.progress-bar-container {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar {
  height: 100%;
  background: var(--iris-primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-bar.complete {
  background: var(--iris-primary);
}

.progress-bar.has-errors {
  background: #ffc107;
}

.disparador-log {
  max-height: 150px;
  overflow-y: auto;
  font-size: 12px;
  font-family: monospace;
}

.disparador-log .log-ok {
  color: #2e7d32;
  padding: 2px 0;
}

.disparador-log .log-err {
  color: #e53935;
  padding: 2px 0;
}

.disparador-log .log-warn {
  color: #ef6c00;
  padding: 2px 0;
  font-weight: 600;
}

/* ==========================================
   MODAL DE CONFIRMACAO
   ========================================== */

.iris-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999995;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.iris-confirm-overlay.open {
  opacity: 1;
  visibility: visible;
}

.iris-confirm-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
}

.iris-confirm-dialog {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px 24px;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  text-align: center;
  transform: scale(0.9) translateY(10px);
  transition: transform 0.2s ease;
}

.iris-confirm-overlay.open .iris-confirm-dialog {
  transform: scale(1) translateY(0);
}

.iris-confirm-icon {
  margin-bottom: 16px;
}

.iris-confirm-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  color: #111b21;
}

.iris-confirm-message {
  margin: 0 0 24px;
  font-size: 14px;
  color: #667781;
  line-height: 1.5;
}

.iris-confirm-actions {
  display: flex;
  gap: 10px;
}

.iris-confirm-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.iris-confirm-btn-cancel {
  background: #f0f2f5;
  color: #667781;
}

.iris-confirm-btn-cancel:hover {
  background: #e2e5e9;
}

.iris-confirm-btn-primary {
  background: #00a884;
  color: #fff;
}

.iris-confirm-btn-primary:hover {
  background: #008f72;
}

.iris-confirm-btn-danger {
  background: #ef4444;
  color: #fff;
}

.iris-confirm-btn-danger:hover {
  background: #dc2626;
}

/* ==========================================
   MODAL
   ========================================== */

.iris-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999990;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.iris-modal.open {
  opacity: 1;
  visibility: visible;
}

.iris-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.iris-modal-content {
  position: relative;
  width: 90%;
  max-width: 400px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform 0.2s;
}

.iris-modal.open .iris-modal-content {
  transform: translateY(0);
}

.iris-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--iris-border);
}

.iris-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.iris-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--iris-text-secondary);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.iris-modal-close:hover {
  color: var(--iris-text);
}

.iris-modal-body {
  padding: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--iris-text-secondary);
  margin-bottom: 6px;
}

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.form-actions button {
  flex: 1;
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */

.iris-toast {
  position: fixed;
  bottom: 90px;
  right: 20px;
  padding: 12px 20px;
  background: var(--iris-text);
  color: white;
  border-radius: var(--iris-radius);
  font-size: 14px;
  z-index: 9999999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.iris-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.iris-toast.success {
  background: var(--iris-primary);
}

.iris-toast.error {
  background: #dc3545;
}

/* ==========================================
   CONTACT BADGE (no header do chat)
   ========================================== */

.iris-contact-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  position: relative;
  z-index: 1;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.iris-contact-badge .iris-badge {
  flex: 0 0 auto;
}

.iris-badge-separator {
  color: #8696a0;
  font-size: 14px;
  font-weight: 300;
  margin-right: 2px;
  user-select: none;
}

/* ---- Estilo unificado para todos os badges (Categoria / Flow / Tag) ---- */
.iris-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  line-height: 16px;
}

.badge-notes {
  cursor: help;
  font-size: 14px;
}

/* Flow badge na sidebar (inline ao lado do nome) */
.iris-sidebar-flow-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin-left: 4px;
}

/* Tag de Lista/Etiqueta do WhatsApp na sidebar (cor vem inline do WPP) */
.iris-sidebar-list-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin-left: 4px;
}

/* Botão atalho contato no header do chat */
.iris-header-contact-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #8696a0;
  font-size: 18px;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.iris-header-contact-btn:hover {
  background: rgba(134, 150, 160, 0.15);
  color: #00a884;
}

.iris-header-contact-btn.existing {
  color: #00a884;
}

.iris-header-contact-btn.existing:hover {
  background: rgba(0, 168, 132, 0.15);
}

/* Divisor entre botao Iris e botoes nativos */
.iris-header-contact-divider {
  width: 1px;
  height: 24px;
  background: rgba(134, 150, 160, 0.3);
  margin: 0 4px;
  flex-shrink: 0;
  align-self: center;
}

/* Botão para limpar flow badges no header */
.iris-header-clear-badges-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #8696a0;
  font-size: 16px;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  position: relative;
  flex-shrink: 0;
}

.iris-header-clear-badges-btn:hover {
  background: rgba(234, 67, 53, 0.15);
  color: #ea4335;
}

.iris-header-clear-badges-btn .iris-badge-x {
  font-size: 10px;
  position: absolute;
  top: 8px;
  right: 8px;
  color: #ea4335;
  font-weight: 700;
}

/* ==========================================
   TAGS NA SIDEBAR DO WHATSAPP
   ========================================== */

/* Categoria inline com o nome na sidebar */
.iris-wa-sidebar-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Etiquetas abaixo da preview da mensagem */
.iris-wa-sidebar-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 2px 0 0;
  overflow: hidden;
  max-height: 20px;
}

.iris-wa-divider {
  color: rgba(134, 150, 160, 0.5);
  font-size: 11px;
  margin-right: 2px;
}

.iris-wa-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 16px;
}

/* ==========================================
   ANIMAÇÕES
   ========================================== */

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.iris-item {
  animation: slideIn 0.2s ease;
}

/* ==========================================
   RESPONSIVO
   ========================================== */

@media (max-height: 700px) {
  .iris-content {
    padding: 12px;
  }
  
  .iris-empty {
    padding: 20px;
  }
  
  .iris-empty .empty-icon {
    font-size: 32px;
  }
}

/* ==========================================
   AUTO ATENDIMENTO
   ========================================== */

.autoatendimento-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.autoatendimento-item {
  background: var(--iris-bg);
  border: 1px solid var(--iris-border);
  border-radius: var(--iris-radius);
  padding: 12px;
  transition: all 0.2s;
}

.autoatendimento-item:hover {
  border-color: var(--iris-primary);
  box-shadow: var(--iris-shadow);
}

.autoatendimento-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.autoatendimento-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--iris-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.autoatendimento-status {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.autoatendimento-status.active {
  background: rgba(37, 211, 102, 0.15);
  color: var(--iris-primary);
}

.autoatendimento-status.inactive {
  background: var(--iris-bg-secondary);
  color: var(--iris-text-secondary);
}

.autoatendimento-triggers {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.trigger-tag {
  background: var(--iris-bg-secondary);
  color: var(--iris-text-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.autoatendimento-actions {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--iris-border);
}

.autoatendimento-actions button {
  flex: 1;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--iris-border);
  background: var(--iris-bg);
  color: var(--iris-text);
}

.autoatendimento-actions button:hover {
  background: var(--iris-bg-secondary);
}

.autoatendimento-actions button.delete {
  color: #dc3545;
  border-color: #dc3545;
}

.autoatendimento-actions button.delete:hover {
  background: rgba(220, 53, 69, 0.1);
}

/* Editor Modal */
.autoatendimento-editor-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999990;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.autoatendimento-editor {
  background: var(--iris-bg);
  border-radius: var(--iris-radius);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--iris-primary), var(--iris-primary-dark));
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.editor-header h3 {
  margin: 0;
  font-size: 16px;
}

.editor-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.editor-body {
  padding: 20px;
}

.editor-section {
  margin-bottom: 20px;
}

.editor-section h4 {
  font-size: 14px;
  color: var(--iris-text);
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-section h4 .icon {
  font-size: 16px;
}

/* Acionamentos (Triggers) */
.acionamentos-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.acionamento-item {
  background: var(--iris-bg-secondary);
  border-radius: 6px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.acionamento-item select,
.acionamento-item input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--iris-border);
  border-radius: 4px;
  font-size: 13px;
  background: #ffffff;
  color: #1a2e35;
  color-scheme: light;
}

.acionamento-item select option {
  background: #ffffff !important;
  color: #1a2e35 !important;
}

.acionamento-item select option:checked,
.acionamento-item select option:hover {
  background: var(--iris-primary) !important;
  color: #ffffff !important;
}

.acionamento-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: none;
}

.add-acionamento {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: 1px dashed var(--iris-border);
  border-radius: 6px;
  color: var(--iris-text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.add-acionamento:hover {
  border-color: var(--iris-primary);
  color: var(--iris-primary);
  background: rgba(37, 211, 102, 0.05);
}

/* Ações (Actions) */
.acoes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.acao-item {
  background: var(--iris-bg-secondary);
  border-radius: 6px;
  padding: 12px;
}

.acao-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.acao-type {
  font-weight: 600;
  font-size: 12px;
  color: var(--iris-primary-dark);
  text-transform: uppercase;
}

.acao-remove {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
}

.acao-content textarea {
  width: 100%;
  min-height: 60px;
  padding: 8px 10px;
  border: 1px solid var(--iris-border);
  border-radius: 4px;
  font-size: 13px;
  resize: vertical;
  font-family: inherit;
}

.acao-delay {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--iris-text-secondary);
}

.acao-delay input {
  width: 60px;
  padding: 4px 8px;
  border: 1px solid var(--iris-border);
  border-radius: 4px;
  text-align: center;
}

.add-acao {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.add-acao button {
  padding: 6px 12px;
  background: var(--iris-bg);
  border: 1px solid var(--iris-border);
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.add-acao button:hover {
  border-color: var(--iris-primary);
  color: var(--iris-primary);
}

/* Regras */
.regras-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.regra-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--iris-bg-secondary);
  border-radius: 6px;
}

.regra-label {
  font-size: 13px;
  color: var(--iris-text);
}

.regra-value {
  display: flex;
  align-items: center;
  gap: 8px;
}

.regra-value select,
.regra-value input {
  padding: 6px 10px;
  border: 1px solid var(--iris-border);
  border-radius: 4px;
  font-size: 13px;
  background: #ffffff;
  color: #1a2e35;
  color-scheme: light;
}

.regra-value select option {
  background: #ffffff !important;
  color: #1a2e35 !important;
}

.regra-value select option:checked,
.regra-value select option:hover {
  background: var(--iris-primary) !important;
  color: #ffffff !important;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 22px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--iris-primary);
}

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

/* Editor Footer */
.editor-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--iris-border);
  background: var(--iris-bg-secondary);
}

.editor-footer button {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel {
  background: var(--iris-bg);
  border: 1px solid var(--iris-border);
  color: var(--iris-text);
}

.btn-cancel:hover {
  background: var(--iris-bg-secondary);
}

.btn-save {
  background: var(--iris-primary);
  border: none;
  color: white;
}

.btn-save:hover {
  background: var(--iris-primary-dark);
}

/* ==========================================
   ASSINATURA
   ========================================== */

.assinatura-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.assinatura-card {
  background: var(--iris-bg);
  border: 1px solid var(--iris-border);
  border-radius: var(--iris-radius);
  padding: 16px;
}

.assinatura-card h4 {
  font-size: 14px;
  color: var(--iris-text);
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.assinatura-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--iris-bg-secondary);
  border-radius: 6px;
}

.assinatura-toggle span {
  font-size: 14px;
  color: var(--iris-text);
}

.assinatura-input {
  margin-top: 12px;
}

.assinatura-input label {
  display: block;
  font-size: 12px;
  color: var(--iris-text-secondary);
  margin-bottom: 6px;
}

.assinatura-input input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--iris-border);
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.assinatura-input input:focus {
  outline: none;
  border-color: var(--iris-primary);
}

.assinatura-preview {
  margin-top: 16px;
  padding: 12px;
  background: var(--iris-bg-secondary);
  border-radius: 6px;
}

.assinatura-preview label {
  display: block;
  font-size: 11px;
  color: var(--iris-text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.preview-message {
  background: #dcf8c6;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--iris-text);
}

.preview-signature {
  margin-top: 4px;
  font-style: italic;
  color: var(--iris-text-secondary);
}

.assinatura-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: rgba(37, 211, 102, 0.1);
  border-radius: 6px;
  margin-top: 12px;
}

.assinatura-info .info-icon {
  font-size: 16px;
}

.assinatura-info p {
  margin: 0;
  font-size: 12px;
  color: var(--iris-text-secondary);
  line-height: 1.5;
}

/* ==========================================
   ANIMAÇÕES
   ========================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.autoatendimento-editor {
  animation: scaleIn 0.2s ease;
}

/* ==========================================
   TELA DE LOGIN
   ========================================== */

.iris-login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  min-height: 400px;
  animation: fadeIn 0.3s ease;
}

.iris-login-header {
  text-align: center;
  margin-bottom: 32px;
}

.iris-login-logo {
  font-size: 48px;
  margin-bottom: 12px;
}

.iris-login-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--iris-text);
  margin: 0 0 8px 0;
}

.iris-login-header p {
  font-size: 14px;
  color: var(--iris-text-secondary);
  margin: 0;
}

.iris-login-form {
  width: 100%;
  max-width: 280px;
}

.iris-form-group {
  margin-bottom: 16px;
}

.iris-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--iris-text);
  margin-bottom: 6px;
}

.iris-form-group input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  border: 1px solid var(--iris-border);
  border-radius: 8px;
  background: var(--iris-bg);
  color: var(--iris-text);
  transition: all 0.2s;
  box-sizing: border-box;
}

.iris-form-group input:focus {
  outline: none;
  border-color: var(--iris-primary);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.iris-form-group input::placeholder {
  color: var(--iris-text-secondary);
}

.iris-login-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  text-align: center;
}

.iris-login-btn {
  width: 100%;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--iris-primary), var(--iris-primary-dark));
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.iris-login-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.iris-login-btn:active {
  transform: translateY(0);
}

.iris-login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.iris-login-footer {
  margin-top: 24px;
  text-align: center;
}

.iris-login-footer p {
  font-size: 13px;
  color: var(--iris-text-secondary);
  margin: 0;
}

.iris-login-footer a {
  color: var(--iris-primary);
  text-decoration: none;
  font-weight: 500;
}

.iris-login-footer a:hover {
  text-decoration: underline;
}

/* Status offline */
.iris-menu-status .status-dot.offline {
  background: #ef4444;
}
/* ==========================================
   BOTÕES INCORPORADOS NA BARRA DE DIGITAÇÃO
   ========================================== */

/* Botão base - igual aos ícones nativos do WhatsApp */
.iris-input-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 39px;
  padding: 0;
  margin: 0 1px;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #00a884;
  transition: background-color 0.15s ease, transform 0.15s ease;
  position: relative;
  flex-shrink: 0;
}

/* Os dois botões ficam juntos à esquerda */
.iris-signature-btn + .iris-templates-btn {
  margin-left: 0;
}

.iris-input-btn:hover {
  background-color: rgba(134, 150, 160, 0.15);
}

.iris-input-btn:active {
  transform: scale(0.92);
}

.iris-input-btn svg {
  width: 28px;
  height: 28px;
}

/* Botão de Assinatura */
.iris-signature-btn {
  color: #00a884;
}

.iris-signature-btn:hover {
  color: #00a884;
}

.iris-signature-btn.active {
  color: #25D366;
}

/* Indicador de status (bolinha verde) */
.iris-btn-indicator {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  pointer-events: none;
}

.iris-btn-indicator.on {
  background: var(--iris-primary);
  box-shadow: 0 0 0 2px #f0f2f5;
}

/* Botão de Templates (Raio) */
.iris-templates-btn {
  color: #00a884;
}

.iris-templates-btn:hover {
  color: #25d366;
}

/* ==========================================
   POPUPS DOS BOTÕES DO FOOTER
   ========================================== */

.iris-footer-popup {
  position: fixed;
  min-width: 340px;
  max-width: 400px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  z-index: 9999990;
  overflow: hidden;
  overflow-x: hidden;
  animation: popup-slide-up 0.2s ease;
}

@keyframes popup-slide-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.iris-footer-popup .popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1fa855, #25d366);
  border-bottom: 1px solid #e5e7eb;
}

.iris-footer-popup .popup-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 12px;
}

.iris-footer-popup .popup-body {
  padding: 12px;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
}

/* Mini Switch para popup */
.iris-mini-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

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

.iris-mini-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 20px;
  transition: 0.3s;
}

.iris-mini-switch .slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: #999;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.iris-mini-switch input:checked + .slider {
  background-color: rgba(0, 0, 0, 0.3);
}

.iris-mini-switch input:checked + .slider:before {
  transform: translateX(16px);
  background-color: #fff;
}

/* Input do popup */
.iris-popup-input {
  width: 100%;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #1a2e35;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.iris-popup-input:focus {
  border-color: var(--iris-primary);
}

.iris-popup-input::placeholder {
  color: #9ca3af !important;
  opacity: 1 !important;
}

.iris-popup-input::-webkit-input-placeholder {
  color: #9ca3af !important;
  opacity: 1 !important;
}

/* Preview da assinatura */
.popup-preview {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f0f2f5;
  border-radius: 8px;
  font-size: 12px;
  color: #667781;
  border-left: 3px solid var(--iris-primary);
}

.popup-preview strong {
  color: var(--iris-primary);
}

/* Busca no popup de templates */
.iris-popup-search {
  width: auto;
  flex: 1;
  min-width: 0;
  max-width: 180px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  color: #ffffff;
  font-size: 12px;
  outline: none;
}

.iris-popup-search::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.iris-popup-search:focus {
  border-color: rgba(255, 255, 255, 0.6);
}

/* Lista de templates no popup */
.templates-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.template-popup-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.template-popup-item:hover {
  background: #f0f2f5;
  border-color: #1fa855;
}

.template-popup-item .template-shortcut {
  background: var(--iris-primary);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: monospace;
}

.template-popup-item .template-title {
  color: #1a2e35;
  font-size: 13px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popup-empty {
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
  padding: 20px;
  margin: 0;
}

/* Scrollbar do popup */
.iris-footer-popup .popup-body::-webkit-scrollbar {
  width: 6px;
}

.iris-footer-popup .popup-body::-webkit-scrollbar-track {
  background: transparent;
}

.iris-footer-popup .popup-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.iris-footer-popup .popup-body::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Notas Popup */
.iris-notes-popup {
  width: 340px;
  max-height: 420px;
}

.notes-popup-contact {
  font-size: 11px;
  color: #1a2e35;
  font-weight: 600;
  background: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  margin-left: auto;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.notes-popup-input-area {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  align-items: flex-end;
}

.notes-popup-textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--iris-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-family: inherit;
  background: #f9fafb;
  color: #1a2e35;
  outline: none;
}

.notes-popup-textarea:focus {
  border-color: var(--iris-primary);
}

.notes-popup-save {
  background: var(--iris-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.notes-popup-save:hover {
  background: var(--iris-primary-hover);
}

.notes-popup-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notes-popup-item {
  background: #f3f4f6;
  border-radius: 8px;
  padding: 8px 10px;
}

.notes-popup-text {
  font-size: 12px;
  color: #1a2e35;
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
}

.notes-popup-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  font-size: 10px;
  color: rgba(134, 150, 160, 0.7);
}

.notes-popup-delete {
  background: none;
  border: none;
  color: rgba(134, 150, 160, 0.5);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 15px;
  transition: color 0.15s;
}

.notes-popup-delete:hover {
  color: #ef4444;
}

.iris-notes-btn {
  color: #8696a0 !important;
}

/* ============================================
   AUTO ATENDIMENTO IA - ESTILOS
   ============================================ */

.iris-ia-container {
  padding: 0;
}

/* Loading */
.ia-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
  color: #8696a0;
}

.ia-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #2a3942;
  border-top: 3px solid #00a884;
  border-radius: 50%;
  animation: ia-spin 0.8s linear infinite;
}

@keyframes ia-spin {
  to { transform: rotate(360deg); }
}

/* Connection Form */
.ia-connection-form {
  padding: 16px;
}

.ia-header-card {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #e8eaed, #d9dce0);
  border-radius: 12px;
  margin-bottom: 16px;
}

.ia-icon-big {
  font-size: 48px;
  margin-bottom: 8px;
}

.ia-header-card h3 {
  color: #1a2e35;
  font-size: 18px;
  margin-bottom: 4px;
}

.ia-subtitle {
  color: #4a6a5a;
  font-size: 13px;
  line-height: 1.5;
}

.ia-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}

.ia-alert.error {
  background: #3b1c1c;
  color: #f87171;
  border: 1px solid #5a2020;
}

.ia-alert.success {
  background: #1c3b2a;
  color: #4ade80;
  border: 1px solid #205a35;
}

.ia-alert.warning {
  background: #3b351c;
  color: #fbbf24;
  border: 1px solid #5a4d20;
}

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

.ia-form-group label {
  display: block;
  color: #e9edef;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.ia-form-group small {
  display: block;
  color: #8696a0;
  font-size: 11px;
  margin-top: 4px;
}

.ia-btn-full {
  width: 100%;
  padding: 12px !important;
  font-size: 14px !important;
}

.ia-help {
  margin-top: 16px;
}

.ia-help details {
  background: #f0f2f5;
  border-radius: 8px;
  padding: 10px 14px;
}

.ia-help summary {
  color: #4a6a5a;
  font-size: 13px;
  cursor: pointer;
}

.ia-help ol {
  color: #4a6a5a;
  font-size: 12px;
  padding-left: 20px;
  margin-top: 8px;
  line-height: 1.8;
}

.ia-help code {
  background: #111b21;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: #00a884;
}

/* Dashboard */
.ia-dashboard {
  padding: 16px;
}

.ia-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #f0f2f5;
  border-radius: 12px;
  margin-bottom: 14px;
}

.ia-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ia-header-left h3 {
  color: #1a2e35;
  font-size: 15px;
  margin: 0;
}

.ia-status-text {
  color: #4a6a5a;
  font-size: 12px;
}

.ia-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ia-status-dot.online {
  background: #00a884;
  box-shadow: 0 0 8px rgba(0, 168, 132, 0.5);
}

.ia-status-dot.offline {
  background: #ea4335;
}

/* Toggle principal */
.switch-main {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

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

.slider-main {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #3a4a54;
  border-radius: 26px;
  transition: .3s;
}

.slider-main:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: .3s;
}

.switch-main input:checked + .slider-main {
  background: #00a884;
}

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

/* Stats grid */
.ia-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.ia-stat-card {
  background: #f0f2f5;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.ia-stat-number {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #00a884;
}

.ia-stat-label {
  display: block;
  font-size: 10px;
  color: #4a6a5a;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Sections */
.ia-sections {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.ia-section {
  background: #f0f2f5;
  border-radius: 10px;
  overflow: hidden;
}

.ia-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  color: #1a2e35;
  font-size: 14px;
  font-weight: 600;
  user-select: none;
}

.ia-section-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.ia-arrow {
  color: #8696a0;
  font-size: 10px;
  transition: transform 0.2s;
}

.ia-section.open .ia-arrow {
  transform: rotate(180deg);
}

.ia-section-body {
  display: none;
  padding: 0 14px 14px;
}

.ia-section.open .ia-section-body {
  display: block;
}

.ia-hint {
  color: #8696a0;
  font-size: 12px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.ia-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Form row */
.ia-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

/* Range slider */
.ia-range {
  width: 100%;
  -webkit-appearance: none;
  height: 6px;
  background: #2a3942;
  border-radius: 3px;
  outline: none;
  margin-top: 6px;
}

.ia-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #00a884;
  cursor: pointer;
}

/* Rule cards */
.ia-rule-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid #e9ecef;
  transition: border-color 0.2s;
}

.ia-rule-card:hover {
  border-color: #d0d5dd;
}

.ia-rule-card-vertical {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.ia-rule-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.ia-rule-icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  flex-shrink: 0;
}

.ia-rule-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ia-rule-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a2e35;
}

.ia-rule-desc {
  font-size: 11px;
  color: #8696a0;
}

/* Rule control (input + unit) */
.ia-rule-control {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ia-input-compact {
  width: 56px;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: #1a2e35;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.ia-input-compact:focus {
  border-color: #00a884;
  box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.15);
}

.ia-input-unit {
  font-size: 12px;
  color: #8696a0;
  font-weight: 500;
}

/* Toggle switch */
.ia-toggle {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.ia-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ia-toggle-slider {
  position: absolute;
  inset: 0;
  background: #cfd8dc;
  border-radius: 24px;
  transition: background 0.25s;
}

.ia-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.ia-toggle input:checked + .ia-toggle-slider {
  background: #00a884;
}

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


/* Keywords area */
.ia-keywords-area {
  width: 100%;
}

.ia-keywords-input-row {
  margin-bottom: 8px;
}

.ia-keywords-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 8px;
}

/* Tags */
.ia-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8f5e9;
  color: #2e7d32;
  padding: 5px 10px 5px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #c8e6c9;
}

.ia-tag-remove {
  background: none;
  border: none;
  color: #66bb6a;
  cursor: pointer;
  font-size: 11px;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}

.ia-tag-remove:hover {
  color: #c62828;
}

/* Rule actions (toggle + button side by side) */
.ia-rule-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ============================================
   SCHEDULE MODAL
   ============================================ */
.ia-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999990;
  backdrop-filter: blur(2px);
}

.ia-modal {
  background: #fff;
  border-radius: 14px;
  width: 420px;
  max-width: 94vw;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  animation: ia-modal-in 0.2s ease-out;
}

@keyframes ia-modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.ia-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e9ecef;
  font-size: 15px;
  font-weight: 600;
  color: #1a2e35;
}

.ia-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #8696a0;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.15s;
}

.ia-modal-close:hover {
  background: #f0f2f5;
  color: #1a2e35;
}

.ia-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.ia-modal-field {
  margin-top: 14px;
}

.ia-modal-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #4a6a5a;
  margin-bottom: 6px;
}

.ia-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid #e9ecef;
  background: #fafafa;
}

/* Schedule grid (inside modal) */
.ia-schedule-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ia-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  opacity: 0.55;
  transition: all 0.2s;
}

.ia-day-row.active {
  opacity: 1;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.ia-day-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1a2e35;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  min-width: 100px;
}

.ia-day-label input[type="checkbox"] {
  accent-color: #00a884;
  width: 16px;
  height: 16px;
}

.ia-day-times {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ia-day-sep {
  color: #8696a0;
  font-size: 12px;
}

.ia-day-times input[type="time"] {
  background: #fff;
  border: 1px solid #d1d5db;
  color: #1a2e35;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  width: 95px;
  transition: border-color 0.2s;
}

.ia-day-times input[type="time"]:focus {
  border-color: #00a884;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.15);
}

.ia-day-times input:disabled {
  opacity: 0.35;
  background: #f0f2f5;
}

/* WAHA Session Management */
.waha-status-card {
  background: #f0f2f5;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}

.waha-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.waha-status-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.waha-status-info strong {
  display: block;
  font-size: 14px;
  color: #1a2e35;
}

.waha-status-info small {
  display: block;
  font-size: 11px;
  color: #4a6a5a;
  margin-top: 2px;
}

.waha-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #8696a0;
}

.waha-status-dot.working {
  background: #00a884;
  box-shadow: 0 0 8px rgba(0, 168, 132, 0.5);
}

.waha-status-dot.scan {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
  animation: pulse-dot 1.5s infinite;
}

.waha-status-dot.starting {
  background: #3b82f6;
  animation: pulse-dot 1s infinite;
}

.waha-status-dot.stopped {
  background: #8696a0;
}

.waha-status-dot.failed {
  background: #ea4335;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.waha-qr-area {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  margin-bottom: 12px;
  border: 1px solid #c8e6c9;
}

.waha-qr-hint {
  font-size: 13px;
  color: #4a6a5a;
  margin-bottom: 12px;
}

.waha-qr-img-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.waha-qr-img {
  max-width: 280px;
  max-height: 280px;
  border-radius: 8px;
}

.waha-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.waha-actions .iris-btn {
  flex: 1 1 auto;
  min-width: 120px;
  font-size: 12px;
  padding: 8px 10px;
}

.waha-actions .iris-btn.danger {
  background: transparent;
  color: #ea4335;
  border: 1px solid #ea4335;
}

.waha-actions .iris-btn.danger:hover {
  background: #ea4335;
  color: #fff;
}

#waha-action-result {
  margin-top: 8px;
  margin-bottom: 8px;
}



/* Actions */
.ia-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ia-actions-row {
  display: flex;
  gap: 8px;
}

.ia-actions-row .iris-btn {
  flex: 1;
}

/* Loading mini */
.ia-loading-mini {
  color: #8696a0;
  font-size: 12px;
}

/* Toast */
.ia-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 9999999;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.ia-toast.show {
  transform: translateX(-50%) translateY(0);
}

.ia-toast.success {
  background: #1c3b2a;
  color: #4ade80;
  border: 1px solid #205a35;
}

.ia-toast.error {
  background: #3b1c1c;
  color: #f87171;
  border: 1px solid #5a2020;
}

/* ============================================
   FOLLOW-UP - Select e Timeline
   ============================================ */
.ia-select-compact {
  padding: 6px 10px;
  border: 1px solid #d1d5db !important;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1a2e35 !important;
  background: #ffffff !important;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  min-width: 100px;
  color-scheme: light !important;
  -webkit-appearance: menulist;
  appearance: menulist;
}

.ia-select-compact:focus {
  border-color: #00a884;
  box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.15);
}

.ia-select-compact option {
  background: #ffffff !important;
  color: #1a2e35 !important;
  padding: 6px 12px;
}

.ia-select-compact option:checked,
.ia-select-compact option:hover {
  background: var(--iris-primary) !important;
  color: #ffffff !important;
}

.ia-followup-summary {
  margin-top: 8px;
  padding: 0 4px;
}

.ia-followup-timeline {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 12px 16px;
}

.ia-followup-timeline-title {
  font-size: 11px;
  font-weight: 700;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.ia-followup-timeline-item {
  position: relative;
  padding: 4px 0 4px 18px;
  font-size: 12px;
  color: #374151;
  line-height: 1.4;
}

.ia-followup-timeline-item::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 10px;
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
}

.ia-followup-timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 18px;
  width: 2px;
  height: calc(100% - 2px);
  background: #bbf7d0;
}

.ia-followup-timeline-item.ia-followup-end {
  color: #9ca3af;
  font-style: italic;
}

.ia-followup-timeline-item.ia-followup-end::before {
  background: #d1d5db;
}

/* ============================================
   MODAL DE LOGIN - OVERLAY GLOBAL
   Bloqueia toda a interface ate o usuario logar
   ============================================ */

#iris-login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: IrisLoginFadeIn 0.3s ease;
}

@keyframes IrisLoginFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.iris-login-modal {
  background: #1f2937;
  border-radius: 16px;
  padding: 40px 36px 32px;
  width: 380px;
  max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: IrisLoginSlideUp 0.35s ease;
}

@keyframes IrisLoginSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.iris-login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.iris-login-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
}

.iris-login-logo h2 {
  color: #25D366;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: 0.5px;
}

.iris-login-subtitle {
  color: #9ca3af;
  font-size: 13px;
  margin: 0;
}

.iris-login-error {
  background: #451a1a;
  color: #f87171;
  border: 1px solid #6b2020;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 18px;
  text-align: center;
}

.iris-login-field {
  margin-bottom: 16px;
}

.iris-login-field label {
  display: block;
  color: #d1d5db;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.iris-login-field input {
  width: 100%;
  padding: 11px 14px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  color: #f3f4f6;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.iris-login-field input:focus {
  border-color: #25D366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.iris-login-field input::placeholder {
  color: #6b7280;
}

.iris-login-button {
  width: 100%;
  padding: 12px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 8px;
}

.iris-login-button:hover {
  background: #1fba59;
}

.iris-login-button:active {
  transform: scale(0.98);
}

.iris-login-button:disabled {
  background: #374151;
  color: #6b7280;
  cursor: not-allowed;
  transform: none;
}

.iris-login-footer {
  text-align: center;
  color: #6b7280;
  font-size: 12px;
  margin: 18px 0 0;
}

/* Label de usuario logado no dashboard IA */
.ia-user-label {
  display: block;
  color: #9ca3af;
  font-size: 11px;
  margin-top: 2px;
}

/* =============================================
   FUNIL DE VENDAS (KANBAN)
   ============================================= */

/* Overlay central do Funil, Dashboard e Contatos */
#iris-funil-overlay,
#iris-dashboard-overlay,
#iris-contacts-overlay,
#iris-tags-overlay,
#iris-settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: IrisFunilFadeIn 0.25s ease;
}

@keyframes IrisFunilFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.iris-funil-modal {
  background: #ffffff;
  border-radius: 16px;
  width: 92vw;
  max-width: 1400px;
  height: 85vh;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: IrisFunilSlideUp 0.3s ease;
}

.iris-dashboard-modal {
  max-width: 1400px;
  width: 92vw;
}

.iris-dashboard-modal .iris-funil-modal-body {
  overflow-y: auto;
}

/* ===== Settings Overlay ===== */
.iris-settings-modal {
  max-width: 1400px;
  width: 92vw;
  height: auto;
  max-height: 85vh;
}

.iris-settings-modal .iris-funil-modal-body {
  overflow-y: auto;
  padding: 20px;
}

/* ===== Contatos Overlay ===== */
.iris-contacts-modal {
  max-width: 1400px;
  width: 92vw;
}

.iris-contacts-modal .iris-funil-modal-header {
  flex-wrap: wrap;
  gap: 10px;
}

.contacts-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  margin-right: 12px;
}

.contacts-search-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0 10px;
  gap: 8px;
}

.contacts-search-wrapper i {
  font-size: 13px;
  opacity: 0.7;
}

.contacts-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 13px;
  padding: 7px 0;
  width: 180px;
}

.contacts-search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.iris-contacts-btn-add {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.iris-contacts-btn-add:hover {
  background: rgba(255, 255, 255, 0.3);
}

.contacts-overlay-content {
  padding: 16px 20px;
  height: 100%;
  overflow-y: auto;
}

.contacts-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.contacts-filter-select {
  padding: 7px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  background: #fff;
  outline: none;
  cursor: pointer;
  color-scheme: light;
}

.contacts-filter-select:focus {
  border-color: #1fa855;
}

.contacts-count {
  font-size: 13px;
  color: #6b7280;
  margin-left: auto;
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.contact-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s;
  position: relative;
}

.contact-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
}

.contact-card-top-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.contact-card:hover {
  border-color: #1fa855;
  box-shadow: 0 2px 8px rgba(31, 168, 85, 0.1);
}

.contact-card-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #1fa855, #128C7E);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-card-info {
  flex: 1;
  min-width: 0;
}

.contact-card-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1a2e35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-card-phone {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

.contact-card-notes {
  display: block;
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-card-actions {
  display: flex;
  gap: 2px;
}

.contact-card-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.contact-card-actions button {
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: all 0.2s;
}

.contact-card-actions .btn-contact-chat:hover,
.contact-card-actions .btn-contact-share:hover {
  background: #e8f5e9;
  color: #1fa855;
}

.contact-card-actions .btn-contact-edit:hover {
  background: #e3f2fd;
  color: #1565c0;
}

.contact-card-actions .btn-contact-delete:hover {
  background: #fbe9e7;
  color: #c62828;
}

.iris-contacts-modal .iris-funil-modal-body {
  overflow-y: auto;
}

/* ===== Templates Overlay ===== */
#iris-templates-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: IrisFunilFadeIn 0.25s ease;
}

.iris-templates-modal {
  max-width: 1400px;
  width: 92vw;
}

.iris-templates-modal .iris-funil-modal-header {
  flex-wrap: wrap;
  gap: 10px;
}

.iris-templates-modal .iris-funil-modal-body {
  overflow-y: auto;
}

.templates-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  margin-right: 12px;
}

.templates-search-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0 10px;
  gap: 8px;
}

.templates-search-wrapper i {
  font-size: 13px;
  opacity: 0.7;
}

.templates-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 13px;
  padding: 7px 0;
  width: 180px;
}

.templates-search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.iris-templates-btn-add {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.iris-templates-btn-add:hover {
  background: rgba(255, 255, 255, 0.3);
}

.templates-overlay-content {
  padding: 16px 20px;
  height: 100%;
  overflow-y: auto;
}

.templates-toolbar {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.templates-count {
  font-size: 13px;
  color: #6b7280;
  margin-left: auto;
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.template-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s;
  cursor: pointer;
}

.template-card:hover {
  border-color: #1fa855;
  box-shadow: 0 2px 8px rgba(31, 168, 85, 0.1);
}

.template-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-card-shortcut {
  background: #1fa855;
  color: white;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.template-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a2e35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-card-content {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.template-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.template-card:hover .template-card-actions {
  opacity: 1;
}

.template-card-actions button {
  background: none;
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #6b7280;
  transition: all 0.2s;
}

.template-card-actions .btn-tpl-use {
  color: #1fa855;
  font-weight: 600;
}

.template-card-actions .btn-tpl-use:hover {
  background: #e8f5e9;
}

.template-card-actions .btn-tpl-edit:hover {
  background: #e3f2fd;
  color: #1565c0;
}

.template-card-actions .btn-tpl-delete:hover {
  background: #fbe9e7;
  color: #c62828;
}

/* ===== Agendamentos Overlay ===== */
#iris-schedules-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: IrisFunilFadeIn 0.25s ease;
}

.iris-schedules-modal {
  max-width: 1400px;
  width: 92vw;
}

.iris-schedules-modal .iris-funil-modal-header {
  flex-wrap: wrap;
  gap: 10px;
}

.iris-schedules-modal .iris-funil-modal-body {
  overflow-y: auto;
}

.schedules-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  margin-right: 12px;
}

.schedules-search-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0 10px;
  gap: 8px;
}

.schedules-search-wrapper i {
  font-size: 13px;
  opacity: 0.7;
}

.schedules-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 13px;
  padding: 7px 0;
  width: 180px;
}

.schedules-search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.iris-schedules-btn-add {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.iris-schedules-btn-add:hover {
  background: rgba(255, 255, 255, 0.3);
}

.schedules-overlay-content {
  padding: 16px 20px;
  height: 100%;
  overflow-y: auto;
}

.schedules-toolbar {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.schedules-stats {
  display: flex;
  gap: 16px;
}

.schedules-stat {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 500;
}

.schedules-stat.pending-stat {
  background: #fff8e1;
  color: #f57f17;
}

.schedules-stat.sent-stat {
  background: #e8f5e9;
  color: #2e7d32;
}

.schedules-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e7eb;
}

.schedules-section-title:first-child {
  margin-top: 0;
}

.schedules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.schedule-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s;
}

.schedule-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.schedule-card.pending {
  border-left: 3px solid #ffc107;
}

.schedule-card.sent {
  border-left: 3px solid #1fa855;
  opacity: 0.7;
}

.schedule-card-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #374151;
  font-weight: 500;
}

.schedule-card-time i {
  color: #6b7280;
  font-size: 12px;
}

.schedule-card-hour {
  color: #1fa855;
  font-weight: 600;
}

.schedule-card-recipient {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6b7280;
}

.schedule-card-recipient i {
  font-size: 11px;
}

.schedule-card-message {
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.schedule-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.schedule-card:hover .schedule-card-actions {
  opacity: 1;
}

.btn-sched-cancel {
  background: none;
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #ef5350;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-sched-cancel:hover {
  background: #fbe9e7;
}

/* ===== Disparador Overlay ===== */
#iris-disparador-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: IrisFunilFadeIn 0.25s ease;
}

.iris-disparador-modal {
  max-width: 1400px;
  width: 92vw;
}

.iris-disparador-modal .iris-funil-modal-body {
  overflow-y: auto;
}

.disparador-overlay-content {
  padding: 20px;
  height: 100%;
  overflow-y: auto;
}

.disparador-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  height: 100%;
}

.disparador-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
}

.disparador-card h4 {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: #1a2e35;
  display: flex;
  align-items: center;
  gap: 8px;
}

.disparador-card h4 i {
  color: #1fa855;
  font-size: 15px;
}

.disparador-col-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.disparador-col-recipients {
  display: flex;
  flex-direction: column;
}

.disparador-col-recipients .disparador-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.disparador-col-recipients .disparador-list {
  flex: 1;
  max-height: none;
}

@media (max-width: 768px) {
  .disparador-layout {
    grid-template-columns: 1fr;
  }
  .disparador-col-recipients .disparador-list {
    max-height: 260px;
  }
}

/* ===== Auto Atendimento Overlay ===== */
#iris-autoatendimento-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: IrisFunilFadeIn 0.25s ease;
}

.iris-autoatendimento-modal {
  max-width: 1400px;
  width: 92vw;
}

.iris-autoatendimento-modal .iris-funil-modal-body {
  overflow-y: auto;
  padding: 0;
}

/* ===== Fluxos Overlay ===== */
#iris-fluxos-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: IrisFunilFadeIn 0.25s ease;
}

.iris-fluxos-modal {
  max-width: 1400px;
  width: 92vw;
}

.iris-fluxos-modal .iris-funil-modal-body {
  overflow-y: auto;
  padding: 0;
}

/* Fluxos - Cards de fluxo */
.fluxos-dashboard .iris-btn,
.fluxos-form .iris-btn {
  width: auto;
}

.fluxos-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #f8f9fa !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 10px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.fluxos-card:hover {
  border-color: rgba(31,168,85,0.3) !important;
  background: #f0f2f5 !important;
}

.fluxos-card.disabled {
  opacity: 0.55;
}

.fluxos-card-left {
  flex: 1;
  min-width: 0;
}

.fluxos-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.fluxos-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a2e35 !important;
}

.fluxos-card-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fluxos-card-badge.active {
  background: rgba(16,185,129,0.15);
  color: #10b981;
}

.fluxos-card-badge.inactive {
  background: rgba(239,68,68,0.12);
  color: #ef4444;
}

.fluxos-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11px;
  color: #6b7280 !important;
}

.fluxos-card-meta i {
  margin-right: 3px;
  opacity: 0.7;
}

.fluxos-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 16px;
}

.fluxos-card-actions .iris-btn.small {
  padding: 5px 8px;
  font-size: 12px;
  min-width: auto;
}

/* Fluxos - Sessao cards */
.fluxos-session-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8f9fa !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px;
  margin-bottom: 6px;
}

.fluxos-session-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: #6b7280 !important;
}

.fluxos-session-info strong {
  font-size: 13px;
  color: #1a2e35 !important;
}

.fluxos-session-flow {
  color: #1fa855;
  font-weight: 500;
}

.fluxos-session-node code {
  background: #e5e7eb !important;
  color: #1a2e35 !important;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}

.fluxos-session-time {
  color: #9ca3af !important;
  font-size: 11px;
}

/* Fluxos - Empty state */
.fluxos-empty {
  text-align: center;
  padding: 40px 20px;
}

/* Fluxos - Form */
.fluxos-form {
  padding: 20px;
}

.fluxos-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.fluxos-form-header h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a2e35 !important;
}

.fluxos-form-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fluxos-json-editor {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.5;
  background: #f8f9fa !important;
  color: #1a2e35 !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px;
  padding: 14px;
  resize: vertical;
  min-height: 300px;
  tab-size: 2;
}

.fluxos-json-editor.invalid {
  border-color: #ef4444;
}

.fluxos-json-error {
  color: #ef4444;
  font-size: 12px;
  margin-top: 4px;
  padding: 6px 10px;
  background: rgba(239,68,68,0.08);
  border-radius: 6px;
}

/* Editor Visual de Nodes */
.fluxo-editor-section {
  margin-top: 4px;
}

.fluxo-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.fluxo-editor-header > label {
  font-size: 14px;
  font-weight: 600;
  color: #1a2e35 !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fluxo-editor-actions {
  display: flex;
  gap: 6px;
}

.fluxo-nodes-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 0;
}

.fluxo-nodes-container::-webkit-scrollbar {
  width: 4px;
}

.fluxo-nodes-container::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
}

/* ---- Node Card ---- */
.fluxo-node-card {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.fluxo-node-card:hover {
  border-color: rgba(31,168,85,0.3) !important;
}

.fluxo-node-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f8f9fa !important;
  border-bottom: 1px solid #e5e7eb;
}

.fluxo-node-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.fluxo-node-header-left > i {
  font-size: 13px;
  flex-shrink: 0;
}

.fluxo-node-id-display {
  font-weight: 700;
  font-size: 13px;
  color: #1a2e35 !important;
  font-family: 'Courier New', monospace;
}

.fluxo-node-header-left .fluxo-node-id-input {
  background: #ffffff !important;
  color: #1a2e35 !important;
  border: 1px solid #d1d5db !important;
  border-radius: 4px !important;
  padding: 3px 8px !important;
  font-size: 12px !important;
  font-family: 'Courier New', monospace !important;
  max-width: 150px !important;
  width: auto !important;
}

.fluxo-node-header-left .fluxo-node-id-input:focus {
  border-color: #1fa855 !important;
  box-shadow: 0 0 0 2px rgba(31,168,85,0.12) !important;
  outline: none !important;
}

.fluxo-node-type-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.4;
}

.fluxo-node-header-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.fluxo-node-header-right .iris-btn.small {
  padding: 4px 7px !important;
  font-size: 11px !important;
  min-width: auto !important;
  background: #f0f2f5 !important;
  border: 1px solid #d1d5db !important;
  color: #6b7280 !important;
}

.fluxo-node-header-right .iris-btn.small:hover {
  background: #e5e7eb !important;
  color: #1a2e35 !important;
}

.fluxo-node-header-right .iris-btn.small.danger {
  color: #ef4444 !important;
}

.fluxo-node-header-right .iris-btn.small.danger:hover {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
}

/* ---- Node Body ---- */
.fluxo-node-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff !important;
}

/* ---- Picker de tipo de nó ---- */
.fluxo-node-type-picker {
  margin-top: 8px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 12px;
  animation: irisFadeIn 0.15s ease;
}

.fluxo-node-type-picker-title {
  font-size: 12px;
  color: #667781;
  margin-bottom: 10px;
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
}

.fluxo-node-type-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.fluxo-node-type-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  background: #f0f2f5;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  color: #3b4a54;
  font-size: 11px;
  font-weight: 500;
}

.fluxo-node-type-option:hover {
  background: #e7f8f0;
  border-color: #00a884;
  transform: translateY(-1px);
}

.fluxo-node-type-option i {
  font-size: 18px;
}

.fluxo-node-type-option span {
  white-space: nowrap;
  font-size: 10px;
}

.fluxo-node-card.collapsed .fluxo-node-body {
  display: none !important;
}

.fluxo-node-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fluxo-field-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fluxo-field-group label {
  font-size: 11px !important;
  font-weight: 600;
  color: #6b7280 !important;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.fluxo-field-hint {
  font-size: 10px !important;
  color: #9ca3af !important;
  font-style: italic;
}

.fluxo-field-row {
  display: flex;
  gap: 8px;
}

/* ---- OVERRIDE: inputs/selects/textareas dentro do editor de nodes ---- */
.fluxo-node-card .iris-input,
.fluxo-node-card .iris-textarea,
.fluxo-node-card input[type="text"],
.fluxo-node-card input[type="number"],
.fluxo-node-card textarea {
  background: #ffffff !important;
  color: #1a2e35 !important;
  border: 1px solid #d1d5db !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  padding: 7px 10px !important;
  width: 100%;
  box-sizing: border-box;
}

.fluxo-node-card .iris-input:focus,
.fluxo-node-card .iris-textarea:focus,
.fluxo-node-card input:focus,
.fluxo-node-card textarea:focus {
  border-color: #1fa855 !important;
  background: #ffffff !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(31,168,85,0.12) !important;
}

.fluxo-node-card .iris-select,
.fluxo-node-card select {
  background: #ffffff !important;
  color: #1a2e35 !important;
  border: 1px solid #d1d5db !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  padding: 7px 10px !important;
  cursor: pointer;
  color-scheme: light !important;
  -webkit-appearance: menulist;
  appearance: menulist;
  width: 100%;
  box-sizing: border-box;
}

.fluxo-node-card .iris-select:focus,
.fluxo-node-card select:focus {
  border-color: #1fa855 !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(31,168,85,0.12) !important;
}

.fluxo-node-card .iris-select option,
.fluxo-node-card select option {
  background: #ffffff !important;
  color: #1a2e35 !important;
}

.fluxo-node-card .iris-select option:checked,
.fluxo-node-card select option:checked {
  background: #1fa855 !important;
  color: #fff !important;
}

.fluxo-node-card .iris-textarea {
  resize: vertical;
  min-height: 50px !important;
  line-height: 1.4;
}

/* ---- Options for wait_input ---- */
.fluxo-options-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fluxo-option-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  background: #f8f9fa !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 6px;
}

.fluxo-option-fields {
  display: flex;
  gap: 5px;
  flex: 1;
}

.fluxo-option-fields input {
  flex: 1;
  min-width: 0;
}

.fluxo-option-fields select {
  flex: 1;
  min-width: 0;
}

.fluxo-option-row .fluxo-remove-option {
  padding: 4px 6px !important;
  font-size: 11px !important;
  min-width: auto !important;
  flex-shrink: 0;
  background: transparent !important;
  border: none !important;
  color: #9ca3af !important;
}

.fluxo-option-row .fluxo-remove-option:hover {
  color: #ef4444 !important;
  background: #fef2f2 !important;
}

.fluxo-add-option {
  background: #f8f9fa !important;
  border: 1px dashed #d1d5db !important;
  color: #6b7280 !important;
  font-size: 11px !important;
  padding: 5px 10px !important;
}

.fluxo-add-option:hover {
  background: #f0f2f5 !important;
  color: #1a2e35 !important;
  border-color: #9ca3af !important;
}

/* ---- Action params ---- */
.fluxo-action-params {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---- Add Node button ---- */
#fluxo-add-node {
  background: rgba(31,168,85,0.08) !important;
  border: 1px dashed rgba(31,168,85,0.35) !important;
  color: #1fa855 !important;
  font-size: 12px !important;
  padding: 8px 14px !important;
  width: auto !important;
  align-self: flex-start;
}

#fluxo-add-node:hover {
  background: rgba(31,168,85,0.15) !important;
}

.fluxos-form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

/* Fluxos - Tabela de ajuda */
.fluxos-help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 12px;
}

.fluxos-help-table th,
.fluxos-help-table td {
  border: 1px solid #e5e7eb !important;
  padding: 8px 10px;
  text-align: left;
}

.fluxos-help-table th {
  background: #f0f2f5 !important;
  font-weight: 600;
  color: #1a2e35 !important;
}

.fluxos-help-table td {
  color: #4b5563 !important;
}

.fluxos-help-table code {
  background: #e8f5e9 !important;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
  color: #1fa855 !important;
}

.fluxos-help-pre {
  background: #f8f9fa !important;
  color: #1a2e35 !important;
  padding: 14px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
  border: 1px solid #e5e7eb !important;
}

@keyframes IrisFunilSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.iris-funil-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: linear-gradient(135deg, #1fa855 0%, #128C7E 100%);
  color: white;
  flex-shrink: 0;
}

.iris-funil-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.iris-funil-modal-title i {
  font-size: 18px;
  opacity: 0.9;
}

.iris-funil-modal-title h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.iris-funil-modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}

.iris-funil-modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.iris-funil-modal-body {
  flex: 1;
  overflow: hidden;
  background: #ffffff;
}

.funil-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.funil-loading,
.funil-loading-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #6b7280;
  gap: 12px;
}

.funil-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Empty State */
.funil-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  text-align: center;
  color: #6b7280;
}
.funil-empty-icon {
  font-size: 48px;
}
.funil-empty h3 {
  color: #1f2937;
  font-size: 18px;
  margin: 0;
}
.funil-empty p {
  max-width: 320px;
  line-height: 1.5;
}

/* Header */
.funil-header {
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.funil-tabs-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.funil-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  flex: 1;
}
.funil-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #6b7280;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.funil-tab:hover {
  background: #f3f4f6;
  color: #1f2937;
}
.funil-tab.active {
  background: #f3f4f6;
  color: #111827;
  border-color: #d1d5db;
}
.funil-tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.funil-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
}
.funil-meta-value {
  color: #22c55e;
  font-weight: 500;
}
.funil-meta-sep {
  color: #d1d5db;
}

/* Board */
.funil-board {
  flex: 1;
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
}
.funil-board::-webkit-scrollbar {
  height: 6px;
}
.funil-board::-webkit-scrollbar-track {
  background: transparent;
}
.funil-board::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

/* Column */
.funil-column {
  min-width: 270px;
  max-width: 300px;
  background: #f9fafb;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  max-height: 100%;
  border: 1px solid #e5e7eb;
}
.funil-column-add {
  min-width: 200px;
  background: transparent;
  border: 2px dashed #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
}
.funil-column-add:hover {
  border-color: #6366f1;
}

.funil-column-header {
  padding: 12px;
  border-radius: 10px 10px 0 0;
  flex-shrink: 0;
}
.funil-column-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.funil-column-name {
  font-weight: 600;
  font-size: 13px;
  color: #1f2937;
}
.funil-column-count {
  background: #e5e7eb;
  color: #6b7280;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
}
.funil-column-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.funil-column-value {
  font-size: 12px;
  color: #22c55e;
}
.funil-column-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s;
}
.funil-column-header:hover .funil-column-actions {
  opacity: 1;
}

/* Column body (scroll dos cards) */
.funil-column-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 40px;
  transition: background 0.2s;
}
.funil-column-body::-webkit-scrollbar {
  width: 4px;
}
.funil-column-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 2px;
}

/* Drop target highlight */
.funil-drop-target {
  background: rgba(99, 102, 241, 0.08) !important;
  outline: 2px dashed #6366f1;
  outline-offset: -2px;
  border-radius: 6px;
}
.funil-drop-indicator {
  height: 3px;
  background: #6366f1;
  border-radius: 2px;
  margin: 2px 0;
  flex-shrink: 0;
}

/* Add card button */
.funil-add-card {
  border: none;
  background: transparent;
  color: #6b7280;
  padding: 10px 12px;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.funil-add-card:hover {
  color: #6366f1;
  background: #f3f4f6;
}

/* Card */
.funil-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 10px;
  cursor: grab;
  transition: box-shadow 0.15s, opacity 0.15s;
  border: 1px solid #e5e7eb;
}
.funil-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.funil-card.funil-card-dragging {
  opacity: 0.4;
}
.funil-card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.funil-card-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.funil-card-info {
  flex: 1;
  min-width: 0;
}
.funil-card-name {
  color: #1f2937;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.funil-card-phone {
  color: #6b7280;
  font-size: 11px;
  margin-top: 2px;
}
.funil-card-menu {
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.funil-card:hover .funil-card-menu {
  opacity: 1;
}
.funil-card-value {
  color: #22c55e;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
}
.funil-card-notes {
  color: #6b7280;
  font-size: 11px;
  margin-top: 4px;
  line-height: 1.3;
}
.funil-card-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.funil-tag {
  background: #ede9fe;
  color: #6366f1;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Buttons */
.funil-btn {
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.funil-btn-primary {
  background: #6366f1;
  color: #fff;
}
.funil-btn-primary:hover {
  background: #4f46e5;
}
.funil-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.funil-btn-ghost {
  background: transparent;
  color: #6b7280;
  border: 1px dashed #d1d5db;
}
.funil-btn-ghost:hover {
  color: #1f2937;
  border-color: #6366f1;
}
.funil-btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}
.funil-btn-outline {
  background: transparent;
  color: #6b7280;
  border: 1px solid #d1d5db;
}
.funil-btn-outline:hover {
  color: #111827;
  border-color: #6366f1;
}
.funil-btn-icon {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.15s;
}
.funil-btn-icon:hover {
  background: #f3f4f6;
  color: #1f2937;
}
.funil-btn-danger-icon:hover {
  color: #ef4444 !important;
}

/* Context Menu */
.funil-context-menu {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 140px;
}
.funil-context-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: #374151;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 4px;
}
.funil-context-item:hover {
  background: #f3f4f6;
}
.funil-context-danger:hover {
  background: #fef2f2;
  color: #ef4444;
}

/* Modal */
.funil-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999999;
  animation: funil-fade-in 0.15s;
}
@keyframes funil-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.funil-modal {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  width: 380px;
  max-width: 90vw;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
  animation: funil-slide-up 0.2s;
}
@keyframes funil-slide-up {
  from { transform: translateY(20px); opacity: 0.5; }
  to { transform: translateY(0); opacity: 1; }
}
.funil-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #e5e7eb;
}
.funil-modal-header h3 {
  margin: 0;
  color: #1f2937;
  font-size: 15px;
}
.funil-modal-close {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
}
.funil-modal-close:hover {
  color: #1f2937;
}
.funil-modal-body {
  padding: 16px 20px;
}
.funil-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid #e5e7eb;
}

/* Form fields */
.funil-form-group {
  margin-bottom: 12px;
}
.funil-form-group:last-child {
  margin-bottom: 0;
}
.funil-form-group label {
  display: block;
  color: #6b7280;
  font-size: 12px;
  margin-bottom: 4px;
}
.funil-input {
  width: 100%;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px 10px;
  color: #1f2937;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}
.funil-input:focus {
  border-color: #6366f1;
}
.funil-textarea {
  resize: vertical;
  min-height: 60px;
}
.funil-input-color {
  width: 48px;
  height: 32px;
  padding: 2px;
  border-radius: 6px;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  cursor: pointer;
}

/* Toast */
.funil-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 9999999;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}
.funil-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.funil-toast-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #10b981;
}
.funil-toast-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #ef4444;
}
.funil-toast-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #3b82f6;
}

/* ============================================
   DASHBOARD
   ============================================ */

.iris-dashboard {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Dashboard header row: period + export */
.dashboard-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-period-selector {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.dashboard-period-btn {
  padding: 6px 18px;
  border-radius: 20px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.dashboard-period-btn:hover {
  background: #f0f2f5;
  color: #1a2e35;
}

.dashboard-period-btn.active {
  background: var(--iris-primary, #25D366);
  color: #fff;
  border-color: var(--iris-primary, #25D366);
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.dashboard-card {
  background: #f0f2f5;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: all 0.2s;
}

.dashboard-card:hover {
  background: #e4e6eb;
  transform: translateY(-1px);
}

.dashboard-card-icon {
  font-size: 20px;
  color: var(--iris-primary, #25D366);
  margin-bottom: 8px;
}

.dashboard-card-value {
  font-size: 28px;
  font-weight: 700;
  color: #1a2e35;
  line-height: 1.2;
}

.dashboard-card-label {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.dashboard-section {
  background: #f0f2f5;
  border-radius: 12px;
  padding: 16px;
}

.dashboard-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1a2e35;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-section h4 i {
  color: var(--iris-primary, #25D366);
}

/* Chart legend */
.dashboard-chart-legend {
  display: flex;
  gap: 14px;
  margin-bottom: 8px;
  padding: 0 2px;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
}

.chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Chart bars */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 150px;
  padding-top: 10px;
}

.chart-bars-stacked .chart-bar-group {
  justify-content: flex-end;
}

.chart-bar-stack {
  width: 100%;
  max-width: 36px;
  border-radius: 4px 4px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 4px;
  transition: height 0.3s ease;
}

.chart-bar-segment {
  width: 100%;
  min-height: 0;
  transition: flex 0.3s ease;
}

.chart-bar-segment.chart-bar-received {
  background: #3B82F6;
}

.chart-bar-segment.chart-bar-web {
  background: #10B981;
}

.chart-bar-segment.chart-bar-ia {
  background: #F59E0B;
}

.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  max-width: 36px;
  background: linear-gradient(180deg, var(--iris-primary, #25D366) 0%, var(--iris-primary-dark, #128C7E) 100%);
  border-radius: 4px 4px 0 0;
  position: relative;
  min-height: 4px;
  transition: height 0.3s ease;
}

.chart-bar-value {
  font-size: 10px;
  color: #6b7280;
  font-weight: 600;
  margin-top: 2px;
}

.chart-bar-label {
  font-size: 9px;
  color: #6b7280;
  margin-top: 4px;
  text-align: center;
  white-space: nowrap;
}

/* Top contacts */
.top-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid #e4e6eb;
}

.top-contact-item:last-child {
  border-bottom: none;
}

.top-contact-rank {
  font-size: 12px;
  font-weight: 700;
  color: var(--iris-primary, #25D366);
  min-width: 28px;
}

.top-contact-phone {
  flex: 1;
  font-size: 13px;
  color: #1a2e35;
  font-family: monospace;
}

.top-contact-count {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}

/* Funnel summary */
.funnel-summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 4px;
}

.funnel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.funnel-name {
  flex: 1;
  font-size: 13px;
  color: #1a2e35;
}

.funnel-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--iris-primary, #25D366);
}

/* Export button */
.dashboard-export-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.dashboard-export-btn:hover {
  background: #10B981;
  color: #fff;
  border-color: #10B981;
}

.dashboard-export-btn i {
  font-size: 13px;
}

/* Funnel analytics section header */
.dashboard-section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-section-header-row h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1a2e35;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-section-header-row h4 i {
  color: var(--iris-primary, #25D366);
}

/* Funnel selector */
.dashboard-funnel-select {
  padding: 5px 28px 5px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 140px;
  max-width: 220px;
  transition: border-color 0.2s;
}

.dashboard-funnel-select:hover,
.dashboard-funnel-select:focus {
  border-color: var(--iris-primary, #25D366);
}

/* Funnel metrics cards */
.dashboard-funnel-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.dashboard-card-funnel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
}

.dashboard-card-funnel .dashboard-card-value {
  font-size: 18px;
  font-weight: 700;
  color: #1a2e35;
  line-height: 1.3;
  word-break: break-all;
}

.dashboard-card-funnel .dashboard-card-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: #6b7280;
  margin-top: 2px;
}

.dashboard-card-funnel .dashboard-card-icon {
  font-size: 16px;
  margin-bottom: 4px;
}

/* Funnel visual chart (pyramid) */
.dashboard-funnel-visual {
  min-height: 60px;
}

.dfv-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
}

.dfv-stage {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.dfv-bar {
  width: var(--stage-width, 100%);
  background: var(--stage-color, #25D366);
  border-radius: 6px;
  padding: 10px 14px;
  min-height: 38px;
  display: flex;
  align-items: center;
  transition: width 0.4s ease, background 0.3s;
  position: relative;
  overflow: hidden;
}

.dfv-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  pointer-events: none;
}

.dfv-bar-label {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 1;
}

.dfv-stage-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex-shrink: 0;
  min-width: 90px;
}

.dfv-stage-count {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.dfv-stage-value {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
}

/* Funnel analytics section background */
.dashboard-funnel-analytics {
  background: #f0f2f5;
  border-radius: 12px;
  padding: 16px;
}

/* Dashboard totals */
.dashboard-totals {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: #f0f2f5;
  border-radius: 12px;
}

.dashboard-total-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-label {
  font-size: 13px;
  color: #6b7280;
}

.total-value {
  font-size: 15px;
  font-weight: 700;
  color: #1a2e35;
}

.dashboard-loading {
  text-align: center;
  padding: 20px;
  color: #6b7280;
  font-size: 13px;
}

.dashboard-empty {
  text-align: center;
  padding: 16px;
  color: #9ca3af;
  font-size: 12px;
  font-style: italic;
}

/* ============================================
   NOTAS POR CONTATO
   ============================================ */

.iris-notes {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notes-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f0f2f5;
  border-radius: 10px;
}

.notes-contact {
  font-size: 14px;
  color: #1a2e35;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notes-contact i {
  color: #1fa855;
  font-size: 15px;
}

.notes-input-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f0f2f5;
  border-radius: 10px;
  padding: 14px;
}

.notes-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #1a2e35;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.notes-textarea:focus {
  border-color: #1fa855;
  box-shadow: 0 0 0 2px rgba(31, 168, 85, 0.1);
}

.notes-textarea::placeholder {
  color: #9ca3af;
}

.notes-save-btn {
  align-self: flex-end;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: #1fa855;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.notes-save-btn:hover {
  background: #128C7E;
  transform: translateY(-1px);
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.note-item {
  background: #f0f2f5;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  transition: all 0.2s;
}

.note-item:hover {
  border-color: #1fa855;
  box-shadow: 0 2px 8px rgba(31, 168, 85, 0.08);
}

.note-content {
  font-size: 13px;
  color: #1a2e35;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #e5e7eb;
}

.note-date {
  font-size: 11px;
  color: #6b7280;
}

.note-delete-btn {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 12px;
  transition: all 0.2s;
}

.note-delete-btn:hover {
  color: #ef4444;
  background: #fbe9e7;
}

/* ==========================================
   BANNER DE CONTEXTO INVALIDADO (extensao atualizada)
   ========================================== */

.iris-context-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--iris-text);
  color: white;
  border-radius: var(--iris-radius);
  font-size: 14px;
  z-index: 9999999;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.iris-context-banner button {
  background: var(--iris-primary);
  color: white;
  border: none;
  border-radius: var(--iris-radius);
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}

.iris-context-banner button:hover {
  filter: brightness(1.1);
}