/* ==========================================================================
   VoxRelay Design System
   Modern Light Mode Default • Dark Mode Toggle • Linear / Stripe Aesthetics
   ========================================================================== */

:root {
  /* Canvas & Backgrounds (Default: Clean Light Theme) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-input: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-hover: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.85);

  /* Borders & Dividers */
  --border-subtle: #e2e8f0;
  --border-card: #e2e8f0;
  --border-focus: #10b981;
  --border-hover: #cbd5e1;

  /* Typography */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-highlight: #0284c7;

  /* Brand Accents */
  --wa-emerald: #10b981;
  --wa-emerald-hover: #059669;
  --wa-emerald-subtle: #ecfdf5;
  --wa-emerald-glow: rgba(16, 185, 129, 0.18);
  --wa-dark-green: #047857;

  /* Status Colors */
  --accent-cyan: #0284c7;
  --accent-cyan-subtle: #f0f9ff;
  --accent-amber: #d97706;
  --accent-amber-subtle: #fffbeb;
  --accent-rose: #e11d48;
  --accent-rose-subtle: #fff1f2;
  --accent-indigo: #6366f1;
  --accent-indigo-subtle: #eef2ff;

  /* Typography & Sizing */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 8px 24px -4px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 20px 25px -5px rgba(0, 0, 0, 0.06);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  --shadow-lift: 0 4px 14px var(--wa-emerald-glow);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Dark Theme Overrides
   ========================================================================== */
[data-theme="dark"] {
  --bg-primary: #0a0d14;
  --bg-secondary: #111622;
  --bg-tertiary: #192030;
  --bg-input: #111622;
  --bg-card: rgba(22, 28, 42, 0.75);
  --bg-card-hover: rgba(27, 35, 54, 0.9);
  --bg-hover: #1e293b;
  --bg-glass: rgba(10, 13, 20, 0.85);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.09);
  --border-focus: #25d366;
  --border-hover: rgba(255, 255, 255, 0.18);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-highlight: #38bdf8;

  --wa-emerald: #25d366;
  --wa-emerald-hover: #20ba5a;
  --wa-emerald-subtle: rgba(37, 211, 102, 0.12);
  --wa-emerald-glow: rgba(37, 211, 102, 0.3);

  --accent-cyan: #38bdf8;
  --accent-cyan-subtle: rgba(56, 189, 248, 0.12);
  --accent-amber: #f59e0b;
  --accent-amber-subtle: rgba(245, 158, 11, 0.12);
  --accent-rose: #f43f5e;
  --accent-rose-subtle: rgba(244, 63, 94, 0.12);
  --accent-indigo: #818cf8;
  --accent-indigo-subtle: rgba(129, 140, 248, 0.12);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 20px 35px -10px rgba(0, 0, 0, 0.7);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  --shadow-lift: 0 4px 16px var(--wa-emerald-glow);
}

/* ==========================================================================
   Base & Resets
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  transition: background-color var(--transition-base), color var(--transition-base);
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.app-header {
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background var(--transition-base), border-color var(--transition-base);
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  transition: opacity var(--transition-fast);
}

.brand:hover {
  opacity: 0.9;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--wa-emerald), var(--wa-dark-green));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 3px 12px var(--wa-emerald-glow);
}

.brand-text h1 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--text-primary);
}

.badge-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

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

/* Multi-Account WhatsApp Switcher */
.account-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  gap: 4px;
}

