/* TEST */ .topbar { border-bottom: 3px solid red !important; }

/* ═══════════════════════════════════════════════════════
   PHOTON+ ACADEMY — Main Stylesheet
   Theme: Dark luxury academy — deep navy + electric gold
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg:          #0d1117;
  --bg-2:        #161b22;
  --bg-3:        #1c2433;
  --sidebar-bg:  #0b0f19;
  --border:      rgba(255,255,255,0.07);
  --border-2:    rgba(255,255,255,0.12);

  --gold:        #f0b429;
  --gold-dim:    rgba(240,180,41,0.15);
  --gold-glow:   rgba(240,180,41,0.35);

  --blue:        #3b82f6;
  --blue-dim:    rgba(59,130,246,0.15);
  --green:       #22c55e;
  --green-dim:   rgba(34,197,94,0.15);
  --amber:       #f59e0b;
  --amber-dim:   rgba(245,158,11,0.15);
  --purple:      #a855f7;
  --purple-dim:  rgba(168,85,247,0.15);
  --red:         #ef4444;
  --red-dim:     rgba(239,68,68,0.15);

  --text:        #e6edf3;
  --text-2:      #8b949e;
  --text-3:      #58647a;

  --radius:      10px;
  --radius-lg:   16px;
  --sidebar-w:   248px;
  --topbar-h:    60px;

  --shadow-card: 0 1px 3px rgba(0,0,0,0.4), 0 4px 20px rgba(0,0,0,0.3);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.5);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --transition: 0.18s ease;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }

/* ── Auth Page ─────────────────────────────────────────── */
body.auth-page { background: var(--bg); min-height: 100vh; }

.auth-screen {
  display: flex;
  min-height: 100vh;
}

/* Left branding panel */
.auth-brand {
  flex: 0 0 46%;
  background: linear-gradient(135deg, #080c14 0%, #0f1829 50%, #0d1a35 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 30% 70%, rgba(240,180,41,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 20%, rgba(59,130,246,0.06) 0%, transparent 70%);
}

.auth-brand__glow {
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,180,41,0.12) 0%, transparent 70%);
  bottom: -100px; left: -80px;
  pointer-events: none;
}

.auth-brand__inner {
  position: relative;
  z-index: 1;
  padding: 3rem;
  max-width: 380px;
}

.auth-brand__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 3rem;
}

.logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--gold), #e08a00);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: #0d1117;
  box-shadow: 0 4px 16px var(--gold-glow);
  flex-shrink: 0;
}

.logo-name {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.logo-plus { color: var(--gold); }

.logo-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 2px;
}

.auth-brand__headline {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1.2rem;
}

.auth-brand__headline::after {
  content: '';
  display: block;
  width: 48px; height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin-top: 1rem;
}

.auth-brand__tagline {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  margin-top: 1.2rem;
}

.auth-brand__dots {
  display: flex;
  gap: 8px;
  margin-top: 2.5rem;
}

.auth-brand__dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border-2);
}

.auth-brand__dots span:first-child { background: var(--gold); }

/* Right form panel */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg);
}

.auth-form-wrap {
  width: 100%;
  max-width: 400px;
}

.auth-form__title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.auth-form__sub {
  color: var(--text-2);
  margin-bottom: 2rem;
  font-weight: 300;
}

.auth-form__footer {
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
  margin-top: 2rem;
}

/* ── Form Elements ─────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.required { color: var(--gold); }

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 13px;
  color: var(--text-3);
  font-size: 13px;
  pointer-events: none;
  z-index: 1;
}

.form-control {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 11px 14px 11px 38px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}

.form-control::placeholder { color: var(--text-3); }

.input-eye {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition);
}

.input-eye:hover { color: var(--text-2); }

.form-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.5rem 0 1.2rem;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}

.checkbox-wrap input[type=checkbox] { accent-color: var(--gold); width: 14px; height: 14px; }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--gold), #d4960a);
  color: #0d1117;
  font-weight: 600;
  border-color: transparent;
  box-shadow: 0 2px 12px var(--gold-dim);
}

.btn--primary:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--gold-glow);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border-2);
  color: var(--text-2);
}

.btn--ghost:hover { border-color: var(--border-2); background: var(--bg-3); color: var(--text); opacity: 1; }

.btn--danger { background: var(--red-dim); color: var(--red); border-color: rgba(239,68,68,0.25); }
.btn--warning { background: var(--amber-dim); color: var(--amber); border-color: rgba(245,158,11,0.25); }
.btn--success { background: var(--green-dim); color: var(--green); border-color: rgba(34,197,94,0.25); }

.btn--full { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.btn--sm { padding: 6px 13px; font-size: 13px; }

/* ── Alert / Flash ─────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 1.2rem;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.alert--danger { background: var(--red-dim); color: var(--red); border: 1px solid rgba(239,68,68,0.25); }
.alert--success { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,197,94,0.25); }
.alert--info { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(59,130,246,0.25); }

.flash-container { position: fixed; top: 16px; right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }

.flash {
  padding: 13px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.25s ease;
}

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

.flash--success { background: #0f2c1a; color: var(--green); border: 1px solid rgba(34,197,94,0.3); }
.flash--danger  { background: #2c0f0f; color: var(--red);   border: 1px solid rgba(239,68,68,0.3); }
.flash--info    { background: #0f1c2c; color: var(--blue);  border: 1px solid rgba(59,130,246,0.3); }

.flash__close { margin-left: auto; background: none; border: none; cursor: pointer; color: inherit; opacity: 0.7; padding: 2px 4px; }
.flash__close:hover { opacity: 1; }

/* ── App Shell Layout ──────────────────────────────────── */
body.app-layout { background: var(--bg); }

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
}

