/* ==========================================================================
   وصال — WhatsApp Business Design System
   ========================================================================== */

/* ==================== Google Fonts Import ==================== */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@400;600;700&family=Tajawal:wght@400;500;700&display=swap');

/* ==================== CSS Variables — Light Mode (Default) ==================== */
:root {
  /* WhatsApp & Enterprise Brand Colors */
  --wa-green:          #25D366;
  --wa-green-dark:     #128C7E;
  --wa-green-deeper:   #075E54;
  --wa-green-light:    #DCF8C6;
  --wa-teal:           #075E54;
  --wa-accent-glow:    rgba(37, 211, 102, 0.25);

  /* Backgrounds */
  --bg-main:           #F8FAFC;
  --bg-sidebar:        #FFFFFF;
  --bg-chat:           #F1F5F9;
  --bg-card:           #FFFFFF;
  --bg-header:         #075E54;
  --bg-input:          #F1F5F9;

  /* Borders */
  --border-color:      #E2E8F0;
  --border-light:      rgba(0,0,0,0.06);

  /* Text */
  --text-main:         #0F172A;
  --text-muted:        #475569;
  --text-light:        #94A3B8;
  --text-on-dark:      #FFFFFF;

  /* Semantic Colors */
  --color-primary:     #25D366;
  --color-primary-dark:#128C7E;
  --color-success:     #10B981;
  --color-warning:     #F59E0B;
  --color-danger:      #EF4444;
  --color-info:        #3B82F6;

  /* Shadows */
  --shadow-sm:         0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md:         0 4px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg:         0 10px 40px rgba(15, 23, 42, 0.12);

  /* Typography — Enterprise Level */
  --font-ar:           'IBM Plex Sans Arabic', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-en:           'IBM Plex Sans Arabic', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --fs-xs:             11.5px;
  --fs-sm:             13px;
  --fs-base:           14.5px;
  --fs-md:             16px;
  --fs-lg:             18px;
  --fs-xl:             22px;
  --fs-2xl:            26px;
  --fs-3xl:            32px;

  /* Radius */
  --radius-sm:         8px;
  --radius-md:         14px;
  --radius-lg:         20px;
  --radius-xl:         28px;
  --radius-full:       9999px;

  /* Transitions */
  --transition:        all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ==================== Dark Mode (Enterprise Obsidian) ==================== */
body.dark-mode {
  --bg-main:           #070A0F;
  --bg-sidebar:        #0D1117;
  --bg-chat:           #070A0F;
  --bg-card:           #121824;
  --bg-header:         #0D1117;
  --bg-input:          #1A2332;

  --border-color:      #1E293B;
  --border-light:      rgba(255,255,255,0.06);

  --text-main:         #F8FAFC;
  --text-muted:        #94A3B8;
  --text-light:        #64748B;

  --shadow-sm:         0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:         0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:         0 10px 40px rgba(0,0,0,0.7);
}

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

html {
  scroll-behavior: smooth;
  /* NOTE: do NOT add "overflow-x: hidden" here. Setting a non-visible
     overflow on <html> (even just on one axis) forces the browser to also
     treat <html> as a scroll container, which breaks "position: sticky" for
     every descendant (e.g. .landing-header) — the sticky header silently
     stopped sticking site-wide the last time this was tried. The original
     nav-overflow bug this was meant to guard against is already fixed at
     the source (.landing-nav/.nav-actions collapse into a hamburger menu
     below 768px — see .landing-menu-toggle), and body's own
     "overflow-x: hidden" below is enough of a safety net on its own. */
}

body, input, button, select, textarea, .price, .price span, .price small {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-ar);
  font-size: var(--fs-base);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

html[lang="en"] body {
  font-family: var(--font-en);
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

.hidden { display: none !important; }

/* ==================== Typography ==================== */
h1 { font-size: var(--fs-3xl); font-weight: 700; line-height: 1.2; }
h2 { font-size: var(--fs-2xl); font-weight: 700; }
h3 { font-size: var(--fs-xl); font-weight: 600; }
h4 { font-size: var(--fs-lg); font-weight: 600; }

/* ==================== Utility Classes ==================== */
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.text-success { color: var(--color-success); }
.text-danger  { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }
.w-100        { width: 100%; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }
.mt-auto      { margin-top: auto; }

/* ==================== Buttons ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-weight: 600;
  font-size: var(--fs-base);
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--wa-green);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,211,102,0.3);
}
.btn-primary:hover {
  background: var(--wa-green-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
}

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

.btn-danger {
  background: rgba(244,67,54,0.1);
  color: var(--color-danger);
  border: 1px solid rgba(244,67,54,0.25);
}
.btn-danger:hover {
  background: rgba(244,67,54,0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}
.btn-ghost:hover {
  color: var(--text-main);
  background: var(--bg-input);
}

.btn-sm { padding: 6px 14px; font-size: var(--fs-sm); border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 28px; font-size: var(--fs-md); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* ==================== Form Elements ==================== */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  color: var(--text-main);
  font-size: var(--fs-base);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--wa-green);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(37,211,102,0.15);
}

.form-control::placeholder { color: var(--text-light); }

select.form-control { cursor: pointer; }

