/* ==========================================================================
   PROMOSCHEI — Brand Design System & Styles
   Identidade Visual: Cores alegres, recortes dinâmicos, glassmorphism e foco
   em alta conversão de ofertas para WhatsApp e Telegram.
   ========================================================================== */

:root {
  /* Paleta Oficial Extraída da Logo PROMOSCHEI */
  --brand-coral: #ea5b4d;       /* R e megofones */
  --brand-coral-dark: #dc2626;
  --brand-gold: #ffc83b;        /* Fundo solar e letra O */
  --brand-gold-light: #fef08a;
  --brand-teal: #2dd4bf;        /* S, sacolas e carrinho */
  --brand-mint: #10b981;
  --brand-purple: #8b5cf6;      /* P e detalhes */
  --brand-lilac: #c4b5fd;
  --brand-blue: #38bdf8;        /* O e cones de som */
  --brand-pink: #ec4899;        /* H, laço e corações */
  --brand-lime: #84cc16;        /* C e confetes */

  /* Canvas Escuro Moderno (Midnight Charcoal) */
  --bg-primary: #0b0d13;
  --bg-secondary: #121520;
  --bg-card: rgba(22, 26, 40, 0.78);
  --bg-card-hover: rgba(28, 33, 52, 0.92);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-brand: rgba(255, 200, 59, 0.28);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Gradientes de Ação */
  --grad-primary: linear-gradient(135deg, #ea5b4d 0%, #f97316 100%);
  --grad-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-teal: linear-gradient(135deg, #2dd4bf 0%, #0ea5e9 100%);
  --grad-gold: linear-gradient(135deg, #ffc83b 0%, #f59e0b 100%);
  --grad-purple: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);

  /* Raios e Sombras */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.06);
  --shadow-glow-coral: 0 4px 20px rgba(234, 91, 77, 0.4);
  --shadow-glow-gold: 0 4px 20px rgba(255, 200, 59, 0.35);
  --glass-blur: blur(20px);
}

/* ==========================================================================
   TEMA CLARO (LIGHT THEME)
   Inspirado no papel creme solar e alegria das cores da logo
   ========================================================================== */
[data-theme="light"] {
  --bg-primary: #f6f7fb;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.94);
  --bg-card-hover: #ffffff;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-brand: rgba(234, 91, 77, 0.35);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.07), 0 0 1px 1px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  background-image: 
    radial-gradient(ellipse at 8% 8%, rgba(234, 91, 77, 0.07) 0%, transparent 45%),
    radial-gradient(ellipse at 92% 12%, rgba(255, 200, 59, 0.12) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 88%, rgba(45, 212, 191, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 88% 92%, rgba(139, 92, 246, 0.06) 0%, transparent 45%);
}

[data-theme="light"] .topbar-title h1,
[data-theme="light"] .card-header h3,
[data-theme="light"] .stat-value,
[data-theme="light"] .group-info h4,
[data-theme="light"] .hero-content h2 {
  color: #0f172a;
}

[data-theme="light"] .hero-content p {
  color: #334155;
}

[data-theme="light"] .input-field,
[data-theme="light"] textarea {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.14);
  color: #0f172a;
}

[data-theme="light"] .input-field:focus,
[data-theme="light"] textarea:focus {
  background: #ffffff;
  border-color: var(--brand-coral);
  box-shadow: 0 0 0 3px rgba(234, 91, 77, 0.2);
}

[data-theme="light"] .brand-hero-banner {
  background: linear-gradient(135deg, rgba(234, 91, 77, 0.09) 0%, rgba(255, 200, 59, 0.18) 50%, rgba(45, 212, 191, 0.12) 100%);
  border-color: rgba(234, 91, 77, 0.25);
  box-shadow: 0 8px 24px -5px rgba(234, 91, 77, 0.12);
}

[data-theme="light"] .btn-secondary {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

[data-theme="light"] .btn-secondary:hover {
  background: #e2e8f0;
  border-color: var(--brand-coral);
}

[data-theme="light"] .stat-card {
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .group-card-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .group-card-item:hover {
  background: #ffffff;
  border-color: rgba(234, 91, 77, 0.35);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .qr-container {
  background: #f8fafc;
  border-color: #cbd5e1;
}

[data-theme="light"] .data-table th {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

[data-theme="light"] .data-table td {
  border-color: #f1f5f9;
  color: #1e293b;
}

[data-theme="light"] .nav-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #0f172a;
}

[data-theme="light"] .nav-item.active {
  background: linear-gradient(90deg, rgba(234, 91, 77, 0.12), rgba(255, 200, 59, 0.08));
  color: #0f172a;
  border-color: rgba(234, 91, 77, 0.4);
}

[data-theme="light"] .auto-mode-switch {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .pairing-code-box {
  background: #f8fafc;
  border-color: var(--brand-coral);
}

[data-theme="light"] .connection-status-pill {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

[data-theme="light"] .tag-chip {
  background: rgba(255, 200, 59, 0.22);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.35);
}

[data-theme="light"] .badge-brand-chip {
  background: rgba(255, 200, 59, 0.2);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.35);
}

[data-theme="light"] .theme-toggle-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .theme-toggle-btn:hover {
  border-color: var(--brand-coral);
  box-shadow: 0 4px 12px rgba(234, 91, 77, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(ellipse at 8% 8%, rgba(234, 91, 77, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 92% 12%, rgba(255, 200, 59, 0.10) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 88%, rgba(45, 212, 191, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 88% 92%, rgba(139, 92, 246, 0.09) 0%, transparent 45%);
  background-attachment: fixed;
}

/* Container Principal em Layout Flex */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ==========================================================================
   SIDEBAR & BRAND LOGO
   ========================================================================== */
.sidebar {
  width: 290px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 26px 20px;
  flex-shrink: 0;
}

.sidebar-header {
  margin-bottom: 32px;
}

.brand-logo-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  padding: 2.5px;
  background: linear-gradient(135deg, var(--brand-coral), var(--brand-gold), var(--brand-teal), var(--brand-purple));
  box-shadow: 0 4px 18px rgba(234, 91, 77, 0.4);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.brand-logo-wrapper:hover {
  transform: scale(1.06) rotate(2deg);
  box-shadow: 0 6px 24px rgba(255, 200, 59, 0.5);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 11px;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  line-height: 1.1;
  display: flex;
  align-items: center;
  user-select: none;
}

/* Letras Coloridas que reproduzem o estilo de recorte da Logo */
.brand-title .letter-p  { color: #c4b5fd; text-shadow: 0 0 10px rgba(196, 181, 253, 0.4); }
.brand-title .letter-r  { color: #f87171; text-shadow: 0 0 10px rgba(248, 113, 113, 0.4); }
.brand-title .letter-o1 { color: #38bdf8; text-shadow: 0 0 10px rgba(56, 189, 248, 0.4); }
.brand-title .letter-m  { color: #4ade80; text-shadow: 0 0 10px rgba(74, 222, 128, 0.4); }
.brand-title .letter-o2 { color: #facc15; text-shadow: 0 0 10px rgba(250, 204, 21, 0.4); }
.brand-title .letter-s  { color: #2dd4bf; text-shadow: 0 0 10px rgba(45, 212, 191, 0.4); }
.brand-title .letter-c  { color: #a3e635; text-shadow: 0 0 10px rgba(163, 230, 53, 0.4); }
.brand-title .letter-h  { color: #f472b6; text-shadow: 0 0 10px rgba(244, 114, 182, 0.4); }
.brand-title .letter-e  { color: #818cf8; text-shadow: 0 0 10px rgba(129, 140, 248, 0.4); }
.brand-title .letter-i  { color: #a855f7; text-shadow: 0 0 10px rgba(168, 85, 247, 0.4); }

.badge-pro {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 20px;
  background: linear-gradient(90deg, rgba(234, 91, 77, 0.18), rgba(255, 200, 59, 0.18));
  color: #fde047;
  border: 1px solid rgba(255, 200, 59, 0.35);
  margin-top: 4px;
  text-transform: uppercase;
}

/* Menu de Navegação */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  transform: translateX(3px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(234, 91, 77, 0.16), rgba(255, 200, 59, 0.08));
  border-color: rgba(234, 91, 77, 0.4);
  color: #fff;
  box-shadow: 0 4px 14px rgba(234, 91, 77, 0.18);
}

.nav-icon {
  font-size: 1.25rem;
}

.nav-badge {
  margin-left: auto;
  background: var(--brand-coral);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(234, 91, 77, 0.5);
}

.sidebar-footer {
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.connection-status-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.status-dot.online {
  background: var(--brand-teal);
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.8);
}

/* ==========================================================================
   CONTEÚDO PRINCIPAL & TOPBAR
   ========================================================================== */
.main-content {
  flex: 1;
  padding: 32px 42px;
  overflow-y: auto;
  max-width: 1440px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.topbar-title h1 {
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
}

.badge-brand-chip {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255, 200, 59, 0.12);
  color: var(--brand-gold);
  border: 1px solid rgba(255, 200, 59, 0.3);
}

.topbar-title p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.theme-toggle-btn:hover {
  transform: translateY(-2px);
  border-color: var(--brand-gold);
  box-shadow: 0 4px 16px rgba(255, 200, 59, 0.25);
}

.theme-icon {
  font-size: 1.15rem;
}

.auto-mode-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-brand);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.switch-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.switch-status {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-gold);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 25px;
}

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

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

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

input:checked + .slider {
  background: var(--grad-success);
}

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

/* ==========================================================================
   BRAND HERO BANNER
   ========================================================================== */
.brand-hero-banner {
  background: linear-gradient(135deg, rgba(234, 91, 77, 0.18) 0%, rgba(255, 200, 59, 0.14) 50%, rgba(45, 212, 191, 0.10) 100%);
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-lg);
  padding: 24px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 10px 28px -5px rgba(234, 91, 77, 0.18);
  position: relative;
  overflow: hidden;
}

.brand-hero-banner::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(255, 200, 59, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--brand-gold);
  background: rgba(255, 200, 59, 0.15);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 200, 59, 0.3);
  margin-bottom: 8px;
}

.hero-content h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}

.hero-content p {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-top: 6px;
  max-width: 780px;
}

.hero-badge-art {
  width: 82px;
  height: 82px;
  border-radius: 20px;
  padding: 4px;
  background: linear-gradient(135deg, var(--brand-coral), var(--brand-gold), var(--brand-teal));
  box-shadow: 0 8px 24px rgba(234, 91, 77, 0.35);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-mini {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

/* ==========================================================================
   CARDS & GLASSMORPHISM
   ========================================================================== */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.25s ease;
}

.glass-card:hover {
  border-color: rgba(255, 200, 59, 0.2);
}

.card-header {
  margin-bottom: 20px;
}

.card-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

/* ==========================================================================
   GRID DE ESTATÍSTICAS
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.stat-card:hover {
  transform: translateY(-3px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  flex-shrink: 0;
}

.stat-icon.coral  { background: rgba(234, 91, 77, 0.16); border: 1px solid rgba(234, 91, 77, 0.35); }
.stat-icon.gold   { background: rgba(255, 200, 59, 0.16); border: 1px solid rgba(255, 200, 59, 0.35); }
.stat-icon.teal   { background: rgba(45, 212, 191, 0.16); border: 1px solid rgba(45, 212, 191, 0.35); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.16); border: 1px solid rgba(139, 92, 246, 0.35); }

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: #fff;
  margin-top: 2px;
}

/* ==========================================================================
   FORMULÁRIOS & CAMPOS
   ========================================================================== */
.form-group {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.input-field, textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: rgba(15, 18, 28, 0.85);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s;
  outline: none;
}

select.input-field {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.input-field:focus, textarea:focus {
  border-color: var(--brand-coral);
  box-shadow: 0 0 0 3px rgba(234, 91, 77, 0.25);
  background: rgba(20, 24, 38, 0.95);
}

textarea {
  resize: vertical;
}

.form-row {
  display: flex;
  gap: 16px;
}

.flex-1 { flex: 1; }

/* ==========================================================================
   BOTÕES
   ========================================================================== */
.btn {
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-glow-coral);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(234, 91, 77, 0.55);
  filter: brightness(1.08);
}

.btn-success {
  background: var(--grad-success);
  color: #fff;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  filter: brightness(1.08);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 200, 59, 0.3);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

/* Quick Hunter Box */
.quick-hunter-box textarea {
  margin-bottom: 14px;
}

.quick-hunter-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ==========================================================================
   PRÉVIA DO WHATSAPP (BALÃO AUTÊNTICO #d9fdd3)
   ========================================================================== */
.chat-preview-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 18px 0;
}

.chat-preview-wrapper {
  width: 100%;
  max-width: 440px;
}

.preview-empty-state {
  text-align: center;
  padding: 36px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.chat-preview-bubble {
  background: #d9fdd3; /* Verde oficial WhatsApp */
  border-radius: 12px;
  padding: 10px 12px;
  color: #111b21;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  font-size: 0.93rem;
  line-height: 1.45;
  position: relative;
}

.preview-image-container {
  width: 100%;
  height: 250px;
  max-height: 260px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  padding: 12px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.deal-preview-image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 226px;
  object-fit: contain;
  object-position: center;
  image-rendering: -webkit-optimize-contrast;
}

.preview-domain-bar {
  font-size: 0.72rem;
  color: #667781;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.6px;
  margin-top: -4px;
  margin-bottom: 10px;
  padding-left: 2px;
}

.chat-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-text b, .chat-text strong {
  font-weight: 700;
  color: #000;
}

.chat-text del, .chat-text s {
  text-decoration: line-through;
  color: #667781;
}

.chat-text code, .copy-coupon {
  background: rgba(0, 0, 0, 0.06);
  color: #0f766e;
  padding: 2px 7px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  border: 1px dashed rgba(15, 118, 110, 0.4);
}

.chat-text a {
  color: #027eb5;
  text-decoration: underline;
  word-break: break-all;
  font-weight: 500;
}

.chat-time-tag {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: #667781;
  margin-top: 6px;
  user-select: none; /* Elemento puramente visual da prévia, não selecionável */
  pointer-events: none;
}

.chat-time-tag span.check-icon {
  color: #53bdeb; /* Duplo tique azul */
  font-size: 0.9rem;
  font-weight: bold;
}

/* ==========================================================================
   CONEXÕES: QR CODE & PAIRING CODE
   ========================================================================== */
.qr-container {
  min-height: 250px;
  background: rgba(15, 18, 28, 0.7);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
  padding: 16px;
}

.qr-placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 270px;
  line-height: 1.5;
}

.qr-image {
  max-width: 220px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: white;
  padding: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.3s ease;
}

.pairing-code-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--brand-coral);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  text-align: center;
  width: 100%;
  max-width: 330px;
}

.pairing-code-box .code-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pairing-code-box .code-number {
  font-size: 2.2rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--brand-gold);
  margin: 10px 0;
}

/* Badges de Status */
.badge, .status-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-badge.offline, .badge.pending {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.online, .badge.sent {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.warning {
  background: rgba(255, 200, 59, 0.15);
  color: #fde047;
  border: 1px solid rgba(255, 200, 59, 0.35);
}

.status-badge.connecting {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

/* ==========================================================================
   GRUPOS & TABELAS
   ========================================================================== */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.group-batch-bar {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-color);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.group-batch-bar:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 200, 59, 0.3);
}

.group-checkbox, .group-checkbox-all {
  width: 19px;
  height: 19px;
  cursor: pointer;
  accent-color: var(--brand-coral);
  border-radius: 4px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.group-checkbox:hover, .group-checkbox-all:hover {
  transform: scale(1.1);
}

.group-card-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  box-sizing: border-box;
  transition: all 0.2s ease;
  overflow: hidden;
}

.group-card-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 200, 59, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.group-card-item.selected {
  background: rgba(234, 91, 77, 0.08);
  border-color: rgba(234, 91, 77, 0.5);
  box-shadow: 0 4px 14px rgba(234, 91, 77, 0.15);
}

.group-card-paused {
  opacity: 0.88;
  border-color: rgba(245, 158, 11, 0.45) !important;
  background: rgba(245, 158, 11, 0.03) !important;
}

.group-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.group-card-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.group-channel-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.group-title-box {
  flex: 1;
  min-width: 0;
}

.group-title-box h4,
.group-title-box .group-name {
  font-size: 0.96rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}

.group-title-box .group-jid {
  font-size: 0.70rem;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-top: 2px;
}

.group-status-pill-wrap {
  flex-shrink: 0;
}

.btn-group-master-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-group-master-status.active {
  background: rgba(16, 185, 129, 0.16);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.45);
}

.btn-group-master-status.active:hover {
  background: rgba(16, 185, 129, 0.28);
  border-color: #10b981;
}

.btn-group-master-status.paused {
  background: rgba(245, 158, 11, 0.16);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.45);
}

.btn-group-master-status.paused:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: #f59e0b;
}

.group-card-body {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group-badges-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.group-badges-flow .badge,
.group-badges-flow .badge-chip,
.group-badges-flow .badge-tag {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Feature Toggle List inside each group card */
.group-features-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm, 8px);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.group-feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.group-feature-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.group-feature-row:first-child {
  padding-top: 0;
}

.group-feature-info {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
}

.group-feature-icon {
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
}

.group-feature-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.group-feature-title {
  font-size: 0.80rem;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.25;
}

.group-feature-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

/* Compact iOS Style Switches */
.group-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
  margin: 0;
  cursor: pointer;
}

.group-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  position: absolute;
}

.group-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #334155;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 20px;
}

.group-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

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

.group-switch input:checked + .group-slider.slider-purple {
  background-color: #8b5cf6;
}

.group-switch input:checked + .group-slider.slider-emerald {
  background-color: #10b981;
}

.group-switch input:checked + .group-slider.slider-amber {
  background-color: #f59e0b;
}

/* Actions footer grid - 4 items no overflow */
.group-card-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 6px;
  width: 100%;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.group-card-actions-grid .btn {
  padding: 6px 8px;
  font-size: 0.74rem;
  justify-content: center;
  white-space: nowrap;
}

.group-card-actions-grid .btn-icon-only {
  padding: 6px 10px;
}

.btn-autopilot-toggle {
  transition: all 0.15s ease;
}
.btn-autopilot-toggle:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-icon-only {
  padding: 5px 8px !important;
  font-size: 0.85rem !important;
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

/* Tag Chips */
.tag-chip {
  display: inline-block;
  background: rgba(255, 200, 59, 0.12);
  color: #fde047;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-family: monospace;
  cursor: pointer;
  margin-right: 6px;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 200, 59, 0.25);
  transition: all 0.2s;
}

.tag-chip:hover {
  background: var(--brand-gold);
  color: #000;
  font-weight: 700;
}

/* Utilitários & Layout */
.grid-2-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .grid-2-cols {
    grid-template-columns: 1fr;
  }
}

.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; align-items: center; }
.flex-gap     { display: flex; gap: 12px; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-6 { margin-bottom: 24px; }
.pt-4 { padding-top: 16px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.w-full { width: 100%; }
.text-muted { color: var(--text-muted); font-size: 0.85rem; }
.text-success { color: var(--brand-teal); }
.font-bold { font-weight: 700; }
.hidden { display: none !important; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-color { border-color: var(--border-color); }
.cursor-pointer { cursor: pointer; }
.text-xs { font-size: 0.75rem; }
.text-left { text-align: left; }
.text-center { text-align: center; }

/* Abas */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* ==========================================================================
   ESPECIALISTA PROMOSCHEI IA (WIDGET FLUTUANTE & CHAT)
   ========================================================================== */
.ai-widget-container {
  position: fixed;
  bottom: 24px;
  right: 28px;
  z-index: 99999;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Botão Flutuante (FAB) */
.ai-fab-btn {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: linear-gradient(135deg, var(--brand-coral) 0%, var(--brand-purple) 100%);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px rgba(234, 91, 77, 0.5);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
}

.ai-fab-btn:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 14px 38px rgba(139, 92, 246, 0.6);
  border-color: rgba(255, 255, 255, 0.5);
}

.ai-fab-icon {
  font-size: 1.8rem;
  z-index: 2;
  transition: transform 0.3s ease;
}

.ai-fab-btn:hover .ai-fab-icon {
  transform: rotate(-10deg) scale(1.1);
}

.ai-fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--brand-gold);
  color: #1e1b4b;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  border: 2px solid #0b0d13;
  letter-spacing: 0.5px;
}

.ai-fab-tooltip {
  position: absolute;
  right: 70px;
  background: rgba(18, 21, 32, 0.95);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(8px);
  transition: all 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.ai-fab-btn:hover .ai-fab-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Janela de Chat Deslizante */
.ai-chat-window {
  position: fixed;
  bottom: 96px;
  right: 28px;
  width: 390px;
  max-width: calc(100vw - 36px);
  height: 580px;
  max-height: calc(100vh - 125px);
  background: rgba(18, 21, 32, 0.95);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.7);
  animation: slideUpAi 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s ease;
}

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

/* Header do Chat */
.ai-chat-header {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-coral), var(--brand-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(234, 91, 77, 0.3);
}

.ai-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-title-row h4 {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
}

.ai-status-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.ai-chat-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-chat-actions .btn-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.ai-chat-actions .btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Gaveta de Configuração Interna */
.ai-config-drawer {
  background: rgba(13, 16, 24, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 16px;
  animation: fadeIn 0.25s ease;
}

.btn-sm-text {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-sm-text:hover {
  color: #fff;
}

/* Corpo das Mensagens */
.ai-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.ai-chat-body::-webkit-scrollbar {
  width: 5px;
}
.ai-chat-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Balões de Mensagem */
.ai-message {
  display: flex;
  flex-direction: column;
  max-width: 90%;
  animation: fadeIn 0.25s ease;
}

.ai-message.ai-user {
  align-self: flex-end;
}

.ai-message.ai-user .ai-bubble {
  background: linear-gradient(135deg, var(--brand-coral) 0%, #d946ef 100%);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 4px 14px rgba(234, 91, 77, 0.3);
}

.ai-message.ai-bot {
  align-self: flex-start;
}

.ai-message.ai-bot .ai-bubble {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border-radius: 16px 16px 16px 4px;
}

.ai-bubble {
  padding: 12px 14px;
  font-size: 0.84rem;
  line-height: 1.5;
}

.ai-bubble p {
  margin: 0 0 6px 0;
}
.ai-bubble p:last-child {
  margin-bottom: 0;
}

.ai-bubble strong {
  color: #fff;
  font-weight: 700;
}

.ai-bubble blockquote {
  border-left: 3px solid var(--brand-gold);
  background: rgba(255, 200, 59, 0.08);
  margin: 8px 0;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
}

.ai-bubble ul, .ai-bubble ol {
  margin: 6px 0 6px 18px;
  padding: 0;
}

.ai-bubble li {
  margin-bottom: 4px;
}

.ai-bubble code {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--brand-gold);
}

/* Chips de Perguntas Rápidas */
.ai-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.ai-chip:hover {
  background: rgba(234, 91, 77, 0.2);
  border-color: var(--brand-coral);
  color: #fff;
  transform: translateY(-1px);
}

/* Indicador de Digitação */
.ai-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
}

.ai-typing-dot {
  width: 6px;
  height: 6px;
  background: var(--brand-coral);
  border-radius: 50%;
  animation: aiBounce 1.4s infinite ease-in-out both;
}

.ai-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes aiBounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Footer do Chat */
.ai-chat-footer {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-chat-footer input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 14px;
  color: #fff;
  font-size: 0.84rem;
  outline: none;
  transition: all 0.2s;
}

.ai-chat-footer input:focus {
  border-color: var(--brand-coral);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 2px rgba(234, 91, 77, 0.25);
}

.ai-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--brand-coral), var(--brand-purple));
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s;
  flex-shrink: 0;
}

.ai-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(234, 91, 77, 0.4);
}

/* Botões de Ferramentas do Chat (Anexo & Microfone) */
.ai-tool-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.ai-tool-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.ai-tool-btn.recording {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  animation: micPulseGlow 1.2s infinite ease-in-out;
}

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

/* Barra de Preview de Anexo */
.ai-attachment-preview {
  margin: 0 14px 8px 14px;
  padding: 8px 12px;
  background: rgba(45, 212, 191, 0.08);
  border: 1px dashed var(--brand-teal);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: #fff;
  animation: slideDownFade 0.2s ease-out;
}

.ai-attachment-info {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-attachment-name {
  font-weight: 600;
  color: #2dd4bf;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.btn-remove-att {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-remove-att:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Barra de Gravação de Voz */
.ai-voice-indicator {
  margin: 0 14px 8px 14px;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: #fca5a5;
  animation: slideDownFade 0.2s ease-out;
}

.ai-voice-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  animation: dotPulse 1s infinite;
  flex-shrink: 0;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.btn-stop-voice {
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-stop-voice:hover {
  background: #dc2626;
  transform: scale(1.04);
}

@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modo Claro Adaptativo */
body.light-theme .ai-tool-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

body.light-theme .ai-tool-btn:hover {
  background: #e2e8f0;
}

body.light-theme .ai-attachment-preview {
  background: rgba(13, 148, 136, 0.08);
  border-color: #0d9488;
  color: #0f172a;
}

body.light-theme .ai-attachment-name {
  color: #0d9488;
}

/* Caixa de IA dentro da tela de Credenciais */
.settings-ai-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 16px;
}

/* Adaptação para o Modo Claro (Light Theme) */
body.light-theme .ai-chat-window {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

body.light-theme .ai-chat-header {
  background: rgba(0, 0, 0, 0.02);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .ai-title-row h4 {
  color: #0f172a;
}

body.light-theme .ai-message.ai-bot .ai-bubble {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #1e293b;
}

body.light-theme .ai-bubble strong {
  color: #0f172a;
}

body.light-theme .ai-bubble code {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #b45309;
}

body.light-theme .ai-chip {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
}

body.light-theme .ai-chip:hover {
  background: rgba(234, 91, 77, 0.15);
  color: var(--brand-coral);
}

body.light-theme .ai-chat-footer {
  background: #f8fafc;
  border-top-color: #e2e8f0;
}

body.light-theme .ai-chat-footer input {
  background: #fff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-theme .ai-config-drawer {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

body.light-theme .settings-ai-box {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* ==========================================================================
   RADAR WEB & AGENTES VIRAIS — STYLES
   ========================================================================== */
.nav-badge-pulse {
  background: var(--grad-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  box-shadow: var(--shadow-glow-coral);
  animation: radarBadgePulse 2s infinite ease-in-out;
}

@keyframes radarBadgePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.85; }
}

.radar-hero-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.radar-hero-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.radar-scan-meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.radar-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.radar-interval-select {
  background: rgba(30, 41, 59, 0.9);
  color: #fff;
  border: 1px solid rgba(45, 212, 191, 0.4);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  cursor: pointer;
  outline: none;
}

.radar-interval-select:focus {
  border-color: var(--brand-teal);
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.4);
}

.radar-controls-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  backdrop-filter: var(--glass-blur);
}

.radar-search-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.radar-search-input-wrap {
  flex: 1;
  position: relative;
  min-width: 260px;
}

.radar-search-input-wrap input {
  padding-left: 40px;
  font-size: 0.95rem;
  border-color: rgba(45, 212, 191, 0.3);
}

.radar-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  opacity: 0.7;
}

.radar-categories-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 2px 4px 2px;
  scrollbar-width: thin;
}

.radar-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.radar-chip:hover {
  background: rgba(45, 212, 191, 0.15);
  border-color: var(--brand-teal);
  color: var(--text-main);
  transform: translateY(-2px);
}

.radar-chip.active {
  background: var(--grad-teal);
  color: #0b0d13;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(45, 212, 191, 0.35);
  font-weight: 700;
}

/* Filtros em 2 Níveis do Radar: Lojas e Nichos */
.radar-filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.radar-label-icon {
  font-size: 0.95rem;
}

.radar-marketplace-tabs-bar {
  padding-bottom: 6px;
}

.radar-marketplace-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px 2px;
  scrollbar-width: thin;
}

.radar-mp-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 22px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.radar-mp-tab:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
}

