/* ==========================================================================
   Sales Manager AI - Easy Theme & Typography Configuration Engine
   --------------------------------------------------------------------------
   HOW TO CUSTOMIZE THE THEME & FONTS:
   To change the entire app look, color scheme, or typography, modify ONLY
   the CSS variables in the ":root" section below.
   All components, buttons, cards, navigation bar, tables, badges, popups,
   and charts automatically adapt to your changes instantly!
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800&family=Plus+Jakarta+Sans:wght@600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* ========================================================================
     1. TYPOGRAPHY & FONTS (Premium AI SaaS System)
     - Headings: 'Outfit' (Sleek geometric AI aesthetic)
     - Body: 'Inter' (Ultra-clean, high-density data legibility)
     - Numbers/Code: 'JetBrains Mono' (Precision tabular metrics)
     ======================================================================== */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Plus Jakarta Sans', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;

  /* ========================================================================
     2. COLOR PALETTE CONFIGURATION
     Change these hex codes to update your entire system color theme!
     Current Theme Palette: https://colorhunt.co/palette/ff9e20215e611d2128f4f2f2
     - #FF9E20: Electric Amber Orange Accent
     - #215E61: Deep Teal Green Secondary
     - #1D2128: Charcoal Slate Dark Base
     - #F4F2F2: Soft Off-White Typography
     ======================================================================== */
  
  /* System Backgrounds */
  --theme-bg-dark: #16181e;          /* Main application page background */
  --theme-bg-surface: #1d2128;       /* Palette dark surface base (#1D2128) */
  --theme-bg-card: #252a34;          /* Card panels and container boxes */
  --theme-bg-card-hover: #2d3440;    /* Interactive card hover background */
  --theme-bg-nav: #171b21;           /* Header navigation bar background */
  --theme-bg-input: #1a1e25;         /* Form inputs & select dropdowns */

  /* Borders & Lines */
  --theme-border-color: #2e3643;     /* Main border color */
  --theme-border-subtle: rgba(244, 242, 242, 0.1); /* Table & card inner dividers */
  --theme-border-hover: #FF9E20;     /* Hover & focus border highlight */

  /* Typography Text Colors */
  --theme-text-heading: #F4F2F2;      /* Palette light heading text (#F4F2F2) */
  --theme-text-primary: #e0dede;      /* Primary body text */
  --theme-text-secondary: #a4a8b4;    /* Secondary text & labels */
  --theme-text-muted: #737884;        /* Muted captions & subtext */

  /* Primary Accent & CTAs (#FF9E20) */
  --theme-accent-primary: #FF9E20;       /* Electric Amber Orange CTA */
  --theme-accent-primary-hover: #e58a10; /* Orange Hover background */
  --theme-accent-primary-text: #16181e;  /* Dark high-contrast text on orange button */

  /* Secondary Accent (#215E61) */
  --theme-accent-secondary: #215E61;       /* Deep Teal Green */
  --theme-accent-secondary-hover: #194a4d; /* Deep Teal Hover */
  --theme-accent-secondary-text: #F4F2F2;  /* Light text on teal buttons */

  /* Status Badges & Alerts */
  --theme-status-success: #3ab09e;   /* Vibrant Teal Green: Success / Active / Online */
  --theme-status-warning: #FF9E20;   /* Amber Orange: Warning / Queued / In progress */
  --theme-status-danger: #e65252;    /* Coral Red: Danger / Failed / Delete */

  /* ========================================================================
     3. SYSTEM ALIASED TOKENS (Used by components)
     ======================================================================== */
  --bg-dark: var(--theme-bg-dark);
  --bg-surface: var(--theme-bg-surface);
  --bg-card: var(--theme-bg-card);
  --bg-card-hover: var(--theme-bg-card-hover);
  --bg-nav: var(--theme-bg-nav);
  --bg-input: var(--theme-bg-input);

  --border-color: var(--theme-border-color);
  --border-subtle: var(--theme-border-subtle);
  --border-hover: var(--theme-border-hover);

  --text-heading: var(--theme-text-heading);
  --text-primary: var(--theme-text-primary);
  --text-secondary: var(--theme-text-secondary);
  --text-muted: var(--theme-text-muted);

  --accent-primary: var(--theme-accent-primary);
  --accent-primary-hover: var(--theme-accent-primary-hover);
  --accent-primary-text: var(--theme-accent-primary-text);

  --accent-secondary: var(--theme-accent-secondary);
  --accent-secondary-hover: var(--theme-accent-secondary-hover);
  --accent-secondary-text: var(--theme-accent-secondary-text);
  --accent-terracotta: var(--theme-accent-secondary);

  --status-success: var(--theme-status-success);
  --status-warning: var(--theme-status-warning);
  --status-danger: var(--theme-status-danger);

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.5);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