textarea.form-control {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.form-text {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 5px;
  display: block;
}

/* ==================== Cards ==================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover { box-shadow: var(--shadow-md); }

.card h3 {
  font-size: var(--fs-md);
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

/* ==================== Badges ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.badge-success { background: rgba(37,211,102,0.12); color: #1a8a4a; }
.badge-warning { background: rgba(255,160,0,0.12); color: #b35c00; }
.badge-danger  { background: rgba(244,67,54,0.12); color: #c62828; }
.badge-info    { background: rgba(33,150,243,0.12); color: #1565c0; }
.badge-primary { background: rgba(37,211,102,0.15); color: var(--wa-green-dark); }

body.dark-mode .badge-success { color: var(--wa-green); }
body.dark-mode .badge-warning { color: #FFB74D; }
body.dark-mode .badge-danger  { color: #EF9A9A; }
body.dark-mode .badge-info    { color: #90CAF9; }

.plan-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  background: linear-gradient(135deg, var(--wa-green), var(--wa-green-dark));
  color: #fff;
}

.badge-new {
  background: rgba(33, 150, 243, 0.15) !important;
  color: #2196F3 !important;
}
.badge-interested {
  background: rgba(255, 160, 0, 0.15) !important;
  color: #FFA000 !important;
}
.badge-customer {
  background: rgba(37, 211, 102, 0.15) !important;
  color: #25D366 !important;
}
.badge-inactive {
  background: rgba(142, 142, 142, 0.15) !important;
  color: #8e8e8e !important;
}


/* ==================== Status Indicator ==================== */
.status-indicator {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-indicator.online  { background: var(--wa-green); box-shadow: 0 0 6px var(--wa-green); }
.status-indicator.offline { background: var(--text-light); }

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

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

.table th, .table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: var(--fs-sm);
  text-align: center;
}

.table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-main);
}

.table td { color: var(--text-main); }
.table tbody tr:hover { background: var(--bg-input); }
.table tbody tr:last-child td { border-bottom: none; }

/* ==================== Modal ==================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal.active { display: flex; }

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 30px;
  width: 460px;
  max-width: 92%;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.close-modal {
  position: absolute;
  top: 16px;
  left: 20px;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s;
  background: none;
  border: none;
}
.close-modal:hover { color: var(--text-main); }

/* ==================== Copy Box ==================== */
.copy-box { margin-top: 16px; }
.copy-box label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  text-transform: uppercase;
}
.copy-row {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.copy-row code {
  font-family: var(--font-en);
  font-size: var(--fs-sm);
  color: var(--wa-green-dark);
  word-break: break-all;
}
body.dark-mode .copy-row code { color: var(--wa-green); }

.copy-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  transition: color 0.2s;
  flex-shrink: 0;
}
.copy-btn:hover { color: var(--wa-green); }

/* ==================== Check Inline ==================== */
.check-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}
.check-inline:hover { border-color: var(--wa-green); }
.check-inline label { margin: 0; cursor: pointer; font-weight: 500; }
.check-inline input { width: 18px; height: 18px; cursor: pointer; accent-color: var(--wa-green); }

/* ==================== Onboarding Banner ==================== */
.onboarding-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(255,160,0,0.12), rgba(255,160,0,0.05));
  border: 1px solid rgba(255,160,0,0.3);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  animation: slideDown 0.4s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.onboarding-banner > i {
  font-size: 22px;
  color: var(--color-warning);
  flex-shrink: 0;
}
.banner-text h4 {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--color-warning);
  margin-bottom: 2px;
}
.banner-text p { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }
.banner-text a { color: var(--wa-green-dark); font-weight: 600; }
body.dark-mode .banner-text a { color: var(--wa-green); }

/* ==================== Typing Indicator ==================== */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  width: auto !important;
}
.typing-indicator span {
  width: 6px; height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingDot 1s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%,100% { transform: translateY(0); opacity: 0.4; }
  50%      { transform: translateY(-4px); opacity: 1; }
}

/* ==================== Success Alert ==================== */
.success-wizard-alert {
  text-align: center;
  padding: 30px 10px;
}
.success-wizard-alert i {
  font-size: 52px;
  color: var(--color-success);
  margin-bottom: 16px;
  display: block;
}
.success-wizard-alert h3 { margin-bottom: 8px; }
.success-wizard-alert p {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  max-width: 80%;
  margin: 0 auto;
}

/* =====================================================================
   DASHBOARD LAYOUT
   ===================================================================== */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ==================== Sidebar ==================== */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  transition: width 0.3s;
}

.sidebar-header {
  background: var(--bg-header);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.brand.center { justify-content: center; }

.logo-icon {
  font-size: 30px;
  color: var(--wa-green);
  filter: drop-shadow(0 0 6px rgba(37,211,102,0.4));
}

.sidebar-header .logo-icon { color: #fff; filter: none; font-size: 28px; }
.sidebar-header .brand-text h2 { color: #fff; font-size: 18px; }
.sidebar-header .brand-text span { color: rgba(255,255,255,0.6); font-size: 11px; }

.brand-text h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}
.brand-text span {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* Active Tenant Box */
.active-tenant-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  margin: 12px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
}
.tenant-icon-box {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--wa-green), var(--wa-green-dark));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}
.tenant-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  text-align: center;
}
.tenant-details h3 {
  font-size: var(--fs-sm);
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  width: 100%;
}

/* Side Nav */
.side-nav { padding: 8px 12px; flex: 1; }
.side-nav ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.side-nav li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 500;
  font-size: var(--fs-sm);
  transition: var(--transition);
  position: relative;
}
.side-nav li i { width: 18px; text-align: center; font-size: 15px; }
.side-nav li:hover { background: var(--bg-input); color: var(--text-main); }
.side-nav li.active {
  background: rgba(37,211,102,0.1);
  color: var(--wa-green-dark);
  font-weight: 700;
  border-right: 3px solid var(--wa-green);
}
body.dark-mode .side-nav li.active { color: var(--wa-green); border-right-color: var(--wa-green); }

