/* ============================================
   EDUNOVA 360 - Main Stylesheet
   Responsive Design for Desktop & Mobile
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* CSS Variables */
:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #818cf8;
  --secondary: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --dark: #0f172a;
  --sidebar-bg: #0f172a;
  --sidebar-width: 260px;
  --topbar-height: 64px;
  --card-bg: #ffffff;
  --body-bg: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.02);
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  --transition: all 0.2s ease;
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--body-bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { text-decoration: none; color: var(--primary); transition: var(--transition); }
a:hover { color: var(--primary-dark); }
button { cursor: pointer; font-family: var(--font-main); }

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

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  position: fixed;
  top: 0; left: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  backdrop-filter: blur(2px);
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(79,70,229,0.4);
}
.sidebar-logo-text h1 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}
.sidebar-logo-text span {
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* User info in sidebar */
.sidebar-user {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-user img {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
}
.sidebar-user-info { min-width: 0; }
.sidebar-user-info .name {
  font-size: 13px; font-weight: 600;
  color: white;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-info .role {
  font-size: 11px; color: rgba(255,255,255,0.45);
}

/* Sidebar Navigation */
.sidebar-nav { padding: 12px 0; flex: 1; }
.sidebar-nav-section { padding: 4px 20px 2px; }
.sidebar-nav-section-title {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.25);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.6);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  border-radius: 0;
}
.sidebar-nav a:hover {
  color: white;
  background: rgba(255,255,255,0.07);
}
.sidebar-nav a.active {
  color: white;
  background: rgba(79,70,229,0.35);
}
.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--primary-light);
  border-radius: 0 4px 4px 0;
}
.sidebar-nav a .nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.sidebar-nav a .nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}
.sidebar-nav a .nav-arrow {
  margin-left: auto;
  font-size: 10px;
  transition: transform 0.2s;
  opacity: 0.5;
}
.sidebar-nav a.has-submenu.open .nav-arrow { transform: rotate(90deg); }
.sidebar-submenu {
  display: none;
  background: rgba(0,0,0,0.2);
}
.sidebar-submenu.open { display: block; }
.sidebar-submenu a {
  padding: 8px 20px 8px 51px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
.sidebar-submenu a:hover { color: rgba(255,255,255,0.8); }
.sidebar-submenu a.active { color: white; background: transparent; }
.sidebar-submenu a.active::before { display: none; }

.sidebar-footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

/* Topbar */
.topbar {
  height: var(--topbar-height);
  background: white;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: var(--shadow-sm);
}
.topbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-secondary);
  padding: 4px;
}
.topbar-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}
.topbar-search input {
  width: 100%;
  padding: 9px 16px 9px 40px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 13.5px;
  font-family: var(--font-main);
  color: var(--text-primary);
  background: var(--body-bg);
  transition: var(--transition);
  outline: none;
}
.topbar-search input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.topbar-search-icon {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar-action-btn {
  position: relative;
  width: 38px; height: 38px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background: white;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: 16px;
  transition: var(--transition);
}
.topbar-action-btn:hover { border-color: var(--primary); color: var(--primary); }
.topbar-action-btn .badge-dot {
  position: absolute;
  top: -3px; right: -3px;
  width: 10px; height: 10px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid white;
}

.topbar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 12px 5px 5px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.topbar-user:hover { border-color: var(--primary); }
.topbar-user img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.topbar-user-info { display: none; }
.topbar-user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.topbar-user-role { font-size: 11px; color: var(--text-muted); }

/* Page Content */
.page-content { padding: 24px; flex: 1; }
.page-header { margin-bottom: 24px; }
.page-header-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { font-family: var(--font-heading); font-size: 22px; font-weight: 700; color: var(--text-primary); }
.page-subtitle { font-size: 13.5px; color: var(--text-secondary); margin-top: 4px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; margin-bottom: 8px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--border-color); }
.breadcrumb-current { color: var(--text-secondary); font-weight: 500; }

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-body { padding: 20px; }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between;
  background: white;
}
.card-title { font-family: var(--font-heading); font-size: 15px; font-weight: 700; color: var(--text-primary); }
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  background: #fafafa;
}