.radar-mp-tab .radar-mp-count {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
}

.radar-mp-tab.active {
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.radar-mp-tab[data-platform="all"].active {
  background: var(--grad-teal);
  color: #0b0d13;
  border-color: transparent;
}
.radar-mp-tab[data-platform="all"].active .radar-mp-count {
  background: rgba(0, 0, 0, 0.2);
  color: #0b0d13;
}

.radar-mp-tab[data-platform="shopee"].active {
  background: linear-gradient(135deg, #ee4d2d, #ff6b4a);
  color: #fff;
  border-color: #ee4d2d;
}

.radar-mp-tab[data-platform="mercadolivre"].active {
  background: linear-gradient(135deg, #ffe600, #ffd000);
  color: #111;
  border-color: #ffe600;
}

.radar-mp-tab[data-platform="amazon"].active {
  background: linear-gradient(135deg, #ff9900, #ffb347);
  color: #111;
  border-color: #ff9900;
}

.radar-mp-tab[data-platform="magalu"].active {
  background: linear-gradient(135deg, #0086ff, #38bdf8);
  color: #fff;
  border-color: #0086ff;
}

.radar-mp-tab[data-platform="awin"].active {
  background: linear-gradient(135deg, #002855, #008080);
  color: #fff;
  border-color: #00d2c6;
  box-shadow: 0 4px 15px rgba(0, 210, 198, 0.35);
}

/* Container Estruturado de Ofertas por Marketplace */
.radar-products-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 24px;
}

.radar-marketplace-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: border-color 0.3s ease;
}

.radar-marketplace-section.platform-shopee {
  border-color: rgba(238, 77, 45, 0.35);
}
.radar-marketplace-section.platform-mercadolivre {
  border-color: rgba(255, 230, 0, 0.35);
}
.radar-marketplace-section.platform-amazon {
  border-color: rgba(255, 153, 0, 0.35);
}
.radar-marketplace-section.platform-magalu {
  border-color: rgba(0, 134, 255, 0.35);
}
.radar-marketplace-section.platform-awin {
  border-color: rgba(0, 210, 198, 0.35);
}

.radar-marketplace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px 22px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
}

.platform-shopee .radar-marketplace-header {
  background: linear-gradient(90deg, rgba(238, 77, 45, 0.12), transparent);
}
.platform-mercadolivre .radar-marketplace-header {
  background: linear-gradient(90deg, rgba(255, 230, 0, 0.12), transparent);
}
.platform-amazon .radar-marketplace-header {
  background: linear-gradient(90deg, rgba(255, 153, 0, 0.12), transparent);
}
.platform-magalu .radar-marketplace-header {
  background: linear-gradient(90deg, rgba(0, 134, 255, 0.12), transparent);
}
.platform-awin .radar-marketplace-header {
  background: linear-gradient(90deg, rgba(0, 210, 198, 0.12), transparent);
}

.radar-mp-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.radar-mp-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.radar-mp-total-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  color: var(--text-muted);
}

.radar-mp-summary-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.radar-mp-summary-pill {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

/* Subseção de Nichos dentro de cada Loja */
.radar-niche-section {
  padding: 22px 22px 28px 22px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.radar-niche-section:last-child {
  border-bottom: none;
}

.radar-niche-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.radar-niche-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.radar-niche-icon {
  font-size: 1.3rem;
}

.radar-niche-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.radar-niche-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 10px;
}

.radar-destination-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 20px;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: var(--brand-teal);
  letter-spacing: 0.3px;
}

.radar-destination-badge .dest-arrow {
  color: var(--brand-teal);
  font-weight: 800;
}

/* Scanner Animation */
.radar-scanner-box {
  background: rgba(18, 21, 32, 0.9);
  border: 1px dashed var(--brand-teal);
  border-radius: var(--radius-md);
  padding: 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.radar-scanner-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--brand-teal), transparent);
  box-shadow: 0 0 15px var(--brand-teal);
  animation: radarScan 1.6s infinite ease-in-out;
}

