/* ══════════════════════════════════════════════════════════════════════════
   Afri Services Training Academy — Complete Design System with Dark / Light Themes
   Uses Remix Icon (ri-*) for all icons via CDN
   ══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables (Light Theme - default) ────────────────────────────── */
:root {
  --bg:            #f0f2f5;
  --bg-card:       #ffffff;
  --bg-sidebar:    #ffffff;
  --bg-topbar:     #ffffff;
  --bg-input:      #f7f8fa;
  --bg-hover:      #f0f4ff;
  --bg-code:       #f3f4f6;
  --border:        #e2e5ed;
  --border-light:  #eef0f4;
  --text:          #1e2330;
  --text-secondary:#6b7280;
  --text-muted:    #9ca3af;
  --accent:        #0ea5e9;
  --accent-hover:  #0284c7;
  --accent-bg:     #e0f2fe;
  --accent-text:   #0369a1;
  --success:       #10b981;
  --success-bg:    #d1fae5;
  --warning:       #f59e0b;
  --warning-bg:    #fef3c7;
  --danger:        #ef4444;
  --danger-bg:     #fee2e2;
  --gradient-hero: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 50%, #7dd3fc 100%);
  --gradient-card: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
  --shadow-sm:     0 1px 3px rgba(0,0,0,.06);
  --shadow:        0 2px 12px rgba(0,0,0,.08);
  --shadow-lg:     0 8px 30px rgba(0,0,0,.12);
  --shadow-glow:   0 0 20px rgba(14,165,233,.15);
  --radius:        12px;
  --radius-lg:     16px;
  --radius-full:   9999px;
  --bg-main:       #f7f8fa;
  --sidebar-w:     260px;
  --sidebar-w-collapsed: 72px;
  --topbar-h:      64px;
  --transition:    .25s cubic-bezier(.4,0,.2,1);
}

/* ── Dark Theme ──────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:            #0c0e16;
  --bg-card:       #161a2b;
  --bg-sidebar:    #111525;
  --bg-topbar:     #111525;
  --bg-input:      #1c2035;
  --bg-hover:      #1e2445;
  --bg-code:       #1c2035;
  --border:        #252a3d;
  --border-light:  #1e2235;
  --text:          #e5e7ef;
  --text-secondary:#9ca3bf;
  --text-muted:    #5f6580;
  --accent:        #38bdf8;
  --accent-hover:  #0ea5e9;
  --accent-bg:     rgba(56,189,248,.12);
  --accent-text:   #7dd3fc;
  --success:       #34d399;
  --success-bg:    rgba(52,211,153,.12);
  --warning:       #fbbf24;
  --warning-bg:    rgba(251,191,36,.12);
  --danger:        #f87171;
  --danger-bg:     rgba(248,113,113,.12);
  --gradient-hero: linear-gradient(135deg, #0c4a6e 0%, #075985 50%, #0369a1 100%);
  --gradient-card: linear-gradient(135deg, #0c4a6e 0%, #0284c7 100%);
  --bg-main:       #0f1220;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.2);
  --shadow:        0 2px 12px rgba(0,0,0,.3);
  --shadow-lg:     0 8px 30px rgba(0,0,0,.4);
  --shadow-glow:   0 0 20px rgba(56,189,248,.2);
}

/* ── Reset & Base ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
input, select, textarea, button { font-family: inherit; }

/* ── Scrollbar ───────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════════════════
   LAYOUT: Sidebar + Topbar + Main
   ══════════════════════════════════════════════════════════════════════════ */
.app-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: width var(--transition), transform var(--transition);
  overflow-x: hidden;
  overflow-y: auto;
}
.sidebar.collapsed { width: var(--sidebar-w-collapsed); }
.sidebar.collapsed .sidebar-text,
.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .sidebar-section-label { display: none; }
.sidebar.collapsed .sidebar-brand { justify-content: center; }
.sidebar.collapsed .sidebar-item { justify-content: center; padding: .7rem; }
.sidebar.collapsed .sidebar-item i { margin-right: 0; font-size: 1.25rem; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-brand-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-brand-logo {
  width: 38px; height: 38px; border-radius: 10px; object-fit: contain;
}
.sidebar-brand-text { font-size: 1.15rem; font-weight: 800; color: var(--text); white-space: nowrap; }

.sidebar-nav { flex: 1; padding: .75rem .6rem; }
.sidebar-section-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  padding: 1rem .65rem .4rem;
  white-space: nowrap;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .9rem;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  margin-bottom: 2px;
}
.sidebar-item:hover { background: var(--bg-hover); color: var(--text); }
.sidebar-item.active {
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 600;
}
.sidebar-item i { font-size: 1.2rem; width: 22px; text-align: center; flex-shrink: 0; }
.sidebar-item .badge-count {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: .75rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: .55rem;
  border: none;
  background: var(--bg-hover);
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1.1rem;
}
.sidebar-toggle:hover { background: var(--accent-bg); color: var(--accent); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 190;
}
.sidebar-overlay.open { display: block; }

