/* ==========================================================================
   VANDIA AI - DASHBOARD SPECIFIC STYLES
   Layout, Sidebar, Header, SPA Views, Components & Responsive Design
   ========================================================================== */

/* App Container Layout */
.app-layout {
  position: relative;
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-main);
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition-normal);
  user-select: none;
}

/* Logo Area */
.sidebar-logo-container {
  height: var(--header-height);
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  box-shadow: none;
  flex-shrink: 0;
}

.logo-icon img,
.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--whatsapp-green);
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.logo-badge {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  color: var(--whatsapp-green);
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.35);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  margin-left: 2px;
}

.sidebar-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.sidebar-close-btn:hover,
.sidebar-close-btn:active {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.35);
  color: var(--rose);
}

/* Sidebar Navigation Scrollable Area */
.sidebar-nav-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nav-section-title {
  font-family: var(--font-heading);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0 12px 6px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
  gap: 10px;
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.nav-item-left span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item-link .badge {
  flex-shrink: 0;
  margin-left: auto;
}

.nav-item-icon {
  width: 18px;
  font-size: 14px;
  text-align: center;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  flex-shrink: 0;
}

.nav-item-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-item-link:hover .nav-item-icon {
  color: var(--text-primary);
}

.nav-item-link.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-left: 3px solid var(--whatsapp-green);
  font-weight: 600;
}

.nav-item-link.active .nav-item-icon {
  color: var(--whatsapp-green);
}

/* Sidebar Footer (Subscription + User Profile) */
.sidebar-footer {
  padding: 14px 14px 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(8, 12, 20, 0.4);
}

/* Subscription Card */
.sub-card {
  background: rgba(16, 23, 38, 0.85);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

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

.sub-plan-title {
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sub-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

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

.sub-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--whatsapp-green), var(--cyan));
  border-radius: var(--radius-full);
}

.sub-limits {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-muted);
}

/* User Profile Row */
.user-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
}

.user-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

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

.user-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-logout {
  color: var(--text-secondary);
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-logout:hover {
  color: var(--rose);
  background: rgba(244, 63, 94, 0.1);
}

/* Sidebar Backdrop (Mobile) */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ==========================================================================
   MAIN CONTENT & HEADER
   ========================================================================== */
.main-wrapper {
  flex: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Sticky Header */
.top-header {
  height: 72px;
  min-height: 72px;
  padding: 0 26px;
  background: rgba(11, 17, 30, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-shrink: 0;
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:active {
  background: rgba(37, 211, 102, 0.15);
  border-color: rgba(37, 211, 102, 0.4);
  color: var(--whatsapp-green);
  transform: scale(0.96);
}

/* Base style for mobile utilities container in sidebar (hidden on desktop) */
.sidebar-mobile-utilities {
  display: none;
}

/* Base style for mobile header user avatar button (hidden on desktop) */
.header-user-avatar-mobile {
  display: none;
}

/* Base style for mobile header greeting & bottom nav (hidden on desktop) */
.header-mobile-greeting {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

/* Base style for Recent Chats section */
.mobile-recent-chats-card {
  display: block;
  margin-top: 24px;
}

.recent-chats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.chats-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chats-icon-badge {
  color: var(--whatsapp-green);
  font-size: 18px;
  display: flex;
  align-items: center;
}

.see-all-chats-link {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition-fast);
}

.see-all-chats-link:hover {
  color: #38bdf8;
}

.mobile-chats-list {
  display: flex;
  flex-direction: column;
}

.mobile-chat-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.mobile-chat-row:last-child {
  border-bottom: none;
}

.mobile-chat-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.mobile-chat-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.mobile-chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
}

.mobile-chat-avatar-fallback {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.25), rgba(6, 182, 212, 0.25));
  border: 1px solid rgba(37, 211, 102, 0.4);
  color: var(--whatsapp-green);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-online-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background: var(--whatsapp-green);
  border: 2px solid #080c14;
  border-radius: 50%;
}

.mobile-chat-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-chat-top-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-chat-name {
  font-size: 14.5px;
  font-weight: 600;
  color: #ffffff;
}

.mobile-chat-time {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.mobile-chat-bottom-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-chat-preview {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.mobile-unread-badge {
  background: var(--whatsapp-green);
  color: #080c14;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-read-status {
  color: var(--cyan);
  font-size: 12px;
  flex-shrink: 0;
}

.header-title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 0;
}

.header-brand-logo-wrap {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.mobile-greeting-logo {
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: -2px;
  margin-right: 5px;
  display: inline-block;
}

.header-brand-icon {
  font-size: 19px;
  color: var(--whatsapp-green);
  filter: drop-shadow(0 0 8px rgba(37, 211, 102, 0.4));
  flex-shrink: 0;
}

.header-title {
  font-family: var(--font-heading);
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0;
  white-space: nowrap;
  line-height: 1.2;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Search Box */
.header-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  background: rgba(16, 23, 38, 0.65);
  border: 1px solid var(--border-subtle);
  padding: 0 14px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.header-search-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-secondary);
  background: rgba(22, 33, 54, 0.85);
}

.header-search-shortcut {
  background: rgba(255, 255, 255, 0.08);
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--text-secondary);
}

/* Status Pill */
.status-connected-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  background: rgba(16, 23, 38, 0.7);
  border: 1px solid rgba(37, 211, 102, 0.3);
  padding: 0 14px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.status-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--whatsapp-green);
  box-shadow: 0 0 8px var(--whatsapp-green);
  animation: pulse-dot 1.8s infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px var(--whatsapp-green); }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* Currency Switcher */
.currency-switcher {
  display: inline-flex;
  align-items: center;
  height: 38px;
  background: rgba(16, 23, 38, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
  flex-shrink: 0;
}

.currency-btn {
  height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
  cursor: pointer;
}

.currency-btn.active {
  background: var(--whatsapp-green);
  color: #0b111e;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

/* Status Badge Mini */
.status-badge-mini {
  background: rgba(37, 211, 102, 0.15);
  color: var(--whatsapp-green);
  border: 1px solid rgba(37, 211, 102, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Header Action Buttons */
.header-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: rgba(16, 23, 38, 0.65);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.header-icon-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.notification-badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 6px var(--rose);
}

.header-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  background: rgba(16, 23, 38, 0.65);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.header-link-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

/* ==========================================================================
   SCROLLABLE BODY & SPA VIEW CONTAINERS
   ========================================================================== */
.main-body-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 26px 30px 60px;
}

.view-section {
  display: none;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  animation: fadeInView 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-section.active {
  display: flex;
}

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

/* ==========================================================================
   VIEW: OVERVIEW (#overview)
   ========================================================================== */
/* Welcome Banner (Desktop - Agrandie, Impactante et Prestigieuse) */
.overview-banner {
  background: radial-gradient(circle at 85% 35%, rgba(37, 211, 102, 0.22) 0%, rgba(13, 148, 136, 0.12) 40%, rgba(10, 18, 30, 0.95) 75%), #0c1524;
  border: 1px solid rgba(37, 211, 102, 0.28);
  border-radius: 24px;
  padding: 34px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  min-height: 220px;
  margin-bottom: 24px;
}

.overview-banner::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(37, 211, 102, 0.22), transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.banner-left {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
  position: relative;
}

.banner-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.banner-tag-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #25d366;
  text-shadow: 0 0 16px rgba(37, 211, 102, 0.5);
}

.banner-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 10px #25d366;
}

.banner-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.28;
  color: #ffffff;
  margin: 0;
}

.banner-subtitle {
  font-size: 14.5px;
  color: #94a3b8;
  line-height: 1.6;
  max-width: 640px;
  margin: 0;
}

.banner-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.banner-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.banner-pill i {
  color: var(--whatsapp-green);
}

.banner-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
  z-index: 2;
}

/* WhatsApp Glowing Orb (Desktop: Grand, lumineux et imposant) */
.banner-whatsapp-orb {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 18px;
  z-index: 2;
}

.whatsapp-orb-glow {
  position: absolute;
  inset: -28px;
  background: radial-gradient(circle, rgba(37, 211, 102, 0.5) 0%, rgba(18, 140, 126, 0.22) 45%, transparent 70%);
  border-radius: 50%;
  animation: orbPulse 3s ease-in-out infinite alternate;
  filter: blur(10px);
}

.whatsapp-orb-icon {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 60px;
  box-shadow: 0 10px 38px rgba(37, 211, 102, 0.58), inset 0 3px 6px rgba(255, 255, 255, 0.45);
  position: relative;
  z-index: 2;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.whatsapp-orb-icon:hover {
  transform: scale(1.08) rotate(4deg);
}

@keyframes orbPulse {
  0% { transform: scale(0.92); opacity: 0.65; }
  100% { transform: scale(1.12); opacity: 0.95; }
}

/* Primary Action Buttons */
.btn-primary-glow {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--whatsapp-green);
  color: #080c14;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.4);
  transition: all var(--transition-normal);
}

