:root {
  --bg-primary: #090613;
  --bg-surface: #120d24;
  --bg-surface-elevated: #1b1435;
  --bg-glass: rgba(18, 13, 36, 0.88);
  --border-glass: rgba(168, 85, 247, 0.22);
  --border-glass-hover: rgba(192, 132, 252, 0.45);

  --accent-primary: #8b5cf6;
  --accent-primary-hover: #7c3aed;
  --accent-glow: rgba(139, 92, 246, 0.35);
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-purple: #c084fc;
  --accent-indigo: #6366f1;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --text-main: #ffffff;
  --text-muted: #cbd5e1;
  --text-subtle: #94a3b8;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;

  --shadow-card: 0 14px 40px -10px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(168, 85, 247, 0.15);
  --shadow-glow-purple: 0 0 30px rgba(139, 92, 246, 0.3);
  --shadow-glow-mint: 0 0 30px rgba(16, 185, 129, 0.3);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 📅 Luxury Date Range Filter Bar */
.date-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: rgba(20, 14, 40, 0.85);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 14px;
  padding: 0.75rem 1.25rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin-bottom: 1.25rem;
}

.date-pills-group {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  gap: 3px;
}

.date-pill-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.date-pill-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.date-pill-btn.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.45), rgba(6, 182, 212, 0.35)) !important;
  color: #fff !important;
  border: 1px solid rgba(139, 92, 246, 0.6) !important;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 5% 5%, rgba(139, 92, 246, 0.25) 0px, transparent 45%),
    radial-gradient(at 95% 10%, rgba(6, 182, 212, 0.22) 0px, transparent 40%),
    radial-gradient(at 50% 95%, rgba(16, 185, 129, 0.18) 0px, transparent 45%),
    radial-gradient(at 90% 85%, rgba(192, 132, 252, 0.15) 0px, transparent 40%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   🏛️ ULTRA-PREMIUM SAAS LEFT SIDEBAR LAYOUT
   ============================================================ */

.app-layout {
  display: flex;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-primary);
}

/* Left Sidebar */
.app-sidebar {
  width: 260px;
  min-width: 260px;
  height: 100%;
  background: rgba(12, 8, 24, 0.96);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border-right: 1px solid rgba(168, 85, 247, 0.18);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem 1rem;
  z-index: 150;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

/* Sidebar Top Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
}

.sidebar-brand .brand-logo {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 50%, #06b6d4 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.45);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.sidebar-brand .brand-text h1,
.sidebar-brand .brand-title {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #c084fc 60%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  line-height: 1.2;
}

.sidebar-brand .brand-text span,
.sidebar-brand .brand-badge-pill {
  font-size: 0.68rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-block;
  margin-top: 2px;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.sidebar-brand .brand-info {
  display: flex;
  flex-direction: column;
}

/* Live Status Indicator Box */
.sidebar-status-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  margin: 0.85rem 0;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 700;
  color: #34d399;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.15);
}

/* Section Subheadings */
.sidebar-section-title {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin: 0.85rem 0.5rem 0.35rem;
}

/* Navigation Items */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.sidebar-nav-item .nav-icon {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
}

.sidebar-nav-item:hover {
  background: rgba(139, 92, 246, 0.12);
  color: #ffffff;
  border-color: rgba(139, 92, 246, 0.25);
  transform: translateX(3px);
}

.sidebar-nav-item.active {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.35) 0%, rgba(6, 182, 212, 0.2) 100%);
  border: 1px solid rgba(168, 85, 247, 0.5);
  border-left: 4px solid #c084fc;
  color: #ffffff;
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.35);
  font-weight: 800;
}

/* Action Buttons in Sidebar */
.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.btn-sidebar-action {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.6rem 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-radius: var(--radius-md);
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.btn-sidebar-action:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #ffffff;
  border-color: rgba(168, 85, 247, 0.35);
  transform: translateY(-1px);
}