/* ── Topbar ──────────────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 150;
  gap: 1rem;
  transition: left var(--transition);
  backdrop-filter: blur(10px);
}
.sidebar.collapsed ~ .main-wrap .topbar { left: var(--sidebar-w-collapsed); }

.topbar-menu-btn {
  display: none;
  background: none; border: none;
  font-size: 1.4rem;
  color: var(--text);
  cursor: pointer;
  padding: .3rem;
}
.topbar-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}
.topbar-search i {
  position: absolute;
  left: .85rem; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}
.topbar-search input {
  width: 100%;
  padding: .55rem .85rem .55rem 2.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-input);
  color: var(--text);
  font-size: .88rem;
  transition: all var(--transition);
  outline: none;
}
.topbar-search input:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  background: var(--bg-card);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
}
.topbar-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
}
.topbar-btn:hover { background: var(--bg-hover); color: var(--text); }
.topbar-btn .notif-dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .35rem .65rem .35rem .35rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition);
  margin-left: .5rem;
}
.topbar-user:hover { background: var(--bg-hover); }
.topbar-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  overflow: hidden;
}
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.topbar-user-info { line-height: 1.25; }
.topbar-user-name { font-size: .85rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.topbar-user-role { font-size: .7rem; color: var(--text-muted); text-transform: capitalize; }

.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  padding: .4rem;
  z-index: 300;
}
.dropdown-menu.open { display: block; animation: fadeInDown .2s ease; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .75rem;
  border-radius: 8px;
  font-size: .88rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.dropdown-item:hover { background: var(--bg-hover); color: var(--text); }
.dropdown-item i { font-size: 1.1rem; width: 20px; text-align: center; }
.dropdown-divider { height: 1px; background: var(--border); margin: .3rem .4rem; }
.dropdown-item.danger { color: var(--danger); }

/* ── Main content ────────────────────────────────────────────────────── */
.main-wrap { flex: 1; margin-left: var(--sidebar-w); transition: margin-left var(--transition); }
.sidebar.collapsed ~ .main-wrap { margin-left: var(--sidebar-w-collapsed); }
.main-content {
  padding: calc(var(--topbar-h) + 1.5rem) 1.75rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .6rem 1.25rem;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn i { font-size: 1.05rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-glow); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-hover); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { opacity: .9; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .9; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn-outline-primary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline-primary:hover { background: var(--accent); color: #fff; }
.btn-sm { padding: .4rem .85rem; font-size: .8rem; border-radius: 8px; }
.btn-lg { padding: .75rem 1.75rem; font-size: 1rem; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 10px; }
.btn-icon.sm { width: 32px; height: 32px; border-radius: 8px; font-size: .85rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
.btn-group { display: flex; gap: .5rem; }

/* ══════════════════════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-body { padding: 1.25rem; }
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card-header h3 { font-size: 1rem; font-weight: 700; }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-icon.blue   { background: var(--accent-bg); color: var(--accent); }
.stat-icon.green  { background: var(--success-bg); color: var(--success); }
.stat-icon.orange { background: var(--warning-bg); color: var(--warning); }
.stat-icon.red    { background: var(--danger-bg);  color: var(--danger); }
.stat-icon.purple { background: var(--accent-bg); color: var(--accent); }
.stat-info { flex: 1; }
.stat-value { font-size: 1.75rem; font-weight: 800; line-height: 1.1; color: var(--text); }
.stat-label { font-size: .82rem; color: var(--text-muted); margin-top: .2rem; }

/* ══════════════════════════════════════════════════════════════════════════
   COURSE CARDS
   ══════════════════════════════════════════════════════════════════════════ */
.course-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  cursor: pointer;
}
.course-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: var(--accent); }

.course-thumb { width: 100%; height: 130px; object-fit: cover; background: var(--bg-input); }
.course-thumb-placeholder {
  width: 100%; height: 130px;
  background: var(--gradient-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: rgba(255,255,255,.7);
}
.course-body { padding: .85rem; flex: 1; display: flex; flex-direction: column; }
.course-meta { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .5rem; }
.course-title {
  font-size: .88rem; font-weight: 700; color: var(--text); margin-bottom: .25rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.course-desc {
  font-size: .78rem; color: var(--text-secondary); flex: 1; margin-bottom: .6rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45;
}
.course-footer {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .72rem; color: var(--text-muted);
  border-top: 1px solid var(--border); padding-top: .6rem; margin-top: auto;
}
.course-instructor { display: flex; align-items: center; gap: .4rem; }
.course-instructor-avatar {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--gradient-card); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .55rem; font-weight: 700;
}
.enrolled-count { color: var(--accent); font-weight: 600; }

/* ══════════════════════════════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .7rem; font-weight: 700; padding: .2rem .6rem;
  border-radius: var(--radius-full); text-transform: uppercase; letter-spacing: .03em;
}
.badge-level { background: var(--accent-bg); color: var(--accent); }
.badge-category { background: var(--warning-bg); color: #92400e; }
[data-theme="dark"] .badge-category { color: var(--warning); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-draft   { background: var(--bg-hover);   color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 1.1rem; }
.form-label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: .4rem; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: .65rem .9rem; border: 1.5px solid var(--border); border-radius: 10px;
  background: var(--bg-input); color: var(--text); font-size: .9rem; transition: all var(--transition); outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent); box-shadow: var(--shadow-glow); background: var(--bg-card);
}
.form-textarea { resize: vertical; min-height: 100px; }

.file-upload-area {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 2rem;
  text-align: center; cursor: pointer; transition: all var(--transition);
  position: relative; background: var(--bg-input);
}
.file-upload-area:hover, .file-upload-area.dragover { border-color: var(--accent); background: var(--accent-bg); }
.file-upload-area i { font-size: 2rem; color: var(--text-muted); margin-bottom: .5rem; display: block; }
.file-upload-area p { font-size: .85rem; color: var(--text-secondary); }
.file-upload-area span { font-size: .75rem; color: var(--text-muted); }
.file-upload-area input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-preview { margin-top: .75rem; border-radius: 10px; overflow: hidden; max-height: 200px; display: none; }
.file-preview img { width: 100%; height: 200px; object-fit: cover; border-radius: 10px; }
.file-preview.visible { display: block; }

.toggle-wrap { display: flex; align-items: center; gap: .75rem; cursor: pointer; }
.toggle {
  width: 44px; height: 24px; border-radius: 99px; background: var(--border);
  position: relative; transition: all var(--transition); flex-shrink: 0;
}
.toggle::after {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: all var(--transition); box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-input { display: none; }
.toggle-input:checked + .toggle { background: var(--accent); }
.toggle-input:checked + .toggle::after { left: 23px; }
.toggle-label { font-size: .88rem; color: var(--text-secondary); }

/* ══════════════════════════════════════════════════════════════════════════
   PROGRESS BAR
   ══════════════════════════════════════════════════════════════════════════ */
.progress-wrap { background: var(--border); border-radius: var(--radius-full); height: 8px; overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--accent), #7dd3fc);
  transition: width .5s cubic-bezier(.4,0,.2,1); position: relative;
}
.progress-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.3) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ══════════════════════════════════════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════════════════════════════════════ */
.data-table {
  width: 100%; border-collapse: collapse; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.data-table th {
  background: var(--bg-input); padding: .75rem 1rem; text-align: left;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted);
}
.data-table td { padding: .85rem 1rem; border-top: 1px solid var(--border); font-size: .88rem; color: var(--text); vertical-align: middle; }
.data-table tr:hover td { background: var(--bg-hover); }
.data-table .user-cell { display: flex; align-items: center; gap: .65rem; }
.data-table .user-avatar {
  width: 32px; height: 32px; border-radius: 8px; background: var(--gradient-card);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: .7rem; font-weight: 700; flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   LESSONS
   ══════════════════════════════════════════════════════════════════════════ */
.lesson-list { list-style: none; }
.lesson-item {
  display: flex; align-items: center; gap: 1rem; padding: .85rem 1rem;
  border-radius: 10px; background: var(--bg-card); border: 1px solid var(--border);
  margin-bottom: .5rem; cursor: pointer; transition: all var(--transition);
}
.lesson-item:hover { border-color: var(--accent); background: var(--bg-hover); }
.lesson-item.completed { opacity: .65; }
.lesson-check {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: .75rem; transition: all var(--transition);
}
.lesson-item.completed .lesson-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.lesson-title { flex: 1; font-weight: 600; font-size: .9rem; color: var(--text); }
.lesson-duration { font-size: .78rem; color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px); z-index: 500; align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; animation: fadeIn .2s ease; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.75rem; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); position: relative; animation: fadeInUp .3s ease;
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem; width: 32px; height: 32px; border-radius: 8px;
  border: none; background: var(--bg-hover); color: var(--text-secondary); font-size: 1.1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--transition);
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); }
.modal h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 1.25rem; color: var(--text); }

