/* ============================================
   EduPlatform - منصة إدارة الطلاب والدورات
   Global Styles - v2.0
   ============================================ */

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

:root {
  --primary: #6366F1;
  --primary-dark: #4F46E5;
  --primary-darker: #3730A3;
  --primary-light: #A5B4FC;
  --secondary: #06B6D4;
  --secondary-dark: #0891B2;
  --accent: #F59E0B;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --info: #3B82F6;
  --purple: #8B5CF6;

  --bg-main: #0B1120;
  --bg-card: #111827;
  --bg-card2: #1C2537;
  --bg-sidebar: #0D1424;
  --bg-input: #1C2537;
  --border: #1F2D3D;
  --border-light: #2D3F55;
  --border-active: rgba(99,102,241,0.5);

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

  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
  --shadow-primary: 0 8px 30px rgba(99,102,241,0.3);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  --sidebar-width: 270px;
  --header-height: 68px;
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Tajawal', sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.6;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

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

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

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

.sidebar-logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 15px rgba(99,102,241,0.4);
  flex-shrink: 0;
}

.sidebar-logo-text { overflow: hidden; }
.sidebar-logo-text h2 {
  font-size: 16px; font-weight: 800;
  color: var(--text-primary); white-space: nowrap;
}
.sidebar-logo-text span { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.sidebar-section-title {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  color: var(--text-muted); text-transform: uppercase;
  padding: 12px 10px 6px; margin-top: 8px;
}

.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none; font-size: 14px; font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
  position: relative;
}

.sidebar-nav a:hover {
  background: var(--bg-card2);
  color: var(--text-primary);
}

.sidebar-nav a.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(99,102,241,0.08));
  color: var(--primary-light);
  border: 1px solid rgba(99,102,241,0.25);
}

.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  right: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.sidebar-nav a i { width: 18px; text-align: center; font-size: 15px; }

.sidebar-nav .badge {
  margin-right: auto;
  background: var(--primary);
  color: white;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.sidebar-user:hover { background: var(--bg-card2); }

.sidebar-user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: white;
  flex-shrink: 0;
}

.sidebar-user-info { flex: 1; overflow: hidden; }
.sidebar-user-info strong {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-info span {
  font-size: 11px; color: var(--text-muted); white-space: nowrap;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  margin-right: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== HEADER ===== */
.header {
  height: var(--header-height);
  background: rgba(11,17,32,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 100;
}

.header-title { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.header-subtitle { font-size: 12px; color: var(--text-muted); }

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

.header-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px;
  transition: var(--transition);
  position: relative;
}
.header-btn:hover { border-color: var(--primary); color: var(--primary-light); }

.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--bg-main);
}

/* ===== PAGE CONTENT ===== */
.page-content { flex: 1; padding: 28px; overflow-y: auto; }

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}

.page-title-group { }
.page-title { font-size: 22px; font-weight: 800; color: var(--text-primary); }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex; align-items: center; gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}