.btn-sidebar-action.btn-send-test {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(6, 182, 212, 0.3) 100%);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #e0e7ff;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(139, 92, 246, 0.25);
}

.btn-sidebar-action.btn-send-test:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  color: #ffffff;
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.45);
}

/* Sidebar Bottom Footer */
.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  margin-top: auto;
  border-top: 1px solid rgba(168, 85, 247, 0.15);
}

.admin-profile-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.admin-profile-pill .admin-avatar {
  width: 36px;
  height: 36px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
}

.admin-profile-pill .admin-info {
  display: flex;
  flex-direction: column;
}

.admin-profile-pill .admin-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
}

.admin-profile-pill .admin-status {
  font-size: 0.68rem;
  color: #34d399;
  font-weight: 600;
}

.btn-lock-sidebar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fb7185;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-lock-sidebar:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.4);
}

/* Main Content Area */
.app-main-content {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
  background: transparent;
}

/* Mobile Header (Sleek Modern Luxury App Bar matching Screenshot 2) */
.mobile-app-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.15rem;
  background: rgba(9, 12, 22, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 120;
  flex-shrink: 0;
}

.btn-hamburger {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  border-radius: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.25rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
}

.btn-hamburger:hover, .btn-hamburger:active {
  background: rgba(255, 255, 255, 0.1) !important;
  transform: scale(0.96);
}

.mobile-brand-center {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.mobile-brand-center .brand-bolt {
  font-size: 1.35rem;
  color: #f59e0b;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.7));
}

.btn-lock-mobile {
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.18) !important;
  color: #ffffff !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.15rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
}

.btn-lock-mobile:hover, .btn-lock-mobile:active {
  background: rgba(239, 68, 68, 0.18) !important;
  transform: scale(0.96);
}

/* Mobile Sidebar Drawer Overlay */
.sidebar-backdrop-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 140;
}

@media (max-width: 992px) {
  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.7);
  }

  .app-sidebar.drawer-open {
    transform: translateX(0);
  }

  .sidebar-backdrop-overlay.active {
    display: block;
  }

  .mobile-app-header {
    display: flex;
  }
}

/* Navbar (Legacy compatibility fallback) */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

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

.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* Main Navigation Bar Links */
.main-nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  flex-shrink: 0;
}

.nav-link-btn {
  padding: 0.38rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.nav-link-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-primary));
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.25);
}

/* Dashboard Container */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: rgba(12, 18, 30, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
  box-shadow: 0 14px 36px -10px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s, box-shadow 0.25s;
}

.metric-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #06b6d4, #10b981, #6366f1);
  opacity: 0.85;
}

.metric-card.gradient-blue::after {
  background: linear-gradient(90deg, #06b6d4, #38bdf8);
}
.metric-card.gradient-purple::after {
  background: linear-gradient(90deg, #a855f7, #6366f1);
}
.metric-card.gradient-cyan::after {
  background: linear-gradient(90deg, #38bdf8, #10b981);
}
.metric-card.gradient-emerald::after {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 20px 42px -10px rgba(0, 0, 0, 0.75), 0 0 24px rgba(6, 182, 212, 0.15);
}

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

.metric-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.metric-badge.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.metric-value {
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 0.3rem;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.15;
}

.metric-subtext {
  font-size: 0.78rem;
  color: var(--text-subtle);
  font-weight: 500;
}

/* Card Glow Gradients */
.gradient-blue::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}
.gradient-purple::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}
.gradient-cyan::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #06b6d4, #38bdf8);
}
.gradient-emerald::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #10b981, #34d399);
}

/* Tabs Navigation */
.tabs-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.75rem;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: var(--text-main);
  background: var(--bg-surface-elevated);
  border-color: var(--border-glass);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

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

/* Card Component */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.card-header {
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Filters & Search */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  width: 320px;
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  font-size: 0.85rem;
  width: 100%;
}

.search-box input::placeholder {
  color: var(--text-subtle);
}

.select-dropdown {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  outline: none;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glass-hover);
}

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