/* ══════════════════════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════════════════════ */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999; display: flex; flex-direction: column; gap: .5rem; }
.toast {
  display: flex; align-items: center; gap: .5rem; padding: .75rem 1.25rem;
  border-radius: 12px; color: #fff; font-weight: 600; font-size: .88rem;
  box-shadow: var(--shadow-lg); animation: slideInRight .3s cubic-bezier(.4,0,.2,1);
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.info    { background: var(--accent); }
.toast i { font-size: 1.1rem; }

/* ══════════════════════════════════════════════════════════════════════════
   AUTH PAGES (full-page, no sidebar)
   ══════════════════════════════════════════════════════════════════════════ */
/* Auth page wrapper */
.auth-page { display: flex; flex-direction: column; min-height: 100vh; }
.auth-body { display: flex; flex: 1; }
.auth-left {
  flex: 1; background: var(--gradient-hero);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 3rem; color: #fff; position: relative; overflow: hidden;
}
.auth-left::before {
  content: ''; position: absolute; width: 400px; height: 400px; border-radius: 50%;
  background: rgba(255,255,255,.06); top: -100px; right: -100px;
}
.auth-left::after {
  content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255,255,255,.04); bottom: -80px; left: -80px;
}
.auth-left h1 { font-size: 2.4rem; font-weight: 800; margin-bottom: .75rem; position: relative; z-index: 1; }
.auth-left p { font-size: 1.1rem; opacity: .85; max-width: 360px; text-align: center; line-height: 1.6; position: relative; z-index: 1; }
.auth-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: .4rem; color: var(--text); }
.auth-card .auth-subtitle { font-size: .9rem; color: var(--text-secondary); margin-bottom: 1.75rem; }
.auth-card .form-actions { margin-top: 1.5rem; }
.auth-card .form-actions .btn { width: 100%; justify-content: center; padding: .75rem; font-size: .95rem; }
.auth-switch { margin-top: 1.25rem; text-align: center; font-size: .85rem; color: var(--text-secondary); }
.auth-switch a { color: var(--accent); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* Auth navbar */
.auth-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 64px; background: var(--bg-card);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.auth-nav-brand { display: flex; align-items: center; gap: .6rem; font-size: 1.1rem; font-weight: 800; color: var(--text); cursor: pointer; text-decoration: none; }
.auth-nav-brand-logo {
  width: 36px; height: 36px; border-radius: 10px; object-fit: contain;
}
.auth-nav-brand-icon {
  width: 36px; height: 36px; border-radius: 10px; background: var(--gradient-hero);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: #fff;
}
.auth-nav-links { display: flex; align-items: center; gap: 1rem; }
.auth-nav-links a { font-size: .88rem; font-weight: 500; color: var(--text-secondary); transition: color .2s; }
.auth-nav-links a:hover { color: var(--accent); }
.auth-nav-links .btn { font-size: .82rem; }

/* Rich footer */
.site-footer {
  background: var(--bg-card); border-top: 1px solid var(--border); padding: 3rem 2rem 1.5rem;
}
.site-footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem;
}
.site-footer-brand { display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; font-weight: 800; color: var(--text); margin-bottom: .75rem; }
.site-footer-brand-logo {
  width: 32px; height: 32px; border-radius: 8px; object-fit: contain;
}
.site-footer-brand-icon {
  width: 32px; height: 32px; border-radius: 8px; background: var(--gradient-hero);
  display: flex; align-items: center; justify-content: center; font-size: 1rem; color: #fff;
}
.site-footer-desc { font-size: .82rem; color: var(--text-secondary); line-height: 1.6; max-width: 300px; }
.site-footer h4 { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .75rem; }
.site-footer-links { list-style: none; }
.site-footer-links li { margin-bottom: .5rem; }
.site-footer-links a { font-size: .85rem; color: var(--text-secondary); transition: color .2s; }
.site-footer-links a:hover { color: var(--accent); }
.site-footer-bottom {
  max-width: 1200px; margin: 2rem auto 0; padding-top: 1.25rem;
  border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between;
  font-size: .78rem; color: var(--text-muted);
}
.site-footer-social { display: flex; gap: .75rem; }
.site-footer-social a { color: var(--text-muted); font-size: 1.15rem; transition: color .2s; }
.site-footer-social a:hover { color: var(--accent); }
@media (max-width: 768px) {
  .site-footer-inner { grid-template-columns: 1fr 1fr; }
  .site-footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
}
@media (max-width: 480px) {
  .site-footer-inner { grid-template-columns: 1fr; }
}

/* CMS editable inline */
.cms-editable { position: relative; cursor: default; }
.cms-editable[data-cms-admin="true"] { cursor: pointer; border-radius: 6px; transition: outline .2s; }
.cms-editable[data-cms-admin="true"]:hover { outline: 2px dashed var(--accent); outline-offset: 4px; }
.cms-editable[data-cms-admin="true"]::after {
  content: '\\eb1c'; font-family: 'remixicon'; font-size: .7rem;
  position: absolute; top: -8px; right: -8px; width: 20px; height: 20px;
  background: var(--accent); color: #fff; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
}
.cms-editable[data-cms-admin="true"]:hover::after { display: flex; }

.alert { padding: .75rem 1rem; border-radius: 10px; font-size: .85rem; margin-bottom: 1rem; display: none; align-items: center; gap: .5rem; }
.alert.visible { display: flex; }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-success { background: var(--success-bg); color: var(--success); }

/* ══════════════════════════════════════════════════════════════════════════
   LANDING PAGE — Fresh Light Design
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Landing Nav ─────────────────────────────────────────────────── */
.landing-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 70px; background: transparent;
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: all .3s ease;
}
.landing-nav.scrolled {
  background: var(--bg-topbar); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px); box-shadow: 0 2px 20px rgba(0,0,0,.06);
}
.landing-brand {
  display: flex; align-items: center; gap: .6rem; font-size: 1.15rem;
  font-weight: 800; color: var(--text); white-space: nowrap; text-decoration: none;
}
.landing-brand-logo { width: 42px; height: 42px; border-radius: 10px; object-fit: contain; }
.landing-links { display: flex; align-items: center; gap: 1rem; }
.landing-link {
  color: var(--text-secondary); font-size: .88rem; font-weight: 500;
  transition: color .2s; padding: .25rem 0;
}
.landing-link:hover { color: var(--accent); }
.landing-theme-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--bg-card);
  color: var(--text-secondary); font-size: 1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .3s;
}
.landing-theme-btn:hover { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }
.landing-mobile-btn {
  display: none; width: 40px; height: 40px; border-radius: 10px; border: none;
  background: var(--bg-hover); color: var(--text); font-size: 1.3rem;
  cursor: pointer; align-items: center; justify-content: center;
}

/* ── Hero Section — Whitesmoke + Light ───────────────────────────── */
.hero-section {
  position: relative; overflow: hidden;
  background: #f5f5f5;
  padding: 7.5rem 2rem 5rem; min-height: 92vh;
  display: flex; align-items: center;
}
[data-theme="dark"] .hero-section { background: var(--gradient-hero); }

.hero-section::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, #c4cdd9 1.5px, transparent 1.5px);
  background-size: 28px 28px; opacity: .5; pointer-events: none; transition: opacity .3s;
}
[data-theme="dark"] .hero-section::before { opacity: 0; }

.hero-bg-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-shape { position: absolute; border-radius: 50%; }
.hero-shape-1 { width: 640px; height: 640px; top: -280px; right: -180px; background: rgba(14,165,233,.09); }
.hero-shape-2 { width: 480px; height: 480px; bottom: -220px; left: -120px; background: rgba(139,92,246,.08); }
.hero-shape-3 { width: 300px; height: 300px; top: 38%; left: 46%; background: rgba(245,158,11,.06); }
[data-theme="dark"] .hero-shape-1,
[data-theme="dark"] .hero-shape-2,
[data-theme="dark"] .hero-shape-3 { background: rgba(255,255,255,.04); }

.hero-container {
  max-width: 1200px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
  position: relative; z-index: 1;
}
.hero-content { color: var(--text); }

.hero-welcome-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--accent-bg); border: 1px solid rgba(14,165,233,.25);
  padding: .45rem 1rem; border-radius: var(--radius-full);
  font-size: .82rem; font-weight: 600; color: var(--accent-text); margin-bottom: 1.5rem;
}
.hero-welcome-badge i { color: #f59e0b; }
[data-theme="dark"] .hero-welcome-badge {
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.18); color: #fff;
}

