* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background: #0f0e17; color: #e0e0e0; min-height: 100vh; }

/* Navbar */
.navbar { background: linear-gradient(135deg, #1a0533 0%, #2d1b69 100%);
  padding: 14px 24px; display: flex; align-items: center;
  justify-content: space-between; border-bottom: 2px solid #7c3aed; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: #fff; }
.nav-logo { width: 36px; height: 36px; border-radius: 8px; }
.nav-links { display: flex; gap: 8px; }
.nav-links a { color: #c4b5fd; text-decoration: none; padding: 8px 16px; border-radius: 8px;
  transition: all .2s; font-size: 14px; }
.nav-links a:hover, .nav-links a.active { background: #7c3aed; color: #fff; }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 24px 16px; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 24px; }
.stat-card { background: #1e1b2e; border-radius: 16px; padding: 20px;
  display: flex; align-items: center; gap: 16px; border: 1px solid #2d2b45;
  transition: transform .2s; }
.stat-card:hover { transform: translateY(-3px); }
.stat-card.blue { border-left: 4px solid #3b82f6; }
.stat-card.green { border-left: 4px solid #22c55e; }
.stat-card.purple { border-left: 4px solid #a855f7; }
.stat-card.orange { border-left: 4px solid #f97316; }
.stat-icon { font-size: 36px; }
.stat-value { font-size: 32px; font-weight: 800; color: #fff; }
.stat-label { font-size: 13px; color: #9ca3af; margin-top: 2px; }

/* Settings Grid */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 20px; }

/* Card */
.card { background: #1e1b2e; border-radius: 16px; border: 1px solid #2d2b45; overflow: hidden; }
.card-header { background: #2d1b69; padding: 16px 20px; display: flex;
  align-items: center; justify-content: space-between; }
.card-header h2 { font-size: 16px; font-weight: 700; color: #fff; }
.card-body { padding: 20px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 24px; }
.text-muted { color: #6b7280; font-size: 13px; margin-bottom: 16px; }

/* Badges */
.badge { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge-success { background: #16a34a; color: #fff; }
.badge-danger  { background: #dc2626; color: #fff; }
.badge-blue    { background: #2563eb; color: #fff; }

/* Form */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: #d1d5db; margin-bottom: 6px; font-weight: 600; }
.form-control { width: 100%; background: #111827; border: 1px solid #374151; color: #f9fafb;
  padding: 10px 14px; border-radius: 8px; font-size: 14px; transition: border-color .2s; }
.form-control:focus { outline: none; border-color: #7c3aed; }

/* Toggle Switch */
.toggle-row { display: flex; align-items: center; justify-content: space-between;
  background: #111827; padding: 12px 16px; border-radius: 10px; border: 1px solid #374151; }
.toggle-label { font-weight: 600; color: #e5e7eb; }
.switch { position: relative; display: inline-block; width: 52px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0;
  background: #374151; border-radius: 34px; transition: .3s; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px;
  left: 4px; bottom: 4px; background: #fff; border-radius: 50%; transition: .3s; }
.switch input:checked + .slider { background: #7c3aed; }
.switch input:checked + .slider:before { transform: translateX(24px); }

/* Buttons */
.btn { display: inline-block; padding: 10px 20px; border-radius: 8px; border: none;
  cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: none; transition: opacity .2s; }
.btn:hover { opacity: .85; }
.btn-primary { background: #7c3aed; color: #fff; }
.btn-success { background: #16a34a; color: #fff; }
.btn-warning { background: #d97706; color: #fff; }
.btn-outline  { background: transparent; border: 1px solid #7c3aed; color: #a78bfa; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-block { width: 100%; text-align: center; }
.text-center { text-align: center; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #14532d; border: 1px solid #16a34a; color: #86efac; }
.alert-danger  { background: #7f1d1d; border: 1px solid #dc2626; color: #fca5a5; }

/* Login Page */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: linear-gradient(135deg, #0f0e17 0%, #1a0533 100%); }
.login-container { background: #1e1b2e; padding: 40px; border-radius: 20px;
  width: 100%; max-width: 420px; border: 1px solid #2d2b45;
  box-shadow: 0 20px 60px rgba(124,58,237,.3); }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo img { width: 80px; height: 80px; border-radius: 20px; margin-bottom: 12px; }
.login-logo h1 { font-size: 22px; color: #fff; }
.login-logo p  { color: #7c3aed; font-size: 13px; }
.login-form .btn { margin-top: 8px; }

/* Table */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { background: #2d1b69; color: #e0e0e0; padding: 10px 12px; text-align: left; }
.table td { padding: 10px 12px; border-bottom: 1px solid #2d2b45; color: #d1d5db; }
.table tr:hover td { background: #2d2b45; }

/* Pagination */
.pagination { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pagination a { padding: 6px 12px; border-radius: 6px; background: #2d2b45;
  color: #c4b5fd; text-decoration: none; font-size: 13px; }
.pagination a.active { background: #7c3aed; color: #fff; }

/* Preview Phone */
.preview-phone { background: #111; border: 3px solid #374151; border-radius: 20px;
  padding: 20px 12px; max-width: 260px; margin: 0 auto; }
.preview-screen { background: #1a1a2e; border-radius: 12px; overflow: hidden; min-height: 200px;
  display: flex; flex-direction: column; }
.preview-content { flex: 1; display: flex; align-items: center; justify-content: center;
  color: #4b5563; font-size: 13px; padding: 20px; }
.preview-sponsor-btn { margin: 8px; background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff; text-align: center; padding: 12px; border-radius: 10px;
  font-size: 13px; font-weight: 700; }
.preview-sponsor-btn.disabled { background: #374151; color: #6b7280; }
.preview-banner { background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff; text-align: center; padding: 10px; font-size: 12px; font-weight: 600; }
.preview-banner.disabled { background: #374151; color: #6b7280; }

@media (max-width: 600px) {
  .settings-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .navbar { flex-direction: column; gap: 10px; }
}
