/* ==================== THEME VARIABLES ==================== */

/* Émeraude (défaut) */
:root,
[data-theme="green"] {
  --accent:          #22c55e;
  --accent-hover:    #16a34a;
  --accent-bg:       rgba(34, 197, 94, 0.08);
  --accent-bg2:      rgba(34, 197, 94, 0.15);
  --accent-bg3:      rgba(34, 197, 94, 0.2);
  --text-on-accent:  #000;
}

/* Saphir */
[data-theme="blue"] {
  --accent:          #3b82f6;
  --accent-hover:    #2563eb;
  --accent-bg:       rgba(59, 130, 246, 0.08);
  --accent-bg2:      rgba(59, 130, 246, 0.15);
  --accent-bg3:      rgba(59, 130, 246, 0.2);
  --text-on-accent:  #fff;
}

/* Mandarine */
[data-theme="orange"] {
  --accent:          #f97316;
  --accent-hover:    #ea580c;
  --accent-bg:       rgba(249, 115, 22, 0.08);
  --accent-bg2:      rgba(249, 115, 22, 0.15);
  --accent-bg3:      rgba(249, 115, 22, 0.2);
  --text-on-accent:  #000;
}

/* Améthyste */
[data-theme="violet"] {
  --accent:          #8b5cf6;
  --accent-hover:    #7c3aed;
  --accent-bg:       rgba(139, 92, 246, 0.08);
  --accent-bg2:      rgba(139, 92, 246, 0.15);
  --accent-bg3:      rgba(139, 92, 246, 0.2);
  --text-on-accent:  #fff;
}

/* Rubis */
[data-theme="red"] {
  --accent:          #ef4444;
  --accent-hover:    #dc2626;
  --accent-bg:       rgba(239, 68, 68, 0.08);
  --accent-bg2:      rgba(239, 68, 68, 0.15);
  --accent-bg3:      rgba(239, 68, 68, 0.2);
  --text-on-accent:  #fff;
}

/* Azur */
[data-theme="cyan"] {
  --accent:          #06b6d4;
  --accent-hover:    #0891b2;
  --accent-bg:       rgba(6, 182, 212, 0.08);
  --accent-bg2:      rgba(6, 182, 212, 0.15);
  --accent-bg3:      rgba(6, 182, 212, 0.2);
  --text-on-accent:  #000;
}

/* Palette invariante (dark mode) */
:root {
  --bg-dark:       #0f172a;
  --bg-card:       #1e293b;
  --bg-sidebar:    #111827;
  --border-color:  #334155;
  --text-primary:  #f8fafc;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;
  --accent-blue:   #3b82f6;
  --accent-orange: #f97316;
  --accent-red:    #ef4444;
  --accent-purple: #8b5cf6;
}

/* ==================== RESET ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.section.active { animation: fadeIn 0.3s ease-out forwards; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ==================== LOGIN ==================== */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--border-color);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header h1 {
  color: var(--accent);
  font-size: 28px;
  margin-bottom: 8px;
}

.login-header p {
  color: var(--text-secondary);
}

.login-card input {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-size: 14px;
}

.login-card input:focus {
  outline: none;
  border-color: var(--accent);
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 12px;
}

/* ==================== BUTTONS ==================== */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-logout {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: var(--accent-red);
  color: white;
  border-color: var(--accent-red);
}

.btn-refresh {
  padding: 8px 16px;
  background: var(--bg-dark);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.btn-refresh:hover { background: var(--border-color); }

.btn-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  background: var(--bg-dark);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 120px;
}

.btn-action:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.btn-action .icon { font-size: 24px; }

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

.btn-small.approve { background: var(--accent); color: var(--text-on-accent); }
.btn-small.reject  { background: var(--accent-red);    color: white; }
.btn-small.view    { background: var(--accent-blue);   color: white; }
.btn-small.ban     { background: var(--accent-orange); color: white; }

/* ==================== DASHBOARD LAYOUT ==================== */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
  color: var(--accent);
  font-size: 20px;
  margin-bottom: 8px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--accent-bg3);
  color: var(--accent);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.nav-section {
  padding: 16px;
  flex: 1;
}

.nav-label {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding-left: 12px;
}