.account-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.account-btn:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .account-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.account-btn.active {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-color: var(--border-subtle);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.account-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.account-dot.connected {
  background: var(--wa-emerald);
  box-shadow: 0 0 8px var(--wa-emerald);
}

.account-dot.connecting, .account-dot.qr_ready {
  background: var(--accent-amber);
}

.account-dot.disconnected {
  background: #94a3b8;
}

.account-btn-info {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.account-btn-title {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.account-btn-phone {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.account-btn.active .account-btn-phone {
  color: var(--wa-emerald);
}

/* WhatsApp Connection Widget Actions */
.connection-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  transition: all var(--transition-fast);
}

.connection-widget .status-indicator {
  display: none; /* Number and connection state are cleanly rendered inside .account-switcher tabs */
}

.connection-widget .btn {
  border-radius: var(--radius-full);
  font-weight: 600;
  padding: 6px 14px;
  font-size: 12px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  position: relative;
  transition: background var(--transition-fast);
}

.status-dot.connected {
  background: var(--wa-emerald);
  box-shadow: 0 0 10px var(--wa-emerald);
}

.status-dot.connected::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  border: 2px solid var(--wa-emerald);
  opacity: 0.4;
  animation: pulse-ring 2s infinite;
}

.status-dot.disconnected {
  background: var(--accent-rose);
}

.status-dot.qr_ready {
  background: var(--accent-amber);
  animation: pulse-amber 1.5s infinite;
}

.status-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Theme Switcher Button */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

.sun-icon {
  display: block;
}

.moon-icon {
  display: none;
}

[data-theme="dark"] .sun-icon {
  display: none;
}

[data-theme="dark"] .moon-icon {
  display: block;
}

/* ==========================================================================
   Main Application Layout
   ========================================================================== */
.app-main {
  flex: 1;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 28px 60px;
}

.view-container {
  width: 100%;
  animation: fadeIn 0.25s ease-out;
}

/* ==========================================================================
   VIEW 1: CAMPAIGNS HUB (MAIN PAGE)
   ========================================================================== */

/* Hub Stats Bar: Single Unified Compact Rounded Card */
.hub-stats-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  margin-bottom: 22px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.hub-stats-bar:hover {
  box-shadow: var(--shadow-card-hover);
}

.stat-unit {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

.stat-divider {
  width: 1px;
  height: 28px;
  background: var(--border-subtle);
  flex-shrink: 0;
}

.stat-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-emerald {
  background: var(--wa-emerald-subtle);
  color: var(--wa-emerald);
}

.icon-cyan {
  background: var(--accent-cyan-subtle);
  color: var(--accent-cyan);
}

.icon-indigo {
  background: var(--accent-indigo-subtle);
  color: var(--accent-indigo);
}

.icon-amber {
  background: var(--accent-amber-subtle);
  color: var(--accent-amber);
}

.stat-details {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-number {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Hub Action Bar */
.hub-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.hub-search-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.search-input-wrap {
  position: relative;
  max-width: 320px;
  width: 100%;
}

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

.search-input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 13.5px;
  transition: all var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--wa-emerald-glow);
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.filter-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-pill:hover {
  color: var(--text-primary);
}

.filter-pill.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Campaigns Container */
.campaigns-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Wide Compact Campaign Card */
.campaign-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
}

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

.card-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 280px;
}

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

.status-running {
  background: var(--wa-emerald);
  box-shadow: 0 0 10px var(--wa-emerald);
  animation: pulse-ring 2s infinite;
}

.status-completed {
  background: var(--accent-cyan);
}

.status-draft {
  background: #94a3b8;
}

.status-paused {
  background: var(--accent-amber);
}

.campaign-name-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

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

.campaign-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.campaign-date {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.card-middle {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  justify-content: center;
}

.meta-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.mini-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 170px;
}

.mini-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  display: flex;
}

.mini-progress-fill {
  height: 100%;
  background: var(--wa-emerald);
  transition: width var(--transition-base);
}

.mini-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.card-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-open-campaign {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--wa-emerald-subtle);
  color: var(--wa-emerald);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-open-campaign:hover {
  background: var(--wa-emerald);
  color: #fff;
  box-shadow: 0 2px 10px var(--wa-emerald-glow);
}

.btn-delete-campaign {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-delete-campaign:hover {
  background: var(--accent-rose-subtle);
  color: var(--accent-rose);
}

/* Empty State Card */
.empty-state-card {
  background: var(--bg-card);
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 56px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 540px;
  margin: 40px auto;
}

.empty-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--wa-emerald-subtle);
  color: var(--wa-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.empty-state-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.empty-state-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 420px;
}

/* ==========================================================================
   VIEW 2: CAMPAIGN WORKSPACE
   ========================================================================== */

/* Workspace Nav Bar */
.workspace-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.workspace-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-breadcrumb-back {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.btn-breadcrumb-back:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

.breadcrumb-separator {
  color: var(--text-muted);
  font-size: 16px;
}

.breadcrumb-current {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.status-badge-pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* Top Campaign Metrics Strip */
.template-top-metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
}

.top-metric-card {
  display: flex;
  flex-direction: column;
  padding: 4px 8px;
  border-right: 1px solid var(--border-subtle, #e2e8f0);
}

.top-metric-card:last-child {
  border-right: none;
}

.top-metric-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted, #64748b);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.top-metric-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
  font-family: var(--font-mono, monospace);
  line-height: 1.1;
}

.top-metric-sent {
  background: rgba(16, 185, 129, 0.04);
  border-radius: 6px;
}

.status-badge-pill.running {
  background: var(--wa-emerald-subtle);
  color: var(--wa-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.status-badge-pill.completed {
  background: var(--accent-cyan-subtle);
  color: var(--accent-cyan);
}

/* Workspace 2-Column Grid */
.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

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

@media (max-width: 768px) {
  .hub-stats-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
  }
  .stat-divider {
    width: 100%;
    height: 1px;
  }
  .stat-unit {
    justify-content: flex-start;
  }
  .campaign-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .card-middle {
    width: 100%;
    justify-content: space-between;
  }
}

/* Panels */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 26px 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.panel-header h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.panel-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
}

.panel-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 11px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13.5px;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--wa-emerald-glow);
}

