/* ==========================================================================
   WHATSAPP GATEWAY ENTERPRISE - MODERN DESIGN SYSTEM & STYLESHEET
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Color Palette - Dark Luxe Cyber/Emerald */
  --bg-dark: #090d16;
  --bg-surface: #0f172a;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.65);
  --bg-input: #1e293b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #10b981;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #a855f7;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 25px var(--accent-emerald-glow);

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-dark: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.8);
  --bg-input: #f8fafc;
  --border-color: rgba(0, 0, 0, 0.08);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Base Glassmorphism Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

/* App Container Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  width: 280px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  z-index: 100;
  transition: var(--transition);
  overflow: hidden;
}

.sidebar-header {
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  flex-shrink: 0;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--accent-emerald);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 185, 129, 0.4);
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  flex-shrink: 0;
}

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

.nav-item.active {
  color: white;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.08));
  border-color: rgba(16, 185, 129, 0.3);
  font-weight: 600;
}

.nav-item i {
  font-size: 18px;
  width: 22px;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.sidebar-footer {
  padding: 14px 16px;
  padding-bottom: max(14px, env(safe-area-inset-bottom, 14px));
  border-top: 1px solid var(--border-color);
  background: rgba(9, 13, 22, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-shrink: 0;
  z-index: 10;
  margin-top: auto;
}

.user-profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 14px;
  flex-shrink: 0;
}

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

.user-profile-card .btn-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

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

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

/* Main Content Area */
.main-wrapper {
  margin-left: 280px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 70px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

.server-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-emerald);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 14px var(--accent-emerald); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.content-container {
  padding: 32px;
  flex: 1;
}

/* Stats Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-emerald);
}

.stat-card.purple::after { background: var(--accent-purple); }
.stat-card.cyan::after { background: var(--accent-cyan); }
.stat-card.amber::after { background: var(--accent-amber); }
.stat-card.rose::after { background: var(--accent-rose); }

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.stat-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-icon.emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.stat-icon.purple { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); }
.stat-icon.cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.stat-icon.amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }

/* Buttons & UI Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  outline: none;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

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

.btn-danger:hover {
  background: var(--accent-rose);
  color: white;
}

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

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 11px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

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

/* Password Input Toggle */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrapper .form-control {
  padding-right: 44px;
}

.password-toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: var(--transition);
  z-index: 2;
  border-radius: var(--radius-sm);
}

.password-toggle-btn:hover {
  color: var(--accent-emerald);
}

.password-toggle-btn:focus {
  outline: none;
  color: var(--accent-emerald);
}

/* Custom Toggle Switch */
.custom-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  margin: 0;
  cursor: pointer;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: .3s;
  border-radius: 34px;
}

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

.custom-toggle input:checked + .toggle-slider {
  background-color: var(--accent-emerald);
}

.custom-toggle input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.tag-chip {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: var(--transition);
}

.tag-chip:hover {
  border-color: var(--accent-cyan);
  color: #fff;
  background: rgba(6, 182, 212, 0.1);
}

.tag-chip code {
  color: var(--accent-cyan);
  font-weight: 700;
  margin-right: 4px;
}

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