.btn-primary-glow:hover {
  background: var(--whatsapp-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(37, 211, 102, 0.6);
}

.btn-secondary-glass {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(16, 23, 38, 0.7);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

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

/* KPI Cards Grid (4 Columns) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.kpi-card {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 145px;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background var(--transition-normal);
}

.kpi-card:hover::before {
  background: linear-gradient(90deg, transparent, var(--whatsapp-green), transparent);
}

.kpi-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.kpi-icon-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.kpi-icon-green {
  background: rgba(37, 211, 102, 0.12);
  color: var(--whatsapp-green);
  border: 1px solid rgba(37, 211, 102, 0.25);
}

.kpi-icon-purple {
  background: rgba(139, 92, 246, 0.12);
  color: var(--purple);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.kpi-icon-cyan {
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.kpi-icon-amber {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.kpi-value {
  font-family: var(--font-heading);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.kpi-badge-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--whatsapp-green);
}

.kpi-badge-trend.trend-down {
  color: var(--rose);
}

.kpi-note {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Chart & Analytics Row */
.chart-payment-row {
  display: grid;
  grid-template-columns: 1.85fr 1.15fr;
  gap: 18px;
}

.chart-card {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
}

.card-top-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-heading {
  font-size: 16.5px;
  font-weight: 700;
  margin-bottom: 3px;
}

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

.chart-filter-pills {
  display: flex;
  background: rgba(8, 12, 20, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.chart-pill-btn {
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.chart-pill-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-weight: 700;
}

.chart-legend-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
  font-size: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-dot-green {
  background: var(--whatsapp-green);
  box-shadow: 0 0 8px var(--whatsapp-green);
}

.legend-dot-purple {
  background: var(--purple);
  box-shadow: 0 0 8px var(--purple);
}

.chart-canvas-container {
  position: relative;
  width: 100%;
  height: 250px;
}

/* Payment Methods Breakdown Card */
.payment-card {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
}

.payment-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.payment-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.payment-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.payment-item-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.payment-item-brand i {
  font-size: 14px;
}

.payment-item-stats {
  font-size: 12.5px;
  color: var(--text-secondary);
}

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

.payment-progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
}

.bar-cyan { background: var(--cyan); }
.bar-orange { background: #f97316; }
.bar-purple { background: var(--purple); }
.bar-yellow { background: var(--amber); }

/* Communications & Activités Row (Recadrage parfait 2 colonnes équilibrées) */
.overview-comms-row {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 18px;
  margin-top: 24px;
  align-items: stretch;
}

.mobile-recent-chats-card {
  display: flex;
  flex-direction: column;
  margin-top: 0;
  padding: 22px 24px;
  height: auto;
}

.activity-shortcuts-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
}

.activity-feed-card {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  height: auto;
  overflow: visible;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  overflow: visible;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: background var(--transition-fast);
}

.activity-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.activity-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.activity-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.activity-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.45;
  word-break: break-word;
}

.activity-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Shortcuts Card (Pleine largeur ergonomique, sans débordement) */
.shortcuts-card {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  margin-top: 20px;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.shortcut-action-tile {
  background: rgba(8, 12, 20, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: left;
}

.shortcut-action-tile:hover {
  background: rgba(22, 33, 54, 0.8);
  border-color: rgba(37, 211, 102, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.shortcut-action-tile i {
  font-size: 20px;
  margin-bottom: 6px;
}

.shortcut-tile-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-primary);
}

.shortcut-tile-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Table Card: Dernières Interactions IA */
.table-card {
  padding: 22px 24px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 14px;
}

.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  font-size: 13px;
  min-width: 620px;
}

.custom-table th {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 8px 16px;
  text-align: left;
}

.custom-table td {
  padding: 13px 16px;
  background: rgba(8, 12, 20, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  vertical-align: middle;
}

.custom-table tr td:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.03);
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 600;
}

.custom-table tr td:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.03);
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}

