/* ═══════════════════════════════════════════════════════════
   Fourth Generation LMS — Design System
   RTL Arabic, Bootstrap 5 RTL
   Colors: Purple #831BD7, Dark #25272F, Cyan #07C4FE
   ═══════════════════════════════════════════════════════════ */

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

:root {
  --primary: #831BD7;
  --primary-dark: #6b15b0;
  --primary-light: #a855f7;
  --primary-gradient: linear-gradient(315deg, #831BD7 0%, #7e1dda 100%);
  --cyan: #07C4FE;
  --yellow: #FFD04F;
  --dark: #25272F;
  --gray-light: #EFF1F3;
  --gray-mid: #b0b7c3;
  --gray-text: #6b7280;
  --white: #ffffff;
  --bg: #f4f5f9;
  --sidebar-w: 260px;
  --shadow: 0 4px 20px rgba(0,0,0,.08);
  --shadow-md: 0 8px 30px rgba(0,0,0,.12);
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Cairo', 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--dark);
  margin: 0; padding: 0;
  direction: rtl;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

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

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--primary-gradient);
  min-height: 100vh;
  position: fixed;
  right: 0; top: 0;
  display: flex; flex-direction: column;
  z-index: 1000;
  transition: transform .3s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,.15);
}
.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  text-align: center;
}
.sidebar-brand a { display: flex; align-items: center; justify-content: center; gap: 10px; }
.brand-logo { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: rgba(255,255,255,.15); padding: 6px; }
.brand-text { color: #fff; font-size: 1.1rem; font-weight: 700; }
.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }
.sidebar-nav .nav-item { margin: 2px 12px; position: relative; }
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; color: rgba(255,255,255,.75);
  border-radius: var(--radius-sm); font-size: .95rem; font-weight: 500;
  transition: all .2s;
}
.sidebar-nav .nav-link i { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.15); color: #fff; }
.sidebar-nav .nav-link.active { background: rgba(255,255,255,.2); color: #fff; font-weight: 700; }
.sidebar-nav .nav-link.active::after {
  content: ''; width: 4px; height: 70%;
  background: var(--yellow); border-radius: 4px;
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
}
.sidebar-footer { padding: 16px 24px; border-top: 1px solid rgba(255,255,255,.1); }
.btn-logout {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #fff; border-radius: var(--radius-sm); padding: 10px 16px;
  font-size: .9rem; font-family: 'Cairo', sans-serif; cursor: pointer; transition: background .2s;
}
.btn-logout:hover { background: rgba(255,255,255,.2); }

/* ── Main Content ── */
.main-content { margin-right: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* ── Topbar ── */
.topbar {
  background: var(--white); border-bottom: 1px solid #e9ecef;
  padding: 0 24px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 900;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.topbar-start { display: flex; align-items: center; gap: 16px; }
.topbar-end { display: flex; align-items: center; gap: 12px; }
.sidebar-toggle { background: none; border: none; font-size: 1.2rem; color: var(--gray-text); cursor: pointer; padding: 8px; border-radius: var(--radius-sm); display: none; }
.sidebar-toggle:hover { background: var(--gray-light); }
.topbar-search { position: relative; display: flex; align-items: center; }
.topbar-search input {
  border: 1.5px solid #e5e7eb; border-radius: 20px;
  padding: 8px 16px 8px 40px; font-size: .9rem; font-family: 'Cairo', sans-serif;
  width: 260px; background: var(--gray-light); transition: all .2s; direction: rtl;
}
.topbar-search input:focus { border-color: var(--primary); background: #fff; outline: none; width: 300px; }
.topbar-search .search-icon { position: absolute; left: 14px; color: var(--gray-text); font-size: .9rem; }
.btn-icon {
  position: relative; background: var(--gray-light); border: none;
  border-radius: 50%; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--gray-text); font-size: 1rem; transition: background .2s;
}
.btn-icon:hover { background: #e0e0e0; }
.btn-icon .badge {
  position: absolute; top: -2px; left: -2px;
  background: #ef4444; color: #fff; font-size: .65rem;
  border-radius: 50%; width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.topbar-user .btn-user {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  font-family: 'Cairo', sans-serif; font-size: .9rem; font-weight: 600;
  color: var(--dark); padding: 4px 8px; border-radius: var(--radius-sm);
}
.topbar-user .btn-user:hover { background: var(--gray-light); }
.topbar-user .btn-user img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }

/* ── Page Body ── */
.page-body { padding: 24px; flex: 1; }
.page-header { margin-bottom: 24px; }
.page-header .page-title { font-size: 1.6rem; font-weight: 800; color: var(--dark); margin: 0 0 4px; }
.page-header .page-subtitle { color: var(--gray-text); font-size: .95rem; margin: 0; }
.page-header-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }

/* ── Alerts ── */
.alerts-container { padding: 12px 24px 0; }

/* ── Stat Cards ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--white); border-radius: var(--radius); padding: 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
  border-right: 4px solid transparent;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.stat-info { flex: 1; }
.stat-value { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: .82rem; color: var(--gray-text); font-weight: 500; }
.stat-change { font-size: .78rem; color: #10b981; font-weight: 600; margin-top: 4px; display: flex; align-items: center; gap: 3px; }
.stat-change.down { color: #ef4444; }

.stat-purple { border-right-color: var(--primary); }
.stat-purple .stat-icon { background: rgba(131,27,215,.12); color: var(--primary); }
.stat-purple .stat-value { color: var(--primary); }
.stat-blue { border-right-color: #3b82f6; }
.stat-blue .stat-icon { background: rgba(59,130,246,.12); color: #3b82f6; }
.stat-blue .stat-value { color: #3b82f6; }
.stat-green { border-right-color: #10b981; }
.stat-green .stat-icon { background: rgba(16,185,129,.12); color: #10b981; }
.stat-green .stat-value { color: #10b981; }
.stat-orange { border-right-color: #f59e0b; }
.stat-orange .stat-icon { background: rgba(245,158,11,.12); color: #f59e0b; }
.stat-orange .stat-value { color: #f59e0b; }
.stat-teal { border-right-color: var(--cyan); }
.stat-teal .stat-icon { background: rgba(7,196,254,.12); color: var(--cyan); }
.stat-teal .stat-value { color: var(--cyan); }
.stat-red { border-right-color: #ef4444; }
.stat-red .stat-icon { background: rgba(239,68,68,.12); color: #ef4444; }
.stat-red .stat-value { color: #ef4444; }

/* ── Dashboard Grid ── */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dashboard-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.dash-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.dash-card-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--gray-light); }
.dash-card-header h5, .dash-card-header h6 { margin: 0; font-weight: 700; font-size: 1rem; }
.btn-link { color: var(--primary); font-size: .85rem; font-weight: 600; }
.btn-link:hover { color: var(--primary-dark); }

/* ── Notification Items ── */
.notif-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--gray-light); transition: background .2s; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--gray-light); }
.notif-icon-box { width: 40px; height: 40px; border-radius: 50%; background: rgba(131,27,215,.12); display: flex; align-items: center; justify-content: center; color: var(--primary); flex-shrink: 0; }
.notif-body { flex: 1; }
.notif-title { font-weight: 600; font-size: .88rem; color: var(--dark); margin: 0 0 2px; }
.notif-text { font-size: .82rem; color: var(--gray-text); margin: 0; }
.notif-time { font-size: .75rem; color: var(--gray-mid); margin-top: 4px; }