.nav-btn {
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  margin-bottom: 4px;
  transition: all 0.2s;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.nav-btn.active {
  background: var(--accent-bg2);
  color: var(--accent);
}

.nav-btn .icon { font-size: 18px; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
}

.admin-email {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 12px;
  word-break: break-all;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 32px;
  min-height: 100vh;
}

.section { display: none; }
.section.active { display: block; }

.section-header { margin-bottom: 32px; }
.section-header h1 { font-size: 28px; margin-bottom: 8px; }
.section-header p { color: var(--text-secondary); }

/* ==================== CARDS ==================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.card h3 { font-size: 16px; margin-bottom: 16px; }

/* ==================== STATS ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-icon.blue   { background: rgba(59, 130, 246, 0.2); }
.stat-icon.green  { background: rgba(34, 197, 94,  0.2); }
.stat-icon.orange { background: rgba(249, 115, 22, 0.2); }
.stat-icon.red    { background: rgba(239, 68,  68, 0.2); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.2); }

.stat-value { font-size: 24px; font-weight: 700; }
.stat-label { color: var(--text-secondary); font-size: 13px; }

/* ==================== TABLES ==================== */
.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.table-header input[type="search"] {
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-dark);
  color: var(--text-primary);
  width: 250px;
}

.data-table { width: 100%; border-collapse: collapse; }

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.data-table td { font-size: 14px; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.placeholder { color: var(--text-muted); text-align: center; padding: 32px; }

/* ==================== TABS ==================== */
.tabs { display: flex; gap: 8px; margin-bottom: 20px; }

.tab {
  padding: 10px 20px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab:hover { background: var(--bg-card); }

.tab.active {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ==================== FLAGS ==================== */
.flags-list { display: flex; flex-direction: column; gap: 12px; }

.flag-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--bg-dark);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.flag-info h4 { font-size: 14px; margin-bottom: 4px; }
.flag-info p  { color: var(--text-muted); font-size: 12px; }

.toggle {
  width: 50px;
  height: 28px;
  background: var(--border-color);
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s;
}

.toggle.active { background: var(--accent); }

.toggle::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  background: white;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: all 0.3s;
}

.toggle.active::after { left: 25px; }

/* ==================== QUICK ACTIONS ==================== */
.quick-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ==================== PACKAGES GRID ==================== */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.package-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.package-card h4   { color: var(--accent); margin-bottom: 8px; }
.package-card .price { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.package-card .desc  { color: var(--text-muted); font-size: 13px; }

/* ==================== ACTIVITY LIST ==================== */
.activity-list { max-height: 300px; overflow-y: auto; }

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg3);
}

.activity-text { flex: 1; font-size: 14px; }
.activity-time { color: var(--text-muted); font-size: 12px; }

/* ==================== MODAL ==================== */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--bg-card);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-color);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 { margin: 0; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 24px; }

.modal-body input,
.modal-body textarea,
.modal-body select {
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-dark);
  color: var(--text-primary);
}

.modal-body label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