.hero-heading {
  font-size: 3.2rem; font-weight: 900; line-height: 1.1;
  letter-spacing: -.02em; margin-bottom: 1.25rem; color: var(--text);
}
[data-theme="dark"] .hero-heading { color: #fff; }
.hero-heading span { display: block; }
.hero-typed-wrap {
  position: relative; display: inline-block;
  border-bottom: 4px solid var(--accent); padding-bottom: 4px; margin-top: .2rem;
}
[data-theme="dark"] .hero-typed-wrap { border-bottom-color: rgba(255,255,255,.4); }
.hero-typed { color: var(--accent); transition: opacity .5s, transform .5s; display: inline-block; }
[data-theme="dark"] .hero-typed { color: #fbbf24; }
.hero-typed.typing-out { opacity: 0; transform: translateY(10px); }
.hero-typed.typing-in { animation: fadeInUp .5s ease both; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.hero-desc {
  font-size: 1.05rem; line-height: 1.7; color: var(--text-secondary);
  margin-bottom: 2rem; max-width: 520px;
}
[data-theme="dark"] .hero-desc { color: rgba(255,255,255,.75); }

.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }

.btn-hero-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.75rem; border-radius: 12px; font-size: .95rem; font-weight: 700;
  background: var(--accent); color: #fff; border: 2px solid var(--accent);
  cursor: pointer; transition: all .3s; text-decoration: none;
  box-shadow: 0 4px 14px rgba(14,165,233,.28);
}
.btn-hero-primary:hover {
  background: var(--accent-hover); border-color: var(--accent-hover);
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(14,165,233,.38);
}
.btn-hero-primary i { font-size: 1.1rem; }
[data-theme="dark"] .btn-hero-primary {
  background: #fff; color: #0c4a6e; border-color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
[data-theme="dark"] .btn-hero-primary:hover { background: rgba(255,255,255,.92); }

.btn-hero-outline {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.75rem; border-radius: 12px; font-size: .95rem; font-weight: 700;
  background: #fff; color: var(--text); border: 2px solid var(--border);
  cursor: pointer; transition: all .3s; text-decoration: none;
}
.btn-hero-outline:hover {
  border-color: var(--accent); color: var(--accent);
  box-shadow: 0 4px 14px rgba(14,165,233,.12);
}
.btn-hero-outline i { font-size: 1.1rem; }
[data-theme="dark"] .btn-hero-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
[data-theme="dark"] .btn-hero-outline:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.55); }

.hero-trust-badges { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.trust-badge {
  display: flex; align-items: center; gap: .4rem;
  font-size: .82rem; font-weight: 600; color: var(--text-secondary);
}
.trust-badge i { color: #f59e0b; font-size: 1rem; }
[data-theme="dark"] .trust-badge { color: rgba(255,255,255,.7); }

/* ── Hero App Mockup Visual ───────────────────────────────────────── */
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; }

.hero-deco-ring {
  position: absolute; border-radius: 50%; pointer-events: none;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.hero-deco-ring-1 {
  width: 430px; height: 430px;
  border: 1.5px dashed rgba(14,165,233,.22);
  animation: ringRotate 22s linear infinite;
}
.hero-deco-ring-2 {
  width: 540px; height: 540px;
  border: 1.5px dashed rgba(139,92,246,.18);
  animation: ringRotate 34s linear infinite reverse;
}
[data-theme="dark"] .hero-deco-ring-1 { border-color: rgba(255,255,255,.12); }
[data-theme="dark"] .hero-deco-ring-2 { border-color: rgba(255,255,255,.07); }
@keyframes ringRotate {
  from { transform: translate(-50%,-50%) rotate(0deg); }
  to   { transform: translate(-50%,-50%) rotate(360deg); }
}

.hero-app-window {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; width: 100%; max-width: 440px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.04),
              0 20px 50px rgba(0,0,0,.10),
              0 0 0 1px rgba(255,255,255,.7);
  overflow: hidden; position: relative; z-index: 2;
}
[data-theme="dark"] .hero-app-window {
  box-shadow: 0 25px 70px rgba(0,0,0,.42), 0 0 0 1px rgba(255,255,255,.05);
}

.hero-app-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem 1rem;
  background: var(--bg-topbar); border-bottom: 1px solid var(--border);
}
.hero-app-dots { display: flex; gap: 6px; align-items: center; }
.hero-app-dots .dot { width: 10px; height: 10px; border-radius: 50%; display: block; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.hero-app-bar-title {
  font-size: .78rem; font-weight: 700; color: var(--text-secondary); letter-spacing: .02em;
}
.hd-live-badge {
  display: flex; align-items: center; gap: .3rem;
  font-size: .7rem; font-weight: 700; color: var(--success);
  background: var(--success-bg); padding: .2rem .55rem; border-radius: 20px;
}
.hd-live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--success);
  animation: pulse 2s infinite; flex-shrink: 0;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.hero-app-body { display: flex; min-height: 270px; }

.hero-app-sidebar {
  width: 46px; background: var(--bg-sidebar); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center;
  padding: .75rem 0; gap: .28rem; flex-shrink: 0;
}
.hero-sidebar-item {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .92rem; color: var(--text-muted); cursor: default; transition: all .2s;
}
.hero-sidebar-item.active { background: var(--accent-bg); color: var(--accent); }

.hero-app-content { flex: 1; padding: .9rem; overflow: hidden; }

