
:root {
  --ink: #14213D;
  --ink-soft: #2A3A5C;
  --paper: #FBFAF7;
  --paper-dim: #F1EFE8;
  --teal: #1F6F5C;
  --teal-dark: #164E41;
  --mustard: #D9A63E;
  --danger: #B0432E;
  --sky: #2E6FF2;
  --sky-dark: #1E56C4;
  --border: #DDD8CC;
  --text-muted: #5C6570;
  --radius: 4px;
  --font-display: 'Poppins', sans-serif;
  --font-body: 'Poppins', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: 'Poppins', sans-serif; color: var(--ink); background: var(--paper-dim); }
h1, h2, h3 { font-family: 'Poppins', sans-serif; font-weight: 400; margin: 0; }
button, input { font-family: 'Poppins', sans-serif; }
.hidden { display: none !important; }
.icon-line { width: 1em; height: 1em; vertical-align: -0.15em; flex-shrink: 0; }

.exam-shell { min-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--paper-dim); }
.exam-topbar { height: 68px; flex-shrink: 0; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; }
.exam-topbar-title h2 { font-size: 19px; margin-bottom: 2px; }
.exam-topbar-meta { display: flex; gap: 18px; }
.exam-topbar-meta span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); }
.exam-timer { display: flex; align-items: center; gap: 8px; background: var(--ink); color: var(--paper); padding: 9px 18px; border-radius: 30px; font-weight: 700; font-size: 14.5px; letter-spacing: 0.02em; }
.exam-timer.low { background: var(--danger); }

.exam-body { flex: 1; display: flex; gap: 24px; padding: 24px 28px; align-items: flex-start; }
.exam-side { width: 300px; flex-shrink: 0; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 20px; box-shadow: 0 2px 8px rgba(20,33,61,0.05); }
.exam-side-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 14px; }
.exam-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 20px; }
.exam-grid-btn {
  aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--border); background: var(--paper-dim);
  font-size: 13px; font-weight: 700; color: var(--ink-soft); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.exam-grid-btn:hover { border-color: var(--teal); }
.exam-grid-btn.answered { background: rgba(31,111,92,0.14); border-color: var(--teal); color: var(--teal-dark); }
.exam-grid-btn.current { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-finish-exam {
  width: 100%; background: var(--danger); color: #fff; border: none; border-radius: 8px; padding: 13px;
  font-family: 'Poppins', sans-serif; font-size: 14.5px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px; letter-spacing: 0.02em;
  transition: background 0.15s ease;
}
.btn-finish-exam:hover { background: #8f3524; }

.exam-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.exam-question-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 32px; box-shadow: 0 2px 8px rgba(20,33,61,0.05); }
.exam-q-tag { margin-bottom: 16px; }
.exam-q-badge { display: inline-block; background: var(--teal); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; padding: 6px 14px; border-radius: 20px; text-transform: uppercase; }
.exam-q-text { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 19px; line-height: 1.5; color: var(--ink); margin-bottom: 26px; }
.exam-options { display: flex; flex-direction: column; gap: 12px; }
.exam-option {
  display: flex; align-items: flex-start; gap: 14px; width: 100%; text-align: left;
  border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; background: var(--paper-dim);
  cursor: pointer; font-family: 'Poppins', sans-serif; font-size: 15px; color: var(--ink-soft); line-height: 1.5;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.exam-option:hover { border-color: var(--teal); background: #fff; }
.exam-option.selected { border-color: var(--teal); background: rgba(31,111,92,0.08); color: var(--ink); }
.exam-option-letter {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: var(--text-muted);
  background: #fff;
}
.exam-option.selected .exam-option-letter { border-color: var(--teal); background: var(--teal); color: #fff; }
.exam-footer { display: flex; justify-content: space-between; align-items: center; }
.exam-footer .btn-ghost, .exam-footer .btn-primary { display: inline-flex; align-items: center; gap: 8px; }
.exam-footer button:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 860px) {
  .exam-body { flex-direction: column; padding: 16px; }
  .exam-side { width: 100%; order: 2; }
  .exam-main { order: 1; }
  .exam-topbar { padding: 0 16px; flex-wrap: wrap; height: auto; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
}

.btn-primary { background: var(--teal); color: var(--paper); border: none; padding: 12px 22px; border-radius: var(--radius); font-size: 15px; font-weight: 600; cursor: pointer; transition: background 0.15s ease; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--ink); padding: 8px 16px; border-radius: var(--radius); cursor: pointer; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-icon { background: none; border: none; font-size: 16px; cursor: pointer; color: var(--text-muted); }
.btn-link { background: none; border: none; color: var(--teal); font-weight: 600; cursor: pointer; padding: 4px 8px; font-size: 13px; }
.btn-link.danger { color: var(--danger); }

.auth-screen {
  min-height: calc(100vh - 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  box-sizing: border-box;
}
.auth-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  width: 100%;
  max-width: 1000px;
  background: var(--paper);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 60px -12px rgba(20,33,61,0.25), 0 18px 36px -18px rgba(20,33,61,0.3);
}
.auth-card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--mustard), var(--danger));
}
.auth-brand { background: var(--ink); color: var(--paper); padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; }
.brand-mark { margin-bottom: 20px; }
.brand-logo-box { background: var(--paper); border-radius: 6px; padding: 16px 22px; display: inline-flex; align-items: center; margin-bottom: 28px; line-height: 0; }
.brand-logo-img { width: 100%; max-width: 340px; height: auto; display: block; }
.auth-brand h1 { font-size: 40px; color: var(--paper); margin-bottom: 18px; }
.auth-brand h1 span { color: var(--mustard); }
.tagline { font-size: 17px; line-height: 1.8; color: #C9CEDA; max-width: 440px; margin-bottom: 32px; }
.brand-points { list-style: none; padding: 0; margin: 0; max-width: 420px; }
.brand-points li { position: relative; padding: 10px 0 10px 24px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 14.5px; color: #D9DCE4; }
.brand-points li::before { content: ""; position: absolute; left: 0; top: 19px; width: 8px; height: 8px; background: var(--mustard); }

.auth-panel { padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; width: 100%; box-sizing: border-box; }
.auth-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 32px; }
.auth-tab { flex: 1; background: none; border: none; padding: 12px 0; font-size: 16px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.auth-tab.active { color: var(--ink); border-bottom-color: var(--teal); }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.auth-form input { border: 1px solid var(--border); border-radius: var(--radius); padding: 11px 14px; font-size: 15px; background: var(--paper); color: var(--ink); }
.auth-form input:focus { outline: none; border-color: var(--teal); }
.form-msg { margin: 0; font-size: 13.5px; color: var(--danger); min-height: 18px; }
.form-msg.success { color: var(--teal); }
.form-note { font-size: 12.5px; color: var(--text-muted); line-height: 1.6; margin-top: -6px; }

.app-shell { min-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--paper); }
.topbar { height: 64px; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; flex-shrink: 0; }
.topbar-brand { font-family: 'Poppins', sans-serif; font-size: 20px; display: flex; align-items: center; gap: 12px; }
.topbar-brand span { color: var(--mustard); }
.topbar-brand em { font-style: normal; font-size: 13px; color: #9AA3B5; margin-left: 0; }
.topbar-logo-box { background: var(--paper); border-radius: var(--radius); padding: 6px 14px; display: inline-flex; align-items: center; line-height: 0; }
.topbar-logo-img { height: 40px; width: auto; display: block; }
.topbar-user { display: flex; align-items: center; gap: 16px; }
.user-chip { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.user-chip span { font-size: 14px; font-weight: 600; }
.user-chip small { color: #9AA3B5; font-size: 12px; }
.topbar .btn-ghost { border-color: rgba(255,255,255,0.25); color: var(--paper); }

.layout { display: flex; flex: 1; min-height: 0; }
.sidebar { width: 200px; background: var(--paper-dim); border-right: 1px solid var(--border); padding: 20px 0; display: flex; flex-direction: column; flex-shrink: 0; }
.nav-item { background: none; border: none; text-align: left; padding: 13px 24px; font-size: 14.5px; color: var(--ink-soft); cursor: pointer; border-left: 3px solid transparent; }
.nav-item:hover { background: rgba(0,0,0,0.03); }
.nav-item.active { border-left-color: var(--teal); color: var(--ink); font-weight: 600; background: rgba(31,111,92,0.06); }

.content { flex: 1; padding: 36px 44px; overflow-y: auto; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; border-bottom: 1px solid var(--border); padding-bottom: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.stat-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 26px 20px 22px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(20,33,61,0.06);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--mustard));
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px -8px rgba(20,33,61,0.18); }
.stat-value { font-family: 'Poppins', sans-serif; font-size: 36px; color: var(--teal-dark); line-height: 1; margin-bottom: 8px; }
.stat-label { font-size: 12.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.panel-head h2 { font-size: 24px; margin-bottom: 6px; }
.panel-head p { margin: 0; color: var(--text-muted); font-size: 14px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.course-card { border: 1px solid var(--border); border-left: 3px solid var(--teal); border-radius: var(--radius); padding: 20px; background: #fff; }
.course-card h3 { font-size: 17px; margin-bottom: 8px; }
.course-card p { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; margin: 0 0 14px; }
.course-type-tag { display: inline-block; font-size: 11.5px; color: var(--teal-dark); background: rgba(31,111,92,0.1); padding: 3px 9px; border-radius: 20px; margin-bottom: 12px; }
.card-actions { display: flex; gap: 8px; margin-top: 12px; }

.card-list { display: flex; flex-direction: column; gap: 14px; }
.list-row { border: 1px solid var(--border); border-left: 3px solid var(--mustard); border-radius: var(--radius); padding: 18px 20px; background: #fff; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.list-row-main h3 { font-size: 16px; margin-bottom: 4px; }
.list-row-main p { margin: 0; color: var(--text-muted); font-size: 13px; }
.list-row-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

.progress-bar { width: 140px; height: 8px; background: var(--paper-dim); border-radius: 20px; overflow: hidden; border: 1px solid var(--border); }
.progress-fill { height: 100%; background: var(--teal); transition: width 0.6s ease; }
.progress-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===== Course card (v2 — icon-badge style) ===== */
.cc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); grid-auto-rows: 1fr; align-items: stretch; justify-items: stretch; gap: 20px; }
.cc-grid-compact { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 320px)); grid-auto-rows: 1fr; align-items: stretch; gap: 20px; }
.cc-card {
  position: relative; border-radius: 18px; padding: 22px 22px 20px; display: flex; flex-direction: column;
  height: 100%; box-shadow: 0 16px 32px -18px rgba(20,33,61,0.22);
}
.cc-card.cc-light { background: #fff; border: 1px solid var(--border); color: var(--ink); }
.cc-card.cc-dark { background: var(--ink); color: var(--paper); }
.cc-icon {
  position: absolute; top: 20px; right: 20px; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cc-icon svg { width: 19px; height: 19px; color: #fff; }
.cc-title { font-family: 'Poppins', sans-serif; font-size: 16.5px; font-weight: 700; line-height: 1.35; margin: 0 50px 8px 0;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(1.35em * 2); }
.cc-card.cc-dark .cc-title { color: #fff; }
.cc-desc { font-size: 13px; line-height: 1.65; color: var(--text-muted); margin: 0 0 16px;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(1.65em * 3); }
.cc-card.cc-dark .cc-desc { color: #AEB4C4; }
.cc-meta-row {
  display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  padding-bottom: 14px; margin-bottom: 12px; border-bottom: 1px solid var(--border);
}
.cc-card.cc-dark .cc-meta-row { border-bottom-color: rgba(255,255,255,0.14); color: #E4E7EF; }
.cc-meta-row svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }
.cc-card.cc-dark .cc-meta-row svg { color: #9AA3B5; }
.cc-stats-row { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }
.cc-card.cc-dark .cc-stats-row { color: #9AA3B5; }
.cc-stats-row span { display: flex; align-items: center; gap: 6px; }
.cc-stats-row svg { width: 14px; height: 14px; flex-shrink: 0; }
.cc-progress-wrap { margin-bottom: 18px; }
.cc-progress-top { display: flex; justify-content: flex-end; font-size: 12px; font-weight: 700; margin-bottom: 5px; color: var(--ink); }
.cc-card.cc-dark .cc-progress-top { color: var(--mustard); }
.cc-progress-track { height: 6px; border-radius: 20px; background: var(--paper-dim); overflow: hidden; }
.cc-card.cc-dark .cc-progress-track { background: rgba(255,255,255,0.16); }
.cc-progress-fill-v2 { height: 100%; border-radius: 20px; transition: width 0.6s ease; }
.cc-card.cc-light .cc-progress-fill-v2 { background: var(--sky); }
.cc-card.cc-dark .cc-progress-fill-v2 { background: var(--mustard); }
.cc-footer { display: flex; align-items: center; margin-top: auto; }
.cc-footer > * { width: 100%; }
.cc-ghost-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: transparent;
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); flex-shrink: 0;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.cc-ghost-btn:hover { border-color: var(--sky); color: var(--sky); }
.cc-ghost-btn svg { width: 16px; height: 16px; }
.cc-card.cc-dark .cc-ghost-btn { border-color: rgba(255,255,255,0.28); color: #D9DCE4; }
.cc-card.cc-dark .cc-ghost-btn:hover { border-color: var(--mustard); color: var(--mustard); }
.btn-cc {
  border: none; border-radius: 10px; padding: 12px 18px; font-size: 14px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; font-family: 'Poppins', sans-serif;
  transition: background 0.15s ease;
}
.btn-cc svg { width: 15px; height: 15px; }
.cc-card.cc-light .btn-cc { background: var(--sky); color: #fff; }
.cc-card.cc-light .btn-cc:hover { background: var(--sky-dark); }
.cc-card.cc-dark .btn-cc { background: var(--mustard); color: var(--ink); }
.cc-card.cc-dark .btn-cc:hover { background: #C79433; }
.cc-badge { padding: 12px 14px; border-radius: 10px; font-size: 13px; font-weight: 700; text-align: center; display: inline-block; }
.cc-admin-actions { display: flex; gap: 8px; width: 100%; }
.cc-admin-actions button { flex: 1; padding: 11px 14px; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: 'Poppins', sans-serif; transition: background 0.15s ease, border-color 0.15s ease; }
.cc-admin-actions .cc-edit-btn { background: var(--paper-dim); border: 1px solid var(--border); color: var(--ink); }
.cc-admin-actions .cc-edit-btn:hover { border-color: var(--sky); color: var(--sky); }
.cc-admin-actions .cc-del-btn { background: rgba(176,67,46,0.1); border: 1px solid rgba(176,67,46,0.3); color: var(--danger); }
.cc-admin-actions .cc-del-btn:hover { background: rgba(176,67,46,0.18); }
.cc-card.cc-dark .cc-admin-actions .cc-edit-btn { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.24); color: #fff; }
.cc-card.cc-dark .cc-admin-actions .cc-edit-btn:hover { border-color: var(--mustard); color: var(--mustard); }
.cc-card.cc-dark .cc-admin-actions .cc-del-btn { background: rgba(224,110,84,0.18); border-color: rgba(224,110,84,0.4); color: #F0937D; }
.cc-card.cc-dark .cc-admin-actions .cc-del-btn:hover { background: rgba(224,110,84,0.28); }
.cc-card.cc-light .cc-badge.is-approved { background: rgba(31,111,92,0.12); color: var(--teal-dark); }
.cc-card.cc-light .cc-badge.is-pending { background: rgba(217,166,62,0.18); color: #8A6412; }
.cc-card.cc-dark .cc-badge.is-approved { background: rgba(217,166,62,0.22); color: var(--mustard); }
.cc-card.cc-dark .cc-badge.is-pending { background: rgba(255,255,255,0.14); color: #E4E7EF; }
.cc-subrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.cc-card.cc-dark .cc-subrow { border-top-color: rgba(255,255,255,0.14); }
.cc-subrow input[type="number"] { width: 58px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 12.5px; }
.cc-subrow .btn-link { padding: 4px 6px; font-size: 12.5px; }
.cc-card.cc-dark .cc-subrow .btn-link { color: var(--mustard); }
.cc-card.cc-dark .cc-subrow .btn-ghost { border-color: rgba(255,255,255,0.28); color: #fff; }

#view-student .cc-card.cc-light .btn-cc { background: #6C5DD3; }
#view-student .cc-card.cc-light .btn-cc:hover { background: #5A4BC0; }
#view-student .cc-card.cc-light .cc-progress-fill-v2 { background: #6C5DD3; }
#view-student .cc-card.cc-light .cc-ghost-btn:hover { border-color: #6C5DD3; color: #6C5DD3; }

.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; font-size: 12.5px; color: var(--text-muted); font-weight: 600; padding: 10px 12px; border-bottom: 2px solid var(--border); }
.data-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:hover td { background: rgba(0,0,0,0.015); }

.badge { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-active { background: rgba(31,111,92,0.12); color: var(--teal-dark); }
.badge-pending { background: rgba(217,166,62,0.18); color: #8A6412; }
.badge-blocked { background: rgba(176,67,46,0.12); color: var(--danger); }

.stat-card .num { font-family: 'Poppins', sans-serif; font-size: 34px; color: var(--teal-dark); line-height: 1; margin-bottom: 8px; }
.stat-card .label { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(20,33,61,0.5); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: #fff; width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto; border-radius: var(--radius); border-top: 4px solid var(--teal); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-body label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.modal-body input, .modal-body select, .modal-body textarea { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; font-size: 14.5px; font-family: 'Poppins', sans-serif; }
.modal-body textarea { resize: vertical; min-height: 70px; }
.quiz-question-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: var(--paper-dim); }
.quiz-question-block .qhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.option-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 400; }

/* Refined global toast: larger, right-aligned, text-only notification. */
.toast {
  position: fixed !important;
  right: 8px !important;
  left: auto !important;
  bottom: calc(42px + 5px + env(safe-area-inset-bottom, 0px)) !important;
  transform: none !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: max-content;
  min-width: 0;
  max-width: min(480px, calc(100vw - 16px));
  min-height: 42px;
  box-sizing: border-box;
  padding: 9px 18px;
  border: 1px solid rgba(255,255,255,.14);
  border-left: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  background: #172440;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-align: right;
  box-shadow: 0 14px 38px rgba(15,23,42,.26), 0 4px 10px rgba(15,23,42,.14);
  z-index: 10010 !important;
  overflow-wrap: anywhere;
  animation: toast-right-in .24s ease-out both;
}
.toast::before { content: none !important; display: none !important; }
.toast.error { border-left-color: #F07878; }
@keyframes toast-right-in {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: translateX(0); }
}
@media (max-width: 600px) {
  .toast {
    right: 8px !important;
    left: auto !important;
    bottom: calc(42px + 5px + env(safe-area-inset-bottom, 0px)) !important;
    width: max-content;
    min-width: 0;
    max-width: calc(100vw - 16px);
    min-height: 40px;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 12px;
    text-align: right;
  }
}

.contact-fab { position: fixed; bottom: 26px; right: 26px; background: var(--teal); color: var(--paper); border: none; border-radius: 30px; padding: 13px 22px; font-size: 14px; font-weight: 600; font-family: 'Poppins', sans-serif; cursor: pointer; box-shadow: 0 4px 14px rgba(20,33,61,0.25); display: flex; align-items: center; gap: 8px; z-index: 50; transition: background 0.15s ease; }
.contact-fab:hover { background: var(--teal-dark); }
.contact-fab-badge { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 20px; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid var(--paper); }
.chat-thread { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; padding: 4px 2px; margin-bottom: 4px; }
.chat-bubble { max-width: 78%; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; }
.chat-bubble .chat-meta { font-size: 11px; opacity: 0.75; margin-bottom: 3px; font-weight: 600; }
.chat-bubble.mine { align-self: flex-end; background: var(--teal); color: var(--paper); border-bottom-right-radius: 3px; }
.chat-bubble.theirs { align-self: flex-start; background: var(--paper-dim); color: var(--ink); border-bottom-left-radius: 3px; }
.chat-reply-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-reply-row textarea { flex: 1; min-height: 44px; max-height: 100px; }
.support-msg-row { border: 1px solid var(--border); border-left: 3px solid var(--mustard); border-radius: var(--radius); padding: 16px 18px; background: #fff; }
.support-msg-row.resolved { border-left-color: var(--teal); }
.support-msg-row .support-meta { font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; }

@media (max-width: 860px) {
  .auth-card { grid-template-columns: 1fr; }
  .auth-brand { padding: 40px 28px; }
  .auth-panel { padding: 40px 28px; }
  .layout { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; overflow-x: auto; padding: 8px; }
  .nav-item { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .nav-item.active { border-left-color: transparent; border-bottom-color: var(--teal); }
  .content { padding: 24px 18px; }
}
/* ===== Student Dashboard restyle (scoped to #view-student only) ===== */
#view-student.sd-shell { min-height: 100vh; background: #F4F6FB; }
#view-student .sd-layout { display: flex; min-height: 100vh; }
#view-student .sd-sidebar {
  width: 250px; flex-shrink: 0; background: #FFFFFF; display: flex; flex-direction: column;
  justify-content: space-between; padding: 26px 20px; box-shadow: 2px 0 18px -8px rgba(20,33,61,0.08);
}
#view-student .sd-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 30px; }
#view-student .sd-brand-logo { line-height: 0; }
#view-student .sd-brand-logo-img { width: 100%; max-width: 168px; height: auto; display: block; }
#view-student .sd-nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
#view-student .sd-nav .nav-item {
  display: flex; align-items: center; gap: 12px; background: none; border: none; text-align: left;
  padding: 12px 16px; border-radius: 12px; font-size: 14.5px; font-weight: 600; color: #8B90A8;
  cursor: pointer; transition: background .15s ease, color .15s ease;
}
#view-student .sd-nav .nav-item:hover { background: #F4F1FE; color: #1E1B39; }
#view-student .sd-nav .nav-item.active { background: #6C5DD3; color: #fff; }
#view-student .sd-nav .student-help-support { position: relative; }
#view-student .sd-nav .student-help-support .contact-fab-badge { position: static; margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border: 0; background: #E0567F; color: #fff; font-size: 10px; }
#view-student .sd-nav-icon { font-size: 16px; }
#view-student .sd-sidebar-footer { border-top: 1px solid #EEF0F6; padding-top: 18px; display: flex; flex-direction: column; gap: 14px; }
#view-student .sd-user-mini { display: flex; align-items: center; gap: 10px; }
#view-student .sd-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: #EDE9FE; color: #6C5DD3;
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; overflow: hidden;
}
#view-student .sd-avatar img, #view-admin .admin-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.account-settings-btn {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; margin-left: auto;
  transition: border-color .15s ease, color .15s ease;
}
.account-settings-btn:hover { border-color: var(--teal); color: var(--teal); }
.account-settings-btn svg { width: 16px; height: 16px; }
#view-student .sd-user-mini .user-chip { align-items: flex-start; }
#view-student .sd-user-mini .user-chip span { color: #1E1B39; font-size: 14px; }
#view-student .sd-user-mini .user-chip small { color: #8B90A8; font-size: 12px; }
#view-student .sd-logout-btn { border-color: #EEF0F6; color: #1E1B39; border-radius: 10px; }
#view-student .sd-logout-btn:hover { border-color: #6C5DD3; color: #6C5DD3; }

#view-student .sd-main.content { flex: 1; padding: 34px 42px; overflow-y: auto; }
#view-student .sd-topbar { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 26px; }
#view-student .sd-greeting { font-family: 'Poppins', sans-serif; font-size: 26px; color: #1E1B39; margin: 0 0 6px; }
#view-student .sd-subtitle { color: #8B90A8; font-size: 14px; margin: 0; }

#view-student .panel-head.sd-panel-head-hidden { display: none; }
#view-student .panel-head { border-bottom: none; padding-bottom: 0; margin-bottom: 20px; }
#view-student .panel-head h2 { font-family: 'Poppins', sans-serif; font-size: 20px; color: #1E1B39; }
#view-student .panel-head p { color: #8B90A8; }

#view-student .sd-stats.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
#view-student .sd-stat-card.stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 22px;
  text-align: left; box-shadow: none; overflow: visible;
}
#view-student .sd-stat-card.stat-card::before { display: none; }
#view-student .sd-stat-card.stat-card:hover { transform: none; box-shadow: 0 6px 16px -10px rgba(20,33,61,0.18); border-color: #D6D2E8; }
#view-student .sd-stat-icon {
  width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  font-size: 17px; margin-bottom: 18px;
}
#view-student .sd-stat-icon svg { width: 19px; height: 19px; }
#view-student .sd-icon-purple { background: #EDE9FE; color: #6C5DD3; }
#view-student .sd-icon-pink { background: #FFE3EA; color: #E0567F; }
#view-student .sd-icon-green { background: #E1FAEE; color: #1F9D6C; }
#view-student .sd-icon-orange { background: #FFF1DA; color: #C7891E; }
#view-student .sd-stat-value.stat-value { font-family: 'Poppins', sans-serif; font-size: 28px; font-weight: 700; color: #1E1B39; margin-bottom: 4px; }
#view-student .sd-stat-label.stat-label { font-size: 13px; color: #8B90A8; text-transform: none; letter-spacing: 0; font-weight: 500; }
#view-student .sd-mini-progress { height: 5px; background: #EEF0F6; border-radius: 6px; margin-top: 14px; overflow: hidden; }
#view-student .sd-mini-progress-fill { height: 100%; background: #6C5DD3; border-radius: 6px; }

#view-student .card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
#view-student .course-card {
  background: #fff; border: none; border-radius: 16px; padding: 20px; box-shadow: 0 12px 26px -14px rgba(20,33,61,0.12);
}
#view-student .course-card h3 { color: #1E1B39; font-size: 16px; margin: 10px 0 6px; }
#view-student .course-card p { color: #8B90A8; font-size: 13px; }
#view-student .course-type-tag { background: #F1F1F4; color: #1E1B39; border-radius: 20px; padding: 4px 10px; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
#view-student .course-highlights { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
#view-student .course-highlights li { display: flex; align-items: center; gap: 6px; color: #6C5DD3; font-size: 13px; }
#view-student .course-highlights li svg { color: #6C5DD3; flex-shrink: 0; }
#view-student .course-highlights li span { color: #6C5DD3; }

#view-student .card-list .list-row {
  background: #fff; border: none; border-left: none; border-radius: 16px; padding: 18px 22px;
  box-shadow: 0 12px 26px -14px rgba(20,33,61,0.12); margin-bottom: 14px;
}
#view-student .list-row-main h3 { color: #1E1B39; font-size: 15px; margin: 0 0 4px; }
#view-student .list-row-main p { color: #8B90A8; font-size: 12.5px; margin: 0; }
#view-student .progress-bar { background: #EEF0F6; border-radius: 6px; height: 6px; max-width: 260px; }
#view-student .progress-fill { background: #6C5DD3; border-radius: 6px; }
#view-student .progress-label { color: #8B90A8; font-size: 12px; }

/* ===== Course Player view ===== */
#view-student .cv-breadcrumb { font-size: 13px; color: #8B90A8; margin-bottom: 6px; }
#view-student .cv-breadcrumb a { color: #6C5DD3; text-decoration: none; cursor: pointer; font-weight: 600; }
#view-student .cv-breadcrumb a:hover { text-decoration: underline; }
#view-student .cv-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
#view-student .cv-title { font-family: 'Poppins', sans-serif; font-size: 22px; font-weight: 700; color: #1E1B39; margin: 0; }
#view-student .cv-header-actions { display: flex; gap: 10px; flex-shrink: 0; }
#view-student .cv-btn-complete { background: #1F9D6C; color: #fff; border: none; border-radius: 20px; padding: 9px 18px; font-weight: 700; font-size: 13px; cursor: pointer; }
#view-student .cv-btn-complete:hover { background: #17825A; }
#view-student .cv-btn-complete.is-done { background: #8B90A8; cursor: default; }
#view-student .cv-btn-resources { background: #fff; color: #6C5DD3; border: 1px solid #D6D2E8; border-radius: 20px; padding: 9px 18px; font-weight: 700; font-size: 13px; cursor: pointer; }
#view-student .cv-btn-resources:hover { border-color: #6C5DD3; }
#view-student .cv-layout { display: flex; gap: 24px; align-items: flex-start; }
#view-student .cv-main { flex: 1; min-width: 0; }
#view-student .cv-player {
  background: linear-gradient(135deg, #14213D, #1F3A5F); border-radius: 14px; overflow: hidden; margin-bottom: 20px;
  box-shadow: 0 12px 26px -14px rgba(20,33,61,0.25); min-height: 260px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
#view-student .cv-player iframe, #view-student .cv-player video { width: 100%; aspect-ratio: 16/9; border: none; display: block; }
#view-student .cv-player-text { color: #EDEBFA; padding: 32px; white-space: pre-wrap; line-height: 1.8; font-size: 14.5px; width: 100%; box-sizing: border-box; }
#view-student .cv-player-empty { color: #C9C4E8; padding: 60px 20px; text-align: center; font-size: 14px; }
#view-student .cv-lesson-card { background: #fff; border-radius: 16px; padding: 22px 24px; box-shadow: 0 12px 26px -14px rgba(20,33,61,0.12); }
#view-student .cv-lesson-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
#view-student .cv-lesson-title { font-size: 16px; font-weight: 700; color: #1E1B39; margin: 0 0 6px; }
#view-student .cv-lesson-desc { color: #6b7086; font-size: 13.5px; margin: 0; line-height: 1.6; }
#view-student .cv-lesson-badge { background: #EDE9FE; color: #6C5DD3; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; flex-shrink: 0; white-space: nowrap; }
#view-student .cv-lesson-link { display: inline-block; margin-top: 10px; color: #6C5DD3; font-weight: 600; font-size: 13px; word-break: break-all; }
#view-student .cv-side { width: 300px; flex-shrink: 0; background: #fff; border-radius: 16px; box-shadow: 0 12px 26px -14px rgba(20,33,61,0.12); overflow: hidden; }
#view-student .cv-side-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #EEF0F6; }
#view-student .cv-side-head h3 { font-size: 14.5px; margin: 0; color: #1E1B39; }
#view-student .cv-side-head span { font-size: 12px; color: #8B90A8; }
#view-student .cv-lesson-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px; cursor: pointer; border-bottom: 1px solid #F4F6FB;
  transition: background 0.15s ease;
}
#view-student .cv-lesson-item:last-child { border-bottom: none; }
#view-student .cv-lesson-item:hover { background: #F8F7FD; }
#view-student .cv-lesson-item.active { background: #6C5DD3; }
#view-student .cv-lesson-item.active .cv-lesson-item-title, #view-student .cv-lesson-item.active .cv-lesson-item-meta { color: #fff; }
#view-student .cv-lesson-icon { width: 30px; height: 30px; border-radius: 50%; background: #EEF0F6; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #6C5DD3; }
#view-student .cv-lesson-item.active .cv-lesson-icon { background: rgba(255,255,255,0.2); color: #fff; }
#view-student .cv-lesson-item-body { flex: 1; min-width: 0; }
#view-student .cv-lesson-item-title { font-size: 13.5px; font-weight: 600; color: #1E1B39; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#view-student .cv-lesson-item-meta { font-size: 11.5px; color: #8B90A8; margin-top: 2px; }
#view-student .cv-downloads { display:none!important; margin-top: 20px; background: #fff; border-radius: 16px; box-shadow: 0 12px 26px -14px rgba(20,33,61,0.12); padding: 18px 22px; }
#view-student .cv-downloads h3 { font-size: 14.5px; margin: 0 0 12px; color: #1E1B39; display: flex; align-items: center; gap: 8px; }
#view-student .cv-download-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid #F4F6FB; }
#view-student .cv-download-row:first-of-type { border-top: none; }
#view-student .cv-download-name { font-size: 13.5px; font-weight: 600; color: #1E1B39; }
#view-student .cv-download-empty { color: #8B90A8; font-size: 13px; }
#view-student .cv-footer-progress { margin-top: 24px; text-align: center; }
#view-student .cv-footer-progress-track { height: 6px; background: #EEF0F6; border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
#view-student .cv-footer-progress-fill { height: 100%; background: #6C5DD3; border-radius: 6px; transition: width 0.4s ease; }
#view-student .cv-footer-progress-label { font-size: 12.5px; color: #8B90A8; }
@media (max-width: 860px) {
  #view-student .cv-layout { flex-direction: column; }
  #view-student .cv-side { width: 100%; }
}

#view-student .data-table { border-collapse: separate; border-spacing: 0 10px; }
#view-student .data-table thead th { color: #8B90A8; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; border: none; padding: 0 16px; text-align: left; }
#view-student .data-table tbody tr { background: #fff; box-shadow: 0 12px 26px -14px rgba(20,33,61,0.12); }
#view-student .data-table tbody td { border: none; padding: 14px 16px; color: #1E1B39; font-size: 13.5px; }
#view-student .data-table tbody tr td:first-child { border-radius: 14px 0 0 14px; }
#view-student .data-table tbody tr td:last-child { border-radius: 0 14px 14px 0; }

#view-student .contact-fab { background: #6C5DD3; }

@media (max-width: 900px) {
  #view-student .sd-layout { flex-direction: column; }
  #view-student .sd-sidebar { width: 100%; flex-direction: row; align-items: center; padding: 14px 16px; }
  #view-student .sd-nav { flex-direction: row; overflow-x: auto; }
  #view-student .sd-sidebar-footer { flex-direction: row; align-items: center; border-top: none; padding-top: 0; }
  #view-student .sd-stats.stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Admin + Admin UI matched to Student Dashboard =====
   UI-only restyle: existing role logic, features, IDs and panel structure unchanged.
*/
#view-admin.app-shell {
  min-height: 100vh;
  background: #F4F6FB;
}

#view-admin .topbar {
  display: none;
}

#view-admin .layout {
  display: flex;
  min-height: 100vh;
}

#view-admin .sidebar {
  width: 250px;
  flex-shrink: 0;
  background: #FFFFFF;
  border-right: none;
  padding: 26px 20px;
  box-shadow: 2px 0 18px -8px rgba(20,33,61,0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#view-admin .sidebar::before {
  content: "Academy";
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: #1E1B39;
  padding: 0 16px;
  margin-bottom: 24px;
}

#view-admin .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  border-left: none;
  border-radius: 12px;
  text-align: left;
  padding: 12px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: #8B90A8;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

#view-admin .nav-item:hover {
  background: #F4F1FE;
  color: #1E1B39;
}

#view-admin .nav-item.active {
  border-left-color: transparent;
  background: #6C5DD3;
  color: #fff;
}

#view-admin .sd-nav-icon { font-size: 16px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
#view-admin .sd-nav-icon svg { width: 16px; height: 16px; }
#view-admin .nav-item.active .sd-nav-icon { color: #fff; }

#view-admin .content {
  flex: 1;
  padding: 34px 42px;
  overflow-y: auto;
  background: #F4F6FB;
}

#view-admin .panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  border-bottom: none;
  padding-bottom: 0;
}

#view-admin .panel-head h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  color: #1E1B39;
}

#view-admin .panel-head p {
  color: #8B90A8;
  font-size: 14px;
}

#view-admin .btn-primary {
  background: #6C5DD3;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
}

#view-admin .btn-primary:hover {
  background: #5A4BC0;
}

