/* ========================================================
   WaMsg Club Pro CRM - Design System & Modern Aesthetics
   ======================================================== */

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

:root, [data-theme="light"] {
  /* White Theme Default */
  --bg-app: #f1f5f9;
  --bg-sidebar: #ffffff;
  --bg-header: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #f1f5f9;
  --bg-overlay: rgba(15, 23, 42, 0.5);

  --border-subtle: #e2e8f0;
  --border-focus: #2563eb;
  --border-card: #e2e8f0;

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

  --bubble-inbound: #ffffff;
  --bubble-outbound: #d9fdd3;
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);

  /* Brand Accents */
  --brand-wa: #25d366;
  --brand-wa-dark: #128c7e;
  --brand-wa-glow: rgba(37, 211, 102, 0.25);

  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.25);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;

  /* Stage Colors */
  --stage-new: #0284c7;
  --stage-interested: #d97706;
  --stage-converted: #059669;
  --stage-id-created: #7c3aed;
  --stage-deposit: #0891b2;
  --stage-not-interested: #64748b;
  --stage-dnc: #dc2626;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', sans-serif;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
}

/* Dark Theme Override */
[data-theme="dark"] {
  --bg-app: #0b0f19;
  --bg-sidebar: #0f172a;
  --bg-header: #0f172a;
  --bg-card: #131d35;
  --bg-card-hover: #172442;
  --bg-input: #1a2542;
  --bg-overlay: rgba(5, 8, 15, 0.75);

  --border-subtle: #1e293b;
  --border-focus: #38bdf8;
  --border-card: #1f2e4d;

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

  --bubble-inbound: #1e293b;
  --bubble-outbound: #054c3f;

  --stage-new: #38bdf8;
  --stage-interested: #f59e0b;
  --stage-converted: #10b981;
  --stage-id-created: #a855f7;
  --stage-deposit: #06b6d4;
  --stage-not-interested: #64748b;
  --stage-dnc: #ef4444;

  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* App Header */
.app-header {
  height: 64px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 50;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--brand-wa), var(--brand-wa-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 20px;
  box-shadow: 0 0 15px var(--brand-wa-glow);
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="light"] .brand-title {
  background: linear-gradient(135deg, #0f172a, #334155);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-center {
  flex: 1;
  max-width: 440px;
  margin: 0 32px;
}

.global-search {
  position: relative;
  width: 100%;
}

.global-search input {
  width: 100%;
  height: 40px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0 16px 0 42px;
  color: var(--text-main);
  font-size: 0.875rem;
  transition: var(--transition-fast);
}

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

.global-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 14px;
}

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

.badge-trial {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--warning);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-header {
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-header:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-dim);
}

.btn-accent,
.btn-header.btn-accent,
#btnQuickAddLead {
  background: linear-gradient(135deg, #00a884, #008069) !important;
  color: #ffffff !important;
  border: 1px solid #008069 !important;
  box-shadow: 0 2px 10px rgba(0, 168, 132, 0.35) !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.btn-accent:hover,
.btn-header.btn-accent:hover,
#btnQuickAddLead:hover {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: #ffffff !important;
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 168, 132, 0.45) !important;
}

.btn-accent span,
.btn-header.btn-accent span,
#btnQuickAddLead span {
  color: #ffffff !important;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 4px 4px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main Layout */
.app-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar Navigation */
.app-sidebar {
  width: 240px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 12px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-weight: 700;
  padding: 8px 12px 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-fast);
  cursor: pointer;
}

.nav-link:hover {
  color: var(--text-main);
  background: var(--bg-card);
}

.nav-link.active {
  color: var(--text-main);
  background: linear-gradient(90deg, rgba(37, 211, 102, 0.18), rgba(37, 211, 102, 0.04));
  border-left: 3px solid var(--brand-wa);
  font-weight: 600;
}

[data-theme="light"] .nav-link {
  color: #475569;
}

[data-theme="light"] .nav-link:hover {
  color: #0f172a;
  background: #f1f5f9;
}

[data-theme="light"] .nav-link.active {
  color: #0f172a;
  background: rgba(37, 211, 102, 0.18);
  border-left: 3px solid var(--brand-wa);
  font-weight: 700;
}

.sidebar-status-box {
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  transition: var(--transition-fast);
}

[data-theme="light"] .sidebar-status-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.nav-link .nav-icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  background: var(--brand-wa);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

/* Main Content Area */
.app-main {
  flex: 1;
  background: var(--bg-app);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.page-view {
  padding: 28px;
  display: none;
  animation: fadeIn 0.2s ease-in-out;
}

.page-view.active {
  display: block;
}

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

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
}

.page-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Cards & Grid */
.grid-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
}

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}

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

.kpi-val {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 4px;
}

.kpi-trend {
  font-size: 0.75rem;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Quick Actions Strip */
.quick-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 20px;
}