.hero-app-welcome {
  display: flex; align-items: center; gap: .65rem; margin-bottom: .75rem;
  padding-bottom: .7rem; border-bottom: 1px solid var(--border-light);
}
.hero-avatar {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  color: #fff; font-size: .7rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.hero-app-greeting { font-size: .78rem; font-weight: 700; color: var(--text); }
.hero-app-subtitle { font-size: .68rem; color: var(--text-muted); margin-top: .1rem; }

.hero-app-stats {
  display: grid; grid-template-columns: repeat(3,1fr); gap: .45rem; margin-bottom: .8rem;
}
.hero-app-stat {
  padding: .55rem .35rem; border-radius: 9px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
}
.hero-app-stat.blue   { background: var(--accent-bg); }
.hero-app-stat.green  { background: var(--success-bg); }
.hero-app-stat.orange { background: var(--warning-bg); }
.hero-app-stat i { font-size: .88rem; }
.hero-app-stat.blue   i { color: var(--accent); }
.hero-app-stat.green  i { color: var(--success); }
.hero-app-stat.orange i { color: var(--warning); }
.hero-app-stat-val { font-size: .88rem; font-weight: 800; color: var(--text); line-height: 1; }
.hero-app-stat-lbl {
  font-size: .58rem; color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .03em;
}

.hero-app-section-title {
  font-size: .67rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: .5rem;
}

.hero-app-progress { display: flex; flex-direction: column; gap: .5rem; }
.hero-prog-info { display: flex; justify-content: space-between; margin-bottom: .18rem; }
.hero-prog-info span:first-child { font-size: .72rem; color: var(--text); font-weight: 500; }
.hero-prog-pct { font-size: .7rem; font-weight: 700; color: var(--text-secondary); }
.hero-prog-bar { height: 5px; background: var(--border); border-radius: 99px; overflow: hidden; }
.hero-prog-fill { height: 100%; border-radius: 99px; }

/* Floating Cards */
.hero-floating-card {
  position: absolute; display: flex; align-items: center; gap: .65rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: .7rem .95rem;
  box-shadow: 0 8px 30px rgba(0,0,0,.1), 0 2px 8px rgba(0,0,0,.06);
  animation: floatCard 3.5s ease-in-out infinite; color: var(--text); z-index: 3; white-space: nowrap;
}
[data-theme="dark"] .hero-floating-card { box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.hfc-cert { bottom: .5rem; left: -1.5rem; }
.hfc-cert i {
  font-size: 1.4rem; color: var(--success);
  background: var(--success-bg); padding: .45rem; border-radius: 9px; flex-shrink: 0;
}
.hfc-cert strong { display: block; font-size: .8rem; line-height: 1.2; }
.hfc-cert small  { font-size: .7rem; color: var(--text-muted); }
.hfc-score { top: .5rem; right: -1.5rem; animation-delay: 1.8s; }
.hfc-score-ring {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff; font-size: .72rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.hfc-score strong { display: block; font-size: .8rem; line-height: 1.2; }
.hfc-score small  { font-size: .7rem; color: var(--text-muted); }

@keyframes floatCard { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ── Stats Section ─────────────────────────────────────────────────── */
.stats-section {
  background: var(--bg-card); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 2.5rem 2rem;
}
.stats-container {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
}
.stat-item { display: flex; align-items: center; gap: 1rem; }
.stat-icon-wrap {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.stat-icon-wrap.blue { background: var(--accent-bg); color: var(--accent); }
.stat-icon-wrap.green { background: var(--success-bg); color: var(--success); }
.stat-icon-wrap.orange { background: var(--warning-bg); color: var(--warning); }
.stat-icon-wrap.purple { background: var(--accent-bg); color: var(--accent); }
.stat-item .stat-number { display: block; font-size: 1.75rem; font-weight: 900; color: var(--text); line-height: 1.1; }
.stat-item .stat-text { font-size: .82rem; color: var(--text-secondary); }

/* ── Section Common ────────────────────────────────────────────────── */
.section-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--accent-bg); color: var(--accent);
  padding: .4rem .85rem; border-radius: var(--radius-full);
  font-size: .78rem; font-weight: 700; margin-bottom: 1rem;
}
.section-badge i { font-size: .9rem; }
.section-heading { font-size: 2rem; font-weight: 900; color: var(--text); margin-bottom: .5rem; text-align: center; letter-spacing: -.02em; }
.section-subtext { text-align: center; color: var(--text-secondary); margin-bottom: 2.5rem; font-size: 1rem; max-width: 600px; margin-left: auto; margin-right: auto; line-height: 1.6; }
.section-cta { text-align: center; margin-top: 2rem; }

/* ── Features Section ──────────────────────────────────────────────── */
.features-section { padding: 5rem 2rem; background: var(--bg); }
.features-container { max-width: 1100px; margin: 0 auto; text-align: center; }
.features-section .features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem 1.5rem; text-align: center; transition: all .3s;
}
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: var(--accent); }
.feature-icon {
  width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.feature-icon.blue   { background: var(--accent-bg); color: var(--accent); }
.feature-icon.green  { background: var(--success-bg); color: var(--success); }
.feature-icon.orange { background: var(--warning-bg); color: var(--warning); }
.feature-icon.purple { background: var(--accent-bg); color: var(--accent); }
.feature-card h3 { font-size: .95rem; font-weight: 700; color: var(--text); margin-bottom: .4rem; }
.feature-card p { font-size: .85rem; color: var(--text-secondary); line-height: 1.6; }

/* ── Courses Section ───────────────────────────────────────────────── */
.courses-section { padding: 5rem 2rem; background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.courses-container { max-width: 1400px; margin: 0 auto; text-align: center; }

/* ── About Section ─────────────────────────────────────────────────── */
.about-section { padding: 5rem 2rem; background: var(--bg); }
.about-container {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start;
}
.about-tagline { font-size: 1.1rem; font-weight: 600; color: var(--accent); margin-bottom: 1rem; font-style: italic; }
.about-text { color: var(--text-secondary); line-height: 1.8; margin-bottom: 1rem; font-size: .92rem; }
.about-highlights { margin-top: 1.5rem; }
.about-highlight {
  display: flex; align-items: center; gap: .65rem;
  padding: .5rem 0; font-size: .88rem; color: var(--text);
}
.about-highlight i { color: var(--success); font-size: 1.1rem; flex-shrink: 0; }
.about-visual { display: flex; flex-direction: column; gap: 1.25rem; }
.about-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; transition: all .3s;
}
.about-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.about-card-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--accent-bg);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: .75rem;
}
.about-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: .35rem; color: var(--text); }
.about-card p { font-size: .82rem; color: var(--text-secondary); line-height: 1.6; }

/* ── Categories / Training Areas ───────────────────────────────────── */
.categories-section { padding: 5rem 2rem; background: var(--bg-card); border-top: 1px solid var(--border); }
.categories-container { max-width: 1100px; margin: 0 auto; text-align: center; }
.categories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.category-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.75rem; text-align: center; transition: all .3s;
}
.category-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: var(--accent); }
.cat-icon {
  width: 60px; height: 60px; border-radius: 16px; margin: 0 auto .85rem;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.cat-icon.red    { background: var(--danger-bg); color: var(--danger); }
.cat-icon.orange { background: var(--warning-bg); color: var(--warning); }
.cat-icon.blue   { background: var(--accent-bg); color: var(--accent); }
.cat-icon.green  { background: var(--success-bg); color: var(--success); }
.cat-icon.purple { background: var(--accent-bg); color: var(--accent); }
.cat-icon.teal   { background: var(--warning-bg); color: var(--warning); }
.category-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: .3rem; color: var(--text); }
.category-card p { font-size: .82rem; color: var(--text-secondary); line-height: 1.5; }

/* ── CTA Section ───────────────────────────────────────────────────── */
.cta-section {
  padding: 5rem 2rem;
  background: var(--gradient-hero); color: #fff; text-align: center;
}
.cta-container { max-width: 700px; margin: 0 auto; }
.cta-content h2 { font-size: 2rem; font-weight: 900; margin-bottom: 1rem; }
.cta-content p { font-size: 1.05rem; color: rgba(255,255,255,.8); margin-bottom: 2rem; line-height: 1.7; }
.cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cta-section .btn-hero-primary {
  background: #fff; color: #0c4a6e; border-color: #fff; box-shadow: none;
}
.cta-section .btn-hero-primary:hover { background: rgba(255,255,255,.9); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.cta-section .btn-hero-outline {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.35);
}
.cta-section .btn-hero-outline:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.65); color: #fff; box-shadow: none; }

/* ── Enrollment Status UI ──────────────────────────────────────────── */
.enroll-status-badge {
  display: flex; align-items: flex-start; gap: .85rem;
  padding: .9rem 1.1rem; border-radius: 12px; font-size: .88rem;
}
.enroll-status-badge i { font-size: 1.4rem; flex-shrink: 0; margin-top: .1rem; }
.enroll-status-badge strong { display: block; font-weight: 700; margin-bottom: .2rem; }
.enroll-status-badge span { font-size: .82rem; line-height: 1.5; opacity: .85; }
.enroll-status-badge.pending {
  background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245,158,11,.25);
}
.enroll-status-badge.rejected {
  background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(239,68,68,.25);
}

/* Course card enrollment status bar (dashboard) */
.course-enroll-status-bar {
  display: flex; align-items: center; gap: .4rem;
  padding: .35rem .75rem; font-size: .75rem; font-weight: 700;
}
.course-enroll-status-bar.pending { background: var(--warning-bg); color: var(--warning); }
.course-enroll-status-bar.rejected { background: var(--danger-bg); color: var(--danger); }