#view-admin .btn-ghost {
  border-color: #E6E4EF;
  color: #1E1B39;
  border-radius: 10px;
  background: #fff;
}

#view-admin .btn-ghost:hover {
  border-color: #6C5DD3;
  color: #6C5DD3;
}

#view-admin .stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

#view-admin .stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  text-align: left;
  box-shadow: none;
  overflow: visible;
}

#view-admin .stat-card::before {
  display: none;
}

#view-admin .stat-card:hover {
  transform: none;
  box-shadow: 0 6px 16px -10px rgba(20,33,61,0.18);
  border-color: #D6D2E8;
}

#view-admin .stat-card .num,
#view-admin .stat-card .stat-value {
  font-family: 'Poppins', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #1E1B39;
}

#view-admin .stat-card .label,
#view-admin .stat-card .stat-label {
  font-size: 13px;
  color: #8B90A8;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

#view-admin .card-list {
  gap: 14px;
}

#view-admin .list-row {
  background: #fff;
  border: none;
  border-left: none;
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 12px 26px -14px rgba(20,33,61,0.12);
}

#view-admin .list-row-main h3 {
  color: #1E1B39;
  font-size: 15px;
}

#view-admin .list-row-main p {
  color: #8B90A8;
}

#view-admin .data-table {
  border-collapse: separate;
  border-spacing: 0 10px;
}

#view-admin .data-table thead th {
  color: #8B90A8;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
  border: none;
  padding: 0 16px;
}

#view-admin .data-table tbody tr {
  background: #fff;
  box-shadow: 0 12px 26px -14px rgba(20,33,61,0.12);
}

#view-admin .data-table tbody td {
  border: none;
  padding: 14px 16px;
  color: #1E1B39;
  font-size: 13.5px;
}

#view-admin .data-table tbody tr td:first-child {
  border-radius: 14px 0 0 14px;
}

#view-admin .data-table tbody tr td:last-child {
  border-radius: 0 14px 14px 0;
}

#view-admin .badge {
  border-radius: 20px;
  font-weight: 600;
}

#view-admin .badge-active {
  background: #E1FAEE;
  color: #1F9D6C;
}

#view-admin .badge-pending {
  background: #FFF1DA;
  color: #C7891E;
}

#view-admin .badge-blocked {
  background: #FFE3EA;
  color: #E0567F;
}

#view-admin .contact-fab {
  background: #6C5DD3;
}

#view-admin .contact-fab:hover {
  background: #5A4BC0;
}

#view-admin .modal {
  border-radius: 14px;
  border-top: 4px solid #6C5DD3;
}

#view-admin .modal-head {
  background: #fff;
}

@media (max-width: 900px) {
  #view-admin .layout {
    flex-direction: column;
  }

  #view-admin .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    padding: 14px 16px;
  }

  #view-admin .sidebar::before {
    display: none;
  }

  #view-admin .nav-item {
    width: auto;
    white-space: nowrap;
  }

  #view-admin .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #view-admin .content {
    padding: 24px 18px;
  }
}

@media (max-width: 560px) {
  #view-admin .stat-grid {
    grid-template-columns: 1fr;
  }

  #view-admin .panel-head {
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }
}


#view-admin .admin-sidebar-footer {
  margin-top: auto; border-top: 1px solid #EEF0F6; padding-top: 18px; display: flex; flex-direction: column; gap: 14px;
}
#view-admin .admin-user-mini { display: flex; align-items: center; gap: 10px; padding: 0; }
#view-admin .admin-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: #EDE9FE; color: #6C5DD3;
  display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; flex-shrink: 0; overflow: hidden;
}
#view-admin .admin-user-chip { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
#view-admin .admin-user-chip span { color: #1E1B39; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#view-admin .admin-user-chip small { color: #8B90A8; font-size: 12px; }
#view-admin .admin-sidebar-logout {
  width: 100%; height: 40px; border: 1px solid #E6E4EF; background: #fff; color: #1E1B39; border-radius: 10px;
  padding: 0 14px; font-family: 'Poppins', sans-serif; font-size: 13.5px; font-weight: 500;
  cursor: pointer; text-align: center; display: flex; align-items: center; justify-content: center; gap: 0; transition: .15s ease;
}
#view-admin .admin-sidebar-logout span { display: none; }
#view-admin .admin-sidebar-logout:hover { border-color: #6C5DD3; color: #6C5DD3; background: #F9F7FF; }

@media (max-width: 900px) {
  #view-admin .admin-sidebar-footer { flex-direction: row; align-items: center; border-top: none; padding-top: 0; margin-top: 0; }
  #view-admin .admin-sidebar-logout { width: 110px; flex-shrink: 0; }
}


/* Admin: use the exact same logo asset and placement as Student */
#view-admin .admin-sidebar-brand {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  margin: 0 0 28px;
}
#view-admin .admin-sidebar-brand img {
  width: 100%;
  max-width: 168px;
  height: auto;
  display: block;
}
#view-admin .sidebar::before { display: none; }
@media (max-width: 900px) {
  #view-admin .admin-sidebar-brand { display: none; }
}


/* ===== Course card grid: 4-column layout without stretching 3 cards ===== */
.cc-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 20px;
}

/* Keep the same 4-column card sizing for Student, Admin.
   If only 3 cards exist, they occupy only the first 3 columns. */
#view-student .cc-grid,
#view-admin .cc-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 20px;
}

@media (max-width: 1150px) {
  .cc-grid,
  #view-student .cc-grid,
  #view-admin .cc-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  .cc-grid,
  #view-student .cc-grid,
  #view-admin .cc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 560px) {
  .cc-grid,
  #view-student .cc-grid,
  #view-admin .cc-grid {
    grid-template-columns: 1fr !important;
  }
}


/* ===== All Courses + Free Resources spacing and card dimensions ===== */
/* Add reliable space between the All Courses cards and Free Resources heading. */
#view-student #all-courses-list + .panel-head {
  margin-top: 0 !important;
  padding-top: 24px !important;
}

#all-courses-list .cc-card,
#free-resources-list .cc-card {
  width: 100%;
  min-width: 0;
  height: 100%;
}

#all-courses-list,
#free-resources-list {
  grid-auto-rows: 1fr;
  align-items: stretch;
}