#app {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Fast Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Header Navbar */
.app-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-heading);
}

.brand-logo-img {
  height: 36px;
  max-width: 200px;
  object-fit: contain;
  display: block;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(255, 158, 32, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(255, 158, 32, 0.35);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.1s ease, color 0.1s ease;
}

.nav-item a:hover {
  color: var(--text-heading);
  background: var(--bg-card);
}

.nav-item.active a {
  color: var(--accent-primary-text);
  background: var(--accent-primary);
  font-weight: 700;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(78, 168, 133, 0.15);
  border: 1px solid rgba(78, 168, 133, 0.3);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--status-success);
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 4px 12px 4px 5px;
  border-radius: var(--radius-full);
  color: var(--text-heading);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.1s ease;
}

.profile-btn:hover {
  border-color: var(--accent-primary);
}

.profile-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-primary-text);
}

.nav-profile-wrapper {
  position: relative;
}

.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  padding: 6px;
  z-index: 1000;
  display: none;
  animation: dropdownFadeIn 0.15s ease-out;
}

.profile-dropdown-menu.show {
  display: block;
}

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

.profile-dropdown-header {
  padding: 10px 12px 8px 12px;
}

.profile-dropdown-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-heading);
  line-height: 1.2;
}

.profile-dropdown-email {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 3px;
  word-break: break-all;
}

.profile-dropdown-divider {
  height: 1px;
  background: var(--border-subtle, rgba(255, 255, 255, 0.08));
  margin: 4px 0;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  border-radius: var(--radius-sm, 6px);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.1s ease, color 0.1s ease;
}

.profile-dropdown-item:hover {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.06));
  color: var(--text-heading);
}