/* Sidebar Footer */
.dev-credits {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-toggles-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

/* ==================== Main Content ==================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-main);
}

.content-header {
  background: var(--bg-header);
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.content-header h1 {
  font-size: var(--fs-md);
  font-weight: 600;
  color: #fff;
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.85);
}

/* Scrollable content area */
.main-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* Tab system */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ==================== Stats Grid ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stat-icon.green  { background: rgba(37,211,102,0.12); color: var(--wa-green-dark); }
.stat-icon.teal   { background: rgba(7,94,84,0.12);   color: var(--wa-teal); }
.stat-icon.blue   { background: rgba(33,150,243,0.12); color: #1976D2; }
.stat-icon.orange { background: rgba(255,160,0,0.12);  color: #E65100; }
body.dark-mode .stat-icon.green  { color: var(--wa-green); }
body.dark-mode .stat-icon.teal   { color: #4DB6AC; }
body.dark-mode .stat-icon.blue   { color: #64B5F6; }
body.dark-mode .stat-icon.orange { color: #FFB74D; }

.stat-info .stat-value {
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1;
}
.stat-info .stat-label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==================== Dashboard Grid ==================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.control-panel-column { display: flex; flex-direction: column; gap: 20px; }
.simulator-column { display: flex; justify-content: center; align-items: flex-start; }

/* ==================== Phone Simulator ==================== */
.phone-frame {
  width: 320px;
  height: 580px;
  background: var(--bg-sidebar);
  border: 8px solid #1E2A32;
  border-radius: 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  position: relative;
  overflow: hidden;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg-chat);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.phone-header {
  background: var(--wa-teal);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.phone-info { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--wa-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
}
.user-details h4 { font-size: 13px; font-weight: 600; color: #fff; }
.user-details span { font-size: var(--fs-xs); color: rgba(255,255,255,0.7); }
#clearChatBtn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  cursor: pointer;
}
#clearChatBtn:hover { color: #fff; }

.phone-chat-body {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' opacity='0.03'%3E%3Ctext y='45' font-size='40'%3E💬%3C/text%3E%3C/svg%3E");
  scroll-behavior: smooth;
}

.chat-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  gap: 12px;
}
.chat-placeholder i { font-size: 36px; opacity: 0.35; }
.chat-placeholder p { font-size: var(--fs-xs); max-width: 80%; }

.message-bubble {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.5;
  word-break: break-word;
}
.message-bubble.incoming {
  background: var(--bg-card);
  color: var(--text-main);
  align-self: flex-start;
  border-bottom-right-radius: 2px;
  box-shadow: var(--shadow-sm);
}
.message-bubble.outgoing {
  background: var(--wa-green-light);
  color: #111;
  align-self: flex-end;
  border-bottom-left-radius: 2px;
  box-shadow: var(--shadow-sm);
}
body.dark-mode .message-bubble.outgoing { background: #005C4B; color: #e9edef; }
body.dark-mode .message-bubble.incoming { background: #202C33; color: #e9edef; }

.phone-input-footer {
  padding: 10px 12px;
  background: var(--bg-sidebar);
  display: flex;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--border-color);
  box-sizing: border-box;
  width: 100%;
}
.phone-input-footer input {
  flex: 1;
  min-width: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 9px 16px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
}
.phone-input-footer button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--wa-green);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.35);
}
.phone-input-footer button i,
#landingSendMsgBtn i {
  transform: scaleX(-1);
  display: inline-block;
}
html[dir="ltr"] .phone-input-footer button i,
html[dir="ltr"] #landingSendMsgBtn i {
  transform: none;
}
.phone-input-footer button:hover {
  background: var(--wa-green-dark);
  transform: scale(1.08);
}

/* ==================== Wizard / Bot Builder ==================== */
.wizard-card { max-width: 780px; }

.wizard-steps-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 28px;
  padding-bottom: 16px;
  gap: 8px;
  flex-wrap: wrap;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.45;
  transition: opacity 0.3s;
}
.step-header.active { opacity: 1; font-weight: 600; }
.step-header.active .step-num {
  background: var(--wa-green);
  border-color: var(--wa-green);
  color: #fff;
}
.step-num {
  width: 26px; height: 26px;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 700;
}
.step-title { font-size: var(--fs-sm); }
.step-content { display: none; }
.step-content.active { display: block; }

.wizard-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

/* ==================== Instructions List ==================== */
.instructions-list { display: flex; flex-direction: column; gap: 10px; }
.inst-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  border: 1px dashed var(--border-color);
}
.inst-item .num {
  background: var(--wa-green);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  flex-shrink: 0;
}
.inst-item p { margin: 0; font-size: var(--fs-sm); color: var(--text-main); }

/* ==================== Settings ==================== */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.webhook-info-pane .info-bubble {
  background: rgba(37,211,102,0.04);
  border: 1px solid rgba(37,211,102,0.2);
  border-radius: var(--radius-md);
  padding: 20px;
}

/* ==================== Video Tutorials ==================== */
.video-tutorials-section {
  margin-top: 32px;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}
.video-tutorials-section h3 {
  font-size: var(--fs-md);
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.subtitle-video { font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: 18px; }
.video-grid { display: grid; gap: 18px; max-width: 640px; }
.video-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}
.video-card h4 { font-size: var(--fs-sm); font-weight: 500; margin-bottom: 10px; }
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
}
.video-wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ==================== Admin Debug ==================== */
.admin-debug-box { margin-bottom: 10px; }
.debug-select { font-size: var(--fs-xs); padding: 6px 10px; }

/* =====================================================================
   AUTH PAGES (Login & Register)
   ===================================================================== */