/* ===== Admin Course Builder / Player-style Editor ===== */
.admin-course-editor-overlay{position:fixed;top:0;right:0;bottom:0;left:250px;z-index:9999;background:#F7F7FB;overflow:auto;}
.admin-course-editor-shell{min-height:100vh;display:flex;flex-direction:column;}
.admin-course-editor-top{height:72px;background:#fff;border-bottom:1px solid #E8E6F0;display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:5;}
.admin-course-editor-top h2{margin:0;color:#1E1B39;font-size:18px;font-weight:800;}
.admin-course-editor-top p{margin:3px 0 0;color:#8B90A8;font-size:12px;}
.admin-course-editor-actions{display:flex;gap:10px;align-items:center;}
.admin-course-editor-btn{border:1px solid #DCD8F1;background:#fff;color:#5147A8;border-radius:10px;padding:9px 15px;font-weight:700;cursor:pointer;}
.admin-course-editor-btn.primary{background:#6C5DD3;color:#fff;border-color:#6C5DD3;}
.admin-course-editor-body{padding:26px;max-width:1500px;width:100%;box-sizing:border-box;margin:0 auto;}
.admin-course-editor-grid{display:grid;grid-template-columns:360px minmax(0,1fr);grid-template-areas:"content main";gap:24px;align-items:start;direction:ltr;}
.admin-course-editor-grid > .admin-course-editor-side{grid-area:content;grid-column:1;grid-row:1;direction:ltr;}
.admin-course-editor-grid > .admin-course-editor-main{grid-area:main;grid-column:2;grid-row:1;direction:ltr;}
.admin-course-editor-main{min-width:0;}
.admin-course-editor-player{background:linear-gradient(135deg,#14213D,#1F3A5F);border-radius:14px;min-height:340px;display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:0 12px 26px -14px rgba(20,33,61,.25);}
.admin-course-editor-player iframe{width:100%;aspect-ratio:16/9;border:0;display:block;}
.admin-course-editor-player .empty{color:#D9D5F2;text-align:center;padding:50px 25px;font-size:14px;}
.admin-course-editor-card{background:#fff;border-radius:16px;padding:22px 24px;box-shadow:0 12px 26px -14px rgba(20,33,61,.12);margin-top:18px;}
.admin-course-editor-card h3{margin:0 0 15px;color:#1E1B39;font-size:16px;}
.admin-course-editor-form{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.admin-course-editor-form .full{grid-column:1/-1;}
.admin-course-editor-form label{display:flex;flex-direction:column;gap:7px;color:#555A72;font-size:12px;font-weight:700;}
.admin-course-editor-form input,.admin-course-editor-form textarea,.admin-course-editor-form select{width:100%;box-sizing:border-box;border:1px solid #DDD9EA;border-radius:10px;padding:10px 12px;background:#fff;color:#1E1B39;font:inherit;font-weight:500;outline:none;}
 .admin-course-editor-form textarea{min-height:86px;resize:vertical;}
.admin-pdf-upload{display:flex;flex-direction:column;gap:8px;}
.admin-pdf-upload input[type=file]{padding:10px;background:#fff;border:1px dashed #CFC9E8;border-radius:10px;cursor:pointer;}
.admin-pdf-upload .pdf-current{font-size:12px;color:#6C5DD3;font-weight:600;}
.admin-pdf-upload .pdf-current a{color:#6C5DD3;text-decoration:none;}
.admin-course-editor-form input:focus,.admin-course-editor-form textarea:focus,.admin-course-editor-form select:focus{border-color:#6C5DD3;box-shadow:0 0 0 3px rgba(108,93,211,.10);}
.admin-course-editor-side{background:#fff;border-radius:16px;box-shadow:0 12px 26px -14px rgba(20,33,61,.12);overflow:hidden;position:sticky;top:98px;}
.admin-course-editor-side-head{padding:18px 18px 14px;border-bottom:1px solid #EEEAF5;display:flex;justify-content:space-between;align-items:center;gap:10px;}
.admin-course-editor-side-head h3{margin:0;color:#1E1B39;font-size:15px;}
.admin-course-editor-side-head span{font-size:11px;color:#8B90A8;}
.admin-lesson-list{padding:10px;}
.admin-lesson-row{border:1px solid #ECEAF3;border-radius:12px;padding:11px;margin-bottom:9px;background:#fff;cursor:pointer;display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:10px;align-items:center;}
.admin-lesson-row.active{border-color:#C9C3F1;background:#F7F5FF;box-shadow:0 6px 18px -14px rgba(108,93,211,.5);}
.admin-lesson-icon{width:30px;height:30px;border-radius:9px;background:#EDE9FE;color:#6C5DD3;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;}
.admin-lesson-row-title{font-size:12.5px;font-weight:750;color:#1E1B39;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.admin-lesson-row-meta{font-size:10.5px;color:#8B90A8;margin-top:2px;}
.admin-lesson-row-actions{display:flex;gap:4px;}
.admin-lesson-row-actions button{border:0;background:transparent;color:#8B90A8;cursor:pointer;padding:4px;font-size:12px;}
.admin-lesson-row-actions button:hover{color:#6C5DD3;}
.admin-add-lesson{width:calc(100% - 20px);margin:0 10px 12px;border:1px dashed #CFC9EA;background:#FAF9FE;color:#6C5DD3;border-radius:10px;padding:10px;font-weight:750;cursor:pointer;}
.admin-course-editor-note{font-size:11px;color:#8B90A8;margin-top:10px;line-height:1.5;}
@media(max-width:950px){.admin-course-editor-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"content" "main"}.admin-course-editor-grid > .admin-course-editor-side,.admin-course-editor-grid > .admin-course-editor-main{grid-column:1;grid-row:auto}.admin-course-editor-side{position:static}.admin-course-editor-form{grid-template-columns:1fr}}
@media(max-width:900px){.admin-course-editor-overlay{left:0;top:72px}}
@media(max-width:600px){.admin-course-editor-overlay{top:64px}}
@media(max-width:600px){.admin-course-editor-top{height:auto;padding:14px 16px;gap:12px;align-items:flex-start}.admin-course-editor-body{padding:16px}.admin-course-editor-actions{flex-shrink:0}.admin-course-editor-btn{padding:8px 10px;font-size:12px}.admin-course-editor-player{min-height:220px}}

/* Global footer matching the supplied dashboard reference */
body { padding-bottom: 42px; margin: 0; }
.gp-media-global-footer {
  position: fixed; left: 250px; right: 0; bottom: 0; z-index: 9999;
  height: 42px; min-height: 42px; padding: 0 16px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border-top: 1px solid #D9DEE7;
  color: #000; text-align: center; font-family: 'Poppins', sans-serif;
  font-size: 14px; line-height: 1.5;
}
.gp-media-global-footer a { color: #6C5DD3; text-decoration: none; }
.gp-media-global-footer a:hover { color: #6C5DD3; text-decoration: underline; }
.gp-media-global-footer a:hover { text-decoration: underline; }
@media (max-width: 900px) { .gp-media-global-footer { left: 0; } }
@media (max-width: 480px) { .gp-media-global-footer { font-size: 12px; padding-left: 8px; padding-right: 8px; } }


/* Keep dashboard frame fixed to the viewport so scrolling never exposes a grey body strip. */
html, body { height: 100%; min-height: 0; }
body { overflow: hidden; background: #fff; }
#view-student.sd-shell { height: calc(100vh - 20px); min-height: 0; overflow: hidden; background: #fff; }
#view-student .sd-layout { height: 100%; min-height: 0; overflow: hidden; background: #fff; }
#view-student .sd-sidebar { height: 100%; min-height: 0; position: relative; flex-shrink: 0; background: #fff; overflow-y: auto; }
#view-student .sd-main.content { height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#view-student .sd-sidebar-footer { margin-top: auto; flex-shrink: 0; background: #fff; }
#view-student { background: #fff; }
/* Tighten the sidebar bottom edge so the logout button sits close to it. */
#view-student .sd-sidebar { padding-bottom: 0 !important; }
#view-student .sd-sidebar-footer { padding-bottom: 0 !important; margin-bottom: 0 !important; }
#view-student .sd-logout-btn { margin-bottom: 0 !important; }
#view-admin .sidebar { padding-bottom: 0 !important; }
#view-admin .admin-sidebar-footer { padding-bottom: 0 !important; margin-bottom: 0 !important; }
#view-admin .admin-sidebar-logout { margin-bottom: 0 !important; }
/* Admin dashboard: same fixed-height app frame; scroll inside the content panel only. */
#view-admin.app-shell { height: calc(100vh - 20px); min-height: 0; overflow: hidden; background: #F4F6FB; }
#view-admin .layout { height: 100%; min-height: 0; overflow: hidden; }
#view-admin .sidebar { height: 100%; min-height: 0; overflow-y: auto; flex-shrink: 0; }
#view-admin .content { min-height: 0; height: 100%; overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; }
@media (max-width: 900px) {
  #view-student.sd-shell, #view-admin.app-shell { height: calc(100vh - 20px); }
  #view-student .sd-layout, #view-admin .layout { height: 100%; }
  #view-student .sd-sidebar, #view-admin .sidebar { height: 100%; }
}

/* Student panel: keep Contact Us 2px above the 42px copyright strip. */
#view-student .contact-fab {
  bottom: 44px !important;
}

/* Hide copyright strip on login/register screen only. */
body:has(#view-auth:not(.hidden)) .gp-media-global-footer {
  display: none !important;
}

/* ===== Profile-style Settings panel ===== */
.settings-panel-card { max-width: 100%; background: transparent; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
.account-settings-form { display: flex; flex-direction: column; gap: 16px; }
.settings-cover { min-height: 150px; padding: 18px 26px; border-radius: 12px; background: #fff; border: 1px solid #e8eaf0; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: flex-start; gap: 18px; }
.settings-cover:after { content: none; }
.settings-cover h3 { margin: 0; font-size: clamp(20px,3vw,30px); font-weight: 500; position: relative; z-index: 1; }
.settings-cover p { margin: 7px 0 0; color: #667085; font-size: 13px; position: relative; z-index: 1; }
.settings-profile-summary { display:flex; align-items:center; gap:18px; padding: 0 12px 22px; margin-top:-22px; position:relative; z-index:2; }
.settings-avatar-preview { width: 84px; height: 84px; border-radius: 50%; border: 5px solid #fff; background: #EDE9FE; color: #6C5DD3; display: flex; align-items: center; justify-content: center; font-size: 25px; font-weight: 700; overflow: hidden; flex-shrink: 0; box-shadow:0 2px 8px #00000012; }
.settings-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.settings-profile-name { font-size:18px; font-weight:600; color:#24233b; margin-top:20px; }
.settings-profile-email { color:#8589a0; font-size:12.5px; margin-top:3px; }
.settings-file-label { display:flex; flex-direction:column; gap:7px; font-size:13px; font-weight:600; color:#393B55; }
.account-settings-form label:not(.settings-file-label) { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; font-weight: 600; color: #393B55; }
.account-settings-form input, .account-settings-form textarea { width: 100%; min-height: 43px; border: 1px solid #E1E3ED; border-radius: 8px; padding: 10px 12px; font: inherit; color: #1E1B39; background: #fff; box-sizing:border-box; }
.account-settings-form textarea { min-height:82px; resize:vertical; }
.account-settings-form input:focus, .account-settings-form textarea:focus { outline: none; border-color: #6C5DD3; box-shadow: 0 0 0 3px rgba(108,93,211,.10); }
.account-settings-form input:disabled { background: #F4F5F9; color: #8589A0; cursor: not-allowed; }
.settings-profile-edit { background:#fff; border:1px solid #e8e9f1; border-radius:12px; padding:22px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.settings-profile-edit .full-width { grid-column:1/-1; }
.settings-section { background:#fff; border:1px solid #e8e9f1; border-radius:12px; overflow:hidden; }
.settings-section summary { list-style:none; display:flex; align-items:center; gap:13px; padding:18px 20px; cursor:pointer; color:#34334f; font-size:14px; font-weight:600; }
.settings-section summary::-webkit-details-marker { display:none; }
.settings-section summary:after { content:'+'; margin-left:auto; color:#7770c8; font-size:23px; font-weight:400; line-height:1; }
.settings-section[open] summary:after { content:'−'; }
.settings-section-icon { width:34px; height:34px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:#f0edff; color:#7468d5; font-size:17px; }
.settings-section-fields { padding:0 20px 20px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; border-top:1px solid #f0f0f5; }
.settings-section-fields label { margin-top:15px; }
.settings-help { margin: -4px 0 0; font-size: 12.5px; line-height: 1.6; color: #8589A0; }
.settings-actions { padding: 4px 0 12px; display:flex; justify-content:flex-end; }
.settings-actions .btn-primary { border-radius: 9px; min-width:110px; }
@media (max-width: 600px) { .settings-cover {padding:16px 14px;min-height:100px}.settings-cover img {max-height:88px}.settings-profile-edit,.settings-section-fields {grid-template-columns:1fr}.settings-profile-edit .full-width {grid-column:auto}.settings-profile-summary {padding-left:4px}.settings-profile-edit {padding:17px}.settings-section summary {padding:15px} }


/* ===== Refined academy-branded profile/settings design ===== */
.settings-panel-card { max-width: 1120px; margin: 0 auto; }
.account-settings-form { gap: 20px; }
.settings-cover {
  min-height: 168px; padding: 22px 28px; border-radius: 18px;
  background: linear-gradient(115deg, #ffffff 0%, #f7faff 68%, #fff7f7 100%);
  border: 1px solid #e2e8f2; box-shadow: 0 10px 30px rgba(37, 48, 79, .07);
  isolation: isolate;
}
.settings-cover:before { content:""; position:absolute; inset:0 auto 0 0; width:6px; background:linear-gradient(180deg,#1476b9 0 50%,#ed1c2e 50% 100%); }
.settings-cover:after { content:""; position:absolute; width:180px; height:180px; right:-68px; top:-95px; border:24px solid rgba(20,118,185,.055); border-radius:50%; }
.settings-cover img { position:relative; z-index:1; max-width:min(100%, 980px); max-height:132px; object-fit:contain; object-position:left center; filter:drop-shadow(0 2px 1px rgba(30,40,70,.04)); }
.settings-profile-summary { padding: 0 18px 24px; margin-top:-28px; gap:16px; }
.settings-avatar-preview { width:88px; height:88px; border:5px solid #fff; box-shadow:0 5px 18px rgba(34,45,77,.15); }
.settings-profile-name { color:#30364f; font-size:19px; letter-spacing:-.2px; }
.settings-profile-email { font-size:13px; }
.settings-profile-edit { border:1px solid #e4e8f1; border-radius:16px; padding:24px; gap:18px; box-shadow:0 6px 20px rgba(37,48,79,.045); }
.settings-section { border:1px solid #e4e8f1; border-radius:15px; box-shadow:0 5px 18px rgba(37,48,79,.04); transition:border-color .2s, box-shadow .2s; }
.settings-section:hover { border-color:#c8d8ec; box-shadow:0 8px 24px rgba(37,48,79,.075); }
.settings-section summary { padding:19px 22px; gap:15px; }
.settings-section-icon { width:40px; height:40px; border-radius:12px; background:linear-gradient(145deg,#e8f3ff,#f5eaff); color:#1476b9; font-size:18px; }
.settings-section summary:after { width:30px; height:30px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:#f0f5fc; color:#1476b9; font-size:22px; }
.settings-section[open] summary { background:linear-gradient(90deg,#f8fbff,#fff); }
.settings-section-fields { padding:0 22px 22px; border-top:1px solid #edf1f7; }
.account-settings-form label:not(.settings-file-label) { color:#343b53; font-weight:600; }
.account-settings-form input, .account-settings-form textarea { border-color:#dce3ed; border-radius:10px; transition:border-color .18s, box-shadow .18s; }
.account-settings-form input:focus, .account-settings-form textarea:focus { border-color:#1976b9; box-shadow:0 0 0 3px rgba(25,118,185,.11); }
.settings-actions .btn-primary { min-height:44px; padding:0 24px; border-radius:10px; background:linear-gradient(100deg,#1476b9,#2754a6); box-shadow:0 5px 14px rgba(20,118,185,.22); font-weight:600; }
.settings-actions .btn-primary:hover { filter:brightness(1.05); transform:translateY(-1px); }
@media (max-width:600px) {
 .settings-cover { min-height:112px; padding:15px 16px; border-radius:14px; }
 .settings-cover img { max-height:82px; }
 .settings-profile-summary { padding:0 8px 18px; margin-top:-20px; }
 .settings-avatar-preview { width:72px; height:72px; }
 .settings-profile-edit { padding:16px; border-radius:13px; }
 .settings-section { border-radius:13px; }
 .settings-section summary { padding:14px; }
 .settings-section-fields { padding:0 14px 16px; }
}


/* Professional student dashboard polish */
#view-student { background: #f7f8fc !important; }
#view-student .sd-sidebar { background: #fff !important; border-right: 1px solid #e8eaf2; box-shadow: 4px 0 24px rgba(34,42,76,.035); padding: 24px 16px !important; }
#view-student .sd-main.content { padding: 36px clamp(22px, 3vw, 48px) 44px !important; background: #f7f8fc; }
#view-student .sd-topbar { margin: 0 0 30px !important; padding: 2px 0 22px; border-bottom: 1px solid #e9ebf3; }
#view-student .sd-greeting { font-family: 'Poppins', sans-serif; font-size: clamp(28px, 2.5vw, 36px) !important; line-height: 1.2; font-weight: 750 !important; letter-spacing: -1.1px; color: #222844 !important; margin: 0 0 9px !important; }
#view-student .sd-subtitle { color: #747d98 !important; font-size: 14px !important; line-height: 1.65; }
#view-student .sd-nav { gap: 7px; }
#view-student .sd-nav .nav-item { border: 0 !important; border-radius: 12px !important; margin: 0 !important; padding: 13px 15px !important; color: #606984 !important; font-weight: 600; transition: background .18s ease, color .18s ease, transform .18s ease; }
#view-student .sd-nav .nav-item:hover { background: #f3f1ff !important; color: #5d4dd0 !important; transform: translateX(2px); }
#view-student .sd-nav .nav-item.active { background: linear-gradient(135deg,#6d5ce7,#5b4bce) !important; color: #fff !important; box-shadow: 0 7px 16px rgba(98,81,214,.2); }
#view-student .sd-nav .nav-item.active .sd-nav-icon { color: #fff !important; }
#view-student .sd-stat-card.stat-card { border: 1px solid #e8eaf3 !important; border-radius: 16px !important; padding: 23px !important; box-shadow: 0 4px 16px rgba(31,42,78,.025) !important; transition: box-shadow .2s ease, border-color .2s ease !important; }
#view-student .sd-stat-card.stat-card:hover { box-shadow: 0 12px 28px rgba(31,42,78,.07) !important; border-color: #d8d3fb !important; }
#view-student .panel:not(#s-dashboard) { border-radius: 16px; }
#view-student .panel-head h2, #view-student #s-dashboard h2 { color: #242943; letter-spacing: -.35px; }
#view-student .sd-sidebar .sd-logo, #view-student .sd-sidebar img { max-width: 100%; height: auto; object-fit: contain; }
@media (max-width: 760px) { #view-student .sd-main.content { padding: 24px 18px 34px !important; } #view-student .sd-topbar { margin-bottom: 22px !important; padding-bottom: 18px; } #view-student .sd-greeting { font-size: 28px !important; } #view-student .sd-sidebar { padding: 12px !important; } }


/* Refined student welcome header and course-section hierarchy */
#view-student .sd-main.content { max-width: none; }
#view-student .sd-topbar {
  position: relative; display: flex; align-items: center; min-height: 154px;
  padding: 28px 34px !important; margin: 0 0 30px !important;
  border: 1px solid #e6e8f3; border-radius: 20px;
  background: linear-gradient(112deg, #ffffff 0%, #fbfaff 62%, #f1efff 100%);
  box-shadow: 0 10px 30px rgba(37, 43, 82, .045); overflow: hidden;
}
#view-student .sd-topbar::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5px;
  background: linear-gradient(180deg, #8274ef, #5b4bce);
}
#view-student .sd-topbar::after {
  content: ""; position: absolute; width: 190px; height: 190px; right: -62px; top: -88px;
  border: 26px solid rgba(108, 93, 211, .055); border-radius: 50%; pointer-events: none;
}
#view-student .sd-topbar > div { position: relative; z-index: 1; }
#view-student .sd-greeting {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(29px, 2.6vw, 37px) !important; line-height: 1.18 !important;
  font-weight: 750 !important; letter-spacing: -1.2px !important; color: #202541 !important;
  margin: 0 0 10px !important;
}
#view-student .sd-subtitle { max-width: 560px; color: #727b96 !important; font-size: 14.5px !important; line-height: 1.75 !important; }
#view-student .panel-head:not(.sd-panel-head-hidden) {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding: 0 0 18px !important; margin: 0 0 22px !important;
  border-bottom: 1px solid #e6e9f2 !important;
}
#view-student .panel-head:not(.sd-panel-head-hidden) h2 {
  position: relative; font-family: 'Poppins', sans-serif;
  font-size: 22px !important; line-height: 1.3; font-weight: 750 !important;
  letter-spacing: -.55px !important; color: #242943 !important; margin: 0 !important;
}
#view-student .panel-head:not(.sd-panel-head-hidden) p {
  margin: 0 !important; color: #7d859e !important; font-size: 13.5px !important; line-height: 1.6;
}
#view-student #s-my .card-list { gap: 14px; }
#view-student #s-my .list-row { border: 1px solid #e9ebf4 !important; border-radius: 14px !important; box-shadow: 0 5px 18px rgba(31,42,78,.035) !important; transition: border-color .18s ease, box-shadow .18s ease; }
#view-student #s-my .list-row:hover { border-color: #d8d2fb !important; box-shadow: 0 10px 24px rgba(31,42,78,.065) !important; }
@media (max-width: 760px) {
  #view-student .sd-topbar { min-height: 132px; padding: 24px 22px !important; border-radius: 16px; }
  #view-student .sd-greeting { font-size: 28px !important; letter-spacing: -.7px !important; }
  #view-student .sd-subtitle { font-size: 13.5px !important; }
  #view-student .panel-head:not(.sd-panel-head-hidden) { align-items: flex-start; flex-direction: column; gap: 5px; }
  #view-student .panel-head:not(.sd-panel-head-hidden) h2 { font-size: 20px !important; }
}



/* Match the Student profile footer spacing to Admin */
#view-student .sd-sidebar {
  padding-left: 20px !important;
  padding-right: 20px !important;
  padding-bottom: 0 !important;
}

#view-student .sd-sidebar-footer {
  gap: 14px;
  padding-top: 18px;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

#view-student .sd-user-mini {
  gap: 10px;
}

#view-student .sd-user-mini .user-chip {
  line-height: 1.3;
  min-width: 0;
}

#view-student .sd-user-mini .user-chip span {
  font-weight: 600;
  line-height: 1.3;
}

#view-student .sd-user-mini .user-chip small {
  line-height: 1.3;
}

#view-student .sd-logout-btn {
  margin-top: 0;
  margin-bottom: 0 !important;
}


/* Help & Support uses the supplied headset icon */
#view-student .sd-nav .sd-help-support-icon { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 18px; }
#view-student .sd-nav .sd-help-support-icon img { width: 18px; height: 18px; object-fit: contain; display: block; }
#view-student .sd-nav .nav-item.active .sd-help-support-icon img { filter: invert(1); }


/* ===== Admin panel visual alignment with Student Dashboard =====
   Design-only overrides for the Admin panel. */
#view-admin.app-shell { background:#F4F6FB; color:#1E1B39; }
#view-admin .sidebar { background:#fff; border-right:1px solid #EEF0F6; padding:26px 20px 14px; }
#view-admin .admin-sidebar-brand { padding:0 8px; margin-bottom:30px; }
#view-admin .admin-sidebar-brand img { max-width:168px; }
#view-admin .nav-item { min-height:44px; border-radius:12px; padding:12px 14px; color:#8B90A8; }
#view-admin .nav-item.active { background:#6C5DD3; color:#fff; box-shadow:0 5px 12px -7px rgba(108,93,211,.65); }
#view-admin .nav-item:focus-visible, #view-admin button:focus-visible { outline:2px solid #6C5DD3; outline-offset:2px; }
#view-admin .content { background:#F4F6FB; padding:34px 42px; }
#view-admin .panel-head { align-items:center; margin-bottom:24px; }
#view-admin .panel-head h2 { font-family: 'Poppins', sans-serif; font-size:22px; font-weight:700; letter-spacing:-.025em; margin:0 0 5px; }
#view-admin .panel-head p { margin:0; line-height:1.55; }
#view-admin .stat-grid { gap:18px; }
#view-admin .stat-card { border-color:#E8E8F1; border-radius:16px; padding:22px; box-shadow:0 8px 22px -18px rgba(30,27,57,.32); transition:border-color .18s ease,box-shadow .18s ease; }
#view-admin .stat-card:hover { box-shadow:0 10px 24px -16px rgba(30,27,57,.28); border-color:#D6D2E8; }
#view-admin .stat-card .num, #view-admin .stat-card .stat-value { line-height:1.15; margin-bottom:7px; }
#view-admin .card-list { gap:14px; }
#view-admin .list-row { border:1px solid #ECEBF4; border-radius:14px; padding:18px 20px; box-shadow:0 8px 22px -18px rgba(30,27,57,.3); transition:border-color .18s ease,box-shadow .18s ease; }
#view-admin .list-row:hover { border-color:#D6D2E8; box-shadow:0 10px 24px -16px rgba(30,27,57,.24); }
#view-admin .list-row-main h3 { font-weight:700; line-height:1.4; }
#view-admin .list-row-main p { line-height:1.55; }
#view-admin .data-table { border-spacing:0 9px; }
#view-admin .data-table thead th { padding:0 14px 4px; font-weight:700; }
#view-admin .data-table tbody tr { box-shadow:0 8px 22px -18px rgba(30,27,57,.3); }
#view-admin .data-table tbody td { padding:14px; }
#view-admin .data-table tbody tr td:first-child { border-radius:12px 0 0 12px; }
#view-admin .data-table tbody tr td:last-child { border-radius:0 12px 12px 0; }
#view-admin .btn-primary { border-radius:10px; padding:11px 16px; box-shadow:0 5px 12px -9px rgba(108,93,211,.7); }
#view-admin .btn-ghost { border-radius:10px; }
#view-admin .admin-sidebar-footer { border-top:1px solid #EEF0F6; padding-top:16px; gap:10px; }
#view-admin .admin-user-mini { gap:10px; }
#view-admin .admin-avatar { width:38px; height:38px; }
#view-admin .admin-sidebar-logout { height:40px; border-radius:10px; }
#view-admin .modal { border-radius:16px; border-top:4px solid #6C5DD3; box-shadow:0 24px 60px -24px rgba(30,27,57,.35); }
#view-admin .modal-head { padding:18px 22px; }
#view-admin .modal-body { gap:14px; }
#view-admin .modal-body input, #view-admin .modal-body select, #view-admin .modal-body textarea { border-color:#E6E4EF; border-radius:9px; background:#fff; }
#view-admin .modal-body input:focus, #view-admin .modal-body select:focus, #view-admin .modal-body textarea:focus { outline:none; border-color:#6C5DD3; box-shadow:0 0 0 3px rgba(108,93,211,.1); }
@media (max-width:900px) {
  #view-admin .content { padding:24px 18px; }
  #view-admin .sidebar { padding:14px 16px; }
  #view-admin .panel-head { margin-bottom:20px; }
}
@media (max-width:560px) {
  #view-admin .stat-grid { grid-template-columns:1fr; }
  #view-admin .panel-head h2 { font-size:20px; }
  #view-admin .list-row { padding:16px; }
}


/* Fix Admin Panel Help & Support icon sizing; keep existing support navigation behavior */
#view-admin .nav-item[data-panel="a-support"] .sd-help-support-icon {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}
#view-admin .nav-item[data-panel="a-support"] .sd-help-support-icon img {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  object-fit: contain !important;
}

/* Make the Help & Support headset icon white when its nav item is active */
#view-admin .nav-item[data-panel="a-support"].active .sd-help-support-icon img,
#view-admin .nav-item[data-panel="a-support"].active .sd-help-support-icon svg {
  filter: brightness(0) invert(1) !important;
}

/* Unread student support messages badge */
#view-admin .nav-item[data-panel="a-support"]{position:relative;}
#view-admin .admin-support-unread-badge{margin-left:auto;min-width:19px;height:19px;padding:0 5px;border-radius:999px;background:#E5484D;color:#fff;font-size:11px;line-height:19px;font-weight:700;text-align:center;box-sizing:border-box;flex:0 0 auto;}
#view-admin .admin-support-unread-badge.hidden{display:none!important;}

/* Professional Admin content header */
#view-admin .content {
  padding: 30px 34px 36px;
  background: #F4F6FB;
}
#view-admin #a-overview > .panel-head,
#view-admin .content > .panel > .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 20px 24px;
  margin: 0 0 24px;
  border: 1px solid #E6EAF2;
  border-radius: 16px;
  background: linear-gradient(115deg, #FFFFFF 0%, #F9FAFF 100%);
  box-shadow: 0 5px 18px rgba(25, 39, 72, 0.045);
  position: relative;
  overflow: hidden;
}
#view-admin #a-overview > .panel-head::before,
#view-admin .content > .panel > .panel-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #7565DE 0%, #4F46B8 100%);
}
#view-admin .content > .panel > .panel-head h2 {
  margin: 0;
  color: #17233F;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: -0.35px;
}
#view-admin .content > .panel > .panel-head p {
  margin: 5px 0 0;
  color: #77829B;
  font-size: 12.5px;
  line-height: 1.5;
}
#view-admin .content > .panel > .panel-head .btn-primary {
  flex-shrink: 0;
  border-radius: 9px;
  box-shadow: 0 4px 10px rgba(108, 93, 211, 0.15);
}
@media (max-width: 700px) {
  #view-admin .content { padding: 18px 14px 24px; }
  #view-admin .content > .panel > .panel-head {
    padding: 17px 18px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}


/* Compact student table rows and polished action menu */
#view-admin #students-body td {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  line-height: 1.35;
}
#view-admin #students-body td small { font-size: 11px; }
#view-admin #students-body tr { height: 52px; }
#view-admin .student-row-actions {
  position: relative; width: 74px; text-align: center; vertical-align: middle !important;
}
#view-admin #students-body td.student-row-actions {
  display: table-cell; vertical-align: middle !important;
}
#view-admin .student-action-trigger {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; height: auto; min-width: 0; min-height: 0;
  padding: 6px; border: 0; border-radius: 6px;
  background: transparent; color: #5F6B85;
  cursor: pointer; vertical-align: middle;
  transition: background .15s, color .15s;
}
#view-admin .student-action-trigger:hover,
#view-admin .student-action-trigger[aria-expanded="true"] {
  color: #5E50C9; background: #F0EDFF;
}
#view-admin .student-action-trigger svg {
  display: block; width: 16px; height: 16px; margin: 0;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
#view-admin .student-action-menu {
  position: absolute; right: 8px; top: calc(100% + 4px); z-index: 100;
  width: 164px; padding: 5px; border: 1px solid #E5E9F2; border-radius: 12px;
  background: #FFFFFF; box-shadow: 0 12px 30px rgba(24,35,63,.16);
}
#view-admin .student-action-menu[hidden] { display: none !important; }
#view-admin .student-action-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 8px; background: transparent;
  color: #26334E; font-size: 12.5px; font-weight: 600; text-align: left; cursor: pointer;
}
#view-admin .student-action-menu button:hover { background: #F4F6FB; }
#view-admin .student-action-menu button.menu-delete { color: #C63743; }
#view-admin .menu-dot { width: 7px; height: 7px; border-radius: 50%; background: #8B93A7; }
#view-admin .menu-dot.approve { background: #16A477; }
#view-admin .menu-dot.block { background: #E9A23B; }
#view-admin .menu-dot.edit { background: #7163D8; }
#view-admin .menu-dot.delete { background: #DC4C55; }


/* Circular progress indicator: full ring = 100%, partial ring = student progress */
#view-admin #students-body td.student-progress-cell {
  vertical-align: middle !important;
}
#view-admin .student-progress-ring {
  width: 42px; height: 42px; position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  vertical-align: middle;
}
#view-admin .student-progress-ring svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transform: rotate(-90deg); overflow: visible;
}
#view-admin .student-progress-ring circle {
  fill: none; stroke-width: 4;
}
#view-admin .student-progress-ring .progress-ring-track {
  stroke: #E7EAF2;
}
#view-admin .student-progress-ring .progress-ring-value {
  stroke: #6B5BD2; stroke-linecap: round;
  transition: stroke-dasharray .25s ease;
}
#view-admin .student-progress-ring span {
  position: relative; z-index: 1; font-size: 10px;
  font-weight: 700; color: #27334F; line-height: 1;
}


/* Refined Enrollment & Signup Requests UI */
#view-admin #a-enrollments > .panel-head {
  margin-bottom: 22px;
}
#view-admin #a-enrollments .request-group {
  margin: 0 0 26px;
  padding: 20px;
  border: 1px solid #E7EAF2;
  border-radius: 17px;
  background: #FFFFFF;
  box-shadow: 0 8px 24px rgba(28, 39, 70, .035);
}
#view-admin #a-enrollments .request-group:last-child {
  margin-bottom: 0;
}
#view-admin #a-enrollments .request-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
  padding-bottom: 15px;
  border-bottom: 1px solid #EEF0F5;
}
#view-admin #a-enrollments .request-group-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
#view-admin #a-enrollments .request-group-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 600;
}
#view-admin #a-enrollments .signup-icon {
  color: #5B50C8;
  background: #F0EEFF;
}
#view-admin #a-enrollments .course-icon {
  color: #087F78;
  background: #E8F7F4;
  font-size: 19px;
}
#view-admin #a-enrollments .request-group-title h3 {
  margin: 0 0 3px;
  color: #202944;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 750;
  letter-spacing: -.15px;
}
#view-admin #a-enrollments .request-group-title p {
  margin: 0;
  color: #8992A8;
  font-size: 12px;
  line-height: 1.45;
}
#view-admin #a-enrollments .request-count {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid #F5E3C4;
  border-radius: 999px;
  background: #FFF8EB;
  color: #A7670B;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}
#view-admin #a-enrollments .request-count.course-count {
  border-color: #DDEBE9;
  background: #F0F8F7;
  color: #267B73;
}
#view-admin #a-enrollments .request-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#view-admin #a-enrollments .request-card-list .list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 17px;
  border: 1px solid #EDF0F5;
  border-radius: 12px;
  background: #FCFCFE;
  box-shadow: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
#view-admin #a-enrollments .request-card-list .list-row:hover {
  border-color: #DAD7F2;
  background: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(35, 42, 75, .045);
}
#view-admin #a-enrollments .list-row-main {
  min-width: 0;
}
#view-admin #a-enrollments .list-row-main h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 5px;
  color: #202944;
  font-size: 14px;
  font-weight: 700;
}
#view-admin #a-enrollments .list-row-main h3 small {
  font-size: 11px !important;
}
#view-admin #a-enrollments .list-row-main p {
  margin: 0;
  color: #7D879E;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
#view-admin #a-enrollments .list-row-actions {
  gap: 8px;
}
#view-admin #a-enrollments .list-row-actions .btn-link {
  min-width: 76px;
  padding: 8px 13px;
  border: 1px solid #DCD8F4;
  border-radius: 8px;
  background: #F7F6FF;
  color: #5B50C8;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  transition: background .18s ease, border-color .18s ease;
}
#view-admin #a-enrollments .list-row-actions .btn-link:hover {
  border-color: #BEB7EE;
  background: #EEECFF;
}
#view-admin #a-enrollments .list-row-actions .btn-link.danger {
  border-color: #F3DEDE;
  background: #FFF8F8;
  color: #C64D52;
}
#view-admin #a-enrollments .list-row-actions .btn-link.danger:hover {
  border-color: #E9BFC1;
  background: #FFF0F0;
}
#view-admin #a-enrollments .request-card-list > p {
  margin: 0;
  padding: 18px 14px;
  border: 1px dashed #DDE2EC;
  border-radius: 11px;
  background: #FAFBFD;
  color: #8A93A8 !important;
  font-size: 12px;
  text-align: center;
}
#view-admin #a-enrollments .badge {
  vertical-align: middle;
}
@media (max-width: 700px) {
  #view-admin #a-enrollments .request-group { padding: 15px; }
  #view-admin #a-enrollments .request-group-head { align-items: flex-start; }
  #view-admin #a-enrollments .request-group-title p { max-width: 220px; }
  #view-admin #a-enrollments .request-card-list .list-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }
  #view-admin #a-enrollments .list-row-actions { width: 100%; }
  #view-admin #a-enrollments .list-row-actions .btn-link { flex: 1; }
}


/* Requested course emphasis and manual admin assignment */
#view-admin #a-enrollments .request-group-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
#view-admin #a-enrollments .assign-course-btn {
  border: 1px solid #D9D4F4;
  border-radius: 9px;
  padding: 8px 13px;
  background: #5B50C8;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
#view-admin #a-enrollments .assign-course-btn:hover {
  background: #4940AD;
  transform: translateY(-1px);
}
#view-admin #a-enrollments .enrollment-course-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 3px;
}
#view-admin #a-enrollments .requested-label {
  color: #8992A8;
  font-size: 11px;
}
#view-admin #a-enrollments .requested-course-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid #DCD8F5;
  border-radius: 7px;
  background: #F2F0FF;
  color: #5146B7;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  text-align: left;
  transition: background .15s ease, border-color .15s ease;
}
#view-admin #a-enrollments .requested-course-chip:hover {
  background: #E8E4FF;
  border-color: #BDB5F0;
}
#view-admin #a-enrollments .requested-course-chip:focus-visible {
  outline: 2px solid #7165D6;
  outline-offset: 2px;
}
#view-admin #a-enrollments .course-chip-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #7165D6;
}
@media (max-width: 700px) {
  #view-admin #a-enrollments .request-group-tools {
    align-items: flex-end;
    flex-direction: column;
  }
}


/* Signup lead contact/delete pill actions */
#view-admin #a-enrollments .signup-lead-row {
  align-items: center;
}
#view-admin #a-enrollments .signup-lead-status {
  display: inline-flex;
  margin-top: 7px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #FFF7E8;
  color: #A56A13;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15px;
}
#view-admin #a-enrollments .signup-lead-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
#view-admin #a-enrollments .signup-phone-pill,
#view-admin #a-enrollments .signup-delete-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
#view-admin #a-enrollments .signup-phone-pill {
  border-color: #CDE9DC;
  background: #ECF8F1;
  color: #18784C;
}
#view-admin #a-enrollments .signup-phone-pill:hover {
  background: #DDF2E6;
}
#view-admin #a-enrollments .signup-phone-pill[aria-disabled="true"] {
  border-color: #E5E7EB;
  background: #F5F6F8;
  color: #9299A8;
  cursor: not-allowed;
}
#view-admin #a-enrollments .signup-delete-pill {
  border-color: #F0D5D7;
  background: #FFF4F4;
  color: #B83F48;
}
#view-admin #a-enrollments .signup-delete-pill:hover {
  background: #FDE8E9;
}
@media (max-width: 700px) {
  #view-admin #a-enrollments .signup-lead-actions {
    width: 100%;
    justify-content: flex-start;
  }
}