.device-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.device-title {
  font-size: 16px;
  font-weight: 700;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

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

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

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

.device-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

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

.device-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.show .modal-dialog {
  transform: scale(1);
}

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

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

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

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

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

/* QR Code Display Box */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: white;
  border-radius: var(--radius-lg);
  margin: 16px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.qr-image {
  width: 220px;
  height: 220px;
  object-fit: contain;
}

.pairing-box {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
}

.pairing-code-badge {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border: 2px dashed rgba(16, 185, 129, 0.4);
}

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

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

.custom-table th {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.custom-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

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

/* Interactive Phone Mockup */
.phone-preview-mockup {
  width: 320px;
  background: #111b21;
  border: 10px solid #202c33;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  height: 480px;
}

.phone-header {
  background: #202c33;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-screen {
  flex: 1;
  background: #0b141a;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 0);
  background-size: 20px 20px;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.chat-bubble {
  background: #005c4b;
  color: #e9edef;
  padding: 10px 14px;
  border-radius: 8px 0 8px 8px;
  max-width: 85%;
  align-self: flex-end;
  font-size: 13px;
  line-height: 1.4;
  position: relative;
  word-break: break-word;
}

.chat-time {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  text-align: right;
  margin-top: 4px;
}

/* Code Snippet Box */
.code-container {
  background: #020617;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
}

.code-container pre {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #38bdf8;
  overflow-x: auto;
  margin: 0;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  font-size: 11px;
}

/* Progress bar */
.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0;
}

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

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

.custom-toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: slide-in 0.3s ease;
}

.custom-toast.success {
  background: #064e3b;
  color: #a7f3d0;
  border: 1px solid #059669;
}

.custom-toast.error {
  background: #881337;
  color: #fecdd3;
  border: 1px solid #e11d48;
}

.custom-toast.info {
  background: #1e1b4b;
  color: #c7d2fe;
  border: 1px solid #4f46e5;
}

@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.btn-xs {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* ==========================================================================
   LANDING PAGE STYLES (PRE-LOGIN)
   ========================================================================== */
.landing-wrapper {
  min-height: 100vh;
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(at 15% 15%, rgba(16, 185, 129, 0.12) 0px, transparent 50%),
    radial-gradient(at 85% 20%, rgba(6, 182, 212, 0.12) 0px, transparent 50%),
    radial-gradient(at 50% 75%, rgba(168, 85, 247, 0.08) 0px, transparent 50%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  position: relative;
}

/* Navbar */
.landing-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(9, 13, 22, 0.85);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

.landing-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.landing-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.landing-nav-link {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.landing-nav-link:hover {
  color: var(--accent-emerald);
}

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

/* Hero Section */
.hero-section {
  padding: 90px 0 70px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-emerald);
  margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.hero-title {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero-title-gradient {
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 50%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn-hero-primary {
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  text-decoration: none;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.6);
}

.btn-hero-secondary {
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  text-decoration: none;
}

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

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.metric-item .metric-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}

.metric-item .metric-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* Phone Mockup in Hero */
.hero-mockup-wrapper {
  position: relative;
  perspective: 1000px;
}

.hero-phone-card {
  background: #0f172a;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 36px;
  padding: 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(16, 185, 129, 0.15);
  position: relative;
  overflow: hidden;
}

.phone-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.floating-badge {
  position: absolute;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  z-index: 10;
  animation: float 4s ease-in-out infinite;
}

.floating-badge.badge-top-left {
  top: 20px;
  left: -20px;
}

.floating-badge.badge-bottom-right {
  bottom: 30px;
  right: -20px;
  animation-delay: 2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Feature Grid */
.features-section {
  padding: 80px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: var(--transition);
  position: relative;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(16, 185, 129, 0.1);
}

.feature-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Pricing Section */
.pricing-section {
  padding: 90px 0;
  position: relative;
  background: rgba(15, 23, 42, 0.4);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

/* Interactive Calculator */
.pricing-calculator-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  margin-bottom: 48px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: center;
}

.calc-slider {
  width: 100%;
  -webkit-appearance: none;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  margin: 20px 0 10px;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #10b981;
  cursor: pointer;
  box-shadow: 0 0 15px #10b981;
  border: 2px solid #ffffff;
}

.calc-result-card {
  background: rgba(9, 13, 22, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}

.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-card.popular {
  border: 2px solid var(--accent-emerald);
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.25);
  background: rgba(15, 23, 42, 0.95);
}

.popular-ribbon {
  position: absolute;
  top: -12px;
  right: 28px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 99px;
  letter-spacing: 0.05em;
}

.price-box {
  margin: 20px 0 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.price-amount {
  font-size: 38px;
  font-weight: 800;
  color: var(--text-primary);
}

.price-currency {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-emerald);
}

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

.pricing-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
  flex: 1;
}

.pricing-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.pricing-feature-item i {
  color: var(--accent-emerald);
  font-size: 14px;
}

/* FAQ Accordion */
.faq-section {
  padding: 80px 0;
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  padding: 18px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 15px;
}

.faq-question:hover {
  color: var(--accent-emerald);
}

.faq-answer {
  padding: 0 24px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--accent-emerald);
}

/* Landing CTA Banner */
.landing-cta-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  text-align: center;
  margin: 40px 0 80px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* Landing Footer */
.landing-footer {
  border-top: 1px solid var(--border-color);
  padding: 50px 0 30px;
  background: #060910;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Auth Modal Backdrop & Card */
.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  overflow-y: auto;
  animation: fadeIn 0.25s ease;
}

.auth-modal-backdrop.show {
  display: flex;
}

.auth-modal-card {
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  padding: 28px 24px 24px;
  border-radius: 20px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  overflow-y: auto;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.95);
}

.auth-modal-card::-webkit-scrollbar {
  width: 5px;
}
.auth-modal-card::-webkit-scrollbar-track {
  background: transparent;
}
.auth-modal-card::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.35);
  border-radius: 99px;
}
.auth-modal-card::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 185, 129, 0.6);
}

.auth-form-group {
  margin-bottom: 12px;
}