.btn-quick {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.btn-quick:hover {
  background: var(--bg-card-hover);
  border-color: var(--brand-wa);
  color: var(--brand-wa);
}

/* Dashboard Sections */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Funnel bars */
.funnel-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.funnel-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.funnel-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.funnel-bar-bg {
  height: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.funnel-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

/* Velocity SVG Chart */
.velocity-chart {
  width: 100%;
  height: 180px;
}

/* ========================================================
   AUTHENTIC WHATSAPP WEB THEME
   ======================================================== */
:root {
  --wa-chat-bg: #efeae2;
  --wa-chat-pattern: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22360%22%20height%3D%22360%22%20viewBox%3D%220%200%20360%20360%22%20fill%3D%22none%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20opacity%3D%220.06%22%3E%0A%20%20%20%20%3C!--%20Chat%20bubble%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M30%2040%20h35%20a10%2010%200%200%201%2010%2010%20v15%20a10%2010%200%200%201%20-10%2010%20h-20%20l-10%208%20v-8%20h-5%20a10%2010%200%200%201%20-10%20-10%20v-15%20a10%2010%200%200%201%2010%20-10%20z%22%20%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2243%22%20cy%3D%2253%22%20r%3D%221.5%22%20fill%3D%22%23000000%22%20%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2253%22%20cy%3D%2253%22%20r%3D%221.5%22%20fill%3D%22%23000000%22%20%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2263%22%20cy%3D%2253%22%20r%3D%221.5%22%20fill%3D%22%23000000%22%20%2F%3E%0A%20%20%20%20%3C!--%20Camera%20--%3E%0A%20%20%20%20%3Crect%20x%3D%22130%22%20y%3D%2235%22%20width%3D%2228%22%20height%3D%2220%22%20rx%3D%224%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M138%2035%20l2%20-5%20h8%20l2%205%22%20%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22144%22%20cy%3D%2245%22%20r%3D%225%22%20%2F%3E%0A%20%20%20%20%3C!--%20Coffee%20Cup%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M240%2040%20h20%20v16%20a8%208%200%200%201%20-8%208%20h-4%20a8%208%200%200%201%20-8%20-8%20z%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M260%2044%20h5%20a4%204%200%200%201%204%204%20v2%20a4%204%200%200%201%20-4%204%20h-5%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M244%2034%20q3%20-4%200%20-8%20M250%2034%20q3%20-4%200%20-8%22%20%2F%3E%0A%20%20%20%20%3C!--%20Music%20note%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M320%2035%20v25%20m0%20-20%20h12%20v20%22%20%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22316%22%20cy%3D%2260%22%20r%3D%224%22%20fill%3D%22%23000000%22%20%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22328%22%20cy%3D%2255%22%20r%3D%224%22%20fill%3D%22%23000000%22%20%2F%3E%0A%20%20%20%20%3C!--%20Phone%20handset%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M40%20140%20c2%20-5%208%20-4%2010%20-1%20l4%206%20c2%203%201%207%20-2%209%20l-2%202%20c3%206%208%2011%2014%2014%20l2%20-2%20c2%20-3%206%20-4%209%20-2%20l6%204%20c3%202%204%208%20-1%2010%20c-8%204%20-18%20-2%20-25%20-9%20c-7%20-7%20-13%20-17%20-9%20-25%20z%22%20%2F%3E%0A%20%20%20%20%3C!--%20Heart%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M140%20135%20a6%206%200%200%200%20-9%200%20a6%206%200%200%200%20-9%200%20c-4%205%202%2012%209%2017%20c7%20-5%2013%20-12%209%20-17%20z%22%20%2F%3E%0A%20%20%20%20%3C!--%20Clock%20--%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22230%22%20cy%3D%22140%22%20r%3D%2212%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M230%20132%20v8%20l5%203%22%20%2F%3E%0A%20%20%20%20%3C!--%20Star%20--%3E%0A%20%20%20%20%3Cpolygon%20points%3D%22320%2C130%20323%2C138%20332%2C138%20325%2C143%20327%2C151%20320%2C146%20313%2C151%20315%2C143%20308%2C138%20317%2C138%22%20%2F%3E%0A%20%20%20%20%3C!--%20Paper%20airplane%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M30%20230%20l30%2012%20l-12%2018%20l-6%20-8%20l-12%20-22%20z%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M60%20242%20l-18%2010%22%20%2F%3E%0A%20%20%20%20%3C!--%20Smiley%20face%20--%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22135%22%20cy%3D%22235%22%20r%3D%2214%22%20%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22130%22%20cy%3D%22231%22%20r%3D%221.5%22%20fill%3D%22%23000000%22%20%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22140%22%20cy%3D%22231%22%20r%3D%221.5%22%20fill%3D%22%23000000%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M129%20239%20q6%207%2012%200%22%20%2F%3E%0A%20%20%20%20%3C!--%20Umbrella%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M220%20240%20a15%2015%200%200%201%2030%200%20z%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M235%20240%20v15%20a4%204%200%200%201%20-8%200%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M235%20225%20v-4%22%20%2F%3E%0A%20%20%20%20%3C!--%20Location%20Pin%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M320%20225%20c-7%200%20-12%205%20-12%2012%20c0%209%2012%2018%2012%2018%20s12%20-9%2012%20-18%20c0%20-7%20-5%20-12%20-12%20-12%20z%22%20%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22320%22%20cy%3D%22237%22%20r%3D%224%22%20%2F%3E%0A%20%20%20%20%3C!--%20Envelope%20--%3E%0A%20%20%20%20%3Crect%20x%3D%2235%22%20y%3D%22315%22%20width%3D%2224%22%20height%3D%2216%22%20rx%3D%222%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M35%20317%20l12%209%20l12%20-9%22%20%2F%3E%0A%20%20%20%20%3C!--%20Lightbulb%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M135%20310%20a9%209%200%200%201%2014%208%20c0%203%20-2%205%20-3%207%20h-8%20c-1%20-2%20-3%20-4%20-3%20-7%20a9%209%200%200%201%200%20-1%20z%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M138%20327%20h8%20m-6%203%20h4%22%20%2F%3E%0A%20%20%20%20%3C!--%20Headphones%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M225%20320%20a12%2012%200%200%201%2024%200%22%20%2F%3E%0A%20%20%20%20%3Crect%20x%3D%22222%22%20y%3D%22320%22%20width%3D%225%22%20height%3D%2210%22%20rx%3D%222%22%20%2F%3E%0A%20%20%20%20%3Crect%20x%3D%22246%22%20y%3D%22320%22%20width%3D%225%22%20height%3D%2210%22%20rx%3D%222%22%20%2F%3E%0A%20%20%20%20%3C!--%20Double%20Checkmark%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M310%20325%20l4%204%20l8%20-8%20M316%20325%20l4%204%20l8%20-8%22%20%2F%3E%0A%20%20%3C%2Fsvg%3E");
  --wa-header-bg: #f0f2f5;
  --wa-sidebar-bg: #ffffff;
  --wa-search-bg: #f0f2f5;
  --wa-search-box: #ffffff;
  --wa-bubble-in: #ffffff;
  --wa-bubble-out: #d9fdd3;
  --wa-bubble-meta: #667781;
  --wa-input-bg: #f0f2f5;
  --wa-input-box: #ffffff;
  --wa-border: #e9edef;
  --wa-border-strong: #d1d7db;
  --wa-text-primary: #111b21;
  --wa-text-secondary: #667781;
  --wa-text-muted: #8696a0;
  --wa-teal: #008069;
  --wa-teal-hover: #00a884;
  --wa-teal-light: #25d366;
  --wa-tick-blue: #53bdeb;
  --wa-tick-gray: #8696a0;
  --wa-active-chat: #f0f2f5;
  --wa-hover-chat: #f5f6f6;
  --wa-chip-active: #d9fdd3;
  --wa-chip-active-text: #008069;
}

[data-theme="dark"], :root:not([data-theme="light"]) {
  --wa-chat-bg: #0b141a;
  --wa-chat-pattern: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22360%22%20height%3D%22360%22%20viewBox%3D%220%200%20360%20360%22%20fill%3D%22none%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20opacity%3D%220.04%22%3E%0A%20%20%20%20%3C!--%20Chat%20bubble%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M30%2040%20h35%20a10%2010%200%200%201%2010%2010%20v15%20a10%2010%200%200%201%20-10%2010%20h-20%20l-10%208%20v-8%20h-5%20a10%2010%200%200%201%20-10%20-10%20v-15%20a10%2010%200%200%201%2010%20-10%20z%22%20%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2243%22%20cy%3D%2253%22%20r%3D%221.5%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2253%22%20cy%3D%2253%22%20r%3D%221.5%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2263%22%20cy%3D%2253%22%20r%3D%221.5%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%3C!--%20Camera%20--%3E%0A%20%20%20%20%3Crect%20x%3D%22130%22%20y%3D%2235%22%20width%3D%2228%22%20height%3D%2220%22%20rx%3D%224%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M138%2035%20l2%20-5%20h8%20l2%205%22%20%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22144%22%20cy%3D%2245%22%20r%3D%225%22%20%2F%3E%0A%20%20%20%20%3C!--%20Coffee%20Cup%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M240%2040%20h20%20v16%20a8%208%200%200%201%20-8%208%20h-4%20a8%208%200%200%201%20-8%20-8%20z%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M260%2044%20h5%20a4%204%200%200%201%204%204%20v2%20a4%204%200%200%201%20-4%204%20h-5%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M244%2034%20q3%20-4%200%20-8%20M250%2034%20q3%20-4%200%20-8%22%20%2F%3E%0A%20%20%20%20%3C!--%20Music%20note%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M320%2035%20v25%20m0%20-20%20h12%20v20%22%20%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22316%22%20cy%3D%2260%22%20r%3D%224%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22328%22%20cy%3D%2255%22%20r%3D%224%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%3C!--%20Phone%20handset%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M40%20140%20c2%20-5%208%20-4%2010%20-1%20l4%206%20c2%203%201%207%20-2%209%20l-2%202%20c3%206%208%2011%2014%2014%20l2%20-2%20c2%20-3%206%20-4%209%20-2%20l6%204%20c3%202%204%208%20-1%2010%20c-8%204%20-18%20-2%20-25%20-9%20c-7%20-7%20-13%20-17%20-9%20-25%20z%22%20%2F%3E%0A%20%20%20%20%3C!--%20Heart%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M140%20135%20a6%206%200%200%200%20-9%200%20a6%206%200%200%200%20-9%200%20c-4%205%202%2012%209%2017%20c7%20-5%2013%20-12%209%20-17%20z%22%20%2F%3E%0A%20%20%20%20%3C!--%20Clock%20--%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22230%22%20cy%3D%22140%22%20r%3D%2212%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M230%20132%20v8%20l5%203%22%20%2F%3E%0A%20%20%20%20%3C!--%20Star%20--%3E%0A%20%20%20%20%3Cpolygon%20points%3D%22320%2C130%20323%2C138%20332%2C138%20325%2C143%20327%2C151%20320%2C146%20313%2C151%20315%2C143%20308%2C138%20317%2C138%22%20%2F%3E%0A%20%20%20%20%3C!--%20Paper%20airplane%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M30%20230%20l30%2012%20l-12%2018%20l-6%20-8%20l-12%20-22%20z%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M60%20242%20l-18%2010%22%20%2F%3E%0A%20%20%20%20%3C!--%20Smiley%20face%20--%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22135%22%20cy%3D%22235%22%20r%3D%2214%22%20%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22130%22%20cy%3D%22231%22%20r%3D%221.5%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22140%22%20cy%3D%22231%22%20r%3D%221.5%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M129%20239%20q6%207%2012%200%22%20%2F%3E%0A%20%20%20%20%3C!--%20Umbrella%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M220%20240%20a15%2015%200%200%201%2030%200%20z%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M235%20240%20v15%20a4%204%200%200%201%20-8%200%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M235%20225%20v-4%22%20%2F%3E%0A%20%20%20%20%3C!--%20Location%20Pin%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M320%20225%20c-7%200%20-12%205%20-12%2012%20c0%209%2012%2018%2012%2018%20s12%20-9%2012%20-18%20c0%20-7%20-5%20-12%20-12%20-12%20z%22%20%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22320%22%20cy%3D%22237%22%20r%3D%224%22%20%2F%3E%0A%20%20%20%20%3C!--%20Envelope%20--%3E%0A%20%20%20%20%3Crect%20x%3D%2235%22%20y%3D%22315%22%20width%3D%2224%22%20height%3D%2216%22%20rx%3D%222%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M35%20317%20l12%209%20l12%20-9%22%20%2F%3E%0A%20%20%20%20%3C!--%20Lightbulb%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M135%20310%20a9%209%200%200%201%2014%208%20c0%203%20-2%205%20-3%207%20h-8%20c-1%20-2%20-3%20-4%20-3%20-7%20a9%209%200%200%201%200%20-1%20z%22%20%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M138%20327%20h8%20m-6%203%20h4%22%20%2F%3E%0A%20%20%20%20%3C!--%20Headphones%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M225%20320%20a12%2012%200%200%201%2024%200%22%20%2F%3E%0A%20%20%20%20%3Crect%20x%3D%22222%22%20y%3D%22320%22%20width%3D%225%22%20height%3D%2210%22%20rx%3D%222%22%20%2F%3E%0A%20%20%20%20%3Crect%20x%3D%22246%22%20y%3D%22320%22%20width%3D%225%22%20height%3D%2210%22%20rx%3D%222%22%20%2F%3E%0A%20%20%20%20%3C!--%20Double%20Checkmark%20--%3E%0A%20%20%20%20%3Cpath%20d%3D%22M310%20325%20l4%204%20l8%20-8%20M316%20325%20l4%204%20l8%20-8%22%20%2F%3E%0A%20%20%3C%2Fsvg%3E");
  --wa-header-bg: #202c33;
  --wa-sidebar-bg: #111b21;
  --wa-search-bg: #202c33;
  --wa-search-box: #111b21;
  --wa-bubble-in: #202c33;
  --wa-bubble-out: #005c4b;
  --wa-bubble-meta: #8696a0;
  --wa-input-bg: #202c33;
  --wa-input-box: #2a3942;
  --wa-border: #222d34;
  --wa-border-strong: #2a3942;
  --wa-text-primary: #e9edef;
  --wa-text-secondary: #8696a0;
  --wa-text-muted: #667781;
  --wa-teal: #00a884;
  --wa-teal-hover: #008069;
  --wa-teal-light: #25d366;
  --wa-tick-blue: #53bdeb;
  --wa-tick-gray: #8696a0;
  --wa-active-chat: #2a3942;
  --wa-hover-chat: #202c33;
  --wa-chip-active: #005c4b;
  --wa-chip-active-text: #25d366;
}

/* Chat Container */
.chats-container {
  display: flex;
  height: calc(100vh - 105px);
  background: var(--wa-sidebar-bg);
  border: 1px solid var(--wa-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Sidebar */
.chats-sidebar {
  width: 380px;
  min-width: 340px;
  border-right: 1px solid var(--wa-border);
  display: flex;
  flex-direction: column;
  background: var(--wa-sidebar-bg);
}

.chats-sidebar-header {
  padding: 10px 16px;
  border-bottom: 1px solid var(--wa-border);
  background: var(--wa-header-bg);
}

.chats-sidebar-header h2 {
  font-size: 1.15rem !important;
  font-weight: 700;
  color: var(--wa-text-primary);
  letter-spacing: -0.01em;
}

.chats-search-bar {
  margin-top: 10px;
  position: relative;
}

.chats-search-bar input {
  width: 100%;
  height: 36px;
  background: var(--wa-search-bg);
  border: none;
  border-radius: 8px;
  padding: 0 12px 0 38px;
  color: var(--wa-text-primary);
  font-size: 0.88rem;
  transition: var(--transition-fast);
}

.chats-search-bar input:focus {
  outline: none;
  background: var(--wa-search-box);
  box-shadow: 0 0 0 1.5px var(--wa-teal);
}

.chats-search-bar::before {
  content: "🔍";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  opacity: 0.6;
  pointer-events: none;
}

/* WhatsApp Line Selector Dropdown */
.chat-number-filter-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  margin-top: 8px;
}

.chat-number-filter-wrap .filter-phone-icon {
  position: absolute;
  left: 12px;
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
  user-select: none;
}

.chat-number-select, #chatNumberFilter {
  width: 100%;
  height: 38px !important;
  min-height: 38px !important;
  line-height: 38px !important;
  padding: 0 32px 0 36px !important;
  box-sizing: border-box !important;
  background-color: var(--wa-search-bg);
  border: 1px solid var(--wa-border);
  border-radius: 8px;
  color: var(--wa-text-primary);
  font-size: 0.86rem;
  font-weight: 500;
  font-family: inherit;
  display: block;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667781' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  transition: var(--transition-fast);
}

.chat-number-select:focus, #chatNumberFilter:focus {
  outline: none;
  border-color: var(--wa-teal);
  background-color: var(--wa-search-box);
  box-shadow: 0 0 0 1px var(--wa-teal);
}

.chat-number-select option, #chatNumberFilter option {
  padding: 8px 12px;
  background-color: var(--wa-search-box);
  color: var(--wa-text-primary);
  font-size: 0.88rem;
}

