:root {
  --bg: #101715;
  --bg-strong: #18211e;
  --surface: #192320;
  --surface-2: #202c28;
  --primary: #4e9673;
  --primary-soft: #243a30;
  --primary-dark: #a7cfb2;
  --accent: #d7a06c;
  --success: #8bc69a;
  --warning: #e4bd76;
  --danger: #ef9295;
  --text: #e7eee9;
  --muted: #a2b0a8;
  --border: rgba(218, 234, 224, 0.12);
  --shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: 'Aptos', 'Segoe UI Variable', 'Trebuchet MS', sans-serif;
  background: linear-gradient(145deg, #0d1311 0%, #151d1a 56%, #1b1b16 100%);
  color: var(--text);
}

body {
  min-height: 100vh;
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

#app {
  min-height: 100vh;
}

.app-shell {
  max-width: 1560px;
  margin: 0 auto;
  padding: 24px 30px 36px;
}

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 36px 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #dfece4 0%, #eef3ef 48%, #cfdfd4 100%);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 470px);
  background: rgba(25, 35, 32, 0.96);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 34px 30px 28px;
  backdrop-filter: blur(10px);
}

.brand {
  margin-bottom: 24px;
}

.auth-page {
  width: min(100%, 1120px);
  margin: auto;
  display: grid;
  gap: 24px;
}

.auth-banner {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 154px;
  overflow: hidden;
  padding: 24px 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: linear-gradient(115deg, #172b24 0%, #263c32 100%);
  color: #e7eee9;
  box-shadow: 0 18px 40px rgba(21, 42, 33, 0.16);
}

.auth-banner::after {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: 38%;
  content: '';
  background: repeating-linear-gradient(135deg, transparent 0 34px, rgba(172, 207, 183, 0.09) 35px 36px);
  clip-path: polygon(25% 0, 100% 0, 100% 100%, 0 100%);
}

.auth-brandmark {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  display: block;
  object-fit: contain;
  padding: 3px;
  border: 1px solid rgba(24, 49, 38, 0.12);
  border-radius: 10px;
  background: #f5faf6;
  color: #2e6448;
  font-size: 1.5rem;
  font-weight: 900;
}

.auth-banner-copy {
  position: relative;
}

.auth-banner-copy h1 {
  margin: 3px 0 5px;
  font-size: 1.8rem;
  line-height: 1.2;
}

.auth-banner-copy > p:last-child {
  margin: 0;
  color: #bdcfc2;
  font-size: 0.92rem;
}


.auth-eyebrow {
  margin: 0;
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 800;
}

.auth-banner-levels {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.auth-banner-levels span,
.auth-side-mark {
  display: inline-grid;
  min-width: 46px;
  min-height: 42px;
  place-items: center;
  border: 1px solid rgba(218, 234, 224, 0.2);
  border-radius: 6px;
  color: #d7e5da;
  font-size: 0.78rem;
  font-weight: 800;
}

.auth-portal {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  min-height: 500px;
  overflow: hidden;
  border: 1px solid rgba(27, 49, 37, 0.12);
  border-radius: 12px;
  box-shadow: 0 22px 54px rgba(21, 42, 33, 0.14);
}

.auth-login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 54px 58px;
  background: #f8faf8;
  color: #1c2a22;
}

.auth-login-heading {
  margin-bottom: 28px;
}

.auth-login-heading .auth-eyebrow {
  color: #568168;
}

.auth-login-heading h2 {
  margin: 7px 0 8px;
  font-size: 1.8rem;
  line-height: 1.2;
}

.auth-login-heading > p:last-child {
  margin: 0;
  color: #67776c;
  font-size: 0.9rem;
}

.auth-form {
  display: grid;
  gap: 17px;
}

.auth-login-panel .field label {
  color: #47574c;
}

.auth-login-panel .field input,
.auth-login-panel .field select {
  min-height: 48px;
  border-color: #d9e2db;
  background: #fff;
  color: #26352b;
}

.auth-login-panel .field input:focus,
.auth-login-panel .field select:focus {
  border-color: #59836a;
  box-shadow: 0 0 0 3px rgba(89, 131, 106, 0.14);
}

.auth-login-panel .primary-btn {
  min-height: 50px;
  margin-top: 4px;
  background: linear-gradient(135deg, #244c38 0%, #397455 100%);
}

.login-access-address {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #d9e2db;
}

.login-access-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.login-access-heading h3 {
  margin: 0;
  color: #26352b;
  font-size: 0.9rem;
}

.login-access-heading span,
.login-access-label,
.login-access-loading {
  color: #68786d;
  font-size: 0.76rem;
}

.login-access-list {
  display: grid;
  gap: 7px;
}

.login-access-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #d9e2db;
  border-radius: 6px;
  background: #fff;
}

.login-access-details {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.login-access-link {
  overflow-wrap: anywhere;
  color: #24543b;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.login-access-link:hover {
  text-decoration: underline;
}

.login-access-copy {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #d4dfd6;
  border-radius: 5px;
  background: #f3f7f3;
  color: #315d43;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.auth-identity-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 38px;
  background: linear-gradient(145deg, #1a3027 0%, #294738 100%);
  color: #edf4ee;
}

.auth-identity-panel::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: '';
  background: repeating-linear-gradient(135deg, transparent 0 52px, rgba(220, 237, 224, 0.045) 53px 54px);
}

.auth-identity-panel::after {
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  width: 54%;
  height: 100%;
  content: '';
  background: linear-gradient(135deg, rgba(130, 177, 143, 0.14), transparent 70%);
  clip-path: polygon(34% 0, 100% 0, 100% 100%, 0 100%);
}

.auth-identity-top,
.auth-identity-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #cfdfd2;
  font-size: 0.78rem;
  font-weight: 800;
}

.auth-identity-main {
  position: relative;
  max-width: 400px;
  margin: auto 0;
  padding: 42px 0;
}

.auth-identity-main h2 {
  margin: 12px 0 0;
  font-size: 3rem;
  line-height: 1.08;
}

.auth-identity-main h2 span {
  color: #b7d4be;
}

.auth-identity-rule {
  width: 56px;
  height: 3px;
  margin: 22px 0;
  background: #9dc3a6;
}

.auth-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
  padding: 36px 28px;
.auth-role-list span {
  background: linear-gradient(135deg, #dfece4 0%, #eef3ef 48%, #cfdfd4 100%);
  border-radius: 5px;
  color: #d8e6db;
  font-size: 0.78rem;
}
}
}

.auth-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  color: #43574a;
  font-size: 0.78rem;
}

.auth-footer span:last-child {
  color: #66796c;
}

.auth-page .auth-form .primary-btn {
  width: 100%;
  border-radius: 6px;

}

.field {
  }
}

.field label {
  font-size: 0.88rem;
  font-weight: 700;
    width: 38%;
}

    clip-path: polygon(25% 0, 100% 0, 100% 100%, 0 100%);
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  padding: 12px 14px;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(38, 116, 97, 0.75);
  box-shadow: 0 0 0 3px rgba(38, 116, 97, 0.12);
}