/* Course card dim for non-approved */
.enrollment-pending { opacity: .9; }
.enrollment-pending .course-thumb-placeholder { background: linear-gradient(135deg,#f59e0b,#fbbf24); }
.enrollment-rejected { opacity: .75; filter: grayscale(30%); }

/* Dashboard pending notice banner */
.enroll-notice-banner {
  display: flex; align-items: flex-start; gap: .9rem;
  background: var(--warning-bg); border: 1px solid rgba(245,158,11,.3);
  border-radius: 12px; padding: .9rem 1.15rem; margin-bottom: 1.25rem;
  font-size: .88rem; color: var(--warning);
}
.enroll-notice-banner i { font-size: 1.3rem; flex-shrink: 0; margin-top: .1rem; }
.enroll-notice-banner strong { display: block; font-weight: 700; margin-bottom: .15rem; color: var(--warning); }
.enroll-notice-banner span { font-size: .82rem; color: var(--text-secondary); line-height: 1.5; }

/* ── Contact Section ───────────────────────────────────────────────── */
.contact-section { padding: 5rem 2rem; background: var(--bg); }
.contact-container { max-width: 900px; margin: 0 auto; text-align: center; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.contact-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem 1.5rem; text-align: center;
  transition: all .3s;
}
.contact-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.contact-icon {
  width: 56px; height: 56px; border-radius: 14px; background: var(--accent-bg);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin: 0 auto .85rem;
}
.contact-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: .5rem; color: var(--text); }
.contact-card p { font-size: .85rem; color: var(--text-secondary); line-height: 1.6; }

/* ══════════════════════════════════════════════════════════════════════════
   COURSE DETAIL
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Guest Course Preview ──────────────────────────────────────────── */
.course-preview { max-width: 1100px; margin: 0 auto; }
.course-preview-header {
  display: flex; gap: 2rem; align-items: flex-start;
  margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border);
}
.course-preview-thumb {
  width: 320px; min-width: 320px; height: 200px; border-radius: var(--radius-lg); overflow: hidden; flex-shrink: 0;
}
.course-preview-thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-preview-thumb.placeholder {
  background: var(--gradient-card); display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: rgba(255,255,255,.5);
}
.course-preview-info { flex: 1; }
.course-preview-info h1 { font-size: 1.6rem; font-weight: 800; color: var(--text); margin: .5rem 0 .65rem; line-height: 1.25; }
.course-preview-meta {
  display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: .85rem; color: var(--text-secondary); margin-bottom: .75rem;
}
.course-preview-meta span { display: flex; align-items: center; gap: .3rem; }
.course-preview-meta i { font-size: 1rem; color: var(--accent); }
.course-preview-desc { font-size: .9rem; color: var(--text-secondary); line-height: 1.7; }

.course-preview-body {
  display: grid; grid-template-columns: 1fr 340px; gap: 2rem; align-items: start;
}
.course-preview-section {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; margin-bottom: 1.25rem;
}
.course-preview-section h3 {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 1rem;
  padding-bottom: .75rem; border-bottom: 1px solid var(--border);
}
.course-preview-section h3 i { color: var(--accent); font-size: 1.15rem; }
.course-preview-section p { font-size: .88rem; color: var(--text-secondary); line-height: 1.7; }

.course-preview-lessons { list-style: none; }
.course-preview-lessons li {
  display: flex; align-items: center; gap: .75rem; padding: .7rem .5rem;
  border-bottom: 1px solid var(--border); font-size: .88rem; color: var(--text);
  transition: background .2s;
}
.course-preview-lessons li:last-child { border-bottom: none; }
.course-preview-lessons li:hover { background: var(--bg-hover); border-radius: 8px; }
.cpl-num {
  width: 28px; height: 28px; border-radius: 8px; background: var(--accent-bg); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; flex-shrink: 0;
}
.cpl-title { flex: 1; font-weight: 500; }
.cpl-dur { font-size: .78rem; color: var(--text-muted); display: flex; align-items: center; gap: .2rem; }
.cpl-lock { color: var(--text-muted); font-size: .9rem; }

.course-preview-sidebar { position: sticky; top: 5.5rem; }
.course-preview-cta-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.75rem; text-align: center;
}
.cta-card-icon {
  width: 56px; height: 56px; border-radius: 16px; background: var(--accent-bg); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
  margin: 0 auto 1rem;
}
.course-preview-cta-card h3 { font-size: 1.1rem; font-weight: 800; color: var(--text); margin-bottom: .5rem; }
.course-preview-cta-card > p { font-size: .85rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1.25rem; }
.cta-card-perks {
  margin-top: 1.25rem; text-align: left;
  display: flex; flex-direction: column; gap: .4rem;
}
.cta-card-perks div {
  display: flex; align-items: center; gap: .5rem;
  font-size: .82rem; color: var(--text-secondary);
}
.cta-card-perks i { color: var(--success); font-size: .95rem; flex-shrink: 0; }

@media (max-width: 768px) {
  .course-preview-header { flex-direction: column; }
  .course-preview-thumb { width: 100%; min-width: 0; height: 180px; }
  .course-preview-body { grid-template-columns: 1fr; }
  .course-preview-sidebar { position: static; }
}

/* ── End Guest Preview ─────────────────────────────────────────────── */
.course-detail-body { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; }
@media (max-width: 780px) { .course-detail-body { grid-template-columns: 1fr; } }
.course-sidebar-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; height: fit-content; position: sticky; top: calc(var(--topbar-h) + 1.5rem);
}
.course-sidebar-card .course-thumb { height: 200px; border-radius: 0; }
.course-sidebar-inner { padding: 1.25rem; }
.course-sidebar-price { font-size: 1.7rem; font-weight: 900; color: var(--accent); margin-bottom: 1rem; }

/* ══════════════════════════════════════════════════════════════════════════
   TABS
   ══════════════════════════════════════════════════════════════════════════ */
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn {
  padding: .65rem 1.25rem; border: none; background: none;
  font-size: .88rem; font-weight: 600; color: var(--text-muted); cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: all var(--transition); display: flex; align-items: center; gap: .4rem;
}
.tab-btn i { font-size: 1rem; }
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn .3s ease; }

/* ══════════════════════════════════════════════════════════════════════════
   ASSIGNMENTS
   ══════════════════════════════════════════════════════════════════════════ */
.assignment-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem; margin-bottom: .75rem; display: flex; align-items: center; gap: 1rem;
  transition: all var(--transition);
}
.assignment-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.assignment-icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--accent-bg); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0;
}
.assignment-info { flex: 1; }
.assignment-title { font-weight: 700; font-size: .9rem; color: var(--text); }
.assignment-meta { font-size: .78rem; color: var(--text-muted); margin-top: .15rem; }

/* ══════════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════════════════ */
.empty-state { text-align: center; padding: 3.5rem 2rem; color: var(--text-muted); }
.empty-icon {
  width: 72px; height: 72px; border-radius: 20px; background: var(--bg-hover);
  display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 1rem;
}
.empty-state h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-secondary); margin-bottom: .4rem; }
.empty-state p { font-size: .88rem; max-width: 320px; margin: 0 auto .75rem; }

/* ══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════════════════ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

.animate-in { animation: fadeInUp .4s ease both; }
.animate-in:nth-child(2) { animation-delay: .05s; }
.animate-in:nth-child(3) { animation-delay: .1s; }
.animate-in:nth-child(4) { animation-delay: .15s; }
.animate-in:nth-child(5) { animation-delay: .2s; }
.animate-in:nth-child(6) { animation-delay: .25s; }

.skeleton { background: var(--bg-hover); border-radius: 8px; animation: pulse 1.5s ease-in-out infinite; }
.skeleton-text { height: 14px; margin-bottom: .5rem; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: .65rem; }
.skeleton-thumb { height: 170px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }

/* ══════════════════════════════════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════════════════════════════════ */
.loading { color: var(--text-muted); font-style: italic; }
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.fw-700 { font-weight: 700; }
.fs-sm { font-size: .82rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-1 { gap: .5rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.page-header h1 { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.page-header p { font-size: .88rem; color: var(--text-secondary); margin-top: .2rem; }

.section-header { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.section-header h2 { font-size: 1.15rem; font-weight: 700; white-space: nowrap; }
.section-header::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Lesson page */
.lesson-page { max-width: 900px; margin: 0 auto; }
.lesson-video { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-lg); background: #000; margin-bottom: 1.5rem; border: none; }
.lesson-video-fallback {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 2px dashed var(--border);
}
.lesson-video-fallback a {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  color: var(--accent); font-weight: 600; text-decoration: none;
}
.lesson-video-fallback a i { font-size: 3rem; }
.lesson-video-fallback a:hover { color: var(--accent-hover); }
.lesson-content-box {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; line-height: 1.75; color: var(--text-secondary); white-space: pre-wrap;
}
.lesson-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 1.5rem; flex-wrap: wrap; gap: 1rem; }

/* ══════════════════════════════════════════════════════════════════════════
   ADMIN PANEL
   ══════════════════════════════════════════════════════════════════════════ */

/* Spin animation for loader */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; animation: spin 1s linear infinite; }

/* Stats row */
.admin-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}

/* Tabs */
.admin-tabs {
  display: flex; gap: 0; border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem; overflow-x: auto;
}
.admin-tab {
  display: flex; align-items: center; gap: .4rem;
  padding: .7rem 1.25rem; border: none; background: none; cursor: pointer;
  font-weight: 600; font-size: .9rem; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.admin-tab i { font-size: 1.1rem; }
.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--danger); color: #fff;
  font-size: .65rem; font-weight: 700; border-radius: 99px;
  margin-left: .2rem;
}

