/* Modern Glassmorphism & Premium Vibrant Dark Theme Design System (Fully Mobile Responsive) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --bg-dark: #090d16;
  --bg-card: rgba(30, 41, 59, 0.65);
  --bg-card-hover: rgba(51, 65, 85, 0.75);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(99, 102, 241, 0.3);
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent: #8b5cf6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #38bdf8;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --glass: rgba(15, 23, 42, 0.88);
}

/* ══ Light Theme Overrides ══ */
body.light-theme {
  --bg-dark: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border-card: rgba(0, 0, 0, 0.12);
  --border-glow: rgba(99, 102, 241, 0.4);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --glass: rgba(255, 255, 255, 0.95);
  background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
              #f8fafc;
  color: #0f172a;
}
body.light-theme .modal-card,
body.light-theme .card,
body.light-theme table,
body.light-theme .form-control,
body.light-theme select.form-control {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}
body.light-theme .form-label,
body.light-theme th {
  color: #334155 !important;
}
body.light-theme .flag-radio-content {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border-color: #cbd5e1 !important;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.18) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.18) 0%, transparent 40%),
              radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.08) 0%, transparent 60%),
              #090d16;
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
header {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-card);
  padding: 0.75rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.header-right-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
}

.icon-nav-btn {
  padding: 0.35rem 0.65rem;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 8px;
}

.header-tg-bot-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(6, 182, 212, 0.12);
  transition: all 0.2s ease;
  height: 36px;
}

.header-tg-bot-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .header-tg-btn-label {
    display: none;
  }
}

.user-profile-dropdown {
  position: relative;
  display: inline-block;
}

.user-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  height: 36px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.user-avatar-btn:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.profile-dropdown-menu {
  position: absolute;
  top: 115%;
  right: 0;
  width: 220px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  padding: 0.5rem 0;
  display: none;
  z-index: 1050;
}

body.light-theme .profile-dropdown-menu {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.profile-dropdown-menu.active {
  display: block;
  animation: creneau-slide-in 0.2s ease-out;
}

.dropdown-header {
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0.35rem 0;
}

body.light-theme .dropdown-divider {
  background: rgba(0, 0, 0, 0.1);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.dropdown-item:hover {
  background: rgba(99, 102, 241, 0.15);
}

.badge {
  padding: 0.4rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.badge-approved { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.4); }
.badge-pending { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.4); }
.badge-admin { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(167, 139, 250, 0.4); }

/* Navigation Tabs with Smooth Horizontal Touch Scroll */
.nav-tabs {
  display: flex;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.65rem 2rem;
  border-bottom: 1px solid var(--border-card);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.nav-tabs::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.65rem 1.25rem;
  border-radius: 0.65rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  user-select: none;
}

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

.tab-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.45);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   MAIN CONTAINER & CARDS
   ========================================================================== */
main {
  flex: 1;
  padding: 1.75rem 2rem;
  max-width: 1650px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 1600px) {
  main {
    max-width: 1750px;
  }
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

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

.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.card-title {
  font-size: 1.18rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-card);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.4);
}

.stat-title {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  word-break: break-word;
}

/* Robot Status Row (Desktop 1-line, Mobile 2-lines) */
.robot-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.6rem;
  margin-bottom: 0.6rem;
}

/* Enhanced 6-Card Real-Time Status Panel Styling */
.status-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.status-metric-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.65), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.65rem;
  padding: 0.7rem 0.85rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
}

.status-metric-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 14px rgba(56, 189, 248, 0.15);
}

.status-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  opacity: 0.7;
}

.status-metric-header {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-metric-value {
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   BUTTONS & FORMS
   ========================================================================== */
.btn {
  padding: 0.65rem 1.35rem;
  border-radius: 0.65rem;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
}
.btn-success:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
}
.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
  transform: translateY(-1px);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
}
.btn-warning:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
  transform: translateY(-1px);
}

.btn-outline {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

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

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

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-card);
  border-radius: 0.6rem;
  color: var(--text-main);
  font-size: 16px; /* 16px prevents iOS Safari auto-zoom on input focus */
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 0 16px rgba(99, 102, 241, 0.2);
}

/* ==========================================================================
   TABLES & RESPONSIVE CONTAINERS
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0.75rem;
  scrollbar-width: thin;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  min-width: 100%;
}

.data-table-wide {
  min-width: 680px;
}

th, td {
  padding: 0.8rem 0.85rem;
  border-bottom: 1px solid var(--border-card);
  vertical-align: middle;
}

#tab-accounts .card {
  padding: 1.5rem 1.25rem;
}

#tab-accounts .table th {
  padding: 0.75rem 0.65rem;
  font-size: 0.73rem;
  white-space: nowrap;
}

#tab-accounts .table td {
  padding: 0.6rem 0.65rem;
}

th {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(15, 23, 42, 0.65);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.035);
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(9, 13, 22, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1rem;
}

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

.modal-card {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1.25rem;
  padding: 2.25rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden !important;
  box-sizing: border-box;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.7), 0 0 30px rgba(99, 102, 241, 0.12);
  transform: scale(0.94) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-card,
.modal-card * {
  box-sizing: border-box;
}

.modal-card .card-header,
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
  margin-bottom: 1.25rem;
}

.modal-card .card-header .btn,
.modal-close {
  flex-shrink: 0;
}

.modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.modal-card .card-title {
  min-width: 0;
  flex: 1;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.modal-card .form-control,
.modal-card select.form-control,
.modal-card input.form-control {
  max-width: 100%;
  box-sizing: border-box;
}

.two-col-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

/* ══ WIDE MODAL CARDS (FOR EDIT / ADD / VIEW ACCOUNT MODALS) ══════════════ */
.modal-card.modal-card-wide,
#account-modal .modal-card,
#edit-account-modal .modal-card,
#view-account-modal .modal-card {
  max-width: 780px;
  width: 95%;
  padding: 2.25rem 2.5rem;
}

@media (min-width: 1024px) {
  .modal-card.modal-card-wide,
  #account-modal .modal-card,
  #edit-account-modal .modal-card,
  #view-account-modal .modal-card {
    max-width: 820px;
  }
}