.primary-btn,
.secondary-btn,
.danger-btn,
.small-btn {
  border: none;
  border-radius: 7px;
  padding: 12px 18px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.danger-btn:hover,
.small-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  background: linear-gradient(135deg, #2d6c4f 0%, #438566 100%);
  color: white;
  box-shadow: 0 8px 16px rgba(23, 78, 66, 0.18);
}

.secondary-btn {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.danger-btn {
  background: rgba(194, 77, 86, 0.1);
  color: var(--danger);
}

.small-btn {
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 8px 12px;
  font-size: 0.82rem;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.header-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-mark,
.sidebar-brand-mark {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  padding: 2px;
}

.header-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
}

.header-left h2 {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.2;
}

.header-left p {
  margin: 5px 0 0 50px;
  color: var(--muted);
  font-size: 0.86rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-pill {
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--primary-dark);
  font-size: 0.88rem;
  font-weight: 700;
}

.navbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.workspace {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

.workspace-main {
  min-width: 0;
  animation: workspace-enter 300ms ease-out both;
}

.sidebar {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: calc(100vh - 124px);
  min-height: 440px;
  padding: 16px 12px;
  color: #edf5f0;
  background: linear-gradient(160deg, #1d5147 0%, #163e37 72%, #193a34 100%);
  border: 1px solid rgba(17, 58, 49, 0.18);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(27, 55, 43, 0.13);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 5px 18px;
}

.sidebar-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  color: #213d34;
  background: #e6b57d;
}

.sidebar-brand strong,
.sidebar-brand span:not(.sidebar-brand-mark) {
  display: block;
}

.sidebar-brand strong {
  font-size: 0.95rem;
}

.sidebar-brand div span {
  margin-top: 3px;
  color: rgba(237, 245, 240, 0.65);
  font-size: 0.75rem;
}

.sidebar-caption {
  padding: 14px 9px 8px;
  border-top: 1px solid rgba(237, 245, 240, 0.13);
  color: rgba(237, 245, 240, 0.62);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar-nav {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 4px;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-color: rgba(237, 245, 240, 0.35) transparent;
  scrollbar-width: thin;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.sidebar-nav .nav-btn {
  color: rgba(237, 245, 240, 0.78);
}

.sidebar-nav .nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
}

.sidebar-nav .nav-btn.active {
  color: #1c493e;
}

.sidebar-footer {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: auto;
  padding: 15px 9px 3px;
  border-top: 1px solid rgba(237, 245, 240, 0.13);
  color: rgba(237, 245, 240, 0.7);
  font-size: 0.78rem;
}

.sidebar-footer-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  line-height: 1.4;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 50%;
  background: #9bd5a5;
  box-shadow: 0 0 0 3px rgba(155, 213, 165, 0.12);
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 10px 11px;
  border-radius: 6px;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 700;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 6px;
  color: currentColor;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.95rem;
}

.nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.nav-btn.active {
  color: #1c493e;
  background: #eff5f0;
  box-shadow: 0 3px 8px rgba(9, 37, 31, 0.1);
}

.nav-btn.active .nav-icon {
  color: #fff;
  background: var(--primary);
}

.student-nav .nav-btn.active {
  color: var(--primary-dark);
  background: var(--primary-soft);
  box-shadow: none;
}

.student-nav .nav-btn.active .nav-icon {
  color: #fff;
  background: var(--primary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.stat-card,
.panel,
.exam-card,
.question-card,
.result-card,
.exam-viewport {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 20px;
}

.stats-grid > .stat-card.stat-card-students {
  border-color: #aac6e3;
  background: linear-gradient(145deg, #f3f8ff, #dceaff);
  box-shadow: 0 5px 0 #88a9cf, 0 12px 18px rgba(58, 97, 143, 0.18);
}

.stats-grid > .stat-card.stat-card-exams {
  border-color: #a9cfb5;
  background: linear-gradient(145deg, #f1f9f2, #dcefe1);
  box-shadow: 0 5px 0 #81ac8e, 0 12px 18px rgba(54, 110, 69, 0.17);
}

.stats-grid > .stat-card.stat-card-average {
  border-color: #e2c482;
  background: linear-gradient(145deg, #fff9eb, #f5e6bf);
  box-shadow: 0 5px 0 #c4a153, 0 12px 18px rgba(142, 106, 36, 0.17);
}

.stats-grid > .stat-card.stat-card-pass-rate {
  border-color: #e4b1ad;
  background: linear-gradient(145deg, #fff4f2, #f4d9d6);
  box-shadow: 0 5px 0 #c48e89, 0 12px 18px rgba(145, 66, 59, 0.16);
}

.teacher-dashboard-stats > .stat-card {
  background-size: 200% 200%;
  animation: teacher-stat-color-shift 14s ease-in-out infinite alternate;
}

.teacher-dashboard-stats > .stat-card:nth-child(1) {
  animation-delay: 0s;
}

.teacher-dashboard-stats > .stat-card:nth-child(2) {
  animation-delay: -3.5s;
}

.teacher-dashboard-stats > .stat-card:nth-child(3) {
  animation-delay: -7s;
}

.teacher-dashboard-stats > .stat-card:nth-child(4) {
  animation-delay: -10.5s;
}

@keyframes teacher-stat-color-shift {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .teacher-dashboard-stats > .stat-card {
    animation: none;
  }
}

.stat-card .label {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0;
}

.stat-card .value {
  margin-top: 12px;
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--text);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
  gap: 16px;
}

.teacher-management-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.teacher-management-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
}

.teacher-management-toolbar h3 {
  margin: 0;
}

.exam-create-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.exam-create-toolbar h3,
.exam-create-toolbar .exam-meta {
  margin: 0;
}

.exam-create-toolbar .exam-meta {
  margin-top: 5px;
}

.exam-create-dialog {
  width: min(920px, calc(100vw - 32px));
}

.panel {
  padding: 20px;
  margin-bottom: 16px;
}

.panel h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.06rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  font-size: 0.72rem;
}

.compact-actions {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
  background: rgba(139, 198, 154, 0.13);
  color: var(--success);
  padding: 8px 10px;
}

.table-wrap {
  overflow-x: auto;
}

.exam-progress-list {
  display: grid;
  gap: 18px;
}

.exam-progress-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}

.exam-progress-card-head,
.exam-progress-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.exam-progress-heading h3,
.exam-progress-card-head h4 {
  margin: 0;
}

.exam-progress-card-head h4 {
  font-size: 1rem;
}

.exam-progress-card-head .exam-meta,
.exam-progress-heading .exam-meta {
  margin: 6px 0 0;
}

.exam-progress-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.fullscreen-request-dialog {
  width: min(460px, calc(100% - 32px));
  max-width: 460px;
  padding: 0;
  border: 1px solid rgba(228, 189, 118, 0.55);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.fullscreen-request-dialog::backdrop {
  background: rgba(5, 10, 8, 0.82);
  backdrop-filter: blur(5px);
}

.fullscreen-request-content {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 30px;
  text-align: center;
}

.fullscreen-request-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(228, 189, 118, 0.55);
  border-radius: 50%;
  background: rgba(228, 189, 118, 0.12);
  color: var(--warning);
  font-size: 1.5rem;
  font-weight: 800;
}

.fullscreen-request-eyebrow {
  margin: 0;
  color: var(--warning);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.fullscreen-request-content h2,
.fullscreen-request-content p {
  margin: 0;
}

.fullscreen-request-content h2 {
  font-size: 1.35rem;
}

.fullscreen-request-content > p:not(.fullscreen-request-eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.fullscreen-request-content .fullscreen-request-note {
  color: var(--warning);
  font-size: 0.9rem;
}

.fullscreen-request-content .primary-btn {
  width: 100%;
  margin-top: 6px;
}

.fullscreen-request-content .primary-btn:disabled {
  cursor: wait;
  opacity: 0.7;
}

@media (max-width: 480px) {
  .fullscreen-request-content {
    padding: 24px 20px;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.exam-list,
.question-list,
.result-list {
  display: grid;
  gap: 16px;
}

.question-workspace {
  display: grid;
  gap: 16px;
}

.question-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
}

.question-toolbar h3 {
  margin-bottom: 8px;
}

.question-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.question-list-panel {
  min-width: 0;
  margin-bottom: 0;
}

.teacher-question-subjects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}

.teacher-question-subject {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.teacher-question-subject:hover,
.teacher-question-subject:focus-visible,
.teacher-question-subject.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  outline: none;
}

.teacher-subject-question-list {
  margin-top: 14px;
}

.question-dialog {
  width: min(760px, calc(100vw - 32px));
  max-width: none;
  max-height: min(90vh, 900px);
  margin: auto;
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.question-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(2px);
}

.question-import-dialog {
  width: min(560px, calc(100vw - 32px));
}

.student-import-preview {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.student-import-preview h3 {
  margin: 0;
}

.student-import-preview-table {
  max-height: 45vh;
  overflow: auto;
}

.student-import-preview-table table {
  min-width: 620px;
}

.student-import-issues {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px 14px 14px 34px;
  border: 1px solid #e6b5b5;
  border-radius: 8px;
  background: #fff3f3;
  color: #842d2d;
}

.class-students-dialog {
  width: min(680px, calc(100vw - 32px));
}

.class-summary-trigger {
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.class-summary-trigger:hover {
  color: var(--primary-dark);
}

.question-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.question-dialog-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.exam-completion-actions,
.exam-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.exam-card-actions {
  margin-top: 12px;
}

.completed-exam-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.completed-exam-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
}

.completed-exam-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.completed-exam-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  line-height: 1.4;
}

.completed-exam-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.completed-exam-card .badge {
  justify-self: start;
}

.completed-exam-dialog {
  width: min(1100px, calc(100vw - 32px));
}

.completed-exam-results-table {
  max-height: 55vh;
  overflow: auto;
}

.completed-exam-results-table table {
  min-width: 760px;
}

.completed-exam-downloads {
  justify-content: flex-end;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.question-checkbox-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding: 2px;
}

.exam-manual-question-selection[hidden],
.exam-automatic-question-selection[hidden] {
  display: none !important;
}

.question-checkbox-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  line-height: 1.45;
  cursor: pointer;
}

.question-checkbox-option[hidden] {
  display: none;
}

.question-checkbox-option input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--primary);
}

.field-label {
  font-weight: 700;
}

.field-note {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.subject-management-panel {
  width: 100%;
}

.school-logo-form {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.school-logo-form h4,
.school-logo-form p {
  margin: 0;
}

.school-logo-heading {
  display: grid;
  gap: 6px;
}

.school-logo-layout {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(220px, 1fr);
  align-items: center;
  gap: 24px;
  width: 100%;
}

.school-logo-preview {
  display: grid;
  width: 100%;
  height: 220px;
  place-items: center;
  padding: 14px;
  box-sizing: border-box;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.85rem;
}

.school-logo-preview img {
  display: block;
  width: auto;
  height: auto;
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  object-position: center;
}

.school-logo-controls {
  display: grid;
  justify-items: start;
  gap: 14px;
  min-width: 0;
}

.school-logo-controls .field,
.school-logo-controls input[type="file"] {
  width: 100%;
}

.subject-management-panel > .exam-head {
  align-items: center;
  margin-bottom: 16px;
}

.subject-management-panel > .exam-head h3 {
  margin: 0;
}

.subject-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.subject-info {
  min-width: 0;
}

.subject-row .result-meta {
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .subject-management-panel > .exam-head,
  .subject-row {
    align-items: stretch;
    flex-direction: column;
  }
}

.exam-card,
.question-card,
.result-card {
  padding: 18px;
}

.student-history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  grid-template-areas: "info score" "summary score";
  align-items: center;
  gap: 12px 18px;
}

.student-history-info {
  grid-area: info;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.student-history-test {
  overflow-wrap: anywhere;
  font-size: 1.04rem;
  line-height: 1.4;
}

.student-history-score {
  grid-area: score;
  display: grid;
  place-content: center;
  gap: 3px;
  min-height: 92px;
  padding: 10px;
  border: 1px solid #9abce0;
  border-radius: 6px;
  background: #e8f2ff;
  color: #174c87;
  text-align: center;
}

.student-history-score span {
  font-size: 0.76rem;
  font-weight: 700;
}

.student-history-score .student-history-status {
  font-size: 0.84rem;
  font-weight: 800;
}

.student-history-score .student-history-status.is-remedial {
  color: #b4232f;
}

.student-history-score .student-history-status.is-passed {
  color: #226ab3;
}

.student-history-score strong {
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
}

.student-history-summary {
  grid-area: summary;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.exam-head,
.result-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.exam-counts {
  display: grid;
  justify-items: end;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.exam-completion-notice {
  max-width: 290px;
  color: var(--success);
  font-weight: 700;
}

.school-counts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.school-expiration-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.school-expiration-form label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.school-expiration-form input {
  width: 150px;
  min-width: 120px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  padding: 8px 10px;
  color: var(--text);
}

.school-expiration-form .exam-meta {
  flex-basis: 100%;
}

.school-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.88rem;
}

.school-metadata strong {
  margin-left: 5px;
  color: var(--text);
}

.assignment-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding: 2px;
}

.assignment-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  line-height: 1.4;
  cursor: pointer;
}

.assignment-option input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--primary);
}

.teacher-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.student-management-toolbar,
.student-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.student-management-toolbar h3,
.student-list-toolbar h3 {
  margin: 0;
}
.student-exam-completed {
  border-color: #9ab8a3;
}
.student-exam-locked {
  margin-top: 16px;
  padding: 11px 12px;
  border-left: 3px solid #4980bd;
  background: #eaf3fc;
  color: #234f7b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.student-list-toolbar {
  align-items: flex-end;
  margin-bottom: 16px;
}

.student-class-filter {
  min-width: min(240px, 100%);
  margin: 0;
}

.school-counts .badge,
.school-counts .pill {
  white-space: nowrap;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 17, 13, 0.68);
  backdrop-filter: blur(5px);
}

.confirm-dialog {
  width: min(100%, 440px);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 3px solid var(--danger);
  border-radius: 16px;
  background: linear-gradient(155deg, var(--surface), var(--bg-strong));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  animation: confirm-dialog-enter 180ms ease-out;
}

.confirm-dialog h2 {
  margin: 0 0 10px;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.confirm-dialog p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.exam-submit-confirm-dialog {
  border-top-color: var(--accent);
}

.exam-submit-confirm-dialog .confirm-actions {
  margin-top: 24px;
}

.delete-confirm-dialog {
  position: relative;
  padding-top: 32px;
}

.delete-confirm-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid rgba(230, 93, 93, 0.32);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(230, 93, 93, 0.2), rgba(230, 93, 93, 0.08));
  color: #ff8585;
  font-size: 1.5rem;
  font-weight: 900;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.delete-confirm-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: #ff8585;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.delete-confirm-dialog .confirm-actions {
  margin-top: 24px;
}

@keyframes confirm-dialog-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .confirm-dialog {
    animation: none;
  }
}