@keyframes radarScan {
  0% { top: 0; opacity: 0.3; }
  50% { top: 100%; opacity: 1; }
  100% { top: 0; opacity: 0.3; }
}

/* Grid de Produtos Virais */
.radar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
  margin-top: 20px;
}

.radar-product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: var(--shadow-card);
}

.radar-product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(45, 212, 191, 0.4);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.6), 0 0 20px rgba(45, 212, 191, 0.15);
}

.radar-card-media {
  position: relative;
  width: 100%;
  height: 210px;
  background: #ffffff;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
}

.radar-card-media img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.35s ease;
}

.radar-product-card:hover .radar-card-media img {
  transform: scale(1.03);
}

.radar-store-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.radar-store-amazon {
  background: rgba(255, 153, 0, 0.85);
  color: #111;
}

.radar-store-shopee {
  background: rgba(238, 77, 45, 0.9);
  color: #fff;
}

.radar-store-mercadolivre {
  background: rgba(255, 230, 0, 0.9);
  color: #111;
}

.radar-store-magalu {
  background: rgba(0, 134, 255, 0.9);
  color: #fff;
}

.radar-store-awin {
  background: linear-gradient(135deg, #002855, #006070);
  color: #00d2c6;
  border: 1px solid rgba(0, 210, 198, 0.4);
}

.radar-score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 200, 59, 0.5);
  color: var(--brand-gold);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
  z-index: 2;
  backdrop-filter: blur(8px);
}