/* Modal Responsive Behavior on Tablets & Mobiles */
@media (max-width: 768px) {
  .modal-card,
  .modal-card.modal-card-wide,
  #account-modal .modal-card,
  #edit-account-modal .modal-card,
  #view-account-modal .modal-card {
    max-width: 96% !important;
    width: 96% !important;
    padding: 1.35rem 1rem !important;
    max-height: 92vh !important;
    border-radius: 1rem !important;
    margin: 0.5rem auto !important;
  }

  .modal-card .two-col-grid,
  .modal-card .grid-2-halves,
  .two-col-grid,
  .grid-2-halves {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .modal-card .card-title {
    font-size: 1.05rem !important;
  }

  .modal-card .form-label {
    font-size: 0.84rem !important;
    margin-bottom: 0.35rem !important;
  }

  .modal-card .form-control,
  .modal-card select.form-control,
  .modal-card input.form-control {
    font-size: 0.88rem !important;
    padding: 0.65rem 0.85rem !important;
  }

  .modal-card .btn {
    font-size: 0.92rem !important;
  }
}

/* Ensure Pack Select dropdown displays cleanly and does not overflow */
#edit-acc-subscription-id,
#acc-subscription-id {
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.2px;
}

#edit-acc-subscription-id option,
#acc-subscription-id option {
  padding: 8px 12px;
  font-size: 0.88rem;
  background: #0f172a;
  color: #f8fafc;
}

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

/* ==========================================================================
   PRICING & RESPONSIVE GRID SYSTEMS
   ========================================================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.responsive-two-col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 1rem;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  position: relative;
  transition: transform 0.25s ease;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.plan-card ul {
  padding-left: 0;
  list-style: none;
}

.plan-card li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-word;
}

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

.plan-card.featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(30, 41, 59, 0.85));
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.2);
}

.plan-price {
  font-size: 2rem;
  font-weight: 800;
}

/* ==========================================================================
   TOAST NOTIFICATION SYSTEM
   ========================================================================== */
#toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999999 !important;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
  width: 100%;
  pointer-events: none;
}

.auth-inline-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  font-size: 0.82rem;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: creneau-slide-in 0.2s ease-out;
}

.toast {
  pointer-events: auto;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: 0.75rem;
  padding: 0.9rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--text-main);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  transform: translateX(120%);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateX(0);
}

.toast-icon {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-success .toast-icon { color: var(--success); }

.toast-error { border-left: 4px solid var(--danger); }
.toast-error .toast-icon { color: var(--danger); }

.toast-warning { border-left: 4px solid var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }

.toast-info { border-left: 4px solid var(--primary); }
.toast-info .toast-icon { color: var(--primary); }

.toast-content {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 500;
}

.toast-close {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
}
.toast-close:hover { color: var(--text-main); }


/* ==========================================================================
   LANDING HERO & FEATURE CARDS (Desktop & Mobile Optimized)
   ========================================================================== */
.hero-section {
  text-align: center;
  padding: 0.95rem 1.25rem 0.85rem;
  max-width: 100%;
  width: 100%;
  margin: 0 auto 0.95rem;
  position: relative;
  border-radius: 0.85rem;
  background: radial-gradient(circle at top right, rgba(59,130,246,0.12), transparent 60%),
              linear-gradient(135deg, rgba(15,23,42,0.95), rgba(30,41,59,0.85));
  border: 1px solid var(--border-card);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  overflow: hidden;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #818cf8;
  padding: 0.2rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1rem, 1.55vw, 1.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  white-space: nowrap;
}

.hero-title-accent {
  background: linear-gradient(135deg, #6366f1, #c084fc, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(0.72rem, 0.92vw, 0.84rem);
  line-height: 1.35;
  color: var(--text-muted);
  max-width: 100%;
  margin: 0 auto 0.55rem;
  font-weight: 400;
  white-space: nowrap;
}

.hero-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: nowrap;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.hero-badges span, .hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(30, 41, 59, 0.5);
  padding: 0.28rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  font-size: 0.75rem;
}

@media (max-width: 1080px) {
  .hero-title, .hero-subtitle {
    white-space: normal;
  }
  .hero-badges {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

.grid-auto-fit-260 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}
.feature-icon.blue { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.feature-icon.amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.feature-icon.green { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.feature-icon.purple { background: rgba(139, 92, 246, 0.15); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.3); }

.feature-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.feature-card-body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (MOBILE, TABLET, SMALL DESKTOP)
   ========================================================================== */

/* Medium Devices (Tablets / Laptops <= 1024px) */
@media (max-width: 1024px) {
  main {
    padding: 1.5rem 1.25rem;
  }
}

/* Tablet & Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  body {
    padding-bottom: 80px; /* Prevent fixed bottom nav from overlapping main content */
  }

  header {
    padding: 0.65rem 0.85rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(9, 13, 22, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    font-size: 1.05rem;
    gap: 0.45rem;
  }

  .header-right-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .mobile-hamburger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.5rem;
    color: var(--text-main);
    font-size: 1.1rem;
    cursor: pointer;
  }

  .user-badge {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0.75rem;
    left: 0.75rem;
    flex-direction: column;
    align-items: stretch;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    z-index: 9999;
    gap: 0.85rem;
  }

  .user-badge.mobile-open {
    display: flex;
    animation: slideDownNav 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

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

  /* Landing Hero Mobile Optimization */
  .hero-section {
    padding: 1.5rem 0.5rem 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-title {
    font-size: 1.75rem;
    line-height: 1.25;
    margin-bottom: 0.85rem;
  }

  .hero-subtitle {
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
    padding: 0 0.25rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero-cta .btn {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 0.92rem;
    justify-content: center;
  }

  .hero-badges {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    font-size: 0.8rem;
  }

  .hero-badges span {
    justify-content: center;
    padding: 0.45rem 0.75rem;
  }

  .grid-auto-fit-260 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Fixed Bottom Navigation Bar for Mobile */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(9, 13, 22, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 999;
    justify-content: space-around;
    align-items: center;
    padding: 0 0.25rem;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6);
  }

  .mobile-nav-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    flex: 1;
    height: 100%;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    padding: 0.15rem 0;
    position: relative;
  }

  .mobile-nav-item:active {
    transform: scale(0.93);
  }

  .mobile-nav-item i {
    font-size: 1.15rem;
    transition: transform 0.25s ease, color 0.25s ease, filter 0.25s ease;
  }

  .mobile-nav-item:hover, .mobile-nav-item.active {
    color: #818cf8;
  }

  .mobile-nav-item.active i {
    color: #a78bfa;
    transform: translateY(-2px) scale(1.08);
    filter: drop-shadow(0 4px 10px rgba(167, 139, 250, 0.6));
  }

  .mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    width: 22px;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #38bdf8);
    border-radius: 99px;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.8);
  }

  .nav-tabs {
    padding: 0.5rem 0.75rem;
    gap: 0.35rem;
  }

  .tab-btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
  }

  main {
    padding: 1rem 0.65rem;
  }

  .card {
    padding: 1.1rem;
    margin-bottom: 1.15rem;
    border-radius: 0.85rem;
  }

  .inspector-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .screenshot-frame {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
  }

  .screenshot-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .card-header > div {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .card-header .btn {
    flex: 1;
    min-width: 130px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .stat-card {
    padding: 0.85rem 1rem;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .status-cards-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .status-metric-card {
    padding: 0.75rem 0.9rem;
    border-radius: 0.6rem;
  }

  .status-metric-value {
    font-size: 0.88rem;
  }

  /* Modal responsiveness */
  .modal-card {
    padding: 1.35rem 1.15rem;
    max-width: 95%;
    border-radius: 1rem;
  }

  /* Toast Notification positioning on Mobile */
  #toast-container {
    top: auto;
    bottom: 4.8rem;
    left: 0.75rem;
    right: 0.75rem;
    max-width: none;
    width: auto;
  }
}

/* Desktop Hide Mobile Only Elements */
@media (min-width: 769px) {
  .mobile-hamburger-btn {
    display: none !important;
  }

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

/* Small Mobile Screens (<= 480px) */
@media (max-width: 480px) {
  header {
    padding: 0.6rem 0.65rem;
  }

  .logo span {
    font-size: 0.95rem;
  }

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

  .status-cards-grid {
    grid-template-columns: 1fr;
  }

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

  th, td {
    padding: 0.6rem 0.5rem;
    font-size: 0.78rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}


/* ==========================================================================
   LIVE INSPECTOR & SCREENSHOT STREAMING PANEL
   ========================================================================== */
#card-live-inspector {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.inspector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.inspector-grid > div {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.inspector-sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
  flex-wrap: wrap;
  max-width: 100%;
  min-width: 0;
}

.inspector-sub-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.max-w-180 {
  max-width: 180px;
}

.screenshot-frame {
  width: 100%;
  max-width: 100%;
  background: #060911;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  aspect-ratio: 16 / 9;
}

.screenshot-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  display: block;
  border-radius: 0.75rem;
}

.inspector-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  max-width: 100%;
  min-width: 0;
}