/* Panels */
.admin-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: 1.5rem;
}
.admin-panel.hidden { display: none; }
.admin-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
  gap: 1rem; flex-wrap: wrap;
}
.admin-panel-header h2 {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1rem; font-weight: 700; margin: 0; white-space: nowrap;
}
.admin-panel-header h2 i { color: var(--accent); }

/* Search */
.admin-search {
  display: flex; align-items: center; gap: .4rem;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0 .75rem;
  min-width: 200px; max-width: 300px;
}
.admin-search i { color: var(--text-muted); font-size: .95rem; }
.admin-search input {
  border: none; background: none; padding: .5rem .25rem;
  font-size: .85rem; width: 100%; color: var(--text);
  outline: none;
}

/* Table */
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%; border-collapse: collapse; font-size: .85rem;
}
.admin-table thead th {
  text-align: left; padding: .65rem 1rem;
  font-weight: 600; font-size: .75rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted);
  background: var(--bg-main); border-bottom: 1px solid var(--border);
}
.admin-table tbody td {
  padding: .6rem 1rem; border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--bg-hover); }
.admin-table tbody tr.row-me { background: var(--accent-bg); }
.admin-loading {
  text-align: center; padding: 2rem !important;
  color: var(--text-muted); font-size: .9rem;
}

/* User cell */
.admin-user-cell { display: flex; align-items: center; gap: .6rem; }
.admin-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; flex-shrink: 0; color: #fff;
}
.admin-avatar.role-admin { background: var(--danger); }
.admin-avatar.role-instructor { background: var(--accent); }
.admin-avatar.role-student { background: var(--success); }

/* Role select */
.role-select {
  appearance: none; -webkit-appearance: none;
  padding: .3rem .65rem; border-radius: var(--radius);
  font-size: .8rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-input);
  color: var(--text); transition: all var(--transition);
}
.role-select:hover { border-color: var(--accent); }
.role-select:disabled { opacity: .5; cursor: not-allowed; }
.role-select.role-admin { color: var(--danger); border-color: var(--danger); }
.role-select.role-instructor { color: var(--accent); border-color: var(--accent); }
.role-select.role-student { color: var(--success); border-color: var(--success); }

/* Action buttons in table */
.admin-actions-row { display: flex; gap: .25rem; }

/* ── CMS Form ─────────────────────────────────────────────────────── */
.cms-form { padding: 1.25rem; }
.cms-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
}
.cms-grid .form-group.full { grid-column: 1 / -1; }
.cms-form label {
  display: flex; align-items: center; gap: .4rem;
  font-weight: 600; font-size: .8rem; color: var(--text-secondary);
  margin-bottom: .3rem;
}
.cms-form label i { color: var(--accent); font-size: .95rem; }
.cms-form .form-input {
  width: 100%; padding: .55rem .75rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-input); color: var(--text);
  font-size: .88rem; transition: border-color var(--transition);
}
.cms-form .form-input:focus { border-color: var(--accent); outline: none; }
.cms-form textarea.form-input { resize: vertical; line-height: 1.6; }
.cms-icon-preview {
  display: flex; align-items: center; gap: .75rem;
}
.cms-icon-preview input { flex: 1; }
.cms-icon-preview i { font-size: 1.6rem; color: var(--accent); }

.cms-actions {
  display: flex; gap: .75rem; margin-top: 1.25rem;
  padding-top: 1rem; border-top: 1px solid var(--border);
}

/* ── Profile Tab ── */
.profile-card {
  padding: 1.5rem 1.75rem;
}
.profile-avatar-section {
  display: flex; align-items: center; gap: 1.5rem;
  margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border);
}
.profile-avatar {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--gradient-card); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 700; flex-shrink: 0;
  overflow: hidden; box-shadow: 0 4px 15px rgba(14,165,233,.3);
  letter-spacing: .05em;
}
.profile-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
.profile-avatar-info h3 {
  margin: 0 0 .35rem; font-size: 1.2rem; font-weight: 700; color: var(--text);
}
.profile-avatar-info .badge {
  margin-bottom: .45rem; display: inline-block;
  text-transform: uppercase; font-size: .7rem; letter-spacing: .06em;
}
.profile-avatar-info p { margin: .15rem 0; font-size: .85rem; }
.profile-form { margin-top: .5rem; }
.profile-form .form-label {
  font-weight: 600; font-size: .82rem; color: var(--text-secondary);
  margin-bottom: .35rem; display: block;
}
.profile-form .form-input {
  width: 100%; padding: .6rem .85rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-input); color: var(--text);
  font-size: .88rem; transition: border-color var(--transition);
}
.profile-form .form-input:focus {
  border-color: var(--accent); outline: none;
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.profile-form .form-input:disabled {
  opacity: .6; cursor: not-allowed; background: var(--bg-main);
}
.profile-form .file-upload-area.compact {
  padding: 1rem; display: flex; align-items: center; gap: .85rem;
  border: 2px dashed var(--border); border-radius: var(--radius);
  cursor: pointer; position: relative; transition: border-color .2s, background .2s;
  background: var(--bg-input);
}
.profile-form .file-upload-area.compact:hover {
  border-color: var(--accent); background: var(--accent-bg);
}
.profile-form .file-upload-area.compact input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.profile-form .file-upload-area.compact i {
  font-size: 1.5rem; color: var(--accent);
}
.profile-form .file-upload-area.compact p {
  margin: 0; font-size: .85rem; color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════════════
   COURSE PAGE — 8+4 Layout with Accordion
   ══════════════════════════════════════════════════════════════════════════ */

/* Course Hero */
.course-hero {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem;
  margin-bottom: 1.5rem; flex-wrap: wrap;
}
.course-hero-info h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: .35rem; }
.course-hero-meta {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  color: var(--text-secondary); font-size: .85rem; margin-bottom: .5rem;
}
.course-hero-meta i { margin-right: .2rem; }
.course-hero-desc { color: var(--text-secondary); line-height: 1.7; margin-top: .5rem; max-width: 720px; }
.course-badges { display: flex; gap: .5rem; margin-bottom: .5rem; }
.course-hero-action { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; flex-shrink: 0; }
.course-progress-bar { display: flex; align-items: center; gap: .75rem; min-width: 200px; }
.course-progress-bar .progress-wrap { flex: 1; }

/* Main 8+4 Grid */
.course-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
}

/* Video Area */
.video-area {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
}
.video-area .lesson-video { margin-bottom: 0; border-radius: 0; }
.video-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  aspect-ratio: 16/9; background: var(--bg-card); border: 2px dashed var(--border);
  border-radius: var(--radius-lg); color: var(--text-muted);
}
.video-placeholder i { font-size: 3rem; margin-bottom: .5rem; }
.video-placeholder p { font-size: .9rem; }

/* Lesson Info Panel */
.lesson-info-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem; margin-top: 1rem;
}
.lesson-info-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: .75rem;
}
.lesson-info-header h2 { font-size: 1.15rem; font-weight: 700; }
.lesson-info-content {
  color: var(--text-secondary); line-height: 1.75; white-space: pre-wrap;
  padding: .75rem 0; border-top: 1px solid var(--border);
}
.lesson-info-actions {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  padding-top: .75rem; border-top: 1px solid var(--border); margin-top: .75rem;
}