.custom-table tr:hover td {
  background: rgba(22, 33, 54, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   GLOBAL BADGES & AFFILIATE REFERRALS SECTION
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.badge-purple {
  background: rgba(168, 85, 247, 0.15) !important;
  color: #c084fc !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
}

.badge-green {
  background: rgba(37, 211, 102, 0.15) !important;
  color: var(--whatsapp-green) !important;
  border: 1px solid rgba(37, 211, 102, 0.3) !important;
}

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

/* =============================================================================
   AFFILIATION VIEW (Desktop & Mobile Pixel-Perfect Framing)
   ============================================================================= */

/* KPI Grid for Affiliation */
.aff-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.aff-kpi-card {
  background: rgba(13, 20, 36, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.aff-kpi-card:hover {
  border-color: rgba(37, 211, 102, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.aff-kpi-card .kpi-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.aff-kpi-card .kpi-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.aff-kpi-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.aff-kpi-card .kpi-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.aff-kpi-sub {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 400;
  line-height: 1.25;
}

.aff-kpi-card .kpi-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.aff-kpi-card .kpi-value {
  font-size: 23px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.aff-kpi-card .kpi-badge-trend {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.aff-trend-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.aff-trend-green {
  background: rgba(37, 211, 102, 0.15);
  color: var(--whatsapp-green);
  border: 1px solid rgba(37, 211, 102, 0.3);
}

.aff-trend-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.aff-trend-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Info Callout Banner */
.aff-info-banner {
  background: linear-gradient(135deg, rgba(8, 24, 20, 0.8), rgba(12, 22, 38, 0.85));
  border: 1px solid rgba(37, 211, 102, 0.28);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.aff-info-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(37, 211, 102, 0.14);
  color: var(--whatsapp-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 1px solid rgba(37, 211, 102, 0.3);
}

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

.aff-info-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.aff-info-desc {
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0;
}

.aff-info-desc strong {
  color: #ffffff;
  font-weight: 600;
}

.aff-info-desc em {
  color: #fbbf24;
  font-style: normal;
  font-weight: 600;
}

.aff-history-panel {
  padding: 24px;
}

.aff-history-top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.aff-calc-badge {
  font-size: 12px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 211, 102, 0.08);
  border: 1px solid rgba(37, 211, 102, 0.25);
  padding: 4px 10px;
  border-radius: 8px;
}

.affiliate-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.affiliate-cards-mobile-view {
  display: none;
}

.aff-referral-card {
  background: rgba(16, 25, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 15px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.aff-referral-card:hover {
  border-color: rgba(37, 211, 102, 0.3);
}

.aff-card-trial {
  border-left: 3px solid rgba(245, 158, 11, 0.7) !important;
}

.aff-card-paid {
  border-left: 3px solid rgba(37, 211, 102, 0.8) !important;
}

.aff-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.aff-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.aff-avatar {
  width: 34px !important;
  height: 34px !important;
  font-size: 12px !important;
  background: rgba(37, 211, 102, 0.16) !important;
  color: var(--whatsapp-green) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700 !important;
  flex-shrink: 0 !important;
  border: 1px solid rgba(37, 211, 102, 0.3) !important;
}

.aff-user-name {
  font-weight: 700;
  font-size: 13.5px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aff-user-date {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.aff-card-details {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
  margin-top: 6px;
}

.aff-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
}

.aff-detail-label {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.aff-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(8, 14, 24, 0.65);
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.aff-grid-col {
  display: flex;
  flex-direction: column;
}

.aff-comm-col {
  text-align: right;
  align-items: flex-end;
}

.aff-mini-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 3px;
}

.aff-pay-amount {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.aff-comm-amount {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.aff-comm-positive {
  color: var(--whatsapp-green) !important;
}

.aff-comm-zero {
  color: var(--text-muted) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

.aff-trial-notice {
  margin-top: 10px;
  padding: 7px 10px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  font-size: 11px;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.35;
}

.aff-empty-state-mobile {
  text-align: center;
  padding: 24px 14px;
  background: rgba(16, 25, 42, 0.5);
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}


/* ==========================================================================
   VIEW: INBOX (#inbox)
   ========================================================================== */
.inbox-layout {
  display: flex;
  height: calc(100vh - var(--header-height) - 60px);
  min-height: 580px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

/* Left Conversations List */
.inbox-sidebar {
  width: 320px;
  min-width: 300px;
  border-right: 1px solid var(--border-subtle);
  background: rgba(11, 17, 30, 0.75);
  display: flex;
  flex-direction: column;
}

.inbox-search-header {
  padding: 16px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.search-input-wrap i {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.search-input-wrap input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  font-size: 12.5px;
}

.inbox-tabs {
  display: flex;
  gap: 4px;
}

.inbox-tab-btn {
  flex: 1;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  color: var(--text-muted);
  text-align: center;
  transition: all var(--transition-fast);
}

.inbox-tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.inbox-conversation-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.conv-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.conv-item.active {
  background: rgba(37, 211, 102, 0.08);
  border-left: 3px solid var(--whatsapp-green);
}

.conv-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.conv-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--whatsapp-green);
  border: 2px solid var(--bg-sidebar);
}

.conv-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.conv-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.conv-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-time {
  font-size: 11px;
  color: var(--text-muted);
}

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

.conv-preview {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right Chat Area */
.btn-chat-back {
  display: none;
}

.inbox-chat-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(8, 12, 20, 0.6);
  position: relative;
}

.chat-header {
  height: 64px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 17, 30, 0.8);
}

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

.chat-contact-title {
  font-weight: 700;
  font-size: 14.5px;
}

.chat-contact-phone {
  font-size: 12px;
  color: var(--text-muted);
}

.chat-mode-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-mode-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.3);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--whatsapp-green);
}

/* Chat Messages Stream */
.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.message-bubble {
  max-width: 65%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.45;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message-bubble.incoming {
  align-self: flex-start;
  background: rgba(22, 33, 54, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top-left-radius: 2px;
  color: var(--text-primary);
}

.message-bubble.outgoing {
  align-self: flex-end;
  background: #005c4b;
  border: 1px solid rgba(37, 211, 102, 0.25);
  border-top-right-radius: 2px;
  color: #fff;
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.6);
}

.double-tick {
  color: var(--cyan);
}

/* Quick Replies Suggestions Bar */
.chat-quick-actions {
  padding: 8px 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.quick-chip {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.quick-chip:hover {
  background: rgba(37, 211, 102, 0.15);
  border-color: rgba(37, 211, 102, 0.35);
  color: var(--whatsapp-green);
}

/* Chat Input Bar */
.chat-input-bar {
  padding: 12px 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(11, 17, 30, 0.9);
}

.chat-input-bar input {
  flex: 1;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
}

.btn-send-msg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--whatsapp-green);
  color: #0b111e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: transform var(--transition-fast);
}

.btn-send-msg:hover {
  transform: scale(1.06);
}

/* ==========================================================================
   VIEW: AI AGENT (#ai-agent)
   ========================================================================== */
.agent-config-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.form-label {
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  padding: 10px 14px;
  font-size: 13.5px;
}

.form-control-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

.tag-selector-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-select-btn {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
  user-select: none;
}

.tag-select-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.tag-select-btn.active {
  background: rgba(37, 211, 102, 0.15) !important;
  border-color: var(--whatsapp-green) !important;
  color: var(--whatsapp-green) !important;
  font-weight: 600 !important;
  box-shadow: 0 0 10px rgba(37, 211, 102, 0.25);
}

.tag-select-btn.active {
  background: rgba(37, 211, 102, 0.15);
  border-color: var(--whatsapp-green);
  color: var(--whatsapp-green);
  font-weight: 600;
}

/* Switch Toggle Component */
.switch-control {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.12);
  transition: .3s;
  border-radius: 24px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.switch-control input:checked + .switch-slider {
  background-color: var(--whatsapp-green);
}

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

/* ==========================================================================
   VIEW: BROADCAST & AUTOMATIONS & CRM (#broadcast, #automations, #contacts, #templates, #devices, #integrations, #analytics, #settings)
   ========================================================================== */
/* Section Top Bar */
.section-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-title-wrap {
  flex: 1;
}

.section-title-wrap h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.section-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.section-actions-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.contacts-filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.contacts-search-wrap {
  flex: 1;
  min-width: 260px;
}

.filter-pills-scroll {
  display: flex;
  gap: 6px;
}

/* Automation Card Grid */
.automations-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.auto-card {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auto-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

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

.auto-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: rgba(37, 211, 102, 0.1);
  color: var(--whatsapp-green);
  border: 1px solid rgba(37, 211, 102, 0.25);
}

.auto-stats-row {
  display: flex;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin: 14px 0;
}

.auto-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auto-stat-val {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
}

.auto-stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
}

/* Integrations Grid & High-End FinTech Cards */
.integrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.integ-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.integ-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 20px rgba(37, 211, 102, 0.08);
}

.integ-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.integ-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.integ-brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.integ-logo-brand {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.integ-card:hover .integ-logo-brand {
  transform: scale(1.05);
}

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

.integ-name {
  font-size: 15.5px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 5px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.integ-country-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.integ-country-pill {
  font-size: 10.5px;
  padding: 1.5px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.06);
  letter-spacing: 0.2px;
}

.integ-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.2px;
}

.integ-status-badge.active {
  background: rgba(37, 211, 102, 0.12);
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.3);
}

.integ-status-badge.inactive {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.pulse-dot-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  animation: pulse-dot-anim 2s infinite;
}

@keyframes pulse-dot-anim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(37, 211, 102, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.gray-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
}

.integ-desc {
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 14px 0;
  min-height: 38px;
}

.integ-credentials-box {
  background: rgba(4, 7, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  padding: 11px 13px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease;
}

.integ-credentials-box:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.integ-cred-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 7px;
}

.integ-cred-val-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.integ-cred-number {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  letter-spacing: 0.3px;
}

.integ-cred-beneficiary {
  font-size: 11.5px;
  font-weight: 600;
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}

.btn-copy-quick {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.btn-copy-quick:hover {
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.3);
}

.integ-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

.integ-ai-active-pill {
  font-size: 11.5px;
  font-weight: 600;
  color: #25d366;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.integ-ai-paused-pill {
  font-size: 11.5px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-config-integ {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-config-integ:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Meta Templates Cards */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.template-card {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.template-bubble-preview {
  background: #005c4b;
  border-radius: var(--radius-md);
  border-top-right-radius: 2px;
  padding: 14px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #fff;
  border: 1px solid rgba(37, 211, 102, 0.2);
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: rgba(13, 20, 36, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-normal);
}

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

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

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close-btn {
  font-size: 18px;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

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

.modal-body {
  padding: 24px;
}

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

/* QR Code Modal High-Tech Styling */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.qr-code-box {
  width: 220px;
  height: 220px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(37, 211, 102, 0.25);
  position: relative;
  overflow: hidden;
}

.qr-scan-beam {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--whatsapp-green);
  box-shadow: 0 0 10px var(--whatsapp-green);
  animation: scan-line 2.5s ease-in-out infinite alternate;
}

@keyframes scan-line {
  0% { top: 4%; }
  100% { top: 96%; }
}

.qr-instructions-list {
  text-align: left;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  width: 100%;
}

/* ==========================================================================
   RESPONSIVE MOBILE BREAKPOINTS (320px, 360px, 390px, 414px, 768px, 1024px)
   ========================================================================== */
@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chart-payment-row {
    grid-template-columns: 1fr;
  }

  .overview-comms-row {
    grid-template-columns: 1fr;
  }

  .activity-shortcuts-row {
    grid-template-columns: 1fr;
  }

  .shortcuts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .integrations-grid, .templates-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .agent-config-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile & Tablet Portrait Breakpoint */
@media (max-width: 768px) {
  /* Sidebar becomes Off-Canvas Drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 310px;
    max-width: 86vw;
    height: 100dvh;
    background: #0d1424;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    box-shadow: 15px 0 45px rgba(0, 0, 0, 0.85);
    z-index: 1050;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

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

  .sidebar-close-btn {
    display: flex;
  }

  .mobile-menu-btn {
    display: flex;
  }

  /* Utilities incorporated inside mobile drawer */
  .sidebar-mobile-utilities {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background: rgba(13, 20, 36, 0.75);
    border-bottom: 1px solid var(--border-subtle);
  }

  .sidebar-status-card {
    background: rgba(37, 211, 102, 0.06);
    border: 1px solid rgba(37, 211, 102, 0.25);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .sidebar-status-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .sidebar-status-title {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .sidebar-status-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
  }

  .sidebar-status-phone i {
    color: var(--whatsapp-green);
    font-size: 14px;
  }

  .sidebar-search-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: all var(--transition-fast);
  }

  .sidebar-search-btn:active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(37, 211, 102, 0.35);
  }

  .sidebar-search-shortcut {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.08);
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    color: var(--text-secondary);
  }

  .sidebar-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .sidebar-currency-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .sidebar-currency-label {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 600;
  }

  .sidebar-public-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
  }

  .sidebar-public-btn:active {
    color: var(--whatsapp-green);
    border-color: rgba(37, 211, 102, 0.4);
  }

  /* Header Clean Mobile Layout - Zero Overlap */
  .top-header {
    padding: 0 14px;
    height: 60px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }

  .desktop-header-title {
    display: none !important;
  }

  .header-mobile-greeting {
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
  }

  .header-mobile-avatar-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.25), rgba(6, 182, 212, 0.25));
    border: 2px solid rgba(37, 211, 102, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--whatsapp-green);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    overflow: hidden;
    transition: transform var(--transition-fast);
  }

  .header-mobile-avatar-btn:active {
    transform: scale(0.95);
  }

  .header-mobile-avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .header-mobile-greeting-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
  }

  .greeting-user-line {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14.5px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .greeting-user-line strong {
    font-weight: 700;
  }

  .greeting-verified-check {
    color: #25d366;
    font-size: 13.5px;
    filter: drop-shadow(0 0 5px rgba(37, 211, 102, 0.6));
    flex-shrink: 0;
  }

  .greeting-user-subtitle {
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-brand-icon {
    display: none;
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  /* Cache les boutons encombrants du header sur mobile (intégrés dans le tiroir latéral) */
  .header-search-btn,
  .status-connected-pill,
  .currency-switcher,
  .header-link-btn {
    display: none !important;
  }

  .header-icon-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
  }

  .notification-badge-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #080c14;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  /* Mobile Plan Badge : Compact Circular Crown by default */
  .header-plan-badge {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    padding: 0 !important;
    gap: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(37, 211, 102, 0.15)) !important;
    border: 1.5px solid rgba(245, 158, 11, 0.55) !important;
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.25) !important;
  }

  .header-plan-badge .crown-icon-wrap {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
  }

  .header-plan-badge .crown-icon-wrap i {
    color: #f59e0b !important;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.7));
  }

  .header-plan-badge .plan-badge-mini {
    max-width: 0 !important;
    opacity: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    border: none !important;
    white-space: nowrap !important;
    transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.35s ease, margin 0.35s ease !important;
  }

  /* Au clic sur le bouton couronne sur mobile, le texte se déploie avec animation fluide ("ça sort") */
  .header-plan-badge.expanded {
    width: auto !important;
    max-width: 280px !important;
    border-radius: 20px !important;
    padding: 0 12px 0 8px !important;
    gap: 6px !important;
    border-color: #f59e0b !important;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.45) !important;
    animation: badgeExpandPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .header-plan-badge.expanded .plan-badge-mini {
    max-width: 220px !important;
    opacity: 1 !important;
    padding: 3px 8px !important;
    margin-left: 2px !important;
    pointer-events: auto !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    background: rgba(245, 158, 11, 0.2) !important;
    color: #f59e0b !important;
    font-size: 10.5px !important;
    font-weight: 800 !important;
  }

  @keyframes badgeExpandPop {
    0% { transform: scale(0.92); }
    60% { transform: scale(1.04); }
    100% { transform: scale(1); }
  }

  .notifications-dropdown-menu {
    position: fixed !important;
    top: 68px !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
  }

  .header-user-avatar-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.2), rgba(6, 182, 212, 0.2));
    border: 1px solid rgba(37, 211, 102, 0.35);
    color: var(--whatsapp-green);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
    transition: all var(--transition-fast);
  }

  .header-user-avatar-mobile:active {
    background: rgba(37, 211, 102, 0.3);
    border-color: var(--whatsapp-green);
    transform: scale(0.96);
  }

  /* Section Header Bar Mobile: Pleine largeur et boutons organises */
  .section-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 20px;
  }

  .section-title-wrap {
    width: 100%;
  }

  .section-title-wrap h2 {
    font-size: 19px;
    line-height: 1.25;
    margin-bottom: 6px;
  }

  .section-desc {
    font-size: 13px;
    line-height: 1.45;
  }

  .section-header-bar .btn-primary-glow,
  .section-header-bar .btn-secondary-glass {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
    font-size: 13.5px;
    font-weight: 600;
  }

  .section-actions-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  /* Boîte de Réception WhatsApp Mobile (Expérience fluide de type WhatsApp Mobile) */
  .inbox-layout {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 145px);
    min-height: 520px;
    max-height: calc(100vh - 145px);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    background: var(--bg-card);
  }

  .inbox-sidebar {
    width: 100%;
    min-width: unset;
    height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .inbox-chat-pane {
    display: none;
    width: 100%;
    height: 100%;
    flex: 1;
    flex-direction: column;
    background: #090e1a;
  }

  .inbox-layout.chat-open .inbox-sidebar {
    display: none;
  }

  .inbox-layout.chat-open .inbox-chat-pane {
    display: flex;
  }

  .btn-chat-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 4px;
    transition: all var(--transition-fast);
  }

  .btn-chat-back:active {
    background: rgba(37, 211, 102, 0.2);
    color: var(--whatsapp-green);
  }

  .chat-header {
    height: 60px;
    padding: 0 12px;
    gap: 8px;
    background: rgba(11, 17, 30, 0.95);
  }

  .chat-contact-info {
    gap: 8px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }

  .chat-contact-meta {
    min-width: 0;
    overflow: hidden;
  }

  .chat-contact-title {
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .chat-contact-phone {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .chat-mode-toggle {
    gap: 6px;
    flex-shrink: 0;
  }

  .chat-mode-badge {
    padding: 4px 8px;
    font-size: 11px;
    gap: 4px;
  }

  .chat-messages-container {
    padding: 12px;
    gap: 10px;
    flex: 1;
  }

  .message-bubble {
    max-width: 86%;
    font-size: 13px;
    padding: 8px 12px;
  }

  .chat-quick-actions {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    scrollbar-width: none;
  }

  .chat-quick-actions::-webkit-scrollbar {
    display: none;
  }

  .quick-chip {
    flex-shrink: 0;
    font-size: 11.5px;
    padding: 5px 10px;
  }

  .chat-input-bar {
    padding: 8px 12px;
    gap: 8px;
  }

  .chat-input-bar input {
    font-size: 13px;
    padding: 8px 12px;
  }

  /* Ton de communication Agent IA sur mobile */
  .tag-selector-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tag-select-btn {
    width: 100%;
    text-align: center;
    padding: 10px 14px;
    font-size: 13px;
  }

  /* Filtres CRM et Contacts sur mobile */
  .contacts-filter-bar {
    flex-direction: column;
    gap: 10px;
  }

  .contacts-search-wrap {
    width: 100%;
    min-width: unset;
  }

  .filter-pills-scroll {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-pills-scroll::-webkit-scrollbar {
    display: none;
  }

  .filter-pills-scroll .tag-select-btn {
    flex-shrink: 0;
  }

  /* Cartes et Tables Mobile */
  .glass-panel {
    padding: 16px !important;
  }

  .table-card {
    padding: 14px !important;
  }

  .table-responsive {
    margin-top: 10px;
    border-radius: var(--radius-sm);
  }

  /* Main body padding pour la barre de navigation inférieure mobile */
  .main-body-content {
    padding: 14px 12px calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Banner Mobile - Conforme au modèle smartphone VENDIA AI */
  .overview-banner {
    position: relative;
    overflow: hidden;
    border-radius: 20px !important;
    padding: 18px 16px !important;
    background: radial-gradient(circle at 85% 35%, rgba(37, 211, 102, 0.22) 0%, rgba(13, 148, 136, 0.12) 40%, rgba(10, 18, 30, 0.95) 75%), #0c1524 !important;
    border: 1px solid rgba(37, 211, 102, 0.28) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
  }

  .overview-banner .banner-left {
    position: relative;
    z-index: 2;
    max-width: 68%;
  }

  .banner-tag-pill {
    display: inline-flex;
    align-items: center;
    margin-bottom: 6px;
  }

  .banner-tag-title {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-shadow: 0 0 12px rgba(37, 211, 102, 0.4);
  }

  .banner-tag-dot {
    display: none;
  }

  .overview-banner .banner-title {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: #cbd5e1 !important;
    margin: 0 0 12px 0 !important;
  }

  .overview-banner .banner-subtitle,
  .overview-banner .banner-badges-row,
  .overview-banner #btn-banner-broadcast {
    display: none !important;
  }

  .btn-banner-automations {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    background: #25d366 !important;
    color: #080c14 !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    padding: 8px 16px !important;
    border-radius: 999px !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4) !important;
    width: auto !important;
    text-decoration: none;
  }

  .btn-banner-automations i:first-child {
    display: none;
  }

  .banner-whatsapp-orb {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
  }

  .whatsapp-orb-glow {
    position: absolute;
    inset: -12px;
    background: radial-gradient(circle, rgba(37, 211, 102, 0.45) 0%, transparent 70%);
    border-radius: 50%;
    animation: orbPulse 3s ease-in-out infinite alternate;
  }

  .whatsapp-orb-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366, #128c7e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 32px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.4);
    position: relative;
    z-index: 2;
  }

  /* Grille des 4 Cartes KPI Mobile (fidèle au smartphone) */
  .kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
  }

  .kpi-card {
    padding: 10px 8px !important;
    border-radius: 14px !important;
    background: rgba(13, 20, 36, 0.72) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 112px !important;
  }

  .kpi-card .kpi-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 4px;
  }

  .kpi-card .kpi-icon-box {
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .kpi-card .kpi-title {
    font-size: 9.5px !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    min-height: 23px;
  }

  .kpi-card .kpi-value-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .kpi-card .kpi-value {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    line-height: 1.1 !important;
    letter-spacing: -0.02em;
  }

  .kpi-card .kpi-badge-trend {
    font-size: 9.5px !important;
    color: #25d366 !important;
    font-weight: 600 !important;
    background: transparent !important;
    padding: 0 !important;
    margin-top: 2px;
  }

  .kpi-card .kpi-note {
    display: none !important;
  }

  /* Évolution des Ventes (Chart) */
  .chart-payment-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .chart-card {
    border-radius: 18px !important;
    padding: 16px !important;
    background: rgba(13, 20, 36, 0.72) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
  }

  .chart-card .card-top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
  }

  .chart-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .chart-card .card-heading {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
  }

  .chart-card .card-subheading,
  .chart-legend-row {
    display: none !important;
  }

  .chart-filter-pills .chart-pill-btn:not(.active) {
    display: none !important;
  }

  .chart-filter-pills .chart-pill-btn.active {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 999px !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
    color: #cbd5e1 !important;
    font-weight: 500 !important;
  }

  .chart-canvas-container {
    height: 185px !important;
  }

  /* Masque les blocs de second plan sur mobile overview */
  .payment-card,
  .activity-shortcuts-row {
    display: none !important;
  }

  /* Conversations Récentes Mobile */
  .mobile-recent-chats-card {
    border-radius: 18px !important;
    padding: 16px !important;
    background: rgba(13, 20, 36, 0.72) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    margin-top: 14px !important;
  }

  .recent-chats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .chats-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .chats-icon-badge {
    color: #25d366;
    font-size: 16px;
    display: flex;
    align-items: center;
  }

  .recent-chats-header .card-heading {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
  }

  .see-all-chats-link {
    color: #06b6d4;
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
  }

  .mobile-chat-row {
    padding: 10px 0 !important;
    gap: 12px !important;
  }

  .mobile-chat-avatar-wrap {
    width: 42px !important;
    height: 42px !important;
  }

  .mobile-chat-avatar,
  .mobile-chat-avatar-fallback {
    width: 42px !important;
    height: 42px !important;
  }

  .mobile-chat-name {
    font-size: 13.5px !important;
  }

  .mobile-chat-time {
    font-size: 10.5px !important;
  }

  .mobile-chat-preview {
    font-size: 12px !important;
    max-width: 190px !important;
  }

  .mobile-unread-badge {
    min-width: 18px !important;
    height: 18px !important;
    font-size: 10px !important;
  }

  /* Barre de Navigation Mobile Inférieure (Bottom Bar) */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(8, 12, 20, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: space-around;
    padding: 0 6px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 10px;
    font-weight: 500;
    gap: 3px;
    cursor: pointer;
    padding: 6px 12px;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav-btn i {
    font-size: 17px;
    transition: transform 0.2s ease, color 0.2s ease;
  }

  .mobile-nav-btn.active {
    color: #25d366;
    font-weight: 600;
  }

  .mobile-nav-btn.active i {
    color: #25d366;
    transform: translateY(-1px);
    filter: drop-shadow(0 0 6px rgba(37, 211, 102, 0.4));
  }

  .mobile-nav-icon-wrap {
    position: relative;
    display: inline-flex;
  }

  .mobile-nav-badge {
    position: absolute;
    top: -3px;
    right: -6px;
    background: #25d366;
    color: #080c14;
    font-size: 8.5px;
    font-weight: 800;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #080c14;
  }

  /* Center Elevated FAB Button (+) */
  .mobile-nav-fab {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366, #10b981);
    color: #080c14;
    border: 3.5px solid #080c14;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    transform: translateY(-14px);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    flex-shrink: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav-fab:active {
    transform: translateY(-11px) scale(0.94);
    box-shadow: 0 2px 10px rgba(37, 211, 102, 0.7);
  }

  /* Floating WhatsApp Pulse Button masqué sur mobile car remplacé par la Bottom Bar */
  .whatsapp-float-btn {
    display: none !important;
  }

  .integrations-grid, .templates-grid {
    grid-template-columns: 1fr;
  }

  .shortcuts-grid {
    grid-template-columns: 1fr;
  }
}