.sidebar__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

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

.sidebar__toggle-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}

.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar__nav::-webkit-scrollbar { width: 4px; }
.sidebar__nav::-webkit-scrollbar-track { background: transparent; }
.sidebar__nav::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 400;
  transition: all var(--transition);
  cursor: pointer;
}

.nav-item i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }

.nav-item:hover {
  background: var(--bg-3);
  color: var(--text);
  opacity: 1;
}

.nav-item.active {
  background: var(--gold-dim);
  color: var(--gold);
  font-weight: 500;
  border: 1px solid rgba(240,180,41,0.15);
}

.nav-item--disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 14px 12px 6px;
}

.sidebar__footer {
  border-top: 1px solid var(--border);
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sidebar__user { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.sidebar__user-info { display: flex; flex-direction: column; min-width: 0; }

.sidebar__user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__user-role { font-size: 10px; }

.sidebar__logout {
  color: var(--text-3);
  font-size: 15px;
  flex-shrink: 0;
  padding: 6px;
  border-radius: 7px;
  transition: all var(--transition);
}

.sidebar__logout:hover { color: var(--red); background: var(--red-dim); opacity: 1; }

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

/* ── Topbar ────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.topbar__menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
}

.topbar__title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  flex: 1;
}

.topbar__greeting {
  font-size: 13px;
  color: var(--text-2);
}

/* ── Page Content ──────────────────────────────────────── */
.page-content {
  flex: 1;
  padding: 28px 28px;
  max-width: 1280px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.page-sub {
  color: var(--text-2);
  font-size: 13px;
  margin-top: 4px;
}

/* ── Stat Cards ────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.stat-card__icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.stat-card--blue  .stat-card__icon { background: var(--blue-dim);   color: var(--blue); }
.stat-card--green .stat-card__icon { background: var(--green-dim);  color: var(--green); }
.stat-card--amber .stat-card__icon { background: var(--amber-dim);  color: var(--amber); }
.stat-card--purple .stat-card__icon{ background: var(--purple-dim); color: var(--purple); }

.stat-card__body { display: flex; flex-direction: column; }
.stat-card__label { font-size: 12px; font-weight: 500; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card__value { font-size: 1.8rem; font-weight: 700; color: var(--text); line-height: 1.2; margin-top: 2px; }

/* ── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}

.card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card__title i { color: var(--gold); }
.card__body { padding: 20px; }
.card__body.p-0 { padding: 0; }

/* ── Table ─────────────────────────────────────────────── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table thead tr {
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}

.table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
}

.table td {
  padding: 13px 16px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }

.table--hoverable tbody tr:hover td { background: var(--bg-3); }

.text-muted { color: var(--text-2) !important; }

/* ── Badges ────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: capitalize;
}

.badge--success { background: var(--green-dim); color: var(--green); }
.badge--danger  { background: var(--red-dim);   color: var(--red); }
.badge--admin   { background: var(--gold-dim);  color: var(--gold); }
.badge--student { background: var(--blue-dim);  color: var(--blue); }

/* ── Avatar ────────────────────────────────────────────── */
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #c07800);
  color: #0d1117;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.avatar--sm { width: 30px; height: 30px; font-size: 12px; }

.avatar--color-0 { background: linear-gradient(135deg, var(--blue), #1d4ed8); color: #fff; }
.avatar--color-1 { background: linear-gradient(135deg, var(--green), #15803d); color: #fff; }
.avatar--color-2 { background: linear-gradient(135deg, var(--gold), #c07800); color: #0d1117; }
.avatar--color-3 { background: linear-gradient(135deg, var(--purple), #7e22ce); color: #fff; }
.avatar--color-4 { background: linear-gradient(135deg, var(--red), #b91c1c); color: #fff; }

.user-cell { display: flex; align-items: center; gap: 10px; }

/* ── Empty State ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-3);
}

.empty-state i { display: block; margin-bottom: 1rem; }
.empty-state p { font-size: 14px; }

/* ── Action Buttons ────────────────────────────────────── */
.action-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Form Card ─────────────────────────────────────────── */
.form-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  max-width: 720px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── Search bar ────────────────────────────────────────── */
.search-bar-wrap { max-width: 380px; }
.search-bar-wrap .form-control { padding-left: 38px; }

/* ── Welcome banner ────────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, #0d1829 0%, #141f30 100%);
  border: 1px solid rgba(240,180,41,0.2);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.welcome-banner__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 20px;
}

.welcome-banner__icon {
  width: 56px; height: 56px;
  background: var(--gold-dim);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: var(--gold);
  flex-shrink: 0;
}

.welcome-banner h3 { font-family: var(--font-display); font-size: 1.2rem; color: var(--text); margin-bottom: 4px; }
.welcome-banner p  { color: var(--text-2); font-size: 13.5px; }

.welcome-banner__glow {
  position: absolute;
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--gold-dim) 0%, transparent 70%);
  right: -60px; bottom: -80px;
  pointer-events: none;
}

/* ── Utilities ─────────────────────────────────────────── */
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-brand { display: none; }
  .auth-form-panel { flex: 1; }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }

  .sidebar.is-open { transform: translateX(0); }

  .sidebar__toggle-btn { display: block; }
  .topbar__menu-btn    { display: block; }

  .main-content { margin-left: 0; }

  .page-content { padding: 20px 16px; }

  .form-grid-2 { grid-template-columns: 1fr; }
  .stats-grid  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 500px) {
  .stats-grid { grid-template-columns: 1fr; }
  .welcome-banner__content { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════════════
   COURSES MODULE
   ═══════════════════════════════════════════════════════ */

/* ── Status strip (filter tabs) ─────────────────────────── */
.status-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-2);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.status-chip:hover, .status-chip.active {
  color: var(--text);
  border-color: var(--border-2);
  background: var(--bg-3);
  opacity: 1;
}

.status-chip.active { border-color: var(--gold); color: var(--gold); }
.status-chip--green.active { border-color: var(--green); color: var(--green); }
.status-chip--amber.active { border-color: var(--amber); color: var(--amber); }
.status-chip--red.active   { border-color: var(--red);   color: var(--red); }

.chip-count {
  background: var(--bg-3);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
}

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

/* ── Course card ──────────────────────────────────────────── */
.course-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.course-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.course-card__header {
  height: 100px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

/* colour variants */
.course-card__header--blue   { background: linear-gradient(135deg,#1e3a5f,#0d2040); }
.course-card__header--green  { background: linear-gradient(135deg,#14432a,#0a2218); }
.course-card__header--amber  { background: linear-gradient(135deg,#4a2e00,#2e1c00); }
.course-card__header--purple { background: linear-gradient(135deg,#2d1b4e,#1a0f30); }
.course-card__header--red    { background: linear-gradient(135deg,#4a1515,#2d0a0a); }
.course-card__header--teal   { background: linear-gradient(135deg,#0d3d3d,#062626); }
.course-card__header--rose   { background: linear-gradient(135deg,#4a1530,#2d0a1e); }

.course-card__header::after {
  content: '\f02d';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: -8px; bottom: -12px;
  font-size: 72px;
  opacity: 0.07;
  color: #fff;
  pointer-events: none;
}

.course-card__code {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.course-card__status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 4px;
}

.dot--green { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot--amber { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.dot--red   { background: var(--red);   box-shadow: 0 0 6px var(--red); }

.course-card__body {
  padding: 18px;
  flex: 1;
}

.course-card__subject {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 5px;
}

.course-card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 8px;
}

.course-card__desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 14px;
}

.course-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-3);
}

.course-card__meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.course-card__footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Progress bar ─────────────────────────────────────────── */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-bar {
  flex: 1;
  height: 5px;
  background: var(--bg-3);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill            { height: 100%; border-radius: 99px; transition: width 0.5s ease; }
.progress-fill--blue      { background: var(--blue); }
.progress-fill--green     { background: var(--green); }
.progress-fill--amber     { background: var(--amber); }
.progress-fill--purple    { background: var(--purple); }
.progress-fill--red       { background: var(--red); }
.progress-fill--teal      { background: #14b8a6; }
.progress-fill--rose      { background: #fb7185; }

.progress-label { font-size: 12px; color: var(--text-2); white-space: nowrap; }

/* large variants for course hero */
.progress-wrap--lg   { margin-top: 8px; margin-bottom: 6px; }
.progress-bar--lg    { height: 8px; }
.progress-label--lg  { font-size: 14px; font-weight: 600; color: var(--text); }

/* ── Course dot (in table) ─────────────────────────────────── */
.course-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.course-dot--blue   { background: var(--blue); }
.course-dot--green  { background: var(--green); }
.course-dot--amber  { background: var(--amber); }
.course-dot--purple { background: var(--purple); }
.course-dot--red    { background: var(--red); }
.course-dot--teal   { background: #14b8a6; }
.course-dot--rose   { background: #fb7185; }

/* ── Progress ring (student card) ─────────────────────────── */
.course-card__progress-ring {
  position: relative;
  width: 44px; height: 44px;
}

.ring-svg { transform: rotate(-90deg); width: 44px; height: 44px; }

.ring-bg   { fill: none; stroke: rgba(255,255,255,0.1); stroke-width: 3; }
.ring-fill { fill: none; stroke-width: 3; stroke-linecap: round;
             transition: stroke-dasharray 0.5s ease; }

.ring-fill--blue   { stroke: var(--blue); }
.ring-fill--green  { stroke: var(--green); }
.ring-fill--amber  { stroke: var(--amber); }
.ring-fill--purple { stroke: var(--purple); }
.ring-fill--red    { stroke: var(--red); }
.ring-fill--teal   { stroke: #14b8a6; }
.ring-fill--rose   { stroke: #fb7185; }

.ring-label {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}

/* ── Color picker ─────────────────────────────────────────── */
.color-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.color-swatch { cursor: pointer; }
.color-swatch input { display: none; }

.swatch-dot {
  display: block;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: all var(--transition);
  box-sizing: border-box;
}

.color-swatch--blue   .swatch-dot { background: var(--blue); }
.color-swatch--green  .swatch-dot { background: var(--green); }
.color-swatch--amber  .swatch-dot { background: var(--amber); }
.color-swatch--purple .swatch-dot { background: var(--purple); }
.color-swatch--red    .swatch-dot { background: var(--red); }
.color-swatch--teal   .swatch-dot { background: #14b8a6; }
.color-swatch--rose   .swatch-dot { background: #fb7185; }

.color-swatch input:checked + .swatch-dot {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.4), 0 0 10px rgba(255,255,255,0.2);
  transform: scale(1.15);
}

/* ── Form extras ──────────────────────────────────────────── */
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px !important;
  cursor: pointer;
}

.form-select option { background: var(--bg-2); color: var(--text); }

.form-textarea {
  resize: vertical;
  min-height: 100px;
  padding: 11px 14px;
  font-family: var(--font-body);
  line-height: 1.6;
}

.form-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-3);
  margin-left: 6px;
}

/* ── Detail grid (2-col on wide, 1-col on narrow) ─────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

/* ── Course info bar ──────────────────────────────────────── */
.course-info-bar {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.course-info-bar__thumb {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: rgba(255,255,255,0.9);
  flex-shrink: 0;
}

.course-info-bar__thumb--blue   { background: linear-gradient(135deg,#1e3a5f,#0d2040); }
.course-info-bar__thumb--green  { background: linear-gradient(135deg,#14432a,#0a2218); }
.course-info-bar__thumb--amber  { background: linear-gradient(135deg,#4a2e00,#2e1c00); }
.course-info-bar__thumb--purple { background: linear-gradient(135deg,#2d1b4e,#1a0f30); }
.course-info-bar__thumb--red    { background: linear-gradient(135deg,#4a1515,#2d0a0a); }
.course-info-bar__thumb--teal   { background: linear-gradient(135deg,#0d3d3d,#062626); }
.course-info-bar__thumb--rose   { background: linear-gradient(135deg,#4a1530,#2d0a1e); }

.course-info-bar__stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.info-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.info-stat__val   { font-size: 1.4rem; font-weight: 700; color: var(--text); }
.info-stat__label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; }

.course-info-bar__desc {
  width: 100%;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 4px;
}

/* ── Chapter list ─────────────────────────────────────────── */
.chapter-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chapter-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.chapter-item:last-child { border-bottom: none; }

.chapter-item__info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}

.chapter-item__num {
  width: 24px; height: 24px;
  background: var(--bg-3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  flex-shrink: 0;
  margin-top: 1px;
}

.chapter-item__title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}

.chapter-item__desc {
  font-size: 12px;
  color: var(--text-3);
}

/* Student chapter list */
.chapter-list--student .chapter-item--student {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: background var(--transition);
}

.chapter-list--student .chapter-item--student:hover { background: var(--bg-3); }
.chapter-list--student .chapter-item--student:last-child { border-bottom: none; }

.chapter-num {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  flex-shrink: 0;
}

.chapter-num--blue   { background: var(--blue-dim);   color: var(--blue); }
.chapter-num--green  { background: var(--green-dim);  color: var(--green); }
.chapter-num--amber  { background: var(--amber-dim);  color: var(--amber); }
.chapter-num--purple { background: var(--purple-dim); color: var(--purple); }
.chapter-num--red    { background: var(--red-dim);    color: var(--red); }
.chapter-num--teal   { background: rgba(20,184,166,.15); color: #14b8a6; }
.chapter-num--rose   { background: rgba(251,113,133,.15); color: #fb7185; }

.chapter-status { font-size: 12px; color: var(--text-3); }

.add-chapter-form { border-top: 1px solid var(--border); padding-top: 16px; }

/* ── Enrollment components ────────────────────────────────── */
.student-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  background: var(--bg-3);
}

.student-checkboxes::-webkit-scrollbar { width: 4px; }
.student-checkboxes::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }

.student-checkbox-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: background var(--transition);
  font-size: 13px;
  color: var(--text-2);
}

.student-checkbox-item:hover { background: var(--bg-2); color: var(--text); }
.student-checkbox-item input { accent-color: var(--gold); }

.enrolled-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.enrolled-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.enrolled-item:last-child { border-bottom: none; }

.mini-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-3);
  width: 70px;
}

.mini-progress-fill {
  flex: 1;
  height: 4px;
  background: var(--gold);
  border-radius: 99px;
}

/* ── Course hero (student detail) ─────────────────────────── */
.course-hero {
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.course-hero--blue   { background: linear-gradient(135deg,#0d2040,#1e3a5f); border: 1px solid rgba(59,130,246,0.25); }
.course-hero--green  { background: linear-gradient(135deg,#0a2218,#14432a); border: 1px solid rgba(34,197,94,0.25); }
.course-hero--amber  { background: linear-gradient(135deg,#2e1c00,#4a2e00); border: 1px solid rgba(245,158,11,0.25); }
.course-hero--purple { background: linear-gradient(135deg,#1a0f30,#2d1b4e); border: 1px solid rgba(168,85,247,0.25); }
.course-hero--red    { background: linear-gradient(135deg,#2d0a0a,#4a1515); border: 1px solid rgba(239,68,68,0.25); }
.course-hero--teal   { background: linear-gradient(135deg,#062626,#0d3d3d); border: 1px solid rgba(20,184,166,0.25); }
.course-hero--rose   { background: linear-gradient(135deg,#2d0a1e,#4a1530); border: 1px solid rgba(251,113,133,0.25); }

.course-hero::after {
  content: '\f02d';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: -20px; bottom: -20px;
  font-size: 140px;
  opacity: 0.04;
  color: #fff;
  pointer-events: none;
}

.course-hero__left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.course-hero__icon {
  width: 56px; height: 56px;
  background: rgba(255,255,255,0.1);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: rgba(255,255,255,0.9);
  flex-shrink: 0;
}

.course-hero__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 2px;
}

.course-hero__sub {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

.course-hero__stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-stat {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-stat i { width: 14px; text-align: center; }

/* ── Info table (course sidebar) ──────────────────────────── */
.info-table { width: 100%; border-collapse: collapse; }

.info-table td {
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.info-table td:first-child {
  color: var(--text-3);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: 40%;
}

.info-table td:last-child { color: var(--text); font-weight: 500; }
.info-table tr:last-child td { border-bottom: none; }

.code-pill {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--gold);
  font-family: monospace;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 5px;
}

.badge--warning { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(245,158,11,0.25); }
.ml-1 { margin-left: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .detail-grid       { grid-template-columns: 1fr; }
  .course-info-bar   { flex-direction: column; align-items: flex-start; }
  .course-hero       { flex-direction: column; align-items: flex-start; }
  .course-hero__left { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .course-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════
   RESULTS MODULE
   ═══════════════════════════════════════════════════════ */

/* ── Grade pill ───────────────────────────────────────── */
.grade-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.grade-pill--ap { background: rgba(34,197,94,0.2);  color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.grade-pill--a  { background: rgba(34,197,94,0.15); color: #86efac; border: 1px solid rgba(34,197,94,0.25); }
.grade-pill--bp { background: rgba(59,130,246,0.2); color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
.grade-pill--b  { background: rgba(59,130,246,0.15);color: #bfdbfe; border: 1px solid rgba(59,130,246,0.25); }
.grade-pill--c  { background: rgba(234,179,8,0.18); color: #fde047; border: 1px solid rgba(234,179,8,0.3); }
.grade-pill--d  { background: rgba(245,158,11,0.18);color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); }
.grade-pill--f  { background: rgba(239,68,68,0.18); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.grade-pill--ab { background: rgba(100,116,139,0.2);color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }

.grade-pill--lg { font-size: 16px; padding: 5px 14px; min-width: 50px; }

/* ── Marks entry table ────────────────────────────────── */
.marks-table .marks-input {
  padding: 7px 10px;
  font-size: 14px;
  font-weight: 600;
  width: 130px;
  text-align: center;
}

.marks-input-wrap { width: 140px; }

.remark-input {
  padding: 7px 10px;
  font-size: 12px;
  min-width: 180px;
}

.marks-row--absent td { opacity: 0.45; }
.marks-row--absent .absent-check { opacity: 1 !important; }

.card__footer-bar {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-3);
}

/* ── Status banners ───────────────────────────────────── */
.status-banner {
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-banner--success {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.25);
}

.status-banner--draft {
  background: var(--amber-dim);
  color: var(--amber);
  border: 1px solid rgba(245,158,11,0.25);
}

/* ── Exam type badge ──────────────────────────────────── */
.badge--type {
  background: var(--bg-3);
  color: var(--text-2);
  border: 1px solid var(--border);
  font-size: 11px;
}

/* ── Course tag (small coloured code badge) ───────────── */
.course-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.course-tag--blue   { background: var(--blue-dim);   color: var(--blue); }
.course-tag--green  { background: var(--green-dim);  color: var(--green); }
.course-tag--amber  { background: var(--amber-dim);  color: var(--amber); }
.course-tag--purple { background: var(--purple-dim); color: var(--purple); }
.course-tag--red    { background: var(--red-dim);    color: var(--red); }
.course-tag--teal   { background: rgba(20,184,166,.15); color: #14b8a6; }
.course-tag--rose   { background: rgba(251,113,133,.15); color: #fb7185; }

/* ── Result count ─────────────────────────────────────── */
.result-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-3);
  color: var(--text-3);
}

.result-count--filled { background: var(--green-dim); color: var(--green); }

/* ── Grade distribution bars ──────────────────────────── */
.grade-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.grade-bar-label { width: 40px; flex-shrink: 0; }

.grade-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-3);
  border-radius: 99px;
  overflow: hidden;
}

.grade-bar-fill { height: 100%; border-radius: 99px; transition: width 0.5s ease; }
.grade-bar-fill--ap { background: var(--green); }
.grade-bar-fill--a  { background: #4ade80; }
.grade-bar-fill--bp { background: var(--blue); }
.grade-bar-fill--b  { background: #93c5fd; }
.grade-bar-fill--c  { background: var(--amber); }
.grade-bar-fill--d  { background: #f97316; }
.grade-bar-fill--f  { background: var(--red); }
.grade-bar-fill--ab { background: var(--text-3); }

.grade-bar-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Leaderboard row highlights ───────────────────────── */
.row--gold   td { background: rgba(240,180,41,0.06); }
.row--silver td { background: rgba(148,163,184,0.06); }
.row--bronze td { background: rgba(180,107,60,0.06); }

/* ── Report hero (admin student report card header) ───── */
.report-hero {
  background: linear-gradient(135deg, #0d1829, #141f30);
  border: 1px solid rgba(240,180,41,0.2);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.report-hero__avatar {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--gold), #c07800);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: #0d1117;
  flex-shrink: 0;
}

.report-hero__name  { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--text); }
.report-hero__email { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.report-hero__info  { flex: 1; min-width: 0; }

.report-hero__stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-left: auto;
}

.report-stat { display: flex; flex-direction: column; align-items: center; }
.report-stat__val   { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.report-stat__label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Inline progress (student results table) ──────────── */
.inline-progress {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-2);
}

.inline-bar {
  height: 5px;
  min-width: 4px;
  max-width: 80px;
  background: var(--gold);
  border-radius: 99px;
}

/* ── Filter row ───────────────────────────────────────── */
.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── Info callout ─────────────────────────────────────── */
.info-callout {
  background: var(--blue-dim);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--blue);
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.6;
}

/* ── Dashboard two-col grid ───────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════
   ASSIGNMENTS MODULE
   ═══════════════════════════════════════════════════════ */

/* ── Assignment card list ─────────────────────────────── */
.assignment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.asgn-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  gap: 0;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.asgn-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.asgn-card--graded   { border-left: 3px solid var(--green); }
.asgn-card--submitted { border-left: 3px solid var(--blue); }

.asgn-card__left {
  padding: 20px 16px;
  display: flex;
  align-items: flex-start;
  flex-shrink: 0;
}

.asgn-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.asgn-icon--blue   { background: var(--blue-dim);   color: var(--blue); }
.asgn-icon--green  { background: var(--green-dim);  color: var(--green); }
.asgn-icon--amber  { background: var(--amber-dim);  color: var(--amber); }
.asgn-icon--purple { background: var(--purple-dim); color: var(--purple); }
.asgn-icon--red    { background: var(--red-dim);    color: var(--red); }
.asgn-icon--teal   { background: rgba(20,184,166,.15); color: #14b8a6; }
.asgn-icon--rose   { background: rgba(251,113,133,.15); color: #fb7185; }

.asgn-card__body  { flex: 1; padding: 16px 20px 16px 0; min-width: 0; }

.asgn-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.asgn-card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.asgn-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
}

.asgn-card__badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.asgn-card__desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 12px;
}

.asgn-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Assignment info bar (detail page) ────────────────── */
.asgn-info-bar {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.asgn-info-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.asgn-info-val {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.asgn-info-label {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Assignment meta strip (student detail) ───────────── */
.asgn-meta-strip {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.asgn-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
}

.asgn-meta-item i { color: var(--text-3); }
.asgn-meta-item--danger { color: var(--red); }
.asgn-meta-item--danger i { color: var(--red); }
.asgn-meta-item--amber  { color: var(--amber); }
.asgn-meta-item--amber i { color: var(--amber); }

/* ── Submission list (admin grading view) ─────────────── */
.submission-list {
  display: flex;
  flex-direction: column;
}

.submission-item {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.submission-item:last-child { border-bottom: none; }
.submission-item:hover { background: var(--bg-3); }
.submission-item--graded   { border-left: 3px solid var(--green); }
.submission-item--submitted { border-left: 3px solid var(--blue); }
.submission-item--pending  { opacity: 0.7; }

.submission-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.submission-item__name  { font-size: 13px; font-weight: 600; color: var(--text); }
.submission-item__email { font-size: 11px; color: var(--text-3); margin-top: 1px; }

.submission-item__answer {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 10px;
}

.submission-item__answer-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 6px;
}

.submission-item__answer-text {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  white-space: pre-wrap;
  max-height: 160px;
  overflow-y: auto;
}

.submission-item__feedback {
  font-size: 12px;
  color: var(--gold);
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--gold-dim);
  border-radius: 6px;
  border: 1px solid rgba(240,180,41,0.2);
}

/* ── Inline grading form ──────────────────────────────── */
.grade-form-wrap {
  margin-top: 12px;
  padding: 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.grade-form-wrap.hidden { display: none; }

.grade-inline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Student submission result block ──────────────────── */
.result-block {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--bg-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.result-score {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.result-total {
  font-size: 1.1rem;
  color: var(--text-3);
}

.feedback-block {
  background: var(--gold-dim);
  border: 1px solid rgba(240,180,41,0.2);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.feedback-block__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 5px;
}

.feedback-block__text {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.65;
}

.submitted-answer {
  margin-top: 16px;
}

.submitted-answer__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 8px;
}

.submitted-answer__text {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.75;
  white-space: pre-wrap;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

/* ── Instructions body ────────────────────────────────── */
.instructions-body {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.8;
}

/* ── Answer textarea ──────────────────────────────────── */
.answer-textarea {
  min-height: 220px;
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
}

/* ── Utility colours ──────────────────────────────────── */
.text-danger { color: var(--red) !important; }
.text-amber  { color: var(--amber) !important; }

/* ═══════════════════════════════════════════════════════
   SETTINGS MODULE
   ═══════════════════════════════════════════════════════ */

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.settings-right-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Toggle switch ────────────────────────────────────── */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.toggle-wrap input[type=checkbox] { display: none; }

.toggle-slider {
  position: relative;
  width: 42px;
  height: 24px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
}

.toggle-slider::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-3);
  transition: left var(--transition), background var(--transition);
}

.toggle-wrap input:checked + .toggle-slider {
  background: var(--gold-dim);
  border-color: var(--gold);
}

.toggle-wrap input:checked + .toggle-slider::after {
  left: calc(100% - 19px);
  background: var(--gold);
}

.toggle-label {
  font-size: 13px;
  color: var(--text-2);
}

@media (max-width: 900px) {
  .settings-grid { grid-template-columns: 1fr; }
  .asgn-info-bar { gap: 16px; }
}

/* ── Quick action strip (dashboard) ───────────────────── */
.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  transition: all var(--transition);
}

.quick-action-btn:hover {
  background: var(--bg-3);
  color: var(--gold);
  border-color: var(--gold-dim);
  opacity: 1;
}

.quick-action-btn i { color: var(--gold); font-size: 13px; }

/* ═══════════════════════════════════════════════════════
   FILE UPLOAD & ATTACHMENT UI
   ═══════════════════════════════════════════════════════ */

/* ── Drag-and-drop zone ───────────────────────────────── */
.file-drop-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-3);
  position: relative;
}

.file-drop-zone:hover,
.file-drop-zone.is-dragging {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.file-drop-zone__input {
  display: none;
}

.file-drop-zone__icon {
  font-size: 32px;
  color: var(--text-3);
  margin-bottom: 10px;
  display: block;
}

.file-drop-zone__text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 4px;
}

.file-drop-zone__hint {
  font-size: 12px;
  color: var(--text-3);
}

/* ── Attachment banner (file info row) ────────────────── */
.attachment-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.attachment-banner i.fa-lg { color: var(--gold); font-size: 20px; flex-shrink: 0; }
.attachment-banner__name  { font-size: 13px; font-weight: 600; color: var(--text); }
.attachment-banner__hint  { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.ml-auto { margin-left: auto; }

/* ── Faculty course list (admin course assignment) ────── */
.faculty-course-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faculty-course-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.faculty-course-item:last-child { border-bottom: none; }

/* ── Logo image ───────────────────────────────────────── */
.sidebar__logo-img {
  height: 75px;
  width: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
}

.auth-brand__logo-img {
  height: 64px;
  width: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  padding: 8px 14px;
}

/* ═══════════════════════════════════════════════════════
   GENERATE ASSIGNMENT MODULE
   ═══════════════════════════════════════════════════════ */

/* ── Chapter selection list ───────────────────────────── */
.chapter-select-list {
  display: flex;
  flex-direction: column;
}

.chapter-select-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
  user-select: none;
}

.chapter-select-item:last-child { border-bottom: none; }
.chapter-select-item:hover { background: var(--bg-3); }

.chapter-select-item.is-selected {
  background: var(--gold-dim);
  border-left: 3px solid var(--gold);
}

.chapter-select-item input[type=checkbox] { display: none; }

.chapter-select-num {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: var(--text-2);
  flex-shrink: 0;
  transition: all var(--transition);
}

.chapter-select-item.is-selected .chapter-select-num {
  background: var(--gold);
  color: #0d1117;
}

.chapter-select-info { flex: 1; min-width: 0; }

.chapter-select-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.chapter-select-desc {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.chapter-select-tick {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  color: transparent;
  flex-shrink: 0;
  transition: all var(--transition);
}

.chapter-select-item.is-selected .chapter-select-tick {
  background: var(--gold);
  border-color: var(--gold);
  color: #0d1117;
}

/* ── Generate footer bar ──────────────────────────────── */
.generate-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  flex-wrap: wrap;
  gap: 12px;
}

.generate-footer__summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.generate-count {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

/* ── Selected chapters bar (configure page) ───────────── */
.selected-chapters-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.chapter-pill {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ── Toggle options (include solutions) ───────────────── */
.toggle-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.toggle-option {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-2);
}

.toggle-option:hover { border-color: var(--border-2); }

.toggle-option.is-selected {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.toggle-option input[type=radio] { display: none; }

.toggle-option i {
  font-size: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}

.toggle-option.is-selected i { color: var(--gold); }
.toggle-option:not(.is-selected) i { color: var(--text-3); }

.toggle-option strong { font-size: 14px; color: var(--text); display: block; margin-bottom: 3px; }
.toggle-option p { font-size: 12px; color: var(--text-3); margin: 0; }

/* ── Preview question cards ───────────────────────────── */
.preview-questions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.preview-q-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.preview-q-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.preview-q-num {
  width: 36px; height: 36px;
  background: var(--gold-dim);
  color: var(--gold);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.preview-q-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-q-textarea {
  min-height: 60px;
  font-size: 14px;
  line-height: 1.6;
}

/* ── MCQ options ──────────────────────────────────────── */
.mcq-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mcq-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.mcq-option--correct {
  border-color: rgba(34,197,94,0.4);
  background: var(--green-dim);
}

.mcq-opt-label {
  width: 24px; height: 24px;
  background: var(--bg-2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  flex-shrink: 0;
}

.mcq-correct-tag {
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
  white-space: nowrap;
}

/* ── Preview action bar ───────────────────────────────── */
.preview-action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--bg);
}

/* ── Download menu ────────────────────────────────────── */
.download-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.download-menu__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  margin-bottom: 4px;
}

/* ── Save assignment info card ────────────────────────── */
.info-card {
  background: var(--blue-dim);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.info-card__icon {
  width: 38px; height: 38px;
  background: var(--blue-dim);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  font-size: 16px;
  flex-shrink: 0;
}

/* ── Save summary ─────────────────────────────────────── */
.save-summary {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.save-summary__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.save-summary__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.save-summary__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-2);
}

.save-summary__list li i { font-size: 12px; }
.text-green { color: var(--green) !important; }

/* ── Submission files row ─────────────────────────────── */
.submission-files-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── Diagram preview ──────────────────────────────────── */
.diagram-preview-wrap {
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--bg-3);
}

.diagram-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.diagram-img-container {
  text-align: center;
  padding: 8px 0;
}

.diagram-img {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius);
  background: #fff;
  padding: 8px;
}