.form-textarea {
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
}

.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.field-hint code {
  background: var(--bg-tertiary);
  padding: 2px 5px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* Audio Dropzone */
/* ==========================================================================
   Campaign Media Component (Unified Auto-Detecting Uploader)
   ========================================================================== */

.media-unified-card.dropzone {
  border: 1.5px dashed #cbd5e1;
  border-radius: 16px;
  padding: 26px 20px;
  text-align: center;
  background: #ffffff;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.media-unified-card.dropzone:hover,
.media-unified-card.dropzone.dragover {
  border-color: #10b981;
  background: #f0fdf4;
  border-style: solid;
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.media-upload-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  background: #ecfdf5;
  margin-bottom: 4px;
  transition: all 0.15s ease;
}

.media-unified-card.dropzone:hover .media-upload-circle {
  border-color: #10b981;
  transform: scale(1.05);
}

.dropzone-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.dropzone-subtitle {
  font-size: 12.5px;
  color: #64748b;
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.45;
}

/* Media Preview Card */
.media-preview-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  width: 100%;
  text-align: left;
}

.media-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

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

.media-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.media-icon-badge.photo-badge {
  background: #eff6ff;
  color: #3b82f6;
}

.media-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.media-filename {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  font-family: var(--font-mono);
}

.media-specs {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
}

.media-player-container {
  width: 100%;
}

.custom-image-preview {
  max-width: 100%;
  max-height: 220px;
  border-radius: 10px;
  object-fit: contain;
  background: #0f172a;
  display: block;
  margin: 0 auto;
}

.custom-audio-player {
  width: 100%;
  height: 40px;
  border-radius: 8px;
}

.btn-remove-media {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-remove-media:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* ==========================================================================
   Multi-Media Attached Gallery (Compact Small Previews)
   ========================================================================== */
.media-items-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 6px 0;
}

.media-items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.media-items-count-badge {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.btn-add-more-media {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-add-more-media:hover {
  background: #d1fae5;
  border-color: #34d399;
}

.media-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  width: 100%;
}

.media-item-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: all 0.15s ease;
  position: relative;
}

.media-item-chip:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.media-thumb-wrap {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
}

.media-mini-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-audio-thumb {
  background: #ecfdf5;
  color: #10b981;
}

.media-video-thumb {
  background: #eff6ff;
  color: #3b82f6;
}

.media-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.media-item-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
}