.btn-outline:hover {
  color: var(--text-main);
  border-color: var(--border-glass-hover);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
}

/* Table */
.table-responsive {
  overflow-x: auto;
}

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

.data-table th {
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-glass);
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-glass);
  vertical-align: middle;
}

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

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  color: var(--text-main);
}

.user-meta {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.failed {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.status-badge.skipped {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.channel-tag-badge {
  display: inline-block;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

/* Channels Manager Grid & Cards */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.channel-card {
  background: rgba(20, 14, 40, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.channel-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #8b5cf6, #c084fc, #06b6d4, #10b981);
  opacity: 0.9;
}

.channel-card:hover {
  transform: translateY(-4px);
  border-color: rgba(192, 132, 252, 0.6);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7), 0 0 24px rgba(139, 92, 246, 0.3);
}

.channel-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
}

.tag-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.45);
  margin-bottom: 0.4rem;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
}

.channel-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
}

/* 🎛️ iOS Luxury Quick-Toggle Switch */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

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

.switch-toggle input:checked + .slider-round {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

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

.status-indicator-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.status-indicator-pill.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-indicator-pill.paused {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* 📊 Channel Mini-Stats Pill Bar */
.channel-mini-stats-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
  margin-bottom: 0.85rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.mini-stat-badge {
  font-size: 0.73rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: rgba(255, 255, 255, 0.85);
}

.mini-stat-badge strong {
  font-weight: 800;
}

.mini-stat-badge.leads strong { color: #38bdf8; }
.mini-stat-badge.today strong { color: #10b981; }
.mini-stat-badge.capi strong { color: #c084fc; }

/* 📋 1-Click Copy Bubble Toast Animation */
.copy-bubble-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.4), 0 0 20px rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 9999;
  transform: translateY(100px) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.copy-bubble-toast.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.channel-card-actions {
  display: flex;
  gap: 0.45rem;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.6rem;
  font-size: 0.95rem;
  cursor: pointer;
  color: #cbd5e1;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: rgba(139, 92, 246, 0.25);
  color: #ffffff;
  transform: scale(1.08);
  border-color: rgba(192, 132, 252, 0.5);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.3);
}

.channel-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  font-size: 0.85rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.info-label {
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
  min-width: 110px;
}

.info-value {
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

.info-value.text-accent {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 700;
}

.info-value.text-accent:hover {
  text-decoration: underline;
  color: #7dd3fc;
}

.text-truncate {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Links Generator Cards */
.links-generator-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1rem;
}

.link-item-card {
  background: rgba(20, 14, 40, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.link-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.link-item-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.link-input-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.45rem;
}

.copy-input-wrap {
  display: flex;
  gap: 0.6rem;
}

.copy-input-wrap input {
  flex: 1;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  color: #38bdf8;
  font-family: monospace;
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
}

.copy-input-wrap input:focus {
  border-color: #c084fc;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25);
}

/* Modal */
.modal-overlay {
  display: none !important;
  position: fixed !important;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.82) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999 !important;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex !important;
}

.modal-card {
  background: rgba(20, 14, 40, 0.96);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.2rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(139, 92, 246, 0.25);
}

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

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

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

.form-group {
  margin-bottom: 1.2rem;
}

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

.form-group input, .form-group textarea {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
}

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

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 0.3rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.flex-1 { flex: 1; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Helpers */
.text-center { text-align: center; }
.py-6 { padding-top: 2rem; padding-bottom: 2rem; }
.py-8 { padding-top: 3rem; padding-bottom: 3rem; }
.mt-2 { margin-top: 0.5rem; }
.text-muted { color: var(--text-muted); }

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent-primary);
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

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

/* ============================================================ */
/* 💬 WHATSAPP-STYLE LIVE CHAT INBOX STYLES                     */
/* ============================================================ */

.whatsapp-container {
  display: flex;
  height: calc(100vh - 270px);
  min-height: 560px;
  background: rgba(8, 13, 22, 0.95);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  position: relative;
}

/* Sidebar (Contact List) */
.chat-sidebar {
  width: 380px;
  min-width: 320px;
  background: rgba(10, 15, 26, 0.98);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-sidebar-header {
  padding: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(16px);
}

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

.chat-search-wrap svg {
  position: absolute;
  left: 0.95rem;
  color: #38bdf8;
  pointer-events: none;
}

.chat-search-wrap input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
}

.chat-search-wrap input:focus {
  border-color: #38bdf8;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

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

.conversation-list::-webkit-scrollbar {
  width: 5px;
}
.conversation-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.chat-contact-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.chat-contact-item:hover {
  background: var(--bg-surface-elevated);
}

.chat-contact-item.active {
  background: rgba(6, 182, 212, 0.12);
  border-left: 3px solid var(--accent-cyan);
}

.contact-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.contact-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

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

.contact-time {
  font-size: 0.72rem;
  color: var(--text-subtle);
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.contact-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.contact-preview.unread {
  color: #fff;
  font-weight: 600;
}

.unread-badge {
  background: var(--accent-emerald);
  color: #000;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 12px;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

/* Chat Main Area */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #0b1120;
  background-image: radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  position: relative;
}

/* Empty State */
.chat-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.empty-icon-bubble {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.2));
  border: 1px solid rgba(6, 182, 212, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.25rem;
}

.chat-empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.chat-empty-state p {
  color: var(--text-muted);
  max-width: 400px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.empty-tip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--accent-cyan);
}

/* Active Chat Window */
.chat-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-window-header {
  height: 68px;
  padding: 0.75rem 1.5rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-back-chat {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
}

.chat-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

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

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

.chat-user-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.badge-pill {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-cyan);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.72rem;
}

.bot-badge-pill {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  margin-left: auto;
}

.user-id-text {
  font-family: monospace;
  color: var(--text-subtle);
}

.chat-messages-container {
  flex: 1;
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-messages-container::-webkit-scrollbar {
  width: 6px;
}
.chat-messages-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.message-bubble {
  max-width: 72%;
  width: fit-content;
  min-width: 80px;
  padding: 0.55rem 0.85rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-word;
  white-space: normal;
  position: relative;
  box-sizing: border-box;
}

.bubble-text {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0.15rem 0 0.2rem 0;
  line-height: 1.4;
}

.bubble-user {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.bubble-admin {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.85) 0%, rgba(99, 102, 241, 0.9) 50%, rgba(129, 140, 248, 0.85) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(165, 180, 252, 0.25);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

.bubble-sender {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
}

.message-time {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.65);
  text-align: right;
  margin-top: 0.25rem;
  font-weight: 500;
}

/* Chat Input Bar */
.chat-input-bar {
  padding: 0.85rem 1.4rem;
  background: rgba(8, 13, 22, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.chat-input-bar input,
.chat-input-bar textarea {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0.75rem 1.35rem;
  color: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  resize: none;
  min-height: 44px;
  max-height: 140px;
  line-height: 1.45;
  transition: all 0.2s ease;
  overflow-y: auto;
}

.chat-input-bar input:focus,
.chat-input-bar textarea:focus {
  border-color: #38bdf8;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.btn-send-message {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  color: #fff;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.35);
  transition: all 0.2s ease;
}

.btn-send-message:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

.btn-send-message:active {
  transform: translateY(0);
}

.btn-pwa {
  background: linear-gradient(135deg, #06b6d4, #3b82f6) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  padding: 0.42rem 0.95rem !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  cursor: pointer !important;
}

.btn-chat-action {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.btn-chat-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

.btn-chat-action.recording {
  background: #ef4444;
  color: #ffffff;
  border-color: #f87171;
  animation: pulse-red 1.2s infinite;
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Chat Attachment Preview Bar */
.chat-attachment-preview {
  position: absolute;
  bottom: 60px;
  left: 1.25rem;
  right: 1.25rem;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.preview-thumb-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.preview-info {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text-subtle);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-cancel-preview {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
}

.btn-cancel-preview:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* Voice Record Bar */
.voice-record-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  min-height: 42px;
}

.record-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulse-red 1s infinite;
}

.record-timer {
  font-weight: 700;
  font-size: 0.95rem;
  color: #f87171;
  font-family: monospace;
}

.record-hint {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text-subtle);
}

.btn-voice-cancel {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-subtle);
  padding: 0.35rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-voice-send {
  background: #10b981;
  color: #ffffff;
  border: none;
  padding: 0.35rem 0.85rem;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

/* Media in Message Bubbles */
.bubble-image-wrap {
  margin: 0.3rem 0;
  max-width: 280px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}

.bubble-image {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  transition: transform 0.2s ease;
}

.bubble-image:hover {
  transform: scale(1.02);
}

.bubble-audio-wrap {
  margin: 0.3rem 0;
  min-width: 220px;
  max-width: 280px;
  position: relative;
  z-index: 2;
}

.bubble-audio {
  width: 100%;
  height: 38px;
  border-radius: 20px;
  outline: none;
  pointer-events: auto !important;
  cursor: pointer;
  display: block;
}

/* Lightbox Modal */
.image-lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
}

.image-lightbox-modal img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7);
  object-fit: contain;
}

.lightbox-close-btn {
  position: absolute;
  top: 20px;
  right: 25px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .dashboard-container { padding: 0.5rem; }
  .navbar { padding: 0.65rem 0.85rem; }
  .search-box { width: 100%; }
  .filters-bar { width: 100%; }
  .form-row { flex-direction: column; }

  /* Client Portal Navbar on Mobile */
  .client-navbar {
    padding: 0.55rem 0.85rem !important;
    gap: 0.4rem !important;
  }
  .client-navbar .brand-subtitle {
    display: none !important;
  }
  .client-navbar .brand-title {
    font-size: 1.02rem !important;
  }
  .client-navbar .nav-actions .btn {
    padding: 0.32rem 0.55rem !important;
    font-size: 0.75rem !important;
  }
  .client-navbar .live-indicator {
    display: none !important;
  }

  /* Fullscreen WhatsApp on mobile */
  .fullscreen-chat-body {
    height: calc(100dvh - 54px) !important;
    max-height: calc(100dvh - 54px) !important;
  }

  .fullscreen-whatsapp {
    height: 100% !important;
    min-height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    display: flex !important;
    flex-direction: row !important;
  }

  .whatsapp-container {
    height: calc(100vh - 160px);
    min-height: 440px;
  }

  .chat-sidebar {
    width: 100% !important;
    min-width: 100% !important;
    height: 100% !important;
    display: flex !important;
  }

  .chat-main {
    display: none !important;
    width: 100% !important;
    height: 100% !important;
  }

  /* When chat is open on mobile */
  .whatsapp-container.mobile-chat-active .chat-sidebar {
    display: none !important;
  }

  .whatsapp-container.mobile-chat-active .chat-main {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
  }

  .btn-back-chat {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    margin-right: 0.5rem !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
  }

  .chat-window-header {
    padding: 0.6rem 0.85rem !important;
  }

  .chat-user-meta {
    font-size: 0.72rem !important;
  }

  .chat-header-actions {
    display: none !important;
  }

  .chat-input-bar {
    padding: 0.5rem 0.65rem !important;
    gap: 0.4rem !important;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 8px)) !important;
  }

  .btn-chat-action {
    width: 38px !important;
    height: 38px !important;
    font-size: 1.05rem !important;
  }

  .btn-send-message {
    padding: 0.55rem 0.9rem !important;
    font-size: 0.8rem !important;
  }

  .message-bubble {
    max-width: 85% !important;
  }
}

/* Auth & PIN Lock Overlay */
.auth-lock-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.96), rgba(6, 10, 20, 0.99));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-lock-card {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg, 16px);
  padding: 2.5rem 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.7), 0 0 30px rgba(99, 102, 241, 0.2);
  animation: authFadeIn 0.3s ease-out;
}

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