/* ── Accordion Sidebar ─────────────────────────────────────────────── */
.course-sidebar-acc {
  position: sticky; top: calc(var(--topbar-h) + 1rem);
  display: flex; flex-direction: column; gap: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}

.accordion-section { border-bottom: 1px solid var(--border); }
.accordion-section:last-child { border-bottom: none; }

.accordion-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: .85rem 1rem;
  background: transparent; border: none; cursor: pointer;
  color: var(--text); font-weight: 600; font-size: .9rem;
  transition: background var(--transition);
}
.accordion-toggle:hover { background: var(--bg-hover); }
.accordion-toggle-left { display: flex; align-items: center; gap: .5rem; }
.accordion-toggle-left > i { font-size: 1.1rem; color: var(--accent); }
.accordion-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; border-radius: 10px;
  background: var(--accent-bg); color: var(--accent-text);
  font-size: .7rem; font-weight: 700; padding: 0 6px;
}
.accordion-notif {
  color: var(--warning); font-size: .85rem; margin-left: .15rem;
  animation: notifPulse 2s ease-in-out infinite;
}
@keyframes notifPulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.accordion-arrow {
  font-size: 1.25rem; color: var(--text-muted);
  transition: transform var(--transition);
}
.accordion-section.open .accordion-arrow { transform: rotate(180deg); }

.accordion-content {
  max-height: 0; overflow: hidden;
  transition: max-height .35s cubic-bezier(.4,0,.2,1);
}
.accordion-section.open .accordion-content { max-height: 1200px; }

/* Accordion — Lesson list */
.acc-lesson-list { padding: 0; margin: 0; }
.acc-lesson-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .6rem 1rem; cursor: pointer;
  transition: background var(--transition);
  border-top: 1px solid var(--border-light);
}
.acc-lesson-item:hover { background: var(--bg-hover); }
.acc-lesson-item.active { background: var(--accent-bg); }
.acc-lesson-item.done .acc-lesson-status { background: var(--success); color: #fff; }
.acc-lesson-status {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-input); border: 2px solid var(--border);
  font-size: .7rem; font-weight: 700; flex-shrink: 0;
  color: var(--text-muted);
}
.acc-lesson-item.done .acc-lesson-status { border-color: var(--success); }
.acc-lesson-title { flex: 1; font-size: .85rem; font-weight: 500; }
.acc-lesson-meta { font-size: .75rem; color: var(--text-muted); white-space: nowrap; }

/* Accordion — Materials list */
.acc-material-list { padding: 0; margin: 0; }
.acc-material-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1rem; border-top: 1px solid var(--border-light);
  font-size: .85rem;
}
.acc-material-item i { font-size: 1.1rem; color: var(--accent); flex-shrink: 0; }
.acc-material-item a { flex: 1; color: var(--text); font-weight: 500; }
.acc-material-item a:hover { color: var(--accent); }
.acc-material-size { font-size: .75rem; color: var(--text-muted); white-space: nowrap; }

/* Accordion — Assignments list */
.acc-assignment-list { padding: 0; margin: 0; }
.acc-assignment-item {
  padding: .75rem 1rem; border-top: 1px solid var(--border-light);
}
.acc-assignment-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; flex-wrap: wrap;
}
.acc-assignment-header strong { font-size: .85rem; }
.acc-assignment-badges { display: flex; gap: .35rem; flex-wrap: wrap; }
.acc-assignment-desc { font-size: .8rem; color: var(--text-muted); margin-top: .3rem; line-height: 1.5; }
.acc-assignment-actions { display: flex; gap: .5rem; margin-top: .5rem; }

.badge-sm { font-size: .65rem; padding: .15rem .45rem; }
.badge-info { background: var(--accent-bg); color: var(--accent-text); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }

/* ── Instructor page section rows ─────────────────────────────────── */
.instructor-section { border-top: 1px solid var(--border); padding: .75rem 1rem; }
.instructor-section:first-child { border-top: none; }
.instructor-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .35rem;
}
.instructor-section-header > span {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .85rem; color: var(--text-secondary);
}
.instructor-section-header > span i { color: var(--accent); }

/* Submissions list (assignments page) */
.submissions-list { margin-top: .75rem; }
.submission-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem .75rem; background: var(--bg-input); border-radius: 8px;
  margin-bottom: .35rem; gap: .75rem;
}
.submission-info { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; flex: 1; min-width: 0; }
.submission-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .course-layout { grid-template-columns: 1fr; }
  .course-sidebar-acc { position: static; }
  .hero-container { grid-template-columns: 1fr; text-align: center; }
  .hero-content { max-width: 640px; margin: 0 auto; }
  .hero-heading { font-size: 2.5rem; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-btns { justify-content: center; }
  .hero-trust-badges { justify-content: center; }
  .hero-visual { margin-top: 3rem; max-width: 440px; margin-left: auto; margin-right: auto; }
  .hero-floating-card.hfc-cert { left: 0; }
  .hero-floating-card.hfc-score { right: 0; }
  .hero-deco-ring { display: none; }
  .about-container { grid-template-columns: 1fr; }
  .features-section .features-grid { grid-template-columns: repeat(3, 1fr); }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-container { grid-template-columns: repeat(2, 1fr); }
  .course-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-wrap { margin-left: 0 !important; }
  .topbar { left: 0 !important; }
  .topbar-menu-btn { display: block; }
  .topbar-search { max-width: 260px; }
  .topbar-user-info { display: none; }
  .stats-container { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { flex: unset; width: 100%; }
  .auth-nav { padding: 0 1rem; }
  .cms-grid { grid-template-columns: 1fr; }
  .admin-panel-header { flex-direction: column; align-items: flex-start; }
  .admin-search { max-width: 100%; width: 100%; }
  .profile-avatar-section { flex-direction: column; text-align: center; }
  .profile-avatar-info { text-align: center; }
  .features-section .features-grid { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-heading { font-size: 2rem; }
  .hero-section { padding: 7rem 1.5rem 3rem; min-height: auto; }
  .section-heading { font-size: 1.5rem; }
  /* Mobile menu */
  .landing-mobile-btn { display: flex; }
  .landing-links {
    display: none; flex-direction: column; position: absolute;
    top: 70px; left: 0; right: 0; background: var(--bg-card);
    border-bottom: 1px solid var(--border); padding: 1rem 1.5rem;
    gap: .5rem; box-shadow: var(--shadow-lg);
  }
  .landing-links.mobile-open { display: flex; }
  .landing-link { padding: .5rem 0; }
  .landing-nav { padding: 0 1rem; }
}
@media (max-width: 480px) {
  .main-content { padding-left: 1rem; padding-right: 1rem; }
  .features-section .features-grid { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-container { grid-template-columns: repeat(2, 1fr); }
  .hero-heading { font-size: 1.7rem; }
  .hero-app-window { max-width: 100%; }
  .hfc-cert { left: 0; bottom: -0.5rem; }
  .hfc-score { right: 0; top: -0.5rem; }
  .feature-card { padding: 1.25rem 1rem; }
  .feature-icon { width: 44px; height: 44px; font-size: 1.1rem; }
  .feature-card h3 { font-size: .85rem; }
  .feature-card p { font-size: .78rem; }
  .category-card { padding: 1.25rem 1rem; }
  .cat-icon { width: 48px; height: 48px; font-size: 1.2rem; }
  .category-card h3 { font-size: .85rem; }
  .category-card p { font-size: .78rem; }
  .about-card { padding: 1.25rem; }
  .contact-card { padding: 1.5rem 1rem; }
}