.active-account-badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(30, 41, 59, 0.6);
  padding: 0.25rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   SMART INTELLIGENCE — Log Colorization & AI Features
   ========================================================================== */

/* Scrollable Live Console Terminal Window */
#live-console-terminal {
  background: #060911;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  height: 280px;
  max-height: 340px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: 'Consolas', 'Fira Code', 'Monaco', 'Courier New', monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: #e2e8f0;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.6);
  margin-bottom: 0.85rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.5) rgba(15, 23, 42, 0.7);
}

#live-console-terminal::-webkit-scrollbar {
  width: 6px;
}

#live-console-terminal::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.7);
  border-radius: 99px;
}

#live-console-terminal::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.5);
  border-radius: 99px;
}

#live-console-terminal::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.8);
}

/* Colorized terminal log lines */
#live-console-terminal .log-success  { color: #34d399; }
#live-console-terminal .log-error    { color: #f87171; font-weight: 600; }
#live-console-terminal .log-warning  { color: #fbbf24; }
#live-console-terminal .log-critical {
  color: #ff6b6b;
  font-weight: 700;
  background: rgba(239,68,68,0.15);
  border-left: 3px solid #ef4444;
  padding-left: 6px;
  display: block;
  margin: 2px 0;
  animation: pulse-alert 1.2s ease-in-out infinite;
}
#live-console-terminal .log-timer    { color: #93c5fd; }
#live-console-terminal .log-active   { color: #c084fc; font-weight: 600; }
#live-console-terminal .log-cloudflare { color: #f59e0b; }
#live-console-terminal .log-dim      { color: #64748b; font-size: 0.75rem; }

@keyframes pulse-alert {
  0%, 100% { background: rgba(239,68,68,0.15); }
  50%       { background: rgba(239,68,68,0.30); }
}

