/* ============================================================
   ZaynSoft WA Marketing — Global Design System
   Premium Dark UI with WhatsApp Green + Violet Accents
   ============================================================ */

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

/* ── CSS Variables ──────────────────────────────────────── */
:root {
  color-scheme: dark;

  --primary:        #6C63FF;
  --primary-dark:   #5549e8;
  --primary-light:  #8b85ff;
  --wa-green:       #25D366;
  --wa-dark:        #128C7E;
  --accent:         #F59E0B;
  --danger:         #EF4444;
  --success:        #10B981;
  --warning:        #F59E0B;
  --info:           #3B82F6;

  --bg-dark:        #0B0E1A;
  --bg-card:        #141728;
  --bg-card-hover:  #1C2038;
  --bg-input:       #1A1D2E;
  --bg-sidebar:     #0D1020;
  --bg-nav:         #0F1124;
  --bg-soft:        rgba(255,255,255,0.06);
  --bg-soft-hover:  rgba(255,255,255,0.1);
  --bg-table-head:  rgba(255,255,255,0.02);
  --bg-table-hover: rgba(255,255,255,0.03);

  --border:         rgba(255,255,255,0.07);
  --border-light:   rgba(255,255,255,0.12);

  --text-primary:   #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted:     #64748B;

  --radius-sm:      6px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --radius-xl:      24px;

  --shadow-sm:      0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:      0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg:      0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow:    0 0 30px rgba(108,99,255,0.15);

  --sidebar-width:  260px;
  --nav-height:     64px;
  --transition:     all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="light"] {
  color-scheme: light;

  --primary:        #5B55E6;
  --primary-dark:   #4338CA;
  --primary-light:  #5B55E6;
  --wa-green:       #16A34A;
  --wa-dark:        #0F766E;
  --accent:         #D97706;
  --danger:         #DC2626;
  --success:        #059669;
  --warning:        #D97706;
  --info:           #2563EB;

  --bg-dark:        #F4F7FB;
  --bg-card:        #FFFFFF;
  --bg-card-hover:  #F8FAFC;
  --bg-input:       #F8FAFC;
  --bg-sidebar:     #FFFFFF;
  --bg-nav:         rgba(255,255,255,0.92);
  --bg-soft:        rgba(15,23,42,0.05);
  --bg-soft-hover:  rgba(15,23,42,0.09);
  --bg-table-head:  #F8FAFC;
  --bg-table-hover: #F8FAFC;

  --border:         rgba(15,23,42,0.10);
  --border-light:   rgba(15,23,42,0.18);

  --text-primary:   #0F172A;
  --text-secondary: #475569;
  --text-muted:     #64748B;

  --shadow-sm:      0 1px 3px rgba(15,23,42,0.08);
  --shadow-md:      0 8px 24px rgba(15,23,42,0.10);
  --shadow-lg:      0 18px 48px rgba(15,23,42,0.14);
  --shadow-glow:    0 0 30px rgba(91,85,230,0.13);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary); }

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

.app-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

.app-sidebar::-webkit-scrollbar { width: 4px; }
.app-sidebar::-webkit-scrollbar-track { background: transparent; }
.app-sidebar::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

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

.sidebar-brand .brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--wa-green), var(--primary));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(37,211,102,0.3);
}

.sidebar-brand .brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.sidebar-brand .brand-tagline {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-nav {
  padding: 12px 0;
  flex: 1;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 24px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  margin: 1px 8px;
  border-radius: var(--radius-md);
}

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

.nav-item.active {
  background: linear-gradient(135deg, rgba(108,99,255,0.2), rgba(37,211,102,0.1));
  color: var(--primary-light);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -8px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}

.nav-item .nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}

/* ── Main Content ───────────────────────────────────────── */
.app-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-dark);
}

.app-topbar {
  height: var(--nav-height);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

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

.topbar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  cursor: pointer;
}

.app-content {
  padding: 28px;
  flex: 1;
}

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover { border-color: var(--border-light); }

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

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body { padding: 24px; }