.confirm-form {
  display: grid;
  gap: 10px;
}

.confirm-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-strong);
  color: var(--text);
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.confirm-submit:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.credential-reveal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(215, 160, 108, 0.3);
  border-left: 4px solid var(--accent);
  border-radius: 7px;
  background: #222c26;
}

.credential-reveal code {
  display: block;
  margin-top: 7px;
  color: #f0c99d;
  font-size: 1rem;
  user-select: all;
}

.credential-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reset-user-password {
  white-space: nowrap;
}

.enrollment-panel {
  margin-top: 16px;
}

.enrollment-panel .exam-head {
  align-items: center;
  margin-bottom: 12px;
}

.enrollment-panel .exam-head h3 {
  margin: 0;
}

.enrollment-panel th:last-child,
.enrollment-panel td:last-child {
  text-align: right;
}

.exam-meta,
.result-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 8px;
  line-height: 1.5;
}

.exam-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.question-actions,
.question-form-actions,
.exam-token-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.exam-token-row {
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.exam-token-row strong {
  color: var(--accent);
  font-family: 'Cascadia Code', 'Consolas', monospace;
  user-select: all;
}

.student-exam-access {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 16px;
}

.student-exam-access .field {
  min-width: 0;
}

.status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pill {
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.pill.success {
  background: rgba(139, 198, 154, 0.13);
  color: var(--success);
}

.pill.warning {
  background: rgba(228, 189, 118, 0.14);
  color: var(--warning);
}

@media (max-width: 650px) {
  .exam-progress-card-head {
    flex-direction: column;
  }

  .exam-progress-counts {
    justify-content: flex-start;
  }
}

.student-card {
  display: grid;
  gap: 0;
  background: linear-gradient(135deg, #202f29, #29281f);
  padding: 8px 18px;
  border-radius: 7px;
  border: 1px solid var(--border);
}

.student-dashboard-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.student-profile-row {
  display: grid;
  grid-template-columns: minmax(100px, 130px) minmax(0, 1fr);
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--border);
}

.student-profile-row:last-child {
  border-bottom: 0;
}

.student-profile-row span {
  color: var(--muted);
  font-size: 0.86rem;
}

.student-profile-row strong {
  overflow-wrap: anywhere;
  color: var(--text);
}

.student-card h4 {
  margin-top: 0;
  margin-bottom: 8px;
}

.exam-viewport {
  padding: 24px;
}

.exam-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  grid-template-areas: "main nav";
  align-items: start;
  gap: 24px;
  margin-top: 10px;
}

.exam-main-content {
  grid-area: main;
  min-width: 0;
}

.exam-question-nav {
  grid-area: nav;
  position: sticky;
  top: 18px;
  min-width: 0;
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

.exam-question-nav h3 {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.exam-question-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.exam-question-number {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  min-width: 32px;
  border: 0;
  border-radius: 6px;
  background: #fff0ef;
  color: #8c2525;
  font-weight: 800;
  cursor: pointer;
  animation: exam-question-border-color 10s ease-in-out infinite alternate;
}

.exam-question-number::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(135deg, #c9dff2, #cfe9dc, #e8ddf5, #f1e4ca, #c9dff2);
  background-size: 250% 250%;
  animation: exam-question-border-shift 10s ease-in-out infinite alternate;
  content: '';
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

@keyframes exam-question-border-color {
  0%, 100% {
    border-color: #c9dff2;
  }
  50% {
    border-color: #d7cdea;
  }
}

@keyframes exam-question-border-shift {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 100% 50%;
  }
}

.exam-question-number:hover {
  border-color: var(--primary);
}

.exam-question-number.is-answered {
  border-color: #3178c6;
  background: #e8f2ff;
  color: #174c87;
}

.exam-question-number.is-current {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .exam-question-number,
  .exam-question-number::before {
    animation: none;
  }
}

.exam-question-legend {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.78rem;
}

.exam-question-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.exam-question-legend i {
  width: 13px;
  height: 13px;
  border: 1px solid #c94545;
  border-radius: 3px;
  background: #fff0ef;
}

.exam-question-legend i.is-answered {
  border-color: #3178c6;
  background: #e8f2ff;
}

.exam-question-legend i.is-current {
  border: 2px solid var(--primary);
  background: transparent;
}

.timer-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 900;
}

.question-block {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.question-title {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.5;
}

.answer-options {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: linear-gradient(180deg, #202a26 0%, #1a2420 100%);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.option:hover {
  border-color: rgba(38, 116, 97, 0.36);
  transform: translateY(-1px);
}

.option input {
  accent-color: var(--primary);
}

.exam-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.empty {
  color: var(--muted);
  padding: 12px 0;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(27, 48, 44, 0.96);
  color: white;
  padding: 12px 16px;
  border-radius: 7px;
  box-shadow: 0 12px 24px rgba(27, 48, 44, 0.2);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.login-error-toast {
  isolation: isolate;
  top: 50%;
  right: auto;
  bottom: auto;
  left: 50%;
  z-index: 2000;
  width: min(440px, calc(100vw - 32px));
  padding: 26px 28px 26px 72px;
  border: 1px solid rgba(188, 211, 231, 0.18);
  border-radius: 20px;
  background: linear-gradient(145deg, #263d55, #172b3e);
  color: #f2f7fc;
  font-size: 1rem;
  line-height: 1.55;
  text-align: left;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), 0 0 34px rgba(89, 175, 221, 0.16);
  opacity: 0;
  transform: translate(-50%, -46%) scale(0.96);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.login-error-toast::before {
  position: absolute;
  top: 50%;
  left: 25px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(237, 188, 115, 0.55);
  border-radius: 50%;
  background: rgba(237, 188, 115, 0.12);
  color: #f0c983;
  content: '!';
  font-size: 1.1rem;
  font-weight: 800;
  transform: translateY(-50%);
}

.toast.login-error-toast::after {
  position: absolute;
  z-index: -1;
  inset: -2px;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(110deg, #4da8df, #5ed8e8, #73c9ac, #a88be0, #edbc73);
  content: '';
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

.toast.login-error-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@keyframes workspace-enter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: 205px minmax(0, 1fr);
    gap: 16px;
  }

  .app-shell {
    padding-right: 20px;
    padding-left: 20px;
  }
}

@media (max-width: 860px) {
  .app-shell {
    padding: 20px 16px 32px;
  }

  .exam-workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "nav" "main";
    gap: 18px;
  }

  .exam-question-nav {
    position: static;
    padding: 0 0 16px;
    border: 0;
    border-bottom: 1px solid var(--border);
  }

  .workspace {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .sidebar {
    position: static;
    height: auto;
    min-height: 0;
    padding: 10px;
  }

  .sidebar-brand,
  .sidebar-caption,
  .sidebar-footer {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .sidebar-nav .nav-btn,
  .student-nav .nav-btn {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .student-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .main-grid {
    grid-template-columns: 1fr;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-login-panel {
    padding: 36px 30px;
  }

  .auth-identity-panel {
    padding: 30px;
  }
}

@media (max-width: 600px) {
  .app-shell {
    padding: 14px 12px calc(96px + env(safe-area-inset-bottom));
  }

  .sidebar {
    position: fixed;
    z-index: 100;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
  }

  .sidebar-nav,
  .student-nav {
    position: fixed;
    z-index: 100;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    width: 100%;
    margin: 0;
    padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
    overflow-x: auto;
    overflow-y: hidden;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 14px 14px 0 0;
    background: #fafdff;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.3);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
  }

  .sidebar-nav {
    pointer-events: auto;
  }

  .sidebar-nav::-webkit-scrollbar,
  .student-nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar-nav .nav-btn,
  .student-nav .nav-btn {
    display: flex;
    flex: 0 0 clamp(68px, 19vw, 82px);
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    width: auto;
    min-width: 0;
    min-height: 66px;
    padding: 5px 3px;
    border-radius: 10px;
    color: #52665a;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    scroll-snap-align: start;
  }

  .sidebar-nav .nav-btn.active,
  .student-nav .nav-btn.active {
    color: #245c88;
    background: #e7f4ff;
    box-shadow: none;
  }

  .sidebar-nav .nav-btn:not(.active),
  .student-nav .nav-btn:not(.active) {
    color: #52665a;
  }

  .sidebar-nav .nav-btn.active > span:not(.nav-icon),
  .student-nav .nav-btn.active > span:not(.nav-icon) {
    color: #245c88;
  }

  .sidebar-nav .nav-icon,
  .student-nav .nav-icon {
    width: 25px;
    height: 25px;
    border-radius: 8px;
    font-size: 0.9rem;
  }

  .workspace-main {
    padding-bottom: 8px;
  }

  .app-shell .table-wrap {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .app-shell .student-roster-table th,
  .app-shell .student-roster-table td {
    padding: 9px 7px;
  }

  .app-shell .student-roster-table th:last-child,
  .app-shell .student-roster-table td:last-child {
    min-width: 112px;
  }

  .app-shell .student-roster-table .question-actions {
    flex-wrap: nowrap;
    gap: 5px;
  }
}

@media (max-width: 520px) {
  .school-logo-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .school-logo-preview {
    max-width: 320px;
  }

  .exam-viewport {
    padding: 16px;
  }

  .exam-question-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .exam-question-number {
    min-width: 0;
  }

  .question-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .question-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .question-toolbar-actions button {
    width: 100%;
  }

  .question-dialog {
    padding: 18px;
  }

  .student-management-toolbar,
  .student-list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .student-class-filter {
    width: 100%;
  }

  .exam-token-row {
    align-items: flex-start;
  }

  .exam-completion-actions {
    width: 100%;
  }

  .completed-exam-downloads button {
    flex: 1;
  }

  .auth-screen {
    padding: 14px;
  }

  .auth-page {
    gap: 16px;
  }

  .auth-banner {
    min-height: 110px;
    gap: 14px;
    padding: 16px;
  }

  .auth-brandmark {
    flex-basis: 54px;
    width: 54px;
    height: 54px;
    font-size: 1.15rem;
  }

  .auth-banner-copy h1 {
    font-size: 1.25rem;
  }

  .auth-banner-copy > p:last-child {
    font-size: 0.8rem;
  }

  .auth-banner-levels {
    display: none;
  }

  .auth-portal {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-login-panel {
    padding: 30px 22px;
  }

  .auth-identity-panel {
    min-height: 285px;
    padding: 24px;
  }

  .auth-identity-main {
    padding: 30px 0;
  }

  .auth-identity-main h2 {
    font-size: 2.25rem;
  }

  .auth-footer {
    padding: 0 2px;
    font-size: 0.72rem;
  }

  .app-shell {
    padding: 14px 12px 26px;
  }

  .header {
    align-items: flex-start;
    gap: 12px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .header-left h2 {
    font-size: 1.45rem;
  }

  .user-pill {
    max-width: calc(100vw - 120px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .stat-card {
    padding: 16px;
  }

  .panel {
    padding: 16px;
  }

  .exam-card,
  .question-card,
  .result-card {
    padding: 14px;
  }

  .school-counts {
    justify-content: flex-start;
  }

  .student-exam-access {
    grid-template-columns: minmax(0, 1fr);
  }

  .credential-reveal {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 36px 28px;
  background: linear-gradient(135deg, #dfece4 0%, #eef3ef 48%, #cfdfd4 100%);
}

.auth-screen > .auth-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 24px;
  width: min(100%, 1120px);
  max-width: 1120px;
  margin: 0 auto;
  flex: 0 1 1120px;
}

.auth-screen .auth-banner {
  width: 100%;
  min-height: 154px;
}

.auth-screen .auth-portal {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  width: 100%;
}

.auth-screen .auth-banner-copy {
  position: relative;
}

.auth-screen .auth-banner-copy h1 {
  margin: 3px 0 5px;
  font-size: 1.8rem;
  line-height: 1.2;
}

.auth-screen .auth-brandmark {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
}

@media (max-width: 520px) {
  .auth-screen {
    padding: 14px;
  }

  .auth-screen > .auth-page {
    grid-template-rows: auto auto auto;
    gap: 16px;
    width: 100%;
    flex-basis: 100%;
  }

  .auth-screen .auth-portal {
    grid-template-columns: minmax(0, 1fr);
  }
}

.auth-screen .auth-banner {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 154px;
  padding: 24px 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: linear-gradient(115deg, #172b24 0%, #263c32 100%);
  color: #e7eee9;
  box-shadow: 0 18px 40px rgba(21, 42, 33, 0.16);
}

.auth-screen .auth-banner::after {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: 38%;
  content: '';
  background: repeating-linear-gradient(135deg, transparent 0 34px, rgba(172, 207, 183, 0.09) 35px 36px);
  clip-path: polygon(25% 0, 100% 0, 100% 100%, 0 100%);
}

.auth-screen .auth-brandmark {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(24, 49, 38, 0.12);
  border-radius: 10px;
  background: #f5faf6;
  color: #2e6448;
  font-size: 1.5rem;
  font-weight: 900;
}

.auth-screen .auth-banner-copy {
  position: relative;
}

.auth-screen .auth-banner-copy h1 {
  margin: 3px 0 5px;
  font-size: 1.8rem;
  line-height: 1.2;
}

.auth-screen .auth-banner-copy > p:last-child {
  margin: 0;
  color: #bdcfc2;
  font-size: 0.92rem;
}

.auth-screen .auth-eyebrow {
  margin: 0;
  color: #b7d4be;
  font-size: 0.72rem;
  font-weight: 800;
}

.auth-screen .auth-banner-levels {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.auth-screen .auth-banner-levels span {
  display: inline-grid;
  min-width: 46px;
  min-height: 42px;
  place-items: center;
  border: 1px solid rgba(218, 234, 224, 0.2);
  border-radius: 6px;
  color: #d7e5da;
  font-size: 0.78rem;
  font-weight: 800;
}

.auth-screen .auth-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  color: #43574a;
  font-size: 0.78rem;
}

@media (max-width: 520px) {
  .auth-screen .auth-banner {
    min-height: 110px;
    gap: 14px;
    padding: 16px;
  }

  .auth-screen .auth-brandmark {
    flex-basis: 54px;
    width: 54px;
    height: 54px;
    font-size: 1.15rem;
  }

  .auth-screen .auth-banner-copy h1 {
    font-size: 1.25rem;
  }

  .auth-screen .auth-banner-levels {
    display: none;
  }
}

.auth-screen .auth-login-panel .auth-form {
  display: grid;
  gap: 17px;
}

.auth-screen .auth-login-panel .auth-form .field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}

.auth-screen .auth-login-panel .auth-form .field label {
  display: block;
  color: #47574c;
  font-size: 0.84rem;
  font-weight: 700;
}

.auth-screen .auth-login-panel .auth-form .field input,
.auth-screen .auth-login-panel .auth-form .field select {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #d9e2db;
  border-radius: 7px;
  background: #fff;
  color: #26352b;
}

.auth-screen .auth-login-panel .auth-form .field input:focus,
.auth-screen .auth-login-panel .auth-form .field select:focus {
  outline: none;
  border-color: #59836a;
  box-shadow: 0 0 0 3px rgba(89, 131, 106, 0.14);
}

.auth-screen .auth-login-panel .auth-form .primary-btn {
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(135deg, #244c38 0%, #397455 100%);
  color: #fff;
  font-weight: 800;
}

.auth-screen .auth-role-list span {
  padding: 7px 10px;
  border: 1px solid rgba(218, 234, 224, 0.2);
  border-radius: 5px;
  color: #d8e6db;
  font-size: 0.78rem;
}

.auth-screen .auth-school-name {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.auth-screen .auth-registration-trigger {
  padding: 7px 10px;
  border: 1px solid rgba(218, 234, 224, 0.3);
  border-radius: 5px;
  background: rgba(220, 237, 224, 0.12);
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.auth-screen .auth-registration-trigger:hover,
.auth-screen .auth-registration-trigger:focus-visible {
  background: rgba(220, 237, 224, 0.24);
  outline: 2px solid #b7d4be;
  outline-offset: 2px;
}

.auth-registration-dialog {
  width: min(520px, calc(100vw - 32px));
}

#schoolIdentityDialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(90dvh, 820px);
  padding: clamp(20px, 3vw, 30px);
  border-color: #d3e2ef;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(13, 53, 83, 0.24);
}

.access-screen {
  position: relative;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  place-items: center;
  padding: clamp(24px, 5vw, 64px);
  color: #edf4fb;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(49, 103, 151, 0.24), transparent 36%),
    radial-gradient(ellipse at 12% 10%, rgba(73, 132, 180, 0.14), transparent 30%),
    linear-gradient(145deg, #101a25 0%, #172637 52%, #0e1823 100%);
}

.access-screen::before,
.access-screen::after {
  position: absolute;
  width: min(72vw, 780px);
  aspect-ratio: 1;
  border: 1px solid rgba(226, 241, 255, 0.34);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(153, 207, 255, 0.24), inset 0 0 12px rgba(153, 207, 255, 0.08);
  content: '';
  pointer-events: none;
  animation: access-ring-pulse 8s ease-out infinite;
}

.access-screen::after {
  width: min(54vw, 590px);
  animation-delay: -4s;
}

.access-page {
  position: relative;
  z-index: 1;
  width: min(100%, 1050px);
  text-align: center;
}

.access-eyebrow {
  margin: 0 0 10px;
  color: #a9c9e5;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.access-title {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  letter-spacing: -0.04em;
  animation: access-title-color-shift 10s ease-in-out infinite;
}

.access-description {
  margin: 12px 0 0;
  color: #b7c9da;
}

.access-orbit {
  display: grid;
  grid-template-areas: ". student ." "super center school";
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px) minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 24px 28px;
  max-width: 930px;
  margin: clamp(36px, 6vh, 64px) auto 0;
}

.access-choices {
  display: contents;
}

.access-choice {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 13px;
  width: min(100%, 280px);
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid rgba(188, 211, 231, 0.19);
  border-radius: 16px;
  color: #edf4fb;
  text-align: left;
  text-decoration: none;
  background: linear-gradient(145deg, rgba(39, 61, 82, 0.96), rgba(24, 39, 55, 0.96));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
  transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.75s ease, visibility 0s linear 0.75s, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.access-orbit:not(.is-open) .access-choice {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.access-orbit:not(.is-open) .access-student {
  transform: translateY(28px) scale(0.88);
}

.access-orbit:not(.is-open) .access-superadmin {
  transform: translateX(28px) scale(0.88);
}

.access-orbit:not(.is-open) .access-school {
  transform: translateX(-28px) scale(0.88);
}

.access-orbit.is-open .access-choice {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.75s ease, visibility 0s, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.access-choice::before {
  position: absolute;
  z-index: -1;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(169, 201, 229, 0.14), transparent 55%);
  content: '';
  opacity: 0;
  transition: opacity 0.24s ease;
}

.access-choice-glow {
  position: absolute;
  z-index: 1;
  inset: -2px;
  padding: 2px;
  overflow: hidden;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: opacity 0.25s ease;
}

.access-choice-glow::before {
  position: absolute;
  inset: -100%;
  background: conic-gradient(
    from 0deg,
    #4da8df,
    #5ed8e8,
    #73c9ac,
    #a88be0,
    #edbc73,
    #4da8df
  );
  content: '';
  animation: access-logo-frame-spin 7s linear infinite paused;
}

.access-choice > span:not(.access-choice-glow) {
  position: relative;
  z-index: 2;
}

.access-choice:hover,
.access-choice:focus-visible {
  border-color: rgba(169, 201, 229, 0.82);
  outline: none;
  background: linear-gradient(145deg, rgba(52, 83, 112, 0.98), rgba(29, 51, 73, 0.98));
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.3), 0 0 28px rgba(119, 164, 199, 0.2);
}

.access-choice:hover::before,
.access-choice:focus-visible::before {
  opacity: 1;
}

.access-choice:hover .access-choice-glow,
.access-choice:focus-visible .access-choice-glow,
.access-choice:active .access-choice-glow {
  opacity: 1;
}

.access-choice:hover .access-choice-glow::before,
.access-choice:focus-visible .access-choice-glow::before,
.access-choice:active .access-choice-glow::before {
  animation-play-state: running;
}

.access-choice:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24), 0 0 18px rgba(119, 164, 199, 0.14);
}

.access-student {
  grid-area: student;
}

.access-superadmin {
  grid-area: super;
}

.access-school {
  grid-area: school;
}

.access-choice-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(185, 211, 232, 0.24);
  border-radius: 12px;
  color: #c8def2;
  font-size: 1.15rem;
  background: rgba(162, 193, 221, 0.1);
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.24s ease;
}

.access-choice:hover .access-choice-icon,
.access-choice:focus-visible .access-choice-icon {
  transform: rotate(-6deg) scale(1.1);
  background: rgba(162, 193, 221, 0.2);
}

.access-choice strong,
.access-choice small {
  display: block;
}

.access-choice strong {
  font-size: 0.98rem;
}

.access-choice small {
  margin-top: 4px;
  color: #b2c4d5;
  font-size: 0.76rem;
}

.access-choice-arrow {
  margin-left: auto;
  color: #b9d3e9;
  font-size: 1.1rem;
  transition: transform 0.24s ease;
}

.access-choice:hover .access-choice-arrow,
.access-choice:focus-visible .access-choice-arrow {
  transform: translateX(4px);
}

.access-brand {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-area: center;
  justify-items: center;
  gap: 9px;
  width: 100%;
  padding: 26px 18px;
  border: 2px solid transparent;
  border-radius: 28px;
  color: #eef4fa;
  font: inherit;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(145deg, rgba(34, 55, 76, 0.94), rgba(20, 35, 51, 0.96));
  box-shadow: 0 0 70px rgba(77, 127, 166, 0.16), 0 22px 60px rgba(0, 0, 0, 0.3);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.access-brand:hover,
.access-brand:focus-visible,
.access-orbit.is-open .access-brand {
  transform: translateY(-3px);
  outline: none;
  box-shadow: 0 0 82px rgba(77, 127, 166, 0.26), 0 26px 64px rgba(0, 0, 0, 0.34);
}

.access-brand-glow {
  position: absolute;
  z-index: 0;
  inset: -2px;
  padding: 2px;
  overflow: hidden;
  border-radius: 30px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.access-brand-glow::before {
  position: absolute;
  inset: -100%;
  background: conic-gradient(
    from 0deg,
    #4da8df,
    #5ed8e8,
    #73c9ac,
    #a88be0,
    #edbc73,
    #4da8df
  );
  content: '';
  animation: access-logo-frame-spin 9s linear infinite;
}

.access-brand > img,
.access-brand > strong,
.access-brand > .access-brand-hint,
.access-brand > .access-logo-frame {
  position: relative;
  z-index: 1;
}

.access-brand-hint {
  color: #b6c8d8;
  font-size: 0.8rem;
  transition: color 0.2s ease;
}

.access-orbit.is-open .access-brand-hint {
  color: #c9def0;
}

.access-logo-frame {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: grid;
  width: 140px;
  height: 140px;
  padding: 3px;
  overflow: hidden;
  place-items: center;
  border-radius: 28px;
  background: #35516b;
  box-shadow: 0 0 18px rgba(89, 175, 221, 0.18), 0 12px 30px rgba(0, 0, 0, 0.2);
}

.access-logo-frame::before {
  position: absolute;
  z-index: 0;
  inset: -55%;
  background: conic-gradient(
    from 0deg,
    #4da8df 0deg,
    #5ed8e8 65deg,
    #73c9ac 130deg,
    #a88be0 205deg,
    #edbc73 275deg,
    #4da8df 360deg
  );
  content: '';
  animation: access-logo-frame-spin 7s linear infinite;
}

.access-logo-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 8px;
  border: 1px solid rgba(45, 68, 91, 0.12);
  border-radius: 24px;
  object-fit: contain;
  background: #f4f8fc;
}

@keyframes access-logo-frame-spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes access-ring-pulse {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }

  14% {
    opacity: 0.62;
  }

  100% {
    opacity: 0;
    transform: scale(1.3);
  }
}

@keyframes access-title-color-shift {
  0%,
  100% {
    color: #edf4fb;
  }

  33% {
    color: #a9d8fa;
  }

  66% {
    color: #c3b4ff;
  }
}

.access-brand strong {
  font-size: 1.1rem;
}

.access-brand > span:last-child {
  color: #b6c8d8;
  font-size: 0.8rem;
}

.access-footer {
  margin-top: clamp(38px, 6vh, 64px);
  color: #9fb3c6;
  font-size: 0.78rem;
}

.access-footer span {
  padding: 0 6px;
  color: #7facd0;
}

.auth-screen.centered-login-screen {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(49, 103, 151, 0.24), transparent 36%),
    radial-gradient(ellipse at 12% 10%, rgba(73, 132, 180, 0.14), transparent 30%),
    linear-gradient(145deg, #101a25 0%, #172637 52%, #0e1823 100%);
  color: #edf4fb;
}

.auth-screen.centered-login-screen::before,
.auth-screen.centered-login-screen::after {
  position: absolute;
  width: min(72vw, 780px);
  aspect-ratio: 1;
  border: 1px solid rgba(226, 241, 255, 0.34);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(153, 207, 255, 0.24), inset 0 0 12px rgba(153, 207, 255, 0.08);
  content: '';
  pointer-events: none;
  animation: access-ring-pulse 8s ease-out infinite;
}

.auth-screen.centered-login-screen::after {
  width: min(54vw, 590px);
  animation-delay: -4s;
}

.auth-screen.centered-login-screen > .centered-login-page {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 460px);
  max-width: 460px;
}

.centered-login-screen > .centered-login-page > .auth-home-link,
.centered-login-screen .auth-banner,
.centered-login-screen .auth-identity-panel,
.centered-login-screen > .centered-login-page > .auth-footer,
.centered-login-screen .login-access-address {
  display: none;
}

.auth-screen.centered-login-screen .centered-login-card {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  padding: 2px;
  border: 0;
  border-radius: 26px;
  background: rgba(20, 35, 51, 0.96);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.38);
}

.centered-login-glow {
  z-index: 2;
  inset: 0;
  padding: 3px;
  border-radius: 26px;
}

.auth-screen.centered-login-screen .centered-login-card .auth-login-panel {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 0;
  padding: 30px 34px 34px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(43, 65, 87, 0.98), rgba(29, 46, 64, 0.98));
  color: #edf4fb;
}

.auth-screen.centered-login-screen .centered-login-card .auth-login-heading {
  display: flex;
  align-items: center;
  flex-direction: column;
  margin-bottom: 24px;
  text-align: center;
}

.centered-login-home,
.centered-login-registration {
  position: relative;
  isolation: isolate;
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 9px 14px;
  overflow: hidden;
  border: 1px solid rgba(188, 211, 231, 0.22);
  border-radius: 12px;
  background: rgba(11, 22, 33, 0.42);
  color: #d7e5f1;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.centered-login-registration {
  align-self: center;
  margin: 18px 0 0;
  cursor: pointer;
}

.centered-login-home-glow {
  position: absolute;
  z-index: 0;
  inset: -2px;
  padding: 2px;
  overflow: hidden;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: opacity 0.25s ease;
}

.centered-login-home-glow::before {
  position: absolute;
  inset: -100%;
  background: conic-gradient(
    from 0deg,
    #4da8df,
    #5ed8e8,
    #73c9ac,
    #a88be0,
    #edbc73,
    #4da8df
  );
  content: '';
  animation: access-logo-frame-spin 7s linear infinite paused;
}

.centered-login-home-label {
  position: relative;
  z-index: 1;
}

.centered-login-home:hover,
.centered-login-home:focus-visible,
.centered-login-registration:hover,
.centered-login-registration:focus-visible {
  color: #fff;
  background: rgba(49, 92, 125, 0.38);
  box-shadow: 0 0 22px rgba(89, 175, 221, 0.18);
}

.centered-login-home:hover .centered-login-home-glow,
.centered-login-home:focus-visible .centered-login-home-glow,
.centered-login-home:active .centered-login-home-glow,
.centered-login-registration:hover .centered-login-home-glow,
.centered-login-registration:focus-visible .centered-login-home-glow,
.centered-login-registration:active .centered-login-home-glow {
  opacity: 1;
}

.centered-login-home:hover .centered-login-home-glow::before,
.centered-login-home:focus-visible .centered-login-home-glow::before,
.centered-login-home:active .centered-login-home-glow::before,
.centered-login-registration:hover .centered-login-home-glow::before,
.centered-login-registration:focus-visible .centered-login-home-glow::before,
.centered-login-registration:active .centered-login-home-glow::before {
  animation-play-state: running;
}

.centered-login-logo {
  width: 92px;
  height: 92px;
  margin-bottom: 20px;
  border-radius: 20px;
}

.centered-login-logo img {
  border-radius: 17px;
}

.auth-screen.centered-login-screen .centered-login-card .auth-login-heading .auth-eyebrow {
  color: #a9c9e5;
}

.auth-screen.centered-login-screen .centered-login-card .auth-login-heading h2 {
  margin: 7px 0 8px;
  color: #edf4fb;
}

.auth-screen.centered-login-screen .centered-login-card .auth-login-heading > p:last-child {
  color: #b7c9da;
}

.auth-screen.centered-login-screen .centered-login-card .auth-login-panel .auth-form .field label {
  color: #d6e3ef;
}

.auth-screen.centered-login-screen .centered-login-card .auth-login-panel .auth-form .field input {
  border-color: rgba(188, 211, 231, 0.24);
  border-radius: 9px;
  background: rgba(11, 22, 33, 0.72);
  color: #edf4fb;
}

.auth-screen.centered-login-screen .centered-login-card .auth-login-panel .auth-form .field input::placeholder {
  color: #90a5b8;
}

.auth-screen.centered-login-screen .centered-login-card .auth-login-panel .auth-form .field input:focus {
  border-color: #7facd0;
  box-shadow: 0 0 0 3px rgba(127, 172, 208, 0.18);
}

.auth-screen.centered-login-screen .centered-login-card .auth-login-panel .auth-form .primary-btn {
  border: 1px solid rgba(188, 211, 231, 0.22);
  border-radius: 9px;
  background: linear-gradient(135deg, #315c7d 0%, #477fa6 100%);
  color: #fff;
}

.auth-screen.centered-login-screen .centered-login-card .auth-login-panel .auth-form .primary-btn:hover,
.auth-screen.centered-login-screen .centered-login-card .auth-login-panel .auth-form .primary-btn:focus-visible {
  background: linear-gradient(135deg, #3c6d91 0%, #5692ba 100%);
}

.auth-screen.centered-login-screen .centered-login-card .auth-login-panel .centered-login-submit {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(188, 211, 231, 0.22);
  border-radius: 12px;
  background: rgba(11, 22, 33, 0.42);
  color: #d7e5f1;
  box-shadow: none;
  transition: background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.centered-login-submit-glow {
  position: absolute;
  z-index: 0;
  inset: -3px;
  padding: 4px;
  overflow: hidden;
  border-radius: inherit;
  opacity: 1;
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.centered-login-submit-glow::before {
  position: absolute;
  inset: -100%;
  background: conic-gradient(
    from 0deg,
    #4da8df,
    #5ed8e8,
    #73c9ac,
    #a88be0,
    #edbc73,
    #4da8df
  );
  content: '';
  animation: access-logo-frame-spin 7s linear infinite;
}

.centered-login-submit-label {
  position: relative;
  z-index: 1;
}

.auth-screen.centered-login-screen .centered-login-card .auth-login-panel .centered-login-submit:hover,
.auth-screen.centered-login-screen .centered-login-card .auth-login-panel .centered-login-submit:focus-visible,
.auth-screen.centered-login-screen .centered-login-card .auth-login-panel .centered-login-submit:active {
  background: rgba(49, 92, 125, 0.38);
  color: #fff;
  box-shadow: 0 0 22px rgba(89, 175, 221, 0.18);
}

@media (max-width: 520px) {
  .auth-screen.centered-login-screen .centered-login-card .auth-login-panel {
    padding: 24px 20px 26px;
  }
}

.auth-home-link {
  width: fit-content;
  color: #315d49;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.auth-home-link:hover,
.auth-home-link:focus-visible {
  color: #193d2b;
  text-decoration: underline;
}

@media (max-width: 720px) {
  .access-screen {
    padding: 32px 18px;
  }

  .access-orbit {
    grid-template-areas: "student" "center" "super" "school";
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    max-width: 380px;
    margin-top: 30px;
  }

  .access-choices {
    display: contents;
  }

  .access-orbit:not(.is-open) .access-student {
    transform: translateY(20px) scale(0.94);
  }

  .access-orbit:not(.is-open) .access-superadmin,
  .access-orbit:not(.is-open) .access-school {
    transform: translateY(20px) scale(0.94);
  }

  .access-brand {
    margin: 4px 0;
  }

  .access-logo-frame {
    width: 96px;
    height: 96px;
    border-radius: 20px;
  }

  .access-logo-frame img {
    border-radius: 17px;
  }

  .access-choice {
    width: 100%;
  }

  .access-footer {
    margin-top: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .access-screen::before,
  .access-screen::after,
  .access-title,
  .auth-screen.centered-login-screen::before,
  .auth-screen.centered-login-screen::after,
  .access-choice,
  .access-choice::before,
  .access-choice-glow,
  .access-choice-glow::before,
  .access-choice-icon,
  .access-choice-arrow,
  .access-logo-frame::before,
  .access-brand-glow::before,
  .centered-login-home-glow,
  .centered-login-home-glow::before,
  .centered-login-submit-glow,
  .centered-login-submit-glow::before {
    transition: none;
    animation: none;
  }
}

#schoolIdentityDialog .question-dialog-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e1edf6;
}

#schoolIdentityDialog .question-dialog-header h2 {
  color: #174f75;
  font-size: 1.3rem;
  font-weight: 800;
}

#schoolIdentityDialog .question-dialog-header .secondary-btn {
  padding: 9px 14px;
  border: 1px solid #ccdfef;
  border-radius: 8px;
  background: #f0f7fd;
  color: #245c82;
}

#schoolIdentityForm.school-identity-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

#schoolIdentityForm .field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 7px;
  min-width: 0;
  margin: 0;
}

#schoolIdentityForm .school-identity-name,
#schoolIdentityForm .school-identity-key,
#schoolIdentityForm .school-identity-address,
#schoolIdentityForm .school-identity-admin-password,
#schoolIdentityForm .school-identity-validation,
#schoolIdentityForm .school-identity-actions {
  grid-column: 1 / -1;
}

#schoolIdentityForm .field label {
  width: auto;
  color: #294c65;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.4;
}

#schoolIdentityForm .field input,
#schoolIdentityForm .field select,
#schoolIdentityForm .field textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 10px 13px;
  border: 1px solid #cfdeea;
  border-radius: 8px;
  background: #fff;
  color: #20394c;
  font: inherit;
  line-height: 1.45;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

#schoolIdentityForm .field input[readonly] {
  background: #f0f7fd;
  color: #174f75;
  font-weight: 700;
}

#schoolIdentityForm .school-identity-key textarea {
  min-height: 88px;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.82rem;
}

#schoolIdentityForm .field textarea {
  min-height: 88px;
  resize: vertical;
}

#schoolIdentityForm .field input:focus,
#schoolIdentityForm .field select:focus,
#schoolIdentityForm .field textarea:focus {
  outline: none;
  border-color: #398cc5;
  box-shadow: 0 0 0 3px rgba(49, 132, 197, 0.16);
}

#schoolIdentityForm .field-note {
  color: #5f7383;
  font-size: 0.78rem;
  line-height: 1.45;
}

#schoolIdentityForm .school-identity-actions {
  display: block;
  margin-top: 2px;
}

#schoolIdentityForm .school-identity-actions .primary-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, #287db8 0%, #3c9bce 100%);
  box-shadow: 0 8px 18px rgba(36, 117, 171, 0.2);
}

.auth-registration-dialog .field textarea {
  width: 100%;
  min-height: 100px;
  resize: vertical;
  font: inherit;
}

.auth-registration-dialog .field input[aria-invalid="true"],
.auth-registration-dialog .field select[aria-invalid="true"],
.auth-registration-dialog .field textarea[aria-invalid="true"] {
  border-color: #bd4d4d;
  box-shadow: 0 0 0 3px rgba(189, 77, 77, 0.12);
}

.auth-registration-status {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #b6d8ef;
  border-radius: 7px;
  background: #edf7ff;
  color: #174f75;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.auth-registration-status.is-error {
  border-color: #efb5b5;
  background: #fff3f3;
  color: #842d2d;
}

@media (max-width: 600px) {
  #schoolIdentityForm.school-identity-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
  }

  #schoolIdentityForm .field,
  #schoolIdentityForm .school-identity-actions {
    grid-column: 1;
  }
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog {
  position: fixed;
  isolation: isolate;
  overflow: auto;
  padding: 24px;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(43, 65, 87, 0.99), rgba(29, 46, 64, 0.99));
  color: #edf4fb;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog .auth-registration-glow {
  position: absolute;
  z-index: 0;
  inset: 0;
  padding: 3px;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog .auth-registration-glow::before {
  position: absolute;
  inset: -100%;
  background: conic-gradient(
    from 0deg,
    #4da8df,
    #60d4c8,
    #a88be0,
    #edbc73,
    #4da8df
  );
  content: '';
  pointer-events: none;
  animation: access-logo-frame-spin 9s linear infinite;
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog > * {
  position: relative;
  z-index: 1;
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog .question-dialog-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(188, 211, 231, 0.2);
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog .question-dialog-header h2 {
  color: #edf4fb;
  font-size: 1.25rem;
  font-weight: 800;
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog .field label {
  color: #d6e3ef;
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog .field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  min-width: 0;
  margin: 0;
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog .field label {
  width: auto;
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog .field-note {
  color: #a9bfd2;
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog .field input,
.auth-screen.centered-login-screen dialog.auth-registration-dialog .field select,
.auth-screen.centered-login-screen dialog.auth-registration-dialog .field textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid rgba(188, 211, 231, 0.28);
  border-radius: 9px;
  background: rgba(11, 22, 33, 0.78);
  color: #edf4fb;
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog .field input[readonly],
.auth-screen.centered-login-screen dialog.auth-registration-dialog .field textarea[readonly] {
  background: rgba(20, 38, 55, 0.92);
  color: #c9d9e7;
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog .field input:focus,
.auth-screen.centered-login-screen dialog.auth-registration-dialog .field select:focus,
.auth-screen.centered-login-screen dialog.auth-registration-dialog .field textarea:focus {
  outline: none;
  border-color: #7facd0;
  box-shadow: 0 0 0 3px rgba(127, 172, 208, 0.18);
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog .question-dialog-header .secondary-btn {
  border: 1px solid rgba(188, 211, 231, 0.3);
  border-radius: 9px;
  background: rgba(11, 22, 33, 0.45);
  color: #d7e5f1;
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog .question-dialog-header .secondary-btn:hover,
.auth-screen.centered-login-screen dialog.auth-registration-dialog .question-dialog-header .secondary-btn:focus-visible {
  background: rgba(79, 120, 153, 0.38);
  color: #fff;
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog .primary-btn {
  min-height: 46px;
  border: 1px solid rgba(188, 211, 231, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, #315c7d 0%, #477fa6 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(9, 20, 31, 0.22);
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog .primary-btn:hover,
.auth-screen.centered-login-screen dialog.auth-registration-dialog .primary-btn:focus-visible {
  background: linear-gradient(135deg, #3c6d91 0%, #5692ba 100%);
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog .centered-login-submit,
.auth-registration-dialog .centered-login-submit {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid rgba(188, 211, 231, 0.22);
  border-radius: 12px;
  background: rgba(11, 22, 33, 0.42);
  color: #d7e5f1;
  box-shadow: none;
  transition: background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog .centered-login-submit:hover,
.auth-screen.centered-login-screen dialog.auth-registration-dialog .centered-login-submit:focus-visible,
.auth-registration-dialog .centered-login-submit:hover,
.auth-registration-dialog .centered-login-submit:focus-visible {
  background: rgba(49, 92, 125, 0.38);
  color: #fff;
  box-shadow: 0 0 22px rgba(89, 175, 221, 0.18);
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog #lookupSchoolRegistration {
  background: #79c7f5;
  border-width: 3px;
  color: #102b40;
  margin-top: 8px;
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog #lookupSchoolRegistration:hover,
.auth-screen.centered-login-screen dialog.auth-registration-dialog #lookupSchoolRegistration:focus-visible {
  background: #9bd9ff;
  color: #102b40;
}

#schoolIdentityDialog .question-dialog-header {
  border-bottom-color: rgba(188, 211, 231, 0.2);
}

#schoolIdentityDialog {
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

#schoolIdentityDialog .question-dialog-header h2,
#schoolIdentityDialog .field label {
  color: #d6e3ef;
}

#schoolIdentityDialog .question-dialog-header .secondary-btn {
  border-color: rgba(188, 211, 231, 0.3);
  border-radius: 9px;
  background: rgba(11, 22, 33, 0.45);
  color: #d7e5f1;
}

#schoolIdentityDialog .field input,
#schoolIdentityDialog .field select,
#schoolIdentityDialog .field textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border-color: rgba(188, 211, 231, 0.28);
  border-radius: 9px;
  background: rgba(11, 22, 33, 0.78);
  color: #edf4fb;
}

#schoolIdentityDialog .field input[readonly],
#schoolIdentityDialog .field textarea[readonly] {
  background: rgba(20, 38, 55, 0.92);
  color: #c9d9e7;
}

#schoolIdentityDialog .field input:focus,
#schoolIdentityDialog .field select:focus,
#schoolIdentityDialog .field textarea:focus {
  border-color: #7facd0;
  box-shadow: 0 0 0 3px rgba(127, 172, 208, 0.18);
}

#schoolIdentityDialog .field-note {
  color: #a9bfd2;
}

#schoolIdentityDialog .school-identity-actions .primary-btn {
  border: 1px solid rgba(188, 211, 231, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, #315c7d 0%, #477fa6 100%);
}

.auth-screen.centered-login-screen dialog.auth-registration-dialog #schoolRegistrationKey + .field-note {
  text-align: center;
}

@media (max-width: 520px) {
  .auth-screen.centered-login-screen dialog.auth-registration-dialog {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-screen.centered-login-screen dialog.auth-registration-dialog .auth-registration-glow::before {
    animation: none;
  }
}

.super-admin-sidebar {
  position: sticky;
  isolation: isolate;
  border-color: transparent;
}

.guru-sidebar {
  position: sticky;
  isolation: isolate;
  border-color: transparent;
}

.super-admin-sidebar::before,
.guru-sidebar::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  padding: 3px;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    #4da8df,
    #60d4c8,
    #a88be0,
    #edbc73,
    #4da8df
  );
  content: '';
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: none;
}

.super-admin-sidebar > *,
.guru-sidebar > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 860px) {
  .super-admin-sidebar,
  .guru-sidebar {
    position: static;
  }

  .super-admin-sidebar::before,
  .guru-sidebar::before {
    display: none;
  }
}

@media (max-width: 600px) {
  .super-admin-sidebar,
  .guru-sidebar {
    position: fixed;
  }
}

@media (prefers-reduced-motion: reduce) {
  .super-admin-sidebar::before,
  .guru-sidebar::before {
    animation: none;
  }
}

.super-admin-school-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.super-admin-action-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.super-admin-action-card .super-admin-school-actions {
  width: 100%;
  flex-wrap: nowrap;
}

.super-admin-school-actions button {
  flex: 1 1 auto;
  width: auto;
}

.super-admin-key-dialog {
  position: fixed;
  isolation: isolate;
  overflow: auto;
  padding: 24px;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(43, 65, 87, 0.99), rgba(29, 46, 64, 0.99));
  color: #edf4fb;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

.super-admin-key-dialog .auth-registration-glow {
  position: absolute;
  z-index: 0;
  inset: 0;
  padding: 3px;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

.super-admin-key-dialog .auth-registration-glow::before {
  position: absolute;
  inset: -100%;
  background: conic-gradient(from 0deg, #4da8df, #60d4c8, #a88be0, #edbc73, #4da8df);
  content: '';
  animation: access-logo-frame-spin 9s linear infinite;
}

.super-admin-key-dialog > * {
  position: relative;
  z-index: 1;
}

.super-admin-key-dialog [hidden] {
  display: none !important;
}

.super-admin-key-dialog .question-dialog-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(188, 211, 231, 0.2);
}

.super-admin-key-dialog .question-dialog-header h2,
.super-admin-key-dialog .field label {
  color: #d6e3ef;
}

.super-admin-key-dialog .question-dialog-header .secondary-btn {
  border: 1px solid rgba(188, 211, 231, 0.3);
  border-radius: 9px;
  background: rgba(11, 22, 33, 0.45);
  color: #d7e5f1;
}

.super-admin-key-dialog .question-dialog-header .secondary-btn:hover,
.super-admin-key-dialog .question-dialog-header .secondary-btn:focus-visible {
  background: rgba(79, 120, 153, 0.38);
  color: #fff;
}

.super-admin-key-dialog .field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  min-width: 0;
  margin: 0;
}

.super-admin-key-dialog .field label {
  width: auto;
}

.super-admin-key-dialog .field-note {
  color: #a9bfd2;
}

.super-admin-key-dialog .field input,
.super-admin-key-dialog .field textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid rgba(188, 211, 231, 0.28);
  border-radius: 9px;
  background: rgba(11, 22, 33, 0.78);
  color: #edf4fb;
}

.super-admin-key-dialog #generatedSchoolKey {
  min-height: 72px;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.super-admin-key-dialog .field input:focus,
.super-admin-key-dialog .field textarea:focus {
  outline: none;
  border-color: #7facd0;
  box-shadow: 0 0 0 3px rgba(127, 172, 208, 0.18);
}

.super-admin-key-dialog .centered-login-submit {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid rgba(188, 211, 231, 0.22);
  border-radius: 12px;
  background: linear-gradient(135deg, #315c7d 0%, #477fa6 100%);
  color: #d7e5f1;
}

.super-admin-key-dialog .centered-login-submit-glow {
  position: absolute;
  z-index: 0;
  inset: -3px;
  padding: 4px;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

.super-admin-key-dialog .centered-login-submit-glow::before {
  position: absolute;
  inset: -100%;
  background: conic-gradient(from 0deg, #4da8df, #5ed8e8, #73c9ac, #a88be0, #edbc73, #4da8df);
  content: '';
  animation: access-logo-frame-spin 7s linear infinite;
}

.super-admin-key-dialog .centered-login-submit-label {
  position: relative;
  z-index: 1;
}

@media (max-width: 600px) {
  .super-admin-school-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .super-admin-action-card {
    min-height: 88px;
  }

  .super-admin-action-card .super-admin-school-actions {
    flex-wrap: wrap;
  }

  .super-admin-key-dialog {
    width: min(520px, calc(100vw - 32px));
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .super-admin-key-dialog .auth-registration-glow::before,
  .super-admin-key-dialog .centered-login-submit-glow::before {
    animation: none;
  }
}

.super-admin-school-search-panel .field {
  max-width: 620px;
  margin: 0;
}

.super-admin-school-summary[hidden],
#managedSchoolEmpty[hidden] {
  display: none;
}

.super-admin-selected-school > h3 {
  margin: 0 0 16px;
}

.super-admin-school-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.super-admin-school-metrics .stat-card {
  min-width: 0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(34, 52, 75, 0.08);
  background-size: 200% 200%;
  animation: school-metric-color-shift 12s ease-in-out infinite alternate;
}

.super-admin-school-metrics .stat-card:nth-child(1) {
  border-color: #c6d9ec;
  background-image: linear-gradient(145deg, #f7fbff, #eaf3fc, #e6f4f4, #f7fbff);
  animation-delay: 0s;
}

.super-admin-school-metrics .stat-card:nth-child(2) {
  border-color: #c7e2d4;
  background-image: linear-gradient(145deg, #f7fcf8, #eaf6ef, #f2f5df, #f7fcf8);
  animation-delay: -3s;
}

.super-admin-school-metrics .stat-card:nth-child(3) {
  border-color: #d7d0eb;
  background-image: linear-gradient(145deg, #fbf9ff, #f0edfa, #f9edf4, #fbf9ff);
  animation-delay: -6s;
}

.super-admin-school-metrics .stat-card:nth-child(4) {
  border-color: #ead9b9;
  background-image: linear-gradient(145deg, #fffdf7, #faf3e5, #eaf1fa, #fffdf7);
  animation-delay: -9s;
}

@keyframes school-metric-color-shift {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .super-admin-school-metrics .stat-card {
    animation: none;
  }
}

@media (max-width: 900px) {
  .super-admin-school-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .super-admin-school-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}
