/* =========================================================
   styles.css — SSC Jobber LMS Admin & Teacher Panel
   Desktop sidebar layout. Student/mobile: see root styles.
   ========================================================= */

/* Google Fonts — Inter (loaded via layout.php link tag) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

body.admin-layout {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  background: #f8fafc;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
}

/* ─── Sidebar / Main Nav ───────────────────────────────── */
.main-nav {
  width: 260px;
  min-width: 260px;
  background: #0f172a;
  min-height: 100vh;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Nav Brand ────────────────────────────────────────── */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
}

.nav-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}

.nav-brand-text {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.nav-brand-sub {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ─── Nav Section Labels ───────────────────────────────── */
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  padding: 18px 20px 6px;
}

/* ─── Nav Links ────────────────────────────────────────── */
.nav-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 12px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
}

.nav-link .nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.nav-link .nav-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
}

.nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
}

.nav-link:hover .nav-icon { transform: scale(1.1); }

.nav-link.active {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}

.nav-link.active .nav-badge {
  background: rgba(255,255,255,0.25);
  color: #ffffff;
}

/* Divider inside nav */
.nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 8px 12px;
}

/* ─── Nav Footer (user info + logout) ──────────────────── */
.nav-footer {
  padding: 16px 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-footer-info {
  flex: 1;
  min-width: 0;
}

.nav-footer-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-footer-role {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-weight: 400;
}

.nav-logout {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.06);
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 15px;
  transition: background 0.18s, color 0.18s;
  flex-shrink: 0;
}

.nav-logout:hover {
  background: rgba(239,68,68,0.2);
  color: #f87171;
}

/* ─── User Avatar ──────────────────────────────────────── */
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
  text-transform: uppercase;
}

.user-avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

/* ─── Admin Main Content Area ──────────────────────────── */
.admin-main {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  background: #f8fafc;
  min-width: 0;
}