/* Extra small mobile (320px - 390px) */
@media (max-width: 400px) {
  .header-title {
    font-size: 15px;
  }

  .currency-switcher {
    display: none;
  }

  .banner-title {
    font-size: 18px;
  }

  .kpi-value {
    font-size: 22px;
  }
}

/* ==============================================================================
   RESPONSIVE SETTINGS ADMIN PROFILE CARD (Mobile Reframing)
   ============================================================================== */
@media (max-width: 680px) {
  .settings-profile-card {
    padding: 18px 16px !important;
    margin-bottom: 18px !important;
  }

  .settings-profile-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
  }

  .settings-profile-header-text {
    width: 100%;
  }

  .btn-edit-profile-action {
    width: 100% !important;
    justify-content: center !important;
    padding: 10px 16px !important;
    font-size: 13.5px !important;
    white-space: nowrap !important;
  }

  .settings-profile-body {
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
  }

  .settings-profile-avatar {
    width: 68px !important;
    height: 68px !important;
    margin: 0 auto !important;
  }

  .settings-profile-fields-grid {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 14px 16px;
  }

  .settings-profile-field-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 9px;
  }

  .settings-profile-field-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  #settings-display-email {
    word-break: break-all;
  }
}

@media (max-width: 420px) {
  .settings-profile-card {
    padding: 16px 14px !important;
  }

  .settings-profile-card .card-heading {
    font-size: 15.5px;
  }

  .btn-edit-profile-action {
    font-size: 13px !important;
    padding: 9px 14px !important;
  }
}

/* ==============================================================================
   RESPONSIVE DEVICES VIEW (#view-devices) (Mobile Reframing)
   ============================================================================== */
@media (max-width: 680px) {
  .devices-header-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .devices-action-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
  }

  #wa-limit-status {
    white-space: nowrap !important;
    font-size: 13px !important;
    padding: 6px 12px !important;
    flex-shrink: 0 !important;
  }

  #btn-add-whatsapp-num {
    flex: 1 !important;
    justify-content: center !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }

  .devices-cards-grid {
    grid-template-columns: 1fr !important;
  }

  .device-active-card {
    padding: 18px 16px !important;
  }

  .device-card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  .device-card-info {
    width: 100% !important;
  }

  .device-card-badge {
    white-space: nowrap !important;
    width: fit-content !important;
    font-size: 11.5px !important;
    padding: 4px 10px !important;
  }

  .device-spec-item {
    font-size: 12.5px !important;
    gap: 6px !important;
  }

  .device-spec-item strong {
    text-align: right;
  }

  .device-card-actions button {
    font-size: 13px !important;
    padding: 9px 10px !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 380px) {
  .devices-action-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #wa-limit-status {
    text-align: center !important;
  }

  #btn-add-whatsapp-num {
    width: 100% !important;
  }

  .device-spec-item {
    font-size: 11.5px !important;
  }

  .device-card-actions {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .device-card-actions button {
    width: 100% !important;
  }
}