.radar-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.radar-card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-teal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.radar-verified-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-teal);
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
  width: fit-content;
}

.radar-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
}

.radar-card-reason {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
  border-radius: 6px;
  border-left: 3px solid var(--brand-gold);
}

.radar-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  padding-bottom: 12px;
}

.radar-price-old {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: line-through;
}

.radar-price-current {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-mint);
}

.radar-discount-chip {
  background: rgba(234, 91, 77, 0.2);
  color: var(--brand-coral);
  border: 1px solid rgba(234, 91, 77, 0.4);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: auto;
}

.radar-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

.btn-radar-primary {
  background: var(--grad-primary);
  color: #fff;
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(234, 91, 77, 0.3);
}

.btn-radar-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 91, 77, 0.45);
  filter: brightness(1.1);
}

.radar-secondary-actions {
  display: flex;
  gap: 8px;
}

.btn-radar-copy, .btn-radar-view {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-radar-copy:hover {
  background: rgba(255, 200, 59, 0.15);
  color: var(--brand-gold);
  border-color: var(--brand-gold);
}

.btn-radar-view:hover {
  background: rgba(45, 212, 191, 0.15);
  color: var(--brand-teal);
  border-color: var(--brand-teal);
}

/* Toast de Notificação do Radar */
.radar-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: #fff;
  padding: 14px 24px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}

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

/* Suporte a Tema Claro no Radar */
[data-theme="light"] .radar-hero-banner {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  border-color: rgba(45, 212, 191, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .radar-card-media {
  background: #f1f5f9;
}

[data-theme="light"] .radar-chip {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

[data-theme="light"] .radar-card-reason {
  background: #f8fafc;
  color: #475569;
}

/* Badge e Identidade Visual SHEIN */
.badge.shein, .badge.SHEIN {
  background: #000000;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   MODAL DE SELEÇÃO DE GRUPOS DO WHATSAPP
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modalFadeIn 0.25s ease-out;
}

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

.modal-card {
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.modal-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.modal-toolbar {
  padding: 14px 24px 8px;
}

.modal-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.modal-search-wrap .search-icon {
  position: absolute;
  left: 12px;
  font-size: 1rem;
  pointer-events: none;
  opacity: 0.6;
}

.modal-search-wrap input {
  padding-left: 38px;
  width: 100%;
}

.modal-filter-chips {
  display: flex;
  gap: 8px;
  padding: 4px 24px 12px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.modal-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.modal-chip.active {
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(234, 91, 77, 0.35);
}

.modal-body-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 50vh;
}

.modal-group-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.2s ease;
}

.modal-group-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(45, 212, 191, 0.4);
}

.modal-group-row.selected {
  border-color: var(--brand-teal);
  background: rgba(45, 212, 191, 0.08);
}

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

.modal-group-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-group-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-color);
  background: rgba(11, 13, 19, 0.85);
}

.btn-xs {
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 6px;
}

.badge-monitored {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.badge-target {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

/* ==========================================================================
   WHATSAPP MULTI-CHIP (TABS, BADGES & SELETORES)
   ========================================================================== */
.chip-tabs-container {
  padding: 8px 16px 0;
  border-bottom: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.4);
}

.chip-tabs-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.chip-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.chip-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.chip-tab-btn.active {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.2), rgba(16, 185, 129, 0.15));
  border-color: rgba(37, 211, 102, 0.5);
  color: #4ade80;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(37, 211, 102, 0.15);
}

.chip-tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.chip-tab-dot.online {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.chip-tab-dot.offline {
  background: #ef4444;
}

.chip-tab-dot.warning, .chip-tab-dot.connecting {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

.chip-tab-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 8px;
  background: transparent;
  border: 1px dashed var(--border-color);
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.chip-tab-add-btn:hover {
  border-color: #38bdf8;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.chip-header-info {
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* Badges de Identificação de Chip nos Cards de Grupo */
.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
}

.badge-chip.chip-1 {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.badge-chip.chip-2 {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
}

.badge-chip.chip-3 {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.35);
}

.badge-chip.chip-generic {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

/* Filtros por Chip no Modal */
.modal-chip-origin-bar {
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.modal-subchip {
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-subchip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.modal-subchip.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 600;
}

/* ==========================================================================
   SISTEMA DE TAGS SEMÂNTICAS & ROTEAMENTO POR NICHOS
   ========================================================================== */

.modal-card-sm {
  max-width: 560px !important;
  width: 95%;
}

.modal-card-md {
  max-width: 680px !important;
  width: 95%;
}

.group-tags-info-box {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 8px;
  padding: 12px 14px;
  line-height: 1.45;
}

.tags-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.tag-select-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.tag-select-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}

.tag-select-item.checked {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.45);
}

.tag-select-item input[type="checkbox"] {
  accent-color: #6366f1;
  width: 17px;
  height: 17px;
  cursor: pointer;
}

.tag-select-item .tag-icon {
  font-size: 1.25rem;
}

.tag-select-item .tag-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Badges de Tags para Cards e Tabelas */
.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge-tag-geral {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.3);
}

.badge-tag-casa_cozinha {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.badge-tag-eletronicos {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.badge-tag-moda_beleza {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border-color: rgba(236, 72, 153, 0.3);
}

.badge-tag-games {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.3);
}

.badge-tag-bebe_infantil {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border-color: rgba(6, 182, 212, 0.3);
}

.badge-tag-ferramentas {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.35);
}

.badge-tag-supermercado {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.group-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ==========================================================================
   CENTRO DE OFERTAS ESPIONADAS & APROVAÇÃO
   ========================================================================== */

.deals-filter-chip {
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.deals-filter-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.deals-filter-chip.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
  color: #a5b4fc;
}

.deals-thumb-wrap {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.deals-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.2s ease;
}

.deals-thumb-wrap:hover img {
  transform: scale(1.06);
}

.source-group-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-action-send {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #fff !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}

.btn-action-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.55);
}

.btn-action-view {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.35) !important;
}

.btn-action-view:hover {
  background: rgba(59, 130, 246, 0.25) !important;
}

.deal-scheduled-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   GERENCIADOR DE METAS & CADÊNCIA DIÁRIA (PACING ENGINE)
   ========================================================================== */
.pacing-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.pacing-preset-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.pacing-preset-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.pacing-preset-card.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(139, 92, 246, 0.12) 100%);
  border-color: #6366f1;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}

.pacing-preset-card .preset-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.pacing-preset-card .preset-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.pacing-preset-card.active .preset-info h4 {
  color: #a5b4fc;
}

.pacing-preset-card .preset-volume {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #34d399;
  margin-top: 2px;
}