/* =========================================================
   ENTERPRISE RESPONSIVE SYSTEM — Student / Admin / Admin
   UI-only overrides. Existing IDs, workflows and JS untouched.
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
img, video, canvas, iframe { max-width: 100%; }
button, input, select, textarea { max-width: 100%; }

/* Large laptop / compact desktop */
@media (max-width: 1200px) {
  #view-student .sd-main.content,
  #view-admin .content { padding-left: 26px !important; padding-right: 26px !important; }
  #view-admin .sidebar { width: 228px; }
  #view-student .sd-sidebar { width: 228px; }
  #view-admin .stat-grid,
  #view-student .stat-grid { gap: 14px; }
}

/* Tablet */
@media (max-width: 900px) {
  #view-student.sd-shell,
  #view-admin.app-shell {
    width: 100%; height: auto !important; min-height: 100vh !important;
    max-height: none !important; overflow: visible !important;
  }
  #view-student .sd-layout,
  #view-admin .layout {
    width: 100%; height: auto !important; min-height: 100vh !important;
    overflow: visible !important; flex-direction: column !important;
  }

  #view-student .sd-sidebar,
  #view-admin .sidebar {
    position: sticky; top: 0; z-index: 80;
    width: 100% !important; height: auto !important; min-height: 0 !important;
    max-height: none !important; flex: 0 0 auto !important;
    display: flex !important; flex-direction: row !important;
    align-items: center !important; gap: 10px !important;
    overflow-x: auto !important; overflow-y: hidden !important;
    padding: 10px 14px !important;
    border-right: 0 !important; border-bottom: 1px solid #E9ECF3 !important;
    box-shadow: 0 4px 16px rgba(25,35,65,.06) !important;
    scrollbar-width: thin; -webkit-overflow-scrolling: touch;
    background: rgba(255,255,255,.97) !important;
  }
  #view-student .sd-brand { flex: 0 0 auto; margin: 0 12px 0 0 !important; }
  #view-student .sd-nav,
  #view-admin .sidebar nav {
    display: flex !important; flex-direction: row !important;
    align-items: center !important; gap: 6px !important;
    min-width: max-content; overflow: visible !important;
  }
  #view-student .sd-sidebar-footer,
  #view-admin .admin-sidebar-footer {
    display: flex !important; flex: 0 0 auto !important;
    flex-direction: row !important; align-items: center !important;
    gap: 8px !important; margin: 0 0 0 auto !important;
    padding: 0 !important; border: 0 !important;
    background: transparent !important;
  }
  #view-student .sd-user-mini { display: none !important; }
  #view-student .sd-nav .nav-item,
  #view-admin .sidebar .nav-item {
    flex: 0 0 auto !important; width: auto !important;
    min-height: 40px; padding: 9px 12px !important;
    white-space: nowrap !important; border-radius: 9px !important;
  }
  #view-student .sd-main.content,
  #view-admin .content {
    width: 100% !important; max-width: 100% !important;
    height: auto !important; min-height: calc(100vh - 64px) !important;
    overflow: visible !important; padding: 26px 22px 40px !important;
  }
  #view-admin .sidebar::before { display: none !important; }
  #view-admin .stat-grid,
  #view-student .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
}

/* Mobile */
@media (max-width: 600px) {
  body { font-size: 14px; }
  #view-student .sd-sidebar,
  #view-admin .sidebar {
    position: sticky; top: 0; padding: 8px 10px !important;
    gap: 8px !important;
  }
  #view-student .sd-brand { margin-right: 4px !important; }
  #view-student .sd-brand-logo-img { max-width: 34px; max-height: 34px; }
  #view-student .sd-nav,
  #view-admin .sidebar nav { gap: 5px !important; }
  #view-student .sd-nav .nav-item,
  #view-admin .sidebar .nav-item {
    min-height: 38px; padding: 8px 10px !important;
    font-size: 11px !important; gap: 6px !important;
  }
  #view-student .sd-sidebar-footer,
  #view-admin .admin-sidebar-footer { gap: 5px !important; }
  #view-student .sd-sidebar-footer button,
  #view-admin .admin-sidebar-footer button,
  #view-student .sd-sidebar-footer .btn,
  #view-admin .admin-sidebar-footer .btn {
    min-height: 36px; padding: 7px 10px !important;
    font-size: 11px !important; white-space: nowrap;
  }

  #view-student .sd-main.content,
  #view-admin .content { padding: 19px 13px 30px !important; }
  #view-student .sd-topbar {
    align-items: flex-start !important; flex-direction: column !important;
    gap: 12px !important; margin-bottom: 20px !important;
  }
  #view-student .sd-greeting { font-size: 25px !important; }
  #view-student .sd-subtitle { font-size: 12px !important; }

  #view-admin .panel-head,
  #view-student .panel-head {
    align-items: flex-start !important; flex-direction: column !important;
    gap: 11px !important; margin-bottom: 17px !important;
  }
  #view-admin .panel-head h2,
  #view-student .panel-head h2 { font-size: 19px !important; }
  #view-admin .stat-grid,
  #view-student .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 10px !important; }
  #view-admin .stat-card,
  #view-student .stat-card { min-width: 0 !important; padding: 13px !important; }
  #view-admin .stat-card .num,
  #view-student .stat-card .num { font-size: clamp(20px,6vw,27px) !important; }
  #view-admin .panel,
  #view-student .panel,
  #view-student .sd-card { min-width: 0; max-width: 100%; }

  /* Tables remain readable and scroll inside their own region */
  #view-admin table,
  #view-student table,
  #view-admin .data-table,
  #view-student .data-table { min-width: 620px; }
  #view-admin .content table,
  #view-student .sd-main table { max-width: none; }
  #view-admin .content table:not(.no-scroll),
  #view-student .sd-main table:not(.no-scroll) { display: table; }
  #view-admin .content .table-container,
  #view-admin .content .table-wrap,
  #view-admin .content .table-responsive,
  #view-student .sd-main .table-container,
  #view-student .sd-main .table-wrap,
  #view-student .sd-main .table-responsive {
    width: 100%; max-width: 100%; overflow-x: auto !important;
    -webkit-overflow-scrolling: touch; border-radius: 10px;
  }
  #view-admin #students-body td { white-space: nowrap; }

  /* Enrollment cards and list rows */
  #view-admin #a-enrollments .request-group { padding: 13px !important; border-radius: 13px; }
  #view-admin #a-enrollments .request-group-head {
    flex-wrap: wrap; gap: 10px !important; align-items: center !important;
  }
  #view-admin #a-enrollments .request-group-title { gap: 9px; }
  #view-admin #a-enrollments .request-group-title h3 { font-size: 13px; }
  #view-admin #a-enrollments .request-group-title p { font-size: 11px; max-width: 190px; }
  #view-admin #a-enrollments .request-card-list .list-row {
    width: 100%; min-width: 0; padding: 12px !important;
    border-radius: 11px; gap: 10px !important;
  }
  #view-admin #a-enrollments .list-row-main { width: 100%; }
  #view-admin #a-enrollments .list-row-main h3 { font-size: 13px; }
  #view-admin #a-enrollments .list-row-main p { font-size: 11px; overflow-wrap: anywhere; }
  #view-admin #a-enrollments .list-row-actions {
    width: 100% !important; align-items: stretch !important;
    flex-direction: column !important;
  }
  #view-admin #a-enrollments .list-row-actions > div {
    width: 100%; display: flex; gap: 8px;
  }
  #view-admin #a-enrollments .list-row-actions .btn-link {
    min-width: 0; flex: 1; min-height: 38px;
  }
  #view-admin #a-enrollments .signup-lead-actions {
    width: 100%; flex-wrap: wrap; justify-content: flex-start;
  }
  #view-admin #a-enrollments .signup-phone-pill,
  #view-admin #a-enrollments .signup-delete-pill { min-height: 36px; }

  /* Course cards / content grids */
  #view-student .course-grid,
  #view-student .courses-grid,
  #view-admin .course-grid,
  #view-admin .courses-grid { grid-template-columns: minmax(0,1fr) !important; }
  #view-student .course-card,
  #view-admin .course-card { min-width: 0; }
  #view-student .sd-main .grid,
  #view-admin .content .grid { min-width: 0; }

  /* Forms and controls */
  #view-admin input, #view-admin select, #view-admin textarea,
  #view-student input, #view-student select, #view-student textarea {
    width: 100%; min-width: 0; font-size: 16px !important;
  }
  #view-admin .form-row,
  #view-student .form-row { grid-template-columns: minmax(0,1fr) !important; }
  #view-admin .form-actions,
  #view-student .form-actions { flex-wrap: wrap; }
  #view-admin .form-actions button,
  #view-student .form-actions button { flex: 1 1 auto; min-height: 42px; }

  /* Modal fits small phone viewport */
  .modal, .modal-dialog, .modal-content {
    max-width: calc(100vw - 24px) !important;
  }
  .modal, .modal-dialog { max-height: calc(100dvh - 24px) !important; }
  .modal-content { overflow-y: auto !important; }
  .modal-backdrop, .modal-overlay { padding: 12px !important; }

  /* Floating contact widget and global footer */
  #view-student .contact-fab { right: 14px !important; bottom: 52px !important; }
  .gp-media-global-footer { font-size: 10px !important; padding-left: 8px !important; padding-right: 8px !important; }
}

/* Very narrow phones */
@media (max-width: 380px) {
  #view-admin .content,
  #view-student .sd-main.content { padding-left: 10px !important; padding-right: 10px !important; }
  #view-admin .stat-grid,
  #view-student .stat-grid { grid-template-columns: minmax(0,1fr) !important; }
  #view-student .sd-greeting { font-size: 22px !important; }
  #view-student .sd-nav .nav-item,
  #view-admin .sidebar .nav-item { padding: 7px 8px !important; font-size: 10px !important; }
}

/* Landscape phone: avoid oversized fixed panels */
@media (max-width: 900px) and (orientation: landscape) {
  #view-student .sd-sidebar,
  #view-admin .sidebar { position: relative; }
}


/* ===== Mobile off-canvas navigation drawer ===== */
.mobile-sidebar-toggle, .mobile-sidebar-backdrop { display:none; }
@media (max-width: 900px) {
  #view-student .sd-layout, #view-admin .layout { position:relative !important; display:block !important; }
  #view-student .sd-sidebar, #view-admin .sidebar {
    position:fixed !important; top:0 !important; left:0 !important; bottom:0 !important;
    width:min(290px, 84vw) !important; height:100dvh !important; max-height:100dvh !important;
    min-height:100dvh !important; z-index:1002 !important; display:flex !important;
    flex-direction:column !important; align-items:stretch !important; justify-content:flex-start !important;
    gap:14px !important; padding:24px 18px !important; overflow-x:hidden !important;
    overflow-y:auto !important; border:0 !important; border-right:1px solid #e8eaf2 !important;
    box-shadow:12px 0 38px rgba(20,28,55,.16) !important; background:#fff !important;
    transform:translateX(-110%); transition:transform .28s cubic-bezier(.2,.8,.2,1) !important;
    visibility:hidden;
  }
  #view-student.mobile-sidebar-open .sd-sidebar,
  #view-admin.mobile-sidebar-open .sidebar { transform:translateX(0); visibility:visible; }
  #view-student .sd-brand { display:flex !important; margin:0 0 14px !important; }
  #view-student .sd-brand-logo-img { max-width:168px !important; max-height:none !important; }
  #view-student .sd-nav, #view-admin .sidebar nav {
    display:flex !important; flex-direction:column !important; align-items:stretch !important;
    min-width:0 !important; width:100% !important; gap:6px !important;
  }
  #view-student .sd-nav .nav-item, #view-admin .sidebar .nav-item {
    width:100% !important; flex:0 0 auto !important; justify-content:flex-start !important;
    min-height:46px !important; padding:12px 14px !important; font-size:14px !important;
    white-space:normal !important; text-align:left !important;
  }
  #view-student .sd-sidebar-footer, #view-admin .admin-sidebar-footer {
    display:flex !important; flex-direction:column !important; align-items:stretch !important;
    width:100% !important; margin: auto 0 0 !important; padding-top:16px !important;
    border-top:1px solid #eef0f6 !important; gap:12px !important;
  }
  #view-student .sd-user-mini { display:flex !important; }
  #view-student .sd-sidebar-footer button, #view-admin .admin-sidebar-footer button {
    width:100% !important; min-height:42px !important; font-size:13px !important;
  }
  #view-admin .admin-sidebar-brand { display:flex !important; margin:0 0 14px !important; }
  .mobile-sidebar-toggle {
    display:flex !important; position:fixed; top:14px; left:14px; z-index:1001;
    width:44px; height:44px; border:1px solid #e6e8f0; border-radius:12px;
    background:#fff; color:#25243a; align-items:center; justify-content:center;
    box-shadow:0 4px 16px rgba(25,35,65,.12); cursor:pointer;
  }
  .mobile-sidebar-toggle svg { width:22px; height:22px; }
  .mobile-sidebar-backdrop {
    display:block; position:fixed; inset:0; z-index:1000; background:rgba(16,22,42,.42);
    opacity:0; visibility:hidden; transition:opacity .25s ease, visibility .25s ease;
  }
  #view-student.mobile-sidebar-open .mobile-sidebar-backdrop,
  #view-admin.mobile-sidebar-open .mobile-sidebar-backdrop { opacity:1; visibility:visible; }
  #view-student .sd-main.content, #view-admin .content {
    width:100% !important; max-width:100% !important; min-height:100vh !important;
    padding-top:76px !important; margin:0 !important;
  }
  #view-student .sd-topbar { padding-left:0 !important; }
}
@media (min-width: 901px) {
  .mobile-sidebar-toggle, .mobile-sidebar-backdrop { display:none !important; }
}

/* ===== Final mobile repair: restore page scrolling + true off-canvas drawer ===== */
@media (max-width: 900px) {
  html, body {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  body {
    position: relative !important;
    display: block !important;
    padding-bottom: 42px !important;
  }
  #view-student.sd-shell,
  #view-admin.app-shell {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100dvh !important;
    max-height: none !important;
    overflow: visible !important;
  }
  #view-student .sd-layout,
  #view-admin .layout {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100dvh !important;
    max-height: none !important;
    overflow: visible !important;
  }
  #view-student .sd-main.content,
  #view-admin .content {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: calc(100dvh - 58px) !important;
    max-height: none !important;
    overflow: visible !important;
    overscroll-behavior: auto !important;
    padding: 76px 16px 42px !important;
  }
  #view-student .sd-sidebar,
  #view-admin .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: min(300px, 86vw) !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 22px 16px 18px !important;
    z-index: 10002 !important;
    transform: translate3d(-105%, 0, 0);
    visibility: hidden;
    transition: transform .28s ease, visibility .28s ease !important;
  }
  #view-student.mobile-sidebar-open .sd-sidebar,
  #view-admin.mobile-sidebar-open .sidebar {
    transform: translate3d(0, 0, 0) !important;
    visibility: visible !important;
  }
  #view-student .sd-nav,
  #view-admin .sidebar nav {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    gap: 5px !important;
  }
  #view-student .sd-nav .nav-item,
  #view-admin .sidebar .nav-item {
    display: flex !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 46px !important;
    white-space: normal !important;
    text-align: left !important;
    font-size: 13px !important;
    padding: 11px 12px !important;
  }
  #view-student .sd-sidebar-footer,
  #view-admin .admin-sidebar-footer {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    margin: auto 0 0 !important;
    padding-top: 14px !important;
    gap: 9px !important;
  }
  #view-student .sd-user-mini { display: flex !important; }
  .mobile-sidebar-toggle {
    display: flex !important;
    position: fixed !important;
    top: max(10px, env(safe-area-inset-top)) !important;
    left: max(10px, env(safe-area-inset-left)) !important;
    z-index: 10004 !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 4px 18px rgba(20,28,55,.16) !important;
  }
  .mobile-sidebar-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 10001 !important;
    background: rgba(13,20,38,.48) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  #view-student.mobile-sidebar-open .mobile-sidebar-backdrop,
  #view-admin.mobile-sidebar-open .mobile-sidebar-backdrop {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  #view-student .sd-topbar {
    padding-left: 54px !important;
    min-width: 0 !important;
  }
  #view-admin .content > :first-child {
    scroll-margin-top: 12px;
  }
  #view-admin .stat-grid,
  #view-student .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #view-admin .panel,
  #view-student .panel,
  #view-student .sd-card,
  #view-admin .stat-card,
  #view-student .stat-card {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  #view-admin .content > *,
  #view-student .sd-main.content > * {
    max-width: 100%;
  }
}
@media (max-width: 480px) {
  #view-student .sd-main.content,
  #view-admin .content { padding: 70px 12px 34px !important; }
  #view-student .sd-topbar { padding-left: 52px !important; }
  #view-admin .stat-grid,
  #view-student .stat-grid { gap: 9px !important; }
  #view-admin .stat-card,
  #view-student .stat-card { padding: 12px !important; }
  #view-admin .panel,
  #view-student .panel { padding: 13px !important; }
}


/* Student drawer footer alignment repair */
@media (max-width: 900px) {
  #view-student .sd-sidebar {
    box-sizing: border-box !important;
    padding: 20px 16px max(18px, env(safe-area-inset-bottom)) !important;
  }
  #view-student .sd-sidebar-footer {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    margin-top: auto !important;
    padding-top: 16px !important;
    gap: 12px !important;
    overflow: visible !important;
  }
  #view-student .sd-user-mini {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    overflow: visible !important;
  }
  #view-student .sd-user-mini .sd-avatar {
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
  }
  #view-student .sd-user-mini .user-chip {
    display: flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 100px) !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    overflow: hidden !important;
    line-height: 1.35 !important;
  }
  #view-student .sd-user-mini .user-chip span,
  #view-student .sd-user-mini .user-chip small {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  #view-student .sd-user-mini .account-settings-btn {
    box-sizing: border-box !important;
    display: inline-flex !important;
    position: static !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    flex: 0 0 40px !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    border: 1px solid #E6E4EF !important;
    border-radius: 50% !important;
    background: #fff !important;
    align-items: center !important;
    justify-content: center !important;
    transform: none !important;
    box-shadow: none !important;
  }
  #view-student .sd-user-mini .account-settings-btn svg {
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px !important;
  }
  #view-student .sd-sidebar-footer .sd-logout-btn {
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 42px !important;
    flex: 0 0 auto !important;
  }
}



/* ===== FINAL MOBILE RESPONSIVE REBUILD ===== */
/* Keep authentication isolated from dashboard navigation. */
#view-auth.hidden, #view-student.hidden, #view-admin.hidden, #view-quiz.hidden { display:none !important; }
.mobile-sidebar-toggle, .mobile-sidebar-backdrop { display:none !important; }
@media (max-width: 900px) {
  html, body { width:100%; min-height:100%; overflow-x:hidden !important; }
  body { overflow-y:auto !important; }
  #view-auth:not(.hidden) {
    min-height:100svh !important; height:auto !important; padding:20px 14px 28px !important;
    display:flex !important; align-items:flex-start !important; justify-content:center !important;
  }
  #view-auth .auth-card {
    width:100% !important; max-width:560px !important; margin:20px auto !important;
    display:flex !important; flex-direction:column !important; overflow:hidden !important;
  }
  #view-auth .auth-brand { width:100% !important; padding:30px 24px !important; }
  #view-auth .auth-brand h1 { font-size:clamp(25px,7vw,36px) !important; }
  #view-auth .brand-logo-box { max-width:100% !important; padding:12px !important; }
  #view-auth .brand-logo-img { width:100% !important; max-width:300px !important; }
  #view-auth .tagline { font-size:15px !important; margin-bottom:18px !important; }
  #view-auth .brand-points li { font-size:13px !important; }
  #view-auth .auth-panel { width:100% !important; padding:26px 24px 30px !important; }

  /* Dashboard shells use normal document scrolling. */
  #view-student:not(.hidden), #view-admin:not(.hidden) {
    display:block !important; width:100% !important; min-height:100svh !important;
    height:auto !important; max-height:none !important; overflow:visible !important;
  }
  #view-student .sd-layout, #view-admin .layout {
    display:block !important; position:relative !important; width:100% !important;
    min-height:100svh !important; height:auto !important; overflow:visible !important;
  }
  #view-student .sd-main.content, #view-admin .content {
    display:block !important; width:100% !important; max-width:100% !important;
    min-height:100svh !important; height:auto !important; overflow:visible !important;
    padding:76px 16px 36px !important; margin:0 !important;
  }

  /* Off-canvas drawer: hidden until the user opens it. */
  #view-student:not(.hidden) .sd-sidebar,
  #view-admin:not(.hidden) .sidebar {
    position:fixed !important; inset:0 auto 0 0 !important;
    width:min(310px,86vw) !important; height:100vh !important; height:100dvh !important;
    max-height:100dvh !important; min-height:0 !important; z-index:1202 !important;
    display:flex !important; flex-direction:column !important; align-items:stretch !important;
    justify-content:flex-start !important; gap:12px !important; padding:22px 16px 16px !important;
    margin:0 !important; overflow-x:hidden !important; overflow-y:auto !important;
    background:#fff !important; border:0 !important; border-right:1px solid #e8eaf2 !important;
    box-shadow:12px 0 36px rgba(20,28,55,.16) !important;
    transform:translateX(-110%) !important; visibility:hidden !important;
    transition:transform .25s ease, visibility .25s ease !important;
  }
  #view-student.mobile-sidebar-open .sd-sidebar,
  #view-admin.mobile-sidebar-open .sidebar {
    transform:translateX(0) !important; visibility:visible !important;
  }
  #view-student .sd-brand, #view-admin .admin-sidebar-brand {
    display:flex !important; flex:0 0 auto !important; width:100% !important;
    align-items:center !important; margin:0 0 10px !important; padding:0 !important;
  }
  #view-student .sd-brand-logo-img { display:block !important; width:auto !important; max-width:190px !important; max-height:54px !important; }
  #view-admin .sidebar::before { display:none !important; }
  #view-student .sd-nav, #view-admin .sidebar nav {
    display:flex !important; flex:1 0 auto !important; flex-direction:column !important;
    align-items:stretch !important; width:100% !important; min-width:0 !important;
    gap:5px !important; overflow:visible !important;
  }
  #view-student .sd-nav .nav-item, #view-admin .sidebar .nav-item {
    display:flex !important; flex:0 0 auto !important; width:100% !important;
    min-height:44px !important; align-items:center !important; justify-content:flex-start !important;
    padding:11px 13px !important; border-radius:10px !important; font-size:13.5px !important;
    white-space:normal !important; text-align:left !important;
  }
  #view-student .sd-sidebar-footer, #view-admin .admin-sidebar-footer {
    display:flex !important; flex:0 0 auto !important; flex-direction:column !important;
    align-items:stretch !important; width:100% !important; gap:10px !important;
    margin:auto 0 0 !important; padding:15px 0 0 !important;
    border-top:1px solid #eef0f6 !important; background:#fff !important;
  }
  #view-student .sd-user-mini { display:flex !important; width:100% !important; }
  #view-student .sd-sidebar-footer button, #view-admin .admin-sidebar-footer button {
    width:100% !important; min-height:42px !important; white-space:normal !important;
  }

  /* Hamburger and backdrop exist only inside an active dashboard shell. */
  #view-student:not(.hidden) .mobile-sidebar-toggle,
  #view-admin:not(.hidden) .mobile-sidebar-toggle {
    display:flex !important; position:fixed !important; top:12px !important; left:12px !important;
    z-index:1204 !important; width:46px !important; height:46px !important;
    align-items:center !important; justify-content:center !important; border:1px solid #e5e7ef !important;
    border-radius:13px !important; background:#fff !important; color:#25243a !important;
    box-shadow:0 4px 16px rgba(25,35,65,.14) !important; cursor:pointer !important;
  }
  #view-student:not(.hidden) .mobile-sidebar-backdrop,
  #view-admin:not(.hidden) .mobile-sidebar-backdrop {
    display:block !important; position:fixed !important; inset:0 !important; z-index:1201 !important;
    background:rgba(16,22,42,.45) !important; opacity:0 !important; visibility:hidden !important;
    transition:opacity .2s ease, visibility .2s ease !important;
  }
  #view-student.mobile-sidebar-open .mobile-sidebar-backdrop,
  #view-admin.mobile-sidebar-open .mobile-sidebar-backdrop { opacity:1 !important; visibility:visible !important; }
  #view-student .sd-stats.stat-grid, #view-admin .stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  #view-student .sd-main .panel, #view-admin .content .panel { min-width:0 !important; max-width:100% !important; }
  #view-student .cv-layout { display:flex !important; flex-direction:column !important; }
  #view-student .cv-side { width:100% !important; }
  #view-admin .panel-head, #view-student .panel-head { flex-wrap:wrap !important; }
  #view-admin .content .table-wrap, #view-admin .content .table-responsive,
  #view-admin .content .table-container, #view-student .sd-main .table-wrap,
  #view-student .sd-main .table-responsive, #view-student .sd-main .table-container {
    max-width:100% !important; overflow-x:auto !important; -webkit-overflow-scrolling:touch !important;
  }
}
@media (max-width: 480px) {
  #view-auth:not(.hidden) { padding:10px 10px 24px !important; }
  #view-auth .auth-card { margin:10px auto !important; border-radius:12px !important; }
  #view-auth .auth-brand { padding:24px 20px !important; }
  #view-auth .auth-panel { padding:22px 20px 26px !important; }
  #view-student .sd-main.content, #view-admin .content { padding:72px 13px 30px !important; }
  #view-student .sd-stats.stat-grid, #view-admin .stat-grid { gap:10px !important; }
  #view-student .sd-stat-card.stat-card, #view-admin .stat-card { min-width:0 !important; padding:14px !important; }
  #view-student .sd-stat-value.stat-value, #view-admin .stat-card .num { font-size:24px !important; }
  #view-student .sd-greeting { font-size:23px !important; }
}
@media (min-width: 901px) {
  #view-student .mobile-sidebar-toggle, #view-admin .mobile-sidebar-toggle,
  #view-student .mobile-sidebar-backdrop, #view-admin .mobile-sidebar-backdrop { display:none !important; }
  #view-student .sd-sidebar, #view-admin .sidebar {
    position:relative !important; transform:none !important; visibility:visible !important;
    height:auto !important; min-height:100vh !important; max-height:none !important;
  }
}