/* =============================================================================
   FORFAITS & ABONNEMENT + PROGRAMME PARTENAIRES (STYLE COMPLET VANDIA AI)
   ============================================================================= */

/* 1. Header & Sidebar Upgrade CTA Buttons */
.header-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(37, 211, 102, 0.14));
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #ffffff;
  padding: 0 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  outline: none;
}

.header-plan-badge:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(37, 211, 102, 0.22));
  border-color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.crown-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  transition: transform 0.25s ease;
}

.crown-icon-wrap i {
  color: #f59e0b;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
}

.header-plan-badge:hover .crown-icon-wrap {
  transform: rotate(-10deg) scale(1.15);
}

.plan-badge-mini {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================================================
   NOTIFICATIONS SYSTEM & DROPDOWN (VANDIAS AI)
   ============================================================================= */
.notifications-dropdown-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notifications-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-width: 92vw;
  background: rgba(13, 20, 36, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(37, 211, 102, 0.1);
  z-index: 1050;
  overflow: hidden;
  animation: notifDropdownIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

@keyframes notifDropdownIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.notif-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.notif-badge-pill {
  background: rgba(37, 211, 102, 0.2);
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.4);
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}

.btn-mark-all-read {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-mark-all-read:hover {
  color: #25d366;
  background: rgba(37, 211, 102, 0.1);
}

.notif-dropdown-body {
  max-height: 380px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notif-dropdown-body::-webkit-scrollbar {
  width: 5px;
}
.notif-dropdown-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
  cursor: pointer;
  position: relative;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.notif-item.unread {
  background: rgba(37, 211, 102, 0.06);
}

.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3.5px;
  border-radius: 0 4px 4px 0;
  background: #25d366;
  box-shadow: 0 0 8px #25d366;
}

.notif-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}

.notif-title {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item.unread .notif-title {
  color: #ffffff;
}

.notif-time {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  flex-shrink: 0;
}

.notif-body {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-dropdown-footer {
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-footer-text {
  font-size: 11px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.notif-empty-box {
  padding: 32px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.notif-empty-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 18px;
}

.notif-empty-title {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
}

.notif-empty-desc {
  font-size: 11.5px;
  color: #64748b;
}

.btn-sidebar-upgrade {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(37, 211, 102, 0.45);
  color: #ffffff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sidebar-upgrade:hover {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.35), rgba(6, 182, 212, 0.35));
  border-color: var(--whatsapp-green);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

.btn-sidebar-upgrade i {
  color: #f59e0b;
}

/* 2. Billing Current Subscription Card */
.billing-current-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 26px 30px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, rgba(16, 24, 39, 0.95), rgba(6, 78, 59, 0.35)) !important;
  border: 1px solid rgba(37, 211, 102, 0.35) !important;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.billing-current-left {
  flex: 1;
}

.current-plan-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.current-plan-badge {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--whatsapp-green);
  letter-spacing: 0.3px;
}

.billing-current-title {
  font-size: 21px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.3;
}

.billing-current-subtitle {
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.55;
  max-width: 680px;
  margin-bottom: 18px;
}

.billing-stats-pills {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.billing-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  color: #cbd5e1;
}

.billing-pill i {
  color: var(--whatsapp-green);
  font-size: 13px;
}

.billing-current-right {
  flex-shrink: 0;
}

/* 3. Billing Toggle Frequency */
.pricing-toggle-wrap-dashboard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 32px 0 24px 0;
  padding: 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.pricing-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

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

.pricing-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.3s;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pricing-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.pricing-switch input:checked + .pricing-slider {
  background-color: var(--whatsapp-green);
}

.pricing-switch input:checked + .pricing-slider:before {
  transform: translateX(24px);
}

.toggle-freq-lbl {
  font-size: 13.5px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.2s ease;
  user-select: none;
}

.toggle-freq-lbl.active {
  color: #ffffff;
  font-weight: 700;
}

/* 4. Billing Plans Grid */
.billing-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 32px;
}

.plan-tier-card {
  padding: 28px 24px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  background: rgba(13, 20, 31, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.plan-tier-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 211, 102, 0.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.plan-tier-featured {
  background: linear-gradient(180deg, rgba(37, 211, 102, 0.08) 0%, rgba(13, 22, 33, 0.95) 100%) !important;
  border: 2px solid var(--whatsapp-green) !important;
  box-shadow: 0 12px 35px rgba(37, 211, 102, 0.15) !important;
  transform: scale(1.02);
}

.plan-tier-featured:hover {
  transform: scale(1.02) translateY(-4px);
  box-shadow: 0 16px 40px rgba(37, 211, 102, 0.25) !important;
}

.featured-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--whatsapp-green);
  color: #080c14;
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.plan-tier-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.plan-tier-name {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.plan-tier-emoji {
  font-size: 22px;
}

.plan-tier-summary {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.45;
  min-height: 38px;
  margin-bottom: 16px;
}

.plan-tier-price-box {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.dash-plan-price {
  font-size: 34px;
  font-weight: 800;
  color: #ffffff;
}

.dash-plan-curr {
  font-size: 16px;
  font-weight: 700;
  color: var(--whatsapp-green);
}

.dash-plan-freq {
  font-size: 13px;
  color: #64748b;
}

.plan-tier-price-sub {
  font-size: 12px;
  color: #64748b;
  display: block;
  margin-top: 4px;
}

.plan-tier-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
}

.plan-tier-features li {
  font-size: 13px;
  color: #cbd5e1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.plan-tier-features li i {
  color: var(--whatsapp-green);
  font-size: 12.5px;
  margin-top: 3px;
  flex-shrink: 0;
}

.btn-tier-select {
  width: 100%;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* 5. Affiliate Program View (Image 1 replica inside dashboard) */
.partner-banner-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  background: linear-gradient(135deg, rgba(8, 20, 16, 0.98), rgba(12, 28, 22, 0.95)) !important;
  border: 1px solid rgba(37, 211, 102, 0.35) !important;
  border-radius: 20px;
  padding: 34px 38px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.partner-banner-left {
  flex: 1;
  max-width: 60%;
}

.partner-banner-right {
  flex: 0 0 35%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-tag-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.35);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.partner-tag-text {
  font-size: 11px;
  font-weight: 800;
  color: var(--whatsapp-green);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.partner-title {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 12px;
}

.partner-desc {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 18px;
}

.partner-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.partner-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: #e2e8f0;
}

.partner-checklist li i {
  color: var(--whatsapp-green);
  font-size: 15px;
}

.passive-income-box {
  background: rgba(13, 20, 28, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.passive-income-coins {
  margin-bottom: 14px;
}

.gold-coins-glow {
  font-size: 44px;
  color: #f59e0b;
  filter: drop-shadow(0 0 18px rgba(245, 158, 11, 0.6));
}

.passive-income-title {
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
}

.passive-income-text {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.55;
  margin: 0;
}

.affiliate-link-card {
  padding: 24px 28px;
}

.referral-link-input-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.referral-link-box {
  flex: 1;
  min-width: 280px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0 16px;
}

.referral-input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 14px;
  font-family: monospace;
  width: 100%;
  padding: 12px 0;
  outline: none;
}

.btn-copy-affiliate {
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-share-whatsapp {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

/* 6. Plan Modal (#plan-modal) */
/* 6. Plan Modal (#plan-modal) — Ultra-Premium SaaS Design & Portrait Layout */
#plan-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4, 7, 15, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px 12px;
  overflow-y: auto !important;
}

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

#plan-modal .modal-dialog {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  width: 100%;
  max-height: calc(100vh - 32px);
  margin: auto;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(180deg, #0d1527 0%, #070c18 100%);
  border: 1.5px solid rgba(37, 211, 102, 0.35);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 50px rgba(37, 211, 102, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#plan-modal .modal-header {
  padding: 16px 22px;
  background: rgba(14, 21, 37, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#plan-modal .modal-header .modal-title {
  font-size: 16.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
}

#plan-modal .modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

#plan-modal .modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transform: rotate(90deg);
}

#plan-modal #form-subscribe-plan {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#plan-modal .plan-modal-step {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#plan-modal .plan-modal-step.step-hidden {
  display: none !important;
}

#plan-modal .modal-body {
  flex: 1;
  overflow-y: auto !important;
  min-height: 0;
  padding: 18px 22px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 211, 102, 0.5) rgba(255, 255, 255, 0.06);
}

#plan-modal .modal-body::-webkit-scrollbar {
  width: 7px;
}
#plan-modal .modal-body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 999px;
  margin: 6px 0;
}
#plan-modal .modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #25D366 0%, #10b981 100%);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(37, 211, 102, 0.6);
}
#plan-modal .modal-body::-webkit-scrollbar-thumb:hover {
  background: #25D366;
}

body.modal-open-lock {
  overflow: hidden !important;
}

/* Superposition des Cartes Forfaits (Stacked Vertical Cards) */
.plan-modal-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan-select-card {
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 13px 16px;
  background: linear-gradient(180deg, rgba(20, 29, 49, 0.65) 0%, rgba(13, 19, 33, 0.85) 100%);
  backdrop-filter: blur(12px);
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.plan-select-card:hover {
  border-color: rgba(37, 211, 102, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(37, 211, 102, 0.1);
}

.plan-select-card.selected {
  border-color: var(--whatsapp-green) !important;
  background: linear-gradient(180deg, rgba(37, 211, 102, 0.12) 0%, rgba(13, 22, 34, 0.95) 100%) !important;
  box-shadow: 0 0 24px rgba(37, 211, 102, 0.22), inset 0 0 14px rgba(37, 211, 102, 0.05) !important;
}

.plan-select-card input[type="radio"] {
  display: none;
}

.plan-radio-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.25);
}

.plan-select-card.selected .plan-radio-circle {
  border-color: var(--whatsapp-green);
  background: var(--whatsapp-green);
  box-shadow: 0 0 10px rgba(37, 211, 102, 0.6);
}

.plan-radio-circle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #06150b;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.plan-select-card.selected .plan-radio-circle::after {
  opacity: 1;
}

.plan-badge-popular {
  position: absolute;
  top: -10px;
  right: 14px;
  background: linear-gradient(135deg, #25D366, #10b981);
  color: #051a0c;
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  box-shadow: 0 3px 12px rgba(37, 211, 102, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.35);
  z-index: 2;
}

.plan-select-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plan-select-left {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.plan-select-name {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.plan-select-left .badge {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.plan-select-left .badge-gray {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.plan-select-left .badge-green {
  background: rgba(37, 211, 102, 0.18);
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.38);
}

.plan-select-left .badge-purple {
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.38);
}

.plan-select-price {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 3px;
  flex-shrink: 0;
}

.plan-select-price .plan-price-amount {
  font-size: 18px;
  font-weight: 800;
  color: var(--whatsapp-green);
  line-height: 1;
  letter-spacing: -0.4px;
}

.plan-select-price .plan-price-curr {
  font-size: 12px;
  font-weight: 700;
  color: var(--whatsapp-green);
}

.plan-select-price small {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
}

.plan-select-features {
  list-style: none;
  padding: 8px 0 0 0;
  margin: 0;
  font-size: 11.5px;
  color: #cbd5e1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

@media (max-width: 520px) {
  .plan-select-features {
    grid-template-columns: 1fr;
  }
}

.plan-select-features li {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}

.plan-select-features li strong {
  color: #ffffff;
}

.plan-select-features li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--whatsapp-green);
  font-size: 9px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.14);
  border: 1px solid rgba(37, 211, 102, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Customer Contact Information in Plan Modal */
.modal-customer-info-box {
  margin-top: 18px;
  margin-bottom: 12px;
  background: rgba(16, 25, 42, 0.65);
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-customer-info-label {
  margin-bottom: 12px;
  font-size: 13px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.customer-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.customer-fields-grid:last-child {
  margin-bottom: 0;
}

.customer-field-col {
  min-width: 0;
}

/* Cycle Selector Segmented Switch */
.cycle-selector-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(11, 17, 29, 0.85);
  padding: 5px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cycle-pill {
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  transition: all 0.2s ease;
  user-select: none;
}

.cycle-pill input[type="radio"] {
  display: none;
}

.cycle-pill:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.03);
}

.cycle-pill.active {
  background: linear-gradient(180deg, rgba(37, 211, 102, 0.16) 0%, rgba(37, 211, 102, 0.06) 100%);
  border-color: rgba(37, 211, 102, 0.45);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 0 12px rgba(37, 211, 102, 0.12);
}

.cycle-pill strong {
  background: rgba(37, 211, 102, 0.18);
  color: #25d366 !important;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 6px;
  border: 1px solid rgba(37, 211, 102, 0.3);
  white-space: nowrap;
}

/* Payment Methods Grid */
.payment-methods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.pay-method-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(18, 27, 45, 0.6) 0%, rgba(12, 18, 31, 0.75) 100%);
  cursor: pointer;
  transition: all 0.2s ease;
  display: block;
}

.pay-method-card:hover {
  border-color: rgba(37, 211, 102, 0.35);
  background: rgba(22, 32, 53, 0.8);
  transform: translateY(-1px);
}

.pay-method-card input[type="radio"] {
  display: none;
}

.pay-method-card.active {
  border-color: var(--whatsapp-green) !important;
  background: linear-gradient(180deg, rgba(37, 211, 102, 0.12) 0%, rgba(12, 21, 33, 0.85) 100%) !important;
  box-shadow: 0 0 18px rgba(37, 211, 102, 0.15);
}

.pay-method-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.pay-method-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pay-method-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.pay-method-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pay-method-text strong {
  font-size: 13px;
  color: #ffffff;
  font-weight: 600;
}

.pay-method-text small {
  font-size: 10.5px;
  color: #94a3b8;
}

/* Payment Summary Box */
.payment-summary-box {
  background: linear-gradient(180deg, rgba(16, 25, 42, 0.85) 0%, rgba(10, 16, 28, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 12px 16px;
  margin-top: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.payment-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 7px;
  color: #94a3b8;
}

.payment-summary-row strong,
.payment-summary-row span[id] {
  color: #f1f5f9;
  font-weight: 600;
}

.payment-summary-row.total-highlight {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
}

.payment-summary-row.total-highlight strong {
  color: var(--whatsapp-green) !important;
  font-size: 20px !important;
  font-weight: 800;
  letter-spacing: -0.3px;
  text-shadow: 0 0 14px rgba(37, 211, 102, 0.35);
}

#plan-modal .modal-footer {
  padding: 16px 26px;
  background: rgba(12, 18, 31, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

#plan-modal .modal-footer .btn-secondary-glass {
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}

#plan-modal .modal-footer .btn-secondary-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

#plan-modal .modal-footer .btn-primary-glow {
  padding: 11px 26px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.35);
  cursor: pointer;
  transition: all 0.25s ease;
}

#plan-modal .modal-footer .btn-primary-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(37, 211, 102, 0.5);
}

/* Plan Modal Phone Input */
#plan-modal .form-control {
  background: rgba(16, 24, 40, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  padding: 11px 16px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  transition: all 0.2s ease !important;
  outline: none !important;
}

#plan-modal .form-control:focus {
  border-color: var(--whatsapp-green) !important;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.18) !important;
  background: rgba(18, 28, 46, 0.95) !important;
}