.auth-lock-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.auth-lock-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main, #f8fafc);
  margin-bottom: 0.5rem;
}

.auth-lock-desc {
  font-size: 0.88rem;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 1.5rem;
  line-height: 1.45;
}

.auth-input-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.auth-input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  text-align: center;
  letter-spacing: 0.1em;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md, 10px);
  color: var(--text-main, #ffffff);
  outline: none;
  transition: all 0.2s ease;
}

.auth-input:focus {
  border-color: var(--accent-primary, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.auth-error-text {
  color: #ef4444;
  font-size: 0.82rem;
  margin-top: 0.5rem;
  display: none;
  font-weight: 600;
}

.btn-auth-submit {
  width: 100%;
  padding: 0.85rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md, 10px);
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.btn-auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-auth-logout {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  cursor: pointer;
}
.btn-auth-logout:hover {
  background: rgba(239, 68, 68, 0.3) !important;
}

/* ============================================================
   💎 ENTERPRISE DESIGN SYSTEM (SILICON VALLEY FINTECH LEVEL)
   ============================================================ */

.card {
  background: rgba(17, 24, 39, 0.72) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.metric-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px !important;
  padding: 1.25rem 1.4rem !important;
  background: rgba(17, 24, 39, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 12px 36px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 18px 45px -12px rgba(59, 130, 246, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #c084fc);
  opacity: 0.8;
}

.metric-value {
  font-size: 2.1rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.04em !important;
  line-height: 1.1 !important;
  margin: 0.4rem 0 0.3rem !important;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-label {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Channel Card & Breakdown Glows */
.channel-stats-grid > div {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 1rem 1.15rem !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  transition: all 0.25s ease !important;
}

.channel-stats-grid > div:hover {
  border-color: rgba(56, 189, 248, 0.4) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(56, 189, 248, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.analytics-row .card {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
}

.tag-pill {
  background: rgba(99, 102, 241, 0.15) !important;
  border: 1px solid rgba(99, 102, 241, 0.3) !important;
  color: #a5b4fc !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  padding: 2px 8px !important;
  letter-spacing: 0.04em !important;
}

/* Leads Table Modern Sheen */
.leads-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.leads-table th {
  background: rgba(15, 23, 42, 0.75) !important;
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  padding: 0.9rem 1.1rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.leads-table td {
  padding: 0.95rem 1.1rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  font-size: 0.88rem !important;
  vertical-align: middle;
  transition: background 0.15s ease;
}

.leads-table tr:hover td {
  background: rgba(59, 130, 246, 0.04) !important;
}

.badge-success {
  background: rgba(34, 197, 94, 0.12) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(34, 197, 94, 0.25) !important;
  font-weight: 700 !important;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
}

/* 2x2 Symmetric Intelligence Hub Grid */
.intelligence-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .intelligence-hub-grid {
    grid-template-columns: 1fr !important;
  }
}

/* User Table Cell & Avatar */
.user-cell {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
}

.user-avatar {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #06b6d4, #38bdf8);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 800 !important;
  color: #fff !important;
  font-size: 0.9rem !important;
  flex-shrink: 0 !important;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.25) !important;
}

.user-name {
  font-weight: 700 !important;
  color: #fff !important;
  font-size: 0.9rem !important;
  line-height: 1.2 !important;
}

.user-handle {
  font-size: 0.75rem !important;
  color: rgba(255, 255, 255, 0.5) !important;
  margin-top: 2px !important;
}

.user-id {
  color: rgba(255, 255, 255, 0.35) !important;
}

.channel-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  padding: 0.25rem 0.65rem !important;
  border-radius: 6px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  background: rgba(56, 189, 248, 0.12) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
}

.param-code {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 0.2rem 0.5rem !important;
  border-radius: 6px !important;
  font-family: monospace !important;
  font-size: 0.78rem !important;
  color: #c084fc !important;
}


