/* ===== ADMIN DASHBOARD — ReachOnPeak ===== */
:root {
  --admin-bg: #0b0e14;
  --sidebar-bg: #111520;
  --card-bg: #161b28;
  --card-hover: #1c2235;
  --border: rgba(255,255,255,0.06);
  --accent: #1e8c3a;
  --accent-light: #4ade80;
  --accent-glow: rgba(30,140,58,0.25);
  --text: #e2e8f0;
  --text-muted: #8892a4;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --radius: 12px;
  --radius-lg: 16px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body.admin-body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--admin-bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== LOGIN SCREEN ===== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--admin-bg);
  position: relative;
}
.login-screen::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  border-radius: 50%;
  animation: loginGlow 6s ease-in-out infinite alternate;
}
@keyframes loginGlow {
  0% { transform: translate(0, 0) scale(1); opacity: 0.4; }
  100% { transform: translate(60px, 40px) scale(1.2); opacity: 0.7; }
}
.login-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 420px;
  max-width: 90vw;
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.login-logo svg { flex-shrink: 0; }
.login-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}
.login-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.login-field {
  margin-bottom: 18px;
}
.login-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.login-field input {
  width: 100%;
  padding: 12px 16px;
  background: var(--admin-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.login-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.login-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent), #16a34a);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-top: 8px;
}
.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.login-toggle {
  text-align: center;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.login-toggle a {
  color: var(--accent-light);
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}
.login-error {
  background: rgba(239,68,68,0.1);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
  border: 1px solid rgba(239,68,68,0.2);
}

/* ===== DASHBOARD LAYOUT ===== */
.dashboard {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s;
}
.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}
.sidebar-tag {
  font-size: 0.7rem;
  color: var(--accent-light);
  font-weight: 600;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.sidebar-item:hover {
  background: rgba(255,255,255,0.04);
  color: #fff;
}
.sidebar-item.active {
  background: var(--accent-glow);
  color: var(--accent-light);
  font-weight: 600;
}
.sidebar-item .si-icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
}
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}
.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
}
.sidebar-user-info {
  flex: 1;
  min-width: 0;
}
.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 0.7rem;
  color: var(--accent-light);
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 32px;
  min-height: 100vh;
}
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.main-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
}
.main-title-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* TAB PANELS */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeInPanel 0.3s ease; }
@keyframes fadeInPanel {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== STAT CARDS ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.stat-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
}
.stat-box::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: var(--accent-glow);
  border-radius: 0 0 0 60px;
  opacity: 0.5;
}
.stat-box-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.stat-box-num {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}
.stat-box-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== DATA TABLE ===== */
.data-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.data-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.data-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 12px 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}
.data-table td {
  padding: 14px 20px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ===== BATCH CREATE FORM ===== */
.batch-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}
.batch-form-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-input, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--admin-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.7;
}
.btn-primary {
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--accent), #16a34a);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
}
.btn-secondary {
  padding: 12px 28px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.04); }
.btn-danger {
  padding: 8px 16px;
  background: rgba(239,68,68,0.15);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* PREVIEW TABLE */
.preview-card {
  background: var(--card-bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 20px;
  box-shadow: 0 0 30px var(--accent-glow);
}
.preview-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 16px;
}

/* ===== CONTENT EDITOR ===== */
.editor-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.editor-day-btn {
  padding: 8px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.editor-day-btn:hover { border-color: var(--accent); color: #fff; }
.editor-day-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-light);
}

.editor-page-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.editor-page-tab {
  padding: 10px 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.editor-page-tab:hover { border-color: var(--accent); }
.editor-page-tab.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-light);
}