#plan-modal .form-control::placeholder {
  color: #64748b !important;
}

/* 7. Responsive Rules for Billing and Affiliate */
@media (max-width: 900px) {
  .billing-current-card {
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
  }

  .billing-current-right {
    margin-top: 10px;
  }

  .billing-current-right .btn-primary-glow {
    width: 100%;
    justify-content: center;
  }

  .billing-plans-grid {
    grid-template-columns: 1fr;
  }

  .plan-tier-featured {
    transform: none;
  }

  .plan-tier-featured:hover {
    transform: translateY(-4px);
  }

  .partner-banner-card {
    flex-direction: column;
    align-items: stretch;
    padding: 24px 20px;
  }

  .partner-banner-left {
    max-width: 100%;
  }

  .partner-banner-right {
    flex: 1;
    width: 100%;
    margin-top: 16px;
  }

  .plan-modal-grid {
    grid-template-columns: 1fr;
  }

  .cycle-selector-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .payment-methods-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {

  .referral-link-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .referral-link-box {
    width: 100%;
  }

  .btn-copy-affiliate,
  .btn-share-whatsapp {
    width: 100%;
    justify-content: center;
  }

  /* Plan Modal & General Modals Mobile Reframing */
  .modal-backdrop {
    padding: 8px 6px !important;
  }

  .modal-dialog,
  #plan-modal .modal-dialog {
    max-width: 95% !important;
    width: 95% !important;
    border-radius: 18px !important;
    margin: 6px auto !important;
    max-height: 94vh !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .modal-header,
  #plan-modal .modal-header {
    padding: 12px 14px !important;
  }

  .modal-title,
  #plan-modal .modal-title {
    font-size: 14.5px !important;
    line-height: 1.3 !important;
  }

  #plan-modal .modal-header .brand-icon-box {
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
    border-radius: 9px !important;
    flex-shrink: 0 !important;
  }

  #plan-modal .modal-header p {
    font-size: 11px !important;
    line-height: 1.35 !important;
  }

  .modal-body,
  #plan-modal .modal-body {
    padding: 14px 12px !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  /* Segmented Billing Cycle Switch - Stacking on Mobile without Text Truncation */
  .cycle-selector-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .cycle-pill {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 12px !important;
    font-size: 12px !important;
    justify-content: flex-start !important;
    text-align: left !important;
    white-space: normal !important;
    line-height: 1.35 !important;
    border-radius: 9px !important;
  }

  /* Customer info box & inputs - Full Responsive 1 Column */
  .modal-customer-info-box {
    padding: 12px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 14px !important;
    border-radius: 12px !important;
  }

  .modal-customer-info-label {
    font-size: 12px !important;
    flex-wrap: wrap !important;
    line-height: 1.35 !important;
    margin-bottom: 10px !important;
  }

  .customer-fields-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 10px !important;
  }

  .customer-field-col {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .customer-field-col .form-control {
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 13.5px !important;
    height: 42px !important;
  }

  .phone-input-group {
    display: flex !important;
    width: 100% !important;
    gap: 6px !important;
    box-sizing: border-box !important;
  }

  .phone-input-group select.country-code-select {
    width: 105px !important;
    min-width: 105px !important;
    max-width: 110px !important;
    flex-shrink: 0 !important;
    font-size: 12.5px !important;
    padding: 8px 6px !important;
    height: 42px !important;
  }

  .phone-input-group input[type="tel"] {
    flex: 1 !important;
    min-width: 0 !important;
    width: auto !important;
    font-size: 13.5px !important;
    box-sizing: border-box !important;
    height: 42px !important;
  }

  /* Summary Pill Step 1 */
  #plan-modal .modal-body > div:last-child {
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 10px 12px !important;
  }

  #plan-modal .modal-footer,
  .modal-footer {
    padding: 12px 14px !important;
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  #plan-modal .modal-footer button,
  .modal-footer button {
    width: 100% !important;
    justify-content: center !important;
    min-height: 46px !important;
  }

  #btn-submit-plan-order {
    font-size: 13.5px !important;
    padding: 12px 14px !important;
    font-weight: 700 !important;
  }

  #plan-modal .btn-secondary-glass {
    font-size: 13px !important;
    padding: 10px 14px !important;
  }

  /* Payment Integrations Cards Mobile Refinement */
  .integ-card {
    padding: 16px 14px !important;
    border-radius: 14px !important;
    gap: 12px !important;
  }

  .integ-top {
    align-items: flex-start !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
  }

  .integ-brand-wrap {
    gap: 10px !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .integ-logo-brand {
    width: 42px !important;
    height: 42px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }

  .integ-info-col {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .integ-name {
    font-size: 15px !important;
    font-weight: 700 !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.3 !important;
    margin: 0 0 4px 0 !important;
  }

  .integ-country-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    margin-top: 4px !important;
  }

  .integ-country-pill {
    font-size: 10px !important;
    padding: 1.5px 6px !important;
    border-radius: 5px !important;
  }

  .integ-desc {
    font-size: 12px !important;
    line-height: 1.45 !important;
    margin-bottom: 8px !important;
  }

  .integ-credentials-box {
    padding: 11px 12px !important;
    margin: 8px 0 !important;
    border-radius: 11px !important;
  }

  .integ-cred-number {
    font-size: 13px !important;
    word-break: break-all !important;
  }

  .integ-cred-beneficiary {
    font-size: 11px !important;
    padding: 2px 6px !important;
  }

  .integ-card-footer {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding-top: 10px !important;
    gap: 8px !important;
  }

  .btn-config-integ {
    padding: 6px 12px !important;
    font-size: 11.5px !important;
  }

  /* Safe scrolling clearance above bottom navigation bar */
  .main-body-content {
    padding-bottom: 96px !important;
  }

  #view-integrations {
    padding-bottom: 50px !important;
  }

  /* Affiliate Section Mobile Enhancements (Recadrage smartphone haute précision) */
  #view-affiliation {
    padding-bottom: calc(85px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .aff-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  .aff-kpi-card {
    padding: 12px 11px !important;
    min-height: 105px !important;
    border-radius: 14px !important;
  }

  .aff-kpi-card .kpi-header {
    gap: 8px !important;
    margin-bottom: 8px !important;
  }

  .aff-kpi-card .kpi-icon-box {
    width: 30px !important;
    height: 30px !important;
    font-size: 13px !important;
    border-radius: 9px !important;
  }

  .aff-kpi-card .kpi-title {
    font-size: 11px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .aff-kpi-sub {
    display: none !important;
  }

  .aff-kpi-card .kpi-value-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 3px !important;
    margin-top: auto !important;
  }

  .aff-kpi-card .kpi-value {
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
  }

  .aff-kpi-card .kpi-badge-trend {
    font-size: 9px !important;
    padding: 1px 6px !important;
    border-radius: 5px !important;
  }

  .aff-info-banner {
    padding: 12px 14px !important;
    border-radius: 13px !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  .aff-info-icon {
    width: 30px !important;
    height: 30px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
  }

  .aff-info-title {
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  .aff-info-desc {
    font-size: 11px !important;
    line-height: 1.45 !important;
  }

  .partner-banner-card {
    padding: 20px 16px !important;
    border-radius: 16px !important;
  }

  .partner-title {
    font-size: 18px !important;
    line-height: 1.3 !important;
    margin-bottom: 8px !important;
  }

  .partner-desc {
    font-size: 12.5px !important;
    line-height: 1.5 !important;
    margin-bottom: 14px !important;
  }

  .partner-checklist li {
    font-size: 12px !important;
    gap: 8px !important;
  }

  .passive-income-box {
    padding: 18px 16px !important;
    border-radius: 14px !important;
  }

  .gold-coins-glow {
    font-size: 34px !important;
  }

  .passive-income-title {
    font-size: 16px !important;
  }

  .passive-income-text {
    font-size: 12px !important;
  }

  .affiliate-link-card {
    padding: 18px 15px !important;
    border-radius: 16px !important;
  }

  .referral-link-input-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .referral-link-box {
    min-width: 0 !important;
    width: 100% !important;
    padding: 0 12px !important;
    height: 44px !important;
  }

  .referral-input {
    font-size: 13px !important;
    padding: 8px 0 !important;
  }

  .btn-copy-affiliate,
  .btn-share-whatsapp {
    width: 100% !important;
    justify-content: center !important;
    padding: 11px 16px !important;
    font-size: 12.5px !important;
    min-height: 42px !important;
  }

  .aff-history-panel {
    padding: 16px 14px !important;
    border-radius: 16px !important;
    margin-top: 14px !important;
  }

  .aff-history-top-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
  }

  .aff-calc-badge {
    font-size: 11.5px !important;
    color: var(--text-muted) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: rgba(37, 211, 102, 0.08) !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(37, 211, 102, 0.2) !important;
  }

  .affiliate-table-wrapper {
    display: none !important;
  }

  .affiliate-cards-mobile-view {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    margin-top: 6px !important;
  }
}

@media (max-width: 380px) {
  #btn-submit-plan-order {
    font-size: 12.5px !important;
    padding: 11px 8px !important;
  }
}