/* V4 mobile drawer/footer correction:
   keep the copyright strip behind the open drawer and make the drawer's
   profile + logout area reachable by scrolling. */
@media (max-width: 900px) {
  .gp-media-global-footer {
    z-index: 20 !important;
  }

  #view-student.mobile-sidebar-open .sd-sidebar,
  #view-admin.mobile-sidebar-open .sidebar {
    z-index: 1202 !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    bottom: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding-bottom: max(18px, env(safe-area-inset-bottom)) !important;
  }

  #view-student .sd-sidebar-footer,
  #view-admin .admin-sidebar-footer {
    position: relative !important;
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    width: 100% !important;
    margin-top: auto !important;
    padding: 15px 0 max(12px, env(safe-area-inset-bottom)) !important;
    gap: 10px !important;
    border-top: 1px solid #EEF0F6 !important;
    background: #fff !important;
  }

  #view-student .sd-sidebar-footer .sd-logout-btn,
  #view-admin .admin-sidebar-footer .admin-sidebar-logout {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    width: 100% !important;
    min-height: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
    margin: 0 !important;
    align-items: center !important;
    justify-content: center !important;
  }
}


/* V5: Admin + Admin mobile drawer logout visibility */
@media (max-width: 900px) {
  #view-admin:not(.hidden) .sidebar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 22px 16px max(18px, env(safe-area-inset-bottom)) !important;
  }

  #view-admin .sidebar > .nav-item {
    flex: 0 0 auto !important;
  }

  #view-admin .admin-sidebar-footer {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-height: max-content !important;
    margin: auto 0 0 !important;
    padding: 16px 0 8px !important;
    gap: 10px !important;
    border-top: 1px solid #EEF0F6 !important;
    background: #fff !important;
    position: relative !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  #view-admin .admin-sidebar-footer .admin-user-mini {
    display: flex !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 42px !important;
    align-items: center !important;
  }

  #view-admin .admin-sidebar-footer .admin-sidebar-logout,
  #view-admin #admin-logout-sidebar {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    inset: auto !important;
    flex: 0 0 44px !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #E6E4EF !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #1E1B39 !important;
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
  }

  #view-admin #admin-logout-sidebar span {
    display: inline !important;
    margin-right: 7px !important;
  }

  #view-admin .admin-sidebar-footer .account-settings-btn {
    display: flex !important;
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    margin-left: auto !important;
  }
}


/* V6: Match Admin logout button to Student logout button */
@media (max-width: 900px) {
  #view-admin .admin-sidebar-footer .admin-sidebar-logout,
  #view-admin #admin-logout-sidebar {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    flex: 0 0 42px !important;
    padding: 0 14px !important;
    border: 1px solid #EEF0F6 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #1E1B39 !important;
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    text-align: center !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    box-shadow: none !important;
  }

  #view-admin .admin-sidebar-footer .admin-sidebar-logout:hover,
  #view-admin #admin-logout-sidebar:hover {
    border-color: #6C5DD3 !important;
    color: #6C5DD3 !important;
    background: #fff !important;
  }
}


/* V7: Desktop/web layout preservation — apply the logout styling changes only on mobile */
@media (min-width: 901px) {
  #view-admin .sidebar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #view-admin .admin-sidebar-footer {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    margin: auto 0 0 !important;
    padding: 18px 0 0 !important;
    gap: 14px !important;
    border-top: 1px solid #EEF0F6 !important;
    background: transparent !important;
  }

  #view-admin .admin-sidebar-logout,
  #view-admin #admin-logout-sidebar {
    display: flex !important;
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    flex: 0 0 40px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    border: 1px solid #E6E4EF !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #1E1B39 !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
  }

  #view-admin .admin-sidebar-logout span,
  #view-admin #admin-logout-sidebar span {
    display: inline !important;
    margin: 0 !important;
  }
}

/* Mobile only: text-only logout, matching the Student panel */
@media (max-width: 900px) {
  #view-admin .admin-sidebar-logout span,
  #view-admin #admin-logout-sidebar span {
    display: none !important;
  }
}


/* V8: Desktop footer must not cover the sidebar account/logout controls */
@media (min-width: 901px) {
  #view-student .sd-sidebar,
  #view-admin .sidebar {
    box-sizing: border-box !important;
    padding-bottom: 54px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-gutter: stable;
  }

  #view-student .sd-sidebar-footer,
  #view-admin .admin-sidebar-footer {
    flex: 0 0 auto !important;
    margin-top: auto !important;
    padding-bottom: 10px !important;
    background: #fff !important;
  }

  #view-student .sd-sidebar-footer .sd-logout-btn,
  #view-admin .admin-sidebar-footer .admin-sidebar-logout {
    flex: 0 0 40px !important;
    min-height: 40px !important;
    margin-bottom: 0 !important;
  }
}


/* V9: align the desktop logout icon horizontally with its label */
@media (min-width: 901px) {
  #view-admin .admin-sidebar-logout,
  #view-admin #admin-logout-sidebar {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    vertical-align: middle !important;
  }

  #view-admin .admin-sidebar-logout span,
  #view-admin #admin-logout-sidebar span {
    display: inline-flex !important;
    position: static !important;
    float: none !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;
    margin: 0 6px 0 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    font-size: 14px !important;
    transform: none !important;
    vertical-align: middle !important;
  }
}


/* V10: no logout icon on Admin or Admin web/desktop view */
@media (min-width: 901px) {
  #view-admin .admin-sidebar-logout span,
  #view-admin #admin-logout-sidebar span {
    display: none !important;
  }

  #view-admin .admin-sidebar-logout,
  #view-admin #admin-logout-sidebar {
    justify-content: center !important;
    gap: 0 !important;
  }
}


/* V11: reduce excess space between Admin logout and copyright footer */
@media (min-width: 901px) {
  #view-admin .sidebar {
    padding-bottom: 8px !important;
  }

  #view-admin .admin-sidebar-footer {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    gap: 8px !important;
  }

  #view-admin .admin-sidebar-logout,
  #view-admin #admin-logout-sidebar {
    margin-bottom: 0 !important;
  }
}


/* V12: consistent desktop logout position across Student, Admin */
@media (min-width: 901px) {
  #view-student .sd-sidebar,
  #view-admin .sidebar {
    padding-bottom: 0 !important;
  }

  #view-student .sd-sidebar-footer,
  #view-admin .admin-sidebar-footer {
    margin-top: auto !important;
    padding-bottom: 10px !important;
    gap: 8px !important;
  }

  #view-student .sd-sidebar-footer .sd-logout-btn,
  #view-admin .admin-sidebar-footer .admin-sidebar-logout,
  #view-admin #admin-logout-sidebar {
    margin-bottom: 0 !important;
    transform: translateY(-4px) !important;
  }
}


/* V13: reserve space above the fixed copyright bar so sidebar logout is not covered */
@media (min-width: 901px) {
  #view-student .sd-sidebar,
  #view-admin .sidebar {
    box-sizing: border-box !important;
    padding-bottom: 46px !important;
  }

  #view-student .sd-sidebar-footer,
  #view-admin .admin-sidebar-footer {
    margin-top: auto !important;
    padding-bottom: 8px !important;
    transform: none !important;
  }

  #view-student .sd-sidebar-footer .sd-logout-btn,
  #view-admin .admin-sidebar-footer .admin-sidebar-logout,
  #view-admin #admin-logout-sidebar {
    transform: none !important;
    margin-bottom: 0 !important;
  }
}


/* V14: keep the complete sidebar footer above the fixed copyright bar in every panel */
@media (min-width: 901px) {
  #view-student .sd-layout,
  #view-admin .layout {
    align-items: flex-start !important;
  }

  #view-student .sd-sidebar,
  #view-admin .sidebar {
    height: calc(100vh - 42px) !important;
    min-height: 0 !important;
    max-height: calc(100vh - 42px) !important;
    box-sizing: border-box !important;
    align-self: flex-start !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding-bottom: 8px !important;
  }

  #view-student .sd-sidebar-footer,
  #view-admin .admin-sidebar-footer {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    background: #fff !important;
  }

  #view-student .sd-sidebar-footer .sd-logout-btn,
  #view-admin .admin-sidebar-footer .admin-sidebar-logout,
  #view-admin #admin-logout-sidebar {
    display: flex !important;
    flex: 0 0 40px !important;
    width: 100% !important;
    min-height: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    transform: none !important;
    align-items: center !important;
    justify-content: center !important;
  }
}



/* V16: extend desktop sidebars to the bottom of the viewport.
   The copyright bar starts after the sidebar, so it must not shorten the sidebar height. */
@media (min-width: 901px) {
  #view-student .sd-sidebar,
  #view-admin .sidebar {
    height: calc(100vh - 12px) !important;
    min-height: calc(100vh - 12px) !important;
    max-height: calc(100vh - 12px) !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding-bottom: 12px !important;
  }

  #view-student .sd-sidebar-footer,
  #view-admin .admin-sidebar-footer {
    position: relative !important;
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    margin: auto 0 0 !important;
    padding: 12px 0 0 !important;
    gap: 10px !important;
    border-top: 1px solid #EEF0F6 !important;
    background: #fff !important;
    transform: none !important;
  }

  #view-student .sd-sidebar-footer .sd-user-mini,
  #view-admin .admin-sidebar-footer .admin-user-mini {
    display: flex !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 28px !important;
    align-items: center !important;
  }

  #view-student .sd-sidebar-footer .sd-logout-btn,
  #view-admin .admin-sidebar-footer .admin-sidebar-logout,
  #view-admin #admin-logout-sidebar {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 40px !important;
    width: 100% !important;
    min-height: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    align-items: center !important;
    justify-content: center !important;
    transform: none !important;
  }
}


/* V19: hide the hamburger completely while the mobile sidebar drawer is open. */
@media (max-width: 900px) {
  #view-student.mobile-sidebar-open .mobile-sidebar-toggle,
  #view-admin.mobile-sidebar-open .mobile-sidebar-toggle {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* V21: retain the original slide-out sidebar. The sticky hamburger shows only
   the currently selected tab name beside it; it does not turn the menu into a row. */
@media (max-width: 900px) {
  #view-student:not(.hidden) .mobile-sidebar-toggle,
  #view-admin:not(.hidden) .mobile-sidebar-toggle {
    position: fixed !important;
    top: max(12px, env(safe-area-inset-top)) !important;
    left: max(12px, env(safe-area-inset-left)) !important;
    z-index: 1204 !important;
    width: auto !important;
    min-width: 46px !important;
    max-width: calc(100vw - 24px) !important;
    height: 46px !important;
    padding: 0 13px !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 11px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
  .mobile-sidebar-toggle .mobile-current-tab {
    display: inline-block !important;
    max-width: calc(100vw - 100px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font: 600 13px/1.2 'Poppins', sans-serif !important;
    color: #25243a !important;
  }
  .mobile-sidebar-toggle svg {
    flex: 0 0 22px !important;
  }
}


/* V22: requested mobile copyright text size */
@media (max-width: 900px) {
  .gp-media-global-footer,
  .gp-media-global-footer a {
    font-size: 16px !important;
  }
}


/* V23: keep the 16px copyright credit on one centered line on mobile. */
@media (max-width: 900px) {
  .gp-media-global-footer {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    padding: 0 4px !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.45px !important;
  }
  .gp-media-global-footer a {
    display: inline !important;
    white-space: nowrap !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.45px !important;
  }
}


/* V24: slightly smaller mobile copyright text while keeping it on one line. */
@media (max-width: 900px) {
  .gp-media-global-footer,
  .gp-media-global-footer a {
    font-size: 14px !important;
    letter-spacing: -0.25px !important;
  }
}


/* ===== Premium Practice Test / Mock Test creator UI ===== */
#modal-backdrop:has(#modal-body #quiz-create-form) .modal{width:min(900px,calc(100vw - 30px));max-width:900px;border-radius:18px;overflow:hidden}
#modal-backdrop:has(#modal-body #quiz-create-form) .modal-head{padding:18px 22px;background:#fff;border-bottom:1px solid #E9ECF4}
#modal-backdrop:has(#modal-body #quiz-create-form) .modal-head h3{font-size:18px;font-weight:800;color:#202744}
#modal-backdrop:has(#modal-body #quiz-create-form) .modal-body{padding:20px 22px 22px;background:#F7F8FC;max-height:min(78vh,780px);overflow:auto}
#modal-body .qcb-form{display:flex;flex-direction:column;gap:17px;color:#25304B}
#modal-body .qcb-top-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}
#modal-body .qcb-field{display:flex;flex-direction:column;gap:7px;font-size:11px;font-weight:750;color:#68738D}
#modal-body .qcb-field span{display:block}
#modal-body .qcb-field input,#modal-body .qcb-field select{width:100%;height:42px;border:1px solid #DFE3EF;border-radius:9px;background:#fff;padding:0 12px;color:#28324D;font-size:12px;outline:none;box-sizing:border-box}
#modal-body .qcb-field input:focus,#modal-body .qcb-field select:focus,#modal-body .qcb-question-label textarea:focus,#modal-body .qcb-option-row input[type=text]:focus{border-color:#8174E4;box-shadow:0 0 0 3px rgba(108,93,211,.10)}
#modal-body .qcb-title-field{grid-column:1/-1}
#modal-body .qcb-import-card{display:grid;grid-template-columns:42px minmax(0,1fr);gap:11px 13px;align-items:center;padding:15px;background:#fff;border:1px solid #E6E9F2;border-radius:13px}
#modal-body .qcb-import-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:11px;background:#E8F7F0;color:#16865F;font-size:10px;font-weight:900;letter-spacing:.03em}
#modal-body .qcb-import-copy strong{font-size:13px;color:#26314D}
#modal-body .qcb-import-copy p{margin:4px 0 0;font-size:11px;line-height:1.5;color:#8991A7}
#modal-body .qcb-import-actions{grid-column:2;display:flex;align-items:center;gap:9px;flex-wrap:wrap}
#modal-body .qcb-import-actions input{max-width:100%;font-size:11px;padding:7px;border:1px dashed #D9DDEC;border-radius:8px;background:#FBFCFE}
#modal-body .qcb-template-btn{border:1px solid #DCD7FA;background:#F5F3FF;color:#6658D3;border-radius:8px;padding:8px 11px;font-size:11px;font-weight:750;cursor:pointer}
#modal-body .qcb-import-status{grid-column:2;margin:0;font-size:11px;color:#16865F}
#modal-body .qcb-question-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:2px 0 -5px}
#modal-body .qcb-question-section-head h4{margin:0;color:#202744;font-size:15px;font-weight:800}
#modal-body .qcb-question-section-head p{margin:4px 0 0;color:#8991A7;font-size:11px}
#modal-body .qcb-count{white-space:nowrap;background:#F0EDFF;color:#6658D3;border-radius:20px;padding:6px 10px;font-size:10px;font-weight:800}
#modal-body .qcb-question-list{display:grid;gap:12px}
#modal-body .qcb-card{padding:15px;background:#fff;border:1px solid #E6E9F2;border-radius:13px;box-shadow:0 3px 12px rgba(31,42,76,.025)}
#modal-body .qcb-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:13px}
#modal-body .qcb-heading{display:flex;align-items:center;gap:10px}
#modal-body .qcb-number{width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:#EEEAFE;color:#6658D3;font-size:12px;font-weight:850}
#modal-body .qcb-heading strong{display:block;font-size:12px;color:#26314D}
#modal-body .qcb-heading small{display:block;margin-top:3px;color:#98A0B3;font-size:10px}
#modal-body .qcb-remove{border:1px solid #F1DCDD;background:#FFF7F7;color:#C6535A;border-radius:8px;padding:7px 10px;font-size:10px;font-weight:750;cursor:pointer}
#modal-body .qcb-question-label{display:flex;flex-direction:column;gap:7px;color:#68738D;font-size:11px;font-weight:750}
#modal-body .qcb-question-label textarea{width:100%;min-height:64px;resize:vertical;box-sizing:border-box;border:1px solid #DFE3EF;border-radius:9px;padding:10px 12px;font:inherit;font-size:12px;color:#28324D;outline:none}
#modal-body .qcb-options-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:14px 0 8px}
#modal-body .qcb-options-head strong{font-size:11px;color:#46516D}
#modal-body .qcb-options-head span{font-size:10px;color:#98A0B3}
#modal-body .qcb-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#modal-body .qcb-option-row{display:flex;align-items:center;gap:8px;min-width:0;padding:7px 8px;border:1px solid #E8EBF3;border-radius:9px;background:#FBFCFE}
#modal-body .qcb-correct-wrap{width:17px;height:17px;display:grid;place-items:center;flex-shrink:0;margin:0}
#modal-body .qcb-correct-wrap input{position:absolute;opacity:0;width:1px;height:1px}
#modal-body .qcb-correct-wrap span{width:15px;height:15px;border:1.5px solid #C7CCDA;border-radius:50%;display:block;position:relative}
#modal-body .qcb-correct-wrap input:checked+span{border-color:#6C5DD3}
#modal-body .qcb-correct-wrap input:checked+span:after{content:"";position:absolute;inset:3px;border-radius:50%;background:#6C5DD3}
#modal-body .qcb-option-letter{width:21px;height:21px;display:grid;place-items:center;flex-shrink:0;border-radius:6px;background:#F0EDFF;color:#6658D3;font-size:10px;font-weight:850}
#modal-body .qcb-option-row input[type=text]{width:100%;min-width:0;height:34px;border:1px solid transparent;border-radius:6px;background:transparent;padding:0 6px;font-size:11px;color:#28324D;outline:none;box-sizing:border-box}
#modal-body .qcb-option-row input[type=text]:focus{background:#fff}
#modal-body .qcb-add-question{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;padding:11px;border:1px dashed #CFC8F7;border-radius:10px;background:#FBFAFF;color:#6658D3;font-size:11px;font-weight:800;cursor:pointer}
#modal-body .qcb-add-question:hover{background:#F3F0FF;border-color:#AFA5F0}
#modal-body .qcb-add-question span{font-size:16px;line-height:10px}
#modal-body .qcb-submit-row{position:sticky;bottom:-22px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 -22px -22px;padding:14px 22px;background:rgba(255,255,255,.97);border-top:1px solid #E8EBF3}
#modal-body .qcb-submit-row>span{font-size:10px;color:#8991A7}
#modal-body .qcb-submit-btn{border:0;border-radius:9px;background:#6658D3;color:#fff;padding:11px 18px;font-size:11px;font-weight:800;cursor:pointer;box-shadow:0 4px 10px rgba(102,88,211,.18)}
#modal-body .qcb-submit-btn:hover{background:#5849C4}
@media(max-width:650px){
 #modal-backdrop:has(#modal-body #quiz-create-form) .modal{width:calc(100vw - 16px);max-width:none}
 #modal-backdrop:has(#modal-body #quiz-create-form) .modal-body{padding:14px}
 #modal-body .qcb-top-grid{grid-template-columns:1fr}
 #modal-body .qcb-title-field{grid-column:auto}
 #modal-body .qcb-options{grid-template-columns:1fr}
 #modal-body .qcb-import-actions{grid-column:1/-1}
 #modal-body .qcb-import-status{grid-column:1/-1}
 #modal-body .qcb-submit-row{margin:0 -14px -14px;padding:12px 14px;align-items:flex-start;flex-direction:column}
 #modal-body .qcb-submit-btn{width:100%}
 #modal-body .qcb-options-head{align-items:flex-start;flex-direction:column;gap:3px}
}


/* Practice, Mock and Free Resource cards use the exact Course Activity card structure. */
#modal-body .sa-managed-item-card{padding:10px 12px;border:1px solid #E8EBF3;border-radius:11px;background:#fff;margin:0 0 8px;}
#modal-body .sa-managed-item-card .sa-course-top{display:flex;align-items:center;gap:8px;}
#modal-body .sa-managed-item-card .sa-test-symbol{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;flex:0 0 30px;background:#F0EDFF;color:#6658D3;font-size:11px;font-weight:800;}
#modal-body .sa-managed-item-card .sa-course-name{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px;}
#modal-body .sa-managed-item-card .sa-course-name strong{font-size:12px;color:#202744;}
#modal-body .sa-managed-item-card .sa-course-name span{font-size:11px;color:#8991A7;}
#modal-body .sa-managed-divider{height:5px;border-radius:10px;background:#F0F1F6;margin:9px 0 8px;}
#modal-body .sa-managed-item-card .sa-course-metrics{display:flex;align-items:stretch;gap:9px;margin:0;min-height:52px;}
#modal-body .sa-managed-item-card .sa-metric-highlight{box-sizing:border-box;display:flex;flex:0 0 105px;justify-content:center;flex-direction:column;gap:3px;padding:6px 10px;border-radius:8px;min-width:90px;border:1px solid #E7EAF3;background:#F8F9FD;}
#modal-body .sa-managed-item-card .sa-metric-highlight small{font-size:10px;color:#8991A7;}
#modal-body .sa-managed-item-card .sa-metric-highlight strong{font-size:12px;font-weight:800;color:#28324D;}
#modal-body .sa-managed-item-card .sa-limit-field{margin-left:auto;width:145px;flex:0 0 145px;font-size:10px;color:#8991A7;display:flex;flex-direction:column;gap:4px;}
#modal-body .sa-managed-item-card .sa-limit-field input{width:100%;height:32px;padding:5px 8px;border:1px solid #E0E4EF;border-radius:8px;font-size:12px!important;}
@media(max-width:640px){#modal-body .sa-managed-item-card .sa-course-top{flex-wrap:wrap;}#modal-body .sa-managed-item-card .sa-course-actions{margin-left:auto;}#modal-body .sa-managed-item-card .sa-course-metrics{flex-wrap:wrap;}#modal-body .sa-managed-item-card .sa-limit-field{margin-left:0;flex:1 1 140px;width:auto;}}

/* Card typography: normal-weight text across all panels; tab headings remain unchanged */
#view-student :is(.card, .result-card, .quiz-admin-card, .course-card, .test-card, .resource-card, .stat-card) :is(h1,h2,h3,h4,h5,h6,p,span,label,small,strong,b,em),
#view-admin :is(.card, .result-card, .quiz-admin-card, .course-card, .test-card, .resource-card, .stat-card) :is(h1,h2,h3,h4,h5,h6,p,span,label,small,strong,b,em) {
  font-weight: 400 !important;
}


/* Practice and Mock Test card text: regular weight in Admin and Student panels */
#view-student .quiz-student-card *,
#view-student .quiz-admin-card *,
#view-admin .quiz-student-card *,
#view-admin .quiz-admin-card * {
  font-weight: 400 !important;
}


/* Practice Test and Mock Test cards: remove decorative icon and align metadata chips */
#view-student .quiz-student-card-top,
#view-admin .quiz-admin-card-top {
  justify-content:flex-end !important;
  min-height:30px;
  margin-bottom:12px !important;
}
#view-student .quiz-card-icon,
#view-admin .quiz-card-icon {
  display:none !important;
}
#view-student .quiz-card-metadata,
#view-admin .quiz-card-metadata {
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:stretch;
  gap:6px !important;
  width:100%;
}
#view-student .quiz-card-metadata span,
#view-admin .quiz-card-metadata span {
  flex:1 1 0;
  min-width:0;
  justify-content:center;
  white-space:nowrap;
  padding:7px 4px !important;
  border-radius:8px !important;
  font-size:9px !important;
  line-height:1.25;
  font-weight:400 !important;
}
#view-student .quiz-card-metadata span:nth-child(1),
#view-admin .quiz-card-metadata span:nth-child(1) { background:#f0edff !important; color:#6657ce !important; }
#view-student .quiz-card-metadata span:nth-child(2),
#view-admin .quiz-card-metadata span:nth-child(2) { background:#eaf5ff !important; color:#3976a8 !important; }
#view-student .quiz-card-metadata span:nth-child(3),
#view-admin .quiz-card-metadata span:nth-child(3) { background:#eaf7f0 !important; color:#25805e !important; }