.profile-dropdown-item.logout-item {
  color: var(--status-danger, #ef4444);
}

.profile-dropdown-item.logout-item:hover {
  background: rgba(239, 68, 68, 0.12);
  color: var(--status-danger, #ef4444);
}

/* Page Layout */
.page-container {
  width: 100%;
  max-width: 100%;
  padding: 1.5rem 2rem 5rem 2rem;
  flex: 1;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}

.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.1s ease, border-color 0.1s ease, color 0.1s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: var(--accent-primary-text);
  font-weight: 700;
  border: 1px solid var(--accent-primary);
}

.btn-primary:hover {
  background-color: var(--accent-primary-hover);
  border-color: var(--accent-primary-hover);
}

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

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

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

.btn-terracotta:hover {
  background-color: var(--accent-secondary-hover);
  border-color: var(--accent-secondary-hover);
}

.btn-danger {
  background-color: rgba(217, 107, 99, 0.15);
  color: var(--status-danger);
  border: 1px solid rgba(217, 107, 99, 0.3);
}

.btn-danger:hover {
  background-color: var(--status-danger);
  color: var(--text-heading);
}

/* Stat Cards & Overview Grid */
.grid-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.grid-overview-top {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
  margin-bottom: 1.25rem;
  width: 100%;
}

.grid-overview-bottom {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.15rem;
  width: 100%;
}

@media (max-width: 1024px) {
  .grid-overview-top { grid-template-columns: repeat(2, 1fr); }
  .grid-overview-bottom { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1200px) {
  .grid-stats { grid-template-columns: repeat(2, 1fr); }
}

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: border-color 0.1s ease, background-color 0.1s ease;
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  border-color: var(--accent-primary);
  background-color: var(--bg-card-hover);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(217, 155, 127, 0.15);
  border: 1px solid rgba(217, 155, 127, 0.35);
  color: var(--accent-primary);
}

.stat-icon.purple { background: rgba(165, 111, 99, 0.18); border-color: rgba(165, 111, 99, 0.35); color: var(--accent-primary); }
.stat-icon.emerald { background: rgba(78, 168, 133, 0.15); border-color: rgba(78, 168, 133, 0.3); color: var(--status-success); }
.stat-icon.cyan { background: rgba(70, 72, 88, 0.35); border-color: rgba(70, 72, 88, 0.5); color: var(--accent-primary); }

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.stat-trend.up {
  color: var(--status-success);
  background: rgba(78, 168, 133, 0.15);
  border: 1px solid rgba(78, 168, 133, 0.3);
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}

.stat-footer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Dashboard Grid & Cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Progress Lists & SVG Charts */
.chart-container {
  position: relative;
  width: 100%;
  height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.chart-svg {
  width: 100%;
  height: 180px;
  overflow: visible;
}

.progress-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.progress-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.progress-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}

.progress-name {
  font-weight: 600;
  color: var(--text-primary);
}

.progress-count {
  font-weight: 700;
  color: var(--text-heading);
  font-family: var(--font-mono);
}

.progress-track {
  height: 7px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
}

/* Tables & Status Badges */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

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

.custom-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-weight: 700;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.custom-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-success {
  background: rgba(33, 94, 97, 0.3);
  color: var(--status-success);
  border: 1px solid rgba(58, 176, 158, 0.45);
}

.badge-running {
  background: rgba(255, 158, 32, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(255, 158, 32, 0.35);
}

.badge-queued {
  background: rgba(255, 158, 32, 0.15);
  color: var(--status-warning);
  border: 1px solid rgba(255, 158, 32, 0.35);
}

.badge-score {
  background: rgba(33, 94, 97, 0.3);
  color: var(--accent-primary);
  border: 1px solid rgba(58, 176, 158, 0.45);
  font-family: var(--font-mono);
  font-weight: 700;
}

/* AI Copilot Assistant Widget */
.ai-assistant-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
}

.ai-fab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
  color: var(--accent-primary-text);
  font-weight: 800;
  font-size: 0.85rem;
  border: 1px solid var(--accent-primary);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background-color 0.1s ease;
}

.ai-fab-btn:hover {
  background: var(--accent-primary-hover);
  border-color: var(--accent-primary-hover);
}

.ai-sparkle-icon {
  width: 18px;
  height: 18px;
}

.ai-drawer {
  position: fixed;
  bottom: 76px;
  right: 24px;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 100px);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 1001;
}

.ai-drawer.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.ai-drawer-header {
  padding: 1rem;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.ai-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary-text);
  font-weight: 800;
}

.ai-drawer-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-heading);
}

.ai-drawer-subtitle {
  font-size: 0.72rem;
  color: var(--status-success);
  display: flex;
  align-items: center;
  gap: 4px;
}

.ai-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
}

.ai-close-btn:hover {
  color: var(--text-heading);
  background: rgba(255, 255, 255, 0.1);
}

.ai-chat-body {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ai-msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  font-size: 0.82rem;
  line-height: 1.4;
}

.ai-msg.user {
  align-self: flex-end;
  background: var(--accent-primary);
  color: var(--accent-primary-text);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 12px 12px 2px 12px;
}

.ai-msg.assistant {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 12px;
  border-radius: 12px 12px 12px 2px;
}

.ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.ai-chip {
  background: rgba(255, 158, 32, 0.15);
  border: 1px solid rgba(255, 158, 32, 0.35);
  color: var(--accent-primary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
}

.ai-chip:hover {
  background: var(--accent-primary);
  color: var(--accent-primary-text);
}

.ai-input-area {
  padding: 0.85rem;
  background: var(--bg-nav);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  outline: none;
}

.ai-input:focus {
  border-color: var(--accent-primary);
}

.ai-send-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: none;
  color: var(--accent-primary-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Social Directory & Chips */
.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.social-chip:hover {
  background: var(--bg-card-hover);
  color: var(--text-heading);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.social-chip.active {
  background: var(--accent-primary);
  color: var(--accent-primary-text);
  border-color: var(--accent-primary);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(217, 155, 127, 0.35);
}

.chip-count {
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.social-chip.active .chip-count {
  background: rgba(11, 36, 49, 0.25);
  color: var(--accent-primary-text);
}

.social-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s;
}

.social-badge-tag:hover {
  opacity: 0.85;
}

.social-badge-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #ffffff !important;
}

.social-badge-linkedin {
  background: #0077b5;
  color: #ffffff !important;
}

.social-badge-facebook {
  background: #1877f2;
  color: #ffffff !important;
}

.social-badge-twitter {
  background: #1da1f2;
  color: #ffffff !important;
}

.social-badge-whatsapp {
  background: #25d366;
  color: #ffffff !important;
}

.social-lead-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.social-lead-card:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

/* Global Form Elements */
input, select, textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  outline: none;
  font-family: var(--font-sans);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-primary);
}