.auth-form-group .form-label {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-form-group .form-control {
  padding: 9px 13px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Helper utilities for responsive visibility */
.hide-mobile-xs {
  display: inline;
}
.show-mobile-xs {
  display: none;
}

.mobile-menu-btn,
.mobile-sidebar-close,
.landing-mobile-toggle {
  display: none;
}

/* Sidebar Backdrop Drawer Overlay */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 95;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

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

/* Landing Mobile Backdrop */
.landing-mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 95;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

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

/* Layout Grids */
.overview-analytics-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.send-message-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
}

/* Prevent background scrolling when mobile drawer is open */
body.sidebar-open {
  overflow: hidden;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* Large Tablets & Small Laptops (<= 1024px) */
@media (max-width: 1024px) {
  .overview-analytics-grid {
    grid-template-columns: 1fr;
  }
  .send-message-layout {
    grid-template-columns: 1fr;
  }
  .phone-preview-mockup {
    margin: 0 auto;
    max-width: 100%;
  }
}

/* Tablets & Mobile Devices (<= 992px) */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .features-grid, .pricing-cards-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .calc-grid {
    grid-template-columns: 1fr;
  }
  
  /* Landing Mobile Nav */
  .landing-mobile-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  
  .landing-nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(9, 13, 22, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s ease;
    z-index: 98;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  }
  
  .landing-nav-links.mobile-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .landing-nav-link {
    display: block;
    padding: 10px 0;
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    width: 100%;
  }

  .hero-title {
    font-size: 32px;
  }
  
  /* App Layout & Mobile Sidebar Drawer */
  .mobile-menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
  }
  
  .mobile-sidebar-close {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    cursor: pointer;
  }

  .d-lg-none {
    display: inline-flex !important;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 290px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .sidebar.mobile-open {
    transform: translateX(0) !important;
    box-shadow: 10px 0 50px rgba(0, 0, 0, 0.8);
  }

  .sidebar-header {
    padding: 16px 16px;
    flex-shrink: 0;
  }

  .sidebar-nav {
    padding: 12px 10px;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .sidebar-footer {
    flex-shrink: 0 !important;
    padding: 12px 14px;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 16px)) !important;
    margin-top: auto;
    background: rgba(8, 12, 20, 0.98);
    border-top: 1px solid var(--border-color);
  }
  
  .main-wrapper {
    margin-left: 0 !important;
    width: 100%;
    min-width: 0;
  }
  
  .topbar {
    padding: 0 20px;
  }
  
  .content-container {
    padding: 24px 18px;
  }
}

/* Smartphones & Small Tablets (<= 768px) */
@media (max-width: 768px) {
  .topbar {
    height: 64px;
    padding: 0 14px;
    gap: 10px;
  }
  
  .topbar-left {
    gap: 10px;
    min-width: 0;
    flex: 1;
  }
  
  .page-title {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
  }
  
  .stat-card {
    padding: 16px;
  }
  
  .devices-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-section {
    padding: 50px 0 40px;
  }
  
  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero-cta-group button,
  .hero-cta-group a {
    justify-content: center;
    text-align: center;
    width: 100%;
  }
  
  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 14px;
    text-align: center;
  }
  
  .floating-badge {
    display: none;
  }
  
  .pricing-calculator-box {
    padding: 24px 18px;
  }
  
  .landing-cta-banner {
    padding: 36px 20px;
    margin: 30px 0 50px;
  }
  
  .modal-dialog {
    max-width: 100%;
    margin: 10px;
  }
  
  .modal-header, .modal-footer {
    padding: 14px 16px;
  }
  
  .modal-body {
    padding: 16px;
  }
}

/* Extra Small Smartphones (<= 576px) */
@media (max-width: 576px) {
  .hide-mobile-xs {
    display: none !important;
  }
  .show-mobile-xs {
    display: inline !important;
  }
  
  .topbar {
    padding: 0 10px;
  }
  
  .topbar-right {
    gap: 6px;
  }
  
  .server-status-pill {
    padding: 5px 8px;
    font-size: 11px;
  }
  
  .server-status-pill .status-pill-text {
    display: none;
  }
  
  .btn-sm {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .page-title {
    font-size: 14px;
  }
  
  .content-container {
    padding: 14px 10px;
  }
  
  .glass-card {
    padding: 16px !important;
    border-radius: var(--radius-md);
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .hero-title {
    font-size: 26px;
  }
  
  .hero-desc {
    font-size: 14px;
  }
  
  .btn-hero-primary,
  .btn-hero-secondary {
    padding: 12px 16px;
    font-size: 14px;
  }
  
  .auth-modal-card {
    padding: 20px 14px;
    border-radius: 16px;
  }

  .pairing-code-badge {
    font-size: 20px;
    letter-spacing: 0.12em;
    padding: 10px 14px;
  }

  .qr-image {
    width: 180px;
    height: 180px;
  }
}

/* ================= WHATSAPP GROUPS STYLING ================= */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.group-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.group-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #a855f7, #38bdf8);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.group-card:hover {
  transform: translateY(-3px);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25), 0 0 15px rgba(168, 85, 247, 0.15);
}