/* Hide Practice Test / Mock Test label pills on all panels */
#view-student .quiz-type-pill,
#view-admin .quiz-type-pill {
  display:none !important;
}
#view-student .quiz-student-card-top,
#view-admin .quiz-admin-card-top {
  display:none !important;
}


/* Improve readability of Questions, Time Limit and Attempts chips */
#view-student .quiz-card-metadata,
#view-admin .quiz-card-metadata {
  gap:8px !important;
}
#view-student .quiz-card-metadata span,
#view-admin .quiz-card-metadata span {
  font-size:11px !important;
  padding:9px 6px !important;
  min-height:34px;
  line-height:1.3 !important;
  gap:5px !important;
}


/* Give Practice and Mock Test cards more room so metadata chips stay separated */
#view-student .quiz-card-grid,
#view-admin .quiz-admin-grid {
  grid-template-columns:repeat(auto-fill,minmax(310px,1fr)) !important;
  gap:18px !important;
}
#view-student .quiz-student-card,
#view-admin .quiz-admin-card {
  padding:21px !important;
}
#view-student .quiz-card-metadata,
#view-admin .quiz-card-metadata {
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:10px !important;
  padding:13px 0 15px !important;
}
#view-student .quiz-card-metadata span,
#view-admin .quiz-card-metadata span {
  flex:1 1 0 !important;
  min-width:0 !important;
  width:auto !important;
  margin:0 !important;
  padding:10px 7px !important;
  min-height:38px !important;
  white-space:nowrap !important;
  font-size:11px !important;
  line-height:1.3 !important;
  border-radius:9px !important;
}
@media (max-width:520px) {
  #view-student .quiz-card-grid,
  #view-admin .quiz-admin-grid {
    grid-template-columns:1fr !important;
  }
}


/* Match Start Practice Test / Start Mock Test button sizing to the Open Course button */
#view-student .quiz-start-button {
  min-height:42px !important;
  padding:12px 18px !important;
  font-size:14px !important;
  font-weight:700 !important;
  line-height:1.25 !important;
  border-radius:10px !important;
  gap:7px !important;
}
#view-student .quiz-start-button span {
  font-size:16px !important;
  line-height:1 !important;
}


/* Make Practice Test and Mock Test card headlines bold across panels */
#view-student .quiz-student-card h3,
#view-admin .quiz-admin-card h3 {
  font-weight:700 !important;
}


/* Results & Scores — consistent, balanced card layout across Student, Admin */
#view-student .results-panel-heading,
#view-admin .results-panel-heading {
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:16px !important;
  margin:0 0 22px !important;
  padding:0 0 16px !important;
  border-bottom:1px solid #eceef4;
}
#view-student .results-panel-heading h2,
#view-admin .results-panel-heading h2 {
  margin:0 0 5px !important;
  color:#242842 !important;
  font-size:21px !important;
  line-height:1.35 !important;
  font-weight:700 !important;
  letter-spacing:-.25px !important;
}
#view-student .results-panel-heading p,
#view-admin .results-panel-heading p {
  margin:0 !important;
  color:#7f879b !important;
  font-size:12px !important;
  line-height:1.55 !important;
}
#view-student .results-total-pill,
#view-admin .results-total-pill {
  min-width:86px !important;
  padding:8px 13px !important;
  border:1px solid #e5e1ff;
  border-radius:10px !important;
  background:#f4f2ff !important;
  color:#6557c8 !important;
  font-size:11px !important;
  font-weight:600 !important;
}
#view-student .results-card-grid,
#view-admin .results-card-grid {
  display:grid !important;
  grid-template-columns:repeat(auto-fill,minmax(290px,1fr)) !important;
  gap:18px !important;
  align-items:stretch !important;
}
#view-student .result-card,
#view-admin .result-card {
  min-width:0 !important;
  display:flex !important;
  flex-direction:column !important;
  padding:19px !important;
  border:1px solid #e8eaf2 !important;
  border-radius:14px !important;
  background:#fff !important;
  box-shadow:0 3px 12px rgba(34,43,78,.045) !important;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}
#view-student .result-card:hover,
#view-admin .result-card:hover {
  transform:translateY(-2px);
  border-color:#d9d4fb !important;
  box-shadow:0 8px 22px rgba(34,43,78,.08) !important;
}
#view-student .result-card-top,
#view-admin .result-card-top {
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:10px !important;
  margin:0 0 14px !important;
}
#view-student .result-card-icon,
#view-admin .result-card-icon {
  width:34px !important;
  height:34px !important;
  flex:0 0 34px !important;
  border-radius:10px !important;
  background:#f0edff !important;
  color:#6657ce !important;
  font-size:15px !important;
}
#view-student .result-kind-pill,
#view-admin .result-kind-pill {
  max-width:calc(100% - 44px) !important;
  padding:6px 10px !important;
  border:1px solid #ece9fb;
  border-radius:8px !important;
  background:#f7f6ff !important;
  color:#6b60a9 !important;
  font-size:10px !important;
  font-weight:500 !important;
}
#view-student .result-card h3,
#view-admin .result-card h3 {
  margin:0 0 14px !important;
  color:#2b3049 !important;
  font-size:14px !important;
  line-height:1.5 !important;
  font-weight:600 !important;
  overflow-wrap:anywhere;
}
#view-admin .admin-result-student {
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  margin:0 0 14px !important;
  padding:10px 11px !important;
  border:1px solid #edf0f5;
  border-radius:10px;
  background:#fafbfe;
}
#view-admin .result-student-avatar {
  width:34px !important;
  height:34px !important;
  flex:0 0 34px !important;
  font-size:12px !important;
  font-weight:600 !important;
}
#view-admin .admin-result-student strong {font-size:11px !important;font-weight:600 !important;color:#343951 !important}
#view-admin .admin-result-student small {font-size:10px !important;color:#858da1 !important}
#view-student .result-score-block,
#view-admin .result-score-block {
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  margin-top:auto !important;
  padding:13px 14px !important;
  border:1px solid #eeecfb;
  border-radius:10px;
  background:#faf9ff;
}
#view-student .result-score-block>div,
#view-admin .result-score-block>div {display:flex;flex-direction:column;gap:5px}
#view-student .result-muted-label,
#view-admin .result-muted-label {font-size:10px !important;color:#7f879b !important;font-weight:500 !important}
#view-student .result-score-block strong,
#view-admin .result-score-block strong {font-size:21px !important;line-height:1.2 !important;color:#292e48 !important;font-weight:700 !important}
#view-student .result-score-block strong small,
#view-admin .result-score-block strong small {font-size:12px !important;color:#8b92a5 !important;font-weight:400 !important}
#view-student .result-percent,
#view-admin .result-percent {font-size:20px !important;color:#6657ce !important;font-weight:700 !important}
#view-student .result-progress-track,
#view-admin .result-progress-track {height:6px !important;margin:12px 1px 14px !important;border-radius:20px !important;background:#eeedf5 !important}
#view-student .result-progress-track span,
#view-admin .result-progress-track span {border-radius:20px !important;background:linear-gradient(90deg,#8b7df0,#6254ce) !important}
#view-student .result-card-bottom,
#view-admin .result-card-bottom {
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:10px !important;
  padding-top:12px !important;
  border-top:1px solid #eef0f5 !important;
}
#view-student .result-date,
#view-admin .result-date {font-size:10px !important;line-height:1.45 !important;color:#7f879b !important}
#view-student .result-view-button,
#view-admin .result-view-button {
  flex:0 0 auto !important;
  padding:8px 11px !important;
  border:1px solid #e2defa !important;
  border-radius:8px !important;
  background:#f5f3ff !important;
  color:#6254c5 !important;
  font-size:10px !important;
  font-weight:600 !important;
}
#view-student .results-empty-state,
#view-admin .results-empty-state {
  min-height:220px !important;
  padding:30px 20px !important;
  border:1px dashed #d9deea !important;
  border-radius:14px !important;
  background:#fbfcff !important;
}
@media(max-width:700px) {
  #view-student .results-panel-heading,
  #view-admin .results-panel-heading {align-items:flex-start !important}
  #view-student .results-panel-heading h2,
  #view-admin .results-panel-heading h2 {font-size:19px !important}
  #view-student .results-card-grid,
  #view-admin .results-card-grid {grid-template-columns:1fr !important;gap:13px !important}
  #view-student .result-card,
  #view-admin .result-card {padding:16px !important}
}


/* Make submitted date and time clearly visible in every Results card */
#view-student .result-card-bottom .result-date,
#view-admin .result-card-bottom .result-date {
  display:inline-flex !important;
  align-items:center !important;
  gap:7px !important;
  max-width:none !important;
  min-width:0 !important;
  padding:9px 11px !important;
  border:1px solid #d9e4f5 !important;
  border-radius:9px !important;
  background:#eef5ff !important;
  color:#315f96 !important;
  font-size:11px !important;
  font-weight:600 !important;
  line-height:1.4 !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
}


.exam-start-warning{padding:8px 2px 2px;color:#253047}.exam-start-warning-icon{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#fee2e2;color:#b91c1c;font-size:25px;font-weight:800;margin-bottom:12px}.exam-start-warning h3{margin:0 0 12px;font-size:19px;color:#17233b}.exam-start-warning ul{padding-left:21px;margin:0 0 14px;line-height:1.75;color:#475569}.exam-start-warning li{margin:6px 0}.exam-start-warning-note{padding:11px 13px;border:1px solid #fecaca;background:#fff1f2;border-radius:9px;color:#b42318;font-weight:600;line-height:1.55;font-size:13px}.exam-start-confirm{width:100%;border:0;border-radius:9px;background:#635bdb;color:#fff;padding:13px 18px;font-weight:700;font-size:14px;cursor:pointer;margin-top:8px}.exam-start-confirm:hover{filter:brightness(.96)}

.student-limit-alert{padding:8px 2px 2px;color:#263247}.student-limit-alert-icon{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#fee2e2;color:#b91c1c;font-size:26px;font-weight:800;margin-bottom:12px}.student-limit-alert h3{font-size:19px;margin:0 0 9px;color:#17233b}.student-limit-alert p{font-size:14px;line-height:1.65;color:#475569;margin:0 0 14px}.student-limit-alert-note{border:1px solid #fecaca;background:#fff1f2;color:#b42318;border-radius:9px;padding:11px 12px;font-size:13px;font-weight:600;line-height:1.5;margin-bottom:14px}.student-limit-support-btn{width:100%;border:0;border-radius:9px;background:#635bdb;color:#fff;padding:12px 16px;font-size:14px;font-weight:700;cursor:pointer}

.exam-start-cancel{width:100%;border:1px solid #d7dce5;border-radius:9px;background:#fff;color:#475569;padding:12px 18px;font-weight:700;font-size:14px;cursor:pointer;margin-top:9px}.exam-start-cancel:hover{background:#f8fafc}

.signup-phone-row{display:grid;grid-template-columns:minmax(105px, 0.72fr) minmax(0, 1.8fr);gap:8px;align-items:stretch}.signup-phone-row select,.signup-phone-row input{width:100%;min-width:0;box-sizing:border-box}.signup-phone-row select{padding:11px 9px;border:1px solid var(--border,#d9deea);border-radius:9px;background:#fff;color:var(--text,#253047);font:inherit;font-size:13px}@media(max-width:420px){.signup-phone-row{grid-template-columns:105px minmax(0,1fr);gap:6px}.signup-phone-row select{font-size:12px;padding:10px 5px}}

/* Login and Signup password visibility toggle */
.auth-password-wrap{position:relative;display:block;width:100%;}
.auth-password-wrap input{width:100%;padding-right:46px!important;box-sizing:border-box;}
.password-visibility-toggle{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:30px;height:30px;display:flex;align-items:center;justify-content:center;border:0;background:transparent;color:#64748b;cursor:pointer;padding:4px;border-radius:6px;}
.password-visibility-toggle:hover{background:rgba(100,116,139,.12);color:#334155;}
.password-visibility-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.password-visibility-toggle.is-visible svg path{d:path("M3 3l18 18M10.6 10.6a2 2 0 0 0 2.8 2.8M9.9 5.2A10.8 10.8 0 0 1 12 5c6.4 0 10 7 10 7a17 17 0 0 1-3.1 3.8M6.2 6.2C3.5 8 2 12 2 12s3.6 7 10 7c1.4 0 2.7-.3 3.8-.8");}

/* Signup approval controls */
#view-admin #a-enrollments .signup-lead-actions{flex-direction:column;align-items:flex-end;gap:7px;}
#view-admin #a-enrollments .signup-approval-buttons{display:flex;align-items:center;gap:8px;}
#view-admin #a-enrollments .signup-approve-pill{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:7px 13px;border:1px solid #cde9dc;border-radius:999px;background:#ecf8f1;color:#18784c;font:700 11px 'Poppins',sans-serif;cursor:pointer;}
#view-admin #a-enrollments .signup-approve-pill:hover{background:#ddf2e6;}
@media(max-width:700px){#view-admin #a-enrollments .signup-lead-actions{align-items:flex-start;}}

/* Consistent custom confirmation dialog for delete/remove/confirm actions */
.styled-confirm-backdrop{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(15,23,42,.24);backdrop-filter:blur(2px);}
.styled-confirm-card{width:min(100%,420px);background:#fff;color:#202124;border-radius:15px;box-shadow:0 12px 0 rgba(0,0,0,.88),0 18px 40px rgba(15,23,42,.22);padding:18px 18px 16px;position:relative;font-family:inherit;}
.styled-confirm-title{font-size:15px;font-weight:700;margin:0 34px 10px 0;color:#202124;}
.styled-confirm-message{font-size:13px;line-height:1.55;color:#4b5563;margin:0 0 18px;white-space:pre-line;}
.styled-confirm-close{position:absolute;right:12px;top:10px;width:28px;height:28px;border:0;border-radius:7px;background:#f1f2f4;color:#68707b;font-size:18px;cursor:pointer;line-height:1;}
.styled-confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.styled-confirm-actions button{min-height:40px;border:0;border-radius:7px;padding:9px 12px;font:600 12px inherit;cursor:pointer;}
.styled-confirm-yes{background:#ed7777;color:#fff;}
.styled-confirm-no{background:#f0eeee;color:#454545;}
.styled-confirm-actions button:hover{filter:brightness(.97);}
@media(max-width:420px){.styled-confirm-card{width:100%;}}

/* Mobile auth page: make the complete Login / Signup screen white. */
@media (max-width: 900px) {
  #view-auth.auth-screen:not(.hidden),
  #view-auth .auth-card,
  #view-auth .auth-brand,
  #view-auth .auth-panel,
  #view-auth .auth-tabs {
    background: #fff !important;
  }
  #view-auth.auth-screen:not(.hidden) {
    min-height: 100vh !important;
  }
  #view-auth .auth-card {
    box-shadow: none !important;
  }
}


/* Match the Login / Signup card's bottom accent with the Login button. */
#view-auth .auth-card::after {
  background: var(--teal) !important;
}


/* Responsive footer typography */
@media (max-width: 600px) {
  #view-auth .site-footer,
  #view-student .site-footer,
  #view-admin .site-footer,
  footer {
    font-size: 11px !important;
    line-height: 1.6 !important;
    text-align: center;
    padding-left: 12px;
    padding-right: 12px;
    overflow-wrap: anywhere;
  }
}


/* Final mobile footer fix: allow the complete copyright line to wrap. */
@media (max-width: 900px) {
  .gp-media-global-footer {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 42px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    text-align: center !important;
    padding: 6px 12px !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
    letter-spacing: 0 !important;
  }

  .gp-media-global-footer a {
    display: inline !important;
    white-space: normal !important;
    font-size: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    overflow-wrap: anywhere !important;
  }
}


/* Mobile footer: 15px text; keep Powered By + GP Media together. */
@media (max-width: 900px) {
  .gp-media-global-footer {
    font-size: 15px !important;
    line-height: 1.45 !important;
    white-space: normal !important;
    text-align: center !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }
  .gp-media-global-footer .gp-credit-nowrap {
    display: inline-block !important;
    white-space: nowrap !important;
  }
  .gp-media-global-footer a {
    display: inline !important;
    white-space: nowrap !important;
    font-size: inherit !important;
  }
}


/* Mobile footer: keep the full credit within at most two natural lines. */
@media (max-width: 900px) {
  .gp-media-global-footer {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: auto !important;
    min-height: 42px !important;
    padding: 4px 8px !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }
  .gp-media-global-footer .gp-credit-nowrap {
    display: inline !important;
    white-space: normal !important;
  }
  .gp-media-global-footer a {
    display: inline !important;
    white-space: normal !important;
    font-size: inherit !important;
  }
}


/* Student panel: All Courses and Free Resources are horizontal tabs. */
#view-student .student-course-tabs {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  margin: 0 0 22px;
  padding: 5px;
  background: #FFFFFF;
  border: 1px solid #E8E6F0;
  border-radius: 12px;
}
#view-student .student-course-tab {
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  border-radius: 9px;
  padding: 11px 16px;
  background: transparent;
  color: #777C95;
  font: 600 14px 'Poppins', sans-serif;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
#view-student .student-course-tab.active {
  background: #6C5DD3;
  color: #FFFFFF;
}
#view-student .student-course-tab-panel.hidden { display: none !important; }
@media (max-width: 600px) {
  #view-student .student-course-tabs {
    flex-direction: row !important;
    gap: 6px;
    margin-bottom: 18px;
  }
  #view-student .student-course-tab {
    flex: 1 1 50%;
    padding: 10px 8px;
    font-size: 13px;
    white-space: nowrap;
  }
}



/* ===== Professional, centered mobile authentication card ===== */
@media (max-width: 900px) {
  #view-auth.auth-screen:not(.hidden) {
    min-height: 100svh !important;
    height: auto !important;
    padding: 28px 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #F4F6FB !important;
    box-sizing: border-box !important;
  }
  #view-auth .auth-card {
    width: 100% !important;
    max-width: 480px !important;
    margin: auto !important;
    display: flex !important;
    flex-direction: column !important;
    background: #FFFFFF !important;
    border: 1px solid #E7EAF2 !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    box-shadow: 0 18px 48px rgba(28, 39, 74, 0.13),
                0 4px 12px rgba(28, 39, 74, 0.06) !important;
  }
  #view-auth .auth-brand {
    width: 100% !important;
    padding: 28px 24px 8px !important;
    background: #FFFFFF !important;
    align-items: center !important;
    justify-content: center !important;
  }
  #view-auth .auth-brand .tagline,
  #view-auth .auth-brand .brand-points {
    display: none !important;
  }
  #view-auth .brand-logo-box {
    margin: 0 auto !important;
    padding: 8px 12px !important;
    background: #FFFFFF !important;
  }
  #view-auth .brand-logo-img {
    display: block !important;
    width: auto !important;
    max-width: min(260px, 72vw) !important;
    max-height: 72px !important;
    object-fit: contain !important;
  }
  #view-auth .auth-panel {
    width: 100% !important;
    padding: 18px 28px 30px !important;
    background: #FFFFFF !important;
  }
}
@media (max-width: 480px) {
  #view-auth.auth-screen:not(.hidden) {
    padding: 18px 14px !important;
  }
  #view-auth .auth-card {
    max-width: 420px !important;
    border-radius: 16px !important;
  }
  #view-auth .auth-brand {
    padding: 24px 18px 6px !important;
  }
  #view-auth .brand-logo-img {
    max-width: min(230px, 70vw) !important;
    max-height: 64px !important;
  }
  #view-auth .auth-panel {
    padding: 16px 22px 26px !important;
  }
}