/* WhatsApp Filter Chips / Tabs */
.chats-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--wa-border);
  background: var(--wa-sidebar-bg);
  overflow-x: auto;
}

.chat-tab {
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--wa-text-secondary);
  background: var(--wa-search-bg);
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.chat-tab:hover {
  background: var(--wa-border);
  color: var(--wa-text-primary);
}

.chat-tab.active {
  background: var(--wa-chip-active) !important;
  color: var(--wa-chip-active-text) !important;
  font-weight: 600;
  border-color: rgba(0, 128, 105, 0.2);
}

/* Threads List */
.chat-threads-list {
  flex: 1;
  overflow-y: auto;
  background: var(--wa-sidebar-bg);
}

.chat-thread-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--wa-border);
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}

.chat-thread-item:hover {
  background: var(--wa-hover-chat);
}

.chat-thread-item.active {
  background: var(--wa-active-chat) !important;
}

.thread-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00a884, #008069);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 600;
  font-size: 17px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.thread-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

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

.thread-time {
  font-size: 0.72rem;
  color: var(--wa-text-secondary);
  font-weight: 400;
}

.thread-snippet {
  font-size: 0.82rem;
  color: var(--wa-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.thread-badge {
  background: var(--wa-teal-light) !important;
  color: #ffffff !important;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  margin-left: 8px;
  flex-shrink: 0;
}

/* Chat Main Window */
.chats-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--wa-chat-bg);
  position: relative;
}