.pacing-preset-card .preset-spacing {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.pacing-preset-card .preset-check-icon {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #6366f1;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s ease;
}

.pacing-preset-card.active .preset-check-icon {
  opacity: 1;
  transform: scale(1);
}

.preset-recommended-chip {
  position: absolute;
  top: -8px;
  right: 10px;
  background: linear-gradient(135deg, #f59e0b 0%, #ea5b4d 100%);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
  letter-spacing: 0.5px;
}

.pacing-progress-bar-fill {
  background: linear-gradient(90deg, #10b981 0%, #3b82f6 50%, #8b5cf6 100%) !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  animation: pacingBarGlow 3s infinite ease-in-out;
}

@keyframes pacingBarGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

.pacing-advisor-banner {
  animation: fadeInBanner 0.4s ease;
}

@keyframes fadeInBanner {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   ESTILOS: ABA DADOS & MÉTRICAS (ANALYTICS & META ADS)
   ========================================================================== */

.platform-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
}

.platform-bar-label {
  width: 100px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #e2e8f0;
}

.platform-bar-track {
  flex: 1;
  height: 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}

.platform-bar-fill {
  height: 100%;
  border-radius: 7px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.platform-bar-fill.shopee { background: linear-gradient(90deg, #ee4d2d, #ff7337); }
.platform-bar-fill.mercadolivre { background: linear-gradient(90deg, #ffe600, #f59e0b); }
.platform-bar-fill.amazon { background: linear-gradient(90deg, #ff9900, #e67a00); }
.platform-bar-fill.magalu { background: linear-gradient(90deg, #0086ff, #00b4d8); }
.platform-bar-fill.shein { background: linear-gradient(90deg, #333333, #666666); }
.platform-bar-fill.outros { background: linear-gradient(90deg, #64748b, #94a3b8); }

.platform-bar-value {
  width: 90px;
  text-align: right;
  flex-shrink: 0;
  font-weight: 700;
  color: #fff;
  font-size: 0.75rem;
}

/* Gráfico de Horários de Pico em Barras */
.hourly-bars-container {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 90px;
  padding-top: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hourly-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}

.hourly-bar-fill {
  width: 100%;
  min-height: 4px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #3b82f6 0%, rgba(59, 130, 246, 0.3) 100%);
  transition: height 0.5s ease;
  cursor: pointer;
}

.hourly-bar-fill:hover {
  background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
  filter: brightness(1.2);
}

.hourly-bar-fill.peak {
  background: linear-gradient(180deg, #f59e0b 0%, #ef4444 100%) !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

/* Timeline dos Disparos */
.dispatch-day-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 4px;
}

.dispatch-day-bar {
  width: 100%;
  max-width: 28px;
  min-height: 6px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #10b981 0%, rgba(16, 185, 129, 0.3) 100%);
  transition: height 0.5s ease;
}

.dispatch-day-label {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
}

.dispatch-day-value {
  font-size: 0.65rem;
  color: #fff;
  font-weight: 700;
}


/* ==========================================================================
   AUDITORIA E BLINDAGEM DE ALTO CONTRASTE: MODO CLARO (LIGHT THEME)
   Garante 100% de legibilidade em fundos brancos, botões, tabelas e modais
   ========================================================================== */

[data-theme="light"] {
  --text-main: #0f172a !important;
  --text-muted: #334155 !important;
  --text-dim: #64748b !important;
  --border-color: rgba(0, 0, 0, 0.12) !important;
}

/* Tipografia e Títulos no Modo Claro */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
  color: #0f172a !important;
}

[data-theme="light"] strong,
[data-theme="light"] b {
  color: #0f172a;
}

[data-theme="light"] .text-muted {
  color: #475569 !important;
}

[data-theme="light"] code {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

/* Superfícies e Cards de Vidro no Modo Claro */
[data-theme="light"] .glass-card,
[data-theme="light"] .subcard {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.05), 0 0 1px 1px rgba(0, 0, 0, 0.04) !important;
  color: #0f172a !important;
}

[data-theme="light"] .stat-card {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .stat-card .stat-label {
  color: #475569 !important;
  font-weight: 600 !important;
}

[data-theme="light"] .stat-card .stat-value {
  color: #0f172a !important;
  font-weight: 800 !important;
}

/* Tabelas com Alto Contraste (Centro de Ofertas, Fila, Concorrentes, Comunidade) */
[data-theme="light"] .data-table {
  background: #ffffff !important;
}

[data-theme="light"] .data-table th {
  background: #f8fafc !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  border-bottom: 2px solid #cbd5e1 !important;
  font-size: 0.78rem !important;
}

[data-theme="light"] .data-table td {
  color: #1e293b !important;
  border-bottom: 1px solid #e2e8f0 !important;
  font-size: 0.82rem !important;
}

[data-theme="light"] .data-table tr:hover td {
  background: #f8fafc !important;
}

[data-theme="light"] .table-deal-title {
  color: #0f172a !important;
  font-weight: 600 !important;
}

[data-theme="light"] .table-deal-title:hover {
  color: #4f46e5 !important;
}

[data-theme="light"] .price-current {
  color: #047857 !important;
  font-weight: 800 !important;
}

[data-theme="light"] .price-original {
  color: #64748b !important;
}

[data-theme="light"] .price-discount {
  color: #059669 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .source-group-pill {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600 !important;
}

/* Botões de Ação com Alto Contraste no Modo Claro */
[data-theme="light"] .btn-secondary {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  font-weight: 600 !important;
}

[data-theme="light"] .btn-secondary:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #000000 !important;
}

[data-theme="light"] .btn-action-send {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3) !important;
}

[data-theme="light"] .btn-action-send:hover {
  filter: brightness(1.1) !important;
  color: #ffffff !important;
}

[data-theme="light"] .btn-action-view {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600 !important;
}

[data-theme="light"] .btn-action-view:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .btn-action-delete,
[data-theme="light"] .btn-danger-outline {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border: 1px solid #fca5a5 !important;
}

[data-theme="light"] .btn-action-delete:hover,
[data-theme="light"] .btn-danger-outline:hover {
  background: #fee2e2 !important;
  color: #991b1b !important;
}

[data-theme="light"] #btn-clear-queue {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fca5a5 !important;
  font-weight: 700 !important;
}

[data-theme="light"] #btn-clear-queue:hover {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border-color: #f87171 !important;
}

[data-theme="light"] .deals-filter-chip {
  background: #ffffff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600 !important;
}

[data-theme="light"] .deals-filter-chip.active {
  background: #6366f1 !important;
  color: #ffffff !important;
  border-color: #4f46e5 !important;
  font-weight: 700 !important;
}

/* Badges de Status na Fila Anti-Ban */
[data-theme="light"] .queue-status-badge.sent,
[data-theme="light"] .badge-status.sent {
  background: #d1fae5 !important;
  color: #065f46 !important;
  border: 1px solid #34d399 !important;
  font-weight: 800 !important;
}

[data-theme="light"] .queue-status-badge.pending,
[data-theme="light"] .badge-status.pending {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #f59e0b !important;
  font-weight: 800 !important;
}

[data-theme="light"] .queue-status-badge.sending,
[data-theme="light"] .badge-status.sending {
  background: #dbeafe !important;
  color: #1e40af !important;
  border: 1px solid #60a5fa !important;
  font-weight: 800 !important;
}

[data-theme="light"] .queue-status-badge.failed,
[data-theme="light"] .badge-status.failed {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border: 1px solid #f87171 !important;
  font-weight: 800 !important;
}

/* WhatsApp & Telegram no Modo Claro */
[data-theme="light"] .chip-tab-btn {
  background: #f8fafc !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600 !important;
}

[data-theme="light"] .chip-tab-btn.active {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 2px solid #6366f1 !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15) !important;
  font-weight: 700 !important;
}

[data-theme="light"] .btn-disconnect {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fca5a5 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .btn-disconnect:hover {
  background: #fee2e2 !important;
  color: #991b1b !important;
}

[data-theme="light"] .group-card-top strong,
[data-theme="light"] .group-name {
  color: #0f172a !important;
  font-weight: 700 !important;
}

[data-theme="light"] .group-card-item {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .group-card-item:hover {
  border-color: #6366f1 !important;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.1) !important;
}

[data-theme="light"] .group-card-paused {
  border-color: #f59e0b !important;
  background: #fffdf5 !important;
}

[data-theme="light"] .group-title-box h4,
[data-theme="light"] .group-title-box .group-name {
  color: #0f172a !important;
  font-weight: 700 !important;
}

[data-theme="light"] .group-title-box .group-jid {
  color: #64748b !important;
}

[data-theme="light"] .group-card-actions,
[data-theme="light"] .group-card-actions-grid {
  border-top: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .group-features-box {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .group-feature-row {
  border-bottom-color: #edf2f7 !important;
}

[data-theme="light"] .group-feature-title {
  color: #1e293b !important;
}

[data-theme="light"] .group-feature-subtitle {
  color: #64748b !important;
}

[data-theme="light"] .group-slider {
  background-color: #cbd5e1 !important;
}

[data-theme="light"] .group-switch input:checked + .group-slider.slider-purple {
  background-color: #7c3aed !important;
}

[data-theme="light"] .group-switch input:checked + .group-slider.slider-emerald {
  background-color: #059669 !important;
}

[data-theme="light"] .group-switch input:checked + .group-slider.slider-amber {
  background-color: #d97706 !important;
}

[data-theme="light"] .btn-group-toggle.active {
  background: #fffbeb !important;
  border: 1px solid #fde68a !important;
  color: #b45309 !important;
}

[data-theme="light"] .btn-group-toggle.active:hover {
  background: #fef3c7 !important;
  border-color: #f59e0b !important;
}

[data-theme="light"] .btn-group-toggle.paused {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #047857 !important;
}

[data-theme="light"] .btn-group-toggle.paused:hover {
  background: #d1fae5 !important;
  border-color: #10b981 !important;
}

[data-theme="light"] .group-target-meta {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .pacing-badge-fast {
  background: #dbeafe !important;
  color: #1e40af !important;
  border: 1px solid #93c5fd !important;
  font-weight: 700 !important;
}

[data-theme="light"] .pacing-badge-active {
  background: #d1fae5 !important;
  color: #065f46 !important;
  border: 1px solid #6ee7b7 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .group-pacing-status-pill.active {
  background: #d1fae5 !important;
  color: #065f46 !important;
  border: 1px solid #6ee7b7 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .group-pacing-status-pill.inactive {
  background: #dbeafe !important;
  color: #1e40af !important;
  border: 1px solid #93c5fd !important;
  font-weight: 700 !important;
}

[data-theme="light"] .btn-pacing-action {
  background: #f8fafc !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .btn-pacing-action:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

/* Dados & Métricas no Modo Claro */
[data-theme="light"] .analytics-header-card {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .range-selector-wrap {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] #analytics-range-select {
  color: #0f172a !important;
  background: #f1f5f9 !important;
}

[data-theme="light"] #analytics-range-select option {
  background: #ffffff !important;
  color: #0f172a !important;
}

[data-theme="light"] .platform-bar-label {
  color: #1e293b !important;
  font-weight: 600 !important;
}

[data-theme="light"] .platform-bar-value {
  color: #0f172a !important;
  font-weight: 700 !important;
}

[data-theme="light"] .platform-bar-track {
  background: #e2e8f0 !important;
}

[data-theme="light"] .dispatch-day-label {
  color: #475569 !important;
  font-weight: 600 !important;
}

[data-theme="light"] .dispatch-day-value {
  color: #0f172a !important;
  font-weight: 800 !important;
}

[data-theme="light"] .hourly-bars-container {
  border-bottom: 2px solid #cbd5e1 !important;
}

[data-theme="light"] #top-platform-highlight {
  color: #047857 !important;
  font-weight: 700 !important;
}

[data-theme="light"] #peak-hour-highlight {
  color: #b45309 !important;
  font-weight: 700 !important;
}

[data-theme="light"] #competitors-count-badge {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fcd34d !important;
  font-weight: 700 !important;
}

[data-theme="light"] .meta-ads-promo-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%) !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

[data-theme="light"] .meta-ads-promo-banner strong {
  color: #047857 !important;
}

[data-theme="light"] .meta-ads-promo-banner p {
  color: #334155 !important;
}

[data-theme="light"] .meta-ads-promo-banner .badge-chip {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .meta-ads-promo-banner .badge-chip strong {
  color: #0f172a !important;
  font-weight: 800 !important;
}

/* Modais no Modo Claro */
[data-theme="light"] .modal-backdrop {
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(4px);
}

[data-theme="light"] .modal-card {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="light"] .modal-header {
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .modal-title {
  color: #0f172a !important;
  font-weight: 700 !important;
}

[data-theme="light"] .modal-footer {
  border-top: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .modal-close-btn {
  color: #475569 !important;
  background: #f1f5f9 !important;
}

[data-theme="light"] .modal-close-btn:hover {
  color: #0f172a !important;
  background: #e2e8f0 !important;
}

[data-theme="light"] .pacing-preset-card {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}

[data-theme="light"] .pacing-preset-card strong {
  color: #0f172a !important;
  font-weight: 700 !important;
}

[data-theme="light"] .pacing-preset-card.active {
  background: #ffffff !important;
  border: 2px solid #6366f1 !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15) !important;
}

[data-theme="light"] .pacing-custom-drawer {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .pacing-advisor-banner {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .pacing-advisor-banner strong {
  color: #0f172a !important;
}

[data-theme="light"] .tag-checkbox-item {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}

[data-theme="light"] .tag-checkbox-item strong {
  color: #0f172a !important;
}

[data-theme="light"] .tag-checkbox-item.checked {
  background: #eff6ff !important;
  border: 2px solid #3b82f6 !important;
}

[data-theme="light"] .input-field,
[data-theme="light"] select.input-field,
[data-theme="light"] textarea.input-field {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  font-weight: 500 !important;
}

[data-theme="light"] .input-field:focus,
[data-theme="light"] select.input-field:focus,
[data-theme="light"] textarea.input-field:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

[data-theme="light"] .input-field::placeholder,
[data-theme="light"] textarea::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}

[data-theme="light"] select option {
  background: #ffffff !important;
  color: #0f172a !important;
}

/* --- Controle de Cota Diária do Usuário & Distribuição Proporcional IA --- */
.user-daily-quota-card {
  transition: all 0.2s ease;
}

.btn-quick-daily-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #94a3b8;
  border-radius: 14px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-quick-daily-chip:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  color: #34d399;
  transform: translateY(-1px);
}

.btn-quick-daily-chip.active {
  background: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
  font-weight: 700;
}

[data-theme="light"] .user-daily-quota-card {
  background: #f0fdf4 !important;
  border: 1px solid #86efac !important;
}

[data-theme="light"] .user-daily-quota-card strong {
  color: #0f172a !important;
}

[data-theme="light"] .btn-quick-daily-chip {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

[data-theme="light"] .btn-quick-daily-chip:hover {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #059669 !important;
}

[data-theme="light"] .btn-quick-daily-chip.active {
  background: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
}

[data-theme="light"] #group-pacing-distribution-preview {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] #group-pacing-distribution-preview strong {
  color: #0f172a !important;
}

[data-theme="light"] #preview-distribution-text {
  color: #334155 !important;
}

/* ========================================================
   BOTAO LIGA / DESLIGA DE PARCEIROS (MARKETPLACES & LOJAS)
   ======================================================== */
.radar-partner-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 2px 6px 2px 2px;
  gap: 4px;
  transition: all 0.25s ease;
}

.radar-partner-pill:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.radar-partner-pill .radar-mp-tab {
  border: none;
  background: transparent;
  padding: 6px 10px;
}

.radar-partner-pill.partner-paused {
  opacity: 0.55;
  filter: grayscale(40%);
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.04);
}

.btn-partner-power {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #10b981;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-partner-power:hover {
  transform: scale(1.04);
  background: rgba(16, 185, 129, 0.28);
}

.btn-partner-power .power-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

.btn-partner-power.paused {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.45);
  color: #ef4444;
}

.btn-partner-power.paused:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-partner-power.paused .power-status-dot {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
}

.awin-store-toggle-btn {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.2s ease;
}

.awin-store-toggle-btn.paused {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.badge.store-paused {
  opacity: 0.65;
  filter: grayscale(40%);
}

/* --- TOGGLES MODULARES DE FONTES DE ENTRADA POR GRUPO (#10) --- */
.btn-source-toggle {
  transition: all 0.2s ease;
  user-select: none;
}
.btn-source-toggle:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}
.btn-source-toggle.on {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.btn-source-toggle.off {
  opacity: 0.65;
}
.btn-source-toggle.off:hover {
  opacity: 1;
}

.radar-chip-flash {
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
  animation: pulseFlash 2.5s infinite;
}
@keyframes pulseFlash {
  0%, 100% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.25); }
  50% { box-shadow: 0 0 16px rgba(245, 158, 11, 0.5); }
}

.radar-product-card-flash {
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
}
.radar-product-card-flash:hover {
  border-color: rgba(245, 158, 11, 0.7) !important;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15) !important;
}

/* ==========================================================================
   INTERACTIVE QUEUE PILLS & SLIDE-DOWN POPOVER
   ========================================================================== */
.queue-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-color, #e2e8f0);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.queue-pill-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.45);
  color: #a5b4fc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.queue-pill-btn.active-popover {
  background: rgba(99, 102, 241, 0.25);
  border-color: #6366f1;
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.queue-pill-btn.active-both {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.queue-pill-static {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted, #94a3b8);
  font-size: 0.8rem;
  padding: 4px 8px;
}

.pill-chevron {
  font-size: 0.7rem;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.queue-pill-btn:hover .pill-chevron {
  opacity: 1;
}

/* Floating Slide-Down Popover */
.queue-floating-popover {
  position: absolute;
  z-index: 99999;
  min-width: 250px;
  max-width: 340px;
  background: var(--bg-card, #1e293b);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(99, 102, 241, 0.2);
  padding: 12px 14px;
  animation: queueSlideDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top center;
  backdrop-filter: blur(12px);
}

@keyframes queueSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.queue-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.queue-popover-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted, #94a3b8);
}

.queue-popover-close {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.queue-popover-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Checkbox Channel Options */
.queue-channel-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: none;
  color: var(--text-color, #e2e8f0);
  font-size: 0.85rem;
}

.queue-channel-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.queue-channel-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #6366f1;
  cursor: pointer;
}

/* Target Group Selection List */
.queue-target-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.15s ease;
  color: var(--text-color, #e2e8f0);
}

.queue-target-option:hover {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

.queue-target-option.selected {
  background: rgba(99, 102, 241, 0.25);
  font-weight: 600;
  color: #ffffff;
  border-left: 3px solid #6366f1;
}

/* Datetime Input & Quick Presets */
.queue-datetime-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.queue-quick-presets {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.queue-preset-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-color, #cbd5e1);
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.queue-preset-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
  color: #fff;
}

/* ==========================================================================
   ORIGIN BADGES (Origem do Disparo na Fila Anti-Ban)
   ========================================================================== */
/* Coluna de Origem Reduzida e Compacta (~65% menor) */
.queue-origin-col {
  width: 78px !important;
  max-width: 85px !important;
  text-align: center !important;
  white-space: nowrap !important;
  padding: 4px 6px !important;
}

#tab-queue th.queue-origin-header,
#tab-queue th:nth-child(3) {
  width: 78px !important;
  max-width: 85px !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.badge-origin-shadow,
.badge-origin-flash,
.badge-origin-radar,
.badge-origin-manual {
  font-size: 0.68rem !important;
  padding: 2px 5px !important;
  border-radius: 6px !important;
  line-height: 1.2 !important;
  letter-spacing: -0.2px !important;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.badge-origin-shadow {
  background: #ede9fe;
  color: #4c1d95;
  border: 1px solid #c4b5fd;
  font-weight: 700;
}

.badge-origin-flash {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  font-weight: 700;
}

.badge-origin-radar {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
  font-weight: 700;
}

.badge-origin-manual {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  font-weight: 700;
}

/* Alto Contraste com Tipografia Escura no Modo Claro */
[data-theme="light"] .badge-origin-shadow {
  background: #f3e8ff !important;
  color: #4c1d95 !important;
  border: 1.5px solid #a855f7 !important;
  font-weight: 800 !important;
}

[data-theme="light"] .badge-origin-radar {
  background: #e0f2fe !important;
  color: #0c4a6e !important;
  border: 1.5px solid #38bdf8 !important;
  font-weight: 800 !important;
}

[data-theme="light"] .badge-origin-flash {
  background: #fef3c7 !important;
  color: #78350f !important;
  border: 1.5px solid #f59e0b !important;
  font-weight: 800 !important;
}

[data-theme="light"] .badge-origin-manual {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border: 1.5px solid #94a3b8 !important;
  font-weight: 800 !important;
}

/* Modo Escuro para as Badges de Origem */
[data-theme="dark"] .badge-origin-shadow,
body:not([data-theme="light"]) .badge-origin-shadow {
  background: rgba(139, 92, 246, 0.22);
  color: #ddd6fe;
  border-color: rgba(139, 92, 246, 0.45);
}

[data-theme="dark"] .badge-origin-flash,
body:not([data-theme="light"]) .badge-origin-flash {
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.45);
}

[data-theme="dark"] .badge-origin-radar,
body:not([data-theme="light"]) .badge-origin-radar {
  background: rgba(14, 165, 233, 0.22);
  color: #bae6fd;
  border-color: rgba(14, 165, 233, 0.45);
}

[data-theme="dark"] .badge-origin-manual,
body:not([data-theme="light"]) .badge-origin-manual {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   ALTO CONTRASTE E FONTE ESCURA NO MODO CLARO (FILA ANTI-BAN E TABELAS)
   ========================================================================== */
[data-theme="light"] #tab-queue .data-table th {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  border-bottom: 2px solid #94a3b8 !important;
}

[data-theme="light"] #tab-queue .data-table td {
  color: #0f172a !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  border-bottom: 1px solid #cbd5e1 !important;
}

[data-theme="light"] #tab-queue .data-table td strong {
  color: #020617 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .queue-pill-btn {
  background: #ffffff !important;
  border: 1.5px solid #94a3b8 !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .queue-pill-btn:hover {
  background: #f1f5f9 !important;
  border-color: #4f46e5 !important;
  color: #4338ca !important;
}

[data-theme="light"] .queue-pill-btn.active-popover {
  background: #eef2ff !important;
  border-color: #4338ca !important;
  color: #312e81 !important;
  box-shadow: 0 0 0 2px rgba(67, 56, 202, 0.25) !important;
}

[data-theme="light"] .queue-pill-btn.active-both {
  background: #ecfdf5 !important;
  border-color: #059669 !important;
  color: #065f46 !important;
}

[data-theme="light"] .queue-pill-static {
  color: #1e293b !important;
  font-weight: 700 !important;
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
}

[data-theme="light"] .pill-chevron {
  color: #334155 !important;
  opacity: 1 !important;
  font-weight: 800 !important;
}

[data-theme="light"] #tab-queue .badge.pending {
  background: #fef3c7 !important;
  color: #78350f !important;
  border: 1.5px solid #d97706 !important;
  font-weight: 800 !important;
}

[data-theme="light"] #tab-queue .badge.sent {
  background: #d1fae5 !important;
  color: #064e3b !important;
  border: 1.5px solid #059669 !important;
  font-weight: 800 !important;
}

[data-theme="light"] #tab-queue .badge.sending {
  background: #dbeafe !important;
  color: #1e3a8a !important;
  border: 1.5px solid #2563eb !important;
  font-weight: 800 !important;
}

[data-theme="light"] #tab-queue .badge.failed {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border: 1.5px solid #dc2626 !important;
  font-weight: 800 !important;
}

/* Popover Deslizante no Modo Claro */
[data-theme="light"] .queue-floating-popover {
  background: #ffffff !important;
  border: 1.5px solid #94a3b8 !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
  color: #0f172a !important;
}

[data-theme="light"] .queue-popover-header {
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .queue-popover-title {
  color: #0f172a !important;
  font-weight: 800 !important;
}

[data-theme="light"] .queue-popover-close {
  color: #64748b !important;
}

[data-theme="light"] .queue-popover-close:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

[data-theme="light"] .queue-channel-option {
  color: #0f172a !important;
  font-weight: 600 !important;
}

[data-theme="light"] .queue-channel-option:hover {
  background: #f1f5f9 !important;
}

[data-theme="light"] .queue-target-option {
  color: #0f172a !important;
  font-weight: 600 !important;
}

[data-theme="light"] .queue-target-option:hover {
  background: #f1f5f9 !important;
  color: #4338ca !important;
}

[data-theme="light"] .queue-target-option.selected {
  background: #e0e7ff !important;
  color: #312e81 !important;
  border-left: 3px solid #4338ca !important;
}

[data-theme="light"] .queue-preset-btn {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  font-weight: 600 !important;
}

[data-theme="light"] .queue-preset-btn:hover {
  background: #e0e7ff !important;
  border-color: #6366f1 !important;
  color: #312e81 !important;
}

[data-theme="light"] .queue-datetime-form input[type="datetime-local"] {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #0f172a !important;
  font-weight: 600 !important;
}

/* ==========================================================================
   RADAR VIEW MODE TOGGLE & LIST PRESENTATION
   ========================================================================== */
.radar-view-mode-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}

.btn-radar-view-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-radar-view-mode:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.btn-radar-view-mode.active {
  background: var(--brand-teal);
  color: #042f2e;
  box-shadow: 0 2px 8px rgba(45, 212, 191, 0.4);
  font-weight: 700;
}

/* Radar List Table Container */
.radar-list-wrapper {
  margin-top: 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}

.radar-list-table {
  width: 100%;
  border-collapse: collapse;
}

.radar-list-table th {
  background: rgba(15, 23, 42, 0.85);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.radar-list-table td {
  padding: 12px 14px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}

.radar-list-table tr:last-child td {
  border-bottom: none;
}

.radar-list-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* Thumbnail em Destaque na Frente */
.radar-list-thumb-wrapper {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.radar-list-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.radar-list-thumb-wrapper:hover .radar-list-thumb-img {
  transform: scale(1.12);
}

.radar-list-thumb-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  background: #f59e0b;
  color: #fff;
  font-size: 0.65rem;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Coluna de Produto & Detalhes */
.radar-list-title-wrap {
  line-height: 1.35;
}

.radar-list-title-link {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.radar-list-title-link:hover {
  color: var(--brand-teal);
  text-decoration: underline;
}

.radar-list-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 5px;
}

.radar-list-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--brand-teal);
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.radar-list-verified {
  font-size: 0.68rem;
  font-weight: 600;
  color: #2ecc71;
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.radar-list-reason {
  font-size: 0.72rem;
  color: var(--text-muted);
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Loja & Nicho / Destino */
.radar-list-store-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.radar-list-store-wrap .radar-store-pill {
  position: static;
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.7rem;
  width: fit-content;
  box-shadow: none;
}

.radar-list-target-niche {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.25;
}

/* Preço Stack */
.radar-list-price-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.radar-list-price-stack .radar-price-old {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.radar-list-price-stack .radar-price-current {
  font-size: 1rem;
  font-weight: 800;
  color: #10b981;
}

.radar-list-price-stack .radar-discount-chip {
  font-size: 0.68rem;
  font-weight: 700;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
  width: fit-content;
}

/* Ações Rápidas em Linha */
.radar-list-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.radar-list-actions-group .btn-radar-primary {
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 6px;
}

.radar-list-actions-group .btn-radar-copy {
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 6px;
}

.radar-list-actions-group .btn-radar-view {
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

/* Tema Claro (High Contrast) */
[data-theme="light"] .radar-view-mode-toggle {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

[data-theme="light"] .btn-radar-view-mode {
  color: #475569;
}

[data-theme="light"] .btn-radar-view-mode:hover {
  background: #e2e8f0;
  color: #0f172a;
}

[data-theme="light"] .btn-radar-view-mode.active {
  background: #0d9488;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.35);
}

[data-theme="light"] .radar-list-wrapper {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .radar-list-table th {
  background: #f8fafc;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
}

[data-theme="light"] .radar-list-table td {
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
}

[data-theme="light"] .radar-list-table tr:hover td {
  background: #f8fafc;
}

[data-theme="light"] .radar-list-thumb-wrapper {
  background: #f8fafc;
  border-color: #cbd5e1;
}

[data-theme="light"] .radar-list-title-link {
  color: #0f172a !important;
  font-weight: 700;
}

[data-theme="light"] .radar-list-title-link:hover {
  color: #0d9488 !important;
}

[data-theme="light"] .radar-list-reason {
  color: #475569;
}

[data-theme="light"] .radar-list-target-niche {
  color: #334155;
  font-weight: 600;
}

[data-theme="light"] .radar-list-price-stack .radar-price-current {
  color: #047857;
}

[data-theme="light"] .radar-list-price-stack .radar-price-old {
  color: #64748b;
}

[data-theme="light"] .radar-score-badge {
  background: #fffbeb !important;
  border: 1px solid #f59e0b !important;
  color: #b45309 !important;
}

/* ==========================================================================
   ABA AGENTES PROMOSCHEI (CENTRAL MULTI-LLM) — ALTO CONTRASTE & DELIMITAÇÃO
   ========================================================================== */
.agents-section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.2);
  color: #e0e7ff;
  border: 1px solid rgba(99, 102, 241, 0.45);
}

.agents-hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 2px solid rgba(99, 102, 241, 0.45) !important;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.agents-hero-title {
  font-size: 1.38rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 6px 0;
}

.agents-hero-sub {
  font-size: 0.9rem;
  color: #e2e8f0;
  margin: 0;
  line-height: 1.55;
  font-weight: 500;
}

.agents-kpi-box {
  background: #1e293b;
  border: 1.5px solid #334155;
  border-radius: 12px;
  padding: 13px 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.agents-kpi-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #cbd5e1;
}

.agents-kpi-val {
  font-size: 1.18rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 3px;
}

.agents-kpi-sub {
  font-size: 0.76rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-top: 3px;
}

/* BLOCO 1: ORQUESTRADOR MESTRE */
.agents-master-card {
  background: #151b2b;
  border: 2px solid #6366f1 !important;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.14);
  overflow: hidden;
}

.agents-master-header {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.22) 0%, rgba(30, 41, 59, 0.85) 100%);
  border-bottom: 2px solid rgba(99, 102, 241, 0.35);
  padding: 16px 20px;
}

.agents-master-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: #ffffff;
}

.agents-master-desc {
  margin: 3px 0 0 0;
  font-size: 0.82rem;
  color: #e2e8f0;
  font-weight: 500;
}

.agents-field-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 5px;
  display: block;
}

.agents-routing-panel {
  background: #1e293b;
  border: 2px solid rgba(139, 92, 246, 0.45);
  border-radius: 12px;
  padding: 16px;
}

.agents-routing-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  cursor: pointer;
  display: block;
}

.agents-routing-desc {
  font-size: 0.8rem;
  color: #e2e8f0;
  margin: 3px 0 0 0;
  font-weight: 500;
}

.agents-tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1.5px solid #334155;
}

.agents-tier-card {
  background: #0f172a;
  border: 1.5px solid #475569;
  border-radius: 10px;
  padding: 10px 12px;
}

.agents-tier-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #cbd5e1;
}

.agents-tier-model {
  font-size: 0.83rem;
  font-weight: 800;
  color: #38bdf8;
  margin-top: 3px;
  word-break: break-all;
}

.agents-tier-target {
  font-size: 0.73rem;
  font-weight: 700;
  color: #c4b5fd;
  margin-top: 3px;
}

/* BLOCO 2: CONTAINER DELIMITADO DO ESQUADRÃO DE 7 AGENTES */
.agents-squad-container {
  background: rgba(15, 23, 42, 0.75);
  border: 2px solid #334155;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.agents-squad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 2px solid #334155;
}

.agents-squad-title {
  margin: 4px 0 2px 0;
  font-size: 1.18rem;
  font-weight: 800;
  color: #ffffff;
}

.agents-squad-sub {
  margin: 0;
  font-size: 0.84rem;
  color: #e2e8f0;
  font-weight: 500;
}

.agents-squad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

/* CARD INDIVIDUAL DE CADA AGENTE DO ESQUADRÃO */
.agent-llm-card {
  background: #161d2f !important;
  border: 2px solid #3b4963 !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35) !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.agent-llm-card:hover {
  transform: translateY(-2px);
  border-color: #6366f1 !important;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45) !important;
}

.agent-llm-card.agent-custom-mode {
  border-color: #10b981 !important;
}

.agent-card-top-bar {
  height: 6px;
  width: 100%;
}

.agent-card-header {
  padding: 14px 16px;
  background: rgba(30, 41, 59, 0.65);
  border-bottom: 1.5px solid #2d3a52;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.agent-num-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  background: #334155;
  color: #f8fafc;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.agent-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.agent-card-role {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  margin-top: 3px;
  letter-spacing: 0.02em;
}

.agent-mode-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
}

.agent-mode-pill.mode-auto {
  background: rgba(99, 102, 241, 0.22);
  color: #e0e7ff;
  border: 1px solid rgba(99, 102, 241, 0.5);
}

.agent-mode-pill.mode-custom {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.agent-card-body {
  padding: 16px;
}

.agent-card-desc {
  font-size: 0.83rem;
  color: #f1f5f9;
  font-weight: 500;
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.agent-tasks-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #334155;
}

.agent-task-pill {
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.73rem;
  font-weight: 600;
  color: #f1f5f9;
}

.agent-brain-box {
  background: #0f172a;
  border: 1.5px solid #334155;
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 13px;
}

.agent-brain-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: #cbd5e1;
}

.agent-brain-tier {
  color: #93c5fd;
  font-weight: 700;
}

.agent-brain-active {
  font-size: 0.86rem;
  font-weight: 800;
  color: #38bdf8;
}

.agent-brain-code {
  color: #ffffff;
  background: #1e293b;
  border: 1px solid #475569;
  padding: 2px 7px;
  border-radius: 5px;
  font-family: monospace;
  font-weight: 700;
}

.agent-brain-stats {
  font-size: 0.73rem;
  font-weight: 700;
  color: #cbd5e1;
}

.agent-brain-reason {
  font-size: 0.75rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.agent-custom-drawer {
  background: rgba(16, 185, 129, 0.09);
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  border-radius: 10px;
  padding: 12px;
  margin-top: 10px;
}

.agent-card-footer {
  padding: 12px 16px;
  border-top: 1.5px solid #2d3a52;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #111726;
}

/* ==========================================================================
   OVERRIDES DE ALTO CONTRASTE PARA TEMA CLARO ([data-theme="light"])
   Escurece todas as fontes e delimita fortemente cada card do Esquadrão
   ========================================================================== */
[data-theme="light"] .agents-section-tag {
  background: #e0e7ff;
  color: #312e81;
  border: 1px solid #818cf8;
}

[data-theme="light"] .agents-hero-card {
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
  border: 2px solid #818cf8 !important;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
}

[data-theme="light"] .agents-hero-title {
  color: #0f172a;
}

[data-theme="light"] .agents-hero-sub {
  color: #1e293b;
}

[data-theme="light"] .agents-kpi-box {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .agents-kpi-label {
  color: #334155;
}

[data-theme="light"] .agents-kpi-val {
  color: #0f172a !important;
}

[data-theme="light"] .agents-kpi-sub {
  color: #334155 !important;
}

[data-theme="light"] .agents-master-card {
  background: #ffffff;
  border: 2px solid #4f46e5 !important;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.10);
}

[data-theme="light"] .agents-master-header {
  background: linear-gradient(90deg, #e0e7ff 0%, #f8fafc 100%);
  border-bottom: 2px solid #c7d2fe;
}

[data-theme="light"] .agents-master-title {
  color: #0f172a;
}

[data-theme="light"] .agents-master-desc {
  color: #1e293b;
}

[data-theme="light"] .agents-field-label {
  color: #0f172a;
}

[data-theme="light"] .agents-routing-panel {
  background: #f8fafc;
  border: 2px solid #a5b4fc;
}

[data-theme="light"] .agents-routing-title {
  color: #0f172a;
}

[data-theme="light"] .agents-routing-desc {
  color: #1e293b;
}

[data-theme="light"] .agents-tier-grid {
  border-top: 1.5px solid #cbd5e1;
}

[data-theme="light"] .agents-tier-card {
  background: #ffffff;
  border: 1.5px solid #94a3b8;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .agents-tier-label {
  color: #1e293b;
}

[data-theme="light"] .agents-tier-model {
  color: #0369a1;
}

[data-theme="light"] .agents-tier-target {
  color: #4338ca;
}

[data-theme="light"] .agents-squad-container {
  background: #f1f5f9;
  border: 2px solid #94a3b8;
  box-shadow: inset 0 2px 6px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .agents-squad-header {
  border-bottom: 2px solid #cbd5e1;
}

[data-theme="light"] .agents-squad-title {
  color: #0f172a;
}

[data-theme="light"] .agents-squad-sub {
  color: #1e293b;
}

[data-theme="light"] .agent-llm-card {
  background: #ffffff !important;
  border: 2px solid #94a3b8 !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] .agent-llm-card:hover {
  border-color: #4f46e5 !important;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.16) !important;
}

[data-theme="light"] .agent-llm-card.agent-custom-mode {
  border-color: #059669 !important;
}

[data-theme="light"] .agent-card-header {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

[data-theme="light"] .agent-num-badge {
  background: #1e293b;
  color: #ffffff;
}

[data-theme="light"] .agent-card-title {
  color: #0f172a;
}

[data-theme="light"] .agent-mode-pill.mode-auto {
  background: #e0e7ff;
  color: #1e1b4b;
  border: 1px solid #818cf8;
}

[data-theme="light"] .agent-mode-pill.mode-custom {
  background: #d1fae5;
  color: #064e3b;
  border: 1px solid #34d399;
}

[data-theme="light"] .agent-card-desc {
  color: #1e293b;
}

[data-theme="light"] .agent-tasks-wrap {
  border-bottom: 1.5px dashed #cbd5e1;
}

[data-theme="light"] .agent-task-pill {
  background: #f1f5f9;
  border: 1px solid #94a3b8;
  color: #0f172a;
}

[data-theme="light"] .agent-brain-box {
  background: #f8fafc;
  border: 1.5px solid #94a3b8;
}

[data-theme="light"] .agent-brain-top {
  color: #1e293b;
}

[data-theme="light"] .agent-brain-tier {
  color: #1d4ed8;
}

[data-theme="light"] .agent-brain-active {
  color: #0f172a;
}

[data-theme="light"] .agent-brain-code {
  color: #1e1b4b;
  background: #e0e7ff;
  border: 1px solid #818cf8;
}

[data-theme="light"] .agent-brain-stats {
  color: #334155;
}

[data-theme="light"] .agent-brain-reason {
  color: #1e293b;
  border-top: 1px solid #cbd5e1;
}

[data-theme="light"] .agent-custom-drawer {
  background: #ecfdf5;
  border: 1.5px solid #10b981;
}

[data-theme="light"] .agent-card-footer {
  background: #f8fafc;
  border-top: 2px solid #e2e8f0;
}

/* ==========================================================================
   ESTÚDIO HELENA (#08) — SISTEMA DE BLOCOS E GAVETAS RECOLHÍVEIS
   ========================================================================== */
.helena-collapse-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  transition: all 0.18s ease;
  user-select: none;
  white-space: nowrap;
}

.helena-collapse-btn:hover {
  background: rgba(217, 119, 6, 0.16);
  border-color: #d97706;
  color: #fbbf24;
}

[data-theme="light"] .helena-collapse-btn {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

[data-theme="light"] .helena-collapse-btn:hover {
  background: #fef3c7;
  color: #b45309;
  border-color: #d97706;
}

.helena-sub-accordion {
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: rgba(15, 23, 42, 0.35);
  overflow: hidden;
  margin-bottom: 14px;
}

[data-theme="light"] .helena-sub-accordion {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.helena-sub-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 16px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid transparent;
  transition: background 0.15s ease;
  user-select: none;
}

.helena-sub-accordion-header:hover {
  background: rgba(217, 119, 6, 0.08);
}

.helena-sub-accordion-body {
  padding: 16px;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   TELA DE LOGIN DE SEGURANÇA (VPS / PAINEL WEB)
   ========================================================================== */
.auth-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at top, rgba(30, 41, 59, 0.96), rgba(9, 13, 24, 0.98));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.auth-login-overlay.hidden {
  display: none !important;
}

.auth-login-card {
  width: 100%;
  max-width: 400px;
  padding: 32px 28px;
  border-radius: 20px;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(234, 91, 77, 0.15);
  color: #f8fafc;
}

.auth-login-header {
  text-align: center;
}

.auth-error-msg {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.auth-error-msg.hidden {
  display: none !important;
}