#view-admin .student-action-trigger{width:34px;height:34px;border:1px solid #E6E8F2;border-radius:10px;background:#fff;color:#6658D3;padding:8px}
#view-admin .student-action-trigger:hover{background:#F2EFFF;border-color:#CFC8FF;color:#5546C5}
#view-admin .student-action-trigger svg{width:17px;height:17px}
#modal-backdrop:has(#modal-body .sa-shell) .modal{width:min(920px,calc(100vw - 32px));max-width:920px;border-radius:18px;overflow:hidden}
#modal-backdrop:has(#modal-body .sa-shell) .modal-head{padding:18px 22px;border-bottom:1px solid #EDF0F6;background:#fff}
#modal-backdrop:has(#modal-body .sa-shell) .modal-head h3{font-size:18px;font-weight:750;color:#202744}
#modal-backdrop:has(#modal-body .sa-shell) .modal-body{padding:0;background:#F7F8FC;max-height:min(78vh,760px);overflow:auto}
#modal-body .sa-shell{padding:20px 22px 22px;color:#222B45;font-family:inherit}
#modal-body .sa-profile{display:flex;align-items:center;gap:12px;padding:15px 16px;background:#fff;border:1px solid #E9ECF4;border-radius:14px;margin-bottom:16px}
#modal-body .sa-avatar{width:44px;height:44px;display:grid;place-items:center;border-radius:13px;background:#EEEAFE;color:#6556D5;font-size:18px;font-weight:800}
#modal-body .sa-profile-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}#modal-body .sa-profile-copy strong{font-size:15px;color:#202744}#modal-body .sa-profile-copy span{font-size:12px;color:#8991A7;overflow-wrap:anywhere}
#modal-body .sa-account-status,#modal-body .sa-status{font-size:11px;font-weight:700;padding:6px 10px;border-radius:20px;white-space:nowrap}#modal-body .sa-account-status.active,#modal-body .sa-status.is-active{background:#E5F8EF;color:#159568}#modal-body .sa-account-status.blocked{background:#FDEBEC;color:#C84750}#modal-body .sa-status.is-pending{background:#FFF3DE;color:#B47A18}
#modal-body .sa-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;margin-bottom:23px}
#modal-body .sa-stat-card{position:relative;min-width:0;background:#fff;border:1px solid #E9ECF4;border-radius:13px;padding:14px 15px;display:flex;flex-direction:column;gap:7px}
#modal-body .sa-stat-card small{font-size:11px;color:#8991A7;font-weight:600}#modal-body .sa-stat-card strong{font-size:22px;line-height:1.2;color:#202744;font-weight:800;overflow-wrap:anywhere}#modal-body .sa-stat-icon{font-size:14px;font-weight:800;width:27px;height:27px;border-radius:8px;display:grid;place-items:center}
#modal-body .sa-stat-card.purple .sa-stat-icon{background:#EEEAFE;color:#6658D3}#modal-body .sa-stat-card.blue .sa-stat-icon{background:#E6F2FF;color:#4388D4}#modal-body .sa-stat-card.orange .sa-stat-icon{background:#FFF1DE;color:#C58A2C}#modal-body .sa-stat-card.green .sa-stat-icon{background:#E4F8EF;color:#19986D}
#modal-body .sa-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 11px}#modal-body .sa-section-head h4{font-size:15px;margin:0 0 4px;color:#202744}#modal-body .sa-section-head p{font-size:11.5px;color:#8991A7;margin:0}#modal-body .sa-section-count{font-size:11px;font-weight:700;color:#6658D3;background:#F0EDFF;padding:6px 9px;border-radius:20px;white-space:nowrap}
#modal-body .sa-control-tabs{display:flex;gap:8px;padding:5px;background:#EEF0F7;border:1px solid #E5E8F0;border-radius:12px;margin:0 0 14px;position:relative}#modal-body .sa-control-tab{flex:1;border:0;border-radius:8px;background:transparent;color:#707A94;padding:10px 12px;font-size:12px;font-weight:750;cursor:pointer;transition:.15s}#modal-body .sa-control-tab.active{background:#fff;color:#5F51CE;box-shadow:0 2px 7px #252b4414}#modal-body .sa-control-panel{display:none}#modal-body .sa-control-panel.active{display:block}#modal-body .sa-access-list{display:grid;gap:8px}#modal-body .sa-access-item{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #E8EBF3;border-radius:11px;padding:11px 13px;color:#303A55;font-size:12px}#modal-body .sa-access-item input{accent-color:#6658D3;width:16px;height:16px}#modal-body .sa-access-item span{display:flex;flex:1;flex-direction:column;gap:3px;min-width:0}#modal-body .sa-access-item small{font-size:10px;color:#8991A7}#modal-body .sa-course-list{display:grid;gap:12px}#modal-body .sa-course-card{background:#fff;border:1px solid #E8EBF3;border-radius:14px;padding:15px}
#modal-body .sa-course-top{display:flex;align-items:center;gap:10px}#modal-body .sa-course-icon{width:36px;height:36px;border-radius:10px;background:#F0EDFF;color:#6658D3;display:grid;place-items:center;flex-shrink:0}#modal-body .sa-course-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}#modal-body .sa-course-name{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}#modal-body .sa-course-name strong{font-size:13px;color:#202744}#modal-body .sa-course-name span{font-size:11px;color:#8991A7;text-transform:capitalize}
#modal-body .sa-progress{height:6px;border-radius:8px;background:#EEF0F6;margin:13px 0 10px;overflow:hidden}#modal-body .sa-progress span{display:block;height:100%;background:linear-gradient(90deg,#7868E8,#9A8FF0);border-radius:8px}
#modal-body .sa-course-metrics{display:flex;gap:24px;margin-bottom:13px}#modal-body .sa-course-metrics div{display:flex;flex-direction:column;gap:3px}#modal-body .sa-course-metrics small{font-size:10px;color:#8991A7}#modal-body .sa-course-metrics strong{font-size:12px;color:#28324D}
#modal-body .sa-course-list{gap:8px}#modal-body .sa-course-card{padding:10px 12px;border-radius:11px}#modal-body .sa-course-icon{width:30px;height:30px;border-radius:8px}#modal-body .sa-course-name strong{font-size:12px}#modal-body .sa-progress{height:5px;margin:8px 0 7px}#modal-body .sa-course-metrics{display:flex;align-items:stretch;gap:9px;margin:0 0 8px;min-height:52px}#modal-body .sa-metric-highlight{box-sizing:border-box;display:flex;flex:0 0 90px;justify-content:center;padding:6px 10px;border-radius:8px;min-width:90px;border:1px solid #E7EAF3;background:#F8F9FD}#modal-body .sa-metric-highlight.watch{background:#F0EDFF;border-color:#E2DCFF}#modal-body .sa-metric-highlight.limit{background:#EAF5FF;border-color:#DCEBFA}#modal-body .sa-metric-highlight.watch small{color:#6658D3}#modal-body .sa-metric-highlight.limit small{color:#397DB8}#modal-body .sa-metric-highlight strong{font-size:12px;font-weight:800}#modal-body .sa-watch-limit-control{box-sizing:border-box;flex:1 1 auto;min-width:220px;min-height:52px;height:52px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;padding:7px 9px;background:#FAFAFE;border:1px solid #ECEEF5;border-radius:8px}#modal-body .sa-watch-limit-copy{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}#modal-body .sa-watch-limit-copy strong{font-size:11px;font-weight:800;color:#39435F;white-space:nowrap}#modal-body .sa-watch-limit-copy span{font-size:10px;color:#8991A7;white-space:nowrap}#modal-body .sa-watch-limit-control input{height:30px!important;width:115px;flex:0 0 115px;max-width:35%;margin-top:0!important;align-self:center}@media(max-width:560px){#modal-body .sa-course-metrics{flex-wrap:wrap}#modal-body .sa-watch-limit-control{flex:1 1 100%;min-width:0}}#modal-body .sa-course-actions{display:flex;align-items:center;gap:6px;margin-left:auto}#modal-body .sa-course-access-btn,#modal-body .sa-course-remove-btn{border-radius:18px;padding:6px 10px;font-size:10px;font-weight:800;white-space:nowrap}#modal-body .sa-course-access-btn{border:1px solid #CDEEDD;background:#E5F8EF;color:#159568;cursor:default}#modal-body .sa-course-remove-btn{border:1px solid #F2D0D2;background:#FFF1F1;color:#C84750;cursor:pointer}#modal-body .sa-course-top{gap:8px}
#modal-body .sa-control-label{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:11px;font-weight:700;color:#4A5470}#modal-body .sa-control-label span{font-weight:500;color:#98A0B3}#modal-body .sa-control-label input{margin-left:auto;max-width:115px!important;height:34px;padding:6px 9px;border:1px solid #E0E4EF;border-radius:8px;background:#fff;font-size:12px!important}
#modal-body .sa-test-list{margin-top:14px;border-top:1px solid #EEF0F5;padding-top:12px}#modal-body .sa-subheading{font-size:11px;font-weight:800;color:#69738D;margin-bottom:7px;text-transform:uppercase;letter-spacing:.04em}
#modal-body .sa-test-row{display:flex;align-items:center;gap:10px;padding:9px 0;border-top:1px solid #F1F2F7}#modal-body .sa-test-symbol{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;background:#F0EDFF;color:#6658D3;font-size:11px;font-weight:800;flex-shrink:0}#modal-body .sa-test-info{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}#modal-body .sa-test-info strong{font-size:11.5px;color:#28324D}#modal-body .sa-test-info span,#modal-body .sa-test-info small{font-size:10.5px;color:#8991A7}#modal-body .sa-limit-field{font-size:10px;color:#8991A7;display:flex;flex-direction:column;gap:4px;width:112px;flex-shrink:0}#modal-body .sa-limit-field input{width:100%;height:32px;padding:5px 8px;border:1px solid #E0E4EF;border-radius:8px;font-size:12px!important}
#modal-body .sa-history-head{margin-top:22px}#modal-body .sa-history-wrap{background:#fff;border:1px solid #E8EBF3;border-radius:13px;overflow:auto}#modal-body .sa-history{width:100%;border-collapse:collapse;font-size:11px;min-width:540px}#modal-body .sa-history th{background:#F8F9FC;color:#8991A7;text-align:left;font-size:10px;text-transform:uppercase;letter-spacing:.04em;padding:11px 13px}#modal-body .sa-history td{padding:11px 13px;border-top:1px solid #F0F2F7;color:#4B5670}#modal-body .sa-history td:first-child{min-width:170px}#modal-body .sa-history td strong{display:block;color:#28324D;font-size:11px}#modal-body .sa-history td small{display:block;color:#98A0B3;font-size:10px;margin-top:3px}#modal-body .sa-type-pill{display:inline-block;padding:5px 8px;border-radius:20px;font-size:10px;font-weight:700;white-space:nowrap}#modal-body .sa-type-pill.mock{background:#FFF1DE;color:#B77D20}#modal-body .sa-type-pill.unit{background:#EDEAFF;color:#6658D3}
#modal-body .sa-empty-state{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;background:#fff;border:1px dashed #DDE2ED;border-radius:13px;padding:26px 14px;text-align:center;color:#8991A7}#modal-body .sa-empty-state strong{font-size:12px;color:#4A5470}#modal-body .sa-empty-state span{font-size:11px}#modal-body .sa-empty-icon{font-size:22px;color:#8B7DE2}#modal-body .sa-empty-state.compact{padding:20px}
#modal-body .sa-empty-inline{font-size:11px;color:#8991A7;padding:12px 0 2px}
#modal-body .sa-footer-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;border-top:1px solid #E7EAF2;margin-top:20px;padding-top:16px}#modal-body .sa-danger-actions{display:flex;gap:8px;flex-wrap:wrap}#modal-body .sa-footer-actions button{border-radius:9px;padding:9px 13px;font-size:11px;font-weight:700;cursor:pointer}#modal-body .sa-block-btn{background:#FFF5E7;border:1px solid #F4DDB9;color:#A66D16}#modal-body .sa-delete-btn{background:#FFF1F1;border:1px solid #F2D0D2;color:#C84750}#modal-body .sa-save-btn{background:#6658D3;border:1px solid #6658D3;color:#fff;padding-left:19px!important;padding-right:19px!important}
@media(max-width:650px){#modal-backdrop:has(#modal-body .sa-shell) .modal{width:calc(100vw - 18px);max-width:calc(100vw - 18px)}#modal-backdrop:has(#modal-body .sa-shell) .modal-body{max-height:calc(100dvh - 105px)}#modal-body .sa-shell{padding:13px}#modal-body .sa-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#modal-body .sa-stat-card{padding:11px}#modal-body .sa-stat-card strong{font-size:19px}#modal-body .sa-profile{padding:12px}#modal-body .sa-course-card{padding:12px}#modal-body .sa-footer-actions{align-items:stretch}#modal-body .sa-save-btn{width:100%}#modal-body .sa-control-label input{max-width:100px!important}}

#modal-body .sa-all-assigned-note{display:flex;flex-direction:column;gap:5px;padding:14px 12px;color:#28785A;background:#F0FBF6;border:1px solid #CDEFE0;border-radius:7px;font-size:12px;line-height:1.45}#modal-body .sa-all-assigned-note strong{font-size:13px;color:#168052}#modal-body .sa-all-assigned-note span{color:#64748B}#modal-body .sa-select-option{box-sizing:border-box;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:12px;width:100%;min-height:39px;padding:8px 12px;border-radius:3px;font-size:13px;line-height:1.35;color:#26334D;text-align:left!important;cursor:pointer;border-bottom:1px solid #EEF0F5;background:#fff}#modal-body .sa-select-option:last-child{border-bottom:0}#modal-body .sa-select-option:hover{background:#F3F5FA}#modal-body .sa-select-option>span:first-child{display:block;flex:1;text-align:left!important;white-space:normal}#modal-body .sa-select-option.selected{background:#EEF0FF;color:#26334D}#modal-body .sa-select-option small{color:#8991A7;font-size:10px}#modal-body .sa-select-check{display:none;color:#fff;background:#6658D3;border-radius:50%;width:19px;height:19px;align-items:center;justify-content:center;font-size:12px;font-weight:800;flex-shrink:0}#modal-body .sa-select-option .sa-select-check{margin-left:auto}#modal-body .sa-select-option.selected .sa-select-check{display:flex}#modal-body [data-course-item],#modal-body [data-practice-item],#modal-body [data-mock-item],#modal-body [data-resource-item]{display:none}#modal-body .sa-course-list [data-course-item]{display:block!important}#modal-body [data-course-item].sa-selected-item,#modal-body [data-practice-item].sa-selected-item,#modal-body [data-mock-item].sa-selected-item,#modal-body [data-resource-item].sa-selected-item{display:flex}#modal-body [data-course-item].sa-selected-item{display:block}



.fr-result-wrap{padding:4px 2px 2px;color:#1d2340}
.fr-result-top{display:flex;align-items:center;gap:13px;padding:4px 2px 18px;border-bottom:1px solid #ececf3}
.fr-result-check{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#e7f7ef;color:#16865d;font-size:23px;font-weight:800;flex:none}
.fr-result-top h3{margin:0 0 4px;font-size:18px;font-weight:800;color:#202342}
.fr-result-top p{margin:0;color:#7d8298;font-size:12px;line-height:1.5}
.fr-result-score-panel{display:flex;align-items:center;gap:22px;padding:22px 10px}
.fr-result-ring{width:112px;height:112px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--score-color) calc(var(--score)*1%),#eeedf4 0);position:relative;flex:none}
.fr-result-ring:before{content:"";position:absolute;inset:9px;border-radius:50%;background:#fff}
.fr-result-ring>div{position:relative;display:flex;flex-direction:column;align-items:center}
.fr-result-ring strong{font-size:25px;line-height:1.1;color:#242744}
.fr-result-ring span{font-size:11px;color:#85899d;margin-top:3px}
.fr-result-score-copy{display:flex;flex-direction:column;gap:3px}
.fr-result-score-copy>span{font-size:12px;color:#85899d}
.fr-result-score-copy>strong{font-size:30px;color:#242744;line-height:1.2}
.fr-result-score-copy>strong small{font-size:16px;color:#9296a8;font-weight:600}
.fr-result-score-copy em{font-size:12px;font-style:normal;color:var(--score-color)}
.fr-result-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.fr-result-stats>div{background:#f7f7fb;border:1px solid #ededf4;border-radius:12px;padding:13px 8px;display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0}
.fr-result-stats strong{font-size:19px;color:#252944}
.fr-result-stats small{font-size:10px;color:#85899d;text-align:center}
.fr-stat-icon{width:25px;height:25px;border-radius:8px;display:grid;place-items:center;font-weight:800}
.fr-stat-icon.green{background:#e5f6ed;color:#16865d}.fr-stat-icon.red{background:#fdecec;color:#d65353}.fr-stat-icon.gray{background:#eceef3;color:#777e91}.fr-stat-icon.purple{background:#efedff;color:#6758d5}
.fr-result-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #ececf3;margin-top:18px;padding-top:15px}
.fr-result-footer>span{font-size:11px;color:#7d8298;overflow-wrap:anywhere}
.fr-result-footer .btn-primary{min-width:100px}
@media(max-width:520px){.fr-result-score-panel{gap:14px;padding:18px 2px}.fr-result-ring{width:94px;height:94px}.fr-result-ring strong{font-size:22px}.fr-result-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.fr-result-footer{align-items:flex-start;flex-direction:column}.fr-result-footer .btn-primary{width:100%}}

/* Assigned practice/mock/resource controls in Student Activity */
.sa-assigned-access-card{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--border,#e5e9f2);border-radius:10px;background:#fff;margin:8px 0;}
.sa-assigned-access-card .sa-test-info{flex:1;min-width:0;}
.sa-assigned-access-card .sa-test-info small{display:block;margin-top:4px;}
.sa-assigned-access-card .sa-limit-field{width:150px;flex:0 0 150px;}
.sa-assigned-access-card .sa-limit-field input{width:100%;}
.sa-assigned-access-card .sa-course-remove-btn{flex:0 0 auto;}
/* Managed Practice/Mock/Resource cards: render as individual Course-style cards. */
#modal-body .sa-managed-card-list{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important;min-height:0!important;visibility:visible!important;}
#modal-body .sa-managed-card-list>.sa-managed-item-card{display:block!important;visibility:visible!important;opacity:1!important;width:100%;box-sizing:border-box;}
#modal-body .sa-managed-item-card .sa-managed-divider{height:1px;background:#EEF0F5;margin:8px 0;}
#modal-body .sa-managed-item-card .sa-course-metrics{display:flex!important;visibility:visible!important;opacity:1!important;flex-wrap:wrap;}
#modal-body .sa-managed-item-card .sa-course-top{display:flex!important;visibility:visible!important;opacity:1!important;}
/* Ensure assigned Practice/Mock/Free Resource cards remain visibly rendered in Student Activity. */
#modal-body section[data-managed-control]:not([hidden]){display:block!important;}
#modal-body .sa-test-list{display:block!important;min-height:42px!important;visibility:visible!important;}
#modal-body .sa-access-list{display:grid!important;min-height:42px!important;visibility:visible!important;}
#modal-body .sa-assigned-access-card{display:flex!important;visibility:visible!important;min-height:58px!important;opacity:1!important;background:#fff!important;color:#303A55!important;}
#modal-body .sa-assigned-access-card .sa-test-info{display:flex!important;visibility:visible!important;opacity:1!important;}
#modal-body .sa-assigned-access-card .sa-test-info strong,
#modal-body .sa-assigned-access-card .sa-test-info span,
#modal-body .sa-assigned-access-card .sa-test-info small{display:block!important;visibility:visible!important;opacity:1!important;}
@media(max-width:640px){.sa-assigned-access-card{flex-wrap:wrap;}.sa-assigned-access-card .sa-test-info{flex:1 1 calc(100% - 48px);}.sa-assigned-access-card .sa-limit-field{flex:1 1 150px;width:auto;}}


/* Student Help & Support full-page tab */
#view-student #s-support .panel-head{align-items:center;gap:16px}
#view-student .student-support-layout{display:grid;grid-template-columns:minmax(260px,.78fr) minmax(0,1.5fr);gap:18px;min-height:520px}
#view-student .student-support-list-card,#view-student .student-support-chat-card{background:#fff;border:1px solid #E6E8F0;border-radius:16px;box-shadow:0 8px 24px rgba(24,35,68,.05);min-width:0;overflow:hidden}
#view-student .student-support-list-head{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid #EEF0F5}
#view-student .student-support-list-head h3,#view-student .student-support-conversation-head h3{margin:0;font-size:15px;color:#1E1B39}
#view-student .student-support-list-head span{font-size:12px;color:#8990A5}
#view-student .student-support-thread-list{display:flex;flex-direction:column;max-height:600px;overflow:auto}
#view-student .student-support-thread{display:flex;flex-direction:column;gap:8px;width:100%;padding:16px 18px;text-align:left;border:0;border-bottom:1px solid #F0F1F5;background:#fff;cursor:pointer}
#view-student .student-support-thread:hover{background:#F8F8FD}
#view-student .student-support-thread.active{background:#F2F0FF;box-shadow:inset 3px 0 #6C5DD3}
#view-student .student-support-thread-top,#view-student .student-support-thread-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px}
#view-student .student-support-thread-top strong{color:#25243A;font-size:13px;overflow-wrap:anywhere}
#view-student .student-support-thread-preview{color:#7F879B;font-size:12px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#view-student .student-support-thread-bottom{color:#9AA1B2;font-size:11px}
#view-student .student-support-thread-bottom b{color:#6C5DD3}
#view-student .student-support-status{font-size:10px;font-weight:700;border-radius:30px;padding:4px 8px;white-space:nowrap;background:#E7F8EF;color:#21865C}
#view-student .student-support-status.resolved{background:#EEF0F5;color:#737B8E}
#view-student .student-support-empty{min-height:500px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px;text-align:center}
#view-student .student-support-empty-icon{width:58px;height:58px;display:grid;place-items:center;border-radius:18px;background:#F0EDFF;color:#6C5DD3;font-size:28px;font-weight:800;margin-bottom:16px}
#view-student .student-support-empty h3{margin:0 0 8px;color:#25243A;font-size:18px}
#view-student .student-support-empty p{max-width:340px;margin:0 0 20px;color:#858DA1;font-size:13px;line-height:1.6}
#view-student .student-support-conversation{display:flex;flex-direction:column;height:100%;min-height:500px}
#view-student .student-support-conversation-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px 20px;border-bottom:1px solid #EEF0F5}
#view-student .student-support-conversation-head span{display:inline-block;margin-top:5px;color:#8990A5;font-size:11px}
#view-student .student-support-messages{flex:1;display:flex;flex-direction:column;gap:12px;padding:20px;min-height:300px;max-height:480px;overflow:auto;background:#FAFBFE}
#view-student .student-support-message{max-width:82%;padding:12px 14px;border-radius:13px;font-size:13px;line-height:1.6;overflow-wrap:anywhere}
#view-student .student-support-message.mine{align-self:flex-end;background:#6C5DD3;color:#fff;border-bottom-right-radius:4px}
#view-student .student-support-message.theirs{align-self:flex-start;background:#fff;color:#34364A;border:1px solid #E8EAF1;border-bottom-left-radius:4px}
#view-student .student-support-message-meta{font-size:10px;opacity:.72;margin-bottom:5px}
#view-student .student-support-reply-form{display:flex;align-items:flex-end;gap:10px;padding:16px;border-top:1px solid #EEF0F5}
#view-student .student-support-reply-form textarea{flex:1;min-height:48px;max-height:120px;resize:vertical;border:1px solid #DDE1EB;border-radius:10px;padding:12px}
#view-student .student-support-new-form-wrap{margin-top:18px;background:#fff;border:1px solid #E6E8F0;border-radius:16px;padding:22px;box-shadow:0 8px 24px rgba(24,35,68,.05)}
#view-student .student-support-new-form-wrap form{display:flex;flex-direction:column;gap:14px;max-width:760px}
#view-student .student-support-form-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
#view-student .student-support-form-head h3{margin:0 0 5px;color:#25243A}
#view-student .student-support-form-head p{margin:0;color:#8990A5;font-size:12px}
#view-student .student-support-new-form-wrap label{display:flex;flex-direction:column;gap:7px;color:#454B60;font-size:12px;font-weight:700}
#view-student .student-support-new-form-wrap input,#view-student .student-support-new-form-wrap textarea{width:100%;border:1px solid #DDE1EB;border-radius:10px;padding:12px 14px;font:inherit;font-size:13px}
#view-student .student-support-no-threads{display:flex;flex-direction:column;gap:7px;padding:24px 18px;color:#7F879B;font-size:12px}
#view-student .student-support-no-threads strong{color:#34364A;font-size:13px}
@media(max-width:760px){#view-student .student-support-layout{grid-template-columns:1fr;min-height:0}#view-student .student-support-thread-list{max-height:260px}#view-student .student-support-conversation{min-height:430px}#view-student .student-support-empty{min-height:300px}#view-student .student-support-reply-form{flex-direction:column;align-items:stretch}#view-student .student-support-reply-form button{align-self:flex-end}}

/* Support request modal and attachment cards */
.support-request-form{display:flex;flex-direction:column;gap:16px}
.support-request-form label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:700;color:#394057}
.support-request-form input:not([type=file]),.support-request-form textarea{width:100%;box-sizing:border-box;border:1px solid #DDE1EB;border-radius:10px;padding:12px 14px;font:inherit;font-size:13px;background:#fff}
.support-request-form textarea{resize:vertical;min-height:120px}
.support-request-form-intro{margin-bottom:16px;color:#7D8498;font-size:13px;line-height:1.6}
.support-file-picker{padding:14px;border:1px dashed #C9CDE0;border-radius:12px;background:#FAFAFE}
.support-file-picker input[type=file]{font-size:12px;max-width:100%}
.support-file-picker small{font-size:11px;font-weight:400;color:#858DA1;line-height:1.5}
.optional-label{display:inline-block;margin-left:5px;color:#8990A5;font-size:10px;font-weight:600;text-transform:uppercase}
.support-file-name{font-size:12px;color:#5F55C8;overflow-wrap:anywhere}
.support-request-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:4px}
.support-popup-thread .support-popup-subject{display:flex;flex-direction:column;gap:5px;padding:12px 14px;margin-bottom:12px;border:1px solid #E7E9F1;border-radius:10px;background:#FAFBFE}
.support-popup-subject span{font-size:10px;letter-spacing:.08em;color:#8A91A4;font-weight:700}
.support-popup-subject strong{font-size:14px;color:#25243A}
.support-attachment{display:flex;align-items:center;gap:10px;margin-top:10px;padding:10px;border:1px solid rgba(120,130,150,.25);border-radius:9px;color:inherit;text-decoration:none;background:rgba(255,255,255,.72);max-width:100%}
.support-attachment:hover{filter:brightness(.97)}
.support-attachment-icon{flex:0 0 34px;height:34px;border-radius:8px;display:grid;place-items:center;background:#EEEAFE;color:#6657C8;font-size:9px;font-weight:800}
.support-attachment-info{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.support-attachment-info strong{font-size:11px;overflow-wrap:anywhere}
.support-attachment-info small{font-size:10px;opacity:.72;overflow-wrap:anywhere}
.support-attachment-action{font-size:10px;font-weight:700;white-space:nowrap;color:#6759C8}
@media(max-width:560px){.support-request-actions{flex-direction:column-reverse}.support-request-actions button{width:100%}.support-attachment{flex-wrap:wrap}.support-attachment-action{margin-left:44px}}
/* Student dashboard overview: enrolled courses and results side-by-side */
#view-student .sd-overview-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:stretch;margin-top:18px}
#view-student .sd-overview-panel{min-width:0;min-height:290px;background:#fff;border:1px solid #E7EAF2;border-radius:15px;box-shadow:0 7px 22px rgba(30,42,80,.045);overflow:hidden}
#view-student .sd-overview-panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:17px 18px;border-bottom:1px solid #EEF0F5}
#view-student .sd-overview-panel-head h2{margin:0;color:#202542;font-size:15px;font-weight:750}
#view-student .sd-overview-panel-head p{margin:5px 0 0;color:#8A91A5;font-size:11px}
#view-student .sd-overview-count{flex:0 0 auto;padding:5px 9px;border-radius:20px;background:#F1EFFF;color:#6658C8;font-size:10px;font-weight:700}
#view-student .sd-overview-list{display:flex;flex-direction:column;padding:5px 16px}
#view-student .sd-overview-course-item,#view-student .sd-overview-result-item{display:flex;align-items:center;gap:11px;padding:15px 2px;border-bottom:1px solid #F0F1F5;min-width:0}
#view-student .sd-overview-course-item:last-child,#view-student .sd-overview-result-item:last-child{border-bottom:0}
#view-student .sd-overview-item-icon{flex:0 0 36px;width:36px;height:36px;border-radius:10px;display:grid;place-items:center}
#view-student .sd-overview-item-icon svg{width:18px;height:18px}
#view-student .sd-course-item-icon{background:#F0EDFF;color:#6C5DD3}
#view-student .sd-result-item-icon{background:#E8F8F1;color:#15966B}
#view-student .sd-overview-item-main{display:flex;flex:1;min-width:0;flex-direction:column;gap:5px}
#view-student .sd-overview-item-main>strong{font-size:12px;color:#252943;line-height:1.4;overflow-wrap:anywhere}
#view-student .sd-overview-item-main>span{font-size:10px;color:#8991A5;line-height:1.4}
#view-student .sd-overview-progress{height:5px;width:100%;max-width:190px;border-radius:10px;background:#ECEEF5;overflow:hidden;margin-top:2px}
#view-student .sd-overview-progress i{display:block;height:100%;border-radius:10px;background:#6C5DD3}
#view-student .sd-overview-open-btn{flex:0 0 auto;border:1px solid #E0DDF5;border-radius:8px;background:#F8F7FF;color:#6255C6;padding:7px 11px;font-size:10px;font-weight:700;cursor:pointer}
#view-student .sd-overview-open-btn:hover{background:#EEEBFF}
#view-student .sd-overview-result-score{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:1px}
#view-student .sd-overview-result-score b{font-size:11px;color:#202542}
#view-student .sd-overview-result-score>span{font-size:10px;color:#68718A}
#view-student .sd-overview-result-score em{font-style:normal;font-size:9px;font-weight:700;padding:3px 7px;border-radius:20px}
#view-student .sd-overview-result-score em.is-pass{background:#E8F8F1;color:#16845E}
#view-student .sd-overview-result-score em.is-review{background:#FFF4E4;color:#B87918}
#view-student .sd-overview-empty{min-height:210px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:22px}
#view-student .sd-overview-empty-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:#F2F0FF;color:#6C5DD3;font-size:20px;margin-bottom:10px}
#view-student .sd-overview-empty strong{font-size:12px;color:#343A55}
#view-student .sd-overview-empty p{margin:5px 0 0;font-size:10px;color:#9299AA;line-height:1.5}
@media(max-width:900px){#view-student .sd-overview-columns{grid-template-columns:1fr}}
@media(max-width:520px){#view-student .sd-overview-panel-head{padding:14px}#view-student .sd-overview-list{padding:4px 12px}#view-student .sd-overview-course-item,#view-student .sd-overview-result-item{gap:8px}#view-student .sd-overview-open-btn{padding:6px 8px}}


/* Admin overview: Students / Enrolled Students */
#view-admin .admin-overview-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;margin-top:22px;align-items:start}
#view-admin .admin-overview-panel{min-width:0;background:#fff;border:1px solid #E5E8F0;border-radius:15px;box-shadow:0 7px 22px rgba(25,35,65,.045);overflow:hidden}
#view-admin .admin-overview-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px;border-bottom:1px solid #EEF0F5}
#view-admin .admin-overview-panel-head h3{margin:0;color:#20213A;font-size:16px;font-weight:700}
#view-admin .admin-overview-panel-head p{margin:5px 0 0;color:#8991A5;font-size:11px}
#view-admin .admin-overview-count{flex-shrink:0;padding:6px 10px;border-radius:20px;background:#F0EEFF;color:#6658C8;font-size:11px;font-weight:700}
#view-admin .admin-overview-list{padding:4px 18px;max-height:420px;overflow:auto}
#view-admin .admin-overview-student-row{display:flex;align-items:center;gap:11px;padding:13px 2px;border-bottom:1px solid #F0F1F5;min-width:0}
#view-admin .admin-overview-student-row:last-child{border-bottom:0}
#view-admin .admin-overview-avatar{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:11px;background:#EFEDFF;color:#6558C8;font-size:13px;font-weight:800}
#view-admin .admin-overview-student-main{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
#view-admin .admin-overview-student-main strong{color:#25263B;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#view-admin .admin-overview-student-main span{color:#8991A5;font-size:10px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#view-admin .admin-overview-status{flex-shrink:0;padding:4px 8px;border-radius:20px;font-size:9px;font-weight:700;background:#E8F8F0;color:#23845D}
#view-admin .admin-overview-status.pending{background:#FFF4DF;color:#A66A12}
#view-admin .admin-overview-status.blocked{background:#FDECEC;color:#C34B4B}
#view-admin .admin-overview-empty{display:flex;flex-direction:column;gap:6px;align-items:center;text-align:center;padding:36px 15px;color:#8991A5;font-size:11px}
#view-admin .admin-overview-empty strong{color:#44475C;font-size:13px}
@media(max-width:760px){#view-admin .admin-overview-columns{grid-template-columns:1fr;gap:14px}#view-admin .admin-overview-list{max-height:320px}#view-admin .admin-overview-panel-head{padding:15px}}

/* Enrollment navigation notifications for Admin */
#view-admin .admin-enrollment-nav{display:flex;align-items:center;gap:9px}
#view-admin .admin-enrollment-nav-label{flex:1;text-align:left}
#view-admin .admin-enrollment-nav-badge{display:inline-flex;align-items:center;justify-content:center;min-width:19px;height:19px;padding:0 6px;box-sizing:border-box;border-radius:20px;background:#E5484D;color:#fff;font-size:10px;font-weight:800;line-height:1;box-shadow:0 2px 6px rgba(229,72,77,.22)}
#view-admin .admin-enrollment-nav-badge.hidden{display:none}
#view-admin .request-count-notify{display:inline-flex;align-items:center;justify-content:center;min-height:25px;padding:5px 10px;border-radius:20px;background:#F0F1F5;color:#777F92;font-size:11px;font-weight:700;white-space:nowrap}
#view-admin .request-count-notify.has-notifications{background:#FFF0F0;color:#D23F48;box-shadow:inset 0 0 0 1px rgba(210,63,72,.12)}
#view-admin .admin-enrollment-nav:not(.active) .admin-enrollment-nav-badge{background:#E5484D}
#view-admin .admin-enrollment-nav.active .admin-enrollment-nav-badge{background:#fff;color:#D23F48}

/* Student course player: lesson navigation left, lesson content right */
#view-student .cv-layout { flex-direction: row-reverse; gap: 22px; }
#view-student .cv-side { width: 330px; flex: 0 0 330px; }
#view-student .cv-main { flex: 1 1 auto; min-width: 0; }
#view-student .cv-lesson-item { cursor: pointer; }
#view-student .cv-lesson-complete-mark {
  width: 21px; height: 21px; flex: 0 0 21px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid #C9CEDB; color: transparent; font-size: 12px; font-weight: 800;
}
#view-student .cv-lesson-item.is-completed .cv-lesson-complete-mark {
  background: #1F9D6C; border-color: #1F9D6C; color: #fff;
}
#view-student .cv-lesson-item.active.is-completed .cv-lesson-complete-mark {
  background: #fff; border-color: #fff; color: #1F9D6C;
}
#view-student .cv-lesson-complete-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #EEF0F6;
}
#view-student .cv-lesson-complete-hint { color: #8990A8; font-size: 12px; }
#view-student .cv-btn-lesson-complete {
  flex: 0 0 auto; border: 0; border-radius: 9px; padding: 10px 16px;
  background: #1F9D6C; color: #fff; font-size: 12px; font-weight: 700; cursor: pointer;
}
#view-student .cv-btn-lesson-complete:hover { background: #17825A; }
#view-student .cv-btn-lesson-complete.is-done { background: #E8F7F0; color: #168257; cursor: default; }
#view-student .cv-btn-lesson-complete:disabled { opacity: 1; }
#view-student .cv-btn-complete:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 860px) {
  #view-student .cv-layout { flex-direction: column; }
  #view-student .cv-side { width: 100%; flex: 1 1 auto; order: 0; }
  #view-student .cv-main { width: 100%; order: 1; }
}

/* Course editor: independent scrolling for the lesson list and editor workspace */
@media (min-width: 951px) {
  .admin-course-editor-overlay {
    overflow: hidden !important;
  }
  .admin-course-editor-shell {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  .admin-course-editor-top {
    flex: 0 0 72px;
  }
  .admin-course-editor-body {
    flex: 1 1 auto;
    min-height: 0;
    height: calc(100% - 72px);
    overflow: hidden;
    box-sizing: border-box;
  }
  .admin-course-editor-grid {
    height: 100%;
    min-height: 0;
    align-items: stretch;
    overflow: hidden;
  }
  .admin-course-editor-grid > .admin-course-editor-side {
    height: 100%;
    min-height: 0;
    position: static;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
  .admin-course-editor-grid > .admin-course-editor-main {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-right: 3px;
    box-sizing: border-box;
  }
  .admin-lesson-list {
    overflow: visible;
  }
}
@media (max-width: 950px) {
  .admin-course-editor-overlay {
    overflow-y: auto !important;
  }
  .admin-course-editor-body,
  .admin-course-editor-grid,
  .admin-course-editor-grid > .admin-course-editor-side,
  .admin-course-editor-grid > .admin-course-editor-main {
    height: auto;
    min-height: 0;
    overflow: visible;
  }
}

/* Student course player: keep the page frame fixed and scroll lesson list/content independently */
@media (min-width: 951px) {
  #view-student .sd-main.content:has(#s-course-view:not(.hidden)) {
    height: 100vh !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  #view-student .sd-main.content:has(#s-course-view:not(.hidden)) > .sd-topbar {
    flex: 0 0 auto !important;
  }
  #view-student #s-course-view:not(.hidden) {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  #view-student #s-course-view .cv-breadcrumb,
  #view-student #s-course-view .cv-header,
  #view-student #s-course-view .cv-footer-progress {
    flex: 0 0 auto !important;
  }
  #view-student #s-course-view .cv-layout {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    align-items: stretch !important;
    overflow: hidden !important;
  }
  #view-student #s-course-view .cv-side {
    min-height: 0 !important;
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
  #view-student #s-course-view .cv-main {
    min-height: 0 !important;
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-right: 3px;
    box-sizing: border-box;
  }
}
@media (max-width: 950px) {
  #view-student .sd-main.content:has(#s-course-view:not(.hidden)) {
    height: auto !important;
    overflow-y: auto !important;
  }
  #view-student #s-course-view:not(.hidden),
  #view-student #s-course-view .cv-layout,
  #view-student #s-course-view .cv-side,
  #view-student #s-course-view .cv-main {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
}

/* Unified Practice Tests and Mock Tests UI across Student, Admin */
.quiz-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; }
.quiz-panel-heading h2 { margin:0 0 5px; color:#20243d; font-size:22px; font-weight:800; letter-spacing:-.35px; }
.quiz-panel-heading p { margin:0; color:#858da2; font-size:12px; line-height:1.5; }
.quiz-panel-total { display:inline-flex; align-items:center; justify-content:center; padding:7px 12px; min-width:70px; border-radius:30px; background:#f0edff; color:#6657ce; font-size:11px; font-weight:800; white-space:nowrap; }
.quiz-admin-head-actions { display:flex; align-items:center; gap:12px; }
.quiz-card-grid, .quiz-admin-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(265px,1fr)); gap:16px; align-items:stretch; }
.quiz-student-card, .quiz-admin-card { min-width:0; display:flex; flex-direction:column; padding:19px; border:1px solid #e7e8f0; border-radius:15px; background:#fff; box-shadow:0 5px 18px rgba(29,38,70,.045); transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.quiz-student-card:hover, .quiz-admin-card:hover { transform:translateY(-2px); border-color:#d8d3fb; box-shadow:0 10px 25px rgba(38,42,82,.09); }
.quiz-student-card-top, .quiz-admin-card-top { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:15px; }
.quiz-card-icon { width:38px; height:38px; flex:0 0 38px; display:grid; place-items:center; border-radius:11px; font-size:17px; font-weight:800; background:#efedff; color:#6758d3; }
.quiz-card-icon.mock { background:#e6f5ef; color:#188261; }
.quiz-type-pill { display:inline-flex; align-items:center; padding:6px 10px; border-radius:30px; background:#f0edff; color:#6657ce; font-size:10px; font-weight:800; white-space:nowrap; }
.quiz-type-pill.mock { background:#e8f6f0; color:#187d60; }
.quiz-student-card h3, .quiz-admin-card h3 { margin:0 0 7px; color:#242842; font-size:15px; line-height:1.45; font-weight:800; overflow-wrap:anywhere; }
.quiz-card-course { margin:0 0 15px; color:#858da2; font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
.quiz-card-metadata { display:flex; flex-wrap:wrap; gap:7px; margin-top:auto; padding:12px 0 14px; border-top:1px solid #f0f1f5; }
.quiz-card-metadata span { display:inline-flex; align-items:center; gap:4px; padding:6px 8px; border-radius:7px; background:#f7f8fb; color:#687087; font-size:10px; font-weight:650; }
.quiz-student-card-footer { display:flex; align-items:center; padding-top:2px; }
.quiz-start-button { width:100%; display:flex; align-items:center; justify-content:center; gap:9px; border:0; border-radius:9px; padding:11px 14px; background:#695bd5; color:#fff; font-size:11px; font-weight:800; cursor:pointer; transition:background .15s ease,transform .15s ease; }
.quiz-start-button:hover { background:#5849c3; transform:translateY(-1px); }
.quiz-start-button.mock { background:#188365; }
.quiz-start-button.mock:hover { background:#116d53; }
.quiz-start-button span { font-size:16px; line-height:10px; }
.quiz-access-pending { width:100%; padding:10px 12px; border-radius:9px; background:#fff6e7; color:#a16a18; text-align:center; font-size:10px; font-weight:750; }
.quiz-admin-card-actions { display:flex; gap:9px; padding-top:2px; }
.quiz-edit-button, .quiz-delete-button { flex:1; border:1px solid #e3e4ed; border-radius:8px; padding:9px 12px; background:#f8f8fb; color:#343951; font-size:11px; font-weight:750; cursor:pointer; }
.quiz-edit-button:hover { background:#efedff; border-color:#d9d3ff; color:#5f50c7; }
.quiz-delete-button { background:#fff5f4; border-color:#f3d8d5; color:#c14e46; }
.quiz-delete-button:hover { background:#ffebea; border-color:#edc1bd; }
.quiz-empty-state { grid-column:1/-1; display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:190px; padding:28px 18px; border:1px dashed #dfe1eb; border-radius:14px; background:#fff; text-align:center; }
.quiz-empty-icon { width:42px; height:42px; display:grid; place-items:center; margin-bottom:10px; border-radius:12px; background:#f0edff; color:#695bd5; font-size:20px; font-weight:800; }
.quiz-empty-state strong { color:#343951; font-size:13px; }
.quiz-empty-state p { margin:6px 0 0; max-width:330px; color:#9299aa; font-size:11px; line-height:1.5; }
#view-admin #a-quizzes .panel-head, #view-admin #a-mock-tests .panel-head { align-items:center; gap:16px; }
#view-admin #a-quizzes .panel-head h2, #view-admin #a-mock-tests .panel-head h2 { margin-bottom:5px; font-size:21px; font-weight:800; letter-spacing:-.3px; }
#view-admin #a-quizzes .panel-head p, #view-admin #a-mock-tests .panel-head p { color:#858da2; font-size:12px; }
@media(max-width:700px) {
  .quiz-panel-heading { align-items:flex-start; }
  .quiz-panel-heading h2 { font-size:19px; }
  .quiz-admin-head-actions { flex-wrap:wrap; justify-content:flex-end; }
  .quiz-card-grid, .quiz-admin-grid { grid-template-columns:1fr; gap:12px; }
  .quiz-student-card, .quiz-admin-card { padding:16px; }
  #view-admin #a-quizzes .panel-head, #view-admin #a-mock-tests .panel-head { align-items:flex-start; flex-direction:column; }
  #view-admin #a-quizzes .quiz-admin-head-actions, #view-admin #a-mock-tests .quiz-admin-head-actions { width:100%; justify-content:space-between; }
}

/* Results & Scores refreshed UI for Student, Admin */
.results-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
/* Preserve the admin heading card's inset from its accent stripe. */
#view-admin #a-results > .results-panel-heading{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center!important;gap:16px!important;padding:20px 24px!important;min-width:0;max-width:100%;height:auto}
#view-admin #a-results > .results-panel-heading > div{min-width:0}
#view-admin #a-results > .results-panel-heading h2,#view-admin #a-results > .results-panel-heading p{white-space:normal;overflow-wrap:anywhere}
#view-admin #a-results > .results-panel-heading .results-total-pill{justify-self:end;flex-shrink:0}
@media(max-width:600px){#view-admin #a-results > .results-panel-heading{grid-template-columns:minmax(0,1fr);gap:12px!important;padding:16px 18px!important}#view-admin #a-results > .results-panel-heading .results-total-pill{justify-self:start}}
.results-panel-heading h2{margin:0 0 5px;color:#20243d;font-size:22px;font-weight:800;letter-spacing:-.35px}
.results-panel-heading p{margin:0;color:#858da2;font-size:12px;line-height:1.5}
.results-total-pill{display:inline-flex;align-items:center;justify-content:center;min-width:78px;padding:7px 12px;border-radius:30px;background:#f0edff;color:#6657ce;font-size:11px;font-weight:800;white-space:nowrap}
.results-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(275px,1fr));gap:16px;align-items:stretch}
.result-card{min-width:0;display:flex;flex-direction:column;padding:18px;border:1px solid #e7e8f0;border-radius:15px;background:#fff;box-shadow:0 5px 18px rgba(29,38,70,.045);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.result-card:hover{transform:translateY(-2px);border-color:#d8d3fb;box-shadow:0 10px 25px rgba(38,42,82,.08)}
.result-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}
.result-card-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:#efedff;color:#695bd5;font-size:17px;font-weight:800}
.result-kind-pill{max-width:68%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:6px 9px;border-radius:30px;background:#f5f4fb;color:#716b9b;font-size:10px;font-weight:750}
.result-card h3{margin:0 0 14px;color:#242842;font-size:15px;line-height:1.45;font-weight:800;overflow-wrap:anywhere}
.result-score-block{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-top:auto}
.result-score-block>div{display:flex;flex-direction:column;gap:4px}
.result-muted-label{color:#9299aa;font-size:10px;font-weight:650}
.result-score-block strong{color:#252942;font-size:21px;font-weight:850;line-height:1.2}
.result-score-block strong small{color:#9299aa;font-size:12px;font-weight:600}
.result-percent{color:#6758d3;font-size:20px;font-weight:850}
.result-progress-track{height:7px;margin:11px 0 14px;overflow:hidden;border-radius:20px;background:#efeff5}
.result-progress-track span{display:block;height:100%;border-radius:20px;background:linear-gradient(90deg,#8172ec,#5d50ca)}
.result-card-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:12px;border-top:1px solid #f0f1f5}
.result-date{min-width:0;color:#8b92a5;font-size:10px;line-height:1.4}
.result-view-button{flex:0 0 auto;display:inline-flex;align-items:center;gap:7px;border:1px solid #e0dcfb;border-radius:8px;padding:8px 10px;background:#f5f3ff;color:#6254ca;font-size:10px;font-weight:800;cursor:pointer}
.result-view-button:hover{background:#ebe8ff}
.result-view-button b{font-size:14px}
.admin-result-student{display:flex;align-items:center;gap:9px;margin:-3px 0 14px}
.result-student-avatar{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:#eaf5f1;color:#188261;font-size:12px;font-weight:800}
.admin-result-student>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.admin-result-student strong{color:#3b4057;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.admin-result-student small{color:#9299aa;font-size:9px}
.results-empty-state{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:205px;padding:28px 18px;border:1px dashed #dfe1eb;border-radius:14px;background:#fff;text-align:center}
.results-empty-icon{width:44px;height:44px;display:grid;place-items:center;margin-bottom:11px;border-radius:12px;background:#f0edff;color:#695bd5;font-size:20px}
.results-empty-state strong{color:#343951;font-size:13px}
.results-empty-state p{margin:6px 0 0;max-width:340px;color:#9299aa;font-size:11px;line-height:1.5}
@media(max-width:700px){.results-panel-heading{align-items:flex-start}.results-panel-heading h2{font-size:19px}.results-card-grid{grid-template-columns:1fr;gap:12px}.result-card{padding:16px}.result-card-bottom{align-items:flex-start}.result-date{max-width:55%}}

/* Global typography: Poppins across Student, Admin panels */
html, body, body *:not(svg):not(svg *) {
  font-family: 'Poppins', sans-serif !important;
}
button, input, select, textarea {
  font-family: 'Poppins', sans-serif !important;
}


/* Mobile authentication: logo only above Login / Signup. Desktop remains unchanged. */
@media (max-width: 900px) {
  #view-auth .auth-brand {
    width: 100% !important; padding: 24px 20px 0 !important;
    background: transparent !important; color: var(--ink) !important;
    align-items: center !important; justify-content: center !important;
  }
  #view-auth .auth-brand .tagline,
  #view-auth .auth-brand .brand-points { display: none !important; }
  #view-auth .brand-logo-box {
    margin: 0 auto !important; padding: 8px 12px !important; background: #fff !important;
  }
  #view-auth .brand-logo-img {
    display: block !important; width: auto !important;
    max-width: min(260px, 75vw) !important; max-height: 76px !important;
    object-fit: contain !important;
  }
  #view-auth .auth-panel { padding: 18px 24px 30px !important; }
}
@media (max-width: 480px) {
  #view-auth .auth-brand { padding: 18px 16px 0 !important; }
  #view-auth .brand-logo-img { max-width: min(230px, 72vw) !important; max-height: 66px !important; }
  #view-auth .auth-panel { padding: 16px 20px 26px !important; }
}


/* Admin Students: card rows fit phones without clipping table columns. */
#view-admin #a-students .student-action-label { display:none; }
@media (max-width:900px) {
 #view-admin #a-students, #view-admin #a-students .panel-head { min-width:0; max-width:100%; }
 #view-admin #a-students .panel-head { display:grid!important; grid-template-columns:minmax(0,1fr) auto; align-items:start; height:auto!important; min-height:0!important; gap:14px; }
 #view-admin #a-students .panel-head > div { min-width:0; width:auto!important; }
 #view-admin #a-students #btn-add-student { min-height:44px; white-space:normal; }
 #view-admin #a-students .data-table { display:block; width:100%; min-width:0!important; max-width:100%; border-spacing:0; table-layout:fixed; }
 #view-admin #a-students .data-table thead { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
 #view-admin #students-body { display:grid; grid-template-columns:minmax(0,1fr); gap:14px; width:100%; }
 #view-admin #students-body tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; min-width:0; height:auto; padding:4px 16px; border:1px solid #E5E8F2; border-radius:14px; background:#fff; box-shadow:0 5px 18px -12px rgba(30,27,57,.18); }
 #view-admin #students-body td { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:6px; min-width:0; width:auto; max-width:100%; padding:12px 0!important; border:0; border-radius:0!important; white-space:normal!important; overflow-wrap:anywhere; word-break:normal; font-size:13px; line-height:1.55; }
 #view-admin #students-body td::before { content:attr(data-label); font-size:10px; font-weight:700; line-height:1.4; letter-spacing:.045em; text-transform:uppercase; color:#8991A7; }
 #view-admin #students-body td:nth-child(2) { grid-column:1/-1; order:-2; padding-top:15px!important; padding-bottom:4px!important; color:#202744; font-size:17px; font-weight:700; }
 #view-admin #students-body td:nth-child(2)::before { display:none; }
 #view-admin #students-body td:first-child { grid-column:1/-1; order:-1; padding-top:0!important; color:#8991A7; font-size:11px; }
 #view-admin #students-body td:first-child::before { display:none; }
 #view-admin #students-body td:nth-child(3), #view-admin #students-body td:nth-child(4) { grid-column:1/-1; border-top:1px solid #F0F2F7; }
 #view-admin #students-body td:nth-child(3) { display:block; }
 #view-admin #students-body td:nth-child(3)::before { display:block; margin-bottom:6px; }
 #view-admin #students-body td:nth-child(5), #view-admin #students-body td:nth-child(6) { border-top:1px solid #F0F2F7; }
 #view-admin #students-body td.student-progress-cell { text-align:left; }
 #view-admin #students-body td.student-row-actions { grid-column:1/-1; border-top:1px solid #F0F2F7; padding-bottom:15px!important; }
 #view-admin #students-body td.student-row-actions::before { display:none; }
 #view-admin #a-students .student-action-trigger { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; height:auto; min-height:44px; padding:11px 14px; border-radius:10px; background:#F3F0FF; border-color:#E1DBFF; }
 #view-admin #a-students .student-action-label { display:inline; font-size:12px; font-weight:700; }
 #view-admin #a-students .student-action-trigger svg { flex-shrink:0; }
}
@media(max-width:600px) {
 #modal-body .sa-shell { min-width:0; max-width:100%; }
 #modal-body .sa-profile, #modal-body .sa-course-top, #modal-body .sa-section-head, #modal-body .sa-test-row { flex-wrap:wrap; }
 #modal-body .sa-profile-copy, #modal-body .sa-course-name, #modal-body .sa-test-info { overflow-wrap:anywhere; }
 #modal-body .sa-course-actions { flex-wrap:wrap; margin-left:0; }
 #modal-body .sa-control-tabs { flex-wrap:wrap; }
 #modal-body .sa-control-tab { flex:1 1 calc(50% - 8px); min-width:0; white-space:normal; min-height:44px; }
 #modal-body .sa-course-name strong, #modal-body .sa-test-info strong { overflow-wrap:anywhere; }
}

@media(max-width:480px){
 #view-admin #a-students .panel-head{grid-template-columns:minmax(0,1fr) auto!important;gap:8px;padding:15px 12px!important;align-items:start!important}
 #view-admin #a-students .panel-head > div{min-width:0;min-height:0!important;height:auto!important}
 #view-admin #a-students .panel-head h2{font-size:18px;margin:0}
 #view-admin #a-students .panel-head p{font-size:11px;line-height:1.5;margin-bottom:0;white-space:normal}
 #view-admin #a-students #btn-add-student{width:auto!important;min-width:0!important;min-height:40px;align-self:start;margin:0!important;padding:10px 11px!important;font-size:11px!important;white-space:nowrap}
}

/* Admin student search stays above the existing table/cards. */
#view-admin #a-students .admin-student-search-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 18px}
#view-admin #a-students .admin-student-search-field{flex:1 1 280px;max-width:520px;min-width:0}
#view-admin #a-students .admin-student-search-field label{display:block;font-size:12px;font-weight:600;color:#59627A;margin-bottom:7px}
#view-admin #a-students .admin-student-search-input{display:flex;align-items:center;gap:8px}
#view-admin #a-students #admin-student-search{min-width:0;flex:1;width:100%;height:44px;padding:10px 12px;border:1px solid #DFE3EE;border-radius:10px;background:#fff;color:#202744;font-size:13px}
#view-admin #a-students #admin-student-search:focus{outline:2px solid #C9C1FF;outline-offset:2px;border-color:#7768DE}
#view-admin #a-students #admin-student-search-clear{height:44px;padding:10px 13px;border:1px solid #DFE3EE;border-radius:10px;background:#fff;color:#6658D3;font-size:12px;font-weight:600;cursor:pointer}
#view-admin #a-students #admin-student-search-count{font-size:12px;color:#8991A7;margin:0 0 12px;white-space:nowrap}
#view-admin #students-body .students-empty-row td{text-align:center;padding:26px!important;color:#8991A7}
@media(max-width:900px){#view-admin #a-students .admin-student-search-field{max-width:none}#view-admin #a-students #admin-student-search-count{margin:0}#view-admin #students-body .students-empty-row{display:block}#view-admin #students-body .students-empty-row td{display:block}#view-admin #students-body .students-empty-row td::before{display:none}}

/* Course videos keep a stable 16:9 size rather than scaling across ultrawide screens. */
#view-student #s-course-view .cv-player.is-video{
 width:100%;max-width:960px;aspect-ratio:16/9;height:auto!important;min-height:0!important;
 display:block;overflow:hidden;margin-left:auto;margin-right:auto;box-sizing:border-box;
}
#view-student #s-course-view .cv-player.is-video > iframe,
#view-student #s-course-view .cv-player.is-video > video{
 display:block;width:100%!important;height:100%!important;aspect-ratio:auto!important;
 min-height:0!important;max-height:none;object-fit:contain;border:0;
}
@media(min-width:951px){
 #view-student #s-course-view .cv-player.is-video{width:min(100%,960px,calc(max(200px,100dvh - 240px)*1.777778))}
 #view-student #s-course-view .cv-main:has(.cv-player.is-video) .cv-lesson-card{max-width:960px;margin-left:auto;margin-right:auto}
}

#modal-body .sa-login-ip{background:#fff;border:1px solid #E9ECF4;border-radius:12px;padding:13px 14px;margin-bottom:16px;font-size:12px;color:#39435F}#modal-body .sa-login-ip>strong{display:block;margin-bottom:9px}#modal-body .sa-login-ip>div{display:flex;justify-content:space-between;gap:12px;margin:6px 0;flex-wrap:wrap}#modal-body .sa-login-ip b{font-weight:600;overflow-wrap:anywhere;min-width:0}#modal-body .sa-login-ip small{display:block;color:#8991A7;line-height:1.5;margin-top:9px}#modal-body .sa-login-ip p{color:#B0432E;margin:8px 0}