/* Connection quality badge */
.conn-quality-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.4s;
}
.conn-quality-badge.good    { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.conn-quality-badge.fair    { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.conn-quality-badge.poor    { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.conn-quality-badge.offline { background: rgba(100,116,139,0.15);color: #64748b; border: 1px solid rgba(100,116,139,0.3); }

/* Slot found banner animation */
@keyframes slot-flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.6); }
  50%       { box-shadow: 0 0 0 10px rgba(16,185,129,0); }
}
.slot-found-alert {
  animation: slot-flash 0.9s ease-in-out infinite;
  border-color: var(--success) !important;
}

/* Smart ETA badge */
.smart-eta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(56,189,248,0.12);
  border: 1px solid rgba(56,189,248,0.3);
  color: #38bdf8;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Notification permission button */
.notif-btn {
  background: none;
  border: 1px solid rgba(167,139,250,0.4);
  color: #a78bfa;
  padding: 0.25rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}
.notif-btn:hover {
  background: rgba(167,139,250,0.15);
}


/* ==========================================================================
   ADMIN PANEL — Premium UI
   ========================================================================== */

/* ── KPI Stat Cards ───────────────────────────────────────────────────── */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.admin-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 0.9rem;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.admin-kpi-card:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.admin-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 1rem 1rem 0 0;
}
.admin-kpi-card.kpi-blue::before  { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.admin-kpi-card.kpi-green::before { background: linear-gradient(90deg, #10b981, #34d399); }
.admin-kpi-card.kpi-amber::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.admin-kpi-card.kpi-purple::before{ background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

.kpi-icon {
  width: 42px; height: 42px;
  border-radius: 0.6rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.kpi-icon.blue  { background: rgba(59,130,246,0.15);  color: #60a5fa; }
.kpi-icon.green { background: rgba(16,185,129,0.15);  color: #34d399; }
.kpi-icon.amber { background: rgba(245,158,11,0.15);  color: #fbbf24; }
.kpi-icon.purple{ background: rgba(139,92,246,0.15);  color: #a78bfa; }

.kpi-info { flex: 1; min-width: 0; }
.kpi-value {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-main);
  letter-spacing: -0.03em;
}
.kpi-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  font-weight: 700;
  animation: kpi-pulse 1.8s ease-in-out infinite;
}
.kpi-badge.pending { background: rgba(245,158,11,0.2); color: #fbbf24; border: 1px solid rgba(245,158,11,0.4); }
@keyframes kpi-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ── Admin Sub-Navigation Pills ──────────────────────────────────────── */
.admin-sub-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  flex-wrap: nowrap;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 0.5rem;
  margin-bottom: 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.admin-sub-nav::-webkit-scrollbar {
  height: 4px;
}
.admin-sub-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.admin-sub-nav-btn {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.55rem 1rem;
  border-radius: 0.65rem;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
}
.admin-sub-nav-btn:hover {
  background: rgba(59, 130, 246, 0.12);
  color: #f8fafc;
  border-color: rgba(59, 130, 246, 0.25);
  transform: translateY(-1px);
}
.admin-sub-nav-btn.active {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
  font-weight: 700;
}
.admin-sub-nav-btn .notif-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  color: #ffffff;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  margin-left: 0.2rem;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

/* ── Admin Section Panels ─────────────────────────────────────────────── */
.admin-section { display: none; }
.admin-section.active { display: block; }

/* ── Enhanced Admin Table ─────────────────────────────────────────────── */
.admin-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 0.85rem;
  overflow: hidden;
}
.admin-table-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-card);
  flex-wrap: wrap;
}
.admin-search-input {
  flex: 1;
  min-width: 200px;
  background: rgba(15,23,42,0.8);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  padding: 0.45rem 0.85rem 0.45rem 2.2rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
  position: relative;
}
.admin-search-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.admin-search-wrapper .search-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.8rem;
  pointer-events: none;
}
.admin-search-input:focus { border-color: var(--primary); }
.admin-filter-select {
  background: rgba(15,23,42,0.8);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.82rem;
  cursor: pointer;
  outline: none;
}
.admin-table-wrapper table { border-radius: 0; border: none; }
.admin-table-wrapper table th { background: rgba(15,23,42,0.9); position: sticky; top: 0; z-index: 2; }
.admin-table-wrapper table tr { transition: background 0.15s; }
.admin-table-wrapper table tr:hover td { background: rgba(59,130,246,0.05); }

/* ── Modern Table Badges & Action Groups ──────────────────────────────── */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.badge-pill-green {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.badge-pill-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.badge-pill-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.badge-pill-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-pill-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.badge-pill-gray {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.table-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-action-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-action-icon:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}
.btn-action-icon-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.cell-id {
  font-weight: 700;
  color: #64748b;
  font-size: 0.82rem;
}

/* ── VAC Countries Collapsible Accordion & Destination Selector ───────── */
.country-group-header-row {
  cursor: pointer;
  background: rgba(30, 41, 59, 0.75) !important;
  border-top: 1px solid rgba(59, 130, 246, 0.3) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  transition: all 0.2s ease;
}
.country-group-header-row:hover {
  background: rgba(59, 130, 246, 0.15) !important;
}
.country-group-header-row td {
  padding: 0.75rem 1rem !important;
}
.vac-collapse-toggle-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}
.country-group-header-row:hover .vac-collapse-toggle-btn {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: scale(1.05);
}
.vac-child-row {
  background: rgba(15, 23, 42, 0.4);
  transition: background 0.15s ease;
}
.vac-child-row:hover {
  background: rgba(59, 130, 246, 0.08) !important;
}

.dest-multiselect-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: rgba(15, 23, 42, 0.6);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-height: 180px;
  overflow-y: auto;
}
.dest-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}
.dest-chip:hover {
  border-color: rgba(59, 130, 246, 0.5);
  color: #f8fafc;
  background: rgba(59, 130, 246, 0.08);
}
.dest-chip input[type="checkbox"] {
  accent-color: #3b82f6;
  width: 14px;
  height: 14px;
  cursor: pointer;
}
.dest-chip.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #60a5fa;
}

/* ── Status badges ─────────────────────────────────────────────────────── */
.sb { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.65rem; border-radius: 9999px; font-size: 0.72rem; font-weight: 700; }
.sb-approved { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.sb-pending  { background: rgba(245,158,11,0.15);  color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.sb-rejected { background: rgba(239,68,68,0.15);   color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.sb-admin    { background: rgba(139,92,246,0.15);  color: #a78bfa; border: 1px solid rgba(139,92,246,0.3); }

/* ── Health Score Bar ──────────────────────────────────────────────────── */
.health-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 90px;
}
.health-bar-track {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.07);
  border-radius: 9999px;
  overflow: hidden;
}
.health-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.6s ease;
}
.health-label { font-size: 0.7rem; font-weight: 700; min-width: 28px; text-align: right; }

/* ── Action button group ─────────────────────────────────────────────── */
.admin-action-group { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.admin-action-group .btn { padding: 0.25rem 0.6rem; font-size: 0.75rem; }

/* ── Settings group card ─────────────────────────────────────────────── */
.settings-group {
  border: 1px solid var(--border-card);
  border-radius: 0.75rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.settings-group-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: rgba(15,23,42,0.7);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-card);
}
.settings-group-body {
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

/* ── Payment card rows ─────────────────────────────────────────────────── */
.payment-amount-large {
  font-size: 1.05rem;
  font-weight: 800;
  color: #34d399;
}
.proof-thumb {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 0.35rem;
  border: 1px solid var(--border-card);
  cursor: pointer;
  transition: transform 0.2s;
}
.proof-thumb:hover { transform: scale(1.15); }

/* ── Cron code blocks ─────────────────────────────────────────────────── */
.cron-card {
  background: rgba(9,13,22,0.9);
  border: 1px solid var(--border-card);
  border-radius: 0.65rem;
  padding: 1rem 1.1rem;
  transition: border-color 0.2s;
}
.cron-card:hover { border-color: rgba(59,130,246,0.4); }
.cron-card pre {
  background: #090d16;
  padding: 0.6rem;
  border-radius: 0.35rem;
  font-size: 0.73rem;
  color: #38bdf8;
  overflow-x: auto;
  user-select: all;
  margin: 0;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .admin-kpi-grid { grid-template-columns: 1fr 1fr; }
  .admin-sub-nav-btn { font-size: 0.72rem; padding: 0.4rem 0.5rem; }
  .settings-group-body { grid-template-columns: 1fr; }
}

/* ==========================================================================
   UTILITY / LAYOUT HELPERS  — replaces all inline style="" in index.html
   ========================================================================== */

/* ── Visibility helpers (JS-toggled) ─────────────────────────────────── */
.hidden       { display: none !important; }
.d-flex       { display: flex; }
.d-grid       { display: grid; }
.d-block      { display: block; }
.d-inline-flex{ display: inline-flex; }

/* ── Flex helpers ─────────────────────────────────────────────────────── */
.flex-col      { flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-center{ justify-content: center; }
.justify-end   { justify-content: flex-end; }
.justify-between{ justify-content: space-between; }
.gap-xs  { gap: 0.35rem; }
.gap-sm  { gap: 0.5rem; }
.gap-md  { gap: 0.75rem; }
.gap-lg  { gap: 1rem; }
.gap-xl  { gap: 1.5rem; }
.gap-2xl { gap: 2rem; }
.flex-1  { flex: 1; }

/* ── Spacing ─────────────────────────────────────────────────────────── */
.mt-xs { margin-top: 0.35rem; }
.mt-sm { margin-top: 0.5rem; }
.mt-md { margin-top: 1rem; }
.mt-lg { margin-top: 1.5rem; }
.mt-xl { margin-top: 2rem; }
.mb-sm { margin-bottom: 0.5rem; }
.mb-md { margin-bottom: 0.75rem; }
.mb-lg { margin-bottom: 1rem; }
.mb-xl { margin-bottom: 1.5rem; }
.mb-2xl{ margin-bottom: 2rem; }
.m-0   { margin: 0; }

/* ── Grid helpers ─────────────────────────────────────────────────────── */
.grid-auto-fit-260 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.grid-auto-fit-300 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.grid-auto-fit-250 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.grid-2-halves     { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.grid-col-1        { grid-template-columns: 1fr !important; }

/* ── Text helpers ────────────────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.text-main    { color: var(--text-main); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-accent  { color: var(--accent); }
.text-danger  { color: var(--danger); }
.text-info    { color: #38bdf8; }
.text-purple  { color: #a78bfa; }
.text-pink    { color: #f472b6; }
.text-sm      { font-size: 0.85rem; }
.text-xs      { font-size: 0.78rem; }
.text-tiny    { font-size: 0.75rem; }
.text-base    { font-size: 0.9rem; }
.text-lg      { font-size: 1.05rem; }
.text-xl      { font-size: 1.1rem; }
.text-2xl     { font-size: 1.25rem; }
.fw-600       { font-weight: 600; }
.fw-700       { font-weight: 700; }
.fw-800       { font-weight: 800; }
.lh-15        { line-height: 1.5; }
.lh-16        { line-height: 1.6; }
.lh-18        { line-height: 1.8; }

/* ── Width / sizing helpers ──────────────────────────────────────────── */
.w-full      { width: 100%; }
.w-fit       { width: fit-content; }
.max-w-750   { max-width: 750px; margin-left: auto; margin-right: auto; }
.max-w-700   { max-width: 700px; }
.max-w-180   { max-width: 180px; }

/* ── Padding helpers ─────────────────────────────────────────────────── */
.p-sm        { padding: 0.6rem 1.5rem; }
.p-btn-lg    { padding: 0.8rem 2rem; }
.p-btn-md    { padding: 0.8rem 1.5rem; }

/* ── Border / background helpers ─────────────────────────────────────── */
.border-top-subtle { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 1rem; }
.no-underline { text-decoration: none !important; }

/* ── JS Status Text Badges ───────────────────────────────────────────── */
.status-text-success { color: var(--success); font-weight: 700; }
.status-text-danger  { color: var(--danger); font-weight: 700; }
.status-text-warning { color: var(--warning); font-weight: 700; }
.status-text-info    { color: #38bdf8; font-weight: 700; }
.status-text-muted   { color: var(--text-muted); font-weight: 400; }
.status-text-amber   { color: #fbbf24; }
.status-text-purple  { color: #a78bfa; }
.status-text-pink    { color: #f472b6; }

/* ── Pill Badges & Form Controls ─────────────────────────────────────── */
.plan-pill-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  display: inline-block;
}
.method-pill-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  display: inline-block;
}
.admin-select-sm {
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
  max-width: 140px;
  background: rgba(15,23,42,0.8);
  border-color: var(--border-card);
}




/* ── Feature card icon boxes ─────────────────────────────────────────── */
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.feature-icon.blue   { background: rgba(59,130,246,0.15);  color: var(--primary); }
.feature-icon.amber  { background: rgba(245,158,11,0.15);  color: var(--warning); }
.feature-icon.green  { background: rgba(34,197,94,0.15);   color: var(--success); }
.feature-icon.purple { background: rgba(168,85,247,0.15);  color: #c084fc; }

.feature-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}
.feature-card-body {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ── Plan card list ──────────────────────────────────────────────────── */
.plan-list { margin: 1.5rem 0; }
.plan-card-title { font-size: 1.25rem; font-weight: 700; margin-top: 0.5rem; }
.plan-card-sub   { color: var(--text-muted); margin-top: 0.5rem; }
.plan-price-wrap { margin-top: 1rem; }

/* ── Dashboard inspector panel ──────────────────────────────────────── */
.inspector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.inspector-sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.inspector-sub-title {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.inspector-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.screenshot-frame {
  background: rgba(15,23,42,0.8);
  border: 1px solid var(--border-card);
  border-radius: 0.5rem;
  padding: 0.5rem;
  text-align: center;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.screenshot-img {
  max-width: 100%;
  border-radius: 0.35rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.active-account-badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56,189,248,0.12);
  border: 1px solid rgba(56,189,248,0.3);
  padding: 0.15rem 0.55rem;
  border-radius: 1rem;
}
#robot-countdown-box {
  margin-top: 0.65rem;
  padding: 0.55rem 0.85rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}
body.light-theme #robot-countdown-box {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.robot-status-row {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 0.25rem !important;
}

.robot-status-title-wrap {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
body.light-theme .robot-status-title-wrap {
  color: #64748b;
}

.robot-countdown-value {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
}
/* status metric card colors */
.smc-blue   { color: #38bdf8; }
.smc-green  { color: #34d399; }
.smc-green2 { color: #22c55e; }
.smc-amber  { color: #f59e0b; }
.smc-purple { color: #a78bfa; }
.smc-sky    { color: #38bdf8; }
.smc-pink   { color: #f472b6; }

/* ── Config tab hint box ─────────────────────────────────────────────── */
.hint-box {
  background: rgba(59,130,246,0.08);
  border: 1px solid var(--border-card);
  padding: 0.85rem 1.1rem;
  border-radius: 0.55rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
}
.hint-box ul  { margin-left: 1.2rem; color: var(--text-main); line-height: 1.7; }

/* ── Config/settings form grid ───────────────────────────────────────── */
.config-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

/* ── Telegram warning box ─────────────────────────────────────────────── */
.tg-warning-box {
  background: rgba(234,179,8,0.1);
  border: 1px solid var(--warning);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: #fde047;
}
.tg-warning-box ol { margin-left: 1.2rem; margin-top: 0.4rem; line-height: 1.6; }

/* ── Telegram info box ────────────────────────────────────────────────── */
.tg-info-box {
  background: rgba(59,130,246,0.1);
  border: 1px solid var(--primary);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}
.tg-info-box h4  { color: var(--primary); margin-bottom: 0.5rem; }
.tg-info-box ul  { margin-left: 1.2rem; font-size: 0.85rem; color: var(--text-main); line-height: 1.6; }

/* ── Payment deposit gateway info box ────────────────────────────────── */
.gateway-info-box {
  background: rgba(59,130,246,0.1);
  border: 1px solid var(--primary);
  padding: 1rem;
  border-radius: 0.5rem;
}

/* ── Form inline row (checkbox + label) ──────────────────────────────── */
.form-check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.form-check-row label { margin: 0; }

/* ── Cron info box ────────────────────────────────────────────────────── */
.cron-info-box {
  background: rgba(59,130,246,0.07);
  border: 1px solid var(--border-card);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.cron-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}
.cron-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* ── Admin toolbar section title ──────────────────────────────────────── */
.toolbar-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   ENHANCED ADMIN CONTROL PANEL (SaaS PREMIUM)
   ========================================================================== */
.admin-master-header {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.admin-sub-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.4rem;
  margin-bottom: 1.5rem;
}

.admin-sub-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted, #94a3b8);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.admin-sub-nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.1);
}

.admin-sub-nav-btn.active {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff !important;
  border-color: #3b82f6;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.admin-sub-nav-btn.active i {
  color: #ffffff !important;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-kpi-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.admin-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  border-color: rgba(99, 102, 241, 0.3);
}

.admin-kpi-card .kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.admin-kpi-card .kpi-icon.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

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

.admin-kpi-card .kpi-icon.green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.admin-kpi-card .kpi-icon.purple {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.admin-kpi-card .kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.2;
}

.admin-kpi-card .kpi-label {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* ── Admin pays section grid ──────────────────────────────────────────── */
.pays-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
}

/* ── Systeme payment gateways section ─────────────────────────────────── */
.gateways-section { margin-top: 1.5rem; }
.gateways-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Admin form button row ────────────────────────────────────────────── */
.admin-btn-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

/* ── Footer layout ────────────────────────────────────────────────────── */
.platform-footer {
  margin-top: 4.5rem;
  padding-top: 2.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-brand-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-links { line-height: 2; list-style: none; }
.footer-links a { 
  text-decoration: none; 
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}
.footer-links a.primary { color: var(--primary); }
.footer-links a.primary:hover { color: #60a5fa !important; transform: translateX(3px); }
.footer-links a.muted   { color: #94a3b8; }
.footer-links a.muted:hover, .footer-links a.hover-primary:hover { 
  color: #38bdf8 !important; 
  transform: translateX(3px); 
}
.footer-health          { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-copyright {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 1.25rem;
}
.feature-card-showcase {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.feature-card-showcase:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.55);
  border-color: rgba(99, 102, 241, 0.45) !important;
}

/* ── Modal utilities ──────────────────────────────────────────────────── */
.modal-img-preview {
  max-width: 100%;
  max-height: 500px;
  border-radius: 0.5rem;
  border: 1px solid var(--border-card);
  margin-top: 1rem;
}
.modal-wide { max-width: 700px; text-align: center; }
.modal-footer-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.25rem;
}
.modal-confirm-btns {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}
.modal-view-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.modal-deposit-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  display: block;
}

/* ── Small form note ──────────────────────────────────────────────────── */
.form-note { color: var(--text-muted); font-size: 0.75rem; }

/* ── Heading helpers ──────────────────────────────────────────────────── */
.section-subheading { margin-bottom: 1rem; color: var(--text-muted); }
.inline-value-badge { color: var(--warning); }
.inline-value-badge-accent { color: var(--accent); }

/* ── Responsive ───────────────────────────────────────────────────────── */
.header-top-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-hamburger-btn {
  display: none;
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem 0.85rem;
    gap: 0.4rem;
  }
  
  .header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .header-right-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  body.light-theme .header-right-group {
    border-top-color: rgba(0, 0, 0, 0.08);
  }

  .icon-nav-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .flag-radio-card {
    padding: 2px 4px !important;
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  .flag-radio-content {
    padding: 3px 5px !important;
  }

  .user-avatar-btn {
    height: 34px !important;
    padding: 0.25rem 0.55rem !important;
    font-size: 0.8rem !important;
  }

  .mobile-hamburger-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
  }

  .nav-tabs {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 0.5rem;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    gap: 0.35rem;
  }

  body.light-theme .nav-tabs {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  }

  .nav-tabs.mobile-open {
    display: flex !important;
    animation: creneau-slide-in 0.2s ease-out;
  }

  .nav-tabs .tab-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.88rem;
  }

  .pays-layout { grid-template-columns: 1fr; }
  .hero-title  { font-size: 1.8rem; }
  .inspector-grid { grid-template-columns: 1fr; }
}

/* ══ CUSTOM FLAG & OFFICE DROPDOWNS ══ */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  min-height: 42px;
}

body.light-theme .custom-select-trigger {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.15);
}

.custom-select-trigger:hover:not(.disabled) {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.custom-select-trigger.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: rgba(15, 23, 42, 0.4);
}

.custom-select-selected-content {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  margin-left: 0.5rem;
}

.custom-select-wrapper.open {
  z-index: 99999;
}

.custom-select-wrapper.open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(99, 102, 241, 0.2);
  max-height: 240px;
  overflow-y: auto;
  z-index: 999999;
  display: none;
  padding: 0.35rem;
}

body.light-theme .custom-select-menu {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.custom-select-wrapper.open .custom-select-menu {
  display: block;
  animation: creneau-slide-in 0.15s ease-out;
}

.custom-select-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

body.light-theme .custom-select-option {
  color: #1e293b;
}

.custom-select-option:hover {
  background: rgba(99, 102, 241, 0.18);
  color: var(--primary);
}

.custom-select-option.selected {
  background: rgba(99, 102, 241, 0.25);
  color: #818cf8;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════════
   PREMIUM SAAS ADMIN DASHBOARD SYSTEM (COMPACT & MODERN)
══════════════════════════════════════════════════════════════════ */

/* ── Admin Sub-Navigation Pill Bar ────────────────────────────── */
.admin-sub-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.35rem 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: nowrap;
}
.admin-sub-nav::-webkit-scrollbar {
  display: none;
}
body.light-theme .admin-sub-nav {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.08);
}

.admin-sub-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  position: relative;
  flex-shrink: 0;
}
.admin-sub-nav-btn i {
  font-size: 0.85rem;
}
.admin-sub-nav-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}
body.light-theme .admin-sub-nav-btn:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.05);
}
.admin-sub-nav-btn.active {
  color: #ffffff !important;
  background: #2563eb !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
body.light-theme .admin-sub-nav-btn.active {
  color: #ffffff !important;
  background: #2563eb !important;
}

/* ── Admin Table Wrapper & Toolbar ────────────────────────────── */
.admin-table-wrapper {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
}
body.light-theme .admin-table-wrapper {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

.admin-table-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: rgba(30, 41, 59, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}
body.light-theme .admin-table-toolbar {
  background: #f8fafc;
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.admin-table-toolbar .toolbar-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fafc;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}
body.light-theme .admin-table-toolbar .toolbar-title {
  color: #0f172a;
}

.admin-search-wrapper {
  position: relative;
  min-width: 160px;
  max-width: 220px;
  flex: 1;
}
.admin-search-wrapper .search-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: #64748b;
  pointer-events: none;
}
.admin-search-input {
  width: 100%;
  height: 32px;
  padding: 0 0.5rem 0 1.75rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #f1f5f9;
  font-size: 0.78rem;
  outline: none;
  transition: all 0.15s ease;
}
body.light-theme .admin-search-input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #0f172a;
}
.admin-search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.admin-filter-select {
  height: 32px;
  padding: 0 0.55rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}
body.light-theme .admin-filter-select {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #334155;
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.8rem;
}

/* ── Modern Compact Table ─────────────────────────────────────── */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}
table.admin-compact-table,
.admin-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.admin-table-wrapper th {
  background: rgba(30, 41, 59, 0.6);
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}
body.light-theme .admin-table-wrapper th {
  background: #f1f5f9;
  color: #64748b;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.admin-table-wrapper td {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  vertical-align: middle;
  font-size: 0.8rem;
}
body.light-theme .admin-table-wrapper td {
  border-bottom-color: rgba(0, 0, 0, 0.04);
  color: #334155;
}

.admin-table-wrapper tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}
body.light-theme .admin-table-wrapper tbody tr:hover {
  background: rgba(0, 0, 0, 0.015);
}

/* ── Table Cell Refinements ───────────────────────────────────── */
.cell-id {
  font-family: monospace;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 700;
  width: 38px;
}
.cell-username {
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
}
body.light-theme .cell-username {
  color: #0f172a;
}
.cell-email {
  color: #94a3b8;
  font-size: 0.76rem;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-date {
  font-size: 0.74rem;
  color: #cbd5e1;
  line-height: 1.15;
}
.cell-time {
  font-size: 0.68rem;
  color: #64748b;
}
.cell-balance {
  font-weight: 700;
  color: #a78bfa;
  font-size: 0.82rem;
  white-space: nowrap;
}
.cell-balance small {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 500;
}

/* ── Micro Pill Badges ────────────────────────────────────────── */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 5px;
  white-space: nowrap;
}
.badge-pill i {
  font-size: 0.75rem;
}
.badge-pill-cyan {
  background: rgba(6, 182, 212, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.badge-pill-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-pill-green {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-pill-purple {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.badge-pill-gray {
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

/* ── Action Buttons in Table ──────────────────────────────────── */
.table-actions-group {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-action-approve {
  background: #059669;
  color: #ffffff;
}
.btn-action-approve:hover {
  background: #10b981;
}
.btn-action-revoke {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-action-revoke:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}
.btn-action-icon {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  border-radius: 5px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-action-icon:hover {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.1);
}
.btn-action-icon-danger:hover {
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  background: rgba(239, 68, 68, 0.12) !important;
}

/* ── User Profile Dropdown Menu & 2-Tier Status Badges ─────────── */
.user-profile-dropdown {
  position: relative;
  display: inline-block;
}

.user-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  min-height: 36px;
}
body.light-theme .user-avatar-btn {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}
.user-avatar-btn:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 230px;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(99, 102, 241, 0.15);
  padding: 0.5rem;
  z-index: 999999;
  display: none;
}
body.light-theme .profile-dropdown-menu {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}
.profile-dropdown-menu.open,
.user-profile-dropdown.open .profile-dropdown-menu {
  display: block;
  animation: creneau-slide-in 0.15s ease-out;
}

.dropdown-header {
  padding: 0.4rem 0.5rem 0.5rem 0.5rem;
}
.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.35rem 0;
}
body.light-theme .dropdown-divider {
  background: rgba(0, 0, 0, 0.08);
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
body.light-theme .dropdown-item {
  color: #334155;
}
.dropdown-item:hover {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
}
.dropdown-item.text-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Hide header 2-tier badges on mobile/tablets to keep header clean and wide */
.user-tier-badges-container {
  display: flex;
  align-items: center;
  gap: 6px;
}
@media (max-width: 900px) {
  .user-tier-badges-container {
    display: none !important;
  }
}

/* ── Terminal Floating Copy Action Button ── */
.terminal-action-copy-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  border-radius: 6px;
  cursor: pointer;
  z-index: 15;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  font-size: 0.85rem;
}
body.light-theme .terminal-action-copy-btn {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.15);
  color: #475569;
}
.terminal-action-copy-btn:hover {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 0.18);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.35);
  transform: scale(1.05);
}

/* ── Real-time Status Metric Cards (2 Columns Desktop) ── */
.status-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

@media (max-width: 768px) {
  .status-cards-grid {
    grid-template-columns: 1fr !important;
  }
}

.status-metric-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3.5px solid #6366f1;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: all 0.2s ease;
  min-width: 0;
}
body.light-theme .status-metric-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  border-left: 3.5px solid #6366f1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.status-metric-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(15, 23, 42, 0.9);
  transform: translateY(-1px);
}
.status-metric-card:nth-child(1) { border-left-color: #38bdf8; }
.status-metric-card:nth-child(2) { border-left-color: #10b981; }
.status-metric-card:nth-child(3) { border-left-color: #f59e0b; }
.status-metric-card:nth-child(4) { border-left-color: #a78bfa; }
.status-metric-card:nth-child(5) { border-left-color: #38bdf8; }
.status-metric-card:nth-child(6) { border-left-color: #f472b6; }

.status-metric-header {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
body.light-theme .status-metric-header {
  color: #64748b;
}

.status-metric-value {
  font-size: 0.83rem;
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.light-theme .status-metric-value {
  color: #0f172a;
}

/* ==========================================================================
   SLEEK COMPACT DATA TABLES (Accounts & Admin)
   ========================================================================== */
#tab-accounts table, #tab-admin table {
  width: 100%;
  border-collapse: collapse;
}

#tab-accounts th, #tab-admin th {
  padding: 0.65rem 0.75rem !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border-bottom: 1px solid var(--border-card) !important;
  white-space: nowrap !important;
}

#tab-accounts td, #tab-admin td {
  padding: 0.65rem 0.75rem !important;
  font-size: 0.82rem !important;
  vertical-align: middle !important;
  border-bottom: 1px solid var(--border-card) !important;
}

#tab-accounts tr:hover td, #tab-admin tr:hover td {
  background: rgba(255, 255, 255, 0.025) !important;
}

/* ══ WhatsApp Floating Widget ══ */
.whatsapp-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #ffffff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  z-index: 9998;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.whatsapp-float-btn:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.6);
  color: #ffffff !important;
}

.whatsapp-float-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  border: 1.5px solid #25D366;
  animation: waPulse 2s infinite;
  opacity: 0.7;
  pointer-events: none;
}

@keyframes waPulse {
  0% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.22); opacity: 0; }
  100% { transform: scale(1.22); opacity: 0; }
}

@media (max-width: 768px) {
  .whatsapp-float-btn {
    bottom: 78px !important;
    right: 16px !important;
    width: 42px !important;
    height: 42px !important;
    font-size: 21px !important;
  }
}

.grid-col-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.grid-col-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

/* ══ Flatpickr Dark Custom Styling ═════════════════════════════════════ */
.flatpickr-calendar {
  background: #0f172a !important;
  border: 1px solid rgba(59, 130, 246, 0.4) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75), 0 0 24px rgba(56, 189, 248, 0.25) !important;
  border-radius: 12px !important;
  z-index: 999999 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}
.flatpickr-months {
  background: rgba(30, 41, 59, 0.95) !important;
  border-radius: 12px 12px 0 0 !important;
  padding: 6px 0 !important;
}
.flatpickr-months .flatpickr-month {
  color: #f8fafc !important;
  fill: #f8fafc !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  font-weight: 700 !important;
  color: #f8fafc !important;
  font-size: 1rem !important;
}
.flatpickr-months .flatpickr-prev-month, 
.flatpickr-months .flatpickr-next-month {
  fill: #38bdf8 !important;
  color: #38bdf8 !important;
}
.flatpickr-months .flatpickr-prev-month:hover svg, 
.flatpickr-months .flatpickr-next-month:hover svg {
  fill: #60a5fa !important;
}
.flatpickr-weekday {
  color: #94a3b8 !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
}
.flatpickr-day {
  color: #e2e8f0 !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  transition: all 0.15s ease !important;
}
.flatpickr-day:hover, .flatpickr-day:focus {
  background: rgba(56, 189, 248, 0.25) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange {
  background: #2563eb !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.6) !important;
}
.flatpickr-day.today {
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
}
.flatpickr-day.flatpickr-disabled, .flatpickr-day.flatpickr-disabled:hover {
  color: #475569 !important;
}
.flatpickr-date:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
}

/* ══ Statut du Compte - Radio Buttons ══ */
.status-radio-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.status-radio-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.status-radio-card:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.status-radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.status-radio-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.status-radio-circle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  transform: scale(0);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-radio-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}

