/* ============================================================
   EduLearn LMS - Design System
   ============================================================ */

/* ── CSS Variables (Light Theme) ────────────────────────── */
:root {
  --bg:           #f8fafc;
  --bg-card:      #ffffff;
  --bg-secondary: #f1f5f9;
  --border:       #e2e8f0;
  --text:         #0f172a;
  --text-muted:   #64748b;
  --text-light:   #94a3b8;
  --primary:      #6366f1;
  --primary-dark: #4f46e5;
  --primary-glow: rgba(99,102,241,0.15);
  --success:      #10b981;
  --warning:      #f59e0b;
  --danger:       #ef4444;
  --info:         #3b82f6;
  --purple:       #8b5cf6;
  --navbar-h:     64px;
  --sidebar-w:    260px;
  --radius:       0.875rem;
  --radius-sm:    0.5rem;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:       0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:    0 10px 40px rgba(0,0,0,0.12);
  --transition:   0.2s ease;
  --admin-accent: #dc2626;
}

[data-theme="dark"] {
  --bg:           #0f172a;
  --bg-card:      #1e293b;
  --bg-secondary: #152032;
  --border:       #334155;
  --text:         #f1f5f9;
  --text-muted:   #94a3b8;
  --text-light:   #64748b;
  --primary-glow: rgba(99,102,241,0.25);
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.3);
  --shadow:       0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:    0 10px 40px rgba(0,0,0,0.5);
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background var(--transition), color var(--transition);
  line-height: 1.6;
}
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.min-width-0 { min-width: 0; }

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ── Card ───────────────────────────────────────────────── */
.lms-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
  overflow: hidden;
}
.lms-card:hover { box-shadow: var(--shadow); }
.lms-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.lms-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0;
  color: var(--text);
}
.lms-card-body { padding: 1.25rem; }

/* ── Inputs ─────────────────────────────────────────────── */
.lms-input {
  background: var(--bg-secondary) !important;
  border: 1.5px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.6rem 0.875rem !important;
  transition: all var(--transition) !important;
  font-size: 0.9rem !important;
}
.lms-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-glow) !important;
  outline: none !important;
}
.lms-input::placeholder { color: var(--text-light) !important; }
.form-floating > .lms-input { padding-top: 1.5rem !important; padding-bottom: 0.5rem !important; }
.form-floating > label { color: var(--text-muted); }
.form-floating > .lms-input:focus ~ label,
.form-floating > .lms-input:not(:placeholder-shown) ~ label { color: var(--primary); }

/* ── Buttons ────────────────────────────────────────────── */
.btn-lms-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff !important;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  transition: all var(--transition);
  box-shadow: 0 2px 8px var(--primary-glow);
}
.btn-lms-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--primary-glow);
  background: linear-gradient(135deg, var(--primary-dark), #3730a3);
}
.btn-premium-upgrade {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff !important;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  box-shadow: 0 2px 8px rgba(245,158,11,0.3);
  transition: all var(--transition);
}
.btn-premium-upgrade:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(245,158,11,0.4); }
.btn-icon {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: all var(--transition);
}
.btn-icon:hover { border-color: var(--primary); color: var(--primary); }
.btn-icon-sm { background:transparent; border:none; color:var(--text-muted); padding:0.25rem; transition: color var(--transition); }
.btn-icon-sm:hover { color: var(--danger); }
.btn-password-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted); z-index: 10; padding: 0;
}
.btn-xs { padding: 0.2rem 0.45rem; font-size: 0.75rem; border-radius: 0.375rem; }
.btn-link-tiny { font-size: 0.75rem; color: var(--primary); text-decoration: none; }
.btn-link-tiny:hover { text-decoration: underline; }

/* ── Badges ─────────────────────────────────────────────── */
.premium-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff !important; font-size: 0.7rem; font-weight: 700;
}
.premium-badge-sm {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff !important; font-size: 0.65rem; font-weight: 700;
  padding: 0.15rem 0.4rem; border-radius: 0.3rem;
}
.normal-badge { background: var(--bg-secondary); color: var(--text-muted) !important; font-size: 0.7rem; }
.status-dot { font-size: 0.8rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.3rem; }
.status-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.status-active { color: var(--success); }
.status-active::before { background: var(--success); box-shadow: 0 0 6px var(--success); }
.status-inactive { color: var(--danger); }
.status-inactive::before { background: var(--danger); }