/* ─── Page Header ──────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header-left {}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.4px;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-top: 3px;
  font-weight: 400;
}

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

/* ─── Breadcrumb ───────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 16px;
}

.breadcrumb a {
  color: #6366f1;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s;
}

.breadcrumb a:hover { opacity: 0.75; }

.breadcrumb-sep { color: #cbd5e1; font-size: 12px; }

.breadcrumb-current { color: #475569; font-weight: 500; }

/* ─── Buttons ──────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #6366f1;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(99,102,241,0.25);
  font-family: inherit;
}

.btn-primary:hover {
  background: #4f46e5;
  box-shadow: 0 4px 16px rgba(99,102,241,0.38);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: #6366f1;
  border: 1.5px solid #6366f1;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s, color 0.18s, transform 0.12s;
  white-space: nowrap;
  font-family: inherit;
}

.btn-outline:hover {
  background: #eef2ff;
  transform: translateY(-1px);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s, transform 0.12s;
  white-space: nowrap;
  font-family: inherit;
}

.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }

.btn-sm {
  padding: 7px 14px !important;
  font-size: 12px !important;
  border-radius: 7px !important;
}

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

.stat-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
  transition: box-shadow 0.2s, transform 0.15s;
}

.stat-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.09);
  transform: translateY(-2px);
}

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

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

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stat color variants */
.stat-indigo .stat-icon { background: #eef2ff; color: #6366f1; }
.stat-violet .stat-icon { background: #f5f3ff; color: #8b5cf6; }
.stat-emerald .stat-icon { background: #ecfdf5; color: #10b981; }
.stat-amber  .stat-icon  { background: #fffbeb; color: #f59e0b; }
.stat-rose   .stat-icon  { background: #fff1f2; color: #f43f5e; }
.stat-cyan   .stat-icon  { background: #ecfeff; color: #06b6d4; }

/* ─── Table Card ───────────────────────────────────────── */
.table-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
  overflow: hidden;
  margin-bottom: 24px;
}

.table-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
}

.table-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: #f1f5f9;
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #64748b;
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  font-size: 14px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

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

.data-table tbody tr {
  transition: background 0.13s;
}

.data-table tbody tr:hover {
  background: #f8faff;
}

/* ─── Forms ────────────────────────────────────────────── */
.form-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
  padding: 32px;
  margin-bottom: 24px;
}

.form-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid #f1f5f9;
}

.form-group {
  margin-bottom: 20px;
}

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

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: 44px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  appearance: none;
}

.form-textarea {
  height: auto;
  min-height: 100px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.5;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.form-input::placeholder,
.form-textarea::placeholder { color: #94a3b8; }

.form-select {
  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='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-hint {
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
  margin-top: 5px;
}

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

/* ─── Panel ────────────────────────────────────────────── */
.panel {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
  overflow: hidden;
  margin-bottom: 24px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
}

.panel-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.panel-link {
  font-size: 13px;
  color: #6366f1;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.15s;
}

.panel-link:hover { opacity: 0.75; text-decoration: underline; }

.panel-body {
  padding: 0 24px;
}

/* ─── List Rows ────────────────────────────────────────── */
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.13s;
}

.list-row:last-child { border-bottom: none; }

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

.list-content { flex: 1; min-width: 0; }

.list-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Two Column Grid ──────────────────────────────────── */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

/* ─── Badges ───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-green  { background: #d1fae5; color: #065f46; }
.badge-gray   { background: #f1f5f9; color: #475569; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-amber  { background: #fef3c7; color: #92400e; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-purple { background: #f5f3ff; color: #5b21b6; }
.badge-indigo { background: #eef2ff; color: #3730a3; }
.badge-cyan   { background: #ecfeff; color: #155e75; }

/* ─── Role Badges ──────────────────────────────────────── */
.role-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.role-badge.role-admin   { background: #fee2e2; color: #991b1b; }
.role-badge.role-teacher { background: #dbeafe; color: #1e40af; }
.role-badge.role-student { background: #d1fae5; color: #065f46; }

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

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  color: #64748b;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
  flex-shrink: 0;
}

.btn-icon:hover { transform: translateY(-1px); }

.btn-icon-blue  { color: #3b82f6; border-color: #bfdbfe; }
.btn-icon-blue:hover  { background: #eff6ff; }

.btn-icon-amber { color: #f59e0b; border-color: #fde68a; }
.btn-icon-amber:hover { background: #fffbeb; }

.btn-icon-red   { color: #ef4444; border-color: #fecaca; }
.btn-icon-red:hover   { background: #fff1f2; }

.btn-icon-green { color: #10b981; border-color: #a7f3d0; }
.btn-icon-green:hover { background: #ecfdf5; }

/* ─── Empty State ──────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-icon {
  font-size: 56px;
  line-height: 1;
  opacity: 0.45;
}

.empty-title {
  font-size: 16px;
  font-weight: 700;
  color: #334155;
}

.empty-text {
  font-size: 14px;
  color: #94a3b8;
  max-width: 320px;
  line-height: 1.6;
}

/* ─── Alerts ───────────────────────────────────────────── */
.alert {
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* ─── Flash Banners ────────────────────────────────────── */
.flash-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 14px 24px;
  text-align: center;
  z-index: 9999;
  font-size: 14px;
  font-weight: 600;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.flash-success {
  background: #059669;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(5,150,105,0.3);
}

.flash-error {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(220,38,38,0.3);
}

.flash-info {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}

/* ─── Toggle Switch ────────────────────────────────────── */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
}

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

.toggle-track {
  width: 52px;
  height: 28px;
  background: #cbd5e1;
  border-radius: 999px;
  position: relative;
  transition: background 0.22s ease;
  flex-shrink: 0;
}

.toggle-thumb {
  width: 22px;
  height: 22px;
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: left 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.toggle-label input:checked + .toggle-track {
  background: #6366f1;
}

.toggle-label input:checked + .toggle-track .toggle-thumb {
  left: 27px;
}

/* ─── Color Picker Row ─────────────────────────────────── */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.color-picker {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  background: transparent;
  overflow: hidden;
  flex-shrink: 0;
  outline: none;
}

.color-picker::-webkit-color-swatch-wrapper { padding: 0; }
.color-picker::-webkit-color-swatch { border: none; border-radius: 10px; }

.color-presets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.color-preset {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.12);
  transition: transform 0.15s, box-shadow 0.15s;
  outline: none;
}

.color-preset:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.2);
}

/* ─── Color Dot ────────────────────────────────────────── */
.color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
}

/* ─── Teacher Selection Cards ──────────────────────────── */
.teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.teacher-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  background: #ffffff;
}

.teacher-card input[type="checkbox"] { display: none; }

.teacher-card:hover {
  border-color: #a5b4fc;
  background: #f8faff;
}

.teacher-card.selected {
  border-color: #6366f1;
  background: #eef2ff;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.teacher-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
  text-transform: uppercase;
}

.teacher-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teacher-email {
  font-size: 12px;
  color: #64748b;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* ─── Content Type Grid ────────────────────────────────── */
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.content-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
  text-align: center;
}

.content-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  border-color: #a5b4fc;
  transform: translateY(-2px);
}

.content-card-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.content-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.content-card-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

/* ─── Lecture / Note / Quiz Cards (Teacher) ────────────── */
.lecture-card,
.note-card,
.quiz-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.05);
  padding: 18px;
  margin-bottom: 12px;
  transition: box-shadow 0.2s, transform 0.15s;
}

.lecture-card:hover,
.note-card:hover,
.quiz-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.09);
  transform: translateY(-1px);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
}

.card-meta {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ─── Snackbar / Toast ─────────────────────────────────── */
.snackbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #1e293b;
  color: #ffffff;
  border-radius: 12px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  pointer-events: none;
  font-family: inherit;
}

.snackbar.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-success { background: #059669; }
.toast-error   { background: #dc2626; }
.toast-info    { background: #2563eb; }

/* ─── Question Builder ─────────────────────────────────── */
.question-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 16px;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.question-card:focus-within {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}

.question-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #6366f1;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.question-text-input {
  flex: 1;
  height: 40px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.question-text-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.option-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.option-radio {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}

.option-radio:checked {
  border-color: #6366f1;
  background: #6366f1;
}

.option-radio:checked::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.option-input {
  flex: 1;
  height: 38px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  outline: none;
  transition: border-color 0.18s;
}

.option-input:focus { border-color: #6366f1; }

.option-label-letter {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  flex-shrink: 0;
}

/* ─── Hamburger / Mobile Sidebar Toggle ────────────────── */
.nav-toggle-btn {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #0f172a;
  border: none;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: background 0.18s;
}

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

/* ─── Progress Bar ─────────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transition: width 0.4s ease;
}

/* ─── Separator ────────────────────────────────────────── */
.sep { height: 1px; background: #f1f5f9; margin: 20px 0; }

/* ─── Scrollbar Styling ────────────────────────────────── */
.main-nav::-webkit-scrollbar { width: 4px; }
.main-nav::-webkit-scrollbar-track { background: transparent; }
.main-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.admin-main::-webkit-scrollbar { width: 6px; }
.admin-main::-webkit-scrollbar-track { background: transparent; }
.admin-main::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }

/* ─── Utility Helpers ──────────────────────────────────── */
.text-muted   { color: #64748b; }
.text-sm      { font-size: 13px; }
.text-xs      { font-size: 11px; }
.text-semibold{ font-weight: 600; }
.text-bold    { font-weight: 700; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex  { display: flex; }
.flex-1{ flex: 1; }
.items-center { align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .form-row-3 { grid-template-columns: 1fr 1fr; }
  .content-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-toggle-btn { display: flex; }
  .nav-overlay    { display: none; }
  .nav-overlay.active { display: block; }

  .main-nav {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 150;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .admin-main {
    padding: 20px 16px 20px 16px;
    padding-top: 72px; /* account for toggle btn */
  }

  .two-col-grid { grid-template-columns: 1fr; }
  .form-row     { grid-template-columns: 1fr; }
  .form-row-3   { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr 1fr; }
  .teacher-grid { grid-template-columns: 1fr; }
  .page-header  { flex-direction: column; align-items: flex-start; }
  .header-actions { width: 100%; justify-content: flex-start; }
  .stats-grid   { grid-template-columns: 1fr 1fr; }
  .stat-value   { font-size: 24px; }
}

@media (max-width: 480px) {
  .admin-main { padding: 64px 12px 20px; }
  .content-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .form-card  { padding: 20px; }
}