.editor-block {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  position: relative;
  transition: border-color 0.2s;
}
.editor-block:hover { border-color: var(--accent); }
.editor-block-type {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-light);
  margin-bottom: 8px;
}
.editor-block-content {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
}
.editor-block-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
}
.edit-btn {
  padding: 6px 12px;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent-light);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.edit-btn:hover { background: var(--accent); color: #fff; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 600px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.success { background: linear-gradient(135deg, #16a34a, #1e8c3a); }
.toast.error { background: linear-gradient(135deg, #dc2626, #ef4444); }
.toast.info { background: linear-gradient(135deg, #2563eb, #3b82f6); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }

/* ===== LOADING ===== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11,14,20,0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  gap: 16px;
}
.loading-overlay .spinner { width: 40px; height: 40px; border-width: 3px; }
.loading-text { color: var(--text-muted); font-size: 0.9rem; }

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state-text { font-size: 1rem; }

/* BADGE */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}
.badge-green { background: rgba(30,140,58,0.15); color: var(--accent-light); }
.badge-blue { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-yellow { background: rgba(245,158,11,0.15); color: #fbbf24; }

/* BATCH CARD */
.batch-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.batch-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.2s;
}
.batch-card-header:hover { background: rgba(255,255,255,0.02); }
.batch-card-name {
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.batch-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.batch-card-body {
  display: none;
  border-top: 1px solid var(--border);
}
.batch-card.open .batch-card-body { display: block; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .mobile-menu-btn {
    display: flex !important;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
  }
}
.mobile-menu-btn { display: none; }

/* ===== ADMIN EDIT MODE BANNER (for index/lesson pages) ===== */
.admin-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99998;
  background: linear-gradient(135deg, var(--accent), #16a34a);
  color: #fff;
  padding: 8px 20px;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 2px 12px var(--accent-glow);
}
.admin-banner button {
  padding: 4px 12px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

/* INLINE EDIT OVERLAY */
.edit-overlay {
  position: absolute;
  top: 4px;
  right: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}
.editable-block { position: relative; }
.editable-block:hover .edit-overlay { opacity: 1; }
.edit-overlay-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px var(--accent-glow);
  transition: transform 0.2s;
}
.edit-overlay-btn:hover { transform: scale(1.1); }

/* PRINT STYLES */
@media print {
  .sidebar, .admin-banner, .btn-row, .batch-form-title, .main-header { display: none !important; }
  .main-content { margin-left: 0 !important; padding: 10px !important; }
  .data-card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  body.admin-body { background: #fff; color: #000; }
  .data-table th, .data-table td { color: #000; border-color: #ccc; }
}

/* ===== PASSWORD TOGGLE ===== */
.password-wrapper {
  position: relative;
}
.password-wrapper input {
  padding-right: 48px;
}
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}
.password-toggle svg {
  width: 20px;
  height: 20px;
}

/* ===== BUTTON LOADING STATE ===== */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}
.btn-loading::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ===== SEARCH BAR ===== */
.search-bar-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}
.search-bar-wrapper .search-icon {
  font-size: 1.1rem;
  color: var(--text-muted);
}
.search-bar-wrapper input {
  flex: 1;
  background: var(--admin-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  color: #fff;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.search-bar-wrapper input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-bar-wrapper select {
  background: var(--admin-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  color: #fff;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  cursor: pointer;
  min-width: 160px;
}
.search-bar-wrapper select:focus {
  border-color: var(--accent);
}

/* ===== ACTIVITY LOG ===== */
.activity-list {
  padding: 0;
  list-style: none;
  max-height: 400px;
  overflow-y: auto;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.activity-item:last-child {
  border-bottom: none;
}
.activity-item:hover {
  background: rgba(255,255,255,0.02);
}
.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.activity-icon.create { background: rgba(74,222,128,0.15); }
.activity-icon.delete { background: rgba(239,68,68,0.15); }
.activity-icon.edit { background: rgba(59,130,246,0.15); }
.activity-icon.login { background: rgba(168,85,247,0.15); }
.activity-msg {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
}
.activity-msg strong {
  color: #fff;
}
.activity-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-top: 2px;
}

/* ===== CHARTS ===== */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
}
.chart-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
}
.chart-container {
  position: relative;
  height: 220px;
}
@media (max-width: 900px) {
  .charts-row {
    grid-template-columns: 1fr;
  }
}

/* ===== CONFIRMATION MODAL ===== */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  animation: fadeIn 0.2s;
}
.confirm-modal {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 440px;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: slideUp 0.3s ease;
}
.confirm-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}
.confirm-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.confirm-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}
.confirm-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ===== USER TABLE STYLES ===== */
.user-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.7rem;
  color: #fff;
  margin-right: 8px;
  vertical-align: middle;
}
.user-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-email {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.status-dot.active { background: var(--accent-light); }
.status-dot.inactive { background: var(--text-muted); }

/* ===== EXPORT BUTTONS ===== */
.export-btn-group {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.btn-export {
  padding: 8px 16px;
  background: rgba(59,130,246,0.15);
  color: #60a5fa;
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-export:hover {
  background: rgba(59,130,246,0.25);
  transform: translateY(-1px);
}

/* ===== SKELETON LOADING ===== */
.skeleton {
  background: linear-gradient(90deg, var(--card-bg) 25%, var(--card-hover) 50%, var(--card-bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
.skeleton-row {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.skeleton-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
.skeleton-text {
  height: 14px;
  border-radius: 6px;
  flex: 1;
}
.skeleton-text.short { max-width: 120px; }
.skeleton-text.medium { max-width: 200px; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== TREND INDICATOR ===== */
.trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 4px;
}
.trend.up { color: var(--accent-light); background: rgba(74,222,128,0.1); }
.trend.down { color: var(--danger); background: rgba(239,68,68,0.1); }
.trend.neutral { color: var(--text-muted); background: rgba(255,255,255,0.05); }

/* ===== NOTIFICATION BADGE ===== */
.sidebar-badge {
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
  min-width: 20px;
  text-align: center;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  border-top: 1px solid var(--border);
}
.pagination button {
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.pagination button:hover {
  background: rgba(255,255,255,0.04);
  color: #fff;
}
.pagination button.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-light);
}
.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.pagination-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 12px;
}

/* ===== COURSE SELECTOR TABS ===== */
.course-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.course-tab {
  padding: 12px 22px;
  background: var(--admin-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.course-tab:hover {
  border-color: var(--accent);
  color: #fff;
  background: rgba(30,140,58,0.06);
}
.course-tab.active {
  background: linear-gradient(135deg, rgba(30,140,58,0.15), rgba(74,222,128,0.08));
  border-color: var(--accent);
  color: var(--accent-light);
  box-shadow: 0 0 20px rgba(30,140,58,0.15);
}
@media (max-width: 600px) {
  .course-selector {
    gap: 6px;
  }
  .course-tab {
    padding: 10px 14px;
    font-size: 0.8rem;
  }
  .charts-row {
    grid-template-columns: 1fr;
  }
}