/* Responsive adjustments for laptop screens (1024px - 1400px) ensuring header is perfectly aligned and never wraps */
@media (max-width: 1400px) {
  .top-header {
    padding: 0 18px;
    gap: 12px;
  }
  .header-search-btn span {
    display: none;
  }
  .header-search-btn {
    padding: 0 10px;
  }
}

@media (max-width: 1250px) {
  .header-link-btn span {
    display: none;
  }
  .header-link-btn {
    padding: 0 11px;
  }
  .status-connected-pill #header-connected-num {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 1120px) {
  .status-connected-pill .status-badge-mini {
    display: none;
  }
}



/* =============================================================================
   VANDIA ACADEMY — FORMATIONS & DÉMONSTRATIONS VIDÉO
   ============================================================================= */

/* 1. Hero Banner */
.academy-hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  background: linear-gradient(135deg, rgba(8, 24, 20, 0.98), rgba(10, 20, 32, 0.95)) !important;
  border: 1px solid rgba(37, 211, 102, 0.35) !important;
  border-radius: 20px;
  padding: 30px 34px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
  margin-bottom: 24px;
}

.academy-hero-left {
  flex: 1;
  max-width: 60%;
}

.academy-hero-right {
  flex: 0 0 36%;
}

.academy-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.35);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: var(--whatsapp-green);
  letter-spacing: 0.6px;
  margin-bottom: 12px;
}

.academy-hero-title {
  font-size: 25px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 10px;
}

.academy-hero-desc {
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.55;
  margin-bottom: 18px;
}

.academy-badges-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.academy-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 600;
}

.academy-stat-pill i {
  color: var(--whatsapp-green);
}

.academy-featured-box {
  background: rgba(13, 20, 31, 0.85);
  border: 1px solid rgba(37, 211, 102, 0.3);
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.academy-featured-box:hover {
  transform: translateY(-3px);
  border-color: var(--whatsapp-green);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.2);
}

.academy-featured-thumb-wrap {
  width: 100%;
  height: 140px;
  border-radius: 12px;
  background: linear-gradient(135deg, #064e3b, #0f172a);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.academy-play-glow {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 211, 102, 0.6) 0%, transparent 70%);
  animation: orbPulse 2.5s infinite alternate;
}

.academy-play-orb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--whatsapp-green);
  color: #080c14;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.5);
  transition: transform 0.2s ease;
}

.academy-featured-box:hover .academy-play-orb {
  transform: scale(1.12);
}