.register-body {
  background: linear-gradient(135deg, var(--wa-teal) 0%, var(--wa-green-dark) 50%, #1a1a2e 100%);
  min-height: 100vh;
  overflow-y: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 440px;
}

.register-container {
  width: 100%;
  max-width: 940px;
}

.register-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  animation: fadeUp 0.5s cubic-bezier(0.34,1.56,0.64,1);
}

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

.register-card .brand {
  justify-content: center;
  margin-bottom: 20px;
}

.register-card h2 {
  text-align: center;
  font-size: var(--fs-xl);
  margin-bottom: 6px;
}

.register-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin-bottom: 28px;
}

/* ── Social Auth Buttons ── */
.social-auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  text-decoration: none;
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.25);
  background: var(--bg-card);
}

.google-btn i { color: #EA4335; font-size: 16px; }
.ms-btn i     { color: #00A4EF; font-size: 16px; }

/* Auth divider */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0;
  color: var(--text-muted);
  font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}
.auth-divider span {
  padding: 0 12px;
}

/* Theme toggle floater */
.theme-lang-toggle-container {
  position: fixed;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 8px;
  z-index: 999;
}

.btn-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-full);
  color: #fff;
  padding: 8px 14px;
  font-size: var(--fs-sm);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: var(--transition);
}
.btn-toggle:hover { background: rgba(255,255,255,0.25); }
.btn-toggle-icon { padding: 8px 12px; }

.back-to-landing {
  margin-top: 16px;
  text-align: center;
}
.back-to-landing a {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  transition: color 0.2s;
}
.back-to-landing a:hover { color: var(--wa-green); }

/* Checkout Layout */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.checkout-section-title {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
}

.checkout-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.checkout-tab-btn {
  flex: 1;
  padding: 10px;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.checkout-tab-btn.active {
  border-color: var(--wa-green);
  color: var(--wa-green-dark);
  background: rgba(37,211,102,0.08);
  font-weight: 700;
}
body.dark-mode .checkout-tab-btn.active { color: var(--wa-green); }

.checkout-tab-content { display: none; }
.checkout-tab-content.active { display: block; }

.bank-details-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}
.bank-details-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bank-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: var(--fs-sm);
}
.bank-detail-item:last-child { border-bottom: none; }
.bank-detail-item .label { color: var(--text-muted); font-weight: 500; }
.bank-detail-item .value { font-weight: 700; }

/* Order Summary */
.order-summary-pane {}
.plan-summary-card {
  background: linear-gradient(135deg, var(--wa-teal), var(--wa-green-dark));
  border-radius: var(--radius-md);
  padding: 20px;
  color: #fff;
  margin-bottom: 16px;
}
.plan-summary-card h4 { font-size: var(--fs-lg); margin-bottom: 4px; }
.plan-summary-card .price { font-size: var(--fs-3xl); font-weight: 700; margin: 8px 0; }
.plan-summary-card .price span { font-size: var(--fs-base); opacity: 0.75; }
.plan-features-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.plan-features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  opacity: 0.9;
}
.plan-features-list li i { font-size: 13px; }

/* =====================================================================
   LANDING PAGE
   ===================================================================== */
.landing-body {
  background: var(--bg-main);
  overflow-y: auto;
  height: auto;
  min-height: 100vh;
}

/* Header */
.landing-header {
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  height: 74px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.landing-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 20px;
}

/* Brand badge */
.landing-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-logo-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.2) 0%, rgba(18, 140, 126, 0.4) 100%);
  border: 1px solid rgba(37, 211, 102, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.2);
}

.landing-header .logo-icon {
  color: var(--wa-green);
  font-size: 22px;
  filter: drop-shadow(0 0 6px rgba(37, 211, 102, 0.5));
}

.landing-header .brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.landing-header .brand-text h2 {
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 0;
  line-height: 1.2;
}

.landing-header .brand-text span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  font-weight: 500;
  margin: 0;
}

/* Navigation Pills */
.landing-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  padding: 5px 8px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.landing-nav ul {
  display: flex;
  list-style: none;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.landing-nav a {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  font-size: 14px;
  padding: 7px 16px;
  border-radius: 20px;
  transition: all 0.25s ease;
  text-decoration: none;
  display: inline-block;
}

.landing-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* Nav actions */
.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.nav-login-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.nav-login-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-1px);
}