/* Stat Cards */
.stat-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card-icon {
  width: 48px; height: 48px;
  border-radius: var(--border-radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: white;
  margin-bottom: 14px;
}
.stat-card-value { font-family: var(--font-heading); font-size: 28px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.stat-card-label { font-size: 12.5px; color: var(--text-secondary); margin-top: 4px; font-weight: 500; }
.stat-card-change { font-size: 12px; margin-top: 10px; display: flex; align-items: center; gap: 4px; }
.stat-card-change.up { color: var(--success); }
.stat-card-change.down { color: var(--danger); }
.stat-card-bg {
  position: absolute;
  right: -20px; top: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  opacity: 0.08;
}

/* ============================================
   GRID SYSTEM
   ============================================ */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px;
  border-radius: var(--border-radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font-main);
  border: 1.5px solid transparent;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-secondary { background: var(--secondary); color: white; border-color: var(--secondary); }
.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-warning { background: var(--warning); color: white; border-color: var(--warning); }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-info { background: var(--info); color: white; border-color: var(--info); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-ghost { background: transparent; color: var(--text-secondary); border-color: var(--border-color); }
.btn-ghost:hover { background: var(--body-bg); color: var(--text-primary); }
.btn-sm { padding: 6px 13px; font-size: 12.5px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { padding: 9px; width: 38px; height: 38px; }
.btn-icon.btn-sm { width: 32px; height: 32px; padding: 6px; }
.btn-block { width: 100%; }
.btn-gradient { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; border: none; }
.btn-gradient:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,0.4); }

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 7px; }
.form-label.required::after { content: ' *'; color: var(--danger); }
.form-control {
  width: 100%;
  padding: 9px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 13.5px;
  font-family: var(--font-main);
  color: var(--text-primary);
  background: white;
  transition: var(--transition);
  outline: none;
  line-height: 1.5;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.form-control.is-invalid { border-color: var(--danger); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 5px; }
.input-group { display: flex; }
.input-group .form-control { border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm); flex: 1; }
.input-group .input-group-append .btn { border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0; height: 100%; }
.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control { padding-left: 40px; }
.input-icon-wrap .input-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

/* Checkbox & Radio */
.form-check { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 10px; }
.form-check input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); margin-top: 2px; flex-shrink: 0; }
.form-check-label { font-size: 13.5px; cursor: pointer; }

/* ============================================
   TABLES
   ============================================ */
.table-wrapper { overflow-x: auto; border-radius: var(--border-radius); }
.table { width: 100%; border-collapse: collapse; }
.table th {
  background: #f8fafc;
  padding: 11px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border-color); font-size: 13.5px; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #f8fafc; }