.media-type-tag {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tag-audio { background: #d1fae5; color: #065f46; }
.tag-image { background: #e0e7ff; color: #3730a3; }
.tag-video { background: #dbeafe; color: #1e40af; }
.tag-text { background: #fef3c7; color: #92400e; }

.btn-remove-media-item {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-remove-media-item:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* ==========================================================================
   Campaign Setup Sections & Typography
   ========================================================================== */
.form-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

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

.section-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--wa-emerald-subtle);
  color: var(--wa-emerald);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.section-title {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
}

.section-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 0;
}

.btn-text-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-text-action:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* ==========================================================================
   Recipients Directory Component
   ========================================================================== */

/* ==========================================================================
   Recipients Component (Clean Single-Card Unified Layout)
   ========================================================================== */

.recipients-section {
  margin-bottom: 24px;
}

.recipients-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

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

.recipients-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-import-csv {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-import-csv:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-clear-all {
  background: transparent;
  border: none;
  color: #dc2626;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  transition: color 0.15s;
}

.btn-clear-all:hover {
  color: #b91c1c;
  text-decoration: underline;
}

/* Top 3 Live Status Summary Badges */
.recipient-stats-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.stat-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

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

.stat-tag.tag-green {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.stat-tag.tag-green .stat-dot {
  background: #10b981;
}

.stat-tag.tag-orange {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.stat-tag.tag-orange .stat-dot {
  background: #f59e0b;
}

.stat-tag.tag-red {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}
.stat-tag.tag-red .stat-dot {
  background: #ef4444;
}

/* Unified Single Card (List + Inline Entry) */
.recipients-unified-box {
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  background: #ffffff;
  min-height: 280px;
  max-height: 420px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color var(--transition-fast);
}

.recipients-unified-box:focus-within {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.recipients-rows-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Contact Row */
.recipient-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  transition: background 0.15s ease;
  min-height: 68px;
}

.recipient-row:hover {
  background: #f8fafc;
}

.recipient-row .row-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.row-avatar-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.row-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.row-avatar-svg {
  color: #64748b;
}

.row-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.row-phone-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.row-status-dot.dot-green {
  background: #10b981;
}

.row-status-dot.dot-orange {
  background: #f59e0b;
}

.row-status-dot.dot-red {
  background: #ef4444;
}

.row-status-dot.dot-grey {
  background: #94a3b8;
}

.row-phone {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
  transition: all 0.2s ease;
}

.row-bio {
  font-size: 13px;
  color: #64748b;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
  font-weight: 400;
}

/* Pulsing / Dim & High Animation while checking contact on WhatsApp */
@keyframes checkingDimHigh {
  0%, 100% {
    opacity: 0.35;
    color: #94a3b8;
  }
  50% {
    opacity: 1;
    color: #334155;
  }
}

.recipient-row.checking .row-phone {
  animation: checkingDimHigh 1.2s infinite ease-in-out;
}

.row-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-btn-remove {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.row-btn-remove:hover {
  color: #ef4444;
  background: #fee2e2;
}

/* Real-time WhatsApp Ticks */
.rec-tick-wrap,
.tick-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  line-height: 1;
}

.tick-icon {
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}

.tick-1-grey {
  color: #94a3b8; /* single grey check */
}

.tick-2-grey {
  color: #94a3b8; /* double grey check */
}

.tick-2-blue {
  color: #0284c7; /* double blue check (read/played) */
}

@keyframes tickPop {
  0% {
    transform: scale(0.7);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.tick-pop-anim {
  animation: tickPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Campaign Locked Banner (Read-only immutability) */
.campaign-locked-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  margin-bottom: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #64748b;
  border-radius: 10px;
  color: #334155;
  font-size: 13.5px;
  line-height: 1.45;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.campaign-locked-banner svg {
  color: #475569;
  flex-shrink: 0;
}

.campaign-locked-banner strong {
  color: #0f172a;
}

/* Inline Entry Row at Bottom of Card */
.recipient-inline-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  cursor: text;
}

.entry-plus-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.entry-plus-circle:hover {
  border-color: #10b981;
  color: #10b981;
}

.recipient-inline-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: #0f172a;
  font-family: var(--font-sans);
  padding: 4px 0;
}

.recipient-inline-input::placeholder {
  color: #94a3b8;
}

.recipients-bottom-hint {
  font-size: 13px;
  color: #64748b;
  margin-top: 10px;
  margin-bottom: 0;
  line-height: 1.5;
}

.message-textarea {
  min-height: 135px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.55;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 14px 16px;
  color: #0f172a;
  background: #ffffff;
  resize: vertical;
  transition: all var(--transition-fast);
}

.message-textarea:focus {
  border-color: #10b981;
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Pacing Grid */
.pacing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 12.5px;
}

.btn-xs {
  padding: 5px 10px;
  font-size: 11.5px;
}

.btn-lg {
  padding: 12px 22px;
  font-size: 14.5px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--wa-emerald);
  color: #fff;
  border: 1px solid transparent;
}

.btn-primary:hover:not(:disabled) {
  background: var(--wa-emerald-hover);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

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

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-warning {
  background: var(--accent-amber);
  color: #fff;
}

.btn-danger {
  background: var(--accent-rose);
  color: #fff;
}

.btn-success {
  background: var(--wa-emerald);
  color: #fff;
}

.shadow-lift {
  box-shadow: var(--shadow-lift);
}

.shadow-lift:hover {
  box-shadow: 0 6px 20px var(--wa-emerald-glow);
  transform: translateY(-1px);
}

/* Right Column: Progress Card */
.progress-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

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

.queue-state-badge {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.progress-ratio {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.progress-bar-wrapper {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--wa-emerald), var(--accent-cyan));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  text-align: center;
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.active-target-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--wa-emerald-subtle);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--wa-emerald);
}

.target-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wa-emerald);
  animation: pulse-ring 1.5s infinite;
}

/* Terminal Feed */
.terminal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.btn-clear-logs {
  border: none;
  background: none;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-clear-logs:hover {
  color: var(--text-primary);
}

.terminal-body {
  padding: 14px 16px;
  max-height: 240px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-entry {
  display: flex;
  gap: 10px;
  line-height: 1.5;
}

.log-time {
  color: var(--text-muted);
  flex-shrink: 0;
}

.log-msg {
  color: var(--text-secondary);
  word-break: break-word;
}

.log-info .log-msg { color: var(--text-secondary); }
.log-success .log-msg { color: var(--wa-emerald); }
.log-warn .log-msg { color: var(--accent-amber); }
.log-error .log-msg { color: var(--accent-rose); }

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease-out;
}

.modal-content,
.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  width: 100%;
  overflow: hidden;
  animation: scaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-sm {
  max-width: 440px;
}

.modal-md {
  max-width: 500px;
}

.modal-lg {
  max-width: 720px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 26px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modal-subtitle,
.modal-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.btn-close-modal,
.btn-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: var(--bg-tertiary);
  font-size: 15px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
}

.btn-close-modal:hover,
.btn-modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.modal-body {
  padding: 22px 26px;
}

.modal-footer {
  padding: 16px 26px 22px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-subtle);
}

.suggestion-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.suggestion-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-suggestion-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--wa-emerald-subtle);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  color: var(--wa-emerald);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-suggestion-pill:hover {
  background: var(--wa-emerald);
  color: #fff;
}

.suggestion-action {
  font-size: 10px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.3);
  padding: 1px 5px;
  border-radius: var(--radius-xs);
}

.validation-feedback {
  margin-top: 8px;
  font-size: 12px;
}

.feedback-text.text-success { color: var(--wa-emerald); }
.feedback-text.text-danger { color: var(--accent-rose); }
.feedback-text.text-muted { color: var(--text-muted); }

/* QR Code */
.qr-wrapper {
  margin: 18px auto;
  padding: 16px;
  background: #fff;
  border-radius: var(--radius-lg);
  display: inline-block;
  box-shadow: var(--shadow-sm);
}

.qr-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-secondary);
  text-align: left;
}

