:root {
  --bg-dark: #07090e;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-glass: rgba(255, 255, 255, 0.09);
  --border-focus: rgba(16, 185, 129, 0.5);
  
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --whatsapp-green: #25d366;
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --indigo-500: #6366f1;
  --amber-400: #fbbf24;
  --rose-500: #f43f5e;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background Ambient Orbs */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #059669 0%, rgba(5, 150, 105, 0) 70%);
  top: -150px;
  left: -150px;
}

.orb-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #2563eb 0%, rgba(37, 99, 235, 0) 70%);
  bottom: 50px;
  right: -100px;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #7c3aed 0%, rgba(124, 58, 237, 0) 70%);
  top: 40%;
  left: 45%;
}

/* Layout */
.app-layout {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-badge {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.logo-details {
  display: flex;
  flex-direction: column;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, #a7f3d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-version {
  font-size: 11px;
  padding: 2px 7px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  border-radius: var(--radius-full);
  font-weight: 600;
}

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

.nav-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  font-size: 12px;
}

.stat-label {
  color: var(--text-dim);
}

.stat-val {
  font-weight: 700;
  color: var(--text-main);
}

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

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-full);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

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

.user-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
}

/* Tabs Bar */
.main-tabs-bar {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  overflow-x: auto;
}

.nav-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

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

.nav-tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
}

.tab-counter {
  padding: 2px 7px;
  font-size: 11px;
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-400);
  border-radius: var(--radius-full);
}

/* View Panels */
.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

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

.view-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.view-header-bar h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 700;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: var(--transition-normal);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

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

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.metric-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.metric-value {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.metric-sub {
  font-size: 14px;
  color: var(--text-dim);
}

.metric-hint {
  font-size: 12px;
  color: var(--text-dim);
}

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

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* Split Grid */
.dashboard-split-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

@media (max-width: 980px) {
  .dashboard-split-grid {
    grid-template-columns: 1fr;
  }
}

/* Instances Grid */
.instances-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.instance-box {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

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

.instance-title {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.instance-phone {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-muted);
}

.instance-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid var(--border-glass);
  padding-top: 12px;
}

.instance-actions-row {
  display: flex;
  gap: 8px;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.data-table th {
  padding: 12px 14px;
  color: var(--text-dim);
  font-weight: 600;
  border-bottom: 1px solid var(--border-glass);
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
}

/* Status Dots & Badges */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

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

.status-dot.warning {
  background: var(--amber-400);
  box-shadow: 0 0 10px var(--amber-400);
}

.status-dot.offline {
  background: var(--rose-500);
}

.badge {
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

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

.badge-connecting {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-qrcode {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-close {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-pro {
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-glass);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-accent {
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  color: #fff;
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
  color: #f43f5e;
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.25);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 11px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  padding: 6px 8px;
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--emerald-400);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Message Console */
.message-console-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
}

@media (max-width: 980px) {
  .message-console-layout {
    grid-template-columns: 1fr;
  }
}

.console-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 10px;
  overflow-x: auto;
}

.console-tab-btn {
  padding: 6px 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.console-tab-btn.active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-400);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.msg-form {
  display: none;
}

.msg-form.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

.stream-logs-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 14px;
  height: 380px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stream-item {
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}

.stream-item.system {
  color: var(--text-dim);
}

.stream-item.inbound {
  border-left: 3px solid var(--emerald-400);
  background: rgba(16, 185, 129, 0.05);
}

.stream-item.outbound {
  border-left: 3px solid var(--cyan-400);
  background: rgba(6, 182, 212, 0.05);
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.pricing-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

.pricing-card.popular {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 10px 40px rgba(16, 185, 129, 0.15);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  right: 24px;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.plan-price {
  font-family: 'Outfit', sans-serif;
  font-size: 38px;
  font-weight: 800;
}

.plan-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.plan-features-list li::before {
  content: "✓ ";
  color: var(--emerald-400);
  font-weight: 700;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  width: 100%;
  max-width: 480px;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-box {
  max-width: 420px;
}

.qr-modal-box {
  max-width: 400px;
  text-align: center;
}

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

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

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-dim);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-main);
}

.qr-image-wrapper {
  width: 240px;
  height: 240px;
  margin: 16px auto;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.qr-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-instructions {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.auth-tabs {
  display: flex;
  gap: 12px;
}

.auth-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  padding-bottom: 4px;
}

.auth-tab-btn.active {
  color: var(--text-main);
  border-bottom: 2px solid var(--emerald-400);
}

.auth-form-body {
  display: none;
}

.auth-form-body.active {
  display: block;
}

.demo-login-box {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}

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

.toast {
  padding: 12px 18px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.25s ease;
}

.toast.success { border-color: rgba(16, 185, 129, 0.5); }
.toast.error { border-color: rgba(244, 63, 94, 0.5); }

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

/* Code Snippets */
.code-snippets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.code-block {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-glass);
}

.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.copy-btn:hover {
  color: #fff;
}

pre {
  padding: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
  color: #a7f3d0;
}

.text-emerald { color: var(--emerald-400); }
.text-cyan { color: var(--cyan-400); }
.text-accent { color: #a7f3d0; }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-center { text-align: center; }
.text-sm { font-size: 12px; }
.hidden { display: none !important; }

/* Impersonation Banner */
.impersonation-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #6366f1 0%, #2563eb 50%, #06b6d4 100%);
  color: #fff;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  font-size: 13px;
  animation: slideDown 0.25s ease;
}

.impersonation-text {
  display: flex;
  align-items: center;
  gap: 10px;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* Admin Tab Styling */
.admin-tab-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(239, 68, 68, 0.15)) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  color: #fbbf24 !important;
}

.admin-tab-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(239, 68, 68, 0.25)) !important;
  border-color: #fbbf24 !important;
}