.chat-window-header {
  height: 60px;
  background: var(--wa-header-bg);
  border-bottom: 1px solid var(--wa-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 10;
}

.chat-contact-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-contact-meta .thread-avatar {
  width: 40px;
  height: 40px;
  font-size: 15px;
}

.chat-contact-name {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--wa-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-contact-sub {
  font-size: 0.75rem;
  color: var(--wa-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-contact-sub::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wa-teal-light);
}

/* Stage Selector & Header Actions */
#activeChatStageSelect {
  height: 32px;
  background: var(--wa-input-box);
  color: var(--wa-text-primary);
  border: 1px solid var(--wa-border-strong);
  border-radius: 16px;
  padding: 0 24px 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

#btnSimulateCustomerReply {
  height: 32px;
  background: rgba(37, 211, 102, 0.15);
  color: var(--wa-teal);
  border: 1px solid rgba(37, 211, 102, 0.35);
  border-radius: 16px;
  font-weight: 600;
  font-size: 0.76rem;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

#btnSimulateCustomerReply:hover {
  background: rgba(37, 211, 102, 0.25);
  border-color: var(--wa-teal);
}

/* WhatsApp Messages Area with Doodle Wallpaper */
.chat-messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: var(--wa-chat-bg);
  background-image: var(--wa-chat-pattern);
  background-size: 360px 360px;
  background-repeat: repeat;
  position: relative;
}