/* Floating Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-modal);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success { border-left: 4px solid var(--wa-emerald); }
.toast.error { border-left: 4px solid var(--accent-rose); }
.toast.info { border-left: 4px solid var(--accent-cyan); }

/* Utilities & Animations */
.text-success { color: var(--wa-emerald) !important; }
.text-danger { color: var(--accent-rose) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-highlight { color: var(--text-highlight) !important; }

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

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 0.2; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

@keyframes pulse-amber {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* ==========================================================================
   NICHE OUTREACH TEMPLATES & DATA LOADER EXTENSIONS
   ========================================================================== */

.app-nav-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-tabs-group {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-tab-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-tab-btn.active {
  background: var(--bg-secondary);
  border-color: var(--border-subtle);
  color: var(--wa-emerald);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.nav-tab-btn.active .nav-badge {
  background: var(--wa-emerald-subtle);
  color: var(--wa-dark-green);
}

/* Templates Grid */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.template-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.2s ease;
}

.template-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.template-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.template-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.template-niche-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.dual-offers-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.offer-mini-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.offer-mini-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.offer-mini-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  display: inline-block;
  width: fit-content;
}

.badge-noweb {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.badge-hasweb {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.offer-mini-count {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.template-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

/* Data Loader Table */
.data-loader-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
  margin-top: 16px;
}

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

.data-table th {
  background: var(--bg-primary);
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: var(--bg-hover);
}

/* Deduplication & Dual Split Modal */
.modal-xl {
  width: 90%;
  max-width: 1100px;
}

.dedup-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  color: #92400e;
  font-size: 0.85rem;
}

.dedup-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.dual-offers-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .dual-offers-split {
    grid-template-columns: 1fr;
  }
}

.split-col {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card, #ffffff);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.offer-noweb-header {
  background: #fff7ed;
  border-left: 4px solid #f97316;
}

.offer-hasweb-header {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
}

.split-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.split-subcaption {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.split-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.badge-noweb {
  background: #fed7aa;
  color: #9a3412;
}

.badge-hasweb {
  background: #bfdbfe;
  color: #1e40af;
}

/* Quick Search & Status Filter Controls */
.split-table-controls {
  padding: 10px 14px;
  background: var(--bg-secondary, #f8fafc);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leads-search-box {
  display: flex;
  align-items: center;
  background: var(--bg-input, #ffffff);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  gap: 8px;
  transition: border-color 0.15s ease;
}

.leads-search-box:focus-within {
  border-color: var(--brand-primary, #10b981);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.leads-search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.leads-filter-input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.leads-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.lead-pill {
  border: 1px solid var(--border-subtle);
  background: var(--bg-card, #ffffff);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.lead-pill:hover {
  background: var(--bg-hover, #f1f5f9);
  color: var(--text-primary);
}

.lead-pill.active {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
}

.lead-pill.pill-sent.active {
  background: #059669;
  border-color: #059669;
}

.lead-pill.pill-failed.active {
  background: #dc2626;
  border-color: #dc2626;
}

.split-table-wrap {
  max-height: 480px;
  overflow-y: auto;
  scrollbar-width: thin;
  position: relative;
  background: var(--bg-card, #ffffff);
}

.leads-table-compact {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  table-layout: fixed;
}

.leads-table-compact th {
  padding: 10px 12px;
  background: #f8fafc;
  font-weight: 700;
  color: #475569;
  border-bottom: 2px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 3;
  text-align: left;
  letter-spacing: 0.02em;
  font-size: 0.74rem;
  text-transform: uppercase;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.leads-table-compact td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.leads-table-compact tbody tr:hover {
  background: rgba(248, 250, 252, 0.8);
}

.leads-table-compact th.col-idx,
.leads-table-compact td.col-idx {
  width: 44px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.leads-table-compact th.col-name,
.leads-table-compact td.col-name {
  width: 38%;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leads-table-compact th.col-phone,
.leads-table-compact td.col-phone {
  width: 36%;
  white-space: nowrap !important;
}

.leads-table-compact th.col-status,
.leads-table-compact td.col-status {
  width: 26%;
  text-align: right;
  white-space: nowrap !important;
}

.phone-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap !important;
}

.phone-digits {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  white-space: nowrap !important;
}

.split-table-footer {
  padding: 8px 14px;
  background: var(--bg-secondary, #f8fafc);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}

/* Duplicate Row Styling */
tr.lead-duplicate {
  background: #fef2f2 !important;
  opacity: 0.7;
}

tr.lead-duplicate td.col-name strong {
  text-decoration: line-through;
  color: #991b1b;
}

.badge-duplicate-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none !important;
}

/* ==========================================================================
   TEMPLATE WORKSPACE & DUAL-CAMPAIGN EDITOR STYLES
   ========================================================================== */

.collapsible-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.collapsible-header {
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.collapsible-header:hover {
  background: var(--bg-hover);
}

.collapsible-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.collapsible-title h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.section-subtext {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.btn-toggle-collapse {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.collapsible-card.collapsed .btn-toggle-collapse {
  transform: rotate(-90deg);
}

.collapsible-card.collapsed .collapsible-content {
  display: none;
}

.collapsible-content {
  padding: 20px;
}

/* Dual Campaigns Side-by-Side */
.dual-campaigns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .dual-campaigns-grid {
    grid-template-columns: 1fr;
  }
}

.campaign-editor-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.offer-box-noweb {
  border-top: 3px solid #f97316;
}

.offer-box-hasweb {
  border-top: 3px solid #3b82f6;
}

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

.box-header h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 4px;
  color: var(--text-primary);
}

.offer-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.assigned-lead-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--bg-secondary);
  padding: 3px 8px;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.message-textarea {
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.form-hint code {
  background: var(--bg-tertiary);
  padding: 2px 5px;
  border-radius: var(--radius-xs);
  color: var(--wa-emerald);
  font-family: var(--font-mono);
}

/* Template Editor Sticky Footer */
.template-editor-footer {
  position: sticky;
  bottom: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  margin-top: 30px;
  z-index: 20;
}

.footer-actions-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Modal Batches Grid */
.batches-grid-modal {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.batch-pick-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.batch-pick-card:hover {
  border-color: var(--wa-emerald);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
  transform: translateY(-1px);
}

.batch-pick-meta h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.batch-pick-details {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

[data-theme="dark"] .badge-noweb {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .badge-hasweb {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

/* Template Execution History & Activity Logs */
.header-right-badges {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logs-status-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.logs-status-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pacing-pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #94a3b8;
  position: relative;
  flex-shrink: 0;
}

.pacing-pulse-dot.active {
  background: var(--wa-emerald);
  box-shadow: 0 0 10px var(--wa-emerald);
}

.pacing-pulse-dot.active::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid var(--wa-emerald);
  animation: pulse-ring 2s infinite;
}

.pacing-pulse-dot.sleeping {
  background: var(--accent-amber);
}

.logs-status-left h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.logs-status-left p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.logs-status-stats {
  display: flex;
  gap: 20px;
  align-items: center;
}

.stat-mini {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.stat-mini-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.stat-mini-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.daily-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.daily-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--wa-emerald), #34d399);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.template-logs-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px 4px;
}

.log-item-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.log-item-card:hover {
  background: var(--bg-hover);
}

.log-item-icon {
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1.2;
}

.log-item-content {
  flex: 1;
}

.log-item-msg {
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.4;
}

.log-item-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* AI Number Toggle Controls */
.ai-number-card {
  transition: all var(--transition-fast);
}

.ai-number-card:hover {
  border-color: var(--border-medium) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

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

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

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

[data-theme="dark"] .toggle-slider {
  background-color: #475569;
}

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

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--wa-emerald, #10b981) !important;
}

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

/* WhatsApp Presence Indicator Dots */
.wa-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}

.wa-dot.online {
  background-color: #10b981;
  box-shadow: 0 0 7px rgba(16, 185, 129, 0.7);
}

.wa-dot.invalid {
  background-color: #ef4444;
  box-shadow: 0 0 7px rgba(239, 68, 68, 0.7);
}

.wa-dot.pending {
  background-color: #94a3b8;
}

/* Lead Status Badges & WhatsApp Ticks */
.status-badge.status-read {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.3);
  font-weight: 700;
}

.status-badge.status-delivered {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 600;
}

.status-badge.status-sent {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.status-badge.status-sending {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.35);
  animation: pulse-badge 1.4s infinite;
}

.status-badge.status-failed {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.tick-icon {
  font-family: inherit;
  font-size: 0.85rem;
  margin-right: 4px;
}

.tick-icon.blue {
  color: #2563eb;
  font-weight: 900;
  letter-spacing: -2px;
}

.tick-icon.grey {
  color: #64748b;
  font-weight: 900;
  letter-spacing: -2px;
}

.badge-assigned-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  text-transform: uppercase;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(0.98); }
}