/* ── Navbar ─────────────────────────────────────────────── */
.lms-navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  height: var(--navbar-h);
  box-shadow: var(--shadow-sm);
  z-index: 1030;
}
.brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 0.5rem;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem;
}
.brand-icon-lg { width: 56px; height: 56px; font-size: 1.8rem; border-radius: 0.875rem; }
.brand-text { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--primary); }
.brand-text-xl { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 2.2rem; color: white; }
.lms-navbar .nav-link { color: var(--text-muted) !important; font-weight: 500; font-size: 0.9rem; padding: 0.4rem 0.75rem !important; border-radius: var(--radius-sm); transition: all var(--transition); }
.lms-navbar .nav-link:hover, .lms-navbar .nav-link.active { color: var(--primary) !important; background: var(--primary-glow); }
.nav-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.user-menu-btn { background: var(--bg-secondary); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 0.35rem 0.75rem; color: var(--text) !important; font-weight: 500; font-size: 0.88rem; }
.lms-dropdown { background: var(--bg-card); border: 1px solid var(--border); box-shadow: var(--shadow-lg); border-radius: var(--radius); min-width: 220px; }
.lms-dropdown .dropdown-item { color: var(--text); font-size: 0.88rem; padding: 0.5rem 1rem; border-radius: 0.4rem; margin: 0.1rem 0.3rem; transition: all var(--transition); }
.lms-dropdown .dropdown-item:hover { background: var(--primary-glow); color: var(--primary); }
.dropdown-header-user { padding: 0.75rem 1rem; display: flex; align-items: center; gap: 0.75rem; }
.dropdown-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }

/* ── Main Content ───────────────────────────────────────── */
.lms-main { min-height: calc(100vh - var(--navbar-h)); background: var(--bg); }
.page-header { background: var(--bg-card); border-bottom: 1px solid var(--border); }
.page-title { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.5rem; }