.status-radio-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
}

.status-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

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

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

.status-radio-desc {
  font-size: 0.76rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.3;
}

/* Checked State - Actif */
.status-radio-card:has(input[value="active"]:checked),
.status-radio-card.selected-active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.25), inset 0 0 12px rgba(16, 185, 129, 0.08);
}

.status-radio-card:has(input[value="active"]:checked) .status-radio-indicator,
.status-radio-card.selected-active .status-radio-indicator {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.2);
}

.status-radio-card:has(input[value="active"]:checked) .status-radio-circle,
.status-radio-card.selected-active .status-radio-circle {
  background: #10b981;
  transform: scale(1);
  box-shadow: 0 0 8px #10b981;
}

/* Checked State - En pause */
.status-radio-card:has(input[value="paused"]:checked),
.status-radio-card.selected-paused {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25), inset 0 0 12px rgba(245, 158, 11, 0.08);
}

.status-radio-card:has(input[value="paused"]:checked) .status-radio-indicator,
.status-radio-card.selected-paused .status-radio-indicator {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.2);
}

.status-radio-card:has(input[value="paused"]:checked) .status-radio-circle,
.status-radio-card.selected-paused .status-radio-circle {
  background: #f59e0b;
  transform: scale(1);
  box-shadow: 0 0 8px #f59e0b;
}