.stat-card.blue::before { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card.cyan::before { background: linear-gradient(90deg, var(--secondary), #67E8F9); }
.stat-card.green::before { background: linear-gradient(90deg, var(--success), #6EE7B7); }
.stat-card.orange::before { background: linear-gradient(90deg, var(--accent), #FCD34D); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--purple), #C4B5FD); }
.stat-card.red::before { background: linear-gradient(90deg, var(--danger), #FCA5A5); }

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

.stat-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-icon.blue { background: rgba(99,102,241,0.15); color: var(--primary-light); }
.stat-icon.cyan { background: rgba(6,182,212,0.15); color: var(--secondary); }
.stat-icon.green { background: rgba(16,185,129,0.15); color: var(--success); }
.stat-icon.orange { background: rgba(245,158,11,0.15); color: var(--accent); }
.stat-icon.purple { background: rgba(139,92,246,0.15); color: var(--purple); }
.stat-icon.red { background: rgba(239,68,68,0.15); color: var(--danger); }

.stat-info { flex: 1; }
.stat-value { font-size: 26px; font-weight: 900; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.stat-change {
  font-size: 11px; font-weight: 600; margin-top: 6px;
  display: flex; align-items: center; gap: 3px;
}
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ===== CARD ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

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

.card-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.card-subtitle { font-size: 12px; color: var(--text-muted); }
.card-body { padding: 22px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: 'Tajawal', sans-serif;
  font-size: 14px; font-weight: 600;
  cursor: pointer; border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(99,102,241,0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.5);
}

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

.btn-success {
  background: rgba(16,185,129,0.15);
  color: var(--success);
  border: 1px solid rgba(16,185,129,0.3);
}
.btn-success:hover { background: rgba(16,185,129,0.25); }

.btn-danger {
  background: rgba(239,68,68,0.12);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.25);
}
.btn-danger:hover { background: rgba(239,68,68,0.22); }

.btn-warning {
  background: rgba(245,158,11,0.12);
  color: var(--accent);
  border: 1px solid rgba(245,158,11,0.25);
}
.btn-warning:hover { background: rgba(245,158,11,0.22); }

.btn-info {
  background: rgba(59,130,246,0.12);
  color: var(--info);
  border: 1px solid rgba(59,130,246,0.25);
}
.btn-info:hover { background: rgba(59,130,246,0.22); }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 13px 28px; font-size: 16px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 9px; }

/* ===== TABLE ===== */
.table-wrapper { overflow-x: auto; }

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

thead th {
  padding: 12px 16px;
  text-align: right;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 14px 16px;
  font-size: 14px; color: var(--text-secondary);
  border-bottom: 1px solid rgba(31,45,61,0.7);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(99,102,241,0.04); }

.td-actions { display: flex; align-items: center; gap: 6px; }

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 7px;
}
.form-label .required { color: var(--danger); margin-right: 3px; }

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text-primary);
  font-family: 'Tajawal', sans-serif;
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
  background: rgba(99,102,241,0.04);
}

textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; }
select.form-control option { background: var(--bg-card2); color: var(--text-primary); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ===== SEARCH BAR ===== */
.search-wrap { position: relative; }
.search-wrap i {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 14px; pointer-events: none;
}
.search-wrap input {
  padding-right: 40px !important;
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.badge-success { background: rgba(16,185,129,0.15); color: var(--success); border: 1px solid rgba(16,185,129,0.25); }
.badge-danger { background: rgba(239,68,68,0.12); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.badge-warning { background: rgba(245,158,11,0.12); color: var(--accent); border: 1px solid rgba(245,158,11,0.2); }
.badge-info { background: rgba(59,130,246,0.12); color: var(--info); border: 1px solid rgba(59,130,246,0.2); }
.badge-primary { background: rgba(99,102,241,0.15); color: var(--primary-light); border: 1px solid rgba(99,102,241,0.25); }
.badge-secondary { background: rgba(148,163,184,0.1); color: var(--text-secondary); border: 1px solid var(--border); }
.badge-purple { background: rgba(139,92,246,0.15); color: #C4B5FD; border: 1px solid rgba(139,92,246,0.25); }
.badge-cyan { background: rgba(6,182,212,0.12); color: var(--secondary); border: 1px solid rgba(6,182,212,0.2); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: var(--transition);
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: var(--transition);
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 17px; font-weight: 800; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-card2);
  color: var(--text-secondary);
  cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { color: var(--danger); border-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;
}

/* ===== AVATAR ===== */
.avatar {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: white;
  flex-shrink: 0;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  height: 6px;
  background: var(--bg-card2);
  border-radius: 20px;
  overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 20px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.8s ease;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed; bottom: 24px; left: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 340px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease forwards;
}

.toast.success { border-right: 3px solid var(--success); }
.toast.error { border-right: 3px solid var(--danger); }
.toast.warning { border-right: 3px solid var(--warning); }
.toast.info { border-right: 3px solid var(--info); }

.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--info); }

.toast-content { flex: 1; }
.toast-title { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.toast-msg { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

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

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 56px; margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ===== PAGINATION ===== */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap; gap: 10px;
}
.pagination-info { font-size: 13px; color: var(--text-muted); }
.pagination-btns { display: flex; gap: 4px; }
.page-btn {
  width: 32px; height: 32px;
  border-radius: 8px; border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Tajawal', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary-light); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ===== LOADER ===== */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-state { text-align: center; padding: 60px; }
.loading-state .spinner { margin: 0 auto 16px; }
.loading-state p { font-size: 13px; color: var(--text-muted); }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.4s ease forwards; }

/* ===== DIVIDER ===== */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ===== COURSE CARD ===== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex; flex-direction: column;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99,102,241,0.3);
}

.course-img {
  width: 100%; height: 160px;
  object-fit: cover;
  display: block;
}

.course-img-placeholder {
  width: 100%; height: 160px;
  display: flex; align-items: center; justify-content: center;
  font-size: 50px;
}

.course-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.course-platform {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--primary-light); margin-bottom: 8px;
  display: flex; align-items: center; gap: 5px;
}
.course-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; line-height: 1.4; }
.course-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; flex: 1; }
.course-card-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}

/* ===== FILTER STRIP ===== */
.filter-strip {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: 'Tajawal', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary-light); }
.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: var(--primary); color: white;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

/* ===== TOOLBAR ===== */
.toolbar {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
.toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 10px; margin-right: auto; flex-wrap: wrap; }

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  :root { --sidebar-width: 240px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-right: 0; }
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .mobile-menu-btn { display: flex !important; }
  .course-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .header { padding: 0 16px; }
}

.mobile-menu-btn { display: none; }

/* ===== TOOLTIP ===== */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: #e2e8f0;
  font-size: 11px; padding: 4px 8px; border-radius: 6px;
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
}
[data-tip]:hover::after { opacity: 1; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-light); }
.breadcrumb i { font-size: 10px; }

/* ===== HIGHLIGHT ===== */
.highlight { color: var(--primary-light); }

/* Overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}
.sidebar-overlay.active { display: block; }

/* ===== STAR RATING ===== */
.stars { color: var(--accent); letter-spacing: -1px; }

/* ===== FREE BADGE ===== */
.free-badge {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  padding: 2px 8px; border-radius: 20px;
  letter-spacing: 0.5px;
}