.nav-register-btn {
  background: linear-gradient(135deg, var(--wa-green) 0%, #128C7E 100%);
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px;
  font-weight: 700;
  padding: 9px 20px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  transition: all 0.25s ease;
}

.nav-register-btn:hover {
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  transform: translateY(-2px);
}

/* Hero */
.hero-section {
  background: linear-gradient(135deg, var(--wa-teal) 0%, var(--wa-green-dark) 60%, #064940 100%);
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='rgba(255,255,255,0.05)'/%3E%3C/svg%3E");
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
}

.hero-text { color: #fff; }
.badge-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: var(--fs-xs);
  font-weight: 600;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

.hero-text h1 {
  font-size: 38px;
  line-height: 1.25;
  margin-bottom: 20px;
  color: #fff;
}

.hero-text p {
  font-size: var(--fs-md);
  color: rgba(255,255,255,0.8);
  line-height: 1.75;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-actions .btn-primary {
  background: #fff;
  color: var(--wa-teal);
  font-weight: 700;
}
.hero-actions .btn-primary:hover { background: #f0fff4; }

.hero-image { display: flex; justify-content: center; }
.hero-mockup-frame {
  width: 280px; height: 280px;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  backdrop-filter: blur(10px);
  animation: float 4s ease-in-out infinite;
  position: relative;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
.glowing-circle {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,211,102,0.18) 0%, transparent 70%);
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.08); opacity: 1; }
}
.whatsapp-big-icon {
  font-size: 80px;
  color: #fff;
  position: relative;
  z-index: 1;
}
.hero-mockup-frame h3 {
  color: rgba(255,255,255,0.9);
  font-size: var(--fs-sm);
  position: relative;
  z-index: 1;
  text-align: center;
}

/* Features Section */
.features-section {
  padding: 80px 0;
  background: var(--bg-card);
}
body.dark-mode .features-section { background: var(--bg-sidebar); }

.section-title {
  text-align: center;
  margin-bottom: 50px;
}
.section-title h2 { font-size: var(--fs-2xl); margin-bottom: 10px; }
.section-title p { color: var(--text-muted); font-size: var(--fs-md); max-width: 540px; margin: 0 auto; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
}
body.dark-mode .feature-card { background: var(--bg-card); }

.feature-card:hover {
  border-color: var(--wa-green);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feat-icon {
  font-size: 28px;
  color: var(--wa-green-dark);
  margin-bottom: 14px;
  display: block;
  width: 52px; height: 52px;
  background: rgba(37,211,102,0.1);
  border-radius: var(--radius-md);
  line-height: 52px;
  text-align: center;
}
body.dark-mode .feat-icon { color: var(--wa-green); }

.feature-card h3 { font-size: var(--fs-md); margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.7; margin: 0; }

/* Pricing */
.pricing-section { padding: 80px 0; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  transition: var(--transition);
  position: relative;
}
.pricing-card:hover { border-color: var(--wa-green); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pricing-card.featured {
  border-color: var(--wa-green);
  box-shadow: 0 0 0 1px var(--wa-green), var(--shadow-md);
}

.popular-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--wa-green);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 4px 18px;
  font-size: var(--fs-xs);
  font-weight: 700;
  white-space: nowrap;
}

.pricing-card .price {
  font-size: 38px;
  font-weight: 800;
  color: var(--text-main);
  margin: 14px 0 8px;
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}
.pricing-card .price span { font-size: 38px; font-weight: 800; color: var(--wa-green-dark); }
body.dark-mode .pricing-card .price span { color: var(--wa-green); }
.pricing-card .price small,
.pricing-card .price .price-period {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.85;
}
.pricing-card .price-sub { font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: 20px; }

/* Enlarge & Highlight Billing Note */
.pricing-card .billing-note {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
  background: rgba(37, 211, 102, 0.08);
  border: 1px solid rgba(37, 211, 102, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 12px 0 20px;
  line-height: 1.5;
  display: block;
  text-align: center;
}
body.dark-mode .pricing-card .billing-note {
  background: rgba(37, 211, 102, 0.12);
  border-color: rgba(37, 211, 102, 0.25);
  color: #F8FAFC;
}
.pricing-card .billing-note strong {
  font-size: 14.5px;
  font-weight: 700;
  color: #EF4444 !important;
}

.pricing-features { list-style: none; text-align: right; display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.pricing-features li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); }
.pricing-features li i { color: var(--wa-green); font-size: 14px; }
.pricing-features li.disabled { opacity: 0.35; text-decoration: line-through; }
.pricing-features li.disabled i { color: var(--text-muted); }

/* Plan Features List — unified for .plan-features and .pricing-features */
.plan-features { list-style: none; text-align: right; display: flex; flex-direction: column; gap: 9px; margin-bottom: 24px; }
.plan-features li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--text-main); }
.plan-features li i { font-size: 13px; flex-shrink: 0; }
.plan-features li i.fa-check { color: var(--wa-green); }
.plan-features li.feature-missing { color: var(--text-light); }
.plan-features li.feature-missing i.fa-xmark { color: #CBD5E1; }
.plan-features li.feature-highlight { color: var(--wa-green-dark); font-weight: 600; }
body.dark-mode .plan-features li.feature-highlight { color: var(--wa-green); }

/* Plan Icon Badge */
.plan-icon-badge {
  font-size: 32px;
  margin: 0 auto 8px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, rgba(37,211,102,0.12), rgba(7,94,84,0.08));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(37,211,102,0.2);
}

/* Plan Tagline */
.plan-tagline {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0 0 4px;
  text-align: center;
}

/* Plan Limits Summary Row */
.plan-limits-summary {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
  padding: 10px 12px;
  background: rgba(37,211,102,0.06);
  border: 1px dashed rgba(37,211,102,0.25);
  border-radius: var(--radius-md);
}
.plan-limits-summary span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--wa-green-dark);
}
.plan-limits-summary span i { font-size: 11px; }
body.dark-mode .plan-limits-summary { background: rgba(37,211,102,0.1); border-color: rgba(37,211,102,0.3); }
body.dark-mode .plan-limits-summary span { color: var(--wa-green); }

/* Save tag inside billing-note */
.save-tag {
  display: inline-block;
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  font-weight: 700;
}

/* Plan no CC text */
.plan-no-cc {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text-light);
  text-align: center;
}
.plan-no-cc i { margin-left: 4px; }

/* Pricing note footnote */
.pricing-note {
  text-align: center;
  margin-top: 32px;
  padding: 14px 20px;
  background: rgba(37,211,102,0.05);
  border: 1px solid rgba(37,211,102,0.15);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}
.pricing-note i { color: var(--color-info); margin-left: 6px; }