/* Checked State - Handled (RDV Trouvé) */
.status-radio-card:has(input[value="handled"]:checked),
.status-radio-card.selected-handled {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.25), inset 0 0 12px rgba(16, 185, 129, 0.08);
}

.status-radio-card:has(input[value="handled"]:checked) .status-radio-indicator,
.status-radio-card.selected-handled .status-radio-indicator {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.2);
}

.status-radio-card:has(input[value="handled"]:checked) .status-radio-circle,
.status-radio-card.selected-handled .status-radio-circle {
  background: #10b981;
  transform: scale(1);
  box-shadow: 0 0 8px #10b981;
}

@media (max-width: 600px) {
  .status-radio-group {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* ══════════════════════════════════════════════════════════════════
   LATERAL (SIDEBAR) NAVIGATION LAYOUT FOR ADMIN & RESELLER PANELS
══════════════════════════════════════════════════════════════════ */

.lateral-dashboard-layout {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  width: 100%;
  margin-top: 1rem;
}

/* Vertical Lateral Sidebar Navigation */
.lateral-sidebar-nav {
  width: 250px;
  min-width: 250px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 80px;
  z-index: 10;
}

body.light-theme .lateral-sidebar-nav {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.lateral-sidebar-header {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 0.4rem 0.75rem 0.25rem 0.75rem;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Lateral Navigation Buttons */
.lateral-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.68rem 0.95rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #94a3b8;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  user-select: none;
}

.lateral-nav-btn i {
  font-size: 0.95rem;
  width: 20px;
  text-align: center;
  transition: transform 0.2s ease;
}

.lateral-nav-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
}

body.light-theme .lateral-nav-btn:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.05);
}

.lateral-nav-btn:hover i {
  transform: scale(1.15);
}

.lateral-nav-btn.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  border-color: rgba(96, 165, 250, 0.5) !important;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
  font-weight: 700;
}

.lateral-nav-btn.active i {
  color: #ffffff !important;
}

.lateral-nav-btn .notif-dot {
  margin-left: auto;
}

/* Lateral Main Content Area */
.lateral-main-content {
  flex: 1;
  min-width: 0; /* Prevents overflow from tables */
  width: calc(100% - 270px);
}

/* Reseller Section switching */
.reseller-section {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

.reseller-section.active {
  display: block;
}

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

/* Responsive Behavior for Lateral Sidebars */
@media (max-width: 992px) {
  .lateral-dashboard-layout {
    flex-direction: column;
    gap: 1rem;
  }

  .lateral-sidebar-nav {
    width: 100%;
    min-width: 100%;
    position: static;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: thin;
    padding: 0.5rem;
  }

  .lateral-sidebar-header {
    display: none;
  }

  .lateral-nav-btn {
    width: auto;
    white-space: nowrap;
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
    flex-shrink: 0;
  }

  .lateral-nav-btn:hover {
    transform: none;
  }

  .lateral-main-content {
    width: 100%;
  }
}