/* Date Separator Pill */
.chat-date-separator {
  display: flex;
  justify-content: center;
  margin: 6px 0 12px 0;
  position: sticky;
  top: 0;
  z-index: 5;
}

.chat-date-separator span {
  background: var(--wa-input-box);
  color: var(--wa-text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 7.5px;
  box-shadow: 0 1px 1px rgba(11, 20, 26, 0.12);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* Authentic WhatsApp Bubbles */
.msg-bubble {
  max-width: 65%;
  padding: 6px 9px 8px 9px;
  border-radius: 7.5px;
  font-size: 0.88rem;
  line-height: 1.38;
  position: relative;
  word-break: break-word;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
  animation: bubblePop 0.15s ease-out;
}

.msg-bubble::after {
  content: "";
  display: block;
  clear: both;
}

/* Inbound (Customer) Bubble */
.msg-inbound {
  align-self: flex-start;
  background: var(--wa-bubble-in);
  color: var(--wa-text-primary);
  border-top-left-radius: 0;
}

.msg-inbound::before {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  width: 8px;
  height: 13px;
  background: inherit;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

/* Outbound (Agent / CRM) Bubble */
.msg-outbound {
  align-self: flex-end;
  background: var(--wa-bubble-out);
  color: var(--wa-text-primary);
  border-top-right-radius: 0;
}

.msg-outbound::before {
  content: "";
  position: absolute;
  top: 0;
  right: -8px;
  width: 8px;
  height: 13px;
  background: inherit;
  clip-path: polygon(0 0, 0 100%, 100% 0);
}

/* Timestamp & Status */
.msg-meta {
  float: right;
  margin-left: 12px;
  margin-top: 4px;
  font-size: 0.68rem;
  color: var(--wa-bubble-meta);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  user-select: none;
  line-height: 14px;
}

.status-tick {
  font-size: 11px;
  color: var(--wa-tick-gray);
  letter-spacing: -1.5px;
  margin-left: 2px;
}

.status-tick.read {
  color: var(--wa-tick-blue) !important;
}

/* Quick Replies Strip */
.quick-replies-strip {
  background: var(--wa-input-bg);
  border-top: 1px solid var(--wa-border);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.quick-reply-pill {
  background: var(--wa-input-box);
  border: 1px solid var(--wa-border-strong);
  color: var(--wa-text-primary);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.quick-reply-pill:hover {
  background: var(--wa-chip-active);
  color: var(--wa-chip-active-text);
  border-color: rgba(0, 128, 105, 0.4);
}

/* Chat Input Bar */
.chat-input-bar {
  background: var(--wa-input-bg);
  border-top: 1px solid var(--wa-border);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-chat-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: transparent;
  font-size: 20px;
  color: var(--wa-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-chat-icon:hover {
  background: rgba(11, 20, 26, 0.08);
  color: var(--wa-text-primary);
}

.chat-input-bar textarea {
  flex: 1;
  height: 42px;
  min-height: 42px;
  max-height: 100px;
  background: var(--wa-input-box);
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--wa-text-primary);
  font-size: 0.92rem;
  font-family: inherit;
  resize: none;
  box-shadow: 0 1px 1.5px rgba(11, 20, 26, 0.06);
  transition: var(--transition-fast);
}

.chat-input-bar textarea:focus {
  outline: none;
  box-shadow: 0 1px 2px rgba(11, 20, 26, 0.12);
}

.btn-send {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--wa-teal);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, filter 0.15s ease;
  flex-shrink: 0;
}

.btn-send:hover {
  background: var(--wa-teal-hover);
  transform: scale(1.05);
}

/* Contact Details Drawer */
.chat-details-panel {
  width: 320px;
  border-left: 1px solid var(--wa-border);
  background: var(--wa-sidebar-bg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.details-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00a884, #008069);
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* ========================================================
   DATA TABLES (Leads, Numbers, Team)
   ======================================================== */
.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

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

.data-table th {
  background: var(--bg-sidebar);
  padding: 14px 18px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 14px 18px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
}

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

/* Stage Pill Badges */
.badge-stage {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}
.stage-new { background: rgba(56, 189, 248, 0.15); color: var(--stage-new); }
.stage-interested { background: rgba(245, 158, 11, 0.15); color: var(--stage-interested); }
.stage-converted { background: rgba(16, 185, 129, 0.15); color: var(--stage-converted); }
.stage-id-created { background: rgba(168, 85, 247, 0.15); color: var(--stage-id-created); }
.stage-deposit-done { background: rgba(6, 182, 212, 0.15); color: var(--stage-deposit); }
.stage-not-interested { background: rgba(100, 116, 139, 0.15); color: var(--stage-not-interested); }
.stage-do-not-contact { background: rgba(239, 68, 68, 0.15); color: var(--stage-dnc); }

/* Modals */
.modal-overlay,
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
}

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

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  box-shadow: var(--shadow-glass);
  overflow: hidden;
  transform: scale(0.95);
  transition: var(--transition-normal);
}

.modal-overlay.active .modal-card,
.modal-backdrop.active .modal-card {
  transform: scale(1);
}

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

.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
}
.modal-close:hover { color: var(--text-main); }

.modal-body {
  padding: 24px;
  max-height: 75vh;
  overflow-y: auto;
}

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

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

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}

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

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

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--brand-wa);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  color: var(--text-main);
  font-size: 0.85rem;
  animation: slideIn 0.25s ease-out;
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* Timeframe Filter Chips */
.timeframe-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 14px;
}

.chip-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.chip-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.chip-btn.active {
  background: var(--brand-wa);
  color: #ffffff;
  border-color: var(--brand-wa);
  font-weight: 600;
}

/* Chat Details Sidebar Drawer */
.chat-details-panel {
  width: 320px;
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border-subtle);
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  gap: 16px;
}