.group-card:hover::before {
  opacity: 1;
}

.group-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.group-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

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

.group-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-desc-preview {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
  min-height: 34px;
}

.group-jid-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  max-width: 100%;
  margin-bottom: 14px;
}

.group-jid-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-copy-jid {
  background: none;
  border: none;
  color: var(--accent-cyan);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-copy-jid:hover {
  color: white;
  background: rgba(14, 165, 233, 0.2);
}

.group-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.group-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

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

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

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

.group-badge.creator {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.group-badge.admin-role {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.group-card-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.btn-text-link {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.btn-text-link:hover {
  color: white;
}

.btn-outline.btn-xs {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: var(--radius-sm);
}

.recipient-mode-toggle button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.recipient-mode-toggle button.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#btnRecipientMode-group.active {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  border-color: #9333ea;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

/* ==========================================================================
   CONTACTS BOOK & BROADCAST CHECKLIST STYLES
   ========================================================================== */
.contact-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.contact-tag-badge.vip {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.3);
}

.contact-tag-badge.reseller {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.3);
}

.contact-tag-badge.prospect {
  background: rgba(14, 165, 233, 0.15);
  color: var(--accent-cyan);
  border-color: rgba(14, 165, 233, 0.3);
}

.contacts-floating-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--accent-emerald);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.25);
  padding: 12px 24px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  z-index: 999;
  animation: slide-up 0.3s ease;
  max-width: 90%;
}

@keyframes slide-up {
  from { transform: translate(-50%, 50px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.broadcast-contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.broadcast-contact-item:hover {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}

.broadcast-contact-item.selected {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
}

.broadcast-contact-item .contact-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.broadcast-contact-item .contact-tags-preview {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   RECIPIENT CONTACT AUTOCOMPLETE & PICKER
   ========================================================================== */
.contact-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), 0 0 20px rgba(16, 185, 129, 0.15);
  z-index: 1000;
  backdrop-filter: blur(16px);
  padding: 6px;
}

.autocomplete-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 6px 10px 4px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateX(2px);
}

.autocomplete-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.autocomplete-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.autocomplete-item-info {
  min-width: 0;
}

.autocomplete-item-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-item-phone {
  font-size: 11px;
  color: var(--accent-cyan);
  font-family: var(--font-mono, monospace);
}

.recognized-contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 20px;
  color: #fff;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.2s ease;
}

.recognized-contact-chip .chip-name {
  font-weight: 700;
  color: #a7f3d0;
}

.recognized-contact-chip .btn-remove-chip {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 2px;
  font-size: 14px;
  line-height: 1;
  transition: color 0.15s;
}

.recognized-contact-chip .btn-remove-chip:hover {
  color: #ef4444;
}

.contact-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.contact-picker-item:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

/* ==========================================================================
   DASHBOARD DEVICE QUOTA STATS CARDS
   ========================================================================== */
.device-quota-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.dashboard-device-quota-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  position: relative;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dashboard-device-quota-card:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.dashboard-device-quota-card.regular {
  border-top: 3px solid #06b6d4;
}

.dashboard-device-quota-card.lite {
  border-top: 3px solid #3b82f6;
}

.dashboard-device-quota-card.admin {
  border-top: 3px solid #a855f7;
}

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

.dashboard-quota-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.dashboard-quota-body {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.dashboard-quota-progress-bar {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0;
}

.dashboard-quota-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.dashboard-quota-footer {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* ==========================================================================
   QRIS PAYMENT GATEWAY & MODAL STYLES
   ========================================================================== */
.qris-modal-body {
  padding: 24px;
}

.qris-box-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.qris-header-logo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #cbd5e1;
}

.qris-badge-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.qris-nmid-tag {
  font-size: 10px;
  color: #64748b;
  font-family: var(--font-mono);
  font-weight: 600;
}

.qris-image-wrapper {
  background: #ffffff;
  padding: 8px;
  border-radius: 12px;
  display: inline-block;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  max-width: 260px;
  width: 100%;
}

.qris-qr-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  display: block;
  image-rendering: pixelated;
}

.qris-amount-badge {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.1);
}

.qris-amount-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-emerald);
  font-family: var(--font-mono);
}

.qris-timer-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qris-timer-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-amber);
  font-family: var(--font-mono);
}

.qris-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
}

.qris-status-pill.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.qris-status-pill.paid {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.qris-payment-methods-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
}

.qris-method-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-amber);
  box-shadow: 0 0 0 rgba(245, 158, 11, 0.4);
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}