/* ==========================================================================
   Email Warm-Up Module Component & Tab Navigation System
   ========================================================================== */

/* Engine Pulse Dot */
.engine-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(58, 176, 158, 0.12);
  border: 1px solid rgba(58, 176, 158, 0.3);
  color: var(--status-success);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.engine-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--status-success);
  box-shadow: 0 0 10px var(--status-success);
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(58, 176, 158, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(58, 176, 158, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(58, 176, 158, 0); }
}

/* Warmup Tab Navigation Bar */
.warmup-tab-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

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

.tab-btn:hover {
  color: var(--text-heading);
  background: var(--bg-card);
  border-color: var(--border-subtle);
}

.tab-btn.active {
  color: var(--accent-primary-text);
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 158, 32, 0.25);
}

.tab-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
}

.tab-btn.active .tab-count-badge {
  background: rgba(22, 24, 30, 0.25);
  color: var(--accent-primary-text);
}

/* Tab Panel Display & Fade Animation */
.warmup-tab-content {
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.warmup-tab-content.active {
  display: block;
  opacity: 1;
  animation: fadeInContent 0.25s ease-in-out;
}

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

/* Tables & Data Display */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-sm);
}

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

.data-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.data-table tbody tr {
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}

/* Additional Badges */
.badge-neutral {
  background: rgba(244, 242, 242, 0.08);
  color: var(--text-secondary);
  border: 1px solid rgba(244, 242, 242, 0.15);
}

.badge-info {
  background: rgba(33, 94, 97, 0.3);
  color: #64b5f6;
  border: 1px solid rgba(100, 181, 246, 0.4);
}

.badge-warning {
  background: rgba(255, 158, 32, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(255, 158, 32, 0.35);
}

.badge-danger {
  background: rgba(230, 82, 82, 0.15);
  color: var(--status-danger);
  border: 1px solid rgba(230, 82, 82, 0.35);
}

.btn-sm {
  padding: 0.38rem 0.75rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.form-control-sm {
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* Glassmorphism Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 17, 23, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: slideUp 0.2s ease;
}

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

.modal-header {
  padding: 1.25rem 1.5rem;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-heading);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}

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

/* Toast Alerts */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-alert {
  pointer-events: auto;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: toastIn 0.25s ease forwards;
}

.toast-alert.success { background: #215E61; color: #F4F2F2; border-color: rgba(58, 176, 158, 0.4); }
.toast-alert.info { background: #1a2332; color: #F4F2F2; border-color: rgba(100, 181, 246, 0.4); }
.toast-alert.error { background: #3d1c1c; color: #F4F2F2; border-color: rgba(230, 82, 82, 0.4); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* AI Message Interactive Action Buttons */
.ai-msg-actions-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-heading);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.ai-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 158, 32, 0.3);
  border-color: var(--accent-primary);
}

.ai-action-btn.yes-btn {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.4) 100%);
  border-color: rgba(16, 185, 129, 0.6);
  color: #10b981;
}

.ai-action-btn.yes-btn:hover {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.ai-action-btn.no-btn {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(239, 68, 68, 0.4) 100%);
  border-color: rgba(239, 68, 68, 0.6);
  color: #ef4444;
}

.ai-action-btn.no-btn:hover {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.ai-action-btn.model-btn {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25) 0%, rgba(168, 85, 247, 0.4) 100%);
  border-color: rgba(168, 85, 247, 0.6);
  color: #c084fc;
}

.ai-action-btn.model-btn:hover {
  background: #a855f7;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.4);
}

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