/* ── Schedule Items ── */
.schedule-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--gray-light); }
.schedule-item:last-child { border-bottom: none; }
.schedule-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.schedule-body { flex: 1; }
.schedule-title { font-weight: 600; font-size: .88rem; margin: 0 0 2px; }
.schedule-sub { font-size: .8rem; color: var(--gray-text); margin: 0; }
.schedule-time { font-size: .82rem; color: var(--primary); font-weight: 700; }

/* ── Tables ── */
.table-wrapper { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 20px; }
.table-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--gray-light); flex-wrap: wrap; gap: 12px; }
.table-title { font-size: 1.05rem; font-weight: 700; margin: 0; }
.table { margin: 0; }
.table thead th { background: var(--gray-light); color: var(--dark); font-weight: 700; font-size: .85rem; padding: 12px 16px; border: none; white-space: nowrap; }
.table tbody td { padding: 12px 16px; border-color: var(--gray-light); font-size: .9rem; vertical-align: middle; }
.table tbody tr:hover { background: rgba(131,27,215,.03); }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.user-name { font-weight: 600; font-size: .88rem; margin: 0; }
.user-email { font-size: .78rem; color: var(--gray-text); margin: 0; }
.progress-cell { min-width: 120px; }
.progress-label { font-size: .8rem; font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.progress { height: 6px; border-radius: 4px; background: var(--gray-light); }
.progress-bar { background: var(--primary-gradient); border-radius: 4px; }

/* Pagination */
.pagination-wrapper { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--gray-light); flex-wrap: wrap; gap: 8px; }
.pagination-info { font-size: .85rem; color: var(--gray-text); }
.pagination { margin: 0; gap: 4px; }
.page-link { border-radius: var(--radius-sm) !important; border: 1px solid #e5e7eb; color: var(--dark); font-size: .85rem; padding: 6px 12px; font-family: 'Cairo', sans-serif; }
.page-link:hover { background: var(--gray-light); color: var(--primary); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Buttons ── */
.btn-primary-custom {
  background: var(--primary-gradient); border: none; color: #fff;
  border-radius: var(--radius-sm); padding: 10px 20px;
  font-size: .9rem; font-weight: 600; font-family: 'Cairo', sans-serif;
  cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary-custom:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(131,27,215,.35); color: #fff; }
.btn-secondary-custom {
  background: #fff; border: 1.5px solid #e5e7eb; color: var(--dark);
  border-radius: var(--radius-sm); padding: 10px 20px;
  font-size: .9rem; font-weight: 600; font-family: 'Cairo', sans-serif;
  cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-secondary-custom:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger-custom { background: #fff; border: 1.5px solid #fecaca; color: #ef4444; border-radius: var(--radius-sm); padding: 6px 14px; font-size: .83rem; font-weight: 600; font-family: 'Cairo', sans-serif; cursor: pointer; transition: all .2s; }
.btn-danger-custom:hover { background: #fef2f2; border-color: #ef4444; }
.btn-edit-custom { background: rgba(131,27,215,.08); border: 1.5px solid rgba(131,27,215,.2); color: var(--primary); border-radius: var(--radius-sm); padding: 6px 14px; font-size: .83rem; font-weight: 600; font-family: 'Cairo', sans-serif; cursor: pointer; transition: all .2s; }
.btn-edit-custom:hover { background: rgba(131,27,215,.15); }
.action-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Badges ── */
.badge-active { background: #d1fae5; color: #065f46; font-size: .78rem; padding: 4px 10px; border-radius: 20px; font-weight: 600; display: inline-block; }
.badge-inactive { background: #fee2e2; color: #991b1b; font-size: .78rem; padding: 4px 10px; border-radius: 20px; font-weight: 600; display: inline-block; }
.badge-pending { background: #fef3c7; color: #92400e; font-size: .78rem; padding: 4px 10px; border-radius: 20px; font-weight: 600; display: inline-block; }
.badge-published { background: #d1fae5; color: #065f46; font-size: .78rem; padding: 4px 10px; border-radius: 20px; font-weight: 600; display: inline-block; }
.badge-draft { background: #f3f4f6; color: #374151; font-size: .78rem; padding: 4px 10px; border-radius: 20px; font-weight: 600; display: inline-block; }
.badge-archived { background: #fef3c7; color: #92400e; font-size: .78rem; padding: 4px 10px; border-radius: 20px; font-weight: 600; display: inline-block; }
.badge-admin { background: rgba(131,27,215,.12); color: var(--primary); font-size: .78rem; padding: 4px 10px; border-radius: 20px; font-weight: 600; display: inline-block; }
.badge-trainer { background: rgba(59,130,246,.12); color: #3b82f6; font-size: .78rem; padding: 4px 10px; border-radius: 20px; font-weight: 600; display: inline-block; }
.badge-student { background: rgba(16,185,129,.12); color: #10b981; font-size: .78rem; padding: 4px 10px; border-radius: 20px; font-weight: 600; display: inline-block; }

/* ── Course Cards ── */
.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.course-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.course-card-thumb { width: 100%; height: 150px; background: var(--primary-gradient); display: flex; align-items: center; justify-content: center; }
.course-card-thumb i { font-size: 2.5rem; color: rgba(255,255,255,.5); }
.course-card-body { padding: 16px; }
.course-card-title { font-weight: 700; font-size: .95rem; margin-bottom: 8px; color: var(--dark); }
.course-card-meta { font-size: .8rem; color: var(--gray-text); display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.course-card-meta span { display: flex; align-items: center; gap: 4px; }
.course-card-footer { padding: 12px 16px; border-top: 1px solid var(--gray-light); display: flex; align-items: center; justify-content: space-between; }
.course-add-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); border: 2px dashed #e5e7eb; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 260px; cursor: pointer; transition: border-color .2s; }
.course-add-card:hover { border-color: var(--primary); }
.course-add-card i { font-size: 2.5rem; color: var(--gray-mid); margin-bottom: 12px; }
.course-add-card span { font-size: .9rem; color: var(--gray-text); font-weight: 600; }

/* ── Forms ── */
.form-section { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; }
.form-section-title { font-size: 1.05rem; font-weight: 700; color: var(--dark); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--gray-light); }
.form-label { font-weight: 600; font-size: .88rem; color: var(--dark); margin-bottom: 6px; }
.form-control, .form-select { border: 1.5px solid #e5e7eb; border-radius: var(--radius-sm); padding: 10px 14px; font-size: .9rem; font-family: 'Cairo', sans-serif; transition: border-color .2s; direction: rtl; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(131,27,215,.1); outline: none; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ── Filter Bar ── */
.filter-bar { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; margin-bottom: 20px; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.filter-bar .form-group { margin: 0; flex: 1; min-width: 160px; }

/* ── Tabs ── */
.tabs-bar { display: flex; gap: 0; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; margin-bottom: 20px; overflow-x: auto; }
.tab-btn { flex: 1; background: none; border: none; border-radius: var(--radius-sm); padding: 10px 20px; font-size: .9rem; font-weight: 600; font-family: 'Cairo', sans-serif; color: var(--gray-text); cursor: pointer; transition: all .2s; white-space: nowrap; }
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { background: var(--primary-gradient); color: #fff; box-shadow: 0 4px 12px rgba(131,27,215,.3); }
.tab-content-pane { display: none; }
.tab-content-pane.active { display: block; }

/* ── Detail Header ── */
.detail-header { background: var(--primary-gradient); color: #fff; border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.detail-header h2 { margin: 0 0 8px; font-weight: 800; }
.detail-header p { margin: 0; opacity: .85; font-size: .95rem; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.detail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.detail-stat { background: rgba(255,255,255,.15); border-radius: var(--radius-sm); padding: 12px 16px; text-align: center; }
.detail-stat-value { font-size: 1.5rem; font-weight: 800; display: block; }
.detail-stat-label { font-size: .78rem; opacity: .8; }

/* ── Login Page ── */
.login-page { min-height: 100vh; display: flex; direction: rtl; }
.login-left {
  width: 42%; background: var(--primary-gradient);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 40px; position: relative; overflow: hidden;
}
.login-left::before { content: ''; position: absolute; top: -80px; right: -80px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255,255,255,.07); }
.login-left::after { content: ''; position: absolute; bottom: -60px; left: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.05); }
.login-left-logo { width: 80px; margin-bottom: 24px; filter: brightness(0) invert(1); }
.login-left-title { font-size: 2rem; font-weight: 800; color: #fff; text-align: center; margin-bottom: 12px; line-height: 1.3; }
.login-left-title span { color: var(--yellow); }
.login-left-sub { color: rgba(255,255,255,.8); text-align: center; font-size: 1rem; margin-bottom: 40px; }
.login-phone { max-width: 220px; position: relative; z-index: 1; border-radius: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-right { flex: 1; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 40px; }
.login-form-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 44px 40px; width: 100%; max-width: 440px; }
.login-logo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.login-logo-row img { width: 48px; height: 48px; object-fit: contain; }
.login-logo-row h2 { margin: 0; font-weight: 800; font-size: 1.4rem; color: var(--dark); }
.login-welcome { font-size: 1.15rem; font-weight: 700; color: var(--dark); margin: 0 0 4px; }
.login-welcome-sub { color: var(--gray-text); font-size: .88rem; margin-bottom: 28px; }
.login-btn { background: var(--primary-gradient); border: none; border-radius: var(--radius-sm); color: #fff; width: 100%; padding: 13px; font-size: 1rem; font-weight: 700; font-family: 'Cairo', sans-serif; cursor: pointer; transition: all .3s; margin-top: 8px; }
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(131,27,215,.4); }
.login-forget { text-align: left; }
.login-forget a { font-size: .85rem; color: var(--primary); font-weight: 600; }
.login-footer-text { text-align: center; margin-top: 20px; font-size: .85rem; color: var(--gray-text); }
.login-footer-text a { color: var(--primary); font-weight: 700; }

/* ── Info List ── */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--gray-light); font-size: .9rem; }
.info-list li:last-child { border-bottom: none; }
.info-key { color: var(--gray-text); font-weight: 500; }
.info-val { font-weight: 700; color: var(--dark); }

/* ── Stars ── */
.stars { color: var(--yellow); }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 3rem; color: var(--gray-mid); display: block; margin-bottom: 16px; }
.empty-state h5 { font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--gray-text); }

/* ── Modal ── */
.modal-content { border-radius: var(--radius); border: none; }
.modal-header { background: var(--primary-gradient); color: #fff; border-radius: var(--radius) var(--radius) 0 0; border: none; }
.modal-header .btn-close { filter: invert(1); }
.modal-title { font-weight: 700; }

/* ── Mobile ── */
.mobile-topbar { display: none; background: var(--primary-gradient); padding: 12px 16px; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1001; }
.mobile-topbar-logo img { height: 36px; filter: brightness(0) invert(1); }
.mobile-menu-toggle { background: rgba(255,255,255,.15); border: none; color: #fff; border-radius: var(--radius-sm); padding: 8px 12px; font-size: 1.1rem; cursor: pointer; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999; }
.sidebar-overlay.active { display: block; }

/* ── Responsive ── */
@media (max-width: 991px) {
  .sidebar { transform: translateX(260px); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-right: 0; }
  .mobile-topbar { display: flex; }
  .topbar { display: none; }
  .login-left { display: none; }
  .dashboard-grid, .dashboard-grid-3, .detail-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .page-body { padding: 16px; }
  .sidebar-toggle { display: block; }
}
@media (max-width: 576px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .login-form-box { padding: 24px 20px; }
  .courses-grid { grid-template-columns: 1fr; }
}