.admin-tab-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.4), rgba(217, 119, 6, 0.4)) !important;
  border-color: #f59e0b !important;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.35) !important;
}

/* User Directory & Badges */
.badge-admin {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-user {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-starter {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-enterprise {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #fff;
}

.quota-cell-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 130px;
}

.quota-cell-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.quota-cell-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  border-radius: var(--radius-full);
}

/* ==================== LEADS & BOOKINGS CRM STYLES ==================== */
.badge-status-new {
  background: rgba(251, 191, 36, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.badge-status-confirmed {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-status-completed {
  background: rgba(6, 182, 212, 0.16);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.badge-status-cancelled {
  background: rgba(244, 63, 94, 0.16);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.badge-type-meeting {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.badge-type-callback {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 88, 12, 0.2));
  color: #fb923c;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-type-appointment {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-type-lead {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(37, 99, 235, 0.2));
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.btn-whatsapp-confirm {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-confirm:hover {
  background: linear-gradient(135deg, #2ee071 0%, #179c8d 100%);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
  transform: translateY(-1px);
}

.booking-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.booking-snippet-text {
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: block;
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
  max-width: 320px;
  white-space: normal;
  line-height: 1.4;
}

.template-pill {
  padding: 6px 12px;
  font-size: 11px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.template-pill:hover {
  background: rgba(37, 211, 102, 0.15);
  border-color: rgba(37, 211, 102, 0.4);
  color: #34d399;
}

/* ==================== AI CONVERSATION INTELLIGENCE REPORTS ==================== */
.topic-distribution-bar {
  display: flex;
  height: 12px;
  width: 100%;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  margin: 14px 0 16px;
}

.topic-distribution-segment {
  height: 100%;
  transition: width 0.4s ease-in-out;
}

.topic-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.topic-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.topic-legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.badge-topic-quote {
  background: rgba(6, 182, 212, 0.18);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.badge-topic-product {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-sentiment-positive {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-sentiment-neutral {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.badge-sentiment-negative {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

/* ==================== PAGINATION BAR ==================== */
.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-glass);
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info {
  font-size: 12px;
  color: var(--text-dim);
}

.pagination-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pagination-current-page {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  min-width: 95px;
  text-align: center;
  user-select: none;
}

.pagination-controls button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==================== 1. ONBOARDING & SETUP WIZARD ==================== */
.onboarding-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.08) 50%, rgba(99, 102, 241, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.onboarding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

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

.onboarding-badge {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.onboarding-step-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: var(--transition-normal);
  cursor: pointer;
  position: relative;
}

.onboarding-step-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
}

.onboarding-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  flex-shrink: 0;
}

.onboarding-step-card.completed .onboarding-step-num {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.onboarding-step-content {
  flex: 1;
}

.onboarding-step-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.onboarding-step-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==================== 2. FEATURE HUB & CAPABILITIES GRID ==================== */
.feature-hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.feature-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.feature-hub-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.feature-hub-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  transition: var(--transition-fast);
}

.feature-hub-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.feature-hub-card:hover::before {
  background: linear-gradient(90deg, #10b981, #06b6d4);
}

.feature-hub-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.feature-hub-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.icon-wrap-whatsapp { background: rgba(37, 211, 102, 0.15); border: 1px solid rgba(37, 211, 102, 0.3); }
.icon-wrap-messages { background: rgba(6, 182, 212, 0.15); border: 1px solid rgba(6, 182, 212, 0.3); }
.icon-wrap-ai { background: rgba(168, 85, 247, 0.15); border: 1px solid rgba(168, 85, 247, 0.3); }
.icon-wrap-leads { background: rgba(251, 191, 36, 0.15); border: 1px solid rgba(251, 191, 36, 0.3); }
.icon-wrap-analytics { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); }
.icon-wrap-api { background: rgba(99, 102, 241, 0.15); border: 1px solid rgba(99, 102, 241, 0.3); }

.feature-hub-info h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
}

.feature-hub-info p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.feature-hub-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 600;
  color: var(--emerald-400);
}

.feature-hub-footer span:last-child {
  transition: transform 0.2s ease;
}

.feature-hub-card:hover .feature-hub-footer span:last-child {
  transform: translateX(4px);
}

/* ==================== 3. SECTION INTRO HELPER BANNERS ==================== */
.section-helper-banner {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

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

.section-helper-icon {
  font-size: 20px;
}

.section-helper-text h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.section-helper-text p {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==================== 4. LIVE WHATSAPP PHONE SIMULATOR ==================== */
.phone-simulator-card {
  background: rgba(10, 15, 28, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.phone-simulator-top {
  background: #1f2c34;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.phone-sim-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #00a884;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  font-weight: 700;
}

.phone-sim-info {
  flex: 1;
}

.phone-sim-name {
  font-size: 13px;
  font-weight: 700;
  color: #e9edef;
  line-height: 1.2;
}

.phone-sim-status {
  font-size: 10px;
  color: #8696a0;
}

.phone-chat-body {
  background: #0b141a;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 0);
  background-size: 20px 20px;
  padding: 16px;
  min-height: 260px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wa-bubble-system {
  align-self: center;
  background: rgba(24, 34, 41, 0.9);
  color: #8696a0;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  text-align: center;
  max-width: 90%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.wa-bubble-out {
  align-self: flex-end;
  background: #005c4b;
  color: #e9edef;
  padding: 8px 12px 6px;
  border-radius: 8px 8px 0 8px;
  max-width: 85%;
  font-size: 12.5px;
  line-height: 1.4;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
  word-break: break-word;
}

.wa-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
  font-size: 10px;
  color: #8696a0;
}

.wa-ticks-blue {
  color: #53bdeb;
  font-size: 11px;
  font-weight: 700;
}

.wa-bubble-media-preview {
  margin-bottom: 6px;
  border-radius: 6px;
  overflow: hidden;
  max-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.2);
}

.wa-bubble-media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==================== 5. PRESET SCENARIO PILLS ==================== */
.preset-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.preset-pill-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.preset-pill-item:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  transform: translateY(-1px);
}

/* ==================== 6. FEATURE GUIDE MODAL ==================== */
.feature-guide-modal-box {
  max-width: 820px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.feature-guide-tabs {
  display: flex;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 16px;
  overflow-x: auto;
}

.guide-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

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

.guide-tab-btn.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.guide-panel {
  display: none;
  overflow-y: auto;
  max-height: 55vh;
  padding-right: 6px;
}

.guide-panel.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

.guide-feature-block {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 14px;
}

.guide-feature-block h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-feature-block p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.guide-feature-block ul {
  list-style: none;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-feature-block ul li::before {
  content: "⚡ ";
  color: #34d399;
}