/* Pro card golden border accent */
.pricing-card.pro-card {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(180deg, rgba(245,158,11,0.03) 0%, var(--bg-card) 60%);
}
.pricing-card.pro-card:hover { border-color: #F59E0B; }
body.dark-mode .pricing-card.pro-card { border-color: rgba(245,158,11,0.35); }

/* Demo Section */
.demo-section { padding: 80px 0; background: var(--bg-card); }
body.dark-mode .demo-section { background: var(--bg-sidebar); }


.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.demo-text h2 { font-size: var(--fs-2xl); margin-bottom: 12px; }
.demo-text p { color: var(--text-muted); font-size: var(--fs-md); margin-bottom: 24px; line-height: 1.75; }

/* Footer */
.landing-footer {
  background: var(--bg-header);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 28px 24px;
  font-size: var(--fs-sm);
}
.landing-footer a { color: rgba(255,255,255,0.9); }

/* =====================================================================
   RESPONSIVE DESIGN
   ===================================================================== */
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .simulator-column { justify-content: flex-start; }
  .settings-grid { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-image { display: none; }
  .hero-actions { justify-content: center; }
  .demo-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* .sidebar becomes an off-canvas drawer below — width here only applies
     while it's slid on-screen (see the (max-width:768px) rule further down
     that turns it into a fixed, hidden-by-default panel). */
  .sidebar { width: 240px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-text h1 { font-size: var(--fs-2xl); }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .register-card { padding: 24px; }
}

/* ==================== Landing page mobile nav ====================
   .nav-actions (contact-sales, theme toggle, language toggle, login,
   register — 5 items, ~570px min-content width) never had a mobile
   treatment. Below ~900px it no longer fits next to the logo, and since
   it couldn't shrink or wrap it just overflowed the header — which, on a
   dir="rtl" page, silently pushed the whole document wider than the
   viewport and made most of the site render off-screen. Below collapses
   both .landing-nav and .nav-actions into a single dropdown opened by a
   hamburger button (see landing page inline script for the toggle logic). */
.landing-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}
.landing-menu-toggle:hover { background: rgba(255,255,255,0.16); }

@media (max-width: 768px) {
  .landing-menu-toggle { display: flex; }
  .landing-nav, .nav-actions {
    display: none;
    position: absolute;
    top: 74px;
    right: 0;
    left: 0;
    background: rgba(13,17,23,0.98);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    z-index: 200;
  }
  .landing-nav.mobile-open { display: flex; }
  .nav-actions.mobile-open { display: flex; top: calc(74px + 1px); }
  .landing-nav.mobile-open ul {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
  }
  .nav-actions.mobile-open .nav-login-btn,
  .nav-actions.mobile-open .nav-register-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==================== Mobile off-canvas sidebar (dashboard/admin) ====================
   Below 768px there is no room for a permanent side nav next to the content, and
   below this size .sidebar used to just disappear off-screen with no way to bring
   it back (no menu button existed anywhere) — the entire dashboard nav was
   unreachable on a phone. .mobile-menu-toggle + #sidebarOverlay fix that. */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  flex-shrink: 0;
}
.mobile-menu-toggle:hover { background: rgba(255,255,255,0.2); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}
.sidebar-overlay.open { display: block; }

@media (max-width: 768px) {
  .mobile-menu-toggle { display: flex; }
  .content-header { gap: 12px; }
  .sidebar {
    position: fixed;
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.3s;
    height: 100vh;
    top: 0;
    right: 0;
    width: 280px;
  }
  .sidebar.open { transform: translateX(0); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .phone-frame { width: 280px; height: 520px; }
  .main-scroll { padding: 16px; }
  .content-header { padding: 0 16px; }
}

/* ==================== Dialog / Alert ==================== */
#customAlertOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

#customAlertBox {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 30px;
  width: 420px;
  max-width: 92%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

#customAlertBox .alert-icon { font-size: 44px; margin-bottom: 14px; }
#customAlertBox h3 { font-size: var(--fs-lg); margin-bottom: 8px; }
#customAlertBox p { color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: 20px; line-height: 1.65; }
#customAlertBox .btn { min-width: 120px; }

/* ==================== Scrollbar Styling ==================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ==================== Light Mode Sidebar fix ==================== */
body:not(.dark-mode) .sidebar {
  border-left: 1px solid var(--border-color);
  box-shadow: 2px 0 12px rgba(0,0,0,0.06);
}

/* ==================== Subtitle ==================== */
.subtitle { font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: 24px; }

/* ==================== Misc ==================== */
.btn-block { margin-top: 8px; }

.text-link {
  color: var(--wa-green-dark);
  font-weight: 600;
  font-size: var(--fs-sm);
  transition: color 0.2s;
}
.text-link:hover { color: var(--wa-green); }
body.dark-mode .text-link { color: var(--wa-green); }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: var(--fs-xs);
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* ==================== Custom Dialog (Alert / Confirm) ==================== */
.custom-dialog-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}

.custom-dialog-overlay.active {
  display: flex;
}

.custom-dialog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px 24px;
  min-width: 320px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  text-align: center;
  transform: scale(0.88) translateY(20px);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s ease;
  position: relative;
}