/* ==================== STATUS BADGES ==================== */
.status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status.active   { background: rgba(34, 197, 94, 0.2);  color: #22c55e; }
.status.pending  { background: rgba(249, 115, 22, 0.2); color: var(--accent-orange); }
.status.banned   { background: rgba(239, 68, 68, 0.2);  color: var(--accent-red); }
.status.completed{ background: rgba(59, 130, 246, 0.2); color: var(--accent-blue); }
.status.suspended{ background: rgba(249, 115, 22, 0.15);color: #fb923c; }
.status.deleted  { background: rgba(239, 68, 68, 0.1);  color: #f87171; }
.status.approved { background: rgba(34, 197, 94, 0.2);  color: #22c55e; }
.status.rejected { background: rgba(239, 68, 68, 0.2);  color: var(--accent-red); }
.status.verified { background: rgba(59, 130, 246, 0.2); color: var(--accent-blue); }

/* ==================== FILTER SELECT ==================== */
.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

.filter-select:focus { border-color: var(--accent); }

.table-header .filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ==================== BUTTON VARIANTS ==================== */
.btn-primary-sm {
  padding: 8px 16px;
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary-sm:hover { background: var(--accent-hover); }

.btn-danger-sm {
  padding: 8px 16px;
  background: var(--accent-red);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary-sm {
  padding: 8px 16px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary-sm:hover {
  background: var(--bg-dark);
  color: var(--text-primary);
}

/* ==================== MODAL WIDE ==================== */
.modal-content.wide { max-width: 700px; }

.modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

/* ==================== USER PROFILE (modal) ==================== */
.profile-section { margin-bottom: 20px; }

.profile-section h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}

.profile-row span:first-child { color: var(--text-secondary); min-width: 120px; }
.profile-row span:last-child  { font-weight: 500; text-align: right; word-break: break-all; }

/* ==================== KYC CARDS ==================== */
.kyc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.kyc-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.2s;
}

.kyc-card:hover { border-color: var(--accent-blue); }

.kyc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.kyc-header h4 { font-size: 15px; margin-bottom: 4px; }
.kyc-header p  { color: var(--text-muted); font-size: 12px; }

.kyc-images { display: flex; gap: 8px; margin-bottom: 16px; }

.kyc-img-placeholder {
  flex: 1;
  height: 80px;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.kyc-img-placeholder:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent-blue);
}

.kyc-img-placeholder img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.kyc-actions { display: flex; gap: 8px; }

/* ==================== NOTIFICATIONS ==================== */
.notif-preview {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.notif-preview h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.notif-bubble {
  background: var(--accent);
  color: var(--text-on-accent);
  padding: 12px 16px;
  border-radius: 16px 16px 0 16px;
  display: inline-block;
  max-width: 280px;
  font-size: 14px;
  line-height: 1.4;
}

.notif-bubble .notif-title { font-weight: 700; margin-bottom: 4px; font-size: 13px; }
.notif-bubble .notif-body  { font-size: 13px; opacity: 0.85; }

.notif-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: var(--bg-dark);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 8px;
}

.notif-history-item:last-child { margin-bottom: 0; }
.notif-history-text .title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.notif-history-text .body  { font-size: 12px; color: var(--text-muted); }
.notif-history-meta { text-align: right; font-size: 11px; color: var(--text-muted); }

/* ==================== PROMO CODES ==================== */
.promo-code-display {
  font-family: monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2px;
  background: var(--accent-bg);
  padding: 4px 8px;
  border-radius: 4px;
}

/* ==================== ANNONCE IMAGE GALLERY (modal) ==================== */
.annonce-images { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 4px; }

.annonce-images img {
  width: 100px; height: 75px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

/* ==================== CHARTS ==================== */
.charts-row { display: flex; gap: 24px; margin-bottom: 24px; }

.chart-card {
  flex: 1;
  min-height: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
}

.chart-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

canvas { max-height: 240px; }

/* ==================== TRUST SCORE ==================== */
.trust-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.trust-high { background: #dcfce7; color: #166534; }
.trust-mid  { background: #fef9c3; color: #854d0e; }
.trust-low  { background: #fee2e2; color: #991b1b; }

/* ==================== KPI GRID (Analytics) ==================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
}

.kpi-label  { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.kpi-value  { font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.kpi-trend-up   { color: #22c55e; font-size: 12px; }
.kpi-trend-down { color: var(--accent-red); font-size: 12px; }

/* ==================== SETTINGS ==================== */
.settings-group { margin-bottom: 28px; }

.settings-group h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.settings-row label,
.settings-group > label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.settings-row input,
.settings-group input,
.settings-group select,
.settings-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 4px;
}

.settings-row input:focus,
.settings-group input:focus { outline: none; border-color: var(--accent); }

.settings-group .field-wrap { margin-bottom: 16px; }

/* ==================== FRAUD INDICATOR ==================== */
.fraud-indicator { color: var(--accent-red); font-size: 12px; font-weight: 600; }

/* ==================== CAMPAIGN BADGES ==================== */
.campaign-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.campaign-badge.push  { background: rgba(59,130,246,0.2);  color: var(--accent-blue);   }
.campaign-badge.email { background: rgba(139,92,246,0.2);  color: var(--accent-purple); }

/* ==================== TOP CATEGORIES ==================== */
.top-categories-list { display: flex; flex-direction: column; gap: 10px; }
.top-cat-item { display: flex; align-items: center; gap: 12px; }

.top-cat-rank {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent-bg2);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}

.top-cat-name { flex: 0 0 120px; font-size: 13px; }

.top-cat-bar-wrap {
  flex: 1;
  background: var(--bg-dark);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
}

.top-cat-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.top-cat-count { font-size: 13px; font-weight: 600; color: var(--text-secondary); min-width: 36px; text-align: right; }

/* ==================== MAINTENANCE TOGGLE ROW ==================== */
.maintenance-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-dark);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.maintenance-row .toggle { flex-shrink: 0; }

/* ==================== THEME PICKER ==================== */
.theme-picker {
  margin-bottom: 14px;
}

.theme-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.swatch:hover { transform: scale(1.18); }

.swatch.active {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 2px var(--bg-sidebar), 0 0 0 4px var(--text-primary);
  transform: scale(1.1);
}

/* ==================== SITE WEB TABS ==================== */
.webtab-btn {
  padding: 8px 16px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.webtab-btn:hover { background: var(--accent-bg); color: var(--text-primary); }
.webtab-btn.active { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); }

.faq-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
}
.faq-item:last-child { border-bottom: none; }
.faq-item-content { flex: 1; }
.faq-item-q { font-weight: 700; font-size: 14px; color: var(--text-primary); margin-bottom: 4px; }
.faq-item-a { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.banner-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
}
.banner-item:last-child { border-bottom: none; }
.banner-color-dot { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; }
.banner-item-content { flex: 1; }
.banner-item-title { font-weight: 700; font-size: 14px; color: var(--text-primary); }
.banner-item-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }

  .main-content { margin-left: 0; }
  .dashboard-container { flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr; }
  .charts-row { flex-direction: column; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-row { grid-template-columns: 1fr; }
}
