/* =====================================================
   AUGUSTO VIAL Y CONSTRUCCIONES - Sales Bot Dashboard
   Identidad visual: Azul marino #1D3D6B · Naranja #E8622A · Cielo #4A9FD4
   ===================================================== */

/* ============================================
   1. CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================ */
:root {
  /* Brand Colors - Augusto Vial y Construcciones */
  --brand-orange: #E8622A;
  --brand-orange-light: #F4813A;
  --brand-navy: #1D3D6B;
  --brand-sky: #4A9FD4;

  /* Primary Colors → Naranja de la marca */
  --primary: #E8622A;
  --primary-dark: #C94F1E;
  --primary-light: #F4813A;
  --primary-glow: rgba(232, 98, 42, 0.4);
  
  /* Accent Colors */
  --success: #2ecc71;
  --success-light: #55efc4;
  --warning: #fdcb6e;
  --warning-dark: #f39c12;
  --danger: #ff6b6b;
  --danger-dark: #e74c3c;
  --info: #4A9FD4;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #E8622A 0%, #C94F1E 100%);
  --gradient-success: linear-gradient(135deg, #55efc4 0%, #2ecc71 100%);
  --gradient-danger: linear-gradient(135deg, #ff6b6b 0%, #e74c3c 100%);
  --gradient-warning: linear-gradient(135deg, #fdcb6e 0%, #f39c12 100%);
  --gradient-dark: linear-gradient(160deg, #0d1a2e 0%, #1D3D6B 60%, #122040 100%);
  --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
  --gradient-border: linear-gradient(135deg, rgba(74,159,212,0.3) 0%, rgba(255,255,255,0.05) 100%);
  --gradient-shine: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  --gradient-brand: linear-gradient(135deg, #E8622A 0%, #F4813A 50%, #fdcb6e 100%);
  
  /* Background Colors */
  --bg-dark: #0d1a2e;
  --bg-mid: #1D3D6B;
  --bg-light: #163258;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-card-hover: rgba(74, 159, 212, 0.12);
  --bg-sidebar: rgba(13, 26, 46, 0.97);
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --text-muted: rgba(255, 255, 255, 0.5);
  --text-dark: #1D3D6B;
  
  /* Border Colors */
  --border-color: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.2);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px var(--primary-glow);
  
  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  
  /* Font Family */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Inter', sans-serif;
}

/* Light Theme Variables */
body.light-theme {
  --bg-dark: #f0f2f5;
  --bg-mid: #e1e8f0;
  --bg-light: #d1d8e0;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --bg-sidebar: rgba(255, 255, 255, 0.98);
  --text-primary: #1a1a2e;
  --text-secondary: rgba(26, 26, 46, 0.85);
  --text-muted: rgba(26, 26, 46, 0.5);
  --border-color: rgba(0, 0, 0, 0.1);
  --border-hover: rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --gradient-dark: linear-gradient(135deg, #f0f2f5 0%, #e1e8f0 50%, #d1d8e0 100%);
}

/* Force theme application for light theme */
body.light-theme {
  background: var(--gradient-dark) !important;
  color: var(--text-primary) !important;
}

body.light-theme .sidebar,
body.light-theme .stat-card,
body.light-theme .chart-card,
body.light-theme .card,
body.light-theme .wa-connection-panel,
body.light-theme .contacts-list,
body.light-theme .chat-layout,
body.light-theme .chat-contacts,
body.light-theme .chat-area,
body.light-theme .bulk-form,
body.light-theme .bulk-progress,
body.light-theme .settings-card,
body.light-theme .modal,
body.light-theme .session-slot,
body.light-theme .campaign-card,
body.light-theme .server-logs-container,
body.light-theme .status-breakdown,
body.light-theme .quick-test-section,
body.light-theme .scraper-controls,
body.light-theme .scraper-status,
body.light-theme .scraper-results,
body.light-theme .scraper-log,
body.light-theme .info-card,
body.light-theme .ai-progress-card,
body.light-theme .ai-banner,
body.light-theme .ai-notification-card {
  background: var(--bg-card) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

body.light-theme .main-content {
  background: var(--gradient-dark) !important;
}

body.light-theme .section-header h1,
body.light-theme .section-subtitle,
body.light-theme .stat-value,
body.light-theme .stat-label,
body.light-theme .form-group label,
body.light-theme .settings-card h3,
body.light-theme .chart-card h3 {
  color: var(--text-primary) !important;
}

body.light-theme .text-muted,
body.light-theme .section-subtitle {
  color: var(--text-muted) !important;
}

body.light-theme .nav-btn {
  color: var(--text-secondary);
}

body.light-theme .nav-btn:hover,
body.light-theme .nav-btn.active {
  color: var(--primary);
}

body.light-theme .chat-header {
  background: #ffffff !important;
  border-color: var(--border-color) !important;
}

body.light-theme .chat-area {
  background: #efeae2 !important;
}

body.light-theme .chat-input-area {
  background: #f0f2f5 !important;
}

body.light-theme .progress-log {
  background: #1a1a2e !important;
  color: #55efc4 !important;
}

body.light-theme .scraper-log-entries {
  background: #1a1a2e !important;
}

body.light-theme .server-logs-container {
  background: #1a1a2e !important;
}

/* ============================================
   2. BASE RESET & TYPOGRAPHY
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: var(--gradient-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
  background: var(--primary);
  color: white;
}

/* ============================================
   3. GLASSMORPHISM BASE CLASSES
   ============================================ */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.glass-hover:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Font Awesome icon sizing */
i.fa-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
}

/* ============================================
   4. APP CONTAINER & LAYOUT
   ============================================ */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* ============================================
   5. SIDEBAR - MODERN EXPANDING DESIGN
   ============================================ */
.sidebar {
  width: 72px;
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 0;
  transition: width var(--transition-base);
  z-index: 100;
  position: relative;
  overflow: hidden;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(180deg, rgba(0, 212, 170, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.sidebar:hover {
  width: 260px;
}

/* Sidebar Logo */
.sidebar-logo {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-color);
  min-height: 80px;
  position: relative;
}

.logo-icon {
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.logo-icon i,
.logo-icon svg {
  width: 28px;
  height: 28px;
}

.sidebar:hover .logo-icon {
  transform: scale(1.1);
}

.logo-text {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-10px);
  transition: all var(--transition-base);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar:hover .logo-text {
  opacity: 1;
  transform: translateX(0);
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 12px;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 12px 14px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition-base);
  white-space: nowrap;
  overflow: hidden;
  border-radius: var(--radius-md);
  position: relative;
  min-height: 48px;
}

.nav-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--gradient-primary);
  border-radius: 0 2px 2px 0;
  transition: height var(--transition-base);
}

.nav-btn:hover {
  background: rgba(0, 212, 170, 0.1);
  color: var(--text-primary);
}

.nav-btn:hover::before {
  height: 24px;
}

.nav-btn.active {
  background: rgba(0, 212, 170, 0.15);
  color: var(--primary);
}

.nav-btn.active::before {
  height: 32px;
  box-shadow: 0 0 12px var(--primary-glow);
}

.nav-icon {
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: all var(--transition-base);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.nav-icon i,
.nav-icon svg,
.nav-icon .fa-solid {
  width: 20px;
  height: 20px;
}

.nav-btn:hover .nav-icon,
.nav-btn.active .nav-icon {
  background: var(--gradient-primary);
  color: white;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.nav-label {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transform: translateX(-10px);
  transition: all var(--transition-base);
}

.sidebar:hover .nav-label {
  opacity: 1;
  transform: translateX(0);
}

/* Status dot indicator */
.status-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 50%;
  background: var(--danger);
  margin-left: auto;
  animation: pulse-dot 2s infinite;
}

.status-dot.connected {
  background: var(--success);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ============================================
   "Más herramientas" — grupo colapsable del sidebar
   ============================================ */
.nav-divider {
  height: 1px;
  background: var(--border-color);
  margin: 8px 14px;
}

.nav-more-toggle {
  cursor: pointer;
}

.nav-more-chevron {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.sidebar:hover .nav-more-chevron {
  opacity: 1;
}

.nav-more-toggle.open .nav-more-chevron {
  transform: rotate(180deg);
}

#more-tools-group {
  display: none;
  flex-direction: column;
  gap: 4px;
}

#more-tools-group.open {
  display: flex;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.sidebar-brand {
  opacity: 0.6;
  transition: opacity var(--transition-base);
}

.sidebar:hover .sidebar-brand {
  opacity: 1;
}

/* ============================================
   6. MAIN CONTENT AREA
   ============================================ */
.main-content {
  flex: 1;
  padding: 32px 40px;
  overflow-y: auto;
  position: relative;
  background: var(--gradient-dark);
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000;
}

.btn-theme {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-theme:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-theme .theme-icon {
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-theme .theme-icon i,
.btn-theme .theme-icon svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   7. SECTION & HEADERS
   ============================================ */
.section {
  display: none;
  animation: sectionFadeIn 0.4s ease-out;
  max-width: 1400px;
  margin: 0 auto;
}

.section.active {
  display: block;
}

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

.section-header {
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.section-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-header h1 i,
.section-header h1 svg,
.section-header h1 .fa-solid {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.header-actions {
  display: flex;
  gap: 12px;
}

/* ============================================
   8. STATS CARDS - MODERN DESIGN
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  position: relative;
  transition: transform var(--transition-base);
}

.stat-icon i,
.stat-icon svg,
.stat-icon .fa-solid {
  width: 28px;
  height: 28px;
}

.stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(5deg);
}

.stat-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  filter: blur(15px);
  opacity: 0.4;
  z-index: -1;
}

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

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin-top: 4px;
}

/* Explicación en texto llano debajo del label — usada en Inicio */
.stat-card-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  line-height: 1.4;
  margin: 6px 0 0;
}

.inicio-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 8px 0 0;
  line-height: 1.4;
}

.inicio-more-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 8px;
}

.inicio-more-note i {
  color: var(--text-muted);
  flex-shrink: 0;
}

.inicio-more-note span {
  flex: 1;
}

.inicio-more-note button {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Stat Card Variants */
.stat-card.accent-green .stat-icon {
  background: linear-gradient(135deg, rgba(0, 184, 148, 0.2), rgba(85, 239, 196, 0.1));
  color: var(--success-light);
}

.stat-card.accent-blue .stat-icon {
  background: linear-gradient(135deg, rgba(116, 185, 255, 0.2), rgba(85, 185, 255, 0.1));
  color: var(--info);
}

.stat-card.accent-yellow .stat-icon {
  background: linear-gradient(135deg, rgba(253, 203, 110, 0.2), rgba(243, 156, 18, 0.1));
  color: var(--warning);
}

.stat-card.accent-orange .stat-icon {
  background: linear-gradient(135deg, rgba(230, 126, 34, 0.2), rgba(243, 156, 18, 0.1));
  color: var(--warning-dark);
}

.stat-card.accent-purple .stat-icon {
  background: linear-gradient(135deg, rgba(162, 155, 254, 0.2), rgba(139, 92, 246, 0.1));
  color: #a29bfe;
}

.stat-card.accent-cyan .stat-icon {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.2), rgba(0, 184, 148, 0.1));
  color: var(--primary);
}

.stat-card.accent-red .stat-icon {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(231, 76, 60, 0.1));
  color: var(--danger);
}

/* Trend badges */
.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 8px;
}

.stat-trend.up {
  background: rgba(0, 184, 148, 0.2);
  color: var(--success-light);
}

.stat-trend.down {
  background: rgba(255, 107, 107, 0.2);
  color: var(--danger);
}

/* ============================================
   9. BUTTONS - COMPLETE REDESIGN
   ============================================ */
.btn {
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  font-weight: 600;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:active {
  transform: scale(0.98);
}

/* Primary Button */
.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 170, 0.4);
}

.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.3), 0 4px 15px rgba(0, 212, 170, 0.3);
}

/* Secondary/Outline Button */
.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: var(--bg-card);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Danger Button */
.btn-danger {
  background: var(--gradient-danger);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* Success Button */
.btn-success {
  background: var(--gradient-success);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 184, 148, 0.4);
}

/* Warning Button */
.btn-warning {
  background: var(--gradient-warning);
  color: var(--text-dark);
  box-shadow: 0 4px 15px rgba(253, 203, 110, 0.3);
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(253, 203, 110, 0.4);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
}

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

/* Button Sizes */
.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

/* Icon Button */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.btn-icon.sm {
  width: 32px;
  height: 32px;
}

/* Button with loading state */
.btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn.loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
}

/* Disabled state */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn:disabled::before {
  display: none;
}

/* ============================================
   10. CARDS & PANELS - GLASSMORPHISM
   ============================================ */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-shine);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