.custom-dialog-card.active {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.custom-dialog-icon {
  font-size: 42px;
  margin-bottom: 14px;
  line-height: 1;
}

.custom-dialog-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.custom-dialog-message {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 24px;
}

.custom-dialog-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.custom-dialog-buttons .btn {
  min-width: 100px;
  padding: 10px 22px;
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
}

/* Dark mode adjustments */
body.dark-mode .custom-dialog-card {
  background: var(--bg-card);
  border-color: var(--border-color);
}

/* ==================== LTR/English Overrides ==================== */
html[dir="ltr"] body {
  font-family: var(--font-en);
}

html[dir="ltr"] .table {
  text-align: center;
}

html[dir="ltr"] .pricing-features, html[dir="ltr"] .plan-features {
  text-align: left;
}

html[dir="ltr"] .pricing-features li, html[dir="ltr"] .plan-features li {
  flex-direction: row;
}

html[dir="ltr"] .inst-item {
  flex-direction: row;
}

/* Float things correctly in LTR */
html[dir="ltr"] .ml-auto {
  margin-right: auto;
  margin-left: unset;
}
html[dir="ltr"] .mr-auto {
  margin-left: auto;
  margin-right: unset;
}


/* ==========================================================================
   HERO VIDEO PHONE FRAME
   ========================================================================== */

.hero-video-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Phone shell */
.video-phone-frame {
  position: relative;
  width: 290px;
  border-radius: 36px;
  background: #0a0a0a;
  border: 6px solid rgba(255,255,255,0.12);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 40px 80px rgba(0,0,0,0.55),
    0 0 60px rgba(37,211,102,0.12);
  overflow: hidden;
  animation: heroFloat 5s ease-in-out infinite;
}

/* Phone notch */
.video-phone-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 26px;
  background: #0a0a0a;
  border-radius: 0 0 18px 18px;
  z-index: 10;
}

/* Side button */
.video-phone-frame::after {
  content: '';
  position: absolute;
  top: 80px;
  right: -8px;
  width: 5px;
  height: 60px;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
}

.video-phone-frame video {
  width: 100%;
  display: block;
  border-radius: 30px;
  aspect-ratio: 9/16;
  object-fit: cover;
}

/* Play/Pause overlay button */
.video-overlay-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  opacity: 0;
  transition: opacity 0.25s;
}
.video-phone-frame:hover .video-overlay-controls { opacity: 1; }

#videoPlayPauseBtn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
#videoPlayPauseBtn:hover {
  background: rgba(37,211,102,0.5);
  transform: scale(1.1);
}

/* Glow ring around phone */
.phone-glow-ring {
  position: absolute;
  inset: -24px;
  border-radius: 50px;
  background: radial-gradient(ellipse, rgba(37,211,102,0.15) 0%, transparent 68%);
  animation: glowPulse 3.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0px) rotate(-1deg); }
  50%       { transform: translateY(-16px) rotate(1deg); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 1; transform: scale(1.06); }
}

/* Floating metric badges */
.floating-badge {
  position: absolute;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 50px;
  padding: 8px 16px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.floating-badge-1 {
  top: 18%;
  right: -30px;
  animation: badgeFloat1 4s ease-in-out infinite;
}
.floating-badge-2 {
  bottom: 30%;
  right: -40px;
  animation: badgeFloat2 4.5s ease-in-out infinite 0.5s;
}
.floating-badge-3 {
  bottom: 16%;
  left: -28px;
  animation: badgeFloat3 5s ease-in-out infinite 1s;
}

@keyframes badgeFloat1 {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
@keyframes badgeFloat2 {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(6px); }
}
@keyframes badgeFloat3 {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

/* Badge dot indicator */
.badge-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--wa-green);
  margin-left: 6px;
  animation: dotPulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
html[dir="ltr"] .badge-dot { margin-left: 0; margin-right: 6px; }

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

/* Show hero video section on mobile (replace hidden) */
.hero-video-section { display: flex; justify-content: center; }

@media (max-width: 1024px) {
  .hero-video-section { display: none; }
  .floating-badge { display: none; }
}


/* ==========================================================================
   CONTENT GATE SYSTEM
   ========================================================================== */

/* Sections that require login to see full content */
.gated-section {
  position: relative;
}

/* Blur + fade overlay sitting on top of gated content */
.gate-blur-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(240,242,245,0.5) 30%,
    rgba(240,242,245,0.97) 65%
  );
  pointer-events: none;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
body.dark-mode .gate-blur-overlay {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(11,20,26,0.6) 30%,
    rgba(11,20,26,0.97) 65%
  );
}

/* Gate banner — sticky bottom of gated section */
.content-gate-banner {
  position: relative;
  z-index: 20;
  margin-top: -100px; /* pull up into the blurred zone */
  padding: 0 0 60px;
  text-align: center;
}

.gate-card {
  display: inline-block;
  max-width: 520px;
  width: 90%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.14), 0 0 0 1px rgba(37,211,102,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: gateCardPop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}

/* ── Gate Modal Popup Backdrop ── */
.gate-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.gate-modal-card {
  position: relative;
  max-width: 520px;
  width: 100%;
  transform: scale(0.85) translateY(20px);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 25px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(37,211,102,0.3) !important;
}

.gate-modal-backdrop.active .gate-modal-card {
  transform: scale(1) translateY(0);
}

.gate-modal-close {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}
html[dir="ltr"] .gate-modal-close { left: auto; right: 14px; }
.gate-modal-close:hover {
  background: rgba(244,67,54,0.2);
  color: var(--color-danger);
  transform: scale(1.1);
}
body.dark-mode .gate-card {
  background: rgba(31,44,52,0.9);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(37,211,102,0.15);
}

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

.gate-lock-icon {
  font-size: 40px;
  margin-bottom: 14px;
  display: block;
  animation: lockWiggle 2.5s ease-in-out infinite;
}
@keyframes lockWiggle {
  0%, 100% { transform: rotate(0deg); }
  15%       { transform: rotate(-8deg); }
  30%       { transform: rotate(8deg); }
  45%       { transform: rotate(-4deg); }
  60%       { transform: rotate(4deg); }
  75%       { transform: rotate(0deg); }
}

.gate-card h3 {
  font-size: var(--fs-xl);
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}