.academy-duration-chip {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(8, 12, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.academy-featured-badge {
  display: inline-block;
  background: rgba(37, 211, 102, 0.18);
  color: var(--whatsapp-green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.academy-featured-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
  line-height: 1.35;
}

.academy-featured-sub {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

/* 2. Controls & Search Bar */
.academy-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

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

.academy-search-wrap i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
}

.academy-search-wrap input {
  width: 100%;
  padding: 12px 16px 12px 46px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 13.5px;
  outline: none;
  transition: all var(--transition-fast);
}

.academy-search-wrap input:focus {
  border-color: var(--whatsapp-green);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 14px rgba(37, 211, 102, 0.2);
}

.academy-filter-pills {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.academy-filter-pills::-webkit-scrollbar {
  display: none;
}

.academy-pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

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

.academy-pill-btn.active {
  background: var(--whatsapp-green);
  color: #080c14;
  border-color: var(--whatsapp-green);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.35);
}

/* 3. Video Tutorials Grid */
.academy-video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 28px;
}

.academy-video-card {
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border-radius: 18px;
}

.academy-video-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 211, 102, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.video-card-thumb {
  width: 100%;
  height: 170px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumb-gradient {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gradient-green { background: linear-gradient(135deg, #065f46, #092e20); }
.gradient-purple { background: linear-gradient(135deg, #5b21b6, #1e1b4b); }
.gradient-cyan { background: linear-gradient(135deg, #0e7490, #082f49); }
.gradient-amber { background: linear-gradient(135deg, #b45309, #451a03); }
.gradient-blue { background: linear-gradient(135deg, #1d4ed8, #0f172a); }
.gradient-violet { background: linear-gradient(135deg, #7c3aed, #2e1065); }

.thumb-watermark {
  font-size: 90px;
  opacity: 0.12;
  color: #ffffff;
  position: absolute;
  right: -10px;
  bottom: -15px;
  pointer-events: none;
}

.video-play-btn-overlay {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(8, 12, 20, 0.7);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  position: relative;
  z-index: 2;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.academy-video-card:hover .video-play-btn-overlay {
  background: var(--whatsapp-green);
  color: #080c14;
  border-color: var(--whatsapp-green);
  transform: scale(1.15);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.video-card-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(8, 12, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  z-index: 2;
}

.video-card-level {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(37, 211, 102, 0.2);
  border: 1px solid rgba(37, 211, 102, 0.4);
  color: var(--whatsapp-green);
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  z-index: 2;
}

.video-card-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.video-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.video-card-cat {
  font-size: 11.5px;
  color: var(--cyan);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.video-card-mod {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.video-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin: 0 0 8px 0;
  min-height: 42px;
}

.video-card-desc {
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0 0 16px 0;
  flex: 1;
}

.video-card-footer {
  margin-top: auto;
}

.btn-watch-video {
  width: 100%;
  justify-content: center;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 700;
}

/* 4. Bottom Help Banner */
.academy-help-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(16, 24, 39, 0.95), rgba(6, 78, 59, 0.25)) !important;
  border: 1px solid rgba(37, 211, 102, 0.25) !important;
}

.help-banner-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: var(--whatsapp-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.help-banner-info {
  flex: 1;
}

.help-banner-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.help-banner-info p {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
}

/* 5. Academy Modal Player */
.modal-box-large {
  max-width: 820px !important;
  width: 95% !important;
}

.academy-player-screen {
  width: 100%;
  height: 380px;
  background: #000000;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.academy-player-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(13, 148, 136, 0.25) 0%, rgba(8, 12, 20, 0.95) 75%);
}

.player-orb-glow {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 211, 102, 0.5) 0%, transparent 70%);
  animation: orbPulse 2.5s infinite alternate;
}

.player-play-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--whatsapp-green);
  color: #080c14;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  position: relative;
  z-index: 3;
  box-shadow: 0 4px 25px rgba(37, 211, 102, 0.6);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.player-play-icon:hover {
  transform: scale(1.1);
}

.player-control-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Responsive Academy Breakpoints */
@media (max-width: 1200px) {
  .academy-video-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .academy-hero-card {
    flex-direction: column;
    align-items: stretch;
  }

  .academy-hero-left,
  .academy-hero-right {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .academy-video-grid {
    grid-template-columns: 1fr;
  }

  .academy-hero-card {
    padding: 20px 18px;
  }

  .academy-hero-title {
    font-size: 20px;
  }

  .academy-player-screen {
    height: 240px;
  }

  .academy-help-banner {
    flex-direction: column;
    text-align: center;
    padding: 20px 16px;
  }

  .academy-help-banner .btn-primary-glow {
    width: 100%;
    justify-content: center;
  }
}

/* =============================================================================
   VANDIA MASTER PROMPTS — BIBLIOTHÈQUE DE VENTE & DÉMONSTRATIONS
   ============================================================================= */

/* 1. Hero Card */
.prompts-hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  background: linear-gradient(135deg, rgba(16, 24, 39, 0.98), rgba(24, 18, 8, 0.95)) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  border-radius: 20px;
  padding: 30px 34px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
  margin-bottom: 24px;
}

.prompts-hero-left {
  flex: 1;
  max-width: 65%;
}

.prompts-hero-right {
  flex: 0 0 32%;
}

.prompts-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: 0.6px;
  margin-bottom: 12px;
}

.prompts-hero-title {
  font-size: 25px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 10px;
}

.prompts-hero-desc {
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.55;
  margin-bottom: 18px;
}

.prompts-badges-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.prompts-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 600;
}

.prompts-stat-pill i {
  color: var(--amber);
}

.prompts-highlight-box {
  background: rgba(13, 20, 31, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.prompts-highlight-icon {
  font-size: 32px;
  color: var(--whatsapp-green);
  margin-bottom: 10px;
}

.prompts-highlight-box h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
}

.prompts-highlight-box p {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
}

/* 2. Controls & Search */
.prompts-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

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

.prompts-search-wrap i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
}

.prompts-search-wrap input {
  width: 100%;
  padding: 12px 16px 12px 46px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 13.5px;
  outline: none;
  transition: all var(--transition-fast);
}

.prompts-search-wrap input:focus {
  border-color: var(--amber);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.2);
}

.prompts-filter-pills {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.prompts-filter-pills::-webkit-scrollbar {
  display: none;
}

.prompts-pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

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

.prompts-pill-btn.active {
  background: var(--amber);
  color: #080c14;
  border-color: var(--amber);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
}

/* 3. Prompts Grid & Cards */
.prompts-grid {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin-bottom: 30px;
}

.prompt-master-card {
  padding: 24px 28px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.prompt-master-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.prompt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.prompt-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.prompt-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.prompt-conversion-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: var(--whatsapp-green);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.prompt-description {
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 18px 0;
}

/* Split Layout */
.prompt-card-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: stretch;
}

/* Left: Code Box */
.prompt-split-left {
  display: flex;
  flex-direction: column;
  background: rgba(8, 12, 20, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.prompt-box-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  gap: 10px;
}

.prompt-box-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.prompt-box-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-copy-prompt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-prompt:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-apply-prompt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(37, 211, 102, 0.25));
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-apply-prompt:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.4), rgba(37, 211, 102, 0.4));
  border-color: var(--amber);
  transform: translateY(-1px);
}

.prompt-code-display {
  margin: 0;
  padding: 14px 16px;
  color: #cbd5e1;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 380px;
  overflow-y: auto;
  flex: 1;
}

/* Right: WhatsApp Chat Simulation */
.prompt-split-right {
  display: flex;
  flex-direction: column;
}

.prompt-chat-demo {
  background: #0b141a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.demo-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #1f2c34;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.demo-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--whatsapp-green);
  color: #080c14;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.demo-chat-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.demo-chat-meta strong {
  font-size: 13px;
  color: #ffffff;
}

.demo-chat-meta span {
  font-size: 10.5px;
  color: #8696a0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.demo-chat-body {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 380px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 12px 12px;
}

.chat-bubble {
  padding: 9px 12px 18px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
  position: relative;
  max-width: 88%;
  word-break: break-word;
}

.bubble-client {
  align-self: flex-start;
  background: #202c33;
  color: #e9edef;
  border-top-left-radius: 0;
}

.bubble-agent {
  align-self: flex-end;
  background: #005c4b;
  color: #e9edef;
  border-top-right-radius: 0;
}

.bubble-time {
  position: absolute;
  bottom: 3px;
  right: 7px;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.55);
}

/* Responsive Prompts */
@media (max-width: 1100px) {
  .prompt-card-split {
    grid-template-columns: 1fr;
  }

  .prompts-hero-card {
    flex-direction: column;
    align-items: stretch;
  }

  .prompts-hero-left,
  .prompts-hero-right {
    max-width: 100%;
  }
}

/* =============================================================================
   WHATSAPP DUAL CONNECTION MODE: QR CODE & PAIRING CODE (BY PHONE NUMBER)
   ============================================================================= */
.wa-conn-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 6px;
  margin-bottom: 18px;
}

.wa-conn-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.wa-conn-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.wa-conn-tab.active {
  background: var(--whatsapp-green);
  color: #080c14;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
}

.conn-pane {
  display: none;
}

.conn-pane.active {
  display: block;
}

.pairing-notice-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(37, 211, 102, 0.08);
  border: 1px solid rgba(37, 211, 102, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
  margin-bottom: 16px;
}

.pairing-form-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pairing-input-wrap {
  position: relative;
  flex: 1;
}

.pairing-input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--whatsapp-green);
  font-size: 16px;
}

.pairing-input-wrap input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  background: rgba(13, 20, 34, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pairing-input-wrap input:focus {
  border-color: var(--whatsapp-green);
  box-shadow: 0 0 12px rgba(37, 211, 102, 0.3);
}

.pairing-code-card {
  background: linear-gradient(135deg, rgba(8, 24, 20, 0.9), rgba(12, 32, 24, 0.85));
  border: 1px solid rgba(37, 211, 102, 0.4);
  border-radius: 16px;
  padding: 20px;
  margin-top: 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.code-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.code-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 211, 102, 0.2);
  color: var(--whatsapp-green);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}

.pairing-code-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 16px 0;
  flex-wrap: wrap;
}

.pairing-char {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 44px;
  padding: 0 8px;
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid rgba(37, 211, 102, 0.5);
  border-radius: 8px;
  font-family: 'Outfit', monospace, sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #4ade80;
  box-shadow: 0 0 14px rgba(37, 211, 102, 0.2);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.pairing-dash {
  font-size: 24px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.35);
  margin: 0 4px;
}

.btn-copy-pairing {
  padding: 7px 18px;
  font-size: 12.5px;
  border-radius: 999px;
  gap: 6px;
}

@media (max-width: 600px) {
  .wa-conn-tabs {
    flex-direction: column;
    border-radius: 12px;
  }
  .wa-conn-tab {
    border-radius: 8px;
    padding: 9px 12px;
  }
  .pairing-form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .pairing-char {
    min-width: 28px;
    height: 40px;
    font-size: 18px;
    padding: 0 6px;
  }
}

/* Responsive Header Spacing Fix (Guarantees all header controls fit without overflow) */
@media (max-width: 1366px) {
  .top-header {
    padding: 0 18px;
    gap: 12px;
  }
  .header-right {
    gap: 8px;
  }
  .header-search-btn {
    padding: 0 10px;
    gap: 6px;
  }
  .header-search-shortcut {
    display: none;
  }
}

@media (max-width: 1180px) {
  .header-search-btn span {
    display: none;
  }
  .header-search-btn {
    width: 36px;
    padding: 0;
    justify-content: center;
  }
  .status-connected-pill {
    padding: 4px 10px;
    font-size: 11.5px;
  }
}

/* =============================================================================
   RESPONSIVE OPTIMIZATIONS FOR UNCORRECTED DASHBOARD VIEWS & MODALS
   ============================================================================= */

/* 1. Template Modal Responsive Styles */
@media (max-width: 860px) {
  .template-modal-body {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding: 18px 16px !important;
  }
}

@media (max-width: 540px) {
  .template-form-row-2col,
  .funnel-form-row-2col,
  .contact-form-row-2col {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .template-vars-row {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .template-vars-row button {
    flex: 1 1 auto !important;
    text-align: center !important;
  }
}

/* 2. Modals Footer Button Stacking on Mobile <= 600px */
@media (max-width: 600px) {
  .template-modal-footer,
  .funnel-modal-footer,
  .payment-config-footer,
  .contact-modal-footer,
  .team-invite-footer {
    display: flex !important;
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    padding: 14px 16px !important;
    gap: 10px !important;
  }

  .template-modal-footer button,
  .funnel-modal-footer button,
  .payment-config-footer button,
  .contact-modal-footer button,
  .team-invite-footer button {
    width: 100% !important;
    min-height: 44px !important;
    justify-content: center !important;
    margin: 0 !important;
  }
}

/* 3. FinTech Routing Bar & Payment Gateway Cards Mobile Optimization */
@media (max-width: 680px) {
  .fintech-metrics-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 14px 16px !important;
    gap: 14px !important;
  }

  .fintech-metrics-inner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .fintech-divider {
    display: none !important;
  }

  .fintech-action,
  .fintech-action button {
    width: 100% !important;
    justify-content: center !important;
  }
}

@media (max-width: 480px) {
  .integ-card {
    padding: 16px 14px !important;
  }

  .integ-cred-val-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  .integ-card-footer {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .integ-card-footer .btn-config-integ {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* 4. Billing Frequency Toggle & Affiliate Program Mobile Optimization */
@media (max-width: 520px) {
  .pricing-toggle-wrap-dashboard {
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 16px !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .pricing-toggle-wrap-dashboard .toggle-freq-lbl {
    font-size: 11.5px !important;
    text-align: center !important;
  }

  .referral-link-input-row button,
  .referral-link-input-row a {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* Compact Country Code Selectors (Mobile Money, Profil, Inscription, WhatsApp) */
.phone-input-group {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
}

.country-flag-preview {
  width: 22px !important;
  height: 15px !important;
  border-radius: 3px !important;
  object-fit: cover !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

.country-code-select {
  width: 86px !important;
  min-width: 78px !important;
  max-width: 35% !important;
  flex-shrink: 0 !important;
  padding: 10px 6px 10px 8px !important;
  background: rgba(16, 24, 40, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  outline: none !important;
}

.country-code-select:focus {
  border-color: var(--whatsapp-green, #00c968) !important;
}

.country-code-select option {
  background: #0f172a !important;
  color: #ffffff !important;
}