/* Card with gradient border on hover */
.card-gradient-hover:hover {
  border-color: transparent;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
              var(--gradient-primary) border-box;
  border: 1px solid transparent;
}

/* Lift effect on hover */
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Chart Cards */
.chart-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: all var(--transition-base);
}

.chart-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

.chart-card h3 {
  margin-bottom: 20px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-card h3 i,
.chart-card h3 svg,
.chart-card h3 .fa-solid {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.settings-card h3 i,
.settings-card h3 svg,
.settings-card h3 .fa-solid {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.info-card h4 i,
.info-card h4 svg,
.info-card h4 .fa-solid {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.scraper-results h3 i,
.scraper-results h3 svg,
.scraper-results h3 .fa-solid {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.scraper-log h3 i,
.scraper-log h3 svg,
.scraper-log h3 .fa-solid {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.bulk-progress h3 i,
.bulk-progress h3 svg,
.bulk-progress h3 .fa-solid {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.server-logs-header h3 i,
.server-logs-header h3 svg,
.server-logs-header h3 .fa-solid {
  width: 16px;
  height: 16px;
}

.login-logo-icon i,
.login-logo-icon svg,
.login-logo-icon .fa-solid {
  width: 48px;
  height: 48px;
}

.bot-power-btn .power-icon i,
.bot-power-btn .power-icon svg,
.bot-power-btn .power-icon .fa-solid {
  width: 56px;
  height: 56px;
}

.qr-placeholder-icon i,
.qr-placeholder-icon svg,
.qr-placeholder-icon .fa-solid {
  width: 64px;
  height: 64px;
}

.wa-user-info p i,
.wa-user-info p svg,
.wa-user-info p .fa-solid {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.scraper-spinner i,
.scraper-spinner svg,
.scraper-spinner .fa-solid {
  width: 20px;
  height: 20px;
}

.chat-header-placeholder i,
.chat-header-placeholder svg,
.chat-header-placeholder .fa-solid {
  width: 20px;
  height: 20px;
}

.btn-theme .theme-icon i,
.btn-theme .theme-icon svg,
.btn-theme .theme-icon .fa-solid {
  width: 18px;
  height: 18px;
}

.modal-close i,
.modal-close svg,
.modal-close .fa-solid {
  width: 18px;
  height: 18px;
}

.btn-send i,
.btn-send svg,
.btn-send .fa-solid {
  width: 22px;
  height: 22px;
}

.login-box h2 i,
.login-box h2 svg,
.login-box h2 .fa-solid {
  width: 24px;
  height: 24px;
}

.chat-empty-icon i,
.chat-empty-icon svg,
.chat-empty-icon .fa-solid {
  width: 64px;
  height: 64px;
}

.wa-instructions h4 i,
.wa-instructions h4 svg,
.wa-instructions h4 .fa-solid {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.slot-header h3 i,
.slot-header h3 svg,
.slot-header h3 .fa-solid {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.btn-clear-logs i,
.btn-clear-logs svg,
.btn-clear-logs .fa-solid {
  width: 14px;
  height: 14px;
}

.campaign-card.empty i,
.campaign-card.empty svg,
.campaign-card.empty .fa-solid {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

.quick-test-section .section-header h3 i,
.quick-test-section .section-header h3 svg,
.quick-test-section .section-header h3 .fa-solid {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.ai-banner-icon i,
.ai-banner-icon svg,
.ai-banner-icon .fa-solid {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.ai-notification-card .icon i,
.ai-notification-card .icon svg,
.ai-notification-card .icon .fa-solid {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.ai-progress-card h3 i,
.ai-progress-card h3 svg,
.ai-progress-card h3 .fa-solid {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.logo-icon i,
.logo-icon svg,
.logo-icon .fa-solid {
  width: 28px;
  height: 28px;
}

.charts-row {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.charts-row .chart-card {
  flex: 1;
}

/* ============================================
   11. FORMS & INPUTS - MODERN DESIGN
   ============================================ */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

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

.form-group:focus-within label {
  color: var(--primary);
}

.form-control,
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  transition: all var(--transition-base);
  outline: none;
}

.form-control::placeholder,
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

/* Valid state */
.form-group input.valid,
.form-group textarea.valid {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.15);
}

/* Invalid state */
.form-group input.invalid,
.form-group textarea.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}

/* Textarea styling */
textarea {
  resize: vertical;
  min-height: 100px;
}

textarea::-webkit-resizer {
  background: var(--primary);
  border-radius: 4px;
}

/* Select styling */
select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 44px;
}

body.light-theme select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231a1a2e50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Toggle/Checkbox styling */
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: normal;
}

.toggle-label span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Form row */
.form-group-row {
  display: flex;
  gap: 16px;
}

.form-group-row .form-group {
  flex: 1;
}

/* Input with icon */
.input-icon-wrapper {
  position: relative;
}

.input-icon-wrapper .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.input-icon-wrapper input {
  padding-left: 44px;
}

/* ============================================
   12. TABLES - MODERN DESIGN
   ============================================ */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table thead th {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.15), rgba(0, 184, 148, 0.1));
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table thead th:first-child {
  border-radius: var(--radius-lg) 0 0 0;
}

.data-table thead th:last-child {
  border-radius: 0 var(--radius-lg) 0 0;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr:hover {
  background: rgba(0, 212, 170, 0.08);
}

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

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:last-child td:first-child {
  border-radius: 0 0 0 var(--radius-lg);
}

.data-table tbody tr:last-child td:last-child {
  border-radius: 0 0 var(--radius-lg) 0;
}

/* ============================================
   13. MODALS - ANIMATED DESIGN
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 520px;
  max-width: 95vw;
  max-height: 90vh;
  overflow: hidden;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -30px) scale(0.95);
  z-index: 1001;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.modal.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.08), transparent);
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.modal-header h3 i,
.modal-header h3 svg,
.modal-header h3 .fa-solid {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition-base);
}

.modal-close i,
.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-close:hover {
  background: rgba(255, 107, 107, 0.2);
  color: var(--danger);
  transform: rotate(90deg);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(0, 0, 0, 0.1);
}

.modal-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  background: rgba(116, 185, 255, 0.1);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--info);
}

/* ============================================
   14. CHAT AREA - WHATSAPP STYLE
   ============================================ */
.chat-layout {
  display: flex;
  height: calc(100vh - 180px);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

/* Chat Contacts Sidebar */
.chat-contacts {
  width: 340px;
  min-width: 340px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
}

.chat-filter-tabs {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.1);
}

.chat-filter-tab {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-base);
}

.chat-filter-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.chat-filter-tab.active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
}

#chat-contacts-list {
  flex: 1;
  overflow-y: auto;
}

.chat-contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.chat-contact-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.chat-contact-item:hover {
  background: rgba(0, 212, 170, 0.05);
}

.chat-contact-item.active {
  background: rgba(0, 212, 170, 0.1);
}

.chat-contact-item.active::before {
  opacity: 1;
}

.chat-contact-item.unread {
  background: rgba(0, 212, 170, 0.08);
}

.chat-contact-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  background: var(--gradient-primary);
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

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

.chat-contact-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.chat-contact-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-contact-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.chat-contact-preview {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-contact-status-dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 50%;
}

/* Chat Area */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #efeae2;
  position: relative;
}

body.light-theme .chat-area {
  background: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
  background-size: cover;
}

/* Chat Header */
.chat-header {
  background: #f0f2f5;
  padding: 16px 24px;
  border-bottom: 1px solid #d1d1d1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

body.light-theme .chat-header {
  background: var(--bg-card);
  border-color: var(--border-color);
}

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

.chat-header-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.chat-header-text {
  display: flex;
  flex-direction: column;
}

.chat-header-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark);
}

.chat-header-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.chat-header-placeholder {
  width: 100%;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.chat-header-placeholder i,
.chat-header-placeholder svg {
  width: 20px;
  height: 20px;
}

/* Chat Header Badge */
.chat-header-badge {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Chat Messages */
.chat-messages {
  flex: 1;
  padding: 24px 60px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message {
  max-width: 65%;
  padding: 10px 14px 8px;
  border-radius: 8px;
  position: relative;
  font-size: 0.93rem;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  word-wrap: break-word;
}

.message.user {
  align-self: flex-end;
  background: #fff;
  border-top-left-radius: 0;
  color: #111;
}

.message.assistant {
  align-self: flex-start;
  background: #d9fdd3;
  border-top-right-radius: 0;
  color: #111;
}

.message.campaign-msg {
  background: #f5eeff;
  border-left: 3px solid #9b59b6;
}

.msg-content {
  margin-bottom: 2px;
}

.msg-time {
  font-size: 0.68rem;
  color: rgba(0, 0, 0, 0.5);
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  width: fit-content;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* Date Separator */
.chat-date-separator {
  text-align: center;
  margin: 16px 0 8px;
}

.chat-date-separator span {
  background: rgba(225, 218, 208, 0.95);
  color: #54656f;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Chat Empty State */
.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  padding: 30px;
}

.chat-empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-empty-icon i,
.chat-empty-icon svg {
  width: 64px;
  height: 64px;
}

/* Chat Input Area */
.chat-input-area {
  padding: 16px 24px;
  background: #f0f2f5;
  display: flex;
  gap: 12px;
  align-items: center;
}

body.light-theme .chat-input-area {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
}

.chat-input-area input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 24px;
  border: 1px solid #d1d1d1;
  font-family: inherit;
  font-size: 0.93rem;
  background: #fff;
  transition: all var(--transition-base);
}

.chat-input-area input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}

/* Send Button */
.btn-send {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.btn-send i,
.btn-send svg {
  width: 22px;
  height: 22px;
}

.btn-send:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 212, 170, 0.4);
}

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

/* ============================================
   15. BADGES & STATUS PILLS
   ============================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.status-badge:hover {
  transform: translateY(-1px);
}

/* Nuevo - Blue Bright */
.status-nuevo,
.badge-nuevo {
  background: rgba(116, 185, 255, 0.15);
  color: #74b9ff;
  border-color: rgba(116, 185, 255, 0.3);
}

/* Contactado - Cyan */
.status-contactado,
.badge-contactado {
  background: rgba(0, 212, 170, 0.15);
  color: var(--primary);
  border-color: rgba(0, 212, 170, 0.3);
}

/* Interesado - Gold/Yellow with glow */
.status-interesado,
.badge-interesado {
  background: rgba(253, 203, 110, 0.2);
  color: #fdcb6e;
  border-color: rgba(253, 203, 110, 0.4);
  box-shadow: 0 0 12px rgba(253, 203, 110, 0.2);
}

/* Cliente - Green with checkmark */
.status-cliente,
.badge-cliente {
  background: rgba(0, 184, 148, 0.15);
  color: var(--success-light);
  border-color: rgba(0, 184, 148, 0.3);
}

.status-cliente::before,
.badge-cliente::before {
  content: '✓';
  font-size: 0.65rem;
}

/* No interesado - Subtle red */
.status-no_interesado,
.badge-no_interesado {
  background: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.2);
}

/* Bloqueado */
.badge-bloqueado {
  background: rgba(127, 140, 141, 0.15);
  color: #95a5a6;
  border-color: rgba(127, 140, 141, 0.3);
}

/* Pills - Filter buttons */
.pill {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-base);
}

.pill:hover {
  background: var(--bg-card);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.pill.active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.pill--danger {
  border-color: rgba(255, 107, 107, 0.3);
  color: #ff6b6b;
}

.pill--danger:hover {
  background: rgba(255, 107, 107, 0.1);
  border-color: #ff6b6b;
  color: #ff6b6b;
  transform: translateY(-2px);
}

.pill--danger.active {
  background: var(--gradient-danger);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* ============================================
   16. WHATSAPP CONNECTION PANEL
   ============================================ */
.wa-connection-panel {
  display: flex;
  gap: 48px;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  padding: 48px;
  border-radius: var(--radius-xl);
  flex-wrap: wrap;
}

.qr-container {
  width: 280px;
  height: 280px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  position: relative;
  box-shadow: var(--shadow-md);
}

.qr-container::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--gradient-primary);
  z-index: -1;
}

.qr-image {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
}

.qr-placeholder {
  text-align: center;
  color: var(--text-dark);
  padding: 20px;
}

.qr-placeholder-icon {
  font-size: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  opacity: 0.3;
}

.qr-placeholder-icon i,
.qr-placeholder-icon svg {
  width: 64px;
  height: 64px;
}

.wa-info {
  flex: 1;
  max-width: 400px;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.status-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-muted);
  position: relative;
}

.status-indicator::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.4;
  animation: pulse-ring 2s infinite;
}

.status-indicator.connected {
  background: var(--success);
}

.status-indicator.connected::after {
  background: var(--success);
}

.status-indicator.disconnected {
  background: var(--danger);
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(1.5); opacity: 0; }
}

.wa-user-info {
  background: rgba(255, 255, 255, 0.1);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.wa-user-info p {
  margin: 6px 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wa-user-info p i,
.wa-user-info p svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.wa-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.wa-instructions {
  text-align: left;
}

.wa-instructions h4 {
  margin-bottom: 12px;
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wa-instructions h4 i,
.wa-instructions h4 svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.wa-instructions ol {
  padding-left: 20px;
  color: var(--text-muted);
}

.wa-instructions li {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

/* ============================================
   17. BOT CONTROL PANEL - FACTORY STYLE
   ============================================ */
.bot-control-panel {
  display: flex;
  gap: 24px;
  margin: 24px 0;
  align-items: stretch;
}

.bot-control-box {
  flex: 1;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.bot-control-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.bot-control-box h3 {
  margin: 0 0 16px 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Power Button - Industrial Style */
.bot-power-btn {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.2);
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.bot-power-btn::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, var(--primary), transparent);
  animation: rotate-glow 3s linear infinite;
  opacity: 0;
  transition: opacity 0.4s;
}

.bot-power-btn:hover::before {
  opacity: 1;
}

@keyframes rotate-glow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.power-icon {
  font-size: 3rem;
  transition: transform 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.power-icon i,
.power-icon svg {
  width: 56px;
  height: 56px;
}

.bot-power-btn:hover .power-icon {
  transform: scale(1.2);
}

.power-label {
  font-size: 0.8rem;
}

.bot-power-btn.bot-stopped {
  background: linear-gradient(145deg, #00b894, #00d4aa);
  color: #fff;
  border-color: #008b72;
  box-shadow: 
    0 0 30px rgba(0, 212, 170, 0.5),
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 -4px 12px rgba(0, 0, 0, 0.2);
}

.bot-power-btn.bot-stopped:hover {
  transform: scale(1.08);
  box-shadow: 
    0 0 50px rgba(0, 212, 170, 0.7),
    0 12px 40px rgba(0, 0, 0, 0.4),
    inset 0 -4px 12px rgba(0, 0, 0, 0.2);
}

.bot-power-btn.bot-running {
  background: linear-gradient(145deg, #e74c3c, #ff6b6b);
  color: #fff;
  border-color: #c0392b;
  box-shadow: 
    0 0 30px rgba(231, 76, 60, 0.5),
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 -4px 12px rgba(0, 0, 0, 0.2);
  animation: pulse-factory 2s ease-in-out infinite;
}

.bot-power-btn.bot-running:hover {
  transform: scale(1.08);
  box-shadow: 
    0 0 50px rgba(231, 76, 60, 0.7),
    0 12px 40px rgba(0, 0, 0, 0.4),
    inset 0 -4px 12px rgba(0, 0, 0, 0.2);
}

@keyframes pulse-factory {
  0%, 100% {
    box-shadow: 
      0 0 30px rgba(231, 76, 60, 0.5),
      0 8px 32px rgba(0, 0, 0, 0.3),
      inset 0 -4px 12px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 
      0 0 50px rgba(231, 76, 60, 0.8),
      0 8px 32px rgba(0, 0, 0, 0.3),
      inset 0 -4px 12px rgba(0, 0, 0, 0.2);
  }
}

.bot-power-status {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================
   18. CONTACTS LIST
   ============================================ */
.contacts-toolbar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-base);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
  outline: none;
}

.search-box::before {
  content: '🔍';
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  opacity: 0.5;
}

.filter-pills {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px;
}

.contacts-list {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.contact-item {
  display: flex;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  cursor: pointer;
}

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

.contact-item:hover {
  background: rgba(0, 212, 170, 0.08);
}

.contact-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  margin-right: 16px;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

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

.contact-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.contact-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  align-items: center;
}

.contact-meta .source-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   19. SESSIONS GRID
   ============================================ */
.sessions-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sessions-info {
  margin-bottom: 8px;
}

.info-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.info-card h4 {
  margin: 0 0 12px 0;
  color: var(--text-primary);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card h4 i,
.info-card h4 svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.info-card ol {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
}

.info-card li {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.sessions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.session-slot {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.session-slot::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.session-slot:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.session-slot:hover::before {
  opacity: 1;
}

.session-slot.connected::before {
  opacity: 1;
  background: var(--gradient-success);
}

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

.slot-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.slot-header h3 i,
.slot-header h3 svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.slot-status {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.slot-status.status-connected {
  background: rgba(0, 184, 148, 0.15);
  color: var(--success-light);
}

.slot-status.status-connecting {
  background: rgba(253, 203, 110, 0.15);
  color: var(--warning);
  animation: pulse 2s infinite;
}

.slot-status.status-disconnected {
  background: rgba(255, 107, 107, 0.1);
  color: var(--danger);
}

.slot-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.slot-qr-container {
  width: 100%;
  height: 200px;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  position: relative;
  border: 2px dashed var(--border-color);
}

.slot-phone {
  background: rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  border: 1px solid var(--border-color);
}

.slot-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slot-actions .btn {
  width: 100%;
  justify-content: center;
}

/* Unified button colors for session slots - all cyan theme */
.session-slot .btn-danger,
.session-slot .btn-warning,
.session-slot .btn-primary {
  background: var(--gradient-primary);
  box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
}

.session-slot .btn-danger:hover,
.session-slot .btn-warning:hover,
.session-slot .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 170, 0.4);
}

.session-slot .btn-danger:active,
.session-slot .btn-warning:active,
.session-slot .btn-primary:active {
  transform: scale(0.98);
}

.connecting-text {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
}

.sessions-info {
  margin-bottom: 8px;
}

.info-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.info-card h4 {
  margin: 0 0 12px 0;
  color: var(--text-primary);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card h4 i,
.info-card h4 svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.info-card ol {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
}

.info-card li {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.sessions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.session-slot {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.session-slot::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.session-slot:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.session-slot:hover::before {
  opacity: 1;
}

.session-slot.connected::before {
  opacity: 1;
  background: var(--gradient-success);
}

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

.slot-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.slot-header h3 i,
.slot-header h3 svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.slot-status {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.slot-status.status-connected {
  background: rgba(0, 184, 148, 0.15);
  color: var(--success-light);
}

.slot-status.status-connecting {
  background: rgba(253, 203, 110, 0.15);
  color: var(--warning);
  animation: pulse 2s infinite;
}

.slot-status.status-disconnected {
  background: rgba(255, 107, 107, 0.1);
  color: var(--danger);
}

.slot-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.slot-qr-container {
  width: 100%;
  height: 200px;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  position: relative;
  border: 2px dashed var(--border-color);
}

.slot-phone {
  background: rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  border: 1px solid var(--border-color);
}

.slot-actions {
  margin-top: auto;
}

.connecting-text {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
}

/* ============================================
   20. CAMPAIGNS
   ============================================ */
.campaigns-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.campaigns-toolbar {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  align-items: center;
}

.campaigns-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.campaign-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.campaign-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.campaign-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.campaign-card:hover::before {
  opacity: 1;
}

.campaign-card.empty {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.campaign-card.empty i,
.campaign-card.empty svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

.campaign-card h3 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 700;
}

.campaign-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.campaign-status {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.campaign-status .status {
  font-weight: 600;
}

.status-draft { color: var(--text-muted); }
.status-scheduled { color: var(--warning); }
.status-running { color: var(--success-light); }
.status-paused { color: var(--warning-dark); }
.status-completed { color: #a29bfe; }

/* ============================================
   21. BULK SEND
   ============================================ */
.bulk-container {
  display: flex;
  gap: 24px;
  height: calc(100vh - 200px);
}

.bulk-form {
  flex: 1;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.bulk-progress {
  width: 320px;
  min-width: 320px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.bulk-progress h3 {
  margin: 0 0 16px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.bulk-progress h3 i,
.bulk-progress h3 svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.bulk-contacts-select {
  flex: 1;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.bulk-select-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.bulk-contacts-list {
  flex: 1;
  overflow-y: auto;
}

.bulk-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

.bulk-contact-item:hover {
  background: rgba(0, 212, 170, 0.05);
}

.bulk-contact-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.bulk-actions {
  margin-top: auto;
  padding-top: 20px;
}

/* Progress Bar */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  margin: 16px 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--gradient-success);
  border-radius: inherit;
  transition: width 0.5s ease-out;
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.progress-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.progress-log {
  flex: 1;
  background: #1a1a2e;
  color: #55efc4;
  padding: 16px;
  border-radius: var(--radius-md);
  overflow-y: auto;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  margin-top: 16px;
}

.progress-log-item {
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-log-item.error {
  color: var(--danger);
}

.progress-log-item.success {
  color: var(--success-light);
}

/* ============================================
   22. SETTINGS
   ============================================ */
.settings-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 24px;
  padding-bottom: 40px;
}

.settings-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.settings-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.settings-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

.settings-card:hover::before {
  opacity: 1;
}

.settings-card h3 {
  margin: 0 0 20px 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.settings-card h3 i,
.settings-card h3 svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.settings-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  position: sticky;
  bottom: 24px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 24px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  margin-top: 24px;
}

/* ============================================
   23. SCRAPER
   ============================================ */
.scraper-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.scraper-controls {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.08), rgba(0, 184, 148, 0.05));
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: var(--radius-xl);
  padding: 28px;
}

.scraper-input-group label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: block;
}

.scraper-input-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 12px;
}

.scraper-input-row select {
  padding: 14px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  background: var(--bg-card);
  color: var(--text-primary);
  min-width: 200px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.scraper-input-row select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}

.scraper-info {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.scraper-info strong {
  color: var(--primary);
}

.scraper-info small {
  opacity: 0.8;
  display: block;
  margin-top: 8px;
}

.scraper-status {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
}

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

.scraper-progress-header span:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.scraper-spinner {
  animation: spin 1s linear infinite;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.scraper-spinner i,
.scraper-spinner svg {
  width: 20px;
  height: 20px;
}

.scraper-results {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.scraper-results h3 {
  margin-bottom: 20px;
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.scraper-results h3 i,
.scraper-results h3 svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.scraper-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.scraper-result-card {
  background: var(--gradient-dark);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.scraper-result-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.scraper-result-card .result-emoji {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.scraper-result-card .result-rubro {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.scraper-result-card .result-count {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin: 8px 0;
}

.scraper-result-card .result-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.scraper-log {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.scraper-log h3 {
  margin-bottom: 16px;
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.scraper-log h3 i,
.scraper-log h3 svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.scraper-log-entries {
  max-height: 280px;
  overflow-y: auto;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.85rem;
  color: #55efc4;
  background: #0f0f23;
  border-radius: var(--radius-md);
  padding: 16px;
}

.scraper-log-entries .log-entry {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.scraper-log-entries .log-entry.success { color: #55efc4; }
.scraper-log-entries .log-entry.error { color: #ff6b6b; }
.scraper-log-entries .log-entry.info { color: #74b9ff; }

/* ============================================
   24. AI DASHBOARD
   ============================================ */
.ai-banner {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.1), rgba(0, 184, 148, 0.05));
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.ai-banner-icon {
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-banner-icon i,
.ai-banner-icon svg {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.ai-banner-content strong {
  display: block;
  color: var(--primary);
  margin-bottom: 6px;
}

.ai-banner-content span {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.ai-stat-card {
  border-top: 4px solid var(--primary);
}

.ai-stat-card .stat-icon {
  background: rgba(0, 212, 170, 0.15);
  color: var(--primary);
}

.ai-progress-card {
  margin-bottom: 24px;
  padding: 24px;
}

.ai-progress-card h3 {
  margin-top: 0;
  color: #fff;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-progress-card h3 i,
.ai-progress-card h3 svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.ai-progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.ai-progress-header span:first-child {
  color: var(--text-secondary);
}

.ai-progress-header span:last-child {
  font-family: monospace;
  color: var(--text-primary);
  font-weight: 600;
}

.ai-progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.ai-progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: inherit;
  transition: width 1s ease-out;
}

.ai-notification-card {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.05), rgba(0, 184, 148, 0.02));
  border-color: rgba(0, 212, 170, 0.2);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.ai-notification-card .icon {
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-notification-card .icon i,
.ai-notification-card .icon svg {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.ai-notification-card h3 {
  margin: 0 0 8px 0;
  color: var(--primary);
  font-size: 1rem;
}

.ai-notification-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ============================================
   25. QUICK TEST SECTION
   ============================================ */
.quick-test-section {
  background: linear-gradient(135deg, rgba(0, 184, 148, 0.08), rgba(116, 185, 255, 0.05));
  border: 1px solid rgba(0, 184, 148, 0.2);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-top: 32px;
}

.quick-test-section .section-header {
  margin-bottom: 20px;
}

.quick-test-section .section-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quick-test-section .section-header h3 i,
.quick-test-section .section-header h3 svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.quick-test-form {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.quick-test-form .form-group {
  flex: 1;
  min-width: 240px;
  margin-bottom: 0;
}

/* ============================================
   26. SERVER LOGS
   ============================================ */
.server-logs-container {
  margin-top: 24px;
  background: #1a1a2e;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  font-family: 'Monaco', 'Menlo', monospace;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.server-logs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.server-logs-header h3 {
  margin: 0;
  color: var(--success-light);
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.server-logs-header h3 i,
.server-logs-header h3 svg {
  width: 16px;
  height: 16px;
}

.btn-clear-logs {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all var(--transition-base);
}

.btn-clear-logs:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.btn-clear-logs i,
.btn-clear-logs svg {
  width: 14px;
  height: 14px;
}

#live-server-logs {
  height: 240px;
  overflow-y: auto;
  color: #ccc;
  font-size: 0.85rem;
  line-height: 1.5;
}

#live-server-logs .log-line {
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

#live-server-logs .log-line.info { color: var(--info); }
#live-server-logs .log-line.success { color: var(--success-light); }
#live-server-logs .log-line.error { color: var(--danger); }
#live-server-logs .log-line.warning { color: var(--warning); }

/* ============================================
   27. STATUS BREAKDOWN
   ============================================ */
.status-breakdown {
  margin-top: 24px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.status-breakdown h3 {
  margin: 0 0 20px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.breakdown-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.breakdown-bar-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.breakdown-bar-label {
  width: 120px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.breakdown-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.breakdown-bar-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 1s ease-out;
}

.breakdown-bar-fill.nuevo { background: linear-gradient(90deg, #74b9ff, #3498db); }
.breakdown-bar-fill.contactado { background: linear-gradient(90deg, #00d4aa, #00b894); }
.breakdown-bar-fill.interesado { background: linear-gradient(90deg, #fdcb6e, #f39c12); }
.breakdown-bar-fill.cliente { background: linear-gradient(90deg, #55efc4, #00b894); }
.breakdown-bar-fill.no_interesado { background: linear-gradient(90deg, #ff6b6b, #e74c3c); }

.breakdown-bar-value {
  width: 50px;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================
   27B. LOGIN BOX STYLES
   ============================================ */
.login-box input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 212, 170, 0.3);
  background: rgba(15, 39, 68, 0.8);
  color: #fff;
  font-size: 1rem;
  margin-top: 8px;
  transition: all var(--transition-base);
}

.login-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.2);
}

.login-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 20px rgba(0, 212, 170, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 170, 0.4);
}

/* ============================================
   28. LOGIN BOX
   ============================================ */
.login-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #071829 0%, #0d2137 50%, #071829 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

.login-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.login-box {
  background: rgba(15, 39, 68, 0.9);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid rgba(0, 212, 170, 0.2);
  padding: 48px;
  border-radius: 24px;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 10px 30px rgba(0, 212, 170, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
  text-align: center;
  width: 100%;
  max-width: 440px;
}

.login-logo {
  margin-bottom: 24px;
}

.login-logo-icon {
  width: 100px;
  height: 100px;
  border-radius: 24px;
  background: var(--gradient-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  box-shadow: 0 10px 40px rgba(0, 212, 170, 0.4);
  color: white;
}

.login-logo-icon i,
.login-logo-icon svg {
  width: 48px;
  height: 48px;
}

.login-box h2 {
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 1.5rem;
}

.login-box h2 i,
.login-box h2 svg {
  width: 24px;
  height: 24px;
}

.login-box p {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 0.9rem;
}

.login-input-group {
  text-align: left;
  margin-bottom: 16px;
}

.login-input-group label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--info);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.login-input-group input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 212, 170, 0.3);
  background: rgba(15, 39, 68, 0.8);
  color: #fff;
  font-size: 1rem;
  margin-top: 8px;
  transition: all var(--transition-base);
}

.login-input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.2);
}

.login-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 20px rgba(0, 212, 170, 0.3);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 170, 0.4);
}

.login-error {
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: 16px;
  font-weight: 600;
}

/* ============================================
   29. TOAST NOTIFICATIONS
   ============================================ */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 380px;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.toast.success { border-color: var(--success); }
.toast.success::before { background: var(--gradient-success); }

.toast.error { border-color: var(--danger); }
.toast.error::before { background: var(--gradient-danger); }

.toast.info { border-color: var(--info); }

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-primary);
  animation: toastProgress 3s linear forwards;
}

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

/* ============================================
   30. CUSTOM SCROLLBARS
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}

/* ============================================
   31. ANIMATIONS & KEYFRAMES
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   32. UTILITIES
   ============================================ */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.p-4 { padding: 16px; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.full-width { width: 100%; }

/* ============================================
   33. RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
  .main-content {
    padding: 24px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  .settings-container {
    grid-template-columns: 1fr;
  }
  
  .bulk-container {
    flex-direction: column;
    height: auto;
  }
  
  .bulk-progress {
    width: 100%;
    min-width: unset;
  }
  
  .chat-layout {
    height: calc(100vh - 160px);
  }
  
  .chat-contacts {
    width: 280px;
    min-width: 280px;
  }
}

@media (max-width: 768px) {
  /* ── Mobile: Native Bottom Tab Bar ── */
  .app-container {
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }

  /* ── Sidebar → Bottom Bar (completely override desktop) ── */
  .sidebar {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100vw !important;
    height: auto !important;
    min-height: auto !important;
    flex-direction: row !important;
    padding: 0 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    border-right: none !important;
    border-top: 1px solid var(--border-color) !important;
    border-radius: 0 !important;
    z-index: 1000 !important;
    order: 2 !important;
    background: var(--bg-sidebar) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    overflow: visible !important;
    transition: none !important;
    transform: none !important;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.3) !important;
  }

  /* Kill sidebar hover expansion on mobile */
  .sidebar:hover,
  .sidebar:active,
  .sidebar:focus-within {
    width: 100% !important;
    min-width: 100% !important;
    transform: none !important;
  }

  .sidebar::before,
  .sidebar::after {
    display: none !important;
  }

  .sidebar-logo,
  .sidebar-footer {
    display: none !important;
  }

  /* ── Nav container ── */
  .sidebar-nav {
    flex-direction: row !important;
    justify-content: space-evenly !important;
    align-items: center !important;
    width: 100% !important;
    padding: 4px 2px env(safe-area-inset-bottom, 6px) !important;
    gap: 0 !important;
    overflow: visible !important;
    flex-wrap: nowrap !important;
  }

  /* Hide secondary items */
  .sidebar-nav .nav-secondary {
    display: none !important;
  }

  /* El toggle "Más herramientas" es solo de escritorio — en mobile ya existe
     el botón "Más" (nav-more-btn) que abre el drawer con lo mismo. */
  .nav-more-toggle,
  .nav-divider,
  #more-tools-group {
    display: none !important;
  }

  /* Show "More" button */
  .nav-more-btn {
    display: flex !important;
  }

  /* ── Tab buttons ── */
  .nav-btn.nav-primary,
  .nav-btn.nav-more-btn {
    flex-direction: column !important;
    gap: 2px !important;
    padding: 6px 2px 4px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: auto !important;
    font-size: 0.55rem !important;
    border-radius: 0 !important;
    flex: 1 1 0% !important;
    border-left: none !important;
    background: transparent !important;
    position: relative !important;
    overflow: visible !important;
    transition: none !important;
    transform: none !important;
  }

  .nav-btn.nav-primary::before,
  .nav-btn.nav-more-btn::before {
    display: none !important;
  }

  /* Kill sidebar expand animation on nav hover */
  .nav-btn.nav-primary:hover,
  .nav-btn.nav-more-btn:hover,
  .nav-btn.nav-primary:active,
  .nav-btn.nav-more-btn:active {
    background: transparent !important;
    transform: none !important;
    width: auto !important;
    min-width: 0 !important;
  }

  .nav-icon {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    font-size: 0.95rem !important;
    border-radius: 8px !important;
    transition: none !important;
    transform: none !important;
    background: rgba(255, 255, 255, 0.06) !important;
  }

  .nav-label {
    opacity: 1 !important;
    transform: none !important;
    font-size: 0.55rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em !important;
    line-height: 1.2 !important;
    color: var(--text-muted) !important;
    transition: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  /* ── Active tab ── */
  .nav-btn.nav-primary.active {
    background: transparent !important;
    border-left: none !important;
  }

  .nav-btn.nav-primary.active .nav-icon {
    background: var(--gradient-primary) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(232, 98, 42, 0.4) !important;
    transform: none !important;
  }

  .nav-btn.nav-primary.active .nav-label {
    color: var(--primary) !important;
    font-weight: 700 !important;
  }

  .nav-btn.nav-primary:not(.active) .nav-label {
    color: var(--text-muted) !important;
  }

  /* Hover on desktop-width tablet */
  .nav-btn.nav-primary:hover .nav-icon,
  .nav-btn.nav-more-btn:hover .nav-icon {
    transform: none !important;
    background: rgba(255, 255, 255, 0.1) !important;
  }

  /* ── Badges ── */
  .nav-btn .badge-count {
    position: absolute !important;
    top: 0 !important;
    right: 4px !important;
    margin-left: 0 !important;
    font-size: 0.5rem !important;
    padding: 1px 3px !important;
    min-width: 12px !important;
  }

  .nav-btn .status-dot {
    position: absolute !important;
    top: 4px !important;
    right: 8px !important;
    width: 6px !important;
    height: 6px !important;
    min-width: 6px !important;
    margin-left: 0 !important;
  }

  /* ── Main content ── */
  .main-content {
    padding: 16px 12px 110px !important;
    order: 1 !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }

  /* ── Mobile Drawer ── */
  .mobile-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  .mobile-drawer-overlay.open {
    display: block;
    opacity: 1;
  }

  .mobile-drawer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1101;
    background: var(--bg-sidebar);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--border-color);
    border-radius: 20px 20px 0 0;
    max-height: 65vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    padding: 0 16px 24px;
  }

  .mobile-drawer.open {
    display: block;
    transform: translateY(0);
  }

  .mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 4px 12px;
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 1;
  }

  .mobile-drawer-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .mobile-drawer-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
  }

  .mobile-drawer-close:hover {
    background: rgba(255, 107, 107, 0.2);
    color: var(--danger);
  }

  .mobile-drawer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .mobile-drawer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    position: relative;
  }

  .mobile-drawer-item:hover,
  .mobile-drawer-item:active {
    background: rgba(232, 98, 42, 0.12);
    border-color: rgba(232, 98, 42, 0.3);
  }

  .mobile-drawer-item.active {
    background: rgba(232, 98, 42, 0.18);
    border-color: var(--primary);
  }

  .mobile-drawer-item .drawer-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    transition: all 0.2s;
  }

  .mobile-drawer-item:hover .drawer-icon,
  .mobile-drawer-item.active .drawer-icon {
    background: var(--gradient-primary);
    color: white;
  }

  .mobile-drawer-item .drawer-label {
    font-size: 0.62rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.2;
  }

  .mobile-drawer-item .drawer-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    font-size: 0.5rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
    text-transform: uppercase;
  }

  .mobile-drawer-item .drawer-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--danger);
  }

  .mobile-drawer-item .drawer-dot.connected {
    background: var(--success);
  }

  /* ── Responsive content ── */
  .section-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .section-header h1 {
    font-size: 1.3rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 14px;
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .stat-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .stat-value {
    font-size: 1.3rem;
  }

  .card,
  .chart-card {
    padding: 14px;
  }

  .bot-control-panel {
    flex-direction: column;
    gap: 14px;
  }

  .bot-power-btn {
    width: 130px;
    height: 130px;
  }

  .power-icon {
    font-size: 2.2rem;
  }

  .chat-layout {
    flex-direction: column;
    height: calc(100vh - 180px);
  }

  .chat-contacts {
    width: 100%;
    min-width: unset;
    height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .chat-messages {
    padding: 14px;
  }

  .message {
    max-width: 85%;
  }

  .sessions-grid {
    grid-template-columns: 1fr;
  }

  .campaigns-list {
    grid-template-columns: 1fr;
  }

  .form-group-row {
    flex-direction: column;
    gap: 0;
  }

  .data-table {
    font-size: 0.82rem;
  }

  .data-table thead th,
  .data-table tbody td {
    padding: 10px;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 80px;
  }

  .sp-kpi-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .header-actions {
    width: 100%;
    flex-direction: column;
  }
  
  .header-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .wa-connection-panel {
    padding: 24px;
    gap: 24px;
  }
  
  .qr-container {
    width: 200px;
    height: 200px;
  }
  
  .scraper-input-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .scraper-input-row select {
    min-width: unset;
  }
}

/* ============================================
   34. ACCESSIBILITY & FOCUS STATES
   ============================================ */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --border-color: rgba(255, 255, 255, 0.3);
    --text-muted: rgba(255, 255, 255, 0.8);
  }
}

/* Hide "More" button on desktop */
.nav-more-btn {
  display: none !important;
}

/* ============================================
   PWA INSTALL BANNER (Android)
   ============================================ */
.pwa-install-banner {
  position: fixed;
  bottom: -100px;
  left: 16px;
  right: 16px;
  z-index: 2000;
  background: var(--bg-sidebar);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(232, 98, 42, 0.15);
  overflow: hidden;
  opacity: 0;
  transform: translateY(0);
  transition: bottom 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
  pointer-events: none;
}

.pwa-install-banner.show {
  bottom: 80px;
  opacity: 1;
  pointer-events: auto;
}

.pwa-install-banner.hide {
  bottom: -100px;
  opacity: 0;
  pointer-events: none;
}

.pwa-install-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.pwa-install-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(232, 98, 42, 0.3);
}

.pwa-install-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pwa-install-text strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.pwa-install-text span {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.pwa-install-btn {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 10px;
  border: none;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(232, 98, 42, 0.3);
}

.pwa-install-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(232, 98, 42, 0.5);
}

.pwa-install-btn:active {
  transform: scale(0.97);
}

.pwa-install-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.pwa-install-close:hover {
  background: rgba(255, 107, 107, 0.2);
  color: var(--danger);
}

.pwa-install-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.pwa-install-progress::after {
  content: '';
  display: block;
  height: 100%;
  width: 100%;
  background: var(--gradient-primary);
  transform-origin: left;
  animation: pwa-progress 5s linear forwards;
}

@keyframes pwa-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* Light theme */
body.light-theme .pwa-install-banner {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(232, 98, 42, 0.15);
}
body.light-theme .pwa-install-close {
  background: rgba(0, 0, 0, 0.06);
}
body.light-theme .pwa-install-progress {
  background: rgba(0, 0, 0, 0.06);
}

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

/* ============================================
   35. PRINT STYLES
   ============================================ */
@media print {
  .sidebar,
  .theme-toggle,
  .btn,
  .toast {
    display: none !important;
  }
  
  .main-content {
    padding: 0;
  }
  
  .card,
  .chart-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ============================================
   36. CONVERSACIONES EN VIVO
   ============================================ */

/* Tabs de la lista */
.conv-tab {
  flex: 1;
  padding: 10px 6px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.conv-tab:hover { color: var(--text-primary); background: var(--bg-secondary); }
.conv-tab.conv-tab-active {
  color: #25d366;
  border-bottom-color: #25d366;
  background: rgba(37, 211, 102, 0.06);
}

/* Items de la lista de conversaciones */
.conv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
  position: relative;
}
.conv-item:hover { background: var(--bg-secondary); }
.conv-item.conv-item-selected { background: rgba(37, 211, 102, 0.08); border-left: 3px solid #25d366; }
.conv-item.conv-item-unread { background: rgba(37, 211, 102, 0.04); }

.conv-item-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 1rem;
  flex-shrink: 0;
}
.conv-item-avatar.hot  { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.conv-item-avatar.interested { background: linear-gradient(135deg, #f39c12, #d68910); }
.conv-item-avatar.cliente { background: linear-gradient(135deg, #e74c3c, #c0392b); }

.conv-item-body { flex: 1; min-width: 0; }
.conv-item-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item-preview { font-size: 0.78rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.conv-item-meta { text-align: right; flex-shrink: 0; }
.conv-item-time { font-size: 0.72rem; color: var(--text-muted); }
.conv-item-badge {
  display: inline-block; margin-top: 3px;
  background: #25d366; color: #fff;
  border-radius: 10px; font-size: 0.68rem; font-weight: 700;
  padding: 1px 6px; min-width: 18px; text-align: center;
}

/* Badge contador en sidebar */
.badge-count {
  background: #e74c3c; color: #fff;
  border-radius: 10px; font-size: 0.65rem; font-weight: 700;
  padding: 1px 5px; min-width: 16px; text-align: center;
  margin-left: auto;
}

/* Burbujas de chat */
.conv-bubble {
  max-width: 72%;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  word-wrap: break-word;
  position: relative;
}
.conv-bubble-user {
  align-self: flex-start;
  background: var(--bg-secondary);
  border-radius: 2px 12px 12px 12px;
  color: var(--text-primary);
}
.conv-bubble-bot {
  align-self: flex-end;
  background: linear-gradient(135deg, #25d366, #128c7e);
  border-radius: 12px 2px 12px 12px;
  color: #fff;
}
.conv-bubble-time {
  font-size: 0.68rem;
  opacity: 0.65;
  margin-top: 3px;
  text-align: right;
}
.conv-bubble-wrap {
  display: flex;
  flex-direction: column;
}
.conv-bubble-wrap.user { align-items: flex-start; }
.conv-bubble-wrap.bot  { align-items: flex-end; }

/* Indicador de escribiendo */
.conv-typing {
  display: flex; gap: 3px; align-items: center;
  padding: 8px 12px; background: var(--bg-secondary);
  border-radius: 12px; align-self: flex-start; width: fit-content;
}
.conv-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: #25d366; display: inline-block;
  animation: convTyping 1.2s infinite;
}
.conv-typing span:nth-child(2) { animation-delay: 0.2s; }
.conv-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes convTyping { 0%,100%{opacity:0.3;transform:scale(1)} 50%{opacity:1;transform:scale(1.25)} }

/* Estado del auto-reply en el botón */
#conv-toggle-autoreply-btn.autoreply-on  { color: #25d366; border-color: #25d366; }
#conv-toggle-autoreply-btn.autoreply-off { color: #e74c3c; border-color: #e74c3c; }

/* Status badges en chat header */
.status-badge {
  font-size: 0.75rem; font-weight: 600;
  padding: 2px 10px; border-radius: 12px;
  background: var(--bg-secondary); color: var(--text-secondary);
}
.status-badge.s-nuevo        { background:#e8f4fd; color:#2980b9; }
.status-badge.s-contactado   { background:#e8f8f0; color:#27ae60; }
.status-badge.s-interesado   { background:#fef9e7; color:#f39c12; }
.status-badge.s-cliente      { background:#fdedec; color:#e74c3c; }
.status-badge.s-no_interesado{ background:#f2f3f4; color:#7f8c8d; }

/* Divisor de fecha en el chat */
.conv-date-divider {
  text-align: center; font-size: 0.72rem; color: var(--text-muted);
  margin: 8px 0; position: relative;
}
.conv-date-divider::before, .conv-date-divider::after {
  content: ''; position: absolute; top: 50%; width: 30%;
  height: 1px; background: var(--border-color);
}
.conv-date-divider::before { left: 0; }
.conv-date-divider::after  { right: 0; }

/* ============================================================
   37. VARIABLE FIX — --bg-secondary faltaba en ambos temas
   Usada en conv-bubble-user, conv-item:hover, conv-typing.
   ============================================================ */
:root {
  --bg-secondary: rgba(255, 255, 255, 0.08);
}
body.light-theme {
  --bg-secondary: rgba(0, 0, 0, 0.05);
}

/* ============================================================
   38. LIGHT THEME — COBERTURA COMPLETA
   Todos los elementos que usan colores hardcodeados o que
   no heredaban correctamente en tema claro.
   ============================================================ */

/* ── Base: todo hereda color del body ── */
body.light-theme,
body.light-theme * {
  color: inherit;
}

/* ── Forzar texto oscuro en todos los contenedores principales ── */
body.light-theme .section,
body.light-theme .card,
body.light-theme .chart-card,
body.light-theme .stat-card,
body.light-theme .settings-card,
body.light-theme .campaign-card,
body.light-theme .session-slot,
body.light-theme .bulk-form,
body.light-theme .bulk-progress,
body.light-theme .info-card,
body.light-theme .wa-connection-panel,
body.light-theme .contacts-list,
body.light-theme .status-breakdown,
body.light-theme .bot-control-box,
body.light-theme .scraper-controls,
body.light-theme .scraper-status,
body.light-theme .scraper-results,
body.light-theme .scraper-log,
body.light-theme .ai-banner,
body.light-theme .ai-notification-card,
body.light-theme .ai-progress-card,
body.light-theme .quick-test-section,
body.light-theme .modal,
body.light-theme .settings-actions,
body.light-theme .sidebar {
  color: var(--text-primary) !important;
}

/* ── Textos secundarios y muteds ── */
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme h6 {
  color: var(--text-primary) !important;
}
body.light-theme p,
body.light-theme span:not(.badge-count):not(.conv-item-badge),
body.light-theme li,
body.light-theme td,
body.light-theme th,
body.light-theme label,
body.light-theme .form-group label {
  color: var(--text-primary) !important;
}
body.light-theme .text-muted,
body.light-theme .stat-label,
body.light-theme .section-subtitle,
body.light-theme .contact-meta,
body.light-theme .chat-contact-preview,
body.light-theme .chat-contact-time,
body.light-theme .wa-instructions li,
body.light-theme .wa-instructions ol,
body.light-theme .info-card ol,
body.light-theme .info-card li,
body.light-theme .scraper-info,
body.light-theme .bot-power-status,
body.light-theme .slot-status,
body.light-theme .progress-text,
body.light-theme .bot-control-box h3,
body.light-theme .campaign-card p,
body.light-theme .bulk-select-header,
body.light-theme .connecting-text {
  color: var(--text-muted) !important;
}

/* ── Formularios: fondo visible en tema claro ── */
body.light-theme .form-control,
body.light-theme .form-group input,
body.light-theme .form-group select,
body.light-theme .form-group textarea,
body.light-theme .search-box input,
body.light-theme .scraper-input-row select,
body.light-theme .chat-input-area input {
  background: rgba(0, 0, 0, 0.04) !important;
  color: var(--text-primary) !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}
body.light-theme .form-group input::placeholder,
body.light-theme .form-group textarea::placeholder,
body.light-theme .search-box input::placeholder {
  color: rgba(26, 26, 46, 0.4) !important;
}
body.light-theme .form-group input:focus,
body.light-theme .form-group select:focus,
body.light-theme .form-group textarea:focus {
  background: #ffffff !important;
  border-color: var(--primary) !important;
}

/* ── Tablas ── */
body.light-theme .data-table thead th {
  background: linear-gradient(135deg, rgba(0,212,170,0.12), rgba(0,184,148,0.06)) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}
body.light-theme .data-table tbody td {
  color: var(--text-secondary) !important;
  border-color: var(--border-color) !important;
}
body.light-theme .data-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02) !important;
}
body.light-theme .data-table tbody tr:hover {
  background: rgba(0, 212, 170, 0.06) !important;
}

/* ── Contact items ── */
body.light-theme .contact-name { color: var(--text-primary) !important; }
body.light-theme .contact-item:hover { background: rgba(0,212,170,0.06) !important; }
body.light-theme .contact-meta .source-badge {
  background: rgba(0,0,0,0.06) !important;
  color: var(--text-muted) !important;
}

/* ── Chat header nombre ── */
body.light-theme .chat-header-name { color: var(--text-primary) !important; }
body.light-theme .chat-header-meta { color: var(--text-muted) !important; }

/* ── Conversion bubbles en tema claro ── */
body.light-theme .conv-bubble-user {
  background: #ffffff !important;
  color: #1a1a2e !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
body.light-theme .conv-item:hover { background: rgba(0,0,0,0.04) !important; }
body.light-theme .conv-item-name { color: var(--text-primary) !important; }
body.light-theme .conv-item-preview { color: var(--text-muted) !important; }
body.light-theme .conv-typing { background: #ffffff !important; }

/* ── Panel de Chat en vivo en tema claro ── */
body.light-theme #conv-list-panel,
body.light-theme #conv-chat-panel {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.1) !important;
}

body.light-theme #conv-chat-header,
body.light-theme #conv-reply-area {
  background: #f0f2f5 !important;
  border-color: rgba(0,0,0,0.1) !important;
}

body.light-theme #conv-messages {
  background: #efeae2 url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png') !important;
  background-blend-mode: multiply;
  background-size: cover !important;
}

body.light-theme #conv-contact-name {
  color: #1a1a2e !important;
}

body.light-theme #conv-contact-phone {
  color: rgba(26, 26, 46, 0.7) !important;
}

body.light-theme #conv-reply-input {
  background: #ffffff !important;
  color: #1a1a2e !important;
  border-color: rgba(0,0,0,0.15) !important;
}

body.light-theme #conv-reply-input::placeholder {
  color: rgba(26, 26, 46, 0.5) !important;
}

body.light-theme #conv-empty-state {
  color: rgba(26, 26, 46, 0.6) !important;
  background: #f0f2f5 !important;
}

/* ── Modal ── */
body.light-theme .modal-header h3 { color: var(--text-primary) !important; }
body.light-theme .modal-body { color: var(--text-primary) !important; }
body.light-theme .modal-footer { background: rgba(0,0,0,0.04) !important; }
body.light-theme .modal-close {
  background: rgba(0,0,0,0.06) !important;
  color: var(--text-muted) !important;
}

/* ── Breakdown bars track visible en tema claro ── */
body.light-theme .breakdown-bar-track {
  background: rgba(0, 0, 0, 0.08) !important;
}
body.light-theme .breakdown-bar-label { color: var(--text-secondary) !important; }
body.light-theme .breakdown-bar-value { color: var(--text-primary) !important; }

/* ── Progress bar container ── */
body.light-theme .progress-bar-container {
  background: rgba(0, 0, 0, 0.08) !important;
}

/* ── Bot control box ── */
body.light-theme .bot-control-box { background: #ffffff !important; }

/* ── Campaign card ── */
body.light-theme .campaign-card h3 { color: var(--text-primary) !important; }
body.light-theme .campaign-status { border-color: var(--border-color) !important; }

/* ── Session slots ── */
body.light-theme .slot-header h3 { color: var(--text-primary) !important; }
body.light-theme .slot-phone {
  background: rgba(0,0,0,0.04) !important;
  color: var(--text-primary) !important;
}

/* ── WA connection panel ── */
body.light-theme .connection-status { color: var(--text-primary) !important; }
body.light-theme .wa-user-info { background: rgba(0,0,0,0.04) !important; }
body.light-theme .wa-user-info p { color: var(--text-secondary) !important; }
body.light-theme .wa-instructions h4 { color: var(--text-primary) !important; }
body.light-theme .wa-instructions li { color: var(--text-muted) !important; }

/* ── AI progress card — h3 hardcodeado en #fff ── */
body.light-theme .ai-progress-card h3 { color: var(--text-primary) !important; }
body.light-theme .ai-progress-bar { background: rgba(0,0,0,0.08) !important; }
body.light-theme .ai-progress-header span:first-child { color: var(--text-secondary) !important; }
body.light-theme .ai-progress-header span:last-child { color: var(--text-primary) !important; }

/* ── Bulk contacts list ── */
body.light-theme .bulk-contacts-select {
  background: rgba(0,0,0,0.02) !important;
  border-color: var(--border-color) !important;
}
body.light-theme .bulk-contact-item { border-color: var(--border-color) !important; }
body.light-theme .bulk-contact-item:hover { background: rgba(0,212,170,0.05) !important; }
body.light-theme .bulk-select-header { border-color: var(--border-color) !important; }

/* ── Filter tabs y pills ── */
body.light-theme .chat-filter-tab { color: var(--text-muted) !important; }
body.light-theme .chat-filter-tab.active { color: #fff !important; }
body.light-theme .pill { color: var(--text-muted) !important; }
body.light-theme .pill.active { color: #fff !important; }
body.light-theme .pill:hover { color: var(--primary) !important; }
body.light-theme .conv-tab { color: var(--text-secondary) !important; }
body.light-theme .conv-tab.conv-tab-active { color: #25d366 !important; }

/* ── Buttons outline en tema claro ── */
body.light-theme .btn-outline {
  color: var(--text-secondary) !important;
  border-color: var(--border-color) !important;
}
body.light-theme .btn-outline:hover { color: var(--primary) !important; }
body.light-theme .btn-ghost { color: var(--text-secondary) !important; }
body.light-theme .btn-ghost:hover {
  background: rgba(0,0,0,0.06) !important;
  color: var(--text-primary) !important;
}

/* ── Toasts ── */
body.light-theme .toast { color: var(--text-primary) !important; }

/* ── Scrollbar en tema claro ── */
body.light-theme ::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); }

/* ── Estadísticas: sobreescribir las vars hardcodeadas del panel ── */
body.light-theme #section-estadisticas {
  --sp-bg:      #f0f2f5 !important;
  --sp-surface: #ffffff !important;
  --sp-s2:      #f5f7fa !important;
  --sp-border:  rgba(0,0,0,0.08) !important;
  --sp-border2: rgba(0,0,0,0.14) !important;
  --sp-text:    #1a1a2e !important;
  --sp-muted:   #6b7280 !important;
  background: #f0f2f5 !important;
  color: #1a1a2e !important;
}
body.light-theme #section-estadisticas .sp-kpi,
body.light-theme #section-estadisticas .sp-card,
body.light-theme #section-estadisticas .sp-tabs,
body.light-theme #section-estadisticas .sp-config-item,
body.light-theme #section-estadisticas .sp-queue-bar-wrap,
body.light-theme #section-estadisticas .sp-funnel-bar-wrap,
body.light-theme #section-estadisticas .sp-progress-wrap {
  background: var(--sp-surface) !important;
  border-color: var(--sp-border2) !important;
}
body.light-theme #section-estadisticas .sp-tab.active {
  background: var(--sp-s2) !important;
  color: var(--sp-text) !important;
}
body.light-theme #section-estadisticas .sp-kpi-value,
body.light-theme #section-estadisticas .sp-config-val,
body.light-theme #section-estadisticas .sp-table td {
  color: var(--sp-text) !important;
}
body.light-theme #section-estadisticas .sp-kpi-label,
body.light-theme #section-estadisticas .sp-card-title,
body.light-theme #section-estadisticas .sp-config-key,
body.light-theme #section-estadisticas .sp-table th,
body.light-theme #section-estadisticas .sp-funnel-label,
body.light-theme #section-estadisticas .sp-queue-name,
body.light-theme #section-estadisticas .sp-heat-label,
body.light-theme #section-estadisticas .sp-muted {
  color: var(--sp-muted) !important;
}

/* ============================================================
   39. DASHBOARD — MEJORAS VISUALES
   ============================================================ */

/* ── Section header con acento decorativo ── */
#section-dashboard .section-header h1 {
  position: relative;
  padding-bottom: 10px;
}
#section-dashboard .section-header h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* ── Stat cards: decoración de esquina ── */
.stat-card::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-glow);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}
.stat-card:hover::after { opacity: 0.15; }

/* ── Stat value con animación de conteo ── */
.stat-value {
  font-variant-numeric: tabular-nums;
  transition: color var(--transition-base);
}

/* ── Stat card accent-green: borde superior visible siempre ── */
.stat-card.accent-green  { border-top: 2px solid rgba(0, 184, 148, 0.4); }
.stat-card.accent-blue   { border-top: 2px solid rgba(116, 185, 255, 0.4); }
.stat-card.accent-yellow { border-top: 2px solid rgba(253, 203, 110, 0.4); }
.stat-card.accent-purple { border-top: 2px solid rgba(162, 155, 254, 0.4); }
.stat-card.accent-cyan   { border-top: 2px solid rgba(0, 212, 170, 0.4); }
.stat-card.accent-red    { border-top: 2px solid rgba(255, 107, 107, 0.4); }
.stat-card.accent-orange { border-top: 2px solid rgba(230, 126, 34, 0.4); }

/* Hover: el borde top se intensifica */
.stat-card:hover.accent-green  { border-top-color: rgba(0, 184, 148, 0.9); }
.stat-card:hover.accent-blue   { border-top-color: rgba(116, 185, 255, 0.9); }
.stat-card:hover.accent-yellow { border-top-color: rgba(253, 203, 110, 0.9); }
.stat-card:hover.accent-purple { border-top-color: rgba(162, 155, 254, 0.9); }
.stat-card:hover.accent-cyan   { border-top-color: rgba(0, 212, 170, 0.9); }
.stat-card:hover.accent-red    { border-top-color: rgba(255, 107, 107, 0.9); }
.stat-card:hover.accent-orange { border-top-color: rgba(230, 126, 34, 0.9); }

/* ── Status breakdown mejorado ── */
.status-breakdown h3 {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}
.breakdown-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}
.breakdown-bar-label {
  width: 110px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: capitalize;
}
.breakdown-bar-fill {
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  min-height: 22px;
  border-radius: 4px;
  transition: width 1s ease-out, min-width 0.3s;
  min-width: 32px;
}
body.light-theme .breakdown-bar-fill {
  color: rgba(255,255,255,0.95) !important;
}

/* ── Charts row más visual ── */
.charts-row {
  gap: 16px;
}
.charts-row .chart-card {
  min-height: 200px;
}

/* ── Bot control box: título más visible ── */
.bot-control-box h3 {
  font-size: 0.78rem;
  letter-spacing: 3px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.light-theme .bot-control-box h3 {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Chart card header con línea izquierda ── */
.chart-card h3,
.status-breakdown h3 {
  padding-left: 10px;
  border-left: 3px solid var(--primary);
}

/* ── Autopilot badge más visible ── */
.badge.badge-success {
  background: linear-gradient(135deg, rgba(0,184,148,0.2), rgba(85,239,196,0.1));
  color: var(--success-light);
  border: 1px solid rgba(0,184,148,0.3);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}
.badge.badge-secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}
body.light-theme .badge.badge-secondary {
  background: rgba(0,0,0,0.06);
}

/* ── Daily counter pill mejorado ── */
#stat-daily-counter {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================
   AUGUSTO VIAL Y CONSTRUCCIONES - SPLASH SCREEN
   ========================================================== */
#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #0d1a2e 0%, #1D3D6B 60%, #122040 100%);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  animation: splashFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.splash-logo-img {
  width: 260px;
  height: 260px;
  object-fit: contain;
  filter: drop-shadow(0 8px 32px rgba(232, 98, 42, 0.5));
}
.splash-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.splash-bot-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(232, 98, 42, 0.12);
  border: 1px solid rgba(232, 98, 42, 0.35);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #F4813A;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.splash-bot-badge i { font-size: 0.9rem; }
.splash-loader {
  margin-top: 48px;
  width: 180px;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.splash-loader-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #E8622A, #F4813A, #fdcb6e);
  border-radius: 999px;
  animation: splashLoad 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes splashLoad {
  0%   { width: 0%; }
  60%  { width: 75%; }
  100% { width: 100%; }
}
@keyframes splashFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   SIDEBAR - Logo Augusto Vial y Construcciones
   ========================================================== */
.sidebar-brand-logo {
  width: 100%;
  padding: 0 8px 16px;
  border-bottom: 1px solid rgba(74, 159, 212, 0.15);
  margin-bottom: 8px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}
.sidebar-brand-logo img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(232, 98, 42, 0.35));
  transition: filter 0.2s ease, transform 0.2s ease, width 0.3s ease, height 0.3s ease;
}
.sidebar:hover .sidebar-brand-logo img {
  width: 120px;
  height: 120px;
}
.sidebar-brand-logo img:hover {
  filter: drop-shadow(0 4px 18px rgba(232, 98, 42, 0.55));
  transform: scale(1.05);
}
.sidebar.collapsed .sidebar-brand-logo img {
  width: 42px;
  height: 42px;
}
/* Accent naranja en nav activo */
.nav-btn.active {
  background: linear-gradient(90deg, rgba(232,98,42,0.18) 0%, rgba(232,98,42,0.05) 100%) !important;
  border-left: 3px solid #E8622A !important;
}
.nav-btn:hover:not(.active) {
  background: rgba(74, 159, 212, 0.1) !important;
  border-left: 3px solid rgba(74, 159, 212, 0.4) !important;
}
/* Login overlay - Augusto Vial y Construcciones branding */
.login-logo-img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  margin: 0 auto 8px;
  display: block;
  filter: drop-shadow(0 4px 20px rgba(232, 98, 42, 0.45));
}

/* ════════════════════════════════════════════════════════════
   IMPORT SESSION (Importar Contactos desde WhatsApp)
   ════════════════════════════════════════════════════════════ */
.ic-step {}
.ic-card { background: var(--card-bg, #1a1d2e); border: 1px solid var(--border-color, rgba(255,255,255,.08)); border-radius: 14px; padding: 32px; text-align: center; }
.ic-card-center { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.ic-icon-wrap { margin-bottom: 12px; }
.ic-title { font-size: 1.3rem; font-weight: 700; margin: 0 0 10px; }
.ic-desc { color: var(--text-muted, #7a8296); font-size: .92rem; line-height: 1.6; margin-bottom: 18px; }
.ic-bullets { list-style: none; padding: 0; margin: 0 auto 24px; text-align: left; max-width: 340px; display: flex; flex-direction: column; gap: 8px; }
.ic-bullets li { font-size: .87rem; display: flex; align-items: center; gap: 8px; color: var(--text-secondary, #c0c4d6); }
.ic-btn-start { font-size: 1rem; padding: 12px 28px; }
.ic-label-step { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--text-muted, #7a8296); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 20px; justify-content: center; }
.ic-badge { background: var(--accent-color, #6c63ff); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; flex-shrink: 0; }
.ic-badge-green { background: #25D366; }
.ic-qr-wrap { display: flex; justify-content: center; margin-bottom: 16px; min-height: 200px; align-items: center; }
.ic-qr-wrap img { border-radius: 12px; border: 4px solid #fff; max-width: 260px; }
.ic-qr-placeholder { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--text-muted, #7a8296); font-size: .85rem; }
.ic-hint { font-size: .8rem; color: var(--text-muted, #7a8296); }
.ic-btn-cancel { margin-top: 16px; }
.ic-connected-header { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 18px; font-weight: 600; }
.ic-connected-dot { width: 10px; height: 10px; border-radius: 50%; background: #25D366; box-shadow: 0 0 8px #25D366; }
.ic-contacts-count-wrap { margin-bottom: 24px; }
.ic-count-num { font-size: 2.8rem; font-weight: 800; font-family: 'Space Mono', monospace; color: var(--accent-color, #6c63ff); display: block; }
.ic-count-label { font-size: .9rem; color: var(--text-secondary, #c0c4d6); display: block; }
.ic-count-hint { font-size: .75rem; color: var(--text-muted, #7a8296); display: block; margin-top: 4px; }
.ic-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.ic-btn-import { font-size: 1rem; padding: 12px 28px; }
.ic-spinner { width: 24px; height: 24px; border: 2px solid rgba(255,255,255,.15); border-top-color: var(--accent-color, #6c63ff); border-radius: 50%; animation: ic-spin .7s linear infinite; display: inline-block; }
.ic-spinner-lg { width: 42px; height: 42px; border-width: 3px; }
@keyframes ic-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Transiciones suaves para pasos del import session */
.ic-step {
  animation: ic-fadeIn 0.4s ease-out;
}

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

/* Pulse animado para el dot de conexión */
.ic-connected-dot {
  animation: ic-pulse 2s ease-in-out infinite;
}

@keyframes ic-pulse {
  0%, 100% { box-shadow: 0 0 8px #25D366; }
  50% { box-shadow: 0 0 16px #25D366, 0 0 24px rgba(37, 211, 102, 0.3); }
}

/* Hover suave en botones */
.ic-btn-start, .ic-btn-import, .ic-btn-cancel {
  transition: all 0.2s ease;
}

.ic-btn-start:hover, .ic-btn-import:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.ic-btn-cancel:hover {
  opacity: 0.8;
}

/* Resultado con animación de entrada */
.ic-result {
  animation: ic-resultIn 0.3s ease-out;
}

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

/* Badge NEW con pulso sutil */
.nav-badge-new {
  animation: ic-badgePulse 3s ease-in-out infinite;
}

@keyframes ic-badgePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.ic-importing-label { font-size: .95rem; color: var(--text-muted, #7a8296); }
.ic-result { margin-top: 20px; border-radius: 12px; padding: 20px 24px; display: flex; align-items: center; gap: 14px; border: 1px solid; }
.ic-result.ic-result-ok { background: rgba(37,211,102,.08); border-color: rgba(37,211,102,.3); color: #25D366; }
.ic-result.ic-result-error { background: rgba(255,75,109,.08); border-color: rgba(255,75,109,.3); color: #ff4d6d; }
.ic-result-icon { font-size: 1.4rem; flex-shrink: 0; }
.ic-result-text { font-size: .9rem; line-height: 1.5; }
.nav-badge-new { background: linear-gradient(135deg, #25D366, #128C7E); color: #fff; font-size: .55rem; font-weight: 700; padding: 2px 6px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; margin-left: 4px; }

/* ── Mobile drawer light theme ── */
body.light-theme .mobile-drawer {
  background: rgba(255, 255, 255, 0.98);
  border-top-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .mobile-drawer-item {
  background: rgba(0, 0, 0, 0.03);
}
body.light-theme .mobile-drawer-item:hover,
body.light-theme .mobile-drawer-item:active {
  background: rgba(232, 98, 42, 0.08);
}
body.light-theme .mobile-drawer-item.active {
  background: rgba(232, 98, 42, 0.12);
}
body.light-theme .mobile-drawer-item .drawer-icon {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-secondary);
}
body.light-theme .mobile-drawer-item:hover .drawer-icon,
body.light-theme .mobile-drawer-item.active .drawer-icon {
  background: var(--gradient-primary);
  color: white;
}
body.light-theme .mobile-drawer-item .drawer-label {
  color: var(--text-secondary);
}
body.light-theme .mobile-drawer-close {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text-muted);
}

/* ── Light theme sidebar on mobile ── */
body.light-theme .sidebar {
  background: rgba(255, 255, 255, 0.95) !important;
  border-top-color: rgba(0, 0, 0, 0.1) !important;
}