.details-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-wa), var(--brand-wa-dark));
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
}

/* Quick Replies Strip */
.quick-replies-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.quick-reply-pill {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.quick-reply-pill:hover {
  background: var(--bg-card-hover);
  color: var(--brand-wa);
  border-color: var(--brand-wa);
}

/* ========================================================
   Authentication Screen (Glassmorphism & Sleek Aesthetics)
   ======================================================== */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 10% 15%, rgba(0, 168, 132, 0.25) 0%, transparent 45%),
              radial-gradient(circle at 90% 85%, rgba(18, 140, 126, 0.28) 0%, transparent 50%),
              linear-gradient(135deg, #09131f 0%, #0c1a29 50%, #06101c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  position: fixed;
}

.auth-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Background Ambient Glows */
.auth-ambient-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  z-index: 0;
}

.auth-ambient-glow.glow-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  left: 5%;
  background: radial-gradient(circle, rgba(0, 168, 132, 0.25) 0%, transparent 70%);
}

.auth-ambient-glow.glow-2 {
  width: 450px;
  height: 450px;
  bottom: -80px;
  right: 8%;
  background: radial-gradient(circle, rgba(37, 211, 102, 0.2) 0%, transparent 70%);
}

/* ========================================================
   WAMSG CLUB SPLIT AUTHENTICATION CARD
   ======================================================== */
