:root {
  --app-bg: #f3f6fb;
  --app-surface: #ffffff;
  --app-surface-2: #f8fbff;
  --app-text: #111827;
  --app-muted: #64748b;
  --app-border: #dbe5f1;
  --app-primary: #1769c2;
  --app-primary-dark: #0f4c81;
  --app-primary-soft: #e8f3ff;
  --app-danger: #dc2626;
  --app-success: #059669;
  --app-warning: #d97706;
  --app-radius: 8px;
  --app-shadow: 0 12px 34px rgba(15, 23, 42, .08);
  --app-shadow-sm: 0 4px 16px rgba(15, 23, 42, .06);
}

@view-transition {
  navigation: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

* { min-width: 0; }

body {
  background:
    radial-gradient(circle at top left, rgba(56, 163, 255, .08), transparent 34rem),
    var(--app-bg);
  color: var(--app-text);
  font-feature-settings: "kern";
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-underline-offset: .18em; }

.skip-link {
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 1080;
  transform: translateY(-150%);
  padding: .55rem .8rem;
  border-radius: 6px;
  color: #fff;
  background: #0f172a;
}

.skip-link:focus { transform: translateY(0); }

.app-main {
  width: min(100%, 1560px);
  margin: 0 auto;
  padding: 1.4rem clamp(.8rem, 2vw, 1.8rem) 2.5rem;
  flex: 1 0 auto;
}

.app-footer {
  width: 100%;
  margin-top: auto;
  padding: 0;
}

.app-footer-inner {
  align-items: center;
  background:
    radial-gradient(circle at 76% -90%, rgba(103, 232, 249, .3), transparent 38%),
    radial-gradient(circle at 12% 160%, rgba(59, 130, 246, .42), transparent 42%),
    linear-gradient(112deg, #062b55 0%, #0b4e91 48%, #126cc6 100%);
  box-shadow: 0 -10px 30px rgba(15, 76, 129, .16);
  color: #fff;
  display: flex;
  justify-content: center;
  min-height: 102px;
  overflow: hidden;
  padding: 1rem max(clamp(.8rem, 2vw, 1.8rem), calc((100vw - 1560px) / 2 + 1.8rem));
  position: relative;
}

.app-footer-inner::before {
  background-image: radial-gradient(circle, rgba(255, 255, 255, .7) 1px, transparent 1.2px);
  background-size: 18px 18px;
  content: "";
  inset: 0 0 0 52%;
  mask-image: linear-gradient(90deg, transparent, #000);
  opacity: .08;
  pointer-events: none;
  position: absolute;
}

.footer-identity {
  align-items: center;
  backdrop-filter: blur(16px);
  background: linear-gradient(135deg, rgba(2, 27, 58, .52), rgba(16, 96, 170, .3));
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    0 18px 42px rgba(2, 24, 52, .24);
  display: grid;
  gap: .75rem;
  grid-template-columns: auto auto;
  max-width: 720px;
  padding: .58rem;
  position: relative;
  width: min(100%, 720px);
  z-index: 1;
}

.footer-brand,
.footer-credit {
  align-items: center;
  display: flex;
  min-width: 0;
}

.footer-brand {
  gap: .8rem;
  padding: .35rem .5rem .35rem .3rem;
}

.footer-mark {
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
  border: 2px solid rgba(255, 255, 255, .95);
  border-radius: 13px;
  box-shadow: 0 14px 30px rgba(3, 24, 52, .34), inset 0 0 0 1px rgba(37, 99, 235, .08);
  color: #fff;
  display: grid;
  flex: 0 0 auto;
  height: 54px;
  place-items: center;
  padding: 5px;
  width: 54px;
}

.footer-mark img {
  border-radius: 6px;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.footer-brand strong {
  color: #fff;
  display: block;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .01em;
}

.footer-brand > div > span {
  color: rgba(255, 255, 255, .78);
  display: block;
  font-size: .8rem;
  font-weight: 700;
  margin-top: .16rem;
}

.footer-credit {
  background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(103, 232, 249, .1));
  border: 1px solid rgba(165, 243, 252, .24);
  border-radius: 15px;
  color: #fff;
  gap: .65rem;
  min-height: 64px;
  padding: .5rem .55rem;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.footer-credit-icon {
  align-items: center;
  background: linear-gradient(145deg, #cffafe, #bfdbfe);
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 11px;
  color: #075985;
  display: inline-flex;
  flex: 0 0 40px;
  font-size: .95rem;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.footer-credit-copy {
  display: block;
  min-width: 0;
}

.footer-credit-copy small,
.footer-credit-copy strong,
.footer-credit-copy em {
  display: block;
  line-height: 1.1;
}

.footer-credit-copy small {
  color: rgba(207, 250, 254, .82);
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.footer-credit-copy strong {
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  margin-top: .18rem;
}

.footer-credit-copy em {
  color: rgba(255, 255, 255, .68);
  font-size: .68rem;
  font-style: normal;
  font-weight: 650;
  margin-top: .2rem;
  white-space: nowrap;
}

.footer-credit-action {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  color: #cffafe;
  display: inline-flex;
  flex: 0 0 30px;
  height: 30px;
  justify-content: center;
  margin-left: auto;
  transition: background-color .18s ease, transform .18s ease;
  width: 30px;
}

.footer-credit:hover,
.footer-credit:focus-visible {
  background: linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(103, 232, 249, .16));
  border-color: rgba(165, 243, 252, .5);
  box-shadow: 0 12px 28px rgba(2, 24, 52, .24);
  color: #fff;
  transform: translateY(-2px);
}

.footer-credit:hover .footer-credit-action,
.footer-credit:focus-visible .footer-credit-action {
  background: rgba(207, 250, 254, .14);
  transform: translateX(2px);
}

.footer-credit:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.app-toast-container {
  position: fixed;
  right: 1rem;
  top: 4.4rem;
  z-index: 1090;
}

.app-toast {
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, .18);
  min-width: min(360px, calc(100vw - 2rem));
}

.app-toast .toast-body {
  align-items: center;
  display: flex;
  gap: .65rem;
  font-weight: 750;
}

.navbar-gradient {
  background: linear-gradient(90deg, #0f4c81 0%, #1769c2 52%, #38a3ff 100%);
  box-shadow: 0 2px 14px rgba(15, 76, 129, .22);
}

.navbar-gradient,
.navbar-gradient * {
  -webkit-tap-highlight-color: transparent;
}

.navbar-logo-badge {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  padding: 2px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff 0%, #dbeafe 42%, #38a3ff 100%);
  box-shadow: 0 3px 10px rgba(3, 37, 76, .3), 0 0 0 2px rgba(255, 255, 255, .28);
}

.navbar-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #ffffff;
}

.navbar-gradient .navbar-brand,
.navbar-gradient .nav-link { color: #fff; }

.navbar-gradient .navbar-brand { letter-spacing: 0; }

.navbar-gradient .navbar-nav {
  gap: .35rem;
}

.navbar-gradient .dashboard-link .navbar-logo-badge { display: none; }

/* Keep the primary pages visually centered without disturbing the account menu. */
@media (min-width: 1200px) {
  .navbar-gradient {
    padding-block: 0;
  }

  .navbar-gradient > .container-fluid {
    min-height: 46px;
    position: relative;
  }

  .navbar-gradient .navbar-collapse {
    align-items: center;
  }

  .navbar-gradient .dashboard-link .navbar-logo-badge {
    display: grid;
    flex-basis: 38px;
    height: 38px;
    width: 38px;
  }

  .navbar-gradient.navbar-with-pages > .container-fluid > .navbar-brand {
    visibility: hidden;
  }

  .navbar-gradient .nav-center-group {
    align-items: center;
    display: flex;
    height: 46px;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
  }

  .navbar-gradient .primary-nav {
    align-items: center;
    gap: 1rem;
    margin-right: 0 !important;
    flex-wrap: nowrap;
  }

  .navbar-gradient .primary-nav > .nav-item {
    align-items: center;
    display: flex;
    height: 100%;
  }
}

.navbar-gradient .nav-link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  border-radius: 6px;
  color: #fff;
  padding-inline: .75rem;
  opacity: .92;
  transition: none;
}

.navbar-gradient .nav-link:hover,
.navbar-gradient .nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, .14);
  opacity: 1;
}

.navbar-gradient .nav-link:active {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.navbar-gradient .navbar-toggler {
  border-color: rgba(255, 255, 255, .42);
  box-shadow: none;
  transition: none;
}

.navbar-gradient .navbar-toggler:hover,
.navbar-gradient .navbar-toggler:focus,
.navbar-gradient .navbar-toggler:focus-visible,
.navbar-gradient .navbar-toggler:active {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .42);
  box-shadow: none;
  outline: 0;
}

.navbar-gradient .navbar-collapse,
.navbar-gradient .navbar-collapse.collapsing,
.navbar-gradient .navbar-collapse.collapse,
.navbar-gradient .navbar-collapse.show {
  transition: none;
}

.user-menu-toggle {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: none;
}

.navbar-gradient .user-menu-toggle:hover,
.navbar-gradient .user-menu-toggle:focus,
.navbar-gradient .user-menu-toggle:focus-visible,
.navbar-gradient .user-menu-toggle:active,
.navbar-gradient .user-menu-toggle.show {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .72);
  box-shadow: none;
  color: #fff;
  outline: 0;
}

.navbar-gradient .dropdown-menu {
  --bs-dropdown-bg: #ffffff;
  --bs-dropdown-color: #111827;
  --bs-dropdown-link-color: #111827;
  --bs-dropdown-link-hover-color: #0f4c81;
  --bs-dropdown-link-hover-bg: #eef6ff;
  --bs-dropdown-border-color: rgba(15, 76, 129, .16);
  background: #fff;
  border-color: rgba(15, 76, 129, .16);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 76, 129, .22);
}

.navbar-gradient .dropdown-item {
  display: flex;
  align-items: center;
  color: #111827;
}

.navbar-gradient .dropdown-item i { color: var(--app-primary); }
.dropdown-menu form { margin: 0; }

.navbar-gradient .navbar-nav .btn.nav-link {
  appearance: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #fff;
  font-weight: 700;
  line-height: var(--bs-body-line-height);
  opacity: .92;
  padding: var(--bs-nav-link-padding-y) .75rem;
  text-decoration: none;
}

.navbar-gradient .navbar-nav .btn.nav-link:hover,
.navbar-gradient .navbar-nav .btn.nav-link:focus {
  background: rgba(255, 255, 255, .14);
  box-shadow: none;
  color: #fff;
  opacity: 1;
}

.page-header {
  --header-accent: #2563eb;
  --header-accent-2: #38a3ff;
  --header-border: rgba(147, 197, 253, .72);
  --header-glow: rgba(37, 99, 235, .16);
  --header-soft: rgba(219, 234, 254, .74);
  align-items: center;
  background:
    radial-gradient(circle at 12% -60%, var(--header-soft) 0, transparent 46%),
    radial-gradient(circle at 96% 120%, var(--header-soft) 0, transparent 38%),
    linear-gradient(118deg, rgba(255, 255, 255, .98) 0%, rgba(248, 251, 255, .94) 64%, rgba(241, 247, 255, .9) 100%);
  border: 1px solid var(--header-border);
  border-radius: 20px;
  box-shadow:
    0 16px 38px rgba(15, 23, 42, .075),
    inset 0 1px 0 rgba(255, 255, 255, .94);
  display: grid;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  isolation: isolate;
  margin-bottom: 1rem;
  min-height: 108px;
  overflow: hidden;
  padding: 1.05rem 1.2rem 1.05rem 1.35rem;
  position: relative;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.page-header:hover {
  border-color: var(--header-accent-2);
  box-shadow:
    0 20px 46px rgba(15, 23, 42, .1),
    0 0 0 3px var(--header-glow),
    inset 0 1px 0 rgba(255, 255, 255, .96);
}

.app-page-icon {
  align-items: center;
  align-self: center;
  background: linear-gradient(145deg, var(--header-accent), var(--header-accent-2));
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 17px;
  box-shadow:
    0 14px 28px var(--header-glow),
    inset 0 1px 0 rgba(255, 255, 255, .44);
  color: #fff;
  display: inline-flex;
  flex: 0 0 56px;
  font-size: 1.3rem;
  height: 56px;
  justify-content: center;
  position: relative;
  transition: transform .18s ease, box-shadow .18s ease;
  width: 56px;
  z-index: 1;
}

.page-header:hover .app-page-icon {
  box-shadow:
    0 18px 34px var(--header-glow),
    inset 0 1px 0 rgba(255, 255, 255, .5);
  transform: translateY(-2px);
}

.app-page-icon::after {
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 12px;
  content: "";
  inset: 6px;
  pointer-events: none;
  position: absolute;
}

.app-page-icon > i { position: relative; z-index: 1; }

.app-page-icon + div {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.page-header:not(:has(.app-page-icon)) {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-left: 1.2rem;
}

/* Header actions share the title's vertical center and stay anchored to the right. */
.page-header > .d-flex:last-child {
  align-items: center;
  align-self: center;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}

.page-header > .settings-header-status:last-child {
  justify-self: end;
  position: relative;
  z-index: 1;
}

.student-header-summary {
  align-items: center;
  align-self: center;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(165, 243, 252, .92);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(29, 78, 216, .09), inset 0 1px 0 #fff;
  display: flex;
  gap: .65rem;
  min-width: 142px;
  padding: .58rem .72rem;
  position: relative;
  z-index: 1;
}

.student-header-summary-icon {
  align-items: center;
  background: linear-gradient(145deg, #dbeafe, #cffafe);
  border: 1px solid #bae6fd;
  border-radius: 10px;
  color: #1d4ed8;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.student-header-summary strong,
.student-header-summary small {
  display: block;
  line-height: 1.05;
}

.student-header-summary strong {
  color: #102a56;
  font-size: 1.2rem;
  font-weight: 900;
}

.student-header-summary small {
  color: #61758d;
  font-size: .7rem;
  font-weight: 800;
  margin-top: .2rem;
  text-transform: uppercase;
}

.page-header > .btn:last-child {
  justify-self: end;
  position: relative;
  z-index: 1;
}

.page-header .btn {
  border-radius: 10px;
  font-weight: 800;
  min-height: 42px;
  padding-inline: .9rem;
}

.page-header::before {
  background: linear-gradient(180deg, var(--header-accent), var(--header-accent-2));
  border-radius: 999px;
  content: "";
  inset-block: 16px;
  left: 0;
  position: absolute;
  width: 4px;
}

.page-header::after {
  background-image: radial-gradient(circle, var(--header-accent) 1.15px, transparent 1.3px);
  background-size: 15px 15px;
  content: "";
  height: 150px;
  mask-image: linear-gradient(90deg, transparent, #000);
  opacity: .1;
  pointer-events: none;
  position: absolute;
  right: -8px;
  top: -22px;
  transform: rotate(-4deg);
  width: min(32vw, 360px);
  z-index: 0;
}

.page-header[data-page-tone="students"],
body:has(#studentsTable) .page-header {
  --header-accent: #047857;
  --header-accent-2: #34d399;
  --header-border: rgba(167, 243, 208, .9);
  --header-glow: rgba(4, 120, 87, .16);
  --header-soft: rgba(209, 250, 229, .72);
}

.page-header[data-page-tone="exams"],
body:has(#examsTable) .page-header {
  --header-accent: #c2410c;
  --header-accent-2: #fb923c;
  --header-border: rgba(254, 215, 170, .94);
  --header-glow: rgba(194, 65, 12, .15);
  --header-soft: rgba(255, 237, 213, .76);
}

.page-header[data-page-tone="questions"],
body:has(#questionsTable) .page-header {
  --header-accent: #6d28d9;
  --header-accent-2: #c084fc;
  --header-border: rgba(221, 214, 254, .96);
  --header-glow: rgba(109, 40, 217, .15);
  --header-soft: rgba(237, 233, 254, .76);
}

.page-header[data-page-tone="results"],
body:has(#resultsTable) .page-header.result-page-header {
  --header-accent: #0f766e;
  --header-accent-2: #2dd4bf;
  --header-border: rgba(153, 246, 228, .96);
  --header-glow: rgba(15, 118, 110, .15);
  --header-soft: rgba(204, 251, 241, .74);
}

.page-header[data-page-tone="dashboard"] {
  --header-accent: #075985;
  --header-accent-2: #38bdf8;
  --header-border: rgba(186, 230, 253, .96);
  --header-glow: rgba(7, 89, 133, .15);
  --header-soft: rgba(224, 242, 254, .78);
}

.page-header[data-page-tone="student"] {
  --header-accent: #1d4ed8;
  --header-accent-2: #22d3ee;
  --header-border: rgba(165, 243, 252, .88);
  --header-glow: rgba(29, 78, 216, .16);
  --header-soft: rgba(207, 250, 254, .7);
}

.page-header[data-page-tone="settings"] {
  --header-accent: #4338ca;
  --header-accent-2: #818cf8;
  --header-border: rgba(199, 210, 254, .96);
  --header-glow: rgba(67, 56, 202, .15);
  --header-soft: rgba(224, 231, 255, .76);
}

main#main-content {
  animation: appPageEnter .2s ease-out both;
}

body.is-navigating main#main-content {
  opacity: 0;
  transition: opacity .14s ease;
}

@keyframes appPageEnter {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  main#main-content { animation: none; }
  body.is-navigating main#main-content { opacity: 1; transition: none; }
  .page-header,
  .app-page-icon { transition: none; }
  .page-header:hover,
  .page-header:hover .app-page-icon { transform: none; }
}

.page-header h1 {
  margin: 0;
  color: #122238;
  font-size: clamp(1.45rem, 1.8vw, 1.9rem);
  font-weight: 850;
  letter-spacing: -.025em;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.page-kicker {
  color: #5a6d84;
  font-size: .94rem;
  font-weight: 600;
  line-height: 1.45;
  margin: .35rem 0 0;
  max-width: 70ch;
  overflow-wrap: anywhere;
}

.page-header .eyebrow,
.page-header .result-kicker {
  align-items: center;
  background: color-mix(in srgb, var(--header-accent) 9%, white);
  border: 1px solid color-mix(in srgb, var(--header-accent) 18%, white);
  border-radius: 999px;
  color: var(--header-accent);
  display: inline-flex;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .075em;
  line-height: 1;
  margin: 0 0 .42rem;
  padding: .3rem .55rem;
  text-transform: uppercase;
}

.content-card,
.stat-card,
.login-panel,
.card {
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow-sm);
}

.content-card { padding: 1.1rem; }

.card,
.content-card,
.stat-card,
.question-nav-panel,
.exam-progress-card,
.question-card,
.result-card {
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.card:hover,
.card:focus-within,
.content-card:hover,
.content-card:focus-within,
.stat-card:hover,
.stat-card:focus-within,
.exam-progress-card:hover,
.exam-progress-card:focus-within,
.question-card:hover,
.question-card:focus-within,
.result-card:hover,
.result-card:focus-within {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(15, 76, 129, .14);
  border-color: #9fc4ed;
}

.stat-card {
  min-height: 100px;
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .75rem;
  overflow: hidden;
  position: relative;
}

.stat-card::before,
.monitor-stat::before,
.live-exam-pulse-stat::before {
  background: currentColor;
  content: "";
  height: 3px;
  left: 0;
  opacity: .72;
  position: absolute;
  right: 0;
  top: 0;
}

.stat-card-students {
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
  border-color: #c8def7;
  color: #1769c2;
}

.stat-card-exams {
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
  border-color: #bbf7d0;
  color: #047857;
}

.stat-card-progress {
  background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%);
  border-color: #ddd6fe;
  color: #7c3aed;
}

.stat-card-submitted {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  border-color: #bae6fd;
  color: #0369a1;
}

.stat-card-result-wrong {
  background: linear-gradient(135deg, #ffffff 0%, #fff1f2 100%);
  border-color: #fecdd3;
  color: #be123c;
}

.stat-card-result-unanswered {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-color: #cbd5e1;
  color: #475569;
}

.stat-card-students:hover,
.stat-card-students:focus-within { background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%); }
.stat-card-exams:hover,
.stat-card-exams:focus-within { background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%); }
.stat-card-progress:hover,
.stat-card-progress:focus-within { background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%); }
.stat-card-submitted:hover,
.stat-card-submitted:focus-within { background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%); }
.stat-card-result-wrong:hover,
.stat-card-result-wrong:focus-within { background: linear-gradient(135deg, #ffffff 0%, #fff1f2 100%); }
.stat-card-result-unanswered:hover,
.stat-card-result-unanswered:focus-within { background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%); }

.stat-card-students .stat-icon { color: #1769c2; background: #dbeafe; }
.stat-card-exams .stat-icon { color: #047857; background: #d1fae5; }
.stat-card-progress .stat-icon { color: #7c3aed; background: #ede9fe; }
.stat-card-submitted .stat-icon { color: #0369a1; background: #e0f2fe; }
.stat-card-result-wrong .stat-icon { color: #be123c; background: #ffe4e6; }
.stat-card-result-unanswered .stat-icon { color: #475569; background: #e2e8f0; }

.stat-card span {
  color: var(--app-muted);
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.stat-card strong {
  color: var(--app-text);
  display: block;
  margin-top: .2rem;
  font-size: 2rem;
  line-height: 1;
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--app-primary);
  background: var(--app-primary-soft);
  font-size: 1.15rem;
}

.table-shell {
  overflow: hidden;
  padding: 0;
}

.table-responsive {
  background: #fff;
  border: 1px solid #d9e5f2;
  border-radius: 11px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, .03),
    0 8px 24px rgba(30, 64, 175, .045);
  overflow-x: auto;
  scrollbar-color: #b7cbe0 transparent;
  scrollbar-width: thin;
}

.table-responsive::-webkit-scrollbar { height: 9px; }
.table-responsive::-webkit-scrollbar-track { background: transparent; }
.table-responsive::-webkit-scrollbar-thumb {
  background: #b7cbe0;
  border: 2px solid #fff;
  border-radius: 999px;
}
.table-responsive::-webkit-scrollbar-thumb:hover { background: #8fabc7; }

.table {
  --bs-table-bg: #ffffff;
  --bs-table-border-color: #e5edf6;
  border-collapse: separate;
  border-spacing: 0;
  color: #1e293b;
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.42;
  margin-bottom: 0;
  vertical-align: middle;
}

.table thead th {
  background: linear-gradient(180deg, #f9fbfe 0%, #f0f5fb 100%);
  border-bottom: 1px solid #cedceb;
  border-top: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
  color: #40556e;
  font-size: .73rem;
  font-weight: 850;
  letter-spacing: .055em;
  padding: .78rem 1rem;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

.table tbody tr {
  --bs-table-bg: #ffffff;
  transition: box-shadow .16s ease;
}

.table tbody tr:where(:nth-child(even):not(.exam-question-detail-row):not(.table-skeleton-row)) {
  --bs-table-bg: #fbfdff;
}

.table tbody tr > * {
  background-color: var(--bs-table-bg);
  border-bottom-color: #e5edf6;
  color: #24364b;
  padding: .82rem 1rem;
  transition: background-color .16s ease, color .16s ease;
  vertical-align: middle;
}

.table tbody tr:last-child > * {
  border-bottom: 0;
}

.table tbody tr:hover,
.table tbody tr:focus-within {
  --bs-table-bg: #f2f7fd;
  --bs-table-accent-bg: #f2f7fd;
  box-shadow:
    inset 3px 0 0 #3182ce,
    inset 0 1px 0 rgba(49, 130, 206, .05),
    inset 0 -1px 0 rgba(49, 130, 206, .05);
}

.table tbody tr:hover > *,
.table tbody tr:focus-within > * {
  background-color: var(--bs-table-bg);
  color: #102a43;
}

.table tbody td:first-child,
.table thead th:first-child { padding-left: 1.1rem; }
.table tbody td:last-child,
.table thead th:last-child { padding-right: 1.1rem; }

.table tbody td a:not(.btn) {
  color: #175ea8;
  font-weight: 750;
  text-decoration-color: rgba(23, 94, 168, .3);
}

.table tbody td a:not(.btn):hover,
.table tbody td a:not(.btn):focus { text-decoration-color: currentColor; }

.table .text-end { white-space: nowrap; }

.table .table-actions-column {
  width: 1%;
  white-space: nowrap;
}

.table th.table-actions-column {
  text-align: center;
}

.table td.table-actions-column {
  text-align: right;
}

.table-actions-column .btn + .btn {
  margin-left: .25rem;
}

.table .btn-sm {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 2rem;
  padding: .35rem .62rem;
}

.table .form-check-input {
  border-color: #aebfd1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}

.table .form-check-input:checked {
  background-color: var(--app-primary);
  border-color: var(--app-primary);
}

.btn {
  border-radius: 7px;
  font-weight: 650;
}

.btn-sm { border-radius: 6px; }

.btn-primary {
  background: linear-gradient(135deg, #1769c2, #2f7df0);
  border-color: #1769c2;
  box-shadow: 0 6px 16px rgba(23, 105, 194, .18);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #125ba8, #1769c2);
  border-color: #125ba8;
}

.btn-preview-purple {
  background: #fff;
  border-color: #7c3aed;
  color: #7c3aed;
}

.btn-preview-purple:hover,
.btn-preview-purple:focus {
  background: #f5f3ff;
  border-color: #6d28d9;
  color: #6d28d9;
}

.btn-exam-questions {
  background: #fff;
  border-color: #7c3aed;
  color: #6d28d9;
}

.btn-exam-questions:hover,
.btn-exam-questions:focus {
  background: #f5f3ff;
  border-color: #6d28d9;
  color: #5b21b6;
}

.btn-exam-clone {
  background: #fff;
  border-color: #fb923c;
  color: #c2410c;
}

.btn-exam-clone:hover,
.btn-exam-clone:focus {
  background: #fff7ed;
  border-color: #ea580c;
  color: #9a3412;
}

.btn-preview-purple-solid {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-color: #7c3aed;
  box-shadow: 0 6px 16px rgba(124, 58, 237, .18);
  color: #fff;
}

.btn-preview-purple-solid:hover,
.btn-preview-purple-solid:focus {
  background: linear-gradient(135deg, #6d28d9, #9333ea);
  border-color: #6d28d9;
  color: #fff;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger { background: #fff; }

.question-form-action-btn {
  align-items: center;
  background: #fff;
  border-color: var(--bs-primary);
  color: var(--bs-primary);
  display: inline-flex;
  gap: .35rem;
  justify-content: center;
  line-height: 1.2;
  min-height: 42px;
  padding: .5rem .75rem;
  font-weight: 800;
}

.question-form-action-btn i {
  color: currentColor;
}

.question-form-action-btn:hover,
.question-form-action-btn:focus {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

.btn-filter-reset {
  align-items: center;
  background: #fff;
  border: 1px solid #fda4af;
  color: #be123c;
  display: inline-flex;
  font-weight: 850;
  justify-self: start;
  justify-content: center;
  min-height: 42px;
  min-width: 0;
  padding: .5rem .75rem;
  white-space: nowrap;
  width: auto;
}

.btn-filter-reset:hover,
.btn-filter-reset:focus {
  background: #dc2626;
  border-color: #dc2626;
  box-shadow: 0 8px 18px rgba(190, 18, 60, .14);
  color: #fff;
}

.btn-filter-reset:active {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

.badge { border-radius: 999px; font-weight: 700; }

.exam-status-badge {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: .76rem;
  font-weight: 850;
  line-height: 1;
  padding: .38rem .62rem;
}

.exam-status-badge.is-not-started {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.exam-status-badge.is-in-progress {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.exam-status-badge.is-submitted {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.exam-status-badge.is-active {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.exam-status-badge.is-set-active {
  background: #f3e8ff;
  border-color: #c4b5fd;
  color: #7c3aed;
}

.exam-status-badge.is-inactive {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

.exam-status-badge.is-auto-submitted {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #7c3aed;
}

.app-form p { margin-bottom: 1rem; }
.app-form label { display: block; margin-bottom: .35rem; color: #334155; font-weight: 700; }
.app-form input,
.app-form select,
.app-form textarea {
  display: block;
  width: 100%;
  padding: .58rem .72rem;
  border: 1px solid #bfcede;
  border-radius: 7px;
  background: #fff;
}

.app-form input[type="checkbox"],
.app-form input[type="radio"] {
  display: inline-block;
  width: auto;
  margin-right: .4rem;
}

.app-form .helptext {
  display: block;
  margin-top: .25rem;
  color: var(--app-muted);
  font-size: .86rem;
}

.app-form ul.errorlist {
  margin: 0 0 .4rem;
  padding: .55rem .75rem;
  border: 1px solid #fecdd3;
  border-radius: 7px;
  color: #991b1b;
  background: #fff1f2;
  list-style: none;
}

.app-form textarea { min-height: 8.5rem; resize: vertical; }
.app-form input:focus,
.app-form select:focus,
.app-form textarea:focus,
.login-panel input:focus,
.filter-bar .form-control:focus,
.filter-bar .form-select:focus {
  border-color: #4aa3ff;
  outline: 0;
  box-shadow: 0 0 0 .22rem rgba(23, 105, 194, .14);
}

.form-actions {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.25rem;
}

.section-heading {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h2 {
  font-size: 1.08rem;
  font-weight: 800;
  margin: 0;
}

.section-heading p {
  color: var(--app-muted);
  margin: .2rem 0 0;
}

.student-heading-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: flex-end;
  margin-left: auto;
}

.question-bank-table > .section-heading { position: relative; }
.question-bank-table > .section-heading > .student-heading-actions {
  position: absolute;
  right: 0;
  top: 0;
}

.student-slip-button {
  align-items: center;
  background: linear-gradient(135deg, #1d4ed8 0%, #38a3ff 100%);
  border: 0;
  box-shadow: 0 10px 22px rgba(29, 78, 216, .22);
  display: inline-flex;
  font-weight: 850;
  gap: .45rem;
  min-height: 38px;
  padding-inline: .95rem;
  white-space: nowrap;
}

.student-slip-button:hover,
.student-slip-button:focus {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  box-shadow: 0 12px 26px rgba(29, 78, 216, .28);
}

.section-heading-table {
  padding: 1rem 1rem 0;
}

.eyebrow {
  color: var(--app-primary);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .04em;
  margin: 0 0 .25rem;
  text-transform: uppercase;
}

.exam-form-header {
  align-items: center;
}

.exam-form-layout {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
}

.exam-form-sections {
  display: grid;
  gap: 1rem;
}

.exam-form-section {
  padding: 1rem;
}

.exam-form-section .section-heading {
  border-bottom: 1px solid var(--app-border);
  margin-bottom: 1rem;
  padding-bottom: .85rem;
}

.exam-form-section .section-heading > div {
  display: grid;
  column-gap: .75rem;
  row-gap: .18rem;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.exam-form-section .section-heading h2,
.exam-form-section .section-heading p {
  grid-column: 2;
}

.section-icon {
  align-items: center;
  background: #e8f3ff;
  border: 1px solid #c8def7;
  border-radius: 8px;
  color: var(--app-primary);
  display: inline-flex;
  grid-row: 1 / span 2;
  height: 42px;
  justify-content: center;
  align-self: center;
  width: 42px;
}

.section-icon-green {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #047857;
}

.section-icon-amber {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.section-icon-purple {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}

.section-icon-teal {
  background: #f0fdfa;
  border-color: #99f6e4;
  color: #0f766e;
}

.form-grid {
  display: grid;
  gap: .9rem;
  grid-template-columns: 1fr;
}

.form-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field {
  display: grid;
  gap: .35rem;
}

.form-field-full {
  grid-column: 1 / -1;
}

.form-field label {
  color: #24364a;
  font-weight: 800;
}

.form-field label span {
  color: var(--app-danger);
  margin-left: .15rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  background: #fff;
  border: 1px solid #bfcede;
  border-radius: 7px;
  color: var(--app-text);
  min-height: 42px;
  padding: .62rem .75rem;
  width: 100%;
}

.form-field select {
  -webkit-appearance: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #475569 50%),
    linear-gradient(135deg, #475569 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 50%,
    calc(100% - 12px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  height: 42px;
  line-height: 1.2;
  padding-right: 2.25rem;
}

.form-field textarea {
  min-height: 132px;
}

.form-field select[multiple] {
  min-height: 108px;
  padding: .5rem;
}

.form-field select[multiple] option {
  border-radius: 5px;
  padding: .35rem .45rem;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: #4aa3ff;
  box-shadow: 0 0 0 .22rem rgba(23, 105, 194, .14);
  outline: 0;
}

.form-help {
  color: var(--app-muted);
  font-size: .86rem;
}

.field-errors {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 7px;
  color: #991b1b;
  font-size: .86rem;
  padding: .45rem .6rem;
}

.field-errors ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.form-alert {
  align-items: flex-start;
  display: flex;
  gap: .75rem;
  margin-bottom: 1rem;
}

.form-alert-danger {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #991b1b;
}

.form-alert i {
  margin-top: .15rem;
}

.student-form-layout {
  align-items: stretch;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
}

.student-form-layout > .exam-form-sections,
.student-form-section,
.student-form-summary {
  height: 100%;
}

.student-form-section {
  align-content: start;
  display: grid;
  overflow: hidden;
}

.student-form-section .form-grid {
  gap: 1rem;
}

.student-create-form .form-field {
  background: #f8fbff;
  border: 1px solid #dbe8f6;
  border-radius: 8px;
  padding: .75rem;
}

.student-create-form .form-field label {
  margin-bottom: .45rem;
}

.student-create-form .form-field input,
.student-create-form .form-field select,
.student-create-form .form-field textarea {
  background: #fff;
}

.student-create-form .form-help {
  line-height: 1.35;
  margin-top: .45rem;
}

.student-status-card {
  align-items: center;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid var(--app-border);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: .85rem;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.student-status-card:hover,
.student-status-card:focus-within {
  border-color: #9fc4ed;
  box-shadow: var(--app-shadow-sm);
  transform: translateY(-1px);
}

.student-status-card strong {
  color: var(--app-text);
  display: block;
}

.student-status-card small {
  color: var(--app-muted);
  display: block;
  font-weight: 650;
  margin-top: .15rem;
}

.student-status-card .toggle-control {
  flex: 0 0 auto;
}

.student-form-summary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 251, 255, .98)),
    radial-gradient(circle at 100% 0%, rgba(74, 163, 255, .18), transparent 38%);
  align-content: start;
}

.student-summary-icon {
  align-items: center;
  background: linear-gradient(135deg, var(--app-primary), #3ba3ff);
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(23, 105, 194, .2);
  color: #fff;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.student-credential-list {
  display: grid;
  gap: .65rem;
}

.student-form-summary .summary-chip {
  align-items: flex-start;
}

.student-form-summary .summary-chip span {
  display: grid;
  gap: .1rem;
}

.student-form-summary .summary-chip strong {
  color: var(--app-text);
  font-size: .9rem;
}

.student-form-summary .summary-chip small {
  color: var(--app-muted);
  font-size: .8rem;
  font-weight: 700;
}

.student-form-actions {
  display: grid;
  gap: .55rem;
  margin-top: .25rem;
}

.student-reset-form {
  margin-top: .85rem;
}

.toggle-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.toggle-card {
  align-items: center;
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: .9rem;
  justify-content: space-between;
  margin: 0;
  min-height: 76px;
  padding: .85rem;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.toggle-card:hover,
.toggle-card:focus-within {
  border-color: #9fc4ed;
  box-shadow: var(--app-shadow-sm);
  transform: translateY(-1px);
}

.toggle-copy {
  display: grid;
  gap: .15rem;
}

.toggle-copy strong {
  color: #24364a;
}

.toggle-copy small {
  color: var(--app-muted);
}

.toggle-control {
  flex: 0 0 auto;
  position: relative;
}

.toggle-control input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.toggle-track {
  background: #cbd5e1;
  border-radius: 999px;
  display: block;
  height: 28px;
  position: relative;
  transition: background-color .16s ease;
  width: 50px;
}

.toggle-track::after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .22);
  content: "";
  height: 22px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: transform .16s ease;
  width: 22px;
}

.toggle-control input:checked + .toggle-track {
  background: var(--app-primary);
}

.toggle-control input:checked + .toggle-track::after {
  transform: translateX(22px);
}

.toggle-control input:focus + .toggle-track {
  box-shadow: 0 0 0 .22rem rgba(23, 105, 194, .14);
}

.exam-form-summary {
  display: grid;
  gap: .75rem;
  padding: 1rem;
  position: sticky;
  top: 76px;
}

.exam-form-summary h2 {
  font-size: 1.15rem;
  font-weight: 850;
  margin: 0;
}

.exam-form-summary p {
  color: var(--app-muted);
  margin: 0;
}

.summary-chip {
  align-items: center;
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: 8px;
  color: #334155;
  display: flex;
  gap: .55rem;
  min-height: 42px;
  padding: .65rem .75rem;
}

.datetime-composer-grid {
  align-items: end;
  display: grid;
  gap: .55rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.timing-scoring-grid {
  align-items: start;
}

.datetime-composer-grid .form-select {
  font-weight: 750;
  min-height: 42px;
}

.datetime-now-btn,
.datetime-clear-btn {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  gap: .35rem;
  font-weight: 850;
  justify-content: center;
  min-height: 42px;
  padding-inline: .75rem;
  white-space: nowrap;
}

.datetime-now-btn {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  border: 1px solid #93c5fd;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .08);
  color: #1d4ed8;
}

.datetime-now-btn:hover,
.datetime-now-btn:focus {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1e40af;
}

.datetime-clear-btn {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #c2410c;
}

.datetime-clear-btn:hover,
.datetime-clear-btn:focus {
  background: #ffedd5;
  border-color: #fdba74;
  color: #9a3412;
}

.section-icon-danger {
  background: #fff1f2;
  color: #dc2626;
}

.exam-reset-section {
  background: linear-gradient(135deg, #fffafa 0%, #ffffff 100%);
  border-color: #fecdd3;
}

.exam-reset-warning {
  align-items: center;
  background: #fff1f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #7f1d1d;
  display: grid;
  gap: .85rem;
  grid-template-columns: auto minmax(0, 1fr);
  margin-bottom: 1rem;
  padding: .9rem 1rem;
}

.exam-reset-warning i {
  align-items: center;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 999px;
  color: #dc2626;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.exam-reset-warning strong {
  color: #b91c1c;
  display: block;
  font-weight: 850;
}

.exam-reset-warning p {
  color: #9f1239;
  font-weight: 650;
  margin: .2rem 0 0;
}

.exam-reset-btn {
  background: linear-gradient(135deg, #fff1f2 0%, #ffffff 100%);
  border: 1px solid #fb7185;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(190, 18, 60, .08);
  color: #be123c;
  font-weight: 850;
}

.exam-reset-btn:hover,
.exam-reset-btn:focus {
  background: #ffe4e6;
  border-color: #e11d48;
  color: #9f1239;
}

.exam-start-countdown {
  background: linear-gradient(135deg, #eef6ff 0%, #f8fbff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e3a8a;
  display: grid;
  gap: .45rem;
  margin-bottom: .85rem;
  padding: .75rem .85rem;
}

.exam-start-countdown span {
  align-items: center;
  display: inline-flex;
  gap: .45rem;
  font-size: .86rem;
  font-weight: 750;
}

.exam-start-countdown strong {
  color: #1769c2;
  font-size: 1.25rem;
  line-height: 1;
}

.summary-chip i {
  color: var(--app-primary);
}

.question-form-header {
  align-items: center;
}

.question-form-layout {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
}

.question-form-sections {
  display: grid;
  gap: 1rem;
}

.question-form-section {
  padding: 1rem;
}

.question-form-section .section-heading {
  border-bottom: 1px solid var(--app-border);
  margin-bottom: 1rem;
  padding-bottom: .85rem;
}

.question-form-section .section-heading > div {
  display: grid;
  column-gap: .75rem;
  row-gap: .18rem;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.question-form-section .section-heading h2,
.question-form-section .section-heading p {
  grid-column: 2;
}

.question-form-pro #id_question_text {
  min-height: 260px;
  resize: vertical;
}

.question-form-pro #id_question_image {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border-style: dashed;
  color: var(--app-muted);
  cursor: pointer;
  font-weight: 700;
  min-height: 52px;
  padding: .48rem;
}

.question-form-pro #id_question_image::file-selector-button {
  background: linear-gradient(135deg, #1769c2, #2f7df0);
  border: 0;
  border-radius: 7px;
  box-shadow: 0 6px 14px rgba(23, 105, 194, .16);
  color: #fff;
  cursor: pointer;
  font-weight: 850;
  margin-right: .8rem;
  min-height: 38px;
  padding: .45rem .85rem;
  transition: box-shadow .16s ease, transform .16s ease;
}

.question-form-pro #id_question_image:hover::file-selector-button,
.question-form-pro #id_question_image:focus::file-selector-button {
  box-shadow: 0 9px 20px rgba(23, 105, 194, .22);
  transform: translateY(-1px);
}

.question-image-uploader {
  align-items: stretch;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  display: grid;
  gap: .9rem;
  grid-template-columns: minmax(220px, .85fr) minmax(0, 1fr);
  padding: .85rem;
}

.question-image-preview {
  align-items: center;
  background:
    linear-gradient(45deg, rgba(148, 163, 184, .12) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(148, 163, 184, .12) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, .12) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, .12) 75%);
  background-color: #fff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  border: 1px solid #cfe0f4;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 190px;
  overflow: hidden;
  padding: .45rem;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  width: 100%;
}

.question-image-preview:not(:disabled) {
  cursor: zoom-in;
}

.question-image-preview:not(:disabled):hover,
.question-image-preview:not(:disabled):focus {
  border-color: var(--app-primary);
  box-shadow: 0 0 0 .18rem rgba(23, 105, 194, .12);
  outline: 0;
  transform: translateY(-1px);
}

.question-image-preview img {
  display: block;
  max-height: 260px;
  max-width: 100%;
  object-fit: contain;
}

.question-image-empty {
  align-items: center;
  color: var(--app-muted);
  display: grid;
  gap: .35rem;
  justify-items: center;
  padding: 1rem;
  text-align: center;
}

.question-image-empty i {
  color: #8aa5c2;
  font-size: 1.7rem;
}

.question-image-empty strong {
  color: #25364d;
}

.question-image-controls {
  align-content: center;
  display: grid;
  gap: .8rem;
}

.question-image-pick {
  background: #fff;
  border-color: var(--bs-primary);
  color: var(--bs-primary);
  justify-self: start;
}

.form-field label.question-image-pick,
.form-field label.question-image-pick i {
  color: var(--bs-primary);
}

.form-field label.question-image-pick:hover,
.form-field label.question-image-pick:focus,
.form-field label.question-image-pick:hover i,
.form-field label.question-image-pick:focus i {
  color: #fff;
}

.question-image-clear {
  align-items: center;
  background: #fff7f7;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  color: #7f1d1d;
  cursor: pointer;
  display: flex;
  gap: .75rem;
  padding: .75rem .85rem;
}

.question-image-clear input {
  accent-color: var(--app-danger);
  height: 1.05rem;
  width: 1.05rem;
}

.question-image-clear strong,
.question-image-clear small {
  display: block;
}

.question-image-clear small {
  color: #9f1239;
  font-weight: 650;
  margin-top: .1rem;
}

.question-image-uploader.is-clearing .question-image-preview {
  filter: grayscale(1);
  opacity: .45;
}

.question-image-modal {
  border: 0;
  border-radius: var(--app-radius);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .24);
  overflow: hidden;
}

.question-image-modal .modal-body {
  align-items: center;
  background: #0f172a;
  display: flex;
  justify-content: center;
  min-height: 64vh;
  padding: 1rem;
}

.question-image-modal img {
  display: block;
  max-height: 78vh;
  max-width: 100%;
  object-fit: contain;
}

.form-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-editor-grid {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-editor-card {
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe8f6;
  border-radius: 8px;
  display: grid;
  gap: .55rem;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 86px;
  padding: .6rem;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.option-editor-card:hover,
.option-editor-card:focus-within {
  border-color: #9fc4ed;
  box-shadow: var(--app-shadow-sm);
  transform: translateY(-1px);
}

.option-badge {
  align-items: center;
  align-self: center;
  background: linear-gradient(135deg, #eef6ff 0%, #ffffff 100%);
  border: 1px solid #b9d7f7;
  border-radius: 7px;
  color: var(--app-primary-dark);
  display: inline-flex;
  font-weight: 850;
  height: 34px;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 4px 10px rgba(23, 105, 194, .08);
  width: 34px;
}

.option-editor-card .form-field label {
  font-size: 0;
  margin: 0;
}

.option-editor-card .form-field label span {
  display: none;
}

.option-editor-card textarea {
  background: #fff;
  height: 72px;
  min-height: 72px;
  resize: vertical;
}

.correct-answer-panel {
  align-items: center;
  background: linear-gradient(135deg, #ecfdf5 0%, #f8fbff 100%);
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr);
  margin-top: .85rem;
  padding: .85rem 1rem;
}

.correct-answer-panel > i {
  align-items: center;
  background: #047857;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(4, 120, 87, .18);
  color: #047857;
  color: #fff;
  display: inline-flex;
  font-size: .9rem;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.correct-answer-panel .form-field {
  gap: .25rem;
  justify-self: end;
  max-width: 320px;
  width: 100%;
}

.correct-answer-panel select {
  background-color: #fff;
  border-color: #9fd7bf;
  font-weight: 800;
  min-height: 42px;
}

.question-form-summary {
  display: grid;
  gap: .85rem;
  padding: 1rem;
  position: sticky;
  top: 76px;
}

.question-form-summary h2 {
  font-size: 1.15rem;
  font-weight: 850;
  margin: 0;
}

.question-checklist {
  display: grid;
  gap: .65rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.question-checklist li {
  align-items: flex-start;
  color: #334155;
  display: grid;
  gap: .55rem;
  grid-template-columns: auto minmax(0, 1fr);
  line-height: 1.35;
}

.question-checklist i {
  color: var(--app-success);
  margin-top: .15rem;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
}

.pill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.data-pill {
  align-items: center;
  background: #eef6ff;
  border: 1px solid #c8def7;
  border-radius: 999px;
  color: var(--app-primary-dark);
  display: inline-flex;
  gap: .4rem;
  font-size: .88rem;
  font-weight: 800;
  line-height: 1;
  padding: .55rem .7rem;
}

.access-code-pill {
  border: 1px solid #c8def7;
  cursor: pointer;
  font-size: .8rem;
  padding: .4rem .6rem;
}

.access-code-reveal:hover,
.access-code-reveal:focus-visible { background: #dbeafe; border-color: #93c5fd; color: #1d4ed8; }
.access-code-reveal.is-revealed { background: #fff7ed; border-color: #fed7aa; color: #9a3412; cursor: default; }
.access-code-reveal.is-revealed::after { content: "Edit exam to replace forgotten code"; font-size: .68rem; font-weight: 750; margin-left: .25rem; }

.data-pill small {
  align-items: center;
  background: #fff;
  border-radius: 999px;
  color: var(--app-primary);
  display: inline-flex;
  font-size: .78rem;
  justify-content: center;
  min-width: 1.45rem;
  padding: .2rem .35rem;
}

.subject-pill {
  --subject-bg: #eef6ff;
  --subject-border: #c8def7;
  --subject-color: #1d4ed8;
  align-items: center;
  background: var(--subject-bg);
  border: 1px solid var(--subject-border);
  border-radius: 999px;
  color: var(--subject-color);
  display: inline-flex;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 850;
  line-height: 1;
  padding: .42rem .62rem;
  white-space: nowrap;
}

.subject-pill small,
.data-pill.subject-pill small {
  background: rgba(255, 255, 255, .78);
  color: var(--subject-color);
}

[data-subject-tone="0"] { --subject-bg: #eef6ff; --subject-border: #bfdbfe; --subject-color: #1d4ed8; }
[data-subject-tone="1"] { --subject-bg: #ecfdf5; --subject-border: #a7f3d0; --subject-color: #047857; }
[data-subject-tone="2"] { --subject-bg: #fff7ed; --subject-border: #fed7aa; --subject-color: #c2410c; }
[data-subject-tone="3"] { --subject-bg: #f5f3ff; --subject-border: #ddd6fe; --subject-color: #6d28d9; }
[data-subject-tone="4"] { --subject-bg: #fdf2f8; --subject-border: #fbcfe8; --subject-color: #be185d; }
[data-subject-tone="5"] { --subject-bg: #f0fdfa; --subject-border: #99f6e4; --subject-color: #0f766e; }
[data-subject-tone="6"] { --subject-bg: #fefce8; --subject-border: #fde68a; --subject-color: #a16207; }
[data-subject-tone="7"] { --subject-bg: #f8fafc; --subject-border: #cbd5e1; --subject-color: #475569; }
.selection-mode-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: .9rem;
}

.selection-mode-card {
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  cursor: pointer;
  display: grid;
  gap: .7rem;
  grid-template-columns: auto auto minmax(0, 1fr);
  min-height: 104px;
  padding: 1rem;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.selection-mode-card:hover,
.selection-mode-card:focus-within {
  border-color: #9fc4ed;
  box-shadow: var(--app-shadow-sm);
  transform: translateY(-1px);
}

.selection-mode-card:has(input:checked) {
  background: linear-gradient(135deg, #edf6ff 0%, #ffffff 100%);
  border-color: var(--app-primary);
  box-shadow: 0 12px 28px rgba(23, 105, 194, .12), 0 0 0 3px rgba(47, 111, 212, .11);
}

.selection-mode-card input {
  margin: 0;
}

.selection-mode-icon {
  align-items: center;
  background: #e8f2ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: var(--app-primary);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.selection-mode-card:has(input:checked) .selection-mode-icon {
  background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
  border-color: #2563eb;
  color: #fff;
}

.selection-mode-card strong,
.selection-mode-card small {
  display: block;
}

.selection-mode-card small {
  color: var(--app-muted);
  margin-top: .2rem;
}

.set-stat-panel {
  align-items: center;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  display: grid;
  gap: .85rem;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  padding: .9rem;
}

.set-stat-panel.is-loading {
  opacity: .7;
  pointer-events: none;
}

.set-stat-total {
  background: #fff;
  border: 1px solid #c8def7;
  border-radius: var(--app-radius);
  display: grid;
  gap: .2rem;
  padding: .85rem;
  text-align: center;
}

.set-stat-total span {
  color: var(--app-muted);
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.set-stat-total strong {
  color: var(--app-primary-dark);
  font-size: 2.2rem;
  line-height: 1;
}

.set-stat-subjects {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.access-closed-shell {
  align-items: center;
  display: grid;
  gap: .75rem;
  margin: clamp(3rem, 10vh, 7rem) auto;
  max-width: 620px;
  padding: 2rem;
  text-align: center;
}

.access-closed-icon {
  align-items: center;
  background: linear-gradient(135deg, #fff7ed, #fee2e2);
  border: 1px solid #fed7aa;
  border-radius: 14px;
  color: #c2410c;
  display: inline-flex;
  font-size: 1.8rem;
  height: 62px;
  justify-content: center;
  justify-self: center;
  width: 62px;
}

.access-closed-shell h1 {
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  font-weight: 850;
  margin: 0;
}

.access-closed-shell p:not(.eyebrow) {
  color: var(--app-muted);
  margin: 0;
  max-width: 44rem;
}

.exam-builder-shell {
  align-items: start;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.exam-builder-summary {
  align-items: stretch;
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  position: sticky;
  top: 76px;
  z-index: 8;
}

.exam-question-picker { margin-top: 0; }

.summary-metric {
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  border: 1px solid #cfe2f7;
  border-radius: var(--app-radius);
  display: grid;
  gap: .35rem;
  min-height: 92px;
  padding: .9rem 1rem;
}

.exam-builder-summary strong {
  color: var(--app-text);
  font-size: 1.3rem;
  line-height: 1.15;
}

.exam-builder-summary .summary-subject {
  font-size: 1rem;
}

.summary-label {
  color: var(--app-muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.question-filter-bar,
.bulk-settings {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.question-filter-bar {
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  margin-bottom: 1rem;
  padding: .75rem;
}

.question-filter-bar input,
.question-filter-bar select,
.bulk-settings input {
  min-height: 40px;
  border: 1px solid #bfcede;
  border-radius: 7px;
  background: #fff;
  padding: .55rem .7rem;
}

.question-filter-bar input {
  flex: 1 1 320px;
}

.question-filter-bar select {
  flex: 0 0 180px;
}

.bulk-settings {
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.bulk-settings label {
  align-items: center;
  color: #334155;
  display: inline-flex;
  gap: .5rem;
  font-weight: 750;
}

.bulk-settings input {
  width: 96px;
}

.question-bank-grid {
  display: grid;
  gap: .65rem;
  grid-template-columns: 1fr;
}

.question-bank-item {
  align-items: center;
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  cursor: pointer;
  display: grid;
  gap: .9rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 74px;
  padding: .85rem 1rem;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.question-bank-item:hover,
.question-bank-item:focus-within {
  background: #f8fbff;
  border-color: #9fc4ed;
  box-shadow: var(--app-shadow-sm);
  transform: translateY(-1px);
}

.question-bank-item:has(input:checked) {
  background: #edf6ff;
  border-color: var(--app-primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 212, .11);
}

.question-check {
  align-items: center;
  display: grid;
  height: 28px;
  justify-items: center;
  width: 28px;
}

.question-bank-item input {
  height: 16px;
  margin: 0;
  width: 16px;
}

.question-bank-copy {
  display: grid;
  gap: .3rem;
  min-width: 0;
}

.question-bank-item strong {
  display: block;
  font-weight: 750;
  line-height: 1.35;
}

.question-bank-item small {
  color: var(--app-muted);
  display: block;
}

.question-bank-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  justify-content: flex-end;
  min-width: 180px;
}

.question-bank-meta span {
  background: #f1f6fb;
  border: 1px solid #d7e5f3;
  border-radius: 999px;
  color: #31506f;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1;
  padding: .45rem .6rem;
}

.login-shell {
  box-sizing: border-box;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem 1rem;
}

body:has(.login-shell) .app-main {
  padding: 0;
  width: 100%;
}

body:has(.login-shell) .app-footer {
  display: none;
}

.login-panel {
  width: min(430px, 92vw);
  padding: 2rem;
  position: relative;
  box-shadow: 0 24px 70px rgba(23, 105, 194, .13);
}

.login-brand { text-align: center; }

.login-logo-badge {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  margin: 0 auto 1.25rem;
  padding: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff 0%, #dbeafe 42%, #38a3ff 100%);
  box-shadow: 0 18px 38px rgba(23, 105, 194, .26), 0 0 0 8px rgba(255,255,255,.72);
}

.login-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #ffffff;
  background: #ffffff;
}

.login-panel input {
  display: block;
  width: 100%;
  padding: .62rem .75rem;
  border: 1px solid #bfcede;
  border-radius: 7px;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
  padding: .9rem;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: #fff;
  box-shadow: var(--app-shadow-sm);
}

.attempt-filter-bar {
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(135px, .75fr) minmax(135px, .75fr) auto auto;
  margin-bottom: 0;
  box-shadow: none;
}

.attempt-filter-bar .attempt-date-filter,
.attempt-filter-bar .flatpickr-wrapper,
.attempt-filter-bar .flatpickr-wrapper .form-control {
  width: 100%;
}

.attempt-today-btn {
  background: linear-gradient(135deg, #eff6ff 0%, #fff 100%);
  border-color: #93c5fd;
  color: #1d4ed8;
  font-weight: 850;
  white-space: nowrap;
}

.attempt-today-btn:hover,
.attempt-today-btn:focus,
.attempt-today-btn.is-active {
  background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
  border-color: #2563eb;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
  color: #fff;
}

.question-table-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0;
  box-shadow: none;
}

.question-table-filter-bar > * {
  flex: 1 1 150px;
  min-width: 0;
}

.question-table-filter-bar > .form-control[type="search"] {
  flex: 2 1 220px;
}

.question-table-filter-bar > .question-date-filter {
  flex: 1 1 150px;
}

.question-table-filter-bar > .btn {
  flex: 0 0 auto;
  min-width: 110px;
  white-space: nowrap;
}

.question-date-filter {
  align-items: center;
  display: flex;
  min-width: 0;
  position: relative;
}

.question-date-filter i {
  color: #64748b;
  font-size: .9rem;
  left: .72rem;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

.question-date-filter .form-control {
  min-height: 42px;
  padding-left: 2.15rem;
}

.result-date-filter { flex: 1 1 175px; }

.question-bulk-form {
  margin: .85rem 0 0;
}

.question-bulk-bar {
  align-items: center;
  background: linear-gradient(135deg, #f8fafc 0%, #eef6ff 100%);
  border: 1px solid #d6e2f0;
  border-radius: 8px;
  display: flex;
  gap: .9rem;
  justify-content: space-between;
  margin-bottom: 0;
  padding: .75rem;
}

.question-bulk-summary {
  align-items: center;
  display: inline-flex;
  gap: .65rem;
  min-width: 190px;
}

.question-bulk-icon {
  align-items: center;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  color: #6d28d9;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.question-bulk-summary strong {
  color: #1f2937;
  display: block;
  font-size: .9rem;
  font-weight: 850;
}

.question-bulk-summary span:last-child {
  color: var(--app-muted);
  display: block;
  font-size: .78rem;
  font-weight: 800;
}

.question-bulk-controls {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  gap: .6rem;
  justify-content: flex-end;
}

.question-bulk-controls .form-select {
  min-height: 38px;
}

.question-bulk-controls #questionBulkAction {
  max-width: 210px;
}

.question-bulk-controls #questionBulkTargetSet,
.question-bulk-controls #questionBulkTargetSubject {
  max-width: 180px;
}

.question-bulk-controls #questionBulkTargetSet:disabled,
.question-bulk-controls #questionBulkTargetSubject:disabled {
  background-color: #f8fafc;
  color: #94a3b8;
}

.filter-bar.is-loading,
.question-filter-bar.is-loading,
.attempt-filter-bar.is-loading,
.question-table-filter-bar.is-loading {
  opacity: .72;
  pointer-events: none;
}

.table-skeleton-row td {
  padding-bottom: .85rem;
  padding-top: .85rem;
}

.current-exam-questions-card {
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 44%);
  border-color: #bfdbfe;
}

.current-exam-question-count {
  align-items: center;
  background: #e8f3ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d5fae;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 850;
  gap: .4rem;
  padding: .42rem .68rem;
}

.exam-question-order {
  align-items: center;
  background: #e8f3ff;
  border-radius: 999px;
  color: #1769c2;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 900;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.exam-question-preview {
  background: transparent;
  border: 0;
  color: var(--app-text);
  display: grid;
  gap: .25rem;
  padding: .2rem 0;
  text-align: left;
  width: 100%;
}

.exam-question-preview > span { font-weight: 750; }
.exam-question-preview small { color: var(--app-muted); font-size: .77rem; font-weight: 700; }
.exam-question-preview small i { color: #2563eb; margin-right: .3rem; }
.exam-question-preview:hover > span,
.exam-question-preview:focus-visible > span { color: #1769c2; text-decoration: underline; text-underline-offset: .2em; }

.exam-question-subject,
.exam-question-marks {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: .74rem;
  font-weight: 850;
  line-height: 1.2;
  padding: .36rem .55rem;
  white-space: nowrap;
}

.exam-question-subject {
  background: #eff6ff;
  color: #1d5fae;
}

.exam-question-subject i { color: #2563eb; font-size: .66rem; margin-right: .32rem; }

.exam-question-marks {
  background: #ecfdf5;
  color: #047857;
}

.exam-question-detail-row td { background: #f8fbff; padding: .55rem 1rem 1rem !important; }
.exam-question-preview-panel { background: #fff; border: 1px solid #cfe3fb; border-radius: 10px; box-shadow: 0 8px 18px rgba(30, 64, 175, .08); padding: .9rem 1rem; }
.exam-question-preview-heading { align-items: center; display: flex; gap: .6rem; justify-content: space-between; margin-bottom: .65rem; }
.exam-question-preview-heading span { color: #2563eb; font-size: .75rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.exam-question-preview-heading strong { background: #e8f3ff; border-radius: 999px; color: #1769c2; font-size: .75rem; padding: .28rem .55rem; }
.exam-question-preview-actions { align-items: center; display: inline-flex; gap: .5rem; }
.exam-question-preview-actions .btn { letter-spacing: 0; text-transform: none; }
.exam-question-preview-text { font-weight: 750; line-height: 1.6; }
.exam-question-options { display: grid; gap: .45rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .8rem; }
.exam-question-options span { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; line-height: 1.45; padding: .5rem .6rem; }
.exam-question-options b { color: #2563eb; margin-right: .45rem; }
.exam-question-options span.is-correct { background: #ecfdf5; border-color: #86efac; color: #166534; font-weight: 750; }
.exam-question-options span.is-correct b { color: #15803d; }
.exam-question-options span.is-correct i { color: #16a34a; float: right; margin-top: .15rem; }

.table-skeleton-line {
  animation: skeletonPulse 1.15s ease-in-out infinite;
  background: linear-gradient(90deg, #e8eef7 0%, #f6f9fd 45%, #e8eef7 100%);
  background-size: 220% 100%;
  border-radius: 999px;
  display: block;
  height: .82rem;
  max-width: 170px;
  min-width: 56px;
  width: 100%;
}

.table-skeleton-line.is-short {
  max-width: 86px;
}

.pagination-skeleton {
  max-width: 220px;
  min-height: 36px;
}

.table-pagination.is-loading {
  justify-content: flex-end;
  min-height: 42px;
}

@keyframes skeletonPulse {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.attempt-filter-status {
  align-self: center;
  align-items: center;
  background: linear-gradient(135deg, #f8fbff, #e7f2ff);
  border: 1px solid #cfe1f7;
  border-radius: 999px;
  color: #245a91;
  display: inline-flex;
  font-size: .76rem;
  font-weight: 850;
  gap: .35rem;
  line-height: 1;
  min-height: 2rem;
  padding: .38rem .65rem;
  box-shadow: 0 3px 10px rgba(30, 91, 150, .08);
  white-space: nowrap;
}

.table-heading-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  justify-content: flex-end;
  margin-left: auto;
  min-height: 2rem;
}

.table-heading-actions .attempt-filter-status {
  justify-content: center;
  min-width: 9.5rem;
}

.monitor-heading-actions {
  align-items: center;
  display: flex;
  gap: .7rem;
}

.table-page-size-control,
.monitor-page-size-control {
  align-items: center;
  background: #f5f9ff;
  border: 1px solid #cfe0f4;
  border-radius: 999px;
  display: inline-flex;
  gap: .12rem;
  padding: .18rem;
}

.table-page-size-control > span,
.monitor-page-size-control > span {
  color: var(--app-muted);
  font-size: .72rem;
  font-weight: 850;
  padding: 0 .35rem 0 .25rem;
}

.table-page-size-control button,
.monitor-page-size-control button {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #52708c;
  font-size: .75rem;
  font-weight: 850;
  min-width: 2.15rem;
  padding: .32rem .45rem;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.table-page-size-control button:hover,
.table-page-size-control button:focus-visible,
.monitor-page-size-control button:hover,
.monitor-page-size-control button:focus-visible { background: #e1efff; color: #1459a6; }
.table-page-size-control button.is-active,
.monitor-page-size-control button.is-active { background: #1769c2; box-shadow: 0 2px 6px rgba(23, 105, 194, .25); color: #fff; }

.dashboard-attempts {
  padding: 1rem;
}

.dashboard-attempts .table-responsive {
  border: 1px solid var(--app-border);
  margin-top: 1rem;
  min-height: 0;
}

#monitorTable th:not(:first-child),
#monitorTable td:not(:first-child) {
  text-align: center;
}

#monitorTable .monitor-actions-heading,
#monitorTable .monitor-actions-cell {
  text-align: center;
}

#monitorTable th,
#monitorTable td {
  white-space: nowrap;
}

#monitorTable .monitor-idle-heading,
#monitorTable .monitor-idle-cell {
  min-width: 4.5rem;
  padding-left: .35rem;
  padding-right: .35rem;
  width: 4.5rem;
}

#monitorTable .monitor-progress {
  display: grid;
  gap: .32rem;
  margin-inline: auto;
  min-width: 108px;
  text-align: left;
}

#monitorTable .monitor-progress-copy {
  align-items: baseline;
  display: flex;
  font-size: .68rem;
  justify-content: space-between;
  line-height: 1;
}

#monitorTable .monitor-progress-copy strong { color: #244766; font-size: .76rem; font-variant-numeric: tabular-nums; }
#monitorTable .monitor-progress-copy strong small { color: #7890a7; font-size: .62rem; font-weight: 750; }
#monitorTable .monitor-progress-copy em { color: #1769c2; font-size: .62rem; font-style: normal; font-weight: 900; }
#monitorTable .monitor-progress-track { background: #e4edf7; border-radius: 999px; display: block; height: .38rem; overflow: hidden; }
#monitorTable .monitor-progress-track > i { background: linear-gradient(90deg, #5da9f6 0%, #1769c2 100%); border-radius: inherit; display: block; height: 100%; min-width: 2px; transition: width .35s ease; }
#monitorTable .monitor-progress.is-zero .monitor-progress-copy em { color: #71849a; }
#monitorTable .monitor-progress.is-zero .monitor-progress-track > i { background: #b4c3d2; }
#monitorTable .monitor-progress.is-low .monitor-progress-copy em { color: #dc2626; }
#monitorTable .monitor-progress.is-low .monitor-progress-track > i { background: linear-gradient(90deg, #fb7185, #e11d48); }
#monitorTable .monitor-progress.is-mid .monitor-progress-copy em { color: #c2410c; }
#monitorTable .monitor-progress.is-mid .monitor-progress-track > i { background: linear-gradient(90deg, #fbbf24, #f97316); }
#monitorTable .monitor-progress.is-high .monitor-progress-copy em { color: #047857; }
#monitorTable .monitor-progress.is-high .monitor-progress-track > i { background: linear-gradient(90deg, #5eead4, #059669); }

#monitorTable .monitor-score-pie {
  --correct: 0%;
  align-items: center;
  background: conic-gradient(#10b981 0 var(--correct), #f97316 var(--correct) 100%);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(22, 101, 52, .13);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  position: relative;
  width: 34px;
}

#monitorTable .monitor-score-pie::after { background: #fff; border-radius: 50%; content: ""; height: 72%; position: absolute; width: 72%; }
#monitorTable .monitor-score-pie > span { color: #294a69; display: block; font-size: .48rem; font-variant-numeric: tabular-nums; line-height: .9; position: relative; z-index: 1; }
#monitorTable .monitor-score-pie strong { display: block; font-size: .64rem; }
#monitorTable .monitor-score-pie small { color: #7b8fa3; display: block; font-size: .43rem; font-weight: 850; margin-top: .06rem; }
#monitorTable .monitor-score-pie.is-empty { background: #dce6ef; box-shadow: none; }

#monitorTable .monitor-score {
  align-items: center;
  display: inline-grid;
  gap: .34rem;
  grid-template-columns: 34px auto;
  text-align: left;
}

#monitorTable .monitor-score-copy { display: block; line-height: 1; }
#monitorTable .monitor-score-copy strong { color: #1c5b4d; display: block; font-size: .72rem; font-variant-numeric: tabular-nums; }
#monitorTable .monitor-score-copy small { color: #778da3; display: block; font-size: .51rem; font-weight: 850; letter-spacing: .02em; margin-top: .11rem; text-transform: uppercase; }

#monitorTable .monitor-answer-quality {
  align-items: center;
  display: inline-grid;
  gap: .16rem .3rem;
  grid-template-columns: auto minmax(34px, 1fr) auto;
  min-width: 94px;
  text-align: center;
}

#monitorTable .monitor-quality-count { align-items: center; color: #516f88; display: inline-flex; font-size: .68rem; font-variant-numeric: tabular-nums; font-weight: 900; gap: .18rem; line-height: 1; }
#monitorTable .monitor-quality-count i { background: currentColor; border-radius: 50%; height: 5px; width: 5px; }
#monitorTable .monitor-quality-count.is-correct { color: #059669; }
#monitorTable .monitor-quality-count.is-wrong { color: #ea580c; }
#monitorTable .monitor-answer-quality > strong { color: #244a68; font-size: .66rem; font-variant-numeric: tabular-nums; line-height: 1; }
#monitorTable .monitor-quality-meter { background: #f97316; border-radius: 999px; display: block; grid-column: 1 / -1; height: 5px; overflow: hidden; }
#monitorTable .monitor-quality-meter > i { background: #10b981; border-radius: inherit; display: block; height: 100%; min-width: 0; width: var(--correct); }
#monitorTable .monitor-answer-quality.is-empty .monitor-quality-count { color: #94a3b8; }
#monitorTable .monitor-answer-quality.is-empty > strong { color: #8092a4; }
#monitorTable .monitor-answer-quality.is-empty .monitor-quality-meter { background: #dce6ef; }
#monitorTable .monitor-answer-quality.is-empty .monitor-quality-meter > i { width: 0; }

#monitorTable .monitor-quality-orbit {
  align-items: center;
  display: inline-grid;
  gap: .5rem;
  grid-template-columns: 38px auto;
  text-align: left;
}

#monitorTable .monitor-quality-ring {
  align-items: center;
  background: conic-gradient(#10b981 0 var(--correct), #f97316 var(--correct) 100%);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(31, 91, 82, .13);
  display: inline-flex;
  height: 38px;
  justify-content: center;
  position: relative;
  width: 38px;
}

#monitorTable .monitor-quality-ring::after { background: #fff; border-radius: 50%; content: ""; height: 71%; position: absolute; width: 71%; }
#monitorTable .monitor-quality-ring strong,
#monitorTable .monitor-quality-ring small { position: relative; z-index: 1; }
#monitorTable .monitor-quality-ring strong { color: #274964; font-size: .61rem; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
#monitorTable .monitor-quality-ring small { color: #698198; font-size: .41rem; font-weight: 900; margin-left: .02rem; }
#monitorTable .monitor-quality-breakdown { display: grid; gap: .16rem; }
#monitorTable .monitor-quality-breakdown > span { align-items: center; display: inline-flex; font-size: .62rem; font-variant-numeric: tabular-nums; font-weight: 900; gap: .24rem; line-height: 1; }
#monitorTable .monitor-quality-breakdown i { align-items: center; border-radius: 5px; display: inline-flex; font-size: .42rem; height: 13px; justify-content: center; width: 13px; }
#monitorTable .monitor-quality-breakdown .is-correct { color: #047857; }
#monitorTable .monitor-quality-breakdown .is-correct i { background: #d1fae5; }
#monitorTable .monitor-quality-breakdown .is-wrong { color: #c2410c; }
#monitorTable .monitor-quality-breakdown .is-wrong i { background: #ffedd5; }
#monitorTable .monitor-quality-orbit.is-empty .monitor-quality-ring { background: #dce6ef; box-shadow: none; }
#monitorTable .monitor-quality-orbit.is-empty .monitor-quality-breakdown > span { color: #8da1b4; }
#monitorTable .monitor-quality-orbit.is-empty .monitor-quality-breakdown i { background: #e7eef5; }

#monitorTable .monitor-rank {
  align-items: center;
  background: linear-gradient(145deg, #f3f8ff 0%, #fff 100%);
  border: 1px solid #dbe8f6;
  border-radius: 999px;
  color: #42617d;
  display: inline-flex;
  font-size: .64rem;
  font-variant-numeric: tabular-nums;
  gap: .25rem;
  justify-content: center;
  min-width: 58px;
  padding: .27rem .42rem;
}

#monitorTable .monitor-rank i { color: #397ec4; font-size: .63rem; }
#monitorTable .monitor-rank strong { color: #1c4267; font-size: .72rem; }
#monitorTable .monitor-rank small { color: #7088a0; font-size: .58rem; font-weight: 800; }
#monitorTable .monitor-rank.is-first { background: linear-gradient(145deg, #fff8d8 0%, #fffdf2 100%); border-color: #f4da78; }
#monitorTable .monitor-rank.is-first i { color: #bd7b08; }
#monitorTable .monitor-rank.is-second { background: linear-gradient(145deg, #f1f5f9 0%, #fff 100%); border-color: #d7e0ea; }
#monitorTable .monitor-rank.is-second i { color: #64748b; }
#monitorTable .monitor-rank.is-third { background: linear-gradient(145deg, #fff1e8 0%, #fffaf7 100%); border-color: #f5cdb5; }
#monitorTable .monitor-rank.is-third i { color: #b45309; }
#monitorTable .monitor-rank.is-unranked { background: transparent; border-color: transparent; color: #91a3b5; }

#monitorTable tbody tr.is-rank-first { --bs-table-bg: #fff9df; }
#monitorTable tbody tr.is-rank-second { --bs-table-bg: #eef7ff; }
#monitorTable tbody tr.is-rank-third { --bs-table-bg: #fff1e7; }
#monitorTable tbody tr.is-rank-first > td { box-shadow: inset 0 1px 0 rgba(202, 138, 4, .13), inset 0 -1px 0 rgba(202, 138, 4, .09); }
#monitorTable tbody tr.is-rank-second > td { box-shadow: inset 0 1px 0 rgba(37, 99, 235, .11), inset 0 -1px 0 rgba(37, 99, 235, .075); }
#monitorTable tbody tr.is-rank-third > td { box-shadow: inset 0 1px 0 rgba(194, 65, 12, .1), inset 0 -1px 0 rgba(194, 65, 12, .07); }

#monitorTable .monitor-unanswered {
  align-items: center;
  background: linear-gradient(135deg, #f7faff 0%, #eef4fa 100%);
  border: 1px solid #d7e3ee;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 3px 9px rgba(55, 79, 104, .06);
  color: #556d85;
  display: inline-grid;
  font-variant-numeric: tabular-nums;
  gap: .32rem;
  grid-template-columns: 24px minmax(0, 1fr);
  padding: .3rem .42rem .3rem .3rem;
  text-align: left;
}

#monitorTable .monitor-unanswered > i { align-items: center; background: #e1ebf5; border-radius: 7px; color: #58738d; display: inline-flex; font-size: .65rem; height: 24px; justify-content: center; width: 24px; }
#monitorTable .monitor-unanswered > span { display: block; min-width: 0; }
#monitorTable .monitor-unanswered strong { color: #294a69; display: inline; font-size: .76rem; line-height: 1; }
#monitorTable .monitor-unanswered small { color: #778da3; display: inline; font-size: .59rem; font-weight: 850; line-height: 1; margin-left: .08rem; white-space: nowrap; }

.question-table-shell {
  position: relative;
}

.question-bank-marks {
  align-items: center;
  background: #ecfdf5;
  border-radius: 999px;
  color: #047857;
  display: inline-flex;
  font-size: .7rem;
  font-weight: 850;
  justify-content: center;
  min-width: 48px;
  padding: .28rem .5rem;
  white-space: nowrap;
}

.question-table-shell #questionsTable tbody {
  transition: opacity .18s ease, transform .18s ease;
}

.table-responsive .table tbody.table-smooth-refresh,
.question-table-shell #questionsTable tbody.table-smooth-refresh {
  opacity: .82;
  transition: opacity .16s ease;
}

.question-table-shell #questionsTable tbody.is-refreshing {
  opacity: .82;
  transform: none;
}

.question-table-loader {
  height: 3px;
  left: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
  transition: opacity .15s ease;
  z-index: 3;
}

.question-table-shell.is-loading .question-table-loader {
  opacity: 1;
}

.question-table-loader-bar {
  animation: questionTableLoaderSlide .9s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, #2563eb, #38bdf8, transparent);
  border-radius: 999px;
  display: block;
  height: 100%;
  width: 45%;
}

@keyframes questionTableLoaderSlide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(260%); }
}

#recentAttemptsTable th:nth-child(n+3),
#recentAttemptsTable td:nth-child(n+3),
#studentsTable th:nth-child(n+3),
#studentsTable td:nth-child(n+3),
#examsTable th:nth-child(n+2):not(:last-child),
#examsTable td:nth-child(n+2):not(:last-child),
#questionsTable th:nth-child(n+3):not(:last-child),
#questionsTable td:nth-child(n+3):not(:last-child),
#resultsTable th:nth-child(n+5):not(:last-child),
#resultsTable td:nth-child(n+5):not(:last-child) {
  text-align: center;
}

#recentAttemptsTable th:nth-child(n+3) .table-sort,
#studentsTable th:nth-child(n+3) .table-sort,
#examsTable th:nth-child(n+2):not(:last-child) .table-sort,
#questionsTable th:nth-child(n+3):not(:last-child) .table-sort,
#resultsTable th:nth-child(n+5):not(:last-child) .table-sort {
  justify-content: center;
}

/* Results are numerical at a glance; keep only the student's name left-aligned. */
#resultsTable th:not(:nth-child(3)),
#resultsTable td:not(:nth-child(3)) {
  text-align: center;
}

#resultsTable th:not(:nth-child(3)) .table-sort {
  justify-content: center;
}

.sn-column {
  text-align: center !important;
  white-space: nowrap;
  width: 1%;
}

.sn-select-wrap {
  align-items: center;
  display: inline-flex;
  gap: .55rem;
  justify-content: center;
  min-width: 54px;
}

.sn-select-wrap .form-check-input {
  margin: 0;
}

.monitor-summary-grid {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.monitor-stat {
  align-items: center;
  appearance: none;
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  box-shadow: var(--app-shadow-sm);
  display: grid;
  cursor: pointer;
  font: inherit;
  gap: .7rem;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
  min-height: 100px;
  padding: 1rem;
  position: relative;
  text-align: left;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  width: 100%;
}

.monitor-stat:hover {
  border-color: color-mix(in srgb, currentColor 34%, #fff);
  box-shadow: var(--app-shadow);
  transform: translateY(-2px);
}

.monitor-stat.is-active,
.monitor-stat:focus-visible {
  border-color: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
  outline: 0;
}

.monitor-stat span {
  color: var(--app-muted);
  display: block;
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.monitor-stat strong {
  color: var(--app-text);
  display: block;
  font-size: 2rem;
  line-height: 1;
  margin-top: .2rem;
}

.monitor-stat .stat-icon { display: grid; }
.monitor-stat.is-pending { background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%); border-color: #cbd5e1; color: #475569; }
.monitor-stat.is-pending .stat-icon { background: #e2e8f0; color: #475569; }
.monitor-stat.is-progress { background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%); border-color: #fed7aa; color: #c2410c; }
.monitor-stat.is-progress .stat-icon { background: #ffedd5; color: #c2410c; }
.monitor-stat.is-submitted { background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%); border-color: #bae6fd; color: #0369a1; }
.monitor-stat.is-submitted .stat-icon { background: #e0f2fe; color: #0369a1; }
.monitor-stat.is-automatic { background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%); border-color: #ddd6fe; color: #6d28d9; }
.monitor-stat.is-automatic .stat-icon { background: #ede9fe; color: #6d28d9; }
.monitor-stat.is-idle { background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%); border-color: #fed7aa; color: #c2410c; }
.monitor-stat.is-idle .stat-icon { background: #ffedd5; color: #c2410c; }

.live-exam-pulse {
  background: linear-gradient(135deg, #f7fbff 0%, #ffffff 58%, #f0fdf8 100%);
  border: 1px solid #c9def4;
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow-sm);
  margin-bottom: 1rem;
  overflow: hidden;
  padding: 1.1rem;
  position: relative;
  transition: box-shadow .2s ease, transform .2s ease;
}

.live-exam-pulse::after {
  background: radial-gradient(circle, rgba(56, 163, 255, .16) 0%, transparent 68%);
  content: "";
  height: 240px;
  pointer-events: none;
  position: absolute;
  right: -70px;
  top: -120px;
  width: 240px;
}

.live-exam-pulse:hover { box-shadow: var(--app-shadow); transform: translateY(-1px); }

.live-exam-pulse > * { position: relative; z-index: 1; }

.live-exam-pulse-heading {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.live-exam-pulse-meta {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.live-exam-pulse-eyebrow {
  align-items: center;
  color: #1769c2;
  display: inline-flex;
  font-size: .73rem;
  font-weight: 850;
  gap: .35rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.live-exam-pulse h2 {
  color: var(--app-text);
  font-size: 1.35rem;
  margin: .2rem 0 0;
}

.live-exam-pulse-heading p {
  color: var(--app-muted);
  font-size: .83rem;
  font-weight: 650;
  margin: .2rem 0 0;
}

.pulse-polling-state {
  align-items: center;
  border: 1px solid;
  border-radius: 10px;
  display: inline-flex;
  gap: .55rem;
  min-width: 218px;
  padding: .4rem .5rem;
}

.pulse-polling-icon {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 30px;
  justify-content: center;
  position: relative;
  width: 30px;
}

.pulse-polling-copy { display: grid; gap: .08rem; min-width: 0; }
.pulse-polling-copy strong { font-size: .77rem; font-weight: 850; line-height: 1.1; white-space: nowrap; }
.pulse-polling-copy small,
.pulse-polling-frequency small { display: block; font-size: .62rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.pulse-polling-frequency { border-left: 1px solid currentColor; display: grid; gap: .05rem; margin-left: .1rem; padding-left: .55rem; }
.pulse-polling-frequency strong { font-size: .88rem; font-variant-numeric: tabular-nums; line-height: 1; }
.pulse-polling-state.is-live { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.pulse-polling-state.is-live .pulse-polling-icon { background: #d1fae5; }
.pulse-polling-state.is-paused { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.pulse-polling-state.is-paused .pulse-polling-icon { background: #ffedd5; }

.pulse-update-state {
  align-items: center;
  color: var(--app-muted);
  display: inline-flex;
  font-size: .7rem;
  font-variant-numeric: tabular-nums;
  gap: .45rem;
}

.pulse-update-state > i { color: #1769c2; }
.pulse-update-state > span + span { border-left: 1px solid #dbe8f5; padding-left: .45rem; }
.pulse-update-state small { display: block; font-size: .6rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.pulse-update-state strong { color: var(--app-text); display: block; font-size: .72rem; font-weight: 800; }

.live-exam-pulse-status {
  align-items: center;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  color: #047857;
  display: inline-flex;
  font-size: .75rem;
  font-weight: 850;
  gap: .4rem;
  padding: .42rem .6rem;
  white-space: nowrap;
}

.live-exam-pulse-status .status-dot {
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(4, 120, 87, .12);
  height: .45rem;
  width: .45rem;
}

.live-exam-pulse-grid {
  display: grid;
  gap: .7rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 1rem;
}

.live-exam-pulse-stat {
  align-items: center;
  background: rgba(255, 255, 255, .82);
  border: 1px solid #dbe8f5;
  border-radius: 9px;
  display: grid;
  gap: .65rem;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 100px;
  overflow: hidden;
  padding: 1rem;
  position: relative;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.live-exam-pulse-stat:hover {
  border-color: #a9cce9;
  box-shadow: 0 10px 22px rgba(23, 105, 194, .1);
  transform: translateY(-2px);
}

.pulse-stat-icon {
  align-items: center;
  background: #e8f2ff;
  border-radius: 8px;
  color: #1769c2;
  display: inline-flex;
  height: 34px;
  grid-column: 2;
  grid-row: 1;
  justify-content: center;
  justify-self: end;
  width: 34px;
}

.live-exam-pulse-stat > div { grid-column: 1; grid-row: 1; min-width: 0; }

.live-exam-pulse-stat > div > span,
.live-exam-insight-heading > span {
  color: var(--app-muted);
  display: block;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.live-exam-pulse-stat strong {
  color: var(--app-text);
  display: block;
  font-size: 1.55rem;
  line-height: 1.12;
  margin-top: .3rem;
  overflow-wrap: anywhere;
}

.live-exam-pulse-stat .live-exam-pulse-time { font-size: 1rem; }
.live-exam-pulse-stat small,
.live-exam-progress-card > small {
  color: var(--app-muted);
  display: block;
  font-size: .73rem;
  font-weight: 650;
  margin-top: .32rem;
}

.live-exam-pulse-stat.is-cohort { background: #ecfeff; border-color: #a5f3fc; color: #0e7490; }
.live-exam-pulse-stat.is-cohort .pulse-stat-icon { background: #cffafe; color: #0e7490; }
.live-exam-pulse-stat.is-duration { background: #fffbeb; border-color: #fde68a; color: #a16207; }
.live-exam-pulse-stat.is-duration .pulse-stat-icon { background: #fef3c7; color: #a16207; }
.live-exam-pulse-stat.is-questions { background: #faf5ff; border-color: #e9d5ff; color: #9333ea; }
.live-exam-pulse-stat.is-questions .pulse-stat-icon { background: #f3e8ff; color: #9333ea; }
.live-exam-pulse-stat.is-accuracy { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.live-exam-pulse-stat.is-accuracy .pulse-stat-icon { background: #d1fae5; color: #047857; }
.live-exam-pulse-stat.is-login { background: #fff1f2; border-color: #fecdd3; color: #be123c; }
.live-exam-pulse-stat.is-login .pulse-stat-icon { background: #ffe4e6; color: #be123c; }
.live-exam-pulse-stat.is-countdown { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.live-exam-pulse-stat.is-countdown strong { font-variant-numeric: tabular-nums; }
.live-exam-pulse-stat.is-countdown .pulse-stat-icon { background: #fee2e2; color: #b91c1c; }

.live-exam-pulse-insights {
  display: grid;
  gap: .7rem;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  margin-top: .7rem;
}

.live-exam-progress-card,
.live-exam-chart-card {
  background: rgba(255, 255, 255, .7);
  border: 1px solid #dbe8f5;
  border-radius: 9px;
  padding: .8rem;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.live-exam-progress-card:hover,
.live-exam-chart-card:hover { border-color: #a9cce9; box-shadow: 0 10px 22px rgba(23, 105, 194, .08); transform: translateY(-1px); }

.live-exam-insight-heading {
  align-items: center;
  display: flex;
  gap: .5rem;
  justify-content: space-between;
}

.live-exam-insight-heading > strong { color: #1769c2; font-size: 1rem; }
.live-exam-insight-heading > small { color: var(--app-muted); font-size: .72rem; font-weight: 750; }

.live-exam-progress-track {
  background: #e7eef7;
  border-radius: 999px;
  height: .7rem;
  margin: .75rem 0 .2rem;
  overflow: hidden;
}

.live-exam-progress-track > span {
  background: linear-gradient(90deg, #1769c2, #38a3ff);
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width .45s ease;
}

.live-response-summary,
.live-status-legend {
  display: grid;
  gap: .45rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: .7rem;
}

.live-response-summary span,
.live-status-legend span {
  color: var(--app-muted);
  font-size: .67rem;
  font-weight: 750;
  text-align: center;
}

.live-response-summary strong,
.live-status-legend strong {
  color: var(--app-text);
  display: block;
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
}

.live-response-summary .is-correct strong,
.live-status-legend .is-submitted strong { color: #047857; }
.live-response-summary .is-wrong strong { color: #c2410c; }
.live-status-legend .is-active strong { color: #1769c2; }
.live-status-legend .is-automatic strong { color: #6d28d9; }

.live-status-track {
  background: #e7eef7;
  border-radius: 999px;
  display: flex;
  height: .75rem;
  margin-top: .85rem;
  overflow: hidden;
}

.live-status-track > span { min-width: 0; transition: width .45s ease; }
.live-status-track .is-active { background: linear-gradient(90deg, #60a5fa, #1769c2); }
.live-status-track .is-submitted { background: linear-gradient(90deg, #6ee7b7, #059669); }
.live-status-track .is-automatic { background: linear-gradient(90deg, #c4b5fd, #7c3aed); }
.live-response-heading { border-top: 1px solid #e5edf6; margin-top: .85rem; padding-top: .75rem; }

.live-exam-bar-chart {
  align-items: end;
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 92px;
  margin-top: .35rem;
}

.live-exam-bar {
  align-items: center;
  display: grid;
  gap: .25rem;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  justify-items: center;
}

.live-exam-bar strong { color: var(--app-text); font-size: .82rem; }
.live-exam-bar > span { background: #94a3b8; border-radius: 5px 5px 2px 2px; max-width: 34px; min-height: 4px; transition: height .45s ease; width: 72%; }
.live-exam-bar.is-live > span { background: linear-gradient(180deg, #60a5fa, #1769c2); }
.live-exam-bar.is-answered > span { background: linear-gradient(180deg, #6ee7b7, #059669); }
.live-exam-bar.is-unanswered > span { background: linear-gradient(180deg, #fdba74, #ea580c); }
.live-exam-bar small { color: var(--app-muted); font-size: .68rem; font-weight: 750; }

.live-exam-chart-empty {
  align-items: center;
  color: var(--app-muted);
  display: flex;
  font-size: .78rem;
  font-weight: 750;
  gap: .45rem;
  grid-column: 1 / -1;
  height: 100%;
  justify-content: center;
  margin: 0;
}

.live-exam-chart-empty i { color: #60a5fa; font-size: 1.25rem; }

/* Live Monitor: calm, scan-first operational workspace. */
.live-exam-pulse {
  background: linear-gradient(135deg, #ffffff 0%, #fbfdff 58%, #f4f9ff 100%);
  border-color: #d4e2f0;
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(15, 76, 129, .08);
  padding: 1.15rem;
}

.live-exam-pulse::after {
  background: radial-gradient(circle, rgba(56, 163, 255, .1) 0%, transparent 68%);
  right: -90px;
  top: -145px;
}

.live-exam-pulse:hover {
  box-shadow: 0 16px 38px rgba(15, 76, 129, .1);
  transform: none;
}

.live-pulse-header {
  align-items: center;
  border-bottom: 1px solid #e6eef7;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-bottom: .95rem;
}

.live-pulse-title-group { min-width: 0; }

.live-exam-pulse-eyebrow {
  color: #1769c2;
  font-size: .65rem;
  letter-spacing: .07em;
}

.live-pulse-title-line {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .18rem;
}

.live-exam-pulse h2 {
  font-size: 1.45rem;
  letter-spacing: -.025em;
  line-height: 1.15;
  margin: 0;
}

.live-pulse-title-group p {
  color: #61758e;
  font-size: .76rem;
  font-weight: 650;
  margin: .28rem 0 0;
}

.live-pulse-scope {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d5f9f;
  display: inline-flex;
  font-size: .66rem;
  font-weight: 850;
  gap: .3rem;
  letter-spacing: .035em;
  padding: .26rem .5rem;
  text-transform: uppercase;
}

.live-pulse-connection {
  align-items: center;
  background: rgba(248, 251, 255, .9);
  border: 1px solid #dbe8f5;
  border-radius: 11px;
  display: grid;
  gap: .5rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-width: 290px;
  padding: .45rem .6rem;
}

.live-pulse-connection-icon {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.live-pulse-connection-icon.is-live { background: #dcfce7; color: #047857; }
.live-pulse-connection-icon.is-paused { background: #fff1df; color: #b45309; }
.live-pulse-connection-copy,
.live-pulse-update { min-width: 0; }
.live-pulse-connection-copy small,
.live-pulse-update small {
  color: #71849a;
  display: block;
  font-size: .59rem;
  font-weight: 850;
  letter-spacing: .06em;
  line-height: 1;
  text-transform: uppercase;
}

.live-pulse-connection-copy strong,
.live-pulse-update strong {
  color: #213750;
  display: block;
  font-size: .73rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1.2;
  margin-top: .18rem;
  white-space: nowrap;
}

.live-pulse-update {
  border-left: 1px solid #dbe8f5;
  padding-left: .55rem;
}

.live-pulse-overview {
  display: grid;
  gap: .7rem;
  grid-template-columns: minmax(230px, .84fr) minmax(0, 2.16fr);
  margin-top: .9rem;
}

.live-pulse-cohort-card {
  align-items: center;
  background: linear-gradient(135deg, #103e6a 0%, #1769c2 100%);
  border: 1px solid rgba(15, 76, 129, .38);
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .17);
  color: #fff;
  display: grid;
  gap: .8rem;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 112px;
  overflow: hidden;
  padding: .9rem 1rem;
  position: relative;
}

.live-pulse-cohort-card::after {
  background: radial-gradient(circle, rgba(255, 255, 255, .21) 0%, transparent 68%);
  content: "";
  height: 135px;
  position: absolute;
  right: -56px;
  top: -68px;
  width: 135px;
}

.live-pulse-cohort-card > * { position: relative; z-index: 1; }
.live-pulse-cohort-card > div > span {
  color: rgba(255, 255, 255, .75);
  display: block;
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.live-pulse-cohort-card strong {
  display: block;
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
  line-height: 1;
  margin-top: .36rem;
}

.live-pulse-cohort-card small {
  color: rgba(255, 255, 255, .78);
  display: block;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: .36rem;
}

.live-pulse-cohort-card > i {
  align-items: center;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  display: inline-flex;
  font-size: 1rem;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.live-pulse-metrics {
  display: grid;
  gap: .7rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.live-pulse-metric {
  align-items: center;
  background: rgba(255, 255, 255, .82);
  border: 1px solid #dbe8f5;
  border-radius: 13px;
  display: grid;
  gap: .6rem;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  padding: .85rem;
}

.live-pulse-metric > i {
  align-items: center;
  background: #eff6ff;
  border-radius: 9px;
  color: #1d66b0;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.live-pulse-metric.is-accuracy > i { background: #ecfdf5; color: #047857; }
.live-pulse-metric.is-questions > i { background: #f5f3ff; color: #6d28d9; }
.live-pulse-metric.is-duration > i { background: #fffbeb; color: #a16207; }
.live-pulse-metric > div { min-width: 0; }
.live-pulse-metric span {
  color: #688098;
  display: block;
  font-size: .61rem;
  font-weight: 850;
  letter-spacing: .05em;
  line-height: 1.15;
  text-transform: uppercase;
}

.live-pulse-metric strong {
  color: #19324c;
  display: block;
  font-size: 1.18rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
  line-height: 1.1;
  margin-top: .25rem;
  overflow-wrap: anywhere;
}

.live-pulse-metric strong b { font: inherit; }
.live-pulse-metric small {
  color: #788ba0;
  display: block;
  font-size: .66rem;
  font-weight: 650;
  line-height: 1.25;
  margin-top: .25rem;
}

.live-pulse-metric small b { color: inherit; font: inherit; }

.live-pulse-panels {
  display: grid;
  gap: .7rem;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  margin-top: .7rem;
}

.live-pulse-panel {
  background: rgba(255, 255, 255, .76);
  border: 1px solid #dbe8f5;
  border-radius: 13px;
  min-width: 0;
  padding: .85rem .9rem;
}

.live-pulse-panel-heading {
  align-items: start;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
}

.live-pulse-panel-heading > div { min-width: 0; }
.live-pulse-panel-heading span {
  color: #45627f;
  display: block;
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.live-pulse-panel-heading p {
  color: #71849a;
  font-size: .68rem;
  font-weight: 650;
  line-height: 1.25;
  margin: .2rem 0 0;
}

.live-pulse-panel-heading > strong {
  color: #1769c2;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.live-pulse-panel-heading > strong b { font: inherit; }
.live-pulse-panel-heading > small {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  color: #047857;
  font-size: .61rem;
  font-weight: 850;
  letter-spacing: .05em;
  padding: .22rem .42rem;
  text-transform: uppercase;
}

.live-exam-progress-track {
  background: #e7eff8;
  height: .62rem;
  margin: .8rem 0 0;
}

.live-exam-progress-track > span {
  background: linear-gradient(90deg, #1769c2 0%, #4aa8ff 100%);
  min-width: 0;
}

.live-response-summary {
  gap: .35rem;
  margin-top: .66rem;
}

.live-response-summary span,
.live-status-legend span {
  color: #70839a;
  font-size: .63rem;
  font-weight: 750;
}

.live-response-summary strong,
.live-status-legend strong {
  color: #1f3a56;
  font-size: .87rem;
}

.live-response-summary .is-correct strong { color: #047857; }
.live-response-summary .is-wrong strong { color: #c2410c; }

.live-status-track {
  height: .58rem;
  margin-top: .78rem;
}

.live-status-legend {
  gap: .35rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: .55rem;
}

.live-response-distribution {
  border-top: 1px solid #e7eef6;
  display: grid;
  gap: .43rem;
  margin-top: .72rem;
  padding-top: .68rem;
}

.live-response-row {
  align-items: center;
  display: grid;
  gap: .48rem;
  grid-template-columns: 72px minmax(0, 1fr) 34px;
}

.live-response-row > span:first-child {
  color: #60778f;
  font-size: .66rem;
  font-weight: 800;
}

.live-response-row > strong {
  color: #38536e;
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.live-response-track {
  background: #e7eef6;
  border-radius: 999px;
  display: block;
  height: .36rem;
  overflow: hidden;
}

.live-response-track > i {
  background: #94a3b8;
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 0;
  transition: width .4s ease;
  width: 0;
}

.live-response-row.is-correct .live-response-track > i { background: #10b981; }
.live-response-row.is-wrong .live-response-track > i { background: #f97316; }
.live-response-row.is-unanswered .live-response-track > i { background: #94a3b8; }

.live-pulse-session-facts {
  align-items: center;
  border-top: 1px solid #e6eef7;
  color: #71849a;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1.2rem;
  margin-top: .7rem;
  padding-top: .72rem;
}

.live-pulse-session-facts > span {
  align-items: center;
  display: inline-flex;
  gap: .35rem;
  min-width: 0;
}

.live-pulse-session-facts > span > i { color: #4d85bc; }
.live-pulse-session-facts small {
  color: #73869b;
  font-size: .61rem;
  font-weight: 850;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.live-pulse-session-facts strong {
  color: #3e5872;
  font-size: .69rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.live-pulse-provisional {
  margin-left: auto;
  white-space: nowrap;
}

.live-pulse-provisional > i { color: #8b5cf6 !important; }

/* Live Monitor premium command surface. */
.monitor-summary-grid {
  gap: .75rem;
  margin-bottom: 1.1rem;
}

.monitor-summary-grid .monitor-stat {
  --monitor-tone: #64748b;
  --monitor-soft: #f1f5f9;
  --monitor-line: #dbe3ec;
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--monitor-tone) 11%, transparent) 0, transparent 42%),
    linear-gradient(135deg, var(--monitor-soft) 0%, #fff 76%);
  border: 1px solid var(--monitor-line);
  border-radius: var(--app-radius);
  box-shadow: 0 8px 24px rgba(30, 64, 104, .065), inset 0 1px 0 rgba(255, 255, 255, .9);
  gap: .72rem;
  grid-template-columns: minmax(0, 1fr) auto;
  isolation: isolate;
  min-height: 100px;
  padding: 1rem;
}

.monitor-summary-grid .monitor-stat > .stat-icon {
  background: var(--monitor-soft);
  border: 1px solid color-mix(in srgb, var(--monitor-tone) 16%, #fff);
  color: var(--monitor-tone);
  justify-self: end;
}

.monitor-summary-grid .monitor-stat::before {
  background: linear-gradient(90deg, var(--monitor-tone), color-mix(in srgb, var(--monitor-tone) 55%, #fff));
  border-radius: 999px;
  content: "";
  height: 3px;
  left: .8rem;
  position: absolute;
  right: .8rem;
  top: 0;
}

.monitor-summary-grid .monitor-stat::after {
  background: var(--monitor-tone);
  border-radius: 50%;
  content: "";
  filter: blur(28px);
  height: 58px;
  opacity: .07;
  pointer-events: none;
  position: absolute;
  right: -20px;
  top: -20px;
  width: 58px;
  z-index: -1;
}

.monitor-summary-grid .monitor-stat:hover {
  border-color: color-mix(in srgb, var(--monitor-tone) 38%, #dbe3ec);
  box-shadow: 0 14px 30px rgba(30, 64, 104, .12), inset 0 1px 0 #fff;
}

.monitor-summary-grid .monitor-stat.is-active,
.monitor-summary-grid .monitor-stat:focus-visible {
  border-color: color-mix(in srgb, var(--monitor-tone) 68%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--monitor-tone) 15%, transparent), 0 14px 30px rgba(30, 64, 104, .12);
}

.monitor-summary-grid .monitor-stat-icon {
  background: var(--monitor-soft);
  border: 1px solid color-mix(in srgb, var(--monitor-tone) 16%, #fff);
  border-radius: 12px;
  color: var(--monitor-tone);
  display: inline-flex;
  font-size: .94rem;
  height: 42px;
  place-content: center;
  width: 42px;
}

.monitor-summary-grid .monitor-stat-copy {
  display: block;
  min-width: 0;
}

.monitor-summary-grid .monitor-stat-copy > span {
  color: #6d8096;
  display: block;
  font-size: .63rem;
  font-weight: 900;
  letter-spacing: .075em;
  line-height: 1.15;
  text-transform: uppercase;
}

.monitor-summary-grid .monitor-stat-copy > strong {
  color: #162f49;
  display: block;
  font-size: 1.85rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.045em;
  line-height: 1;
  margin-top: .34rem;
}

.monitor-summary-grid .monitor-stat-copy > small {
  color: #8392a4;
  display: block;
  font-size: .64rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.2;
  margin-top: .27rem;
  text-transform: none;
}

.monitor-summary-grid .monitor-stat-action {
  align-items: center;
  align-self: center;
  background: color-mix(in srgb, var(--monitor-tone) 8%, #fff);
  border-radius: 50%;
  color: var(--monitor-tone);
  display: inline-flex;
  font-size: .58rem;
  height: 22px;
  justify-content: center;
  opacity: .72;
  transition: opacity .18s ease, transform .18s ease;
  width: 22px;
}

.monitor-summary-grid .monitor-stat:hover .monitor-stat-action {
  opacity: 1;
  transform: translateX(2px);
}

.monitor-summary-grid .monitor-stat.is-active .monitor-stat-action i::before { content: "\f00c"; }

.monitor-summary-grid .monitor-stat.is-pending { --monitor-tone: #64748b; --monitor-soft: #f1f5f9; --monitor-line: #dce4ed; }
.monitor-summary-grid .monitor-stat.is-progress { --monitor-tone: #2563eb; --monitor-soft: #eff6ff; --monitor-line: #d6e5ff; }
.monitor-summary-grid .monitor-stat.is-submitted { --monitor-tone: #059669; --monitor-soft: #ecfdf5; --monitor-line: #cbf3df; }
.monitor-summary-grid .monitor-stat.is-automatic { --monitor-tone: #7c3aed; --monitor-soft: #f5f3ff; --monitor-line: #e5dcff; }
.monitor-summary-grid .monitor-stat.is-idle { --monitor-tone: #ea580c; --monitor-soft: #fff7ed; --monitor-line: #ffe1c4; }

.live-exam-pulse {
  background:
    radial-gradient(circle at 90% -10%, rgba(60, 148, 255, .13) 0, transparent 34%),
    linear-gradient(145deg, #fff 0%, #f8fbff 58%, #f5faff 100%);
  border-color: #cbdff3;
  box-shadow: 0 18px 48px rgba(17, 76, 129, .105);
  padding: 1.25rem;
}

.live-exam-pulse::before {
  background: linear-gradient(90deg, #1769c2 0%, #3ba8ff 48%, #7c3aed 100%);
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.live-pulse-header {
  gap: 1.5rem;
  padding-bottom: 1.05rem;
}

.live-pulse-command {
  background: linear-gradient(145deg, #fff 0%, #f3f8ff 100%);
  border: 1px solid #d7e5f3;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(24, 83, 136, .07);
  flex: 0 1 485px;
  min-width: 400px;
  overflow: hidden;
}

.live-pulse-connection {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: .6rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-width: 0;
  padding: .62rem .72rem .56rem;
}

.live-pulse-state {
  align-items: center;
  background: #ecfdf5;
  border: 1px solid #b8efd3;
  border-radius: 999px;
  color: #047857;
  display: inline-flex;
  gap: .33rem;
  padding: .27rem .48rem;
}

.live-pulse-state > i {
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent);
  height: 6px;
  width: 6px;
}

.live-pulse-state > b {
  font-size: .61rem;
  font-weight: 900;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.live-pulse-state.is-paused {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.live-pulse-state.is-offline {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.live-pulse-state.is-refreshing {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.live-pulse-timestamps {
  background: linear-gradient(90deg, #f6f9fd 0%, #eef6ff 100%);
  border-top: 1px solid #e0eaf4;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.live-pulse-update {
  align-items: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, .72), rgba(238, 246, 255, .6));
  border-left: 0;
  display: grid;
  gap: .48rem;
  grid-template-columns: auto minmax(0, 1fr);
  padding: .55rem .7rem;
}

.live-pulse-update + .live-pulse-update { border-left: 1px solid #e0eaf4; }

.live-pulse-update > i {
  align-items: center;
  background: #e8f2ff;
  border-radius: 8px;
  color: #1769c2;
  display: inline-flex;
  font-size: .7rem;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.live-pulse-update > span { min-width: 0; }

.live-pulse-update strong {
  font-size: .68rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-pulse-overview {
  align-items: stretch;
  gap: .8rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 1rem;
}

.live-pulse-cohort-card {
  background: linear-gradient(135deg, #dceeff 0%, #eef7ff 54%, #fff 100%);
  border-color: #b9daf5;
  border-radius: 15px;
  box-shadow: 0 12px 26px rgba(23, 105, 194, .12), inset 0 1px 0 rgba(255, 255, 255, .9);
  color: #173b60;
  min-height: 116px;
}

.live-pulse-cohort-card::after { background: radial-gradient(circle, rgba(37, 125, 214, .16) 0%, transparent 68%); }
.live-pulse-cohort-card > div > span { color: #4e7193; }
.live-pulse-cohort-card strong { color: #173b60; }
.live-pulse-cohort-card small { color: #4f6f8f; }
.live-pulse-cohort-card > i {
  background: linear-gradient(145deg, #e8f4ff 0%, #d4ebff 100%);
  border-color: #b6d9f5;
  color: #1769c2;
}

.live-pulse-metric {
  background: linear-gradient(145deg, #f7fbff 0%, #fff 100%);
  border-radius: 15px;
  box-shadow: 0 7px 20px rgba(26, 81, 132, .055);
  gap: .8rem;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 116px;
  padding: .9rem 1rem;
}

.live-pulse-metric.is-progress {
  background: linear-gradient(135deg, #def8ff 0%, #effdff 58%, #fff 100%);
  border-color: #9edff1;
  box-shadow: 0 8px 21px rgba(8, 145, 178, .1);
}
.live-pulse-metric.is-progress > i { background: #d6f5fb; border-color: #a9e7f3; color: #0e7490; }
.live-pulse-metric.is-progress > div > span { color: #39718a; }
.live-pulse-metric.is-progress > div > strong { color: #0f5670; }
.live-pulse-metric.is-progress > div > small { color: #4d778a; }
.live-pulse-metric.is-accuracy { background: linear-gradient(145deg, #effcf6 0%, #fff 100%); }
.live-pulse-metric.is-questions { background: linear-gradient(145deg, #f7f4ff 0%, #fff 100%); }
.live-pulse-metric.is-duration { background: linear-gradient(145deg, #fffaf0 0%, #fff 100%); }

.live-pulse-metric > i {
  border: 1px solid rgba(23, 105, 194, .09);
  height: 36px;
  order: 2;
  width: 36px;
}

.live-pulse-metric > div { order: 1; }
.live-pulse-metric span { color: #4e7193; font-size: .64rem; letter-spacing: .07em; }
.live-pulse-metric strong { color: #173b60; font-size: 2rem; letter-spacing: -.04em; line-height: 1; margin-top: .36rem; }
.live-pulse-metric small { color: #4f6f8f; font-size: .7rem; font-weight: 700; line-height: 1.3; margin-top: .36rem; }

.live-pulse-panels {
  align-items: stretch;
  gap: .8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: .8rem;
}

.live-pulse-panel {
  background: linear-gradient(145deg, #f7fbff 0%, #fff 100%);
  border-color: #d7e5f3;
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(24, 83, 136, .055);
  min-height: 292px;
  padding: 1rem;
}

.live-pulse-progress-panel { background: linear-gradient(145deg, #f5faff 0%, #fff 100%); }
.live-pulse-health-panel { background: linear-gradient(145deg, #f4fcf8 0%, #fff 100%); }

.live-pulse-panel-heading {
  align-items: center;
  border-bottom: 1px solid #e5edf6;
  padding-bottom: .75rem;
}

.live-pulse-panel-badge {
  align-items: center;
  background: linear-gradient(135deg, #e8f3ff 0%, #f5faff 100%);
  border: 1px solid #d4e7ff;
  border-radius: 999px;
  color: #1769c2;
  display: inline-flex;
  font-size: .6rem;
  font-weight: 900;
  gap: .3rem;
  letter-spacing: .045em;
  padding: .27rem .5rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.live-pulse-panel-badge.is-live {
  background: linear-gradient(135deg, #ddfaeb 0%, #f2fdf7 100%);
  border-color: #bcefd4;
  color: #047857;
}

.live-completion-dashboard {
  align-items: center;
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: .95rem 0 .7rem;
}

.live-completion-pie {
  --pie: 0%;
  --pie-color: #2479d8;
  --pie-track: #e4eef8;
  align-items: center;
  background: linear-gradient(145deg, #f3f8ff 0%, #fff 100%);
  border: 1px solid #dce8f4;
  border-radius: 12px;
  display: grid;
  gap: .42rem;
  justify-items: center;
  min-height: 132px;
  padding: .58rem;
  text-align: center;
}

.live-completion-pie-chart {
  align-items: center;
  aspect-ratio: 1;
  background: conic-gradient(var(--pie-color) var(--pie), var(--pie-track) 0);
  border-radius: 50%;
  box-shadow: 0 7px 16px color-mix(in srgb, var(--pie-color) 16%, transparent);
  display: flex;
  justify-content: center;
  max-width: 76px;
  position: relative;
  width: 100%;
}

.live-completion-pie-chart::after {
  background: linear-gradient(145deg, #fff 0%, color-mix(in srgb, var(--pie-color) 7%, #fff) 100%);
  border-radius: 50%;
  box-shadow: inset 0 1px 5px rgba(23, 70, 114, .08);
  content: "";
  height: 72%;
  position: absolute;
  width: 72%;
}

.live-completion-pie-chart > span {
  color: #667f98;
  display: grid;
  font-size: .58rem;
  font-weight: 800;
  gap: .06rem;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.live-completion-pie-chart strong {
  color: #1b3d5f;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}

.live-completion-pie > span {
  color: #59728b;
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .025em;
}

.live-completion-pie.is-answered { --pie-color: #2479d8; --pie-track: #e1effc; }
.live-completion-pie.is-correct { --pie-color: #059669; --pie-track: #dcf5e8; background: linear-gradient(145deg, #effcf5 0%, #fff 100%); border-color: #d2f0df; }
.live-completion-pie.is-wrong { --pie-color: #ea580c; --pie-track: #ffead8; background: linear-gradient(145deg, #fff6ee 0%, #fff 100%); border-color: #fee2ca; }
.live-completion-pie.is-unanswered { --pie-color: #64748b; --pie-track: #e4ebf2; background: linear-gradient(145deg, #f4f7fa 0%, #fff 100%); border-color: #dee6ee; }

.live-completion-ring {
  --completion: 0%;
  align-items: center;
  aspect-ratio: 1;
  background: conic-gradient(#2479d8 var(--completion), #e5eef7 0);
  border-radius: 50%;
  box-shadow: 0 10px 26px rgba(23, 105, 194, .13);
  display: flex;
  justify-content: center;
  max-width: 132px;
  position: relative;
}

.live-completion-ring::after {
  background: linear-gradient(145deg, #fff, #edf6ff);
  border: 1px solid #e1eaf4;
  border-radius: 50%;
  box-shadow: inset 0 2px 8px rgba(29, 89, 143, .05);
  content: "";
  height: 76%;
  position: absolute;
  width: 76%;
}

.live-completion-ring > span {
  color: #688098;
  display: grid;
  font-size: .61rem;
  font-weight: 750;
  gap: .14rem;
  position: relative;
  text-align: center;
  text-transform: uppercase;
  z-index: 1;
}

.live-completion-ring strong {
  color: #173b60;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
  line-height: 1;
}

.live-completion-ring strong b { font: inherit; }

.live-response-summary {
  display: grid;
  gap: .55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.live-response-summary > span {
  align-items: center;
  background: linear-gradient(145deg, #f5faff 0%, #fff 100%);
  border: 1px solid #e0eaf4;
  border-radius: 11px;
  display: grid;
  gap: .48rem;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 58px;
  padding: .48rem .55rem;
  text-align: left;
}

.live-response-summary > span > i {
  align-items: center;
  background: #e8f2ff;
  border-radius: 8px;
  color: #1769c2;
  display: inline-flex;
  font-size: .65rem;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.live-response-summary > span > span {
  color: #74879b;
  display: block;
  font-size: .61rem;
  font-weight: 750;
  line-height: 1.15;
  text-align: left;
}

.live-response-summary > span strong {
  color: #1d3c5a;
  display: block;
  font-size: .92rem;
  line-height: 1;
  margin-bottom: .14rem;
}

.live-response-summary > .is-correct { background: linear-gradient(145deg, #effcf5 0%, #fff 100%); border-color: #d6f2e3; }
.live-response-summary > .is-correct > i { background: #dcfce7; color: #047857; }
.live-response-summary > .is-wrong { background: linear-gradient(145deg, #fff5ed 0%, #fff 100%); border-color: #ffead8; }
.live-response-summary > .is-wrong > i { background: #ffedd5; color: #c2410c; }
.live-response-summary > .is-unanswered > i { background: #eef2f7; color: #64748b; }

.live-exam-progress-track {
  box-shadow: inset 0 1px 2px rgba(31, 80, 125, .08);
  height: .68rem;
  margin: 0;
}

.live-progress-scale {
  align-items: center;
  color: #7a8ca0;
  display: flex;
  font-size: .62rem;
  font-weight: 700;
  justify-content: space-between;
  margin-top: .4rem;
}

.live-progress-scale strong {
  color: #405e7b;
  font-variant-numeric: tabular-nums;
}

.live-progress-scale b { font: inherit; }

.live-cohort-status { padding-top: .7rem; }

.live-status-track {
  box-shadow: inset 0 1px 2px rgba(31, 80, 125, .1);
  height: .7rem;
  margin: 0;
}

.live-status-legend {
  display: grid;
  gap: .55rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: .65rem;
}

.live-status-legend > span {
  align-items: center;
  background: linear-gradient(145deg, #f3f8ff 0%, #fff 100%);
  border: 1px solid #e1eaf4;
  border-radius: 10px;
  display: grid;
  gap: .42rem;
  grid-template-columns: 8px minmax(0, 1fr);
  padding: .45rem .5rem;
  text-align: left;
}

.live-status-legend > .is-submitted { background: linear-gradient(145deg, #effcf5 0%, #fff 100%); }
.live-status-legend > .is-automatic { background: linear-gradient(145deg, #f6f2ff 0%, #fff 100%); }

.live-status-legend > span > i {
  background: #2479d8;
  border-radius: 999px;
  height: 26px;
  width: 4px;
}

.live-status-legend > span.is-submitted > i { background: #059669; }
.live-status-legend > span.is-automatic > i { background: #7c3aed; }
.live-status-legend > span > span {
  color: #71849a;
  display: block;
  font-size: .59rem;
  font-weight: 750;
  line-height: 1.15;
  text-align: left;
}

.live-status-legend > span strong {
  font-size: .9rem;
  line-height: 1;
  margin-bottom: .15rem;
}

.live-response-distribution {
  gap: .6rem;
  margin-top: .8rem;
  padding-top: .8rem;
}

.live-response-row {
  gap: .6rem;
  grid-template-columns: 82px minmax(0, 1fr) 38px;
}

.live-response-row > span:first-child {
  align-items: center;
  display: inline-flex;
  gap: .4rem;
}

.live-response-row > span:first-child > i {
  background: #94a3b8;
  border-radius: 50%;
  height: 7px;
  width: 7px;
}

.live-response-row.is-correct > span:first-child > i { background: #10b981; }
.live-response-row.is-wrong > span:first-child > i { background: #f97316; }
.live-response-track { height: .52rem; }

.live-pulse-session-facts {
  border-top: 0;
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: .8rem;
  padding-top: 0;
}

.live-pulse-session-facts > span {
  align-items: center;
  background: linear-gradient(145deg, rgba(243, 249, 255, .95), rgba(255, 255, 255, .94));
  border: 1px solid #dce7f2;
  border-radius: 11px;
  display: grid;
  gap: .55rem;
  grid-template-columns: 32px minmax(0, 1fr);
  min-height: 54px;
  padding: .5rem .6rem;
}

.live-pulse-session-facts > span:nth-child(2) { background: linear-gradient(145deg, #f3f8ff 0%, #fff 100%); }
.live-pulse-session-facts > .live-pulse-provisional { background: linear-gradient(145deg, #f7f3ff 0%, #fff 100%); }

.live-pulse-session-facts > span > i {
  align-items: center;
  background: #eaf3ff;
  border-radius: 9px;
  color: #1769c2;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.live-pulse-session-facts > span > span { display: block; min-width: 0; }
.live-pulse-session-facts small { display: block; }
.live-pulse-session-facts strong {
  display: block;
  font-size: .72rem;
  line-height: 1.2;
  margin-top: .18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-pulse-provisional {
  margin-left: 0;
  white-space: normal;
}

.live-pulse-provisional > i {
  background: #f1edff !important;
  color: #7c3aed !important;
}

/* Hover feedback keeps dense live data scannable without changing layout. */
.live-pulse-command,
.live-pulse-cohort-card,
.live-pulse-metric,
.live-pulse-panel,
.live-completion-pie,
.live-response-summary > span,
.live-status-legend > span,
.live-pulse-session-facts > span,
.live-pulse-update,
.live-response-row {
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

@media (hover: hover) {
  .live-pulse-command:hover {
    border-color: #b9d5ee;
    box-shadow: 0 12px 30px rgba(24, 83, 136, .12);
  }

  .live-pulse-cohort-card:hover,
  .live-pulse-metric:hover,
  .live-pulse-panel:hover,
  .live-completion-pie:hover,
  .live-pulse-session-facts > span:hover {
    border-color: #b9d8f2;
    box-shadow: 0 14px 28px rgba(24, 83, 136, .12);
    transform: translateY(-2px);
  }

  .live-response-summary > span:hover,
  .live-status-legend > span:hover {
    background: #fff;
    border-color: #c4dced;
    box-shadow: 0 8px 16px rgba(24, 83, 136, .09);
    transform: translateY(-1px);
  }

  .live-pulse-update:hover {
    background: rgba(255, 255, 255, .9);
  }

  .live-response-row:hover {
    background: rgba(234, 243, 255, .7);
    border-radius: 8px;
    padding-inline: .3rem;
  }

  .live-response-row:hover .live-response-track > i {
    filter: saturate(1.2) brightness(1.04);
  }
}

@media (max-width: 1150px) {
  .live-pulse-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .live-pulse-command { min-width: 365px; }
}

@media (max-width: 992px) {
  .live-pulse-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-pulse-cohort-card { min-height: 96px; }
  .live-pulse-panels { grid-template-columns: 1fr; }
  .live-pulse-panel { min-height: 0; }
}

@media (max-width: 760px) {
  .live-exam-pulse { border-radius: 15px; padding: .9rem; }
  .live-pulse-header { align-items: stretch; flex-direction: column; }
  .live-pulse-command { align-self: auto; flex: none; height: auto; min-height: 0; }
  .live-pulse-command,
  .live-pulse-connection { min-width: 0; width: 100%; }
  .live-pulse-metric { padding: .72rem; }
  .live-pulse-metric > i { display: none; }
  .live-pulse-session-facts { grid-template-columns: 1fr; }
  .live-pulse-provisional { margin-left: 0; white-space: normal; }
}

@media (max-width: 420px) {
  .live-pulse-overview { grid-template-columns: 1fr; }
  .live-response-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-pulse-timestamps { grid-template-columns: 1fr; }
  .live-completion-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-completion-ring { margin-inline: auto; }
  .live-pulse-update + .live-pulse-update { border-left: 0; border-top: 1px solid #e0eaf4; }
  .live-status-legend { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .live-response-track > i,
  .live-exam-progress-track > span,
  .live-pulse-command,
  .live-pulse-cohort-card,
  .live-pulse-metric,
  .live-pulse-panel,
  .live-completion-pie,
  .live-response-summary > span,
  .live-status-legend > span,
  .live-pulse-session-facts > span,
  .live-pulse-update,
  .live-response-row { transition: none; }
}

.monitor-warning-pill {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #c2410c;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 850;
  gap: .35rem;
  padding: .32rem .55rem;
  white-space: nowrap;
}

.monitor-refresh-state {
  align-items: center;
  border: 1px solid;
  border-radius: 9px;
  display: inline-flex;
  gap: .55rem;
  margin-top: .42rem;
  padding: .42rem .6rem;
}

.monitor-refresh-state > i {
  align-items: center;
  border-radius: 7px;
  display: inline-flex;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.monitor-refresh-state strong,
.monitor-refresh-state small {
  display: block;
}

.monitor-refresh-state strong {
  font-size: .76rem;
  font-weight: 850;
  line-height: 1.1;
}

.monitor-refresh-state small {
  font-size: .72rem;
  font-weight: 700;
  margin-top: .12rem;
}

.monitor-refresh-state.is-live {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.monitor-refresh-state.is-live > i { background: #d1fae5; }

.monitor-refresh-state.is-paused {
  background: linear-gradient(135deg, #fff7ed 0%, #fffdf9 100%);
  border-color: #fed7aa;
  color: #c2410c;
}

.monitor-refresh-state.is-paused > i { background: #ffedd5; }

.monitor-action-form {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: .35rem;
  justify-content: center;
}

.monitor-extra-minutes {
  width: 3.25rem;
}

.monitor-extra-time-control {
  display: inline-flex;
  align-items: stretch;
}

.monitor-extra-time-control .monitor-extra-minutes {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
}

.monitor-extra-time-control .btn {
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
}

.exam-filter-bar {
  grid-template-columns: minmax(220px, 1.5fr) minmax(160px, 1fr) minmax(140px, .9fr) minmax(140px, .8fr) auto;
  margin-bottom: 0;
  box-shadow: none;
}

.student-filter-bar {
  align-items: end;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-color: #cfe0f4;
  box-shadow: none;
  grid-template-columns: minmax(320px, 1fr) minmax(170px, .26fr) minmax(150px, .22fr) auto;
  margin-bottom: 0;
  padding: .75rem;
}

.student-filter-search {
  position: relative;
}

.student-filter-search i {
  color: #7c98b6;
  left: .85rem;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.student-filter-search .form-control {
  min-height: 44px;
  padding-left: 2.45rem;
}

.student-filter-field {
  display: grid;
  gap: .3rem;
  margin: 0;
}

.student-filter-field span {
  color: #526b86;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .03em;
  line-height: 1;
  text-transform: uppercase;
}

.student-filter-field .form-select {
  min-height: 44px;
}

.student-filter-bar .form-control,
.student-filter-bar .form-select {
  border-color: #cfe0f4;
  box-shadow: 0 1px 0 rgba(15, 76, 129, .03);
}

.student-filter-bar .form-control:hover,
.student-filter-bar .form-select:hover {
  border-color: #9fc4ed;
}

.student-filter-bar .form-control:focus,
.student-filter-bar .form-select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .12);
}

.student-filter-bar + .student-bulk-bar {
  margin-top: .75rem;
}

.student-filter-bar.is-loading {
  box-shadow: inset 3px 0 0 rgba(23, 105, 194, .28);
}

.result-filter-bar {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, .7fr) minmax(130px, .7fr) auto auto;
  margin-bottom: 0;
  box-shadow: none;
  width: 100%;
}

.result-filter-bar .flatpickr-wrapper,
.result-filter-bar .flatpickr-wrapper .form-control {
  width: 100%;
}

.result-today-btn {
  min-height: 38px;
  white-space: nowrap;
}

.monitor-filter-bar {
  gap: .5rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, .78fr) minmax(0, .78fr) auto;
  margin-bottom: 0;
  box-shadow: none;
}

.monitor-filter-bar .form-control,
.monitor-filter-bar .form-select { min-width: 0; }

.student-roll-field {
  align-content: start;
}

.generated-input-group {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .6rem;
}

.generated-input-group input[readonly] {
  background: #f1f5f9;
  border-style: dashed;
  color: #475569;
}

.generated-input-group input:not([readonly]) {
  background: #fff;
}

.table-sort {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 850;
  gap: .35rem;
  letter-spacing: inherit;
  margin: -.2rem -.28rem;
  padding: .2rem .28rem;
  text-transform: inherit;
  transition: background-color .15s ease, color .15s ease;
}

.table-sort::after {
  color: #8aa3bd;
  content: "\f0dc";
  font-family: "Font Awesome 5 Free";
  font-size: .72rem;
  font-weight: 900;
}

.table-sort.is-active {
  color: var(--app-primary);
}

.table-sort:hover,
.table-sort:focus-visible {
  background: rgba(23, 105, 194, .08);
  color: #155ca8;
}

.table-sort.is-active::after {
  color: var(--app-primary);
  content: "\f0de";
}

.table-sort.is-active[data-direction="desc"]::after {
  content: "\f0dd";
}

.table-sort:focus-visible {
  border-radius: 5px;
  outline: 2px solid rgba(23, 105, 194, .32);
  outline-offset: 3px;
}

.table-pagination {
  align-items: center;
  background: linear-gradient(135deg, #fbfdff, #f3f8ff);
  border: 1px solid #d9e6f4;
  border-radius: 12px;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  margin-top: 1rem;
  padding: .62rem .72rem;
}

.table-pagination-info {
  color: var(--app-muted);
  font-size: .75rem;
  font-weight: 800;
}

.table-pagination-summary { align-items: center; display: flex; flex-wrap: wrap; gap: .4rem .85rem; }
.table-pagination-summary > span { align-items: center; display: inline-flex; gap: .36rem; }
.table-pagination-summary > span i { color: #2563eb; }
.table-pagination-summary strong { color: #1e3a5f; font-size: .75rem; }
.table-pagination-summary strong small { color: #64748b; font-size: inherit; font-weight: 700; }

.table-pagination-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: flex-end;
}

.table-pagination-controls .btn-sm {
  align-items: center;
  background: #fff;
  border: 1px solid #cbdcf0;
  border-radius: 8px;
  color: #245a91;
  display: inline-flex;
  font-size: .72rem;
  font-weight: 850;
  justify-content: center;
  min-height: 2rem;
  min-width: 2rem;
  padding: .32rem .5rem;
}

.table-pagination-controls .btn-sm[aria-current="page"] {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #2563eb;
  box-shadow: 0 4px 10px rgba(37, 99, 235, .24);
  color: #fff;
}

.table-pagination-controls .btn-sm:hover:not(:disabled) { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.table-pagination-controls .btn-sm:disabled { background: #f8fafc; border-color: #e2e8f0; color: #a8b5c5; cursor: not-allowed; opacity: 1; }

.table-pagination .table-page-button { align-items: center; background: #fff; border: 1px solid #cbdcf0; border-radius: 8px; color: #245a91; display: inline-flex; font-size: .72rem; font-weight: 850; gap: .32rem; justify-content: center; min-height: 2rem; min-width: 2rem; padding: .32rem .5rem; }
.table-pagination .table-page-button:hover:not(:disabled) { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.table-pagination .table-page-button.is-active { background: linear-gradient(135deg, #2563eb, #1d4ed8); border-color: #2563eb; box-shadow: 0 4px 10px rgba(37, 99, 235, .24); color: #fff; }
.table-pagination .table-page-button:disabled { background: #f8fafc; border-color: #e2e8f0; color: #a8b5c5; cursor: not-allowed; }

.table-pagination-gap {
  color: var(--app-muted);
  font-weight: 800;
  padding-inline: .2rem;
}

.exam-shell {
  min-height: 100vh;
  margin: -1.4rem calc(clamp(.8rem, 2vw, 1.8rem) * -1) -2.5rem;
  background: #eef3f8;
  position: relative;
}

.exam-loading-overlay {
  align-items: center;
  background: #eef3f8;
  color: #0f4c81;
  display: flex;
  font-size: 1rem;
  font-weight: 850;
  gap: .65rem;
  inset: 0;
  justify-content: center;
  min-height: 100vh;
  opacity: 1;
  position: fixed;
  transition: opacity .16s ease, visibility .16s ease;
  visibility: visible;
  z-index: 2000;
}

.exam-shell.is-exam-ready .exam-loading-overlay {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.exam-loading-overlay.is-error {
  flex-direction: column;
  padding: 1.5rem;
  text-align: center;
}

.exam-loading-dots {
  display: inline-flex;
  gap: .25rem;
}

.exam-loading-dots i {
  animation: examLoadingDot .72s ease-in-out infinite alternate;
  background: currentColor;
  border-radius: 50%;
  display: block;
  height: 7px;
  width: 7px;
}

.exam-loading-dots i:nth-child(2) {
  animation-delay: .12s;
}

.exam-loading-dots i:nth-child(3) {
  animation-delay: .24s;
}

@keyframes examLoadingDot {
  from {
    opacity: .35;
    transform: translateY(0);
  }
  to {
    opacity: 1;
    transform: translateY(-4px);
  }
}

.exam-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid #d9e2ec;
  backdrop-filter: blur(10px);
}

.exam-resume-banner {
  align-items: center;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
  color: #047857;
  display: flex;
  font-size: .875rem;
  font-weight: 750;
  gap: .65rem;
  left: 50%;
  max-width: calc(100vw - 2rem);
  min-width: 0;
  padding: .75rem;
  position: fixed;
  top: 4.7rem;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 1035;
}

.exam-resume-banner span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timer {
  min-width: 118px;
  padding: .42rem .9rem;
  border: 1px solid #86efac;
  border-radius: 999px;
  color: #047857;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  text-align: center;
  font-weight: 900;
  font-size: 1.28rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  box-shadow: 0 10px 24px rgba(5, 150, 105, .16), inset 0 1px 0 rgba(255, 255, 255, .82);
}

.timer.is-warning {
  color: #b91c1c;
  border-color: #fecaca;
  background: linear-gradient(135deg, #fff1f2 0%, #fee2e2 100%);
  box-shadow: 0 10px 24px rgba(220, 38, 38, .18), inset 0 1px 0 rgba(255, 255, 255, .82);
}

.timer.is-critical {
  animation: timerCriticalPulse .55s ease-in-out infinite alternate;
}

@keyframes timerCriticalPulse {
  from {
    transform: scale(1);
    filter: brightness(1);
    box-shadow: 0 10px 24px rgba(220, 38, 38, .18), inset 0 1px 0 rgba(255, 255, 255, .82);
  }
  to {
    transform: scale(1.12);
    filter: brightness(1.18);
    box-shadow: 0 0 0 7px rgba(220, 38, 38, .12), 0 16px 34px rgba(220, 38, 38, .38), inset 0 1px 0 rgba(255, 255, 255, .9);
  }
}

.exam-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
}

.exam-layout.has-split-nav {
  grid-template-columns: 210px minmax(0, 980px) 210px;
}

.question-nav-panel {
  align-self: start;
  display: grid;
  gap: .85rem;
  position: sticky;
  top: 86px;
}

.question-nav-panel-secondary {
  grid-column: 3;
  position: static;
}

.question-nav-spacer {
  visibility: hidden;
}

.exam-progress-card {
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow-sm);
  padding: .9rem;
}

.exam-progress-card strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1;
  margin: .25rem 0 .7rem;
}

.exam-progress-track {
  background: #e5edf7;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.exam-progress-track span {
  background: linear-gradient(90deg, #059669, #34d399);
  display: block;
  height: 100%;
  transition: width .2s ease-out;
  width: 0;
}

.question-nav {
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow-sm);
  display: grid;
  gap: .5rem;
  grid-template-columns: repeat(4, 1fr);
  padding: .75rem;
}

.qnav-btn {
  border: 1px solid #b8c7d9;
  background: #fff;
  border-radius: 7px;
  color: #24364a;
  height: 42px;
  font-weight: 800;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.qnav-btn:hover,
.qnav-btn:focus {
  border-color: #4aa3ff;
  box-shadow: 0 0 0 .18rem rgba(23, 105, 194, .12);
  outline: 0;
}

.qnav-btn.current {
  background: var(--app-primary);
  border-color: var(--app-primary);
  color: #fff;
}

.qnav-btn.answered {
  background: #dcfce7;
  border-color: #22c55e;
  color: #14532d;
}

.qnav-btn.answered.current {
  background: #059669;
  border-color: #059669;
  color: #fff;
}

.qnav-btn.unsaved {
  background: #fff7ed;
  border-color: #fb923c;
  color: #9a3412;
}

.question-nav-legend {
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  color: var(--app-muted);
  display: grid;
  gap: .45rem;
  padding: .75rem;
}

.question-nav-legend span {
  align-items: center;
  display: inline-flex;
  gap: .45rem;
  font-size: .85rem;
  font-weight: 700;
}

.legend-dot {
  border-radius: 50%;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.legend-current { background: var(--app-primary); }
.legend-answered { background: #22c55e; }
.legend-unsaved { background: #fb923c; }

.mobile-question-dock,
.mobile-question-map,
.mobile-question-map-backdrop {
  display: none;
}

.mobile-question-map-header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.mobile-question-map-header strong {
  display: block;
  font-size: 1.15rem;
}

.mobile-question-map-header [data-question-map-close] {
  align-items: center;
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
  display: inline-flex;
  font-size: 1.05rem;
  height: 40px;
  justify-content: center;
  min-width: 40px;
  padding: 0;
}

.mobile-question-map-header [data-question-map-close]:hover,
.mobile-question-map-header [data-question-map-close]:focus {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #9f1239;
}

.question-stack {
  display: grid;
  gap: 1rem;
  max-width: 980px;
}

.question-card {
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  padding: 1.35rem;
  scroll-margin-top: 92px;
  box-shadow: var(--app-shadow-sm);
}

.question-card:not(.is-active) {
  display: none;
}

.question-card.question-preview-card {
  display: block;
}

.question-card[hidden] {
  display: none !important;
}

.question-card.is-active {
  border-color: #9fc4ed;
  box-shadow: 0 18px 46px rgba(15, 23, 42, .10);
}

.question-card.is-entering-forward {
  animation: examQuestionEnterForward .18s ease-out;
}

.question-card.is-entering-backward {
  animation: examQuestionEnterBackward .18s ease-out;
}

@keyframes examQuestionEnterForward {
  from { opacity: .76; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes examQuestionEnterBackward {
  from { opacity: .76; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

.question-kicker {
  color: var(--app-primary);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .03em;
  margin: 0 0 .2rem;
  text-transform: uppercase;
}

.question-text { font-size: 1.06rem; line-height: 1.65; }
.question-image {
  display: block;
  max-width: 100%;
  max-height: 360px;
  min-height: 120px;
  object-fit: contain;
  margin: .75rem auto 1rem;
}

.question-image-missing {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  font-size: .88rem;
  font-weight: 800;
  margin: .75rem 0 1rem;
  padding: .75rem .85rem;
}

.student-question-image-missing {
  font-weight: 700;
}

.math-content.has-tex {
  visibility: hidden;
}

.mathjax-ready .math-content.has-tex {
  visibility: visible;
}

.question-preview-dialog {
  align-items: center;
  display: flex;
  margin: 1.25rem auto;
  max-width: min(820px, calc(100vw - 2rem));
  min-height: calc(100vh - 2.5rem);
  width: min(820px, calc(100vw - 2rem));
}

.preview-modal {
  border: 0;
  border-radius: var(--app-radius);
  display: flex;
  flex-direction: column;
  height: min(760px, calc(100vh - 2.5rem));
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
  width: 100%;
}

.preview-modal .modal-header {
  flex: 0 0 auto;
  background: #fff;
  border-bottom: 1px solid var(--app-border);
}

.preview-modal-body {
  background: #f8fbff;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
  position: relative;
}

#questionPreviewContent.preview-modal-body {
  min-height: 0;
}

/* Keep every question preview at a consistent, viewport-centered size. */
#questionPreviewModal.modal {
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#questionPreviewModal.modal.show {
  display: flex !important;
}

#questionPreviewModal .question-preview-dialog {
  display: block;
  margin: 0 !important;
  min-height: 0;
  width: min(820px, calc(100vw - 2rem));
}

#questionPreviewModal .preview-modal {
  height: min(760px, calc(100vh - 2rem));
  max-height: calc(100vh - 2rem);
}

.question-preview-card {
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow-sm);
  padding: 1.15rem;
}

.question-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .85rem;
}

.question-preview-meta > span {
  align-items: center;
  background: #eef6ff;
  border: 1px solid #c8def7;
  border-radius: 999px;
  color: var(--app-primary-dark);
  display: inline-flex;
  gap: .35rem;
  font-size: .8rem;
  font-weight: 800;
  padding: .45rem .6rem;
}

.question-preview-meta .subject-pill {
  background: var(--subject-bg);
  border-color: var(--subject-border);
  color: var(--subject-color);
}

.question-preview-modal-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  justify-content: flex-end;
  margin-left: auto;
}

.preview-nav-btn {
  border-radius: 8px;
  font-weight: 850;
  min-width: 72px;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.preview-nav-prev {
  background: #fff;
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.preview-nav-edit {
  background: #fff;
  border-color: var(--app-success);
  color: var(--app-success);
}

.preview-nav-next {
  background: #fff;
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.question-preview-modal-actions .preview-nav-prev:hover,
.question-preview-modal-actions .preview-nav-prev:focus {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

.question-preview-modal-actions .preview-nav-edit:hover,
.question-preview-modal-actions .preview-nav-edit:focus {
  background: var(--app-success);
  border-color: var(--app-success);
  color: #fff;
}

.question-preview-modal-actions .preview-nav-next:hover,
.question-preview-modal-actions .preview-nav-next:focus {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

.question-form-pro .preview-nav-prev,
.question-form-pro .preview-nav-next {
  background: #fff;
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.question-form-pro .preview-nav-prev:hover,
.question-form-pro .preview-nav-prev:focus,
.question-form-pro .preview-nav-next:hover,
.question-form-pro .preview-nav-next:focus {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

.preview-nav-btn:disabled,
.preview-nav-btn.disabled {
  opacity: .45;
  pointer-events: none;
}

.preview-text {
  white-space: pre-line;
}

.preview-explanation {
  background: #f8fbff;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  margin-top: 1rem;
  padding: .85rem;
}

.preview-explanation p {
  color: #334155;
  margin: .35rem 0 0;
}

.delete-modal {
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}

.delete-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1rem;
  background: linear-gradient(135deg, #fff7f7 0%, #ffffff 100%);
  border-bottom: 1px solid #fecdd3;
}

.delete-modal-titlebar {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.delete-modal-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  color: var(--app-danger);
  background: linear-gradient(135deg, #fee2e2 0%, #fff1f2 100%);
  border: 1px solid #fecdd3;
}

.delete-modal-kicker {
  margin: 0 0 .18rem;
  color: var(--app-danger);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.delete-modal-body {
  display: grid;
  gap: .75rem;
  padding: 1rem;
  background: #fffafa;
  border-top: 0;
  border-bottom: 1px solid #e5edf7;
}

.delete-modal-warning {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .8rem;
  align-items: center;
  padding: .85rem .95rem;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  background: #fff1f2;
}

.delete-modal-warning i {
  align-items: center;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 999px;
  color: #dc2626;
  display: inline-flex;
  font-size: 1.15rem;
  height: 38px;
  justify-content: center;
  margin-top: 0;
  width: 38px;
}

.delete-modal-warning p {
  color: #b91c1c;
  font-size: .98rem;
  font-weight: 800;
  line-height: 1.45;
  margin: 0;
}

.submit-modal-warning {
  align-items: center;
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff1f2;
}

.submit-modal-warning i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-top: 0;
  border-radius: 999px;
  color: #dc2626;
  background: #fee2e2;
  font-size: 1.15rem;
}

.submit-modal-warning p {
  color: #b91c1c;
  font-weight: 800;
}

#submitExamModal .modal-dialog {
  align-items: center;
  display: block;
  margin: 0;
  max-width: min(100%, 500px);
  width: 100%;
}

#submitExamModal .modal-content {
  width: 100%;
}

/* Bootstrap appends its backdrop after the modal. Keep this confirmation
   above it so every control remains clickable. */
#submitExamModal.show {
  align-items: center;
  background: rgba(15, 23, 42, .52);
  display: flex;
  inset: 0;
  justify-content: center;
  overflow-y: auto;
  padding: 1rem;
  position: fixed;
  pointer-events: auto;
  z-index: 3000;
}

.exam-thankyou-modal .modal-content {
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .22);
}

.exam-thankyou-modal .modal-body {
  padding: 2rem;
  background:
    radial-gradient(circle at 50% -10%, rgba(34, 197, 94, .2), transparent 38%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.exam-thankyou-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
  border-radius: 999px;
  color: #047857;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border: 1px solid #86efac;
  font-size: 1.45rem;
  box-shadow: 0 14px 30px rgba(5, 150, 105, .18);
}

.exam-thankyou-kicker {
  margin: 0 0 .35rem;
  color: #2563eb;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.exam-thankyou-modal h2 {
  margin: 0 0 .55rem;
  color: #102033;
  font-size: 1.45rem;
  font-weight: 900;
}

.exam-thankyou-modal p:not(.exam-thankyou-kicker) {
  max-width: 390px;
  margin: 0 auto 1.25rem;
  color: #53657d;
  font-weight: 650;
}

.exam-lock-note {
  align-items: center;
  color: #b45309;
  display: inline-flex;
  font-size: .82rem;
  font-weight: 750;
  gap: .4rem;
  margin: 0 0 .85rem;
}

.exam-lock-note i {
  color: #d97706;
}

.exam-thankyou-note {
  align-items: center;
  background: linear-gradient(90deg, rgba(220, 252, 231, .7), rgba(219, 234, 254, .7));
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  color: #047857;
  display: inline-flex;
  font-size: .82rem;
  font-style: italic;
  font-weight: 750;
  gap: .45rem;
  margin: 0 0 .85rem;
  padding: .4rem .8rem;
}

.exam-thankyou-note i {
  animation: exam-thankyou-pulse 1.8s ease-in-out infinite;
  color: #e11d48;
}

@keyframes exam-thankyou-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

.access-code-modal .modal-content {
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .22);
}

.access-code-modal .modal-body {
  padding: 2rem;
  background:
    radial-gradient(circle at 50% -10%, rgba(37, 99, 235, .18), transparent 40%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.access-code-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
  border-radius: 999px;
  color: #1d4ed8;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border: 1px solid #93c5fd;
  font-size: 1.45rem;
  box-shadow: 0 14px 30px rgba(37, 99, 235, .18);
}

.access-code-modal h2 {
  margin: 0 0 .55rem;
  color: #102033;
  font-size: 1.4rem;
  font-weight: 900;
}

.access-code-lead {
  max-width: 360px;
  margin: 0 auto 1.25rem;
  color: #53657d;
  font-weight: 650;
}

.access-code-input {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
}

.access-code-error {
  color: var(--app-danger);
  font-size: .85rem;
  font-weight: 700;
  margin-top: .6rem;
}

.access-code-actions {
  display: flex;
  gap: .6rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.delete-modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1rem;
  background: #fff;
}

.delete-modal-preview {
  padding: .9rem 1rem;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-surface-2);
  color: var(--app-text);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.45;
}

.delete-modal-preview[data-subject-tone] {
  background: var(--subject-bg);
  border-color: var(--subject-border);
  color: var(--subject-color);
}

.delete-modal .delete-modal-actions form { margin: 0; }
.table form { margin: 0; }

.reset-modal {
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}

.reset-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1rem;
  background: linear-gradient(135deg, #fff1f2 0%, #ffffff 100%);
  border-bottom: 1px solid #fecdd3;
}

.reset-modal-titlebar {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.reset-modal-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  color: var(--app-danger);
  background: linear-gradient(135deg, #fee2e2 0%, #fff1f2 100%);
  border: 1px solid #fecdd3;
}

.reset-modal-kicker {
  margin: 0 0 .18rem;
  color: var(--app-danger);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.reset-modal-body {
  display: grid;
  gap: .75rem;
  padding: 1rem;
  background: #fff7f7;
  border-top: 0;
  border-bottom: 1px solid #e5edf7;
}

.reset-modal-warning {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .8rem;
  align-items: center;
  padding: .85rem .95rem;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  color: #7f1d1d;
  background: #fff1f2;
}

.reset-modal-warning i {
  align-items: center;
  background: #fee2e2;
  border: 1px solid #fecdd3;
  border-radius: 999px;
  color: #dc2626;
  display: inline-flex;
  font-size: 1.15rem;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.reset-modal-warning p {
  color: #7f1d1d;
  font-size: .98rem;
  font-weight: 800;
  line-height: 1.45;
  margin: 0;
}

.reset-modal-preview {
  padding: .9rem 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e40af;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.45;
}

.reset-modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1rem;
  background: #fff;
}

.reset-modal-progress {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1d4ed8;
  display: flex;
  font-size: .95rem;
  font-weight: 800;
  gap: .7rem;
  padding: .85rem 1rem;
}

.reset-modal-progress[hidden] {
  display: none;
}

.reset-modal-spinner {
  animation: reset-modal-spin .8s linear infinite;
  border: 3px solid #bfdbfe;
  border-top-color: #2563eb;
  border-radius: 999px;
  flex: 0 0 auto;
  height: 22px;
  width: 22px;
}

.reset-modal.is-resetting .reset-modal-actions,
.reset-modal.is-reset-complete .reset-modal-actions,
.reset-modal.is-reset-error .reset-modal-actions {
  border-top: 1px solid #fee2e2;
}

.reset-modal.is-reset-complete .reset-modal-progress {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}

.reset-modal.is-reset-complete .reset-modal-spinner {
  animation: none;
  border-color: #22c55e;
  position: relative;
}

.reset-modal.is-reset-error .reset-modal-progress {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.reset-modal.is-reset-error .reset-modal-spinner {
  border-color: #fecaca;
  border-top-color: #dc2626;
}

@keyframes reset-modal-spin {
  to { transform: rotate(360deg); }
}

.options {
  display: grid;
  gap: .75rem;
  margin-top: 1rem;
}

.option-row {
  align-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #d7e3f2;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .035);
  cursor: pointer;
  display: grid;
  gap: .75rem;
  grid-template-columns: auto auto minmax(0, 1fr);
  min-height: 58px;
  padding: .72rem .9rem;
  position: relative;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.option-row-static {
  cursor: default;
}

.option-row::before {
  background: #cbd5e1;
  border-radius: 999px;
  content: "";
  height: calc(100% - 18px);
  left: 0;
  opacity: 0;
  position: absolute;
  top: 9px;
  transition: opacity .16s ease, background-color .16s ease;
  width: 4px;
}

.option-row:hover,
.option-row:focus-within {
  background: #f8fbff;
  border-color: #9fc4ed;
  box-shadow: 0 12px 28px rgba(23, 105, 194, .10);
  transform: translateY(-1px);
}

.option-row input[type="radio"] {
  appearance: none;
  background: #fff;
  border: 2px solid #b8c7d9;
  border-radius: 50%;
  display: grid;
  height: 18px;
  margin: 0;
  place-items: center;
  width: 18px;
}

.option-row input[type="radio"]::before {
  background: var(--app-primary);
  border-radius: 50%;
  content: "";
  height: 8px;
  transform: scale(0);
  transition: transform .14s ease;
  width: 8px;
}

.option-row input[type="radio"]:focus {
  box-shadow: 0 0 0 .22rem rgba(23, 105, 194, .14);
  outline: 0;
}

.option-row:has(input:checked) {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  border-color: var(--app-primary);
  box-shadow: 0 14px 32px rgba(23, 105, 194, .16);
}

.option-row:has(input:checked)::before {
  background: var(--app-primary);
  opacity: 1;
}

.option-row:has(input:checked) input[type="radio"] {
  border-color: var(--app-primary);
}

.option-row:has(input:checked) input[type="radio"]::before {
  transform: scale(1);
}

.option-letter {
  align-items: center;
  background: #eef6ff;
  border: 1px solid #c8def7;
  border-radius: 7px;
  color: var(--app-primary-dark);
  display: inline-flex;
  font-weight: 850;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.option-row:has(input:checked) .option-letter {
  background: var(--app-primary);
  border-color: var(--app-primary);
  color: #fff;
}

.option-row.is-correct-option {
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
  border-color: #86efac;
  box-shadow: 0 10px 24px rgba(4, 120, 87, .10);
}

.option-row.is-correct-option::before {
  background: #059669;
  opacity: 1;
}

.option-row.is-correct-option .option-letter {
  background: #059669;
  border-color: #059669;
  color: #fff;
}

.option-row.is-selected-option:not(.is-correct-option) {
  background: linear-gradient(135deg, #fff1f2 0%, #ffffff 100%);
  border-color: #fda4af;
}

.option-row.is-selected-option:not(.is-correct-option)::before {
  background: #be123c;
  opacity: 1;
}

.option-row.is-selected-option:not(.is-correct-option) .option-letter {
  background: #be123c;
  border-color: #be123c;
  color: #fff;
}

.result-preview-options .option-row.is-correct-option {
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
  border-color: #86efac;
  box-shadow: 0 10px 24px rgba(4, 120, 87, .10);
}

.result-preview-options .option-row.is-correct-option::before {
  background: #059669;
}

.result-preview-options .option-row.is-correct-option .option-letter {
  background: #059669;
  border-color: #059669;
  color: #fff;
}

.result-preview-options .option-row.is-correct-option input[type="radio"] {
  border-color: #059669;
}

.result-preview-options .option-row.is-correct-option input[type="radio"]::before {
  background: #059669;
}

.result-preview-options .option-row.is-selected-option:not(.is-correct-option) input[type="radio"] {
  border-color: #be123c;
}

.result-preview-options .option-row.is-selected-option:not(.is-correct-option) input[type="radio"]::before {
  background: #be123c;
}

.option-row > span:last-child {
  color: #1f2f43;
  font-size: .98rem;
  line-height: 1.45;
}

.question-actions {
  display: grid;
  grid-template-columns: minmax(76px, auto) minmax(0, 1fr) minmax(76px, auto);
  align-items: center;
  gap: .75rem;
  margin-top: 1rem;
}

.question-actions .prev-question,
.question-actions .next-question {
  min-width: 76px;
}

.question-actions .next-question {
  grid-column: 3;
  justify-self: end;
}

.question-actions .submit-question {
  grid-column: 3;
  justify-self: end;
  min-width: 124px;
}

.question-actions .save-state {
  grid-column: 3;
  justify-self: end;
}

.save-state {
  align-items: center;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #475569;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 850;
  justify-content: center;
  line-height: 1;
  min-height: 42px;
  padding: .72rem .9rem;
  white-space: nowrap;
}

.save-state.is-saving,
.save-state.is-pending {
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  border-color: #fed7aa;
  color: #c2410c;
}

.save-state.is-saved {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #a7f3d0;
  color: #047857;
}

.save-state.is-error {
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  border-color: #fecdd3;
  color: #be123c;
}

.submit-summary-grid {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(3, 1fr);
}

.submit-summary-grid > div {
  background: #f8fbff;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  padding: .75rem;
  text-align: center;
}

.submit-summary-grid span {
  color: var(--app-muted);
  display: block;
  font-size: .78rem;
  font-weight: 800;
  margin-bottom: .25rem;
  text-transform: uppercase;
}

.submit-summary-grid strong {
  color: var(--app-text);
  font-size: 1.7rem;
  line-height: 1;
}

.submit-review-list {
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  margin-top: .85rem;
  padding: .85rem;
}

.submit-review-list > strong {
  color: #334155;
  display: block;
  font-size: .86rem;
  margin-bottom: .55rem;
}

.submit-review-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.submit-review-btn {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 7px;
  color: #c2410c;
  font-weight: 850;
  height: 34px;
  min-width: 34px;
}

.submit-review-complete {
  align-items: center;
  color: #047857;
  display: flex;
  font-weight: 800;
  gap: .5rem;
}

.result-card {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.result-detail-grid {
  align-items: stretch;
}

.result-detail-grid .stat-card {
  height: 100%;
}

.result-table-card .section-heading {
  margin-bottom: 0;
}

.result-sortable-table tbody tr.answer-row-correct {
  --bs-table-bg: #f2fbf6;
  --bs-table-accent-bg: #f2fbf6;
}

.result-sortable-table tbody tr.answer-row-wrong {
  --bs-table-bg: #fff6f7;
  --bs-table-accent-bg: #fff6f7;
}

.result-sortable-table tbody tr.answer-row-unanswered {
  --bs-table-bg: #f8fafc;
  --bs-table-accent-bg: #f8fafc;
}

.result-sortable-table tbody tr.answer-row-correct:hover {
  --bs-table-bg: #e8f8ef;
  --bs-table-accent-bg: #e8f8ef;
  box-shadow: inset 3px 0 0 rgba(4, 120, 87, .36);
}

.result-sortable-table tbody tr.answer-row-wrong:hover {
  --bs-table-bg: #fff0f2;
  --bs-table-accent-bg: #fff0f2;
  box-shadow: inset 3px 0 0 rgba(190, 18, 60, .34);
}

.result-sortable-table tbody tr.answer-row-unanswered:hover {
  --bs-table-bg: #f1f5f9;
  --bs-table-accent-bg: #f1f5f9;
  box-shadow: inset 3px 0 0 rgba(71, 85, 105, .28);
}

/* Keep the descriptive subject column readable while lining up its numeric summary. */
#subjectSummaryTable th:not(:first-child),
#subjectSummaryTable td:not(:first-child) {
  text-align: center;
}

#subjectSummaryTable th:not(:first-child) .table-sort {
  justify-content: center;
}

.result-review-row {
  cursor: pointer;
}

.result-question-preview-trigger {
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: block;
  font: inherit;
  padding: 0;
  text-align: left;
  width: 100%;
}

.result-question-preview-trigger:hover {
  color: #0f766e;
  text-decoration: underline;
  text-decoration-color: rgba(20, 184, 166, .5);
  text-underline-offset: .2em;
}

.result-question-preview-trigger:focus-visible {
  border-radius: .3rem;
  outline: 3px solid rgba(20, 184, 166, .32);
  outline-offset: .18rem;
}

.result-review-row:focus-visible {
  outline: 3px solid rgba(23, 105, 194, .28);
  outline-offset: -3px;
}

/* This preview is deliberately independent of Bootstrap's modal data API. */
.result-preview-backdrop[hidden],
.result-question-preview-modal[hidden] {
  display: none !important;
}

.result-preview-backdrop {
  background: rgba(15, 23, 42, .56);
  inset: 0;
  position: fixed;
  z-index: 1050;
}

.result-question-preview-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  overflow-y: auto;
  padding: 1rem;
  position: fixed;
  z-index: 1055;
}

.result-question-preview-dialog {
  align-items: stretch;
  display: block;
  height: auto !important;
  max-height: calc(100vh - 2rem);
  min-height: 0 !important;
  margin: 0 !important;
  max-width: min(800px, calc(100vw - 2rem));
  width: min(100%, 800px);
}

.result-preview-modal .modal-header {
  align-items: center;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: .85rem 1rem;
}

.result-preview-header-copy {
  min-width: 0;
}

.result-preview-header-copy .delete-modal-kicker,
.result-preview-header-copy .modal-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-preview-modal .question-preview-modal-actions {
  flex-wrap: nowrap;
  margin-left: 0;
}

@media (max-width: 575.98px) {
  .result-question-preview-modal {
    padding: .5rem;
  }

  .result-question-preview-dialog {
    max-width: calc(100vw - 1rem);
  }

  .result-preview-modal .modal-header {
    gap: .45rem;
    padding: .7rem .75rem;
  }

  .result-preview-modal .preview-nav-btn {
    min-width: auto;
    padding-inline: .5rem;
  }
}

.exam-status-badge.is-answer-correct {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.exam-status-badge.is-answer-wrong {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.exam-status-badge.is-answer-unanswered {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

#resultPreviewStatusPill.is-answer-correct,
.question-preview-meta > span.is-answer-correct {
  color: #047857;
}

#resultPreviewStatusPill.is-answer-wrong,
.question-preview-meta > span.is-answer-wrong,
#resultPreviewMarksPill.is-negative-mark {
  color: #be123c;
}

#resultPreviewStatusPill.is-answer-unanswered,
#resultPreviewMarksPill.is-neutral-mark {
  color: #475569;
}

#resultPreviewMarksPill.is-positive-mark {
  color: #047857;
}

.question-preview-meta .result-preview-meta-pill {
  background: var(--subject-bg, #f8fafc);
  border-color: var(--subject-border, #cbd5e1);
  color: var(--subject-color, #475569);
  gap: .42rem;
  padding: .5rem .68rem;
}

.result-preview-meta-pill > span,
.result-preview-meta-pill i {
  color: inherit;
}

.result-preview-meta-pill > i {
  font-size: .78rem;
  line-height: 1;
}

#resultPreviewStatusPill.is-answer-correct,
#resultPreviewMarksPill.is-positive-mark {
  --subject-bg: #ecfdf5;
  --subject-border: #a7f3d0;
  --subject-color: #047857;
}

#resultPreviewStatusPill.is-answer-wrong,
#resultPreviewMarksPill.is-negative-mark {
  --subject-bg: #fff1f2;
  --subject-border: #fecdd3;
  --subject-color: #be123c;
}

#resultPreviewStatusPill.is-answer-unanswered,
#resultPreviewMarksPill.is-neutral-mark {
  --subject-bg: #f1f5f9;
  --subject-border: #cbd5e1;
  --subject-color: #475569;
}

.exam-resume-banner {
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.exam-resume-banner.is-dismissed {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -6px);
  visibility: hidden;
}

.preview-correct-answer,
.result-answer-box {
  background: #f8fbff;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  margin-top: 1rem;
  padding: .85rem;
}

.preview-correct-answer span,
.result-answer-box span {
  align-items: center;
  color: #526b86;
  display: inline-flex;
  font-size: .76rem;
  font-weight: 850;
  gap: .4rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.preview-correct-answer strong,
.result-answer-box strong {
  color: #047857;
  display: block;
  font-size: 1.35rem;
  line-height: 1;
  margin-top: .45rem;
}

.preview-correct-answer p,
.result-answer-box p {
  color: #334155;
  margin: .45rem 0 0;
  white-space: pre-line;
}

.result-answer-grid {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.result-answer-box {
  margin-top: 0;
}

.result-answer-box.is-correct {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.result-answer-box.is-wrong {
  background: #fff1f2;
  border-color: #fecdd3;
}

.result-answer-box.is-wrong strong {
  color: #be123c;
}

.result-answer-box.is-unanswered {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.result-answer-box.is-unanswered strong {
  color: #475569;
}

@media print {
  .navbar,
  .app-footer,
  .result-print-header .btn {
    display: none !important;
  }
  .page-header {
    background: #fff !important;
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
    display: block;
    min-height: 0;
    padding: 0 0 .45rem;
  }
  .page-header::before,
  .page-header::after,
  .page-header .app-page-icon {
    display: none !important;
  }
  .app-main {
    padding: 0;
  }
  .content-card,
  .result-detail-card {
    box-shadow: none !important;
  }
}

.result-card-pro {
  max-width: 920px;
  padding: 1.35rem;
  text-align: left;
}

.result-hero {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 240px);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1.25rem;
}

.result-kicker {
  margin: 0 0 .2rem;
  color: var(--app-primary);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.result-hero h1 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 800;
}

.score-display {
  font-size: clamp(3.5rem, 9vw, 5rem);
  font-weight: 850;
  line-height: 1;
  color: #0f766e;
}

.result-percent {
  color: var(--app-muted);
  font-weight: 750;
  margin: .25rem 0 0;
}

.result-total-card {
  display: grid;
  align-content: center;
  gap: .2rem;
  min-height: 150px;
  padding: 1rem;
  border: 1px solid #bfdbfe;
  border-radius: var(--app-radius);
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  box-shadow: var(--app-shadow-sm);
  text-align: center;
}

.result-total-card span,
.result-total-card small {
  color: var(--app-muted);
  font-weight: 750;
}

.result-total-card strong {
  color: var(--app-primary-dark);
  font-size: clamp(3rem, 6vw, 4.5rem);
  line-height: 1;
}

.result-analytics {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 1rem;
  align-items: center;
}

.result-donut-wrap {
  display: grid;
  place-items: center;
  padding: 1rem;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: var(--app-surface-2);
}

.result-pie-chart {
  width: min(330px, 72vw);
  height: 310px;
}

.result-donut {
  width: min(250px, 64vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(
      #059669 0 var(--correct-deg),
      #dc2626 var(--correct-deg) calc(var(--correct-deg) + var(--wrong-deg)),
      #94a3b8 calc(var(--correct-deg) + var(--wrong-deg)) 360deg
    );
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08), 0 18px 36px rgba(15, 23, 42, .10);
}

.result-donut-center {
  width: 58%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .10);
}

.result-donut-center strong {
  font-size: 2.2rem;
  line-height: 1;
}

.result-donut-center span {
  color: var(--app-muted);
  font-size: .82rem;
  font-weight: 750;
}

.result-breakdown {
  display: grid;
  gap: .75rem;
}

.result-metric {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .85rem;
  align-items: center;
  padding: .9rem 1rem;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: #fff;
}

.result-metric strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1;
}

.result-metric span:last-child {
  color: var(--app-muted);
  font-weight: 750;
}

.metric-percent {
  color: var(--app-text) !important;
  font-size: 1.1rem;
  font-weight: 850 !important;
  white-space: nowrap;
}

.metric-dot {
  width: 14px;
  height: 44px;
  border-radius: 999px;
  background: #94a3b8;
}

.result-metric-correct .metric-dot { background: #059669; }
.result-metric-wrong .metric-dot { background: #dc2626; }
.result-metric-unanswered .metric-dot { background: #94a3b8; }

.result-card .col { display: grid; gap: .25rem; }

.empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--app-muted);
}

.empty-state i {
  display: block;
  margin-bottom: .75rem;
  color: #9db5cf;
  font-size: 2rem;
}

.student-bulk-bar {
  align-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fd 100%);
  border: 1px solid #cfe0f4;
  border-radius: var(--app-radius);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: .85rem;
}

.student-bulk-summary {
  align-items: center;
  display: flex;
  gap: .7rem;
}

.student-bulk-summary strong,
.student-bulk-summary small {
  display: block;
}

.student-bulk-summary small {
  color: var(--app-muted);
  font-size: .78rem;
  font-weight: 750;
}

.student-bulk-status-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.student-bulk-status-row small {
  display: inline;
}

.student-bulk-select-all-link {
  align-items: center;
  background: #eaf2ff;
  border: 1px solid #cfe0f4;
  border-radius: 999px;
  color: var(--app-primary);
  cursor: pointer;
  display: inline-flex;
  font-size: .74rem;
  font-weight: 700;
  gap: .35rem;
  padding: .2rem .6rem;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}

.student-bulk-select-all-link::before {
  content: "\f0c9";
  font-family: "Font Awesome 6 Free";
  font-size: .7rem;
  font-weight: 900;
}

.student-bulk-select-all-link:hover {
  background: #dbeafe;
  border-color: #bfdbfe;
}

.student-bulk-select-all-link:focus-visible {
  outline: 2px solid var(--app-primary);
  outline-offset: 2px;
}

.student-bulk-select-all-link.is-clear {
  background: #fdecec;
  border-color: #f5c2c2;
  color: #b42318;
}

.student-bulk-select-all-link.is-clear::before {
  content: "\f00d";
}

.student-bulk-select-all-link.is-clear:hover {
  background: #fbdada;
  border-color: #f1a9a9;
}

.student-bulk-icon {
  align-items: center;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  border-radius: var(--app-radius);
  color: var(--app-primary);
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.student-bulk-controls {
  align-items: center;
  display: flex;
  gap: .65rem;
  justify-content: flex-end;
}

.student-bulk-controls .form-select {
  min-width: 230px;
  min-height: 42px;
}

.student-bulk-submit {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 850;
  gap: .45rem;
  justify-content: center;
  min-height: 42px;
  min-width: 108px;
  padding-inline: 1rem;
  white-space: nowrap;
}

.student-bulk-submit:disabled {
  background: #e2e8f0;
  border-color: #cbd5e1;
  box-shadow: none;
  color: #64748b;
  opacity: 1;
}

.student-import-shell {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

.student-import-actions {
  align-items: center;
  border-top: 1px solid #d8eee7;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  justify-content: space-between;
  margin-top: .95rem;
  padding-top: 1rem;
}

.student-import-card {
  background:
    radial-gradient(circle at 100% 0, rgba(16, 185, 129, .08), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #fbfefd 100%);
  border-color: #bce5d5;
  box-shadow: 0 22px 52px rgba(13, 111, 80, .1);
  overflow: hidden;
  padding: 0;
  position: relative;
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.student-import-card::before {
  background: linear-gradient(90deg, #059669, #10b981, #38bdf8);
  content: "";
  height: 4px;
  inset: 0 0 auto;
  position: absolute;
  transition: filter .22s ease, height .22s ease;
}

@media (hover: hover) {
  .student-import-card:hover {
    border-color: #6ee7b7;
    box-shadow: 0 28px 64px rgba(13, 111, 80, .18), 0 0 0 4px rgba(5, 150, 105, .06);
    transform: translateY(-3px);
  }

  .student-import-card:hover::before {
    filter: saturate(1.25) brightness(1.08);
    height: 5px;
  }
}

.student-import-card:focus-within {
  border-color: #6ee7b7;
  box-shadow: 0 24px 58px rgba(13, 111, 80, .15), 0 0 0 3px rgba(5, 150, 105, .08);
}

@media (prefers-reduced-motion: reduce) {
  .student-import-card,
  .student-import-card::before { transition: none; }
}

.student-import-card-header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.35rem 1.4rem 1.1rem;
}

.student-import-heading-copy {
  align-items: center;
  display: flex;
  gap: .9rem;
}

.student-import-card-header .section-icon {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, .12), 0 8px 18px rgba(5, 150, 105, .12);
  color: #047857;
  flex: 0 0 auto;
  height: 44px;
  transition: box-shadow .18s ease, transform .18s ease;
  width: 44px;
}

.student-import-card-header h2 {
  font-size: 1.2rem;
  margin: .12rem 0;
}

.student-import-card-header p {
  color: var(--app-muted);
  margin: 0;
}

.student-import-ready-badge {
  align-items: center;
  background: rgba(255, 255, 255, .88);
  border: 1px solid #c8eadb;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(13, 111, 80, .07);
  color: #047857;
  display: flex;
  flex: 0 0 auto;
  gap: .55rem;
  padding: .58rem .72rem;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.student-import-ready-badge > i { font-size: 1rem; }

.student-import-ready-badge span,
.student-import-ready-badge small { display: block; }

.student-import-ready-badge small {
  color: #5c8075;
  font-size: .65rem;
  font-weight: 750;
  letter-spacing: .04em;
}

.student-import-ready-badge strong { color: #065f46; font-size: .8rem; }

.student-import-overline,
.student-import-guidance-label {
  color: #0f766e;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.student-import-guidance {
  align-items: center;
  background: linear-gradient(135deg, #f0fdf8, #f2fbff);
  border-block: 1px solid #d4eee3;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0;
  padding: .9rem 1.4rem;
}

.student-import-guidance > div,
.student-import-guidance p {
  border-radius: 9px;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.student-import-columns {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .4rem;
}

.student-import-columns code {
  background: #fff;
  border: 1px solid #c8e6d9;
  border-radius: 5px;
  color: #065f46;
  font-size: .77rem;
  font-weight: 700;
  padding: .16rem .38rem;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.student-import-guidance p {
  align-items: center;
  color: #3d6d5f;
  display: flex;
  font-size: .82rem;
  gap: .5rem;
  margin: 0;
  min-width: 280px;
}

.student-import-guidance p > i {
  align-items: center;
  background: #d1fae5;
  border-radius: 8px;
  color: #059669;
  display: inline-flex;
  flex: 0 0 auto;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.student-import-guidance p span,
.student-import-guidance p small { display: block; }

.student-import-guidance p small { color: #5c8075; margin-top: .08rem; }

.student-import-workspace { padding: 1.15rem 1.4rem 0; }

.student-import-upload-area {
  background: rgba(255, 255, 255, .92);
  border: 1px solid #cfe5dc;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(51, 65, 85, .05);
  padding: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.student-import-field-heading {
  align-items: center;
  display: flex;
  gap: .7rem;
  margin-bottom: .7rem;
}

.student-import-field-heading > span {
  align-items: center;
  background: #d1fae5;
  border-radius: 8px;
  color: #059669;
  display: inline-flex;
  flex: 0 0 auto;
  height: 34px;
  justify-content: center;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
  width: 34px;
}

.student-import-field-heading > div { display: grid; gap: .04rem; }

.student-import-field-heading label {
  color: #334155;
  font-size: .82rem;
  font-weight: 850;
  margin: 0;
}

.student-import-field-heading small {
  color: var(--app-muted);
  font-size: .7rem;
  font-weight: 700;
}

.student-import-file-picker {
  align-items: center;
  background: linear-gradient(135deg, #f5fffa, #f4fbff);
  border: 1.5px dashed #91cdb7;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  gap: .65rem;
  min-height: 62px;
  overflow: hidden;
  padding: .65rem .72rem;
  position: relative;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.student-import-file-input {
  cursor: pointer;
  inset: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
}

.student-import-file-picker:hover,
.student-import-file-picker:focus-within {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, .1);
  transform: translateY(-1px);
}

.student-import-file-picker > i { color: #059669; font-size: 1.15rem; }

.student-import-file-picker > span:nth-of-type(1) {
  display: grid;
  flex: 1 1 auto;
  gap: .05rem;
  min-width: 0;
}

.student-import-file-picker strong {
  color: #24453a;
  font-size: .8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-import-file-picker small { color: #638074; font-size: .7rem; }

.student-import-browse {
  background: #d1fae5;
  border: 1px solid #b6e6d1;
  border-radius: 7px;
  color: #047857;
  flex: 0 0 auto;
  font-size: .74rem;
  font-weight: 850;
  padding: .38rem .55rem;
  transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.student-import-upload-area.has-error .student-import-file-picker { border-color: #dc2626; }

.student-import-actions {
  margin: .95rem 1.4rem 1.35rem;
}

.student-import-actions > p {
  align-items: center;
  color: #64748b;
  display: flex;
  gap: .5rem;
  margin: 0;
  padding: .3rem .45rem;
  transition: background .18s ease, border-radius .18s ease, box-shadow .18s ease, transform .18s ease;
}

.student-import-actions > p i { color: #059669; }

.student-import-actions > p span,
.student-import-actions > p small { display: block; }

.student-import-actions > p strong { color: #475569; font-size: .78rem; }

.student-import-actions > p small { font-size: .7rem; }

.student-import-actions > div { display: flex; gap: .65rem; }

.student-import-actions .btn {
  min-height: 40px;
  padding-inline: 1rem;
  transition: box-shadow .18s ease, transform .18s ease;
}

.student-import-submit {
  background: linear-gradient(135deg, #047857, #059669);
  border-color: #047857;
  box-shadow: 0 8px 18px rgba(5, 150, 105, .2);
}

@media (hover: hover) {
  .student-import-card-header .section-icon:hover {
    box-shadow: inset 0 0 0 1px rgba(5, 150, 105, .18), 0 10px 20px rgba(5, 150, 105, .2);
    transform: rotate(-4deg) scale(1.06);
  }

  .student-import-ready-badge:hover {
    border-color: #86efac;
    box-shadow: 0 10px 22px rgba(13, 111, 80, .14);
    transform: translateY(-2px);
  }

  .student-import-guidance > div:hover,
  .student-import-guidance p:hover {
    background: rgba(255, 255, 255, .62);
    box-shadow: 0 5px 14px rgba(13, 111, 80, .08);
    transform: translateY(-1px);
  }

  .student-import-columns code:hover {
    background: #ecfdf5;
    border-color: #6ee7b7;
    box-shadow: 0 3px 8px rgba(5, 150, 105, .12);
    transform: translateY(-1px);
  }

  .student-import-upload-area:hover {
    border-color: #86d7b6;
    box-shadow: 0 12px 28px rgba(13, 111, 80, .1);
    transform: translateY(-2px);
  }

  .student-import-upload-area:hover .student-import-field-heading > span {
    background: #a7f3d0;
    box-shadow: 0 5px 12px rgba(5, 150, 105, .16);
    transform: scale(1.06);
  }

  .student-import-browse:hover {
    background: #a7f3d0;
    box-shadow: 0 4px 9px rgba(5, 150, 105, .15);
    transform: translateY(-1px);
  }

  .student-import-actions > p:hover {
    background: #ecfdf5;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(5, 150, 105, .08);
    transform: translateY(-1px);
  }

  .student-import-actions .btn:hover { transform: translateY(-2px); }

  .student-import-submit:hover { box-shadow: 0 11px 22px rgba(5, 150, 105, .28); }
}

@media (prefers-reduced-motion: reduce) {
  .student-import-card *,
  .student-import-card::before { transition: none !important; }
}

.question-import-header { margin-bottom: 1rem; }

.question-import-card {
  background:
    radial-gradient(circle at 100% 0, rgba(124, 58, 237, .07), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #fdfcff 100%);
  border-color: #d8cdf5;
  box-shadow: 0 22px 52px rgba(64, 44, 122, .11);
  overflow: hidden;
  padding: 0;
  position: relative;
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.question-import-card::before {
  background: linear-gradient(90deg, #7c3aed, #a855f7, #3b82f6);
  content: "";
  height: 4px;
  inset: 0 0 auto;
  position: absolute;
  transition: filter .22s ease, height .22s ease;
}

@media (hover: hover) {
  .question-import-card:hover {
    border-color: #a78bfa;
    box-shadow: 0 28px 64px rgba(76, 51, 155, .18), 0 0 0 4px rgba(124, 58, 237, .06);
    transform: translateY(-3px);
  }

  .question-import-card:hover::before {
    filter: saturate(1.25) brightness(1.08);
    height: 5px;
  }
}

.question-import-card:focus-within {
  border-color: #a78bfa;
  box-shadow: 0 24px 58px rgba(76, 51, 155, .15), 0 0 0 3px rgba(124, 58, 237, .08);
}

@media (prefers-reduced-motion: reduce) {
  .question-import-card,
  .question-import-card::before { transition: none; }
}

.question-import-card-heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.35rem 1.4rem 1.1rem;
}

.question-import-heading-copy {
  align-items: center;
  display: flex;
  gap: .9rem;
}

.question-import-card-heading .section-icon {
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .12), 0 8px 18px rgba(109, 40, 217, .12);
  color: #6d28d9;
  flex: 0 0 auto;
  height: 44px;
  transition: box-shadow .18s ease, transform .18s ease;
  width: 44px;
}

.question-import-card-heading h2 {
  font-size: 1.2rem;
  margin: .12rem 0;
}

.question-import-card-heading p { color: var(--app-muted); margin: 0; }

.question-import-ready-badge {
  align-items: center;
  background: rgba(255, 255, 255, .88);
  border: 1px solid #ddd6fe;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(76, 51, 155, .07);
  color: #6d28d9;
  display: flex;
  flex: 0 0 auto;
  gap: .55rem;
  padding: .58rem .72rem;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.question-import-ready-badge > i { font-size: 1rem; }

.question-import-ready-badge span,
.question-import-ready-badge small { display: block; }

.question-import-ready-badge small {
  color: #7c6c99;
  font-size: .65rem;
  font-weight: 750;
  letter-spacing: .04em;
}

.question-import-ready-badge strong { color: #4c1d95; font-size: .8rem; }

.question-import-overline,
.question-import-schema-label {
  color: #6d28d9;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.question-import-schema {
  align-items: center;
  background: linear-gradient(135deg, #f8f5ff, #f4f8ff);
  border-block: 1px solid #e4dcf8;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0;
  padding: .9rem 1.4rem;
}

.question-import-schema > div,
.question-import-schema p {
  border-radius: 9px;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.question-import-columns {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .4rem;
}

.question-import-columns code,
.question-import-schema p code {
  background: #fff;
  border: 1px solid #ddd6fe;
  border-radius: 5px;
  color: #5b21b6;
  font-size: .77rem;
  font-weight: 700;
  padding: .16rem .38rem;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.question-import-schema p {
  align-items: center;
  color: #5b4a86;
  display: flex;
  font-size: .82rem;
  gap: .5rem;
  margin: 0;
  min-width: 250px;
}

.question-import-schema p > i {
  align-items: center;
  background: #ede9fe;
  border-radius: 8px;
  color: #7c3aed;
  display: inline-flex;
  flex: 0 0 auto;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.question-import-schema p span,
.question-import-schema p small { display: block; }

.question-import-schema p small { color: #786a91; margin-top: .08rem; }

.question-import-form { padding: 1.15rem 1.4rem 1.35rem; }

.question-import-fields {
  align-items: stretch;
  display: grid;
  gap: .9rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(240px, .72fr);
}

.question-import-field,
.question-import-update {
  background: rgba(255, 255, 255, .92);
  border: 1px solid #ddd9ec;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(51, 65, 85, .05);
  padding: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.question-import-marking {
  background:
    radial-gradient(circle at 92% 4%, rgba(139, 92, 246, .1), transparent 26%),
    linear-gradient(145deg, #fff 0%, #fbfaff 54%, #f8fbff 100%);
  border: 1px solid #d8d2e8;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(52, 38, 79, .07);
  grid-column: 1 / -1;
  overflow: hidden;
  padding: 1.1rem;
  position: relative;
}

.question-import-marking::before {
  background: linear-gradient(90deg, #7c3aed, #8b5cf6 55%, #38bdf8);
  content: "";
  height: 3px;
  inset: 0 0 auto;
  position: absolute;
}

.question-import-marking-heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.question-import-marking-heading .question-import-field-heading > span {
  background: linear-gradient(135deg, #ede9fe, #e0e7ff);
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .1);
  color: #6d28d9;
}

.question-import-marking-heading .question-import-field-heading > div { display: grid; }

.question-import-marking-heading em {
  color: #7c3aed;
  font-size: .6rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .09em;
  line-height: 1;
  margin-bottom: .18rem;
  text-transform: uppercase;
}

.question-import-marking-heading strong { color: #302442; font-size: .88rem; }

.question-import-marking-heading small {
  color: var(--app-muted);
  display: block;
  font-size: .7rem;
  margin-top: .08rem;
}

.question-import-marking-summary,
.question-import-range-example {
  background: rgba(255, 255, 255, .9);
  border: 1px solid #ddd6fe;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(91, 33, 182, .06);
  color: #5b21b6;
  font-size: .7rem;
  font-weight: 800;
  padding: .36rem .62rem;
  white-space: nowrap;
}

.question-import-marking-step {
  align-items: center;
  display: flex;
  gap: .55rem;
  margin-top: 1rem;
}

.question-import-marking-step > span {
  align-items: center;
  background: #ede9fe;
  border: 1px solid #ddd6fe;
  border-radius: 999px;
  color: #6d28d9;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .64rem;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.question-import-marking-step > div { align-items: baseline; display: flex; gap: .45rem; }
.question-import-marking-step strong { color: #49375f; font-size: .7rem; }
.question-import-marking-step small { color: #857792; font-size: .66rem; }
.question-import-marking-step-configure { margin-top: .85rem; }

.question-import-marking-modes {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: .55rem;
}

label.question-import-marking-option {
  background: rgba(255, 255, 255, .74);
  border: 1px solid #e4dfec;
  border-radius: 11px;
  cursor: pointer;
  display: grid;
  gap: 0;
  grid-template-columns: 62px minmax(0, 1fr);
  min-height: 76px;
  margin: 0;
  overflow: hidden;
  padding: 0;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.question-import-marking-option > input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.question-import-marking-option-copy { display: grid; gap: .08rem; min-width: 0; padding: .78rem .9rem; }

.question-import-marking-option strong { color: #4d4260; font-size: .78rem; }

.question-import-marking-option small {
  color: #746980;
  font-size: .68rem;
}

.question-import-marking-option-icon {
  align-items: center;
  background: #eee9f6;
  align-self: stretch;
  border-radius: 10px 0 0 10px;
  color: #716580;
  display: inline-flex;
  justify-content: center;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.question-import-marking-option-icon i { font-size: 1.25rem; }

.question-import-marking-option.is-selected {
  background: linear-gradient(135deg, rgba(245, 243, 255, .92), rgba(250, 248, 255, .82));
  border-color: #c4b5fd;
  box-shadow: 0 7px 16px rgba(109, 40, 217, .07);
}

.question-import-marking-option.is-selected .question-import-marking-option-icon {
  background: linear-gradient(135deg, #6d28d9, #8b5cf6);
  color: #fff;
}

.question-import-marking-panel {
  background: rgba(248, 247, 252, .72);
  border: 1px solid #e7e2ee;
  border-radius: 11px;
  margin-top: .55rem;
  padding: .82rem;
}

.question-import-marking-input { max-width: 300px; }

.question-import-marking-input label,
.question-import-range-input label {
  color: #53466c;
  display: block;
  font-size: .7rem;
  font-weight: 850;
  margin-bottom: .3rem;
}

.question-import-marking-input small,
.question-import-range-footer small,
.question-import-range-heading small {
  color: #786a91;
  display: block;
  font-size: .68rem;
  margin-top: .3rem;
}

.question-import-range-heading {
  align-items: center;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.question-import-range-heading strong { color: #4c1d95; font-size: .76rem; }

.question-import-range-heading small { margin-top: .12rem; }

.question-import-range-example {
  align-items: center;
  display: inline-flex;
  gap: .3rem;
}

.question-import-range-example i { color: #8b5cf6; font-size: .62rem; }

.question-import-range-list { display: grid; gap: .55rem; }

.question-import-range-row {
  align-items: end;
  background: rgba(255, 255, 255, .96);
  border: 1px solid #e4deed;
  border-left: 3px solid #a78bfa;
  border-radius: 10px;
  box-shadow: 0 5px 14px rgba(64, 44, 91, .045);
  display: grid;
  gap: .55rem;
  grid-template-columns: auto minmax(120px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr) auto;
  padding: .62rem;
}

.question-import-range-number {
  align-self: center;
  color: #6d28d9;
  font-size: .66rem;
  font-weight: 900;
  min-width: 52px;
  text-align: center;
}

.question-import-range-input .form-control {
  background: #fcfbff;
  border-color: #dcd5e8;
  min-height: 38px;
}

.question-import-range-input .form-control:focus {
  background: #fff;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .1);
}

.question-import-remove-range {
  align-items: center;
  background: #fff7f8;
  border: 1px solid #f7d7dc;
  border-radius: 8px;
  color: #be123c;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
  width: 38px;
}

.question-import-remove-range:disabled { cursor: not-allowed; opacity: .42; }

.question-import-range-footer {
  align-items: center;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  margin-top: .7rem;
  padding: 0 .1rem;
}

.question-import-add-range {
  align-items: center;
  background: #f5f3ff;
  border: 1px solid #c4b5fd;
  border-radius: 8px;
  color: #6d28d9;
  display: inline-flex;
  font-size: .72rem;
  font-weight: 850;
  gap: .35rem;
  padding: .46rem .62rem;
  transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.question-import-range-footer small { margin: 0; }

.question-import-range-footer small i { color: #7c3aed; margin-right: .25rem; }

.question-import-marking-error {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  display: flex;
  font-size: .74rem;
  gap: .4rem;
  margin-top: .65rem;
  padding: .55rem .65rem;
}

.question-import-field-heading {
  align-items: center;
  display: flex;
  gap: .6rem;
  margin-bottom: .7rem;
}

.question-import-field-heading > span,
.question-import-policy-heading > span {
  align-items: center;
  background: #f0ebff;
  border-radius: 8px;
  color: #7c3aed;
  display: inline-flex;
  flex: 0 0 auto;
  height: 34px;
  justify-content: center;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
  width: 34px;
}

.question-import-field-heading > div,
.question-import-policy-heading > div { display: grid; gap: .04rem; }

.question-import-field .form-label {
  color: #334155;
  font-size: .82rem;
  font-weight: 850;
  margin: 0;
}

.question-import-field-heading small,
.question-import-policy-heading small {
  color: var(--app-muted);
  font-size: .7rem;
  font-weight: 700;
}

.question-import-field .form-select,
.question-import-field .form-control {
  border-color: #cdd7e5;
  min-height: 44px;
}

.question-import-select-control {
  display: block;
  position: relative;
}

.question-import-select-control .form-select {
  appearance: none;
  padding-right: 2.6rem;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.question-import-select-control > i {
  color: #6d28d9;
  font-size: .76rem;
  pointer-events: none;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.question-import-new-set-trigger {
  align-items: center;
  background: transparent;
  border: 0;
  color: #6d28d9;
  display: inline-flex;
  font-size: .74rem;
  font-weight: 850;
  gap: .32rem;
  margin-top: .65rem;
  padding: 0;
  transition: color .16s ease, transform .16s ease;
}

.question-import-new-set-trigger:hover,
.question-import-new-set-trigger:focus-visible { color: #4c1d95; text-decoration: underline; }

.question-import-new-set {
  background: linear-gradient(135deg, #faf7ff, #f7f4ff);
  border: 1px solid #ded3fb;
  border-radius: 9px;
  margin-top: .75rem;
  padding: .75rem;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.question-import-new-set-heading {
  align-items: center;
  display: flex;
  gap: .45rem;
}

.question-import-new-set-heading > span {
  align-items: center;
  background: #e9e1ff;
  border-radius: 7px;
  color: #6d28d9;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
  width: 28px;
}

.question-import-new-set-heading div,
.question-import-new-set-heading small { display: block; }

.question-import-new-set-heading strong { color: #4c1d95; font-size: .76rem; }

.question-import-new-set-heading small { color: #7e6a9d; font-size: .67rem; }

.question-import-new-set-fields {
  display: grid;
  gap: .55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: .7rem;
}

.question-import-new-set-fields label {
  color: #5b4a86;
  display: grid;
  font-size: .68rem;
  font-weight: 850;
  gap: .25rem;
}

.question-import-new-set-label { display: block; }

.question-import-required { color: #dc2626; font-size: .82rem; }

.question-import-new-set-fields .form-control {
  min-height: 36px;
  padding: .35rem .5rem;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.question-import-new-set-description { grid-column: 1 / -1; }

.question-import-new-set-fields textarea.form-control {
  min-height: 52px;
  resize: vertical;
}

.question-import-new-set-actions {
  align-items: center;
  display: flex;
  gap: .5rem;
  justify-content: space-between;
  margin-top: .7rem;
}

.question-import-new-set-actions p {
  color: #be123c;
  font-size: .7rem;
  font-weight: 750;
  margin: 0;
}

.question-import-new-set-actions .btn { transition: box-shadow .16s ease, transform .16s ease; }

.question-import-file-picker {
  align-items: center;
  background: linear-gradient(135deg, #faf8ff, #f7fbff);
  border: 1.5px dashed #b7a7e8;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  gap: .65rem;
  min-height: 58px;
  overflow: hidden;
  padding: .65rem .72rem;
  position: relative;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.question-import-file-picker:hover,
.question-import-file-picker:focus-within {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .1);
  transform: translateY(-1px);
}

.question-import-file-picker > i { color: #7c3aed; font-size: 1.15rem; }

.question-import-file-picker > span:nth-of-type(1) {
  display: grid;
  flex: 1 1 auto;
  gap: .05rem;
  min-width: 0;
}

.question-import-file-picker strong {
  color: #3f315e;
  font-size: .8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.question-import-file-picker small { color: #817494; font-size: .7rem; }

.question-import-browse {
  background: #ede9fe;
  border: 1px solid #d8cff7;
  border-radius: 7px;
  color: #6d28d9;
  flex: 0 0 auto;
  font-size: .74rem;
  font-weight: 850;
  padding: .38rem .55rem;
  transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.question-import-file-input {
  cursor: pointer;
  inset: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
}

.question-import-file-field.has-error .question-import-file-picker { border-color: #dc2626; }

.question-import-policy-heading {
  align-items: center;
  border-bottom: 1px solid #ede9f7;
  display: flex;
  gap: .6rem;
  margin-bottom: .75rem;
  padding-bottom: .7rem;
}

.question-import-policy-heading strong { color: #3f315e; font-size: .82rem; }

.question-import-mode-switch {
  background: linear-gradient(145deg, #faf8ff, #f5f1ff);
  border: 1px solid #ded5f4;
  border-radius: 11px;
  cursor: pointer;
  display: block;
  margin: 0;
  padding: .45rem;
  position: relative;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.question-import-mode-switch > input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.question-import-mode-options {
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr);
  isolation: isolate;
  min-height: 55px;
  position: relative;
}

.question-import-mode-highlight {
  background: #fff;
  border: 1px solid #d9d0e8;
  border-radius: 8px;
  box-shadow: 0 5px 13px rgba(76, 51, 155, .1);
  bottom: 0;
  left: 0;
  position: absolute;
  top: 0;
  transition: background .24s ease, border-color .24s ease, box-shadow .24s ease, transform .24s cubic-bezier(.2, .8, .2, 1);
  width: calc((100% - 26px) / 2);
  z-index: -1;
}

.question-import-mode-option {
  align-items: center;
  display: flex;
  gap: .42rem;
  min-width: 0;
  padding: .42rem;
  transition: color .2s ease, opacity .2s ease, transform .2s ease;
}

.question-import-mode-option > span:last-child { display: grid; gap: .04rem; min-width: 0; }

.question-import-mode-option strong { color: #4d4260; font-size: .72rem; }

.question-import-mode-option small {
  color: #746980;
  font-size: .62rem;
  line-height: 1.15;
  white-space: nowrap;
}

.question-import-mode-icon {
  align-items: center;
  background: #eee9f6;
  border-radius: 7px;
  color: #716580;
  display: inline-flex;
  flex: 0 0 auto;
  height: 29px;
  justify-content: center;
  transition: background .2s ease, box-shadow .2s ease, color .2s ease, transform .2s ease;
  width: 29px;
}

.question-import-mode-skip { color: #4d4260; }

.question-import-mode-skip .question-import-mode-icon {
  background: linear-gradient(145deg, #ede9fe, #ddd6fe);
  box-shadow: 0 4px 10px rgba(109, 40, 217, .12);
  color: #6d28d9;
}

.question-import-mode-update { opacity: .56; }

.question-import-mode-swap {
  align-items: center;
  color: #9b8faf;
  display: inline-flex;
  font-size: .66rem;
  justify-content: center;
  transition: color .22s ease, transform .3s ease;
}

.question-import-mode-hint {
  align-items: center;
  color: #685d75;
  display: flex;
  font-size: .63rem;
  font-weight: 700;
  gap: .3rem;
  justify-content: center;
  margin-top: .35rem;
}

.question-import-mode-switch > input:checked + .question-import-mode-options .question-import-mode-highlight {
  background: linear-gradient(135deg, #5b21b6, #7c3aed);
  border-color: #6d28d9;
  box-shadow: 0 7px 16px rgba(109, 40, 217, .26);
  transform: translateX(calc(100% + 26px));
}

.question-import-mode-switch > input:checked + .question-import-mode-options .question-import-mode-skip {
  opacity: .52;
}

.question-import-mode-switch > input:checked + .question-import-mode-options .question-import-mode-update {
  opacity: 1;
}

.question-import-mode-switch > input:checked + .question-import-mode-options .question-import-mode-update strong,
.question-import-mode-switch > input:checked + .question-import-mode-options .question-import-mode-update small {
  color: #fff;
}

.question-import-mode-switch > input:checked + .question-import-mode-options .question-import-mode-update .question-import-mode-icon {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.question-import-mode-switch > input:checked + .question-import-mode-options .question-import-mode-swap {
  color: #7c3aed;
  transform: rotate(180deg);
}

.question-import-mode-switch > input:focus-visible + .question-import-mode-options {
  border-radius: 8px;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .18);
}

.question-import-actions {
  align-items: center;
  background: linear-gradient(135deg, rgba(250, 248, 255, .92), rgba(245, 248, 255, .82));
  border: 1px solid #ddd6fe;
  border-radius: 11px;
  display: flex;
  gap: .65rem;
  grid-column: 1 / -1;
  justify-content: space-between;
  margin-top: .8rem;
  padding: .72rem .85rem;
}

.question-import-actions-copy {
  align-items: center;
  display: grid;
  flex: 1 1 auto;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
}

.question-import-actions-copy > p {
  align-items: center;
  color: #64748b;
  display: flex;
  gap: .5rem;
  margin: 0;
  padding: .3rem .45rem;
  transition: background .18s ease, border-radius .18s ease, box-shadow .18s ease, transform .18s ease;
}

.question-import-actions-copy > p i { color: #7c3aed; }

.question-import-actions-copy > p span,
.question-import-actions-copy > p small { display: block; }

.question-import-actions-copy > p strong { color: #475569; font-size: .78rem; }

.question-import-actions-copy > p small { font-size: .7rem; }

.question-import-preview-metrics {
  align-items: stretch;
  display: flex;
  flex-wrap: nowrap;
  gap: .35rem;
  justify-content: center;
  margin: 0;
}

.question-import-preview-metrics > span {
  align-items: center;
  background: rgba(255, 255, 255, .78);
  border: 1px solid #e4ddf5;
  border-radius: 9px;
  color: #6d28d9;
  display: flex;
  flex: 0 1 94px;
  flex-direction: column;
  font-size: .68rem;
  gap: .08rem;
  justify-content: center;
  min-height: 53px;
  padding: .35rem .45rem;
  text-align: center;
}

.question-import-preview-metrics i { font-size: .75rem; }
.question-import-preview-metrics strong { color: #4d4260; font-size: .78rem; font-weight: 900; line-height: 1; }
.question-import-preview-metrics small { color: #746980; font-size: .62rem; line-height: 1; }
.question-import-preview-metrics > span:nth-child(3) { color: #059669; }
.question-import-preview-metrics > span:nth-child(4) { color: #64748b; }
.question-import-preview-metrics > span:nth-child(5) { color: #d97706; }

.question-import-actions > div:last-child { display: flex; gap: .65rem; }

.question-import-actions .btn {
  min-height: 40px;
  padding-inline: 1rem;
  transition: box-shadow .18s ease, transform .18s ease;
}

.question-import-submit {
  background: linear-gradient(135deg, #6d28d9, #7c3aed);
  border-color: #6d28d9;
  box-shadow: 0 8px 18px rgba(109, 40, 217, .2);
}

@media (hover: hover) {
  .question-import-card-heading .section-icon:hover {
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .18), 0 10px 20px rgba(109, 40, 217, .2);
    transform: rotate(-4deg) scale(1.06);
  }

  .question-import-ready-badge:hover {
    border-color: #c4b5fd;
    box-shadow: 0 10px 22px rgba(76, 51, 155, .14);
    transform: translateY(-2px);
  }

  .question-import-schema > div:hover,
  .question-import-schema p:hover {
    background: rgba(255, 255, 255, .62);
    box-shadow: 0 5px 14px rgba(76, 51, 155, .08);
    transform: translateY(-1px);
  }

  .question-import-columns code:hover,
  .question-import-schema p code:hover {
    background: #f5f3ff;
    border-color: #c4b5fd;
    box-shadow: 0 3px 8px rgba(124, 58, 237, .12);
    transform: translateY(-1px);
  }

  .question-import-field:hover,
  .question-import-update:hover {
    border-color: #c4b5fd;
    box-shadow: 0 12px 28px rgba(76, 51, 155, .1);
    transform: translateY(-2px);
  }

  .question-import-field:hover .question-import-field-heading > span,
  .question-import-update:hover .question-import-policy-heading > span {
    background: #ddd6fe;
    box-shadow: 0 5px 12px rgba(124, 58, 237, .16);
    transform: scale(1.06);
  }

  .question-import-select-control .form-select:hover {
    border-color: #a78bfa;
    box-shadow: 0 2px 7px rgba(124, 58, 237, .1);
  }

  .question-import-new-set-trigger:hover { transform: translateX(2px); }

  .question-import-new-set:hover {
    border-color: #c4b5fd;
    box-shadow: 0 7px 16px rgba(76, 51, 155, .1);
    transform: translateY(-1px);
  }

  .question-import-new-set:hover .question-import-new-set-heading > span {
    background: #ddd6fe;
    box-shadow: 0 4px 9px rgba(124, 58, 237, .14);
    transform: scale(1.06);
  }

  .question-import-new-set-fields .form-control:hover {
    border-color: #c4b5fd;
    box-shadow: 0 2px 7px rgba(124, 58, 237, .08);
  }

  .question-import-new-set-actions .btn:hover {
    box-shadow: 0 5px 11px rgba(109, 40, 217, .2);
    transform: translateY(-1px);
  }

  .question-import-browse:hover {
    background: #ddd6fe;
    box-shadow: 0 4px 9px rgba(124, 58, 237, .15);
    transform: translateY(-1px);
  }

  .question-import-mode-switch:hover {
    background: linear-gradient(145deg, #f8f5ff, #f1ebff);
    border-color: #c4b5fd;
    box-shadow: 0 7px 16px rgba(124, 58, 237, .12);
    transform: translateY(-1px);
  }

  .question-import-mode-switch:hover .question-import-mode-icon { transform: scale(1.06); }

  .question-import-marking:hover {
    border-color: #c4b5fd;
    box-shadow: 0 12px 28px rgba(76, 51, 155, .1);
  }

  .question-import-marking-option:hover {
    border-color: #c4b5fd;
    box-shadow: 0 5px 13px rgba(124, 58, 237, .08);
    transform: translateY(-1px);
  }

  .question-import-add-range:hover {
    background: #ede9fe;
    box-shadow: 0 4px 10px rgba(124, 58, 237, .12);
    transform: translateY(-1px);
  }

  .question-import-remove-range:hover:not(:disabled) {
    background: #ffe4e6;
    border-color: #fda4af;
    transform: translateY(-1px);
  }

  .question-import-mode-switch:hover .question-import-mode-swap {
    color: #7c3aed;
    transform: scale(1.15);
  }

  .question-import-mode-switch:hover > input:checked + .question-import-mode-options .question-import-mode-swap {
    transform: rotate(180deg) scale(1.15);
  }

  .question-import-actions-copy > p:hover {
    background: #f5f3ff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(124, 58, 237, .08);
    transform: translateY(-1px);
  }

  .question-import-actions .btn:hover { transform: translateY(-2px); }

  .question-import-submit:hover { box-shadow: 0 11px 22px rgba(109, 40, 217, .28); }
}

@media (prefers-reduced-motion: reduce) {
  .question-import-card *,
  .question-import-card::before { transition: none !important; }
}

#questionImportPreviewPanel:not(:empty) {
  display: grid;
  gap: .75rem;
  margin: 1rem 1rem 0;
}

.question-import-preview-section {
  background: linear-gradient(180deg, #ffffff, #fbfaff);
  border: 1px solid #ddd6fe;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(91, 33, 182, .05);
  overflow: hidden;
  padding: .9rem;
}

.question-import-preview-heading {
  align-items: center;
  display: flex;
  gap: .65rem;
}

.question-import-preview-heading > span {
  align-items: center;
  background: #eee9ff;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  color: #6d28d9;
  display: inline-flex;
  flex: 0 0 auto;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.question-import-preview-heading em {
  color: #7c3aed;
  display: block;
  font-size: .62rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.question-import-preview-heading h3 { color: #3c2f52; font-size: .92rem; margin: .05rem 0; }
.question-import-preview-heading p { color: #746980; font-size: .72rem; margin: 0; }

.question-import-preview-section .alert { margin: 0 0 .75rem; }
.question-import-preview-table-section {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}

.question-import-preview-table-section .table-responsive {
  border: 1px solid #ddd6fe;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(91, 33, 182, .05);
  overflow-x: auto;
}

#questionImportPreviewPanel .table { margin-bottom: 0; }

#questionImportPreviewPanel .table thead th {
  background: #f8f5ff;
  border-bottom-color: #ded5f4;
  color: #5b4a86;
  font-size: .7rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.question-import-number-badge,
.question-import-marks-badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: .72rem;
  font-weight: 850;
  justify-content: center;
  min-width: 30px;
  padding: .25rem .45rem;
}

.question-import-number-badge {
  background: #f1edff;
  color: #6d28d9;
}

.question-import-marks-badge {
  background: #ecfdf5;
  color: #047857;
  white-space: nowrap;
}

.question-import-line-number {
  color: #8b7da3;
  display: block;
  font-size: .62rem;
  margin-top: .2rem;
  white-space: nowrap;
}

.student-import-result {
  align-self: start;
  display: grid;
  gap: .75rem;
}

.student-import-stat {
  background: #f8fafc;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  padding: .9rem 1rem;
}

.student-import-stat strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
}

.student-import-stat span {
  color: var(--app-muted);
  font-weight: 750;
}

.student-import-errors {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--app-radius);
  color: #9a3412;
  max-height: 260px;
  overflow: auto;
  padding: .85rem 1rem;
}

.student-import-errors p {
  margin: 0 0 .45rem;
}

.student-import-errors p:last-child {
  margin-bottom: 0;
}

.login-slip-grid {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.login-slip-card {
  padding: 1rem;
}

.login-slip {
  background: #fff;
  border: 1px solid #9db5cf;
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow);
  display: grid;
  gap: .65rem;
  padding: .8rem;
}

.login-slip h2 {
  font-size: 1rem;
  line-height: 1.15;
  margin: 0;
}

.login-slip-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-slip span,
.login-slip small {
  color: var(--app-muted);
}

.login-slip dl {
  display: grid;
  gap: .35rem;
  margin: 0;
}

.login-slip dl div {
  background: #f8fafc;
  border: 1px solid var(--app-border);
  border-radius: 6px;
  display: grid;
  grid-template-columns: 78px 1fr;
  padding: .45rem .55rem;
}

.login-slip dt {
  color: var(--app-muted);
  font-size: .78rem;
  font-weight: 800;
}

.login-slip dd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .88rem;
  font-weight: 850;
  margin: 0;
}

@media (min-width: 993px) and (max-width: 1120px) {
  .question-import-mode-option small { display: none; }
}

@media (max-width: 992px) {
  .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attempt-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exam-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-import-shell { grid-template-columns: 1fr; }
  .student-import-guidance { align-items: flex-start; flex-direction: column; }
  .question-import-fields { grid-template-columns: 1fr 1fr; }
  .question-import-update { grid-column: 1 / -1; }
  .question-import-marking-modes { grid-template-columns: 1fr 1fr; }
  .result-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .monitor-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .monitor-summary-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .live-exam-pulse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-exam-pulse-insights { grid-template-columns: 1fr; }
  .student-form-layout { grid-template-columns: 1fr; }
  .student-form-summary { position: static; }
  .question-form-layout { grid-template-columns: 1fr; }
  .question-form-summary { position: static; }
  .question-image-uploader { grid-template-columns: 1fr; }
  .form-grid-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exam-builder-shell { grid-template-columns: 1fr; }
  .exam-builder-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .question-bulk-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .question-bulk-controls {
    justify-content: stretch;
  }
  .student-bulk-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .student-bulk-controls {
    justify-content: stretch;
  }
  .student-bulk-controls .form-select {
    min-width: 0;
  }
  .question-bulk-controls #questionBulkAction,
  .question-bulk-controls #questionBulkTargetSet,
  .question-bulk-controls #questionBulkTargetSubject {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .question-import-card,
  .student-import-card { padding: 0; }
  .question-import-card-heading {
    align-items: flex-start;
    flex-direction: column;
    padding: 1.2rem 1rem 1rem;
  }
  .student-import-card-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 1.2rem 1rem 1rem;
  }
  .question-import-ready-badge,
  .student-import-ready-badge { width: 100%; }
  .question-import-schema,
  .student-import-guidance { padding-inline: 1rem; }
  .question-import-form,
  .student-import-workspace { padding: 1rem; }
  .question-import-schema,
  .student-import-guidance { align-items: flex-start; flex-direction: column; }
  .question-import-fields { grid-template-columns: 1fr; }
  .question-import-marking-heading,
  .question-import-range-heading,
  .question-import-range-footer { align-items: flex-start; flex-direction: column; }
  .question-import-marking-step > div { align-items: flex-start; flex-direction: column; gap: .05rem; }
  .question-import-marking-modes { grid-template-columns: 1fr; }
  .question-import-range-row { grid-template-columns: 1fr 1fr; }
  .question-import-range-number { grid-column: 1 / -1; text-align: left; }
  .question-import-range-input:nth-of-type(4) { grid-column: 1 / -1; }
  .question-import-remove-range { grid-column: 1 / -1; justify-self: end; }
  .question-import-new-set-fields { grid-template-columns: 1fr; }
  .question-import-new-set-description { grid-column: auto; }
  .question-import-update { grid-column: auto; }
  .question-import-actions,
  .student-import-actions { align-items: stretch; flex-direction: column; }
  .question-import-actions > div:last-child,
  .student-import-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .question-import-actions-copy { grid-template-columns: 1fr; }
  .question-import-preview-metrics { flex-wrap: wrap; }
  .question-import-actions .btn,
  .student-import-actions .btn { flex: 1 1 0; }
  .student-import-actions { margin: 0 1rem 1rem; }
}

@media (min-width: 761px) and (max-width: 900px) {
  .page-header {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .page-header > .d-flex:last-child,
  .page-header > .btn:last-child,
  .page-header > .settings-header-status:last-child,
  .page-header > .student-header-summary:last-child {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
  }
  .page-header > .d-flex:last-child {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .app-main { padding-inline: .75rem; }
  .app-footer { padding-inline: 0; }
  .app-footer-inner {
    min-height: 0;
    padding: .75rem;
  }
  .footer-identity {
    align-items: stretch;
    gap: .55rem;
    grid-template-columns: 1fr;
    padding: .55rem;
    width: min(100%, 25rem);
  }
  .footer-brand {
    padding: .35rem .45rem;
  }
  .footer-mark {
    height: 48px;
    width: 48px;
  }
  .footer-credit {
    justify-content: flex-start;
    min-height: 62px;
    padding: .5rem;
  }
  .footer-credit-copy em {
    white-space: normal;
  }
  .page-header {
    align-items: flex-start;
    border-radius: 16px;
    gap: .75rem;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 0;
    padding: .9rem .9rem .9rem 1rem;
  }
  .app-page-icon {
    align-self: center;
    border-radius: 13px;
    flex-basis: 44px;
    font-size: 1rem;
    height: 44px;
    width: 44px;
  }
  .app-page-icon::after { border-radius: 9px; inset: 5px; }
  .page-header h1 { font-size: 1.28rem; line-height: 1.15; }
  .page-header .eyebrow,
  .page-header .result-kicker { font-size: .62rem; margin-bottom: .34rem; padding: .26rem .46rem; }
  .page-header .page-kicker { font-size: .86rem; line-height: 1.4; margin-top: .28rem; }
  .page-header::before { inset-block: 12px; width: 3px; }
  .page-header::after { height: 110px; opacity: .075; width: 46%; }
  .page-header > .d-flex:last-child,
  .page-header > .btn:last-child,
  .page-header > .settings-header-status:last-child,
  .page-header > .student-header-summary:last-child {
    align-self: stretch;
    grid-column: 1 / -1;
    justify-self: stretch;
    margin-left: 0;
    margin-top: .15rem;
    width: 100%;
  }
  .page-header .d-flex { width: 100%; flex-wrap: wrap; }
  .page-header .btn { flex: 1 1 auto; }
  .student-header-summary {
    min-width: 0;
    padding: .5rem .6rem;
  }
  .dashboard-attempts { padding: .85rem; }
  .dashboard-attempts .section-heading {
    align-items: stretch;
    flex-direction: column;
    gap: .65rem;
  }
  .table-heading-actions {
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
  }
  .table-heading-actions .attempt-filter-status {
    min-width: 0;
  }
  .table-page-size-control,
  .monitor-page-size-control {
    max-width: 100%;
  }
  .dashboard-attempts .table-responsive {
    -webkit-overflow-scrolling: touch;
    margin-top: .75rem;
    min-height: 0;
    overflow-x: auto;
  }
  .dashboard-attempts .table-responsive > .table {
    min-width: 680px;
  }
  #currentExamQuestionsTable { min-width: 840px; }
  .live-exam-pulse { padding: .85rem; }
  .live-exam-pulse-heading { align-items: stretch; flex-direction: column; }
  .live-exam-pulse-status { align-self: flex-start; }
  .live-exam-pulse-meta { align-items: flex-start; }
  .live-exam-pulse-grid { grid-template-columns: 1fr; }
  .monitor-heading-actions { align-items: flex-start; flex-direction: column; }
  .question-bank-table > .section-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .question-bank-table > .section-heading > div:first-child,
  .question-bank-table > .section-heading p {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .student-heading-actions {
    align-items: stretch;
    justify-content: flex-start;
    position: static;
    width: 100%;
  }
  .student-slip-button {
    flex: 1 1 150px;
    justify-content: center;
    min-width: 0;
  }
  .student-heading-actions .attempt-filter-status {
    flex: 1 1 130px;
    min-width: 0;
    white-space: normal;
  }
  .filter-bar { grid-template-columns: 1fr; }
  .attempt-filter-bar { grid-template-columns: 1fr; }
  .question-table-filter-bar > * { flex-basis: 100%; }
  .question-bulk-controls {
    flex-direction: column;
  }
  .question-bulk-controls .form-select,
  .question-bulk-controls .btn {
    width: 100%;
  }
  .exam-filter-bar { grid-template-columns: 1fr; }
  .student-filter-bar { grid-template-columns: 1fr; }
  .student-bulk-controls {
    flex-direction: column;
  }
  .student-bulk-controls .form-select,
  .student-bulk-controls .btn {
    width: 100%;
  }
  .result-filter-bar { grid-template-columns: 1fr; }
  .result-answer-grid { grid-template-columns: 1fr; }
  .monitor-filter-bar { grid-template-columns: 1fr; }
  .monitor-summary-grid { grid-template-columns: 1fr; }
  .form-grid-two { grid-template-columns: 1fr; }
  .form-grid-three { grid-template-columns: 1fr; }
  .exam-form-section .section-heading > div { grid-template-columns: 1fr; }
  .exam-form-section .section-heading h2,
  .exam-form-section .section-heading p { grid-column: auto; }
  .student-status-card {
    align-items: flex-start;
    flex-direction: column;
    gap: .8rem;
  }
  .question-form-section .section-heading > div { grid-template-columns: 1fr; }
  .question-form-section .section-heading h2,
  .question-form-section .section-heading p { grid-column: auto; }
  .section-icon { grid-row: auto; }
  .option-editor-grid { grid-template-columns: 1fr; }
  .correct-answer-panel { grid-template-columns: 1fr; }
  .exam-shell {
    margin-left: -.75rem;
    margin-right: -.75rem;
    padding-bottom: 5.5rem;
  }
  .exam-layout,
  .exam-layout.has-split-nav { grid-template-columns: 1fr; }
  .question-nav-panel,
  .question-nav-panel-secondary { display: none; }
  .question-nav-spacer { display: none; }
  .mobile-question-dock {
    align-items: center;
    background: linear-gradient(135deg, #0f4c81 0%, #1769c2 62%, #38a3ff 100%);
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 16px;
    bottom: .8rem;
    box-shadow: 0 16px 38px rgba(15, 76, 129, .32);
    color: #fff;
    display: grid;
    gap: .7rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    left: .8rem;
    padding: .78rem .9rem;
    position: fixed;
    right: .8rem;
    text-align: left;
    z-index: 1040;
  }
  .mobile-question-dock strong,
  .mobile-question-dock small {
    display: block;
    line-height: 1.2;
  }
  .mobile-question-dock small {
    color: rgba(255, 255, 255, .78);
    font-weight: 750;
    margin-top: .18rem;
  }
  .mobile-question-dock-icon,
  .mobile-question-dock-action {
    align-items: center;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 12px;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    width: 40px;
  }
  .mobile-question-map-backdrop {
    background: rgba(15, 23, 42, .34);
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity .16s ease;
    z-index: 1045;
  }
  .mobile-question-map {
    background: #fff;
    border: 1px solid rgba(15, 76, 129, .18);
    border-radius: 18px 18px 0 0;
    bottom: 0;
    box-shadow: 0 -18px 48px rgba(15, 23, 42, .24);
    display: grid;
    gap: .85rem;
    left: 0;
    max-height: min(76vh, 640px);
    overflow: auto;
    padding: 1rem;
    position: fixed;
    right: 0;
    transform: translateY(110%);
    transition: transform .2s ease;
    z-index: 1050;
  }
  .mobile-question-map .question-nav {
    box-shadow: none;
    gap: .45rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: .65rem;
  }
  .mobile-question-map .qnav-btn {
    height: 42px;
  }
  .mobile-question-map .question-nav-legend {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .9rem;
    padding: .65rem .75rem;
  }
  .mobile-question-map.is-open {
    transform: translateY(0);
  }
  .mobile-question-map-backdrop.is-open {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
  .exam-topbar { align-items: flex-start; flex-wrap: wrap; }
  .exam-topbar > div:first-child { flex: 1 1 0; min-width: 0; }
  .exam-topbar > .timer { flex: 0 0 auto; }
  .exam-topbar h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .exam-topbar form { width: 100%; }
  .exam-topbar .btn { width: 100%; }
  .question-actions {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-between;
  }
  .question-actions .prev-question {
    grid-column: 1;
    justify-self: start;
  }
  .question-actions .next-question {
    grid-column: 2;
    margin-left: 0;
  }
  .question-actions .submit-question {
    grid-column: 2;
    justify-self: end;
  }
  .question-actions .save-state {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .datetime-composer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .selection-mode-grid,
  .set-stat-panel {
    grid-template-columns: 1fr;
  }
  .submit-summary-grid {
    grid-template-columns: 1fr;
  }
  #submitExamModal.show {
    align-items: flex-start;
    padding: .75rem;
  }
  #submitExamModal .modal-dialog {
    margin: 0 auto;
    max-width: 100%;
  }
  #submitExamModal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 1.5rem);
    overflow: hidden;
  }
  #submitExamModal .modal-header,
  #submitExamModal .modal-footer {
    flex: 0 0 auto;
  }
  #submitExamModal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
  .question-filter-bar,
  .bulk-settings {
    align-items: stretch;
    display: grid;
  }
  .exam-builder-summary {
    grid-template-columns: 1fr;
    position: static;
  }
  .summary-metric {
    min-height: auto;
  }
  .question-filter-bar input,
  .question-filter-bar select,
  .bulk-settings input,
  .bulk-settings .btn {
    width: 100%;
  }
  .question-bank-grid { grid-template-columns: 1fr; }
  .question-bank-item {
    align-items: flex-start;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .question-bank-meta {
    grid-column: 2;
    justify-content: flex-start;
    min-width: 0;
  }
  .table-pagination {
    align-items: stretch;
    flex-direction: column;
  }
  .table-pagination-controls {
    justify-content: flex-start;
  }
  .result-card-pro { padding: 1rem; }
  .result-hero,
  .result-analytics {
    grid-template-columns: 1fr;
  }
  .result-hero,
  .result-card-pro {
    text-align: center;
  }
  .result-metric {
    text-align: left;
  }
  .table td, .table th { padding: .72rem .8rem; }
}

@media print {
  @page {
    margin: .35cm;
    size: A4 portrait;
  }
  body {
    background: #fff !important;
  }
  .print-hidden,
  .navbar,
  .app-navbar,
  .app-footer {
    display: none !important;
  }
  .app-main {
    margin: 0;
    max-width: none;
    padding: 0;
    width: 100%;
  }
  .login-slip-card {
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  .login-slip-grid {
    gap: .18cm;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .login-slip {
    border: 1px solid #111;
    border-radius: 0;
    box-shadow: none;
    break-inside: avoid;
    gap: .18cm;
    min-height: 2.8cm;
    padding: .18cm;
  }
  .login-slip h2 {
    color: #000;
    font-size: 9pt;
    line-height: 1.1;
  }
  .login-slip span {
    color: #111;
    font-size: 7.5pt;
  }
  .login-slip dl {
    gap: .12cm;
  }
  .login-slip dl div {
    background: transparent;
    border: 1px solid #444;
    border-radius: 0;
    grid-template-columns: 1.65cm 1fr;
    padding: .08cm .12cm;
  }
  .login-slip dt,
  .login-slip dd {
    color: #000;
    font-size: 7.5pt;
    line-height: 1.15;
  }
}


  .scoring-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.availability-panel {
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #ffffff;
  padding: 1.25rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.availability-title {
  margin-bottom: 1rem;
}

.availability-title h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.availability-title p {
  margin: 0.25rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.availability-item {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 0.75rem 0;
}

.availability-label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.availability-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 1.25rem;
}

.availability-label h4 {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: #0f172a;
}

.availability-label p {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.83rem;
}

.availability-control {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.6rem;
  align-items: center;
}

.availability-control input,
.availability-control select {
  min-height: 44px;
  border-radius: 13px;
  border: 1px solid #dbe3ef;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  width: 100%;
}

.duration-control {
  display: block;
}

.availability-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #e5e7eb, transparent);
  margin: 0.4rem 0;
}

.datetime-now-btn {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  min-height: 42px;
  padding: 0 0.9rem;
  font-weight: 700;
}

.datetime-now-btn:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

.datetime-clear-btn {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 12px;
  min-height: 42px;
  padding: 0 0.9rem;
  font-weight: 700;
}

.datetime-clear-btn:hover {
  background: #fee2e2;
  color: #b91c1c;
}

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

  .availability-item {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .availability-control {
    grid-template-columns: 1fr;
  }
}