.gate-card p {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.gate-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.gate-actions .btn {
  min-width: 160px;
  padding: 12px 24px;
  font-size: var(--fs-base);
  font-weight: 700;
}

/* Divider in gate banner */
.gate-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: var(--fs-xs);
}
.gate-divider::before,
.gate-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* Trusted logos / social proof mini bar */
.gate-trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 20px;
  flex-wrap: wrap;
}
.gate-trust-bar span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.gate-trust-bar i {
  color: var(--wa-green);
  font-size: 11px;
}

/* Hide gate when user is logged in (class toggled by JS) */
.gated-section.gate-unlocked .gate-blur-overlay,
.gated-section.gate-unlocked + .content-gate-banner {
  display: none !important;
}
.gate-hidden { display: none !important; }

/* Reduce blur on partially-shown content at top of gated section */
.gated-section::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: transparent;
  pointer-events: none;
}


/* ==========================================================================
   HERO LIVE DASHBOARD MOCKUP
   ========================================================================== */

.hero-dashboard-mockup {
  position: relative;
  width: 420px;
  max-width: 100%;
  border-radius: 16px;
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    0 40px 80px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.06),
    0 0 80px rgba(37,211,102,0.08);
  overflow: visible;
  animation: heroFloat 6s ease-in-out infinite;
  font-family: var(--font-ar);
}

/* ── Top bar ── */
.hd-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #161b22;
  border-radius: 16px 16px 0 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.hd-dots { display: flex; gap: 6px; }
.hd-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
}
.hd-dot-r { background: #FF5F57; }
.hd-dot-y { background: #FEBC2E; }
.hd-dot-g { background: #28C840; }

.hd-topbar-title {
  flex: 1;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.3px;
}

.hd-live-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(37,211,102,0.15);
  border: 1px solid rgba(37,211,102,0.3);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 700;
  color: var(--wa-green);
}
.hd-live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--wa-green);
  animation: dotPulse 1.2s ease-in-out infinite;
}

/* ── Body ── */
.hd-body {
  display: flex;
  height: 220px;
  overflow: hidden;
  border-radius: 0;
}

/* Sidebar */
.hd-sidebar {
  width: 40px;
  background: #0d1117;
  border-left: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  gap: 4px;
}
html[dir="ltr"] .hd-sidebar {
  border-left: none;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.hd-nav-item {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.3);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.hd-nav-item.hd-active {
  background: rgba(37,211,102,0.15);
  color: var(--wa-green);
}

/* Contact list */
.hd-contacts {
  width: 120px;
  background: #161b22;
  border-left: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  flex-shrink: 0;
}
html[dir="ltr"] .hd-contacts {
  border-left: none;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.hd-contact {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}
.hd-contact:hover { background: rgba(255,255,255,0.04); }
.hd-contact-active { background: rgba(37,211,102,0.08) !important; }

.hd-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.hd-avatar.sm { width: 22px; height: 22px; font-size: 9px; }

.hd-cinfo {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.hd-cname {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hd-cmsg {
  font-size: 8px;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hd-unread {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 16px; height: 16px;
  background: var(--wa-green);
  border-radius: 50%;
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
html[dir="ltr"] .hd-unread { left: auto; right: 6px; }

/* Chat window */
.hd-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #0b1420;
  overflow: hidden;
}

.hd-chat-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  background: #161b22;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.hd-ai-tag {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 8px;
  color: var(--wa-green);
  font-weight: 600;
}

.hd-messages {
  flex: 1;
  overflow: hidden;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hd-msg {
  max-width: 85%;
  padding: 5px 9px;
  border-radius: 10px;
  font-size: 9px;
  line-height: 1.5;
  color: rgba(255,255,255,0.88);
  animation: msgSlideIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}
.hd-incoming {
  background: rgba(255,255,255,0.08);
  border-radius: 10px 10px 10px 3px;
  align-self: flex-end;
}
.hd-outgoing {
  background: rgba(37,211,102,0.18);
  border-radius: 10px 10px 3px 10px;
  align-self: flex-start;
}
html[dir="ltr"] .hd-incoming { align-self: flex-start; border-radius: 10px 10px 10px 3px; }
html[dir="ltr"] .hd-outgoing { align-self: flex-end;   border-radius: 10px 10px 3px 10px; }

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

/* Typing indicator */
.hd-typing-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 6px;
  flex-shrink: 0;
}
.hd-typing-bubble {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 5px 9px;
}
.hd-typing-bubble span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  animation: typingBounce 1.2s ease-in-out infinite;
}
.hd-typing-bubble span:nth-child(2) { animation-delay: 0.2s; }
.hd-typing-bubble span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%            { transform: translateY(-5px); opacity: 1; }
}

/* Stats bar */
.hd-stats {
  display: flex;
  justify-content: space-around;
  padding: 10px 14px;
  background: #161b22;
  border-top: 1px solid rgba(255,255,255,0.07);
  border-radius: 0 0 16px 16px;
}
.hd-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.hd-stat-val {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  font-family: var(--font-en);
}
.hd-stat-lbl {
  font-size: 8px;
  color: rgba(255,255,255,0.35);
}

/* Floating badges — repositioned for wider mockup */
.hero-dashboard-mockup .floating-badge-1 {
  top: -14px;
  right: -20px;
}
.hero-dashboard-mockup .floating-badge-2 {
  bottom: 50px;
  right: -30px;
}
.hero-dashboard-mockup .floating-badge-3 {
  bottom: -14px;
  left: -10px;
}

/* responsive */
@media (max-width: 1024px) {
  .hero-dashboard-mockup { display: none; }
}