/* ── Stat Cards ─────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-light);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--stat-color, var(--primary));
}

.stat-card .stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--stat-bg, rgba(108,99,255,0.15));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -1px;
}

.stat-trend {
  font-size: 12px;
  font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(108,99,255,0.35);
}
.btn-primary:hover { background: var(--primary-dark); color: white; }

.btn-success {
  background: var(--wa-green);
  color: white;
  box-shadow: 0 4px 12px rgba(37,211,102,0.3);
}
.btn-success:hover { background: var(--wa-dark); color: white; }

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}
.btn-danger:hover { background: #dc2626; color: white; }

.btn-warning {
  background: var(--warning);
  color: #111;
  box-shadow: 0 4px 12px rgba(245,158,11,0.3);
}
.btn-warning:hover { background: #d97706; color: #111; }

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

.btn-outline {
  background: transparent;
  color: var(--primary-light);
  border: 1px solid var(--primary);
}
.btn-outline:hover { background: rgba(108,99,255,0.1); color: var(--primary-light); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { padding: 8px; min-width: 36px; justify-content: center; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-primary   { background: rgba(108,99,255,0.2);  color: var(--primary-light); }
.badge-success   { background: rgba(16,185,129,0.2);  color: #34D399; }
.badge-warning   { background: rgba(245,158,11,0.2);  color: #FCD34D; }
.badge-danger    { background: rgba(239,68,68,0.2);   color: #F87171; }
.badge-info      { background: rgba(59,130,246,0.2);  color: #93C5FD; }
.badge-secondary { background: var(--bg-soft); color: var(--text-secondary); }

/* ── Tables ─────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  background: var(--bg-table-head);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 13.5px;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: var(--bg-table-hover);
}

.data-table tbody tr:last-child td { border-bottom: none; }

/* ── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

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

.form-control, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.form-control:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}

.form-control::placeholder { color: var(--text-muted); }
.form-select { cursor: pointer; }
option { background: var(--bg-card); }
.form-textarea { resize: vertical; min-height: 100px; }

.form-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 5px;
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-row {
  display: grid;
  gap: 16px;
}
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ── Progress Bar ───────────────────────────────────────── */
.progress {
  height: 6px;
  background: var(--bg-soft);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--primary), var(--wa-green));
  transition: width 0.6s ease;
}

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid transparent;
  margin-bottom: 16px;
}
.alert-success  { background: rgba(16,185,129,0.1);  border-color: rgba(16,185,129,0.25);  color: #34D399; }
.alert-danger   { background: rgba(239,68,68,0.1);   border-color: rgba(239,68,68,0.25);   color: #F87171; }
.alert-warning  { background: rgba(245,158,11,0.1);  border-color: rgba(245,158,11,0.25);  color: #FCD34D; }
.alert-info     { background: rgba(59,130,246,0.1);  border-color: rgba(59,130,246,0.25);  color: #93C5FD; }

/* ── Avatar ─────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 40px; height: 40px; }
.avatar-lg { width: 56px; height: 56px; }
.avatar-xl { width: 80px; height: 80px; }

/* ── Page Header ────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.page-actions { display: flex; align-items: center; gap: 10px; }

/* ── Dropdown ───────────────────────────────────────────── */
.dropdown { position: relative; display: inline-block; }
.dropdown-toggle { cursor: pointer; }

.dropdown-menu {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  overflow: hidden;
  display: none;
}
.dropdown.open .dropdown-menu { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 13.5px;
  cursor: pointer;
  transition: var(--transition);
}
.dropdown-item:hover { background: var(--bg-soft); }
.dropdown-divider { border-top: 1px solid var(--border); margin: 4px 0; }

/* ── Pagination ─────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  padding: 16px 0;
  list-style: none;
}

.pagination .page-item .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px; height: 32px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  transition: var(--transition);
  text-decoration: none;
}

.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.pagination .page-item .page-link:hover {
  background: rgba(108,99,255,0.15);
  border-color: var(--primary);
  color: var(--primary-light);
}

/* Laravel's default paginator uses Tailwind utility classes, but this layout
   loads custom CSS. Keep the SVG arrows from expanding to the full viewport. */
.app-content nav[role="navigation"] svg,
.pagination svg {
  width: 18px;
  height: 18px;
  max-width: 18px;
  flex-shrink: 0;
}

.app-content nav[role="navigation"] a,
.app-content nav[role="navigation"] span {
  text-decoration: none;
}

/* Style Laravel's default Tailwind paginator in this non-Tailwind layout. */
.app-content nav[role="navigation"] {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 0 4px;
}

.app-content nav[role="navigation"] > div:first-child {
  display: none;
}

.app-content nav[role="navigation"] > div:last-child {
  align-items: center;
  display: flex !important;
  gap: 12px;
  justify-content: space-between;
  width: 100%;
}

.app-content nav[role="navigation"] p {
  color: var(--text-muted);
  font-size: 12px;
  margin: 0;
}

.app-content nav[role="navigation"] > div:last-child > div:last-child > span {
  align-items: center;
  display: inline-flex;
  gap: 4px;
}

.app-content nav[role="navigation"] a,
.app-content nav[role="navigation"] span[aria-current] span,
.app-content nav[role="navigation"] span[aria-disabled="true"] span {
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  display: inline-flex;
  font-size: 12px;
  height: 32px;
  justify-content: center;
  min-width: 32px;
  padding: 0 10px;
}

.app-content nav[role="navigation"] a:hover {
  background: rgba(108,99,255,0.15);
  border-color: var(--primary);
  color: var(--primary-light);
}

.app-content nav[role="navigation"] span[aria-current] span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.app-content nav[role="navigation"] span[aria-disabled="true"] span {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 640px) {
  .app-content nav[role="navigation"],
  .app-content nav[role="navigation"] > div:last-child {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 0;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}

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

.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  background: var(--bg-soft);
  border: none; border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: var(--transition);
}
.modal-close:hover { background: rgba(239,68,68,0.15); color: var(--danger); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

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

/* ── Search / Filter Bar ────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

.search-box input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 14px 9px 38px;
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}

.search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
  pointer-events: none;
}

/* ── Empty State ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

/* ── Notification dot ───────────────────────────────────── */
.notif-btn {
  width: 36px; height: 36px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  position: relative;
  font-size: 17px;
  color: var(--text-secondary);
  transition: var(--transition);
}
.notif-btn:hover { background: var(--bg-soft-hover); color: var(--text-primary); }
.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-nav);
}

/* ── Theme Toggle ───────────────────────────────────────── */
.theme-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--bg-soft-hover);
  color: var(--text-primary);
}

.theme-toggle .theme-icon-dark { display: none; }
html[data-theme="dark"] .theme-toggle .theme-icon-light { display: none; }
html[data-theme="dark"] .theme-toggle .theme-icon-dark { display: inline; }

/* ── Chart Container ────────────────────────────────────── */
.chart-container { position: relative; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .app-main { margin-left: 0; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row.cols-2, .form-row.cols-3 { grid-template-columns: 1fr; }
  .app-content { padding: 16px; }
  .page-header { flex-direction: column; }
}

/* ── Utility ─────────────────────────────────────────────── */
.text-primary   { color: var(--primary-light) !important; }
.text-success   { color: var(--success) !important; }
.text-danger    { color: var(--danger) !important; }
.text-warning   { color: var(--warning) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-wa        { color: var(--wa-green) !important; }
.text-right     { text-align: right; }
.text-center    { text-align: center; }
.fw-bold        { font-weight: 700; }
.fw-medium      { font-weight: 500; }
.d-flex         { display: flex; }
.align-center   { align-items: center; }
.gap-8          { gap: 8px; }
.gap-12         { gap: 12px; }
.mt-4           { margin-top: 4px; }
.mt-8           { margin-top: 8px; }
.mt-16          { margin-top: 16px; }
.mt-24          { margin-top: 24px; }
.mb-16          { margin-bottom: 16px; }
.mb-24          { margin-bottom: 24px; }
.ml-auto        { margin-left: auto; }
.w-full         { width: 100%; }

/* ── Gradient Text ──────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--wa-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Role Color Accents ─────────────────────────────────── */
.role-super-admin { color: var(--accent); }
.role-admin       { color: var(--primary-light); }
.role-owner       { color: var(--wa-green); }
.role-staff       { color: #93C5FD; }

.glowing-border {
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-glow);
}

/* ── Login Page ─────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

.auth-wrapper::before {
  content: '';
  position: absolute;
  top: -200px; left: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(108,99,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.auth-wrapper::after {
  content: '';
  position: absolute;
  bottom: -200px; right: -200px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(37,211,102,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.auth-theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.auth-logo-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--wa-green), var(--primary));
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  box-shadow: 0 6px 20px rgba(37,211,102,0.3);
}

.auth-logo-text h1 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.auth-logo-text p {
  font-size: 12px;
  color: var(--text-muted);
}

.auth-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