.table-striped tbody tr:nth-child(even) td { background: #fafafa; }
.table .avatar-sm { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-primary { background: #ede9fe; color: var(--primary); }
.badge-secondary { background: #f1f5f9; color: var(--text-secondary); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-dark { background: var(--dark); color: white; }

/* ============================================
   ALERTS
   ============================================ */
.alert {
  padding: 13px 16px;
  border-radius: var(--border-radius-sm);
  border: 1px solid;
  font-size: 13.5px;
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 16px;
}
.alert-success { background: #d1fae5; border-color: #6ee7b7; color: #065f46; }
.alert-danger { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.alert-warning { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.alert-info { background: #dbeafe; border-color: #93c5fd; color: #1e40af; }
.alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-close { margin-left: auto; background: none; border: none; font-size: 18px; cursor: pointer; opacity: 0.6; padding: 0; }
.alert-close:hover { opacity: 1; }

/* ============================================
   PROGRESS
   ============================================ */
.progress { background: #e2e8f0; border-radius: 20px; overflow: hidden; height: 8px; }
.progress-bar { height: 100%; border-radius: 20px; transition: width 0.6s ease; background: var(--primary); }
.progress-sm { height: 5px; }
.progress-lg { height: 12px; }

/* ============================================
   AVATARS
   ============================================ */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.avatar-sm { width: 32px; height: 32px; }
.avatar-lg { width: 56px; height: 56px; }
.avatar-xl { width: 80px; height: 80px; }
.avatar-text { background: var(--primary); color: white; font-weight: 700; font-size: 14px; }

/* ============================================
   TABS
   ============================================ */
.nav-tabs { display: flex; border-bottom: 2px solid var(--border-color); gap: 0; overflow-x: auto; scrollbar-width: none; }
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tabs a {
  padding: 11px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: var(--transition);
}
.nav-tabs a:hover { color: var(--primary); }
.nav-tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
  z-index: 2000;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
.modal {
  background: white; border-radius: var(--border-radius-lg);
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.2s ease;
}
.modal-lg { max-width: 780px; }
.modal-xl { max-width: 1000px; }
.modal-header {
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: white; z-index: 1;
}
.modal-title { font-family: var(--font-heading); font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; color: var(--text-muted); padding: 4px; cursor: pointer; }
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 22px; }
.modal-footer { padding: 16px 22px; border-top: 1px solid var(--border-color); display: flex; gap: 10px; justify-content: flex-end; }

/* ============================================
   DROPDOWNS
   ============================================ */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 500;
  padding: 6px;
  display: none;
  animation: fadeDown 0.15s ease;
}
.dropdown-menu.open { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 12px;
  font-size: 13.5px;
  color: var(--text-primary);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.dropdown-item:hover { background: var(--body-bg); color: var(--primary); }
.dropdown-item.danger:hover { background: #fee2e2; color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border-color); margin: 5px 0; }

/* ============================================
   NOTIFICATION PANEL
   ============================================ */
.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  z-index: 800;
  display: none;
}
.notif-panel.open { display: block; animation: fadeDown 0.15s ease; }
.notif-header { padding: 14px 16px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.notif-title { font-weight: 700; font-size: 14px; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item { padding: 13px 16px; border-bottom: 1px solid var(--border-color); display: flex; gap: 12px; cursor: pointer; transition: var(--transition); }
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: #fef9ff; }
.notif-icon { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.notif-content { flex: 1; min-width: 0; }
.notif-content .title { font-weight: 600; font-size: 13px; }
.notif-content .message { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; }
.notif-content .time { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.notif-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.notif-footer { padding: 12px 16px; text-align: center; font-size: 13px; border-top: 1px solid var(--border-color); }

/* ============================================
   COURSE CARDS
   ============================================ */
.course-card {
  background: white;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.course-card-header { padding: 24px 20px; position: relative; overflow: hidden; }
.course-card-header::after {
  content: '';
  position: absolute;
  right: -20px; bottom: -20px;
  width: 100px; height: 100px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
}
.course-card-icon { font-size: 32px; color: white; }
.course-card-body { padding: 16px 20px; }
.course-card-title { font-weight: 700; font-size: 14.5px; margin-bottom: 6px; }
.course-card-meta { font-size: 12.5px; color: var(--text-secondary); display: flex; align-items: center; gap: 12px; }
.course-card-footer { padding: 12px 20px; border-top: 1px solid var(--border-color); }

/* ============================================
   GAMIFICATION
   ============================================ */
.xp-bar { display: flex; align-items: center; gap: 12px; }
.xp-bar-track { flex: 1; }
.xp-label { font-size: 12px; font-weight: 700; color: var(--warning); white-space: nowrap; }
.badge-card { text-align: center; padding: 14px; border-radius: var(--border-radius); background: white; border: 1px solid var(--border-color); }
.badge-card-icon { font-size: 36px; margin-bottom: 8px; }
.badge-card-name { font-size: 12.5px; font-weight: 600; }

/* ============================================
   CHARTS (Placeholder)
   ============================================ */
.chart-container { position: relative; }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state-icon { font-size: 48px; color: var(--border-color); margin-bottom: 16px; }
.empty-state-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.empty-state-text { color: var(--text-secondary); font-size: 13.5px; margin-bottom: 20px; }

/* ============================================
   LOADING
   ============================================ */
.spinner { width: 20px; height: 20px; border: 2px solid var(--border-color); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }
.spinner-lg { width: 40px; height: 40px; border-width: 3px; }
.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.8); display: flex; align-items: center; justify-content: center; z-index: 9999; }

/* ============================================
   SCROLL
   ============================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============================================
   UTILITIES
   ============================================ */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-white { color: white !important; }
.text-bold { font-weight: 700 !important; }
.text-sm { font-size: 12.5px !important; }
.text-xs { font-size: 11px !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 6px !important; }
.mb-2 { margin-bottom: 10px !important; }
.mb-3 { margin-bottom: 16px !important; }
.mb-4 { margin-bottom: 24px !important; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.p-0 { padding: 0 !important; }
.rounded { border-radius: var(--border-radius); }
.rounded-full { border-radius: 50%; }
.border-none { border: none !important; }
.w-100 { width: 100%; }
.overflow-hidden { overflow: hidden; }
.position-relative { position: relative; }
.cursor-pointer { cursor: pointer; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Color backgrounds */
.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-danger { background-color: var(--danger) !important; }
.bg-info { background-color: var(--info) !important; }
.bg-light { background-color: #f8fafc !important; }
.bg-gradient-1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.bg-gradient-2 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.bg-gradient-3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.bg-gradient-4 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.bg-gradient-5 { background: linear-gradient(135deg, #fa709a, #fee140); }
.bg-gradient-6 { background: linear-gradient(135deg, #30cfd0, #330867); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes shimmer { from { left: -100%; } to { left: 100%; } }

.animate-fadeIn { animation: fadeIn 0.3s ease; }
.animate-slideUp { animation: slideUp 0.3s ease; }

/* Skeleton loader */
.skeleton { background: #e2e8f0; border-radius: 6px; position: relative; overflow: hidden; }
.skeleton::after { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent); animation: shimmer 1.5s infinite; }

/* ============================================
   LOGIN PAGE
   ============================================ */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%); }
.auth-card { background: white; border-radius: 20px; padding: 40px; width: 100%; max-width: 440px; box-shadow: 0 25px 50px rgba(0,0,0,0.3); }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo-icon { width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(135deg, var(--primary), var(--secondary)); display: inline-flex; align-items: center; justify-content: center; font-size: 30px; color: white; box-shadow: 0 8px 20px rgba(79,70,229,0.4); margin-bottom: 12px; }
.auth-logo h1 { font-family: var(--font-heading); font-size: 22px; font-weight: 800; }
.auth-logo p { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.auth-title { font-family: var(--font-heading); font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.auth-subtitle { color: var(--text-secondary); font-size: 13.5px; margin-bottom: 26px; }
.auth-divider { text-align: center; position: relative; margin: 18px 0; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border-color); }
.auth-divider span { background: white; padding: 0 12px; color: var(--text-muted); font-size: 12px; position: relative; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 991px) {
  :root { --sidebar-width: 260px; }
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,0.2); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .topbar-toggle { display: flex; }
  .topbar-user-info { display: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .page-content { padding: 16px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .notif-panel { width: calc(100vw - 32px); right: -100px; }
  .topbar { padding: 0 16px; }
  .topbar-search { display: none; }
  .page-header-inner { flex-direction: column; gap: 12px; }
  .auth-card { padding: 28px 22px; }
  .table-wrapper { border-radius: 0; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .stat-card-value { font-size: 24px; }
  .modal { margin: 8px; }
  .btn { padding: 8px 14px; }
}

@media (min-width: 1400px) {
  .topbar-user-info { display: block; }
}

/* ============================================
   DARK MODE (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
  /* Can be implemented later */
}

/* Print styles */
@media print {
  .sidebar, .topbar, .btn, .no-print { display: none !important; }
  .main-content { margin: 0; }
  .page-content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