/* ── Stat Cards ─────────────────────────────────────────── */
.stat-card {
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative; overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  color: #fff;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card-blue   { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.stat-card-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.stat-card-green  { background: linear-gradient(135deg, #10b981, #059669); }
.stat-card-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-icon { font-size: 2rem; opacity: 0.3; position: absolute; right: 1rem; top: 0.75rem; }
.stat-value { font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 0.8rem; font-weight: 500; opacity: 0.85; margin-top: 0.25rem; }

/* ── Course Cards ───────────────────────────────────────── */
.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  height: 100%;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.course-card-img { position: relative; height: 180px; overflow: hidden; background: var(--bg-secondary); }
.course-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.course-card:hover .course-card-img img { transform: scale(1.05); }
.course-img-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 3rem; color: var(--text-light); }
.course-enrolled-badge { position: absolute; top: 0.6rem; right: 0.6rem; background: var(--success); color: #fff; border-radius: 0.375rem; padding: 0.2rem 0.5rem; font-size: 0.72rem; font-weight: 700; }
.course-card-body { padding: 1.1rem; }
.course-card-title { font-weight: 700; font-size: 1rem; margin-bottom: 0.4rem; color: var(--text); line-height: 1.4; }
.course-card-desc { color: var(--text-muted); font-size: 0.85rem; line-height: 1.5; margin-bottom: 0.75rem; }
.course-card-meta { display: flex; gap: 1rem; color: var(--text-muted); font-size: 0.8rem; }

/* ── Content List ───────────────────────────────────────── */
.content-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.content-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.875rem 1.1rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.content-item:last-child { border-bottom: none; }
.content-item:hover { background: var(--primary-glow); }
.content-item.content-completed { border-left: 3px solid var(--success); }
.content-item-icon {
  width: 40px; height: 40px; border-radius: 0.5rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.content-icon-pdf         { background: rgba(239,68,68,0.1); color: #ef4444; }
.content-icon-video       { background: rgba(99,102,241,0.1); color: #6366f1; }
.content-icon-youtube     { background: rgba(239,68,68,0.1); color: #ef4444; }
.content-icon-external_link { background: rgba(59,130,246,0.1); color: #3b82f6; }
.content-icon-image       { background: rgba(16,185,129,0.1); color: #10b981; }
.content-icon-rich_text   { background: rgba(245,158,11,0.1); color: #f59e0b; }
.content-item-action { flex-shrink: 0; }

/* ── Course Hero ────────────────────────────────────────── */
.course-hero { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; }
.course-hero .breadcrumb-item, .course-hero .breadcrumb-item a { color: rgba(255,255,255,0.75); }
.course-hero .breadcrumb-item.active, .course-hero a:hover { color: #fff; }
.course-hero-img { max-height: 220px; border-radius: var(--radius); box-shadow: var(--shadow-lg); }

/* ── Dashboard Items ────────────────────────────────────── */
.course-progress-item {
  display: flex; align-items: center; gap: 0.875rem;
  padding: 0.75rem 0; border-bottom: 1px solid var(--border);
}
.course-progress-item:last-child { border-bottom: none; }
.course-thumb { width: 48px; height: 48px; border-radius: 0.5rem; overflow: hidden; background: var(--bg-secondary); flex-shrink: 0; }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-thumb-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-light); }
.result-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.1rem; border-bottom: 1px solid var(--border); }
.result-item:last-child { border-bottom: none; }
.result-badge { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 700; flex-shrink: 0; }
.result-pass { background: rgba(16,185,129,0.15); color: var(--success); }
.result-fail { background: rgba(239,68,68,0.15); color: var(--danger); }

/* ── Auth Pages ─────────────────────────────────────────── */
.auth-body { background: var(--bg); }
.auth-wrapper { display: flex; min-height: 100vh; }
.auth-left {
  flex: 1; background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
  display: flex; align-items: center; justify-content: center; padding: 3rem;
  position: relative; overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.auth-left-content { position: relative; z-index: 1; max-width: 420px; }
.auth-tagline { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 2rem; color: #fff; line-height: 1.3; margin-bottom: 1rem; }
.auth-sub-tagline { color: rgba(255,255,255,0.65); line-height: 1.7; font-size: 0.95rem; }
.auth-stat-number { font-size: 2rem; font-weight: 800; color: #fff; }
.auth-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; }
.auth-floating-cards { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 2rem; }
.floating-card {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.08); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 0.75rem;
  padding: 0.6rem 1rem; color: rgba(255,255,255,0.85); font-size: 0.85rem; font-weight: 500;
  width: fit-content;
  animation: float 3s ease-in-out infinite;
}
.fc-1 { animation-delay: 0s; }
.fc-2 { animation-delay: 0.5s; }
.fc-3 { animation-delay: 1s; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }

.auth-right {
  width: 480px; min-width: 320px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2.5rem;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  position: relative;
}
.auth-form-container { width: 100%; max-width: 380px; }
.auth-form-title { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.75rem; margin-bottom: 0.4rem; }
.auth-form-subtitle { color: var(--text-muted); margin-bottom: 2rem; font-size: 0.9rem; }
.auth-link { color: var(--primary); text-decoration: none; font-weight: 500; }
.auth-link:hover { color: var(--primary-dark); text-decoration: underline; }
.auth-right-footer { position: absolute; bottom: 1.5rem; right: 1.5rem; }
.auth-icon-circle { width: 80px; height: 80px; background: var(--primary-glow); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.password-strength .strength-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.strength-fill { height: 100%; border-radius: 3px; transition: width 0.3s, background 0.3s; }

/* ── Profile ────────────────────────────────────────────── */
.profile-avatar-wrapper { position: relative; width: 120px; height: 120px; }
.profile-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid var(--border); }
.avatar-edit-btn {
  position: absolute; bottom: 4px; right: 4px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.85rem;
  border: 2px solid var(--bg-card);
}
.profile-meta { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.profile-meta-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-muted); }

/* ── Exam Page ──────────────────────────────────────────── */
.exam-info-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.exam-rules-card { background: var(--bg-secondary); border-radius: var(--radius-sm); padding: 1.1rem; border: 1px solid var(--border); }
.rules-list { list-style: none; padding: 0; margin: 0; }
.rules-list li { padding: 0.25rem 0; font-size: 0.9rem; color: var(--text-muted); }
.rules-list li::before { content: '• '; color: var(--primary); font-weight: 700; }
.exam-type-badge { padding: 0.25rem 0.75rem; border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 700; }
.exam-type-practice { background: rgba(16,185,129,0.12); color: #059669; }
.exam-type-mock     { background: rgba(239,68,68,0.12); color: #dc2626; }
.exam-type-badge-lg { padding: 0.4rem 1rem; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 700; }
.exam-type-practice-badge { background: rgba(16,185,129,0.12); color: #059669; }
.exam-type-mock-badge     { background: rgba(239,68,68,0.12); color: #dc2626; }
.section-preview-item { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.attempt-history-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.625rem 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }

/* ── Exam Result ────────────────────────────────────────── */
.result-hero {
  border-radius: var(--radius); padding: 2rem;
  display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
}
.result-hero-pass { background: linear-gradient(135deg, #064e3b, #065f46); color: #fff; }
.result-hero-fail { background: linear-gradient(135deg, #450a0a, #7f1d1d); color: #fff; }
.result-icon { font-size: 4rem; opacity: 0.9; }
.result-text { flex: 1; }
.result-headline { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.75rem; margin-bottom: 0.25rem; }
.result-subtext { opacity: 0.8; font-size: 1rem; }
.result-stats-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.result-stat { text-align: center; }
.result-stat-val { font-size: 1.75rem; font-weight: 800; }
.result-stat-lbl { font-size: 0.72rem; opacity: 0.7; text-transform: uppercase; letter-spacing: 1px; }

.result-question-card { border-radius: var(--radius-sm); border: 2px solid; overflow: hidden; }
.rq-correct { border-color: rgba(16,185,129,0.3); background: rgba(16,185,129,0.04); }
.rq-wrong   { border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.04); }
.rq-skipped { border-color: var(--border); background: var(--bg-card); }
.rq-header { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.rq-number { background: var(--bg-secondary); border-radius: 0.375rem; padding: 0.2rem 0.5rem; font-weight: 700; font-size: 0.8rem; }
.rq-question { padding: 0.875rem 1rem; font-size: 0.95rem; }
.rq-options { padding: 0 1rem 0.5rem; display: flex; flex-direction: column; gap: 0.4rem; }
.rq-option { display: flex; align-items: flex-start; gap: 0.625rem; padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); border: 1.5px solid var(--border); font-size: 0.88rem; }
.rq-opt-correct { background: rgba(16,185,129,0.1); border-color: var(--success) !important; }
.rq-opt-wrong   { background: rgba(239,68,68,0.1); border-color: var(--danger) !important; }
.opt-letter { font-weight: 700; min-width: 22px; color: var(--text-muted); }
.rq-solution { padding: 0 1rem 1rem; }
.solution-box { background: rgba(245,158,11,0.07); border: 1.5px solid rgba(245,158,11,0.25); border-radius: var(--radius-sm); overflow: hidden; }
.solution-header { background: rgba(245,158,11,0.12); padding: 0.5rem 0.875rem; font-weight: 600; font-size: 0.85rem; border-bottom: 1px solid rgba(245,158,11,0.2); }
.solution-content { padding: 0.875rem; font-size: 0.9rem; color: var(--text-muted); }

.score-circle {
  width: 140px; height: 140px;
  border-radius: 50%; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.score-pass { background: conic-gradient(var(--success) calc(var(--pct) * 1%), var(--border) 0); }
.score-fail { background: conic-gradient(var(--danger) calc(var(--pct) * 1%), var(--border) 0); }
.score-circle-inner { background: var(--bg-card); border-radius: 50%; width: 110px; height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-pct { font-size: 1.6rem; font-weight: 800; }
.score-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 1px; }

/* ── Certificate ────────────────────────────────────────── */
.certificate-card {
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius); overflow: hidden; position: relative;
  transition: all var(--transition); max-width: 700px;
}
.certificate-card:hover { box-shadow: var(--shadow-lg); border-color: var(--primary); }
.certificate-ribbon { position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(135deg, var(--primary), var(--purple)); }
.certificate-body { padding: 2rem; }
.certificate-header { display: flex; align-items: center; gap: 1rem; }
.cert-logo { width: 50px; height: 50px; background: linear-gradient(135deg, var(--primary), var(--purple)); border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff; }
.cert-issued-by { font-weight: 700; color: var(--primary); font-size: 0.9rem; }
.cert-award-text { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.cert-name { font-family: 'Poppins', sans-serif; font-size: 1.75rem; font-weight: 800; color: var(--primary); }
.cert-course-name { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.cert-footer { display: flex; justify-content: space-between; align-items: center; }

/* ── Premium Lock ───────────────────────────────────────── */
.premium-lock-card { max-width: 480px; background: var(--bg-card); border-radius: var(--radius); padding: 3rem; border: 2px solid rgba(245,158,11,0.3); box-shadow: 0 0 40px rgba(245,158,11,0.1); }
.premium-lock-icon { width: 80px; height: 80px; background: linear-gradient(135deg, #f59e0b20, #f59e0b40); border-radius: 50%; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.premium-features { text-align: left; display: inline-flex; flex-direction: column; gap: 0.6rem; }
.premium-feature { font-size: 0.9rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; }

/* ── Content Viewer ─────────────────────────────────────── */
.content-viewer-header { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border); gap: 1rem; }
.content-type-icon { width: 44px; height: 44px; border-radius: 0.625rem; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.content-viewer-body { background: var(--bg-secondary); }
.pdf-viewer-wrapper { width: 100%; }
.pdf-frame { width: 100%; height: 70vh; border: none; display: block; }
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; }
.video-frame { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.rich-text-content { font-size: 0.95rem; line-height: 1.8; color: var(--text); }
.rich-text-content h1,.rich-text-content h2,.rich-text-content h3 { margin-top: 1.5rem; }
.rich-text-content p { margin-bottom: 1rem; }
.external-link-view { min-height: 300px; background: var(--bg-card); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.question-image { max-width: 100%; max-height: 300px; border-radius: var(--radius-sm); margin-bottom: 0.75rem; }
.option-image { max-height: 80px; border-radius: 0.25rem; }
.option-image-sm { max-height: 60px; border-radius: 0.25rem; }

/* ── Tables ─────────────────────────────────────────────── */
.lms-table { color: var(--text); font-size: 0.875rem; }
.lms-table th { background: var(--bg-secondary); color: var(--text-muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.75rem 1rem; border-color: var(--border); }
.lms-table td { padding: 0.75rem 1rem; border-color: var(--border); vertical-align: middle; }
.lms-table tbody tr { transition: background var(--transition); }
.lms-table tbody tr:hover { background: var(--primary-glow); }
.table-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

/* ── Admin Sidebar ──────────────────────────────────────── */
.admin-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 1040;
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1.25rem 1.1rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-nav { flex: 1; padding: 0.75rem 0.6rem; display: flex; flex-direction: column; gap: 0.15rem; }
.nav-section-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light); padding: 0.6rem 0.5rem 0.3rem; margin-top: 0.5rem; }
.sidebar-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.75rem; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 0.875rem; font-weight: 500;
  text-decoration: none; transition: all var(--transition);
}
.sidebar-link:hover { background: var(--primary-glow); color: var(--primary); }
.sidebar-link.active { background: var(--primary-glow); color: var(--primary); font-weight: 600; }
.sidebar-link i { font-size: 1.05rem; flex-shrink: 0; }
.sidebar-footer {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.1rem; border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.sidebar-user-info { flex: 1; min-width: 0; }
.admin-wrapper { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left 0.3s ease; }
.admin-topbar {
  position: sticky; top: 0; z-index: 1030;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  height: 60px; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--shadow-sm);
}
.topbar-breadcrumb .breadcrumb { font-size: 0.85rem; }
.topbar-breadcrumb .breadcrumb-item a { color: var(--text-muted); text-decoration: none; }
.topbar-breadcrumb .breadcrumb-item.active { color: var(--text); }
.admin-content { flex: 1; padding: 1.75rem; background: var(--bg); }
.page-title-bar { padding: 0 0 0.25rem; }

/* ── Admin Stats ────────────────────────────────────────── */
.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative; overflow: hidden;
  border-top: 3px solid var(--color, var(--primary));
  transition: all var(--transition);
}
.admin-stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.admin-stat-icon { font-size: 2rem; color: var(--color, var(--primary)); opacity: 0.25; position: absolute; right: 1rem; top: 0.75rem; }
.admin-stat-value { font-size: 2rem; font-weight: 800; color: var(--text); }
.admin-stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.1rem; }
.admin-stat-sub { font-size: 0.78rem; margin-top: 0.25rem; }
.top-exam-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.1rem; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.top-exam-rank { width: 24px; height: 24px; border-radius: 50%; background: var(--primary-glow); color: var(--primary); font-weight: 700; font-size: 0.75rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ── Admin Course Card ──────────────────────────────────── */
.admin-course-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all var(--transition); height: 100%; }
.admin-course-card:hover { box-shadow: var(--shadow); }
.admin-course-img { position: relative; height: 160px; background: var(--bg-secondary); overflow: hidden; }
.admin-course-img img { width: 100%; height: 100%; object-fit: cover; }
.admin-course-body { padding: 1rem; }
.status-pill { position: absolute; top: 0.5rem; right: 0.5rem; padding: 0.2rem 0.5rem; border-radius: 0.375rem; font-size: 0.7rem; font-weight: 700; }
.pill-active   { background: rgba(16,185,129,0.9); color: #fff; }
.pill-inactive { background: rgba(100,116,139,0.9); color: #fff; }

/* ── Content Type Badges ────────────────────────────────── */
.content-type-badge { padding: 0.2rem 0.6rem; border-radius: 0.375rem; font-size: 0.75rem; font-weight: 600; }
.type-pdf         { background: rgba(239,68,68,0.1); color: #dc2626; }
.type-video       { background: rgba(99,102,241,0.1); color: #6366f1; }
.type-youtube     { background: rgba(239,68,68,0.1); color: #dc2626; }
.type-external_link { background: rgba(59,130,246,0.1); color: #2563eb; }
.type-image       { background: rgba(16,185,129,0.1); color: #059669; }
.type-rich_text   { background: rgba(245,158,11,0.1); color: #d97706; }

/* ── Question Builder ───────────────────────────────────── */
.section-heading { font-weight: 700; font-size: 1rem; color: var(--text); padding-bottom: 0.5rem; border-bottom: 2px solid var(--border); margin-bottom: 0.5rem; }
.options-builder { display: flex; flex-direction: column; gap: 0.75rem; }
.option-builder-row {
  display: flex; align-items: flex-start; gap: 0.75rem;
  background: var(--bg-secondary); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.75rem;
  transition: border-color var(--transition);
}
.option-builder-row.is-correct { border-color: var(--success); background: rgba(16,185,129,0.05); }
.option-letter-badge { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-glow); color: var(--primary); font-weight: 700; font-size: 0.8rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.correct-radio-btn { cursor: pointer; padding: 0.2rem 0.6rem; border-radius: 0.375rem; font-size: 0.75rem; font-weight: 600; border: 1.5px solid var(--border); background: transparent; color: var(--text-muted); transition: all var(--transition); }
.correct-radio-btn.active { border-color: var(--success); background: rgba(16,185,129,0.1); color: var(--success); }
.img-preview { max-height: 120px; width: auto; display: block; }

/* ── Exam sections / assign ─────────────────────────────── */
.section-manage-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.1rem; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.assigned-q-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 1.1rem; border-bottom: 1px solid var(--border); font-size: 0.82rem; }
.aq-order { width: 26px; height: 26px; border-radius: 0.375rem; background: var(--primary-glow); color: var(--primary); font-weight: 700; font-size: 0.75rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.aq-marks { font-weight: 700; color: var(--primary); font-size: 0.82rem; white-space: nowrap; }
.q-search-item { padding: 0.625rem 0.875rem; border-bottom: 1px solid var(--border); cursor: pointer; transition: background var(--transition); border-radius: var(--radius-sm); }
.q-search-item:hover { background: var(--primary-glow); }
.q-search-item.q-search-selected { background: rgba(99,102,241,0.08); border-color: var(--primary); }
.question-search-list { max-height: 380px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }

/* ── Quick Actions ──────────────────────────────────────── */
.quick-action-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem;
  background: var(--bg-secondary); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 1rem; color: var(--text-muted);
  text-decoration: none; font-size: 0.8rem; font-weight: 500;
  transition: all var(--transition); width: 100%; height: 90px;
}
.quick-action-btn i { font-size: 1.5rem; }
.quick-action-btn:hover { background: var(--primary-glow); border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

/* ── Modal ──────────────────────────────────────────────── */
.lms-modal { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); }
.lms-modal .modal-header, .lms-modal .modal-footer { border-color: var(--border); }
.submit-summary { background: var(--bg-secondary); border-radius: var(--radius-sm); padding: 1rem; }
.summary-row { display: flex; justify-content: space-between; padding: 0.35rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.summary-row:last-child { border-bottom: none; }

/* ── Empty States ───────────────────────────────────────── */
.empty-state { text-align: center; padding: 2rem; }
.empty-state-page { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-state-page i { font-size: 3.5rem; margin-bottom: 1rem; display: block; opacity: 0.4; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 991px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-wrapper { margin-left: 0; }
}
@media (max-width: 767px) {
  .auth-right { width: 100%; }
  .result-hero { flex-direction: column; text-align: center; }
  .result-stats-row { justify-content: center; }
}