.auth-card-split {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 1020px;
  min-height: 610px;
  background: #ffffff;
  border-radius: 26px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.15);
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: authPopIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Left Branded Column */
.auth-col-brand {
  flex: 1 1 48%;
  max-width: 48%;
  background: linear-gradient(165deg, #014334 0%, #005a45 45%, #007659 100%);
  color: #ffffff;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.auth-col-brand::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(37, 211, 102, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.auth-brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.auth-wa-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  color: #007659;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.auth-brand-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.auth-brand-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 3px 8px;
  border-radius: 9999px;
  color: #ffffff;
  text-transform: uppercase;
  margin-left: 2px;
}

.auth-hero-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

/* Live WhatsApp Conversation Mockup */
.auth-chat-mockup {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 22px;
  backdrop-filter: blur(8px);
}

.mockup-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mockup-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 8px #25d366;
}

.mockup-bubble {
  padding: 9px 12px;
  border-radius: 12px;
  margin-bottom: 8px;
  max-width: 88%;
  font-size: 0.82rem;
  line-height: 1.35;
  position: relative;
}

.mockup-bubble.in {
  background: #ffffff;
  color: #0f172a;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.bubble-sender {
  font-size: 0.68rem;
  font-weight: 700;
  color: #008069;
  margin-bottom: 2px;
}

