/* ── Admin Panel CSS ────────────────────────────────────────────────────── */
.admin-body { background: #0a0a0f; color: #f1f1f8; font-family: 'Inter', sans-serif; min-height: 100vh; }

/* Login Screen */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 30% 50%, rgba(99,102,241,0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 30%, rgba(168,85,247,0.08) 0%, transparent 60%),
              #0a0a0f;
}
.login-box {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px; padding: 48px 40px; width: 100%; max-width: 420px;
  backdrop-filter: blur(12px);
}
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; justify-content: center; }
.login-logo-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif; font-weight: 900; color: white; font-size: 22px;
}
.login-logo-name { font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 800; color: white; }
.login-logo-name span { color: #818cf8; }
.login-title { text-align: center; font-size: 20px; font-weight: 700; color: white; margin-bottom: 8px; }
.login-sub { text-align: center; font-size: 14px; color: rgba(241,241,248,0.5); margin-bottom: 32px; }
.login-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; display: none; }

/* Admin Layout */
.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 260px; flex-shrink: 0;
  background: rgba(255,255,255,0.03);
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  overflow-y: auto; z-index: 100;
}
.sidebar-header {
  padding: 24px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.sidebar-logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; color: white; font-size: 16px; font-family: 'Outfit', sans-serif;
}
.sidebar-logo-name { font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 800; color: white; }
.sidebar-logo-name span { color: #818cf8; }
.sidebar-badge { font-size: 10px; font-weight: 700; background: rgba(99,102,241,0.2); color: #818cf8; padding: 2px 8px; border-radius: 99px; margin-left: 4px; letter-spacing: 1px; }

.sidebar-nav { padding: 16px 12px; flex: 1; }
.sidebar-section-label { font-size: 10px; font-weight: 700; color: rgba(241,241,248,0.3); text-transform: uppercase; letter-spacing: 2px; padding: 0 12px; margin: 16px 0 8px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: rgba(241,241,248,0.55);
  transition: all 0.2s; cursor: pointer; text-decoration: none;
  margin-bottom: 2px;
}
.sidebar-link i { width: 18px; text-align: center; font-size: 15px; }
.sidebar-link:hover { background: rgba(255,255,255,0.05); color: white; }
.sidebar-link.active { background: rgba(99,102,241,0.15); color: #818cf8; border: 1px solid rgba(99,102,241,0.2); }
.sidebar-link.active i { color: #6366f1; }

/* Pending badge on sidebar */
.pending-badge {
  margin-left: auto;
  background: #fbbf24;
  color: #000;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  letter-spacing: 0;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,0.03); }
.sidebar-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,#6366f1,#a855f7); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: white; }
.sidebar-user-info { flex: 1; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: white; }
.sidebar-user-role { font-size: 11px; color: rgba(241,241,248,0.4); }
.sidebar-logout-btn { background: none; border: none; color: rgba(241,241,248,0.4); cursor: pointer; font-size: 16px; padding: 4px; transition: color 0.2s; }
.sidebar-logout-btn:hover { color: #ef4444; }

/* Admin Main Content */
.admin-main { margin-left: 260px; flex: 1; padding: 32px; min-height: 100vh; }

.admin-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
}
.admin-page-title { font-family: 'Outfit', sans-serif; font-size: 26px; font-weight: 800; color: white; letter-spacing: -0.5px; }
.admin-page-sub { font-size: 14px; color: rgba(241,241,248,0.4); margin-top: 2px; }

/* Tab Panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Admin Cards */
.admin-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 28px;
  margin-bottom: 24px;
}
.admin-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.admin-card-title { font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 700; color: white; }

/* Table */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left; font-size: 11px; font-weight: 700;
  color: rgba(241,241,248,0.4); text-transform: uppercase; letter-spacing: 1px;
  padding: 0 16px 14px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.admin-table td {
  padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 14px; color: rgba(241,241,248,0.8);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

/* Action Buttons */
.action-btn {
  padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600;
  cursor: pointer; border: none; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
}
.action-btn-edit { background: rgba(99,102,241,0.15); color: #818cf8; }
.action-btn-edit:hover { background: rgba(99,102,241,0.3); }
.action-btn-delete { background: rgba(239,68,68,0.12); color: #fca5a5; }
.action-btn-delete:hover { background: rgba(239,68,68,0.25); }
.action-btn-add { background: linear-gradient(135deg,#6366f1,#a855f7); color: white; padding: 10px 20px; border-radius: 10px; font-size: 13px; }
.action-btn-add:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(99,102,241,0.35); }

/* Color dot */
.color-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* Badge pill */
.popular-pill { background: rgba(99,102,241,0.15); color: #818cf8; border: 1px solid rgba(99,102,241,0.3); padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px); z-index: 2000;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #0f0f1a; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px; padding: 36px; width: 100%; max-width: 580px;
  max-height: 90vh; overflow-y: auto;
}
.modal-title { font-family: 'Outfit', sans-serif; font-size: 20px; font-weight: 800; color: white; margin-bottom: 24px; }
.modal-footer { display: flex; gap: 12px; justify-content: flex-end; margin-top: 28px; }
.modal-close-btn { background: rgba(255,255,255,0.06); color: rgba(241,241,248,0.6); padding: 10px 20px; border-radius: 10px; font-size: 13px; font-weight: 600; border: none; cursor: pointer; }
.modal-save-btn { background: linear-gradient(135deg,#6366f1,#a855f7); color: white; padding: 10px 24px; border-radius: 10px; font-size: 13px; font-weight: 600; border: none; cursor: pointer; }
.modal-save-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(99,102,241,0.4); }

/* Stats row */
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 22px 20px;
}
.stat-num { font-family: 'Outfit', sans-serif; font-size: 32px; font-weight: 900; color: white; }
.stat-label { font-size: 12px; color: rgba(241,241,248,0.4); margin-top: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-icon { font-size: 22px; margin-bottom: 12px; }

/* Settings form grid */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.settings-grid .form-group:last-child { grid-column: 1 / -1; }

/* Features tag input */
.features-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.feature-tag {
  background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.25);
  color: #818cf8; padding: 5px 12px; border-radius: 8px; font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}
.feature-tag button { background: none; border: none; color: #818cf8; cursor: pointer; font-size: 14px; padding: 0; line-height: 1; }
.feature-tag button:hover { color: #ef4444; }
.features-add-row { display: flex; gap: 8px; margin-top: 8px; }
.features-add-row input { flex: 1; }
.features-add-row button { background: rgba(99,102,241,0.15); color: #818cf8; border: 1px solid rgba(99,102,241,0.3); padding: 10px 18px; border-radius: 10px; font-size: 13px; cursor: pointer; font-weight: 600; white-space: nowrap; }

/* Toast in admin */
#adminToast { position: fixed; bottom: 28px; right: 28px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 900px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; padding: 20px; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .settings-grid { grid-template-columns: 1fr; }
}