.mockup-bubble.out {
  background: #d9fdd3;
  color: #0b1a13;
  border-bottom-right-radius: 4px;
  margin-left: auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.bubble-text {
  font-size: 0.82rem;
}

.bubble-meta {
  font-size: 0.65rem;
  color: #64748b;
  text-align: right;
  margin-top: 3px;
}

.bubble-ticks {
  color: #3b82f6;
  font-weight: 700;
}

.mockup-footer {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

/* Feature Points */
.auth-features-clean {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.feat-pill {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feat-pill-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.feat-pill-text {
  display: flex;
  flex-direction: column;
}

.feat-pill-text strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
}

.feat-pill-text span {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Bottom Guide Card */
.auth-guide-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: auto;
  backdrop-filter: blur(8px);
}

.auth-guide-card:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
}

.auth-guide-thumb {
  position: relative;
  width: 96px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-screen-mockup {
  width: 100%;
  height: 100%;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  padding: 4px;
}

.mock-topbar {
  display: flex;
  gap: 3px;
  margin-bottom: 4px;
}

.mock-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #cbd5e1;
}

.mock-body {
  display: flex;
  gap: 4px;
  flex: 1;
}

.mock-sidebar {
  width: 20px;
  background: #e2e8f0;
  border-radius: 2px;
}

.mock-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 2px;
}

.mock-line {
  height: 3px;
  background: #cbd5e1;
  border-radius: 2px;
}

.mock-line.short {
  width: 60%;
}

.guide-play-btn {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-guide-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-guide-badge {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #25d366;
  text-transform: uppercase;
}

.auth-guide-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
}

.auth-guide-sub {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.25;
}

/* Right Form Column */
.auth-col-form {
  flex: 1 1 52%;
  max-width: 52%;
  background: #ffffff;
  padding: 38px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

/* Segmented Tab Switcher */
.auth-tabs-segmented {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 22px;
}

.tab-seg-btn {
  flex: 1;
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.tab-seg-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab-seg-btn:hover:not(.active) {
  color: #0f172a;
}

.auth-form-header {
  margin-bottom: 20px;
}

.auth-col-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
  margin-bottom: 4px;
}

.auth-col-subtitle {
  font-size: 0.88rem;
  color: #64748b;
  font-weight: 400;
}

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

.form-label-custom {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.input-icon-wrapper {
  position: relative;
  width: 100%;
}

.input-icon-leading {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.form-input-custom {
  width: 100%;
  height: 46px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 0.92rem;
  color: #0f172a;
  transition: all 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.form-input-custom.with-icon {
  padding-left: 42px;
}

.form-input-custom.with-pw-toggle {
  padding-right: 44px;
}

.form-input-custom:focus {
  border-color: #00a884;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 168, 132, 0.16);
}

.auth-forgot-link {
  font-size: 0.78rem;
  color: #008069;
  text-decoration: none;
  font-weight: 600;
}

.auth-forgot-link:hover {
  text-decoration: underline;
}

.btn-toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  padding: 6px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.btn-toggle-pw:hover,
.btn-toggle-pw.showing {
  color: #00a884;
}

.auth-error-msg {
  color: #ef4444;
  font-size: 0.82rem;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-auth-primary {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #00a884 0%, #008069 100%);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  margin-top: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 168, 132, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-auth-primary:hover {
  background: linear-gradient(135deg, #00b890 0%, #008f75 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 168, 132, 0.42);
}

.btn-arrow {
  font-size: 1.15rem;
  transition: transform 0.2s ease;
}

.btn-auth-primary:hover .btn-arrow {
  transform: translateX(3px);
}

.auth-switch-note {
  text-align: center;
  margin-top: 14px;
  font-size: 0.84rem;
  color: #64748b;
}

.auth-switch-note a {
  color: #008069;
  font-weight: 700;
  text-decoration: none;
}

.auth-switch-note a:hover {
  text-decoration: underline;
}

/* Faint Divider */
.auth-section-divider {
  position: relative;
  text-align: center;
  margin: 18px 0 14px;
}

.auth-section-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid #e2e8f0;
}

.auth-section-divider span {
  position: relative;
  background: #ffffff;
  padding: 0 10px;
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* Two Bottom Action CTA Cards */
.auth-cta-cards {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 12px;
}

.auth-cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-radius: 12px;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-cta-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.auth-cta-card.card-telegram {
  background: linear-gradient(135deg, #1d9bf0 0%, #0284c7 100%);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
}

.auth-cta-card.card-telegram:hover {
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
}

.auth-cta-card.card-download {
  background: linear-gradient(135deg, #00a884 0%, #059669 100%);
  box-shadow: 0 4px 14px rgba(0, 168, 132, 0.25);
}

.auth-cta-card.card-download:hover {
  box-shadow: 0 6px 20px rgba(0, 168, 132, 0.35);
}

.cta-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cta-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.cta-texts {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cta-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.cta-subtitle {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.2;
}

.cta-arrow {
  font-size: 1.15rem;
  color: #ffffff;
  font-weight: 700;
  transition: transform 0.2s;
}

.auth-cta-card:hover .cta-arrow {
  transform: translateX(3px);
}

/* Quick Demo Pills */
.auth-quick-demos {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.demo-label {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 600;
}

.btn-demo-pill {
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.btn-demo-pill:hover {
  background: #f1f5f9;
  border-color: #00a884;
  color: #008069;
}

/* Responsive Layout */
@media (max-width: 880px) {
  .auth-card-split {
    flex-direction: column;
    max-width: 500px;
    min-height: auto;
  }
  .auth-col-brand,
  .auth-col-form {
    max-width: 100%;
    width: 100%;
    padding: 30px 24px;
  }
  .auth-chat-mockup {
    display: none;
  }
}

/* Dark Theme Overrides for Auth Card */
[data-theme="dark"] .auth-overlay {
  background: radial-gradient(circle at 10% 15%, rgba(0, 168, 132, 0.2) 0%, transparent 45%),
              radial-gradient(circle at 90% 85%, rgba(18, 140, 126, 0.22) 0%, transparent 50%),
              linear-gradient(135deg, #050b14 0%, #071322 50%, #03080f 100%);
}

[data-theme="dark"] .auth-card-split {
  background: #0d1527;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.75);
}

[data-theme="dark"] .auth-col-form {
  background: #0d1527;
}

[data-theme="dark"] .auth-tabs-segmented {
  background: #172238;
}

[data-theme="dark"] .tab-seg-btn {
  color: #94a3b8;
}

[data-theme="dark"] .tab-seg-btn.active {
  background: #1e2e4a;
  color: #ffffff;
}

[data-theme="dark"] .auth-col-title {
  color: #ffffff;
}

[data-theme="dark"] .auth-col-subtitle {
  color: #94a3b8;
}

[data-theme="dark"] .form-label-custom {
  color: #cbd5e1;
}

[data-theme="dark"] .form-input-custom {
  background: #152035;
  border-color: #243450;
  color: #f8fafc;
}

[data-theme="dark"] .form-input-custom:focus {
  background: #17243c;
  border-color: #00a884;
}

[data-theme="dark"] .auth-section-divider span {
  background: #0d1527;
  color: #94a3b8;
}

[data-theme="dark"] .auth-section-divider::before {
  border-color: #1e2c46;
}

[data-theme="dark"] .btn-demo-pill {
  background: #152035;
  border-color: #243450;
  color: #cbd5e1;
}

[data-theme="dark"] .btn-demo-pill:hover {
  background: rgba(0, 168, 132, 0.15);
  color: #25d366;
  border-color: #00a884;
}

/* User Menu Dropdown */
.user-menu-container {
  position: relative;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 250px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 6px;
  z-index: 1000;
  display: none;
  animation: fadeInMenu 0.15s ease-out;
}

[data-theme="dark"] .user-dropdown-menu {
  background: #111a2e;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.user-dropdown-menu.active {
  display: block;
}

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

.user-dropdown-header {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

.dropdown-user-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.3;
}

.dropdown-user-email {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 2px;
  margin-bottom: 8px;
  word-break: break-all;
}

.dropdown-user-role {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 168, 132, 0.12);
  color: #008069;
  border: 1px solid rgba(0, 168, 132, 0.25);
}

.dropdown-user-role.role-superadmin {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
  border-color: rgba(124, 58, 237, 0.25);
}

[data-theme="dark"] .dropdown-user-role {
  background: rgba(37, 211, 102, 0.18);
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.3);
}

[data-theme="dark"] .dropdown-user-role.role-superadmin {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.3);
}

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

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}

.dropdown-item-icon {
  font-size: 1rem;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.user-dropdown-item:hover {
  background: var(--bg-app);
  color: #008069;
}

[data-theme="dark"] .user-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.user-dropdown-item.danger {
  color: var(--danger);
}

.user-dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
}

[data-theme="dark"] .user-dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Platform SuperAdmin View Specifics */
.admin-badge-plan {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.plan-starter { background: rgba(56, 189, 248, 0.18); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.plan-growth { background: rgba(168, 85, 247, 0.18); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.plan-enterprise { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.plan-unlimited { background: linear-gradient(135deg, #10b981, #06b6d4); color: #fff; }
.plan-trial { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }


