:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  --page: #f3f6fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #172033;
  --muted: #647084;
  --line: #d9e2ef;
  --line-strong: #c6d1df;
  --primary: #1769e0;
  --primary-strong: #0d4fae;
  --teal: #0f766e;
  --green: #157347;
  --amber: #b7791f;
  --red: #b42318;
  --shadow: 0 10px 28px rgba(22, 32, 51, 0.08);
  --shadow-strong: 0 18px 48px rgba(22, 32, 51, 0.12);
  --bg-gradient: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
}

a {
  color: var(--primary);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.25;
}

h2 {
  font-size: 18px;
  line-height: 1.35;
}

h3 {
  font-size: 15px;
  line-height: 1.35;
}

p {
  color: var(--muted);
  line-height: 1.7;
}

label {
  display: block;
  margin-bottom: 7px;
  color: #41506a;
  font-size: 13px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  font: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.12);
}

textarea {
  min-height: 152px;
  resize: vertical;
}

button,
.button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

button:hover,
.button:hover {
  filter: brightness(0.97);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

button.loading:disabled {
  opacity: 0.82;
}

button.loading::before,
.loading-state::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 999px;
  animation: loadingSpin 0.8s linear infinite;
}

@keyframes loadingSpin {
  to {
    transform: rotate(360deg);
  }
}

.primary {
  background: var(--primary);
  color: #fff;
}

.secondary,
.button.secondary {
  background: #edf2f8;
  color: #1d2939;
  border-color: #d8e1ed;
}

.ghost {
  background: #fff;
  color: #344054;
  border-color: var(--line);
}

.danger {
  background: var(--red);
  color: #fff;
}

.danger-link {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.block {
  width: 100%;
}

.top-gap {
  margin-top: 10px;
}

.muted {
  color: var(--muted);
}

.error {
  color: var(--red);
  margin-top: 10px;
}

.ok {
  color: var(--green);
  margin-top: 10px;
}

.field {
  margin-bottom: 14px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.panel + .panel,
section + section {
  margin-top: 16px;
}

.panel-header,
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-header p,
.section-head p {
  margin-top: 5px;
  font-size: 13px;
}

.panel-actions,
.button-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.button-row.compact-buttons {
  justify-content: flex-start;
  gap: 6px;
}

.button-row.compact-buttons button {
  min-height: 32px;
  padding: 6px 10px;
}

.panel-actions {
  margin-top: 14px;
}

.notice {
  border: 1px solid #b9d5ff;
  background: #eff6ff;
  border-radius: 6px;
  padding: 11px 12px;
  color: #174a8b;
  line-height: 1.7;
  margin-bottom: 14px;
}

.toast {
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid var(--line);
}

.toast.ok {
  border-color: #b7dfc5;
  background: #f0fff5;
}

.toast.error {
  border-color: #ffd0c8;
  background: #fff5f2;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f7f9fc;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.sortable-th {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.sortable-th span {
  color: var(--primary);
  font-weight: 900;
}

td {
  line-height: 1.55;
}

.text-cell {
  min-width: 180px;
  max-width: 320px;
  white-space: normal;
}

.empty-cell {
  color: var(--muted);
  text-align: center;
  padding: 28px 10px;
}

.status-pill,
.type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  color: #344054;
  background: #eef2f7;
}

.status-published,
.status-submitted {
  color: #146c43;
  background: #dff7e8;
}

.status-answering {
  color: #075985;
  background: #e0f2fe;
}

.status-paused {
  color: #7c2d12;
  background: #ffedd5;
}

.status-draft,
.status-not_started {
  color: #7a4b00;
  background: #fff4d6;
}

.type-single {
  color: #174a8b;
  background: #e9f2ff;
}

.type-multiple {
  color: #7a3f00;
  background: #fff0dc;
}

.type-judge {
  color: #146c43;
  background: #e6f8ef;
}

.type-text {
  color: #5b3a95;
  background: #f1e8ff;
}

.code-chip {
  display: inline-flex;
  min-width: 76px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f2f5f9;
  border: 1px solid var(--line);
  font-weight: 800;
}

/* Admin */

.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(23, 105, 224, 0.08), rgba(15, 118, 110, 0.08)),
    #eef4fb;
}

.admin-login-layout {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.admin-login-copy,
.admin-login-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.admin-login-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-mark,
.mark {
  width: max-content;
  border-radius: 6px;
  padding: 7px 10px;
  margin-bottom: 18px;
  background: #e8f2ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.entry-main .mark {
  background: rgba(255, 255, 255, 0.14);
  color: #dff4ff;
  border: 1px solid rgba(186, 230, 253, 0.32);
}

.admin-login-copy h1 {
  font-size: 34px;
  margin-bottom: 12px;
}

.login-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.login-feature-grid span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #f8fafc;
  font-weight: 700;
}

.admin-login-card h2 {
  margin-bottom: 8px;
}

.admin-login-card .field:first-of-type {
  margin-top: 22px;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
}

.admin-sidebar {
  background: #111827;
  color: #fff;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-brand span {
  display: block;
  margin-top: 3px;
  color: #aab5c6;
  font-size: 12px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #1f6feb;
  font-weight: 900;
}

.admin-nav {
  display: grid;
  gap: 8px;
}

.admin-nav button {
  width: 100%;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #d7deea;
  padding: 11px 12px;
  text-align: left;
}

.nav-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #9fb5d5;
  background: rgba(255, 255, 255, 0.06);
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

.nav-text {
  display: grid;
  gap: 2px;
}

.admin-nav button small {
  color: #97a3b6;
  font-size: 12px;
}

.admin-nav button.active,
.admin-nav button:hover {
  background: #233149;
  color: #fff;
}

.admin-nav button.active .nav-icon,
.admin-nav button:hover .nav-icon {
  color: #fff;
  background: rgba(37, 99, 235, 0.42);
}

.admin-nav button.active small,
.admin-nav button:hover small {
  color: #d5deec;
}

.student-link {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 10px 12px;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
}

.admin-main {
  min-width: 0;
  padding: 22px;
}

.admin-workbench {
  min-height: 100vh;
  background: var(--bg-gradient);
}

.workbench-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(320px, 1.2fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(10px);
}

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

.workbench-brand span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.workbench-current {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.workbench-current label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.workbench-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.workbench-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 24px 0;
}

.workbench-steps button,
.ops-flow-nav button,
.button.secondary,
.secondary,
.ghost,
.metric-card,
.panel,
.ops-step,
.ops-check-item,
.overview-board,
.current-exam-hero,
.exam-editor,
.exam-form-section,
.exam-switch-list button,
.metric-action,
.code-chip,
.context-chip,
.toast,
.notice,
.result-card,
.submit-modal {
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.workbench-steps button {
  min-height: 62px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-align: left;
}

.workbench-steps button:hover,
.workbench-steps button.active {
  border-color: #93c5fd;
  background: #eff6ff;
}

.workbench-steps button span:last-child {
  display: grid;
  gap: 2px;
}

.workbench-steps small {
  color: var(--muted);
  font-size: 12px;
}

.workbench-steps .nav-icon {
  color: #1d4ed8;
  background: #dbeafe;
}

.stage-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.overview-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.08);
}

.overview-board h2 {
  margin: 6px 0 8px;
  font-size: 30px;
  line-height: 1.18;
}

.overview-board p {
  color: var(--muted);
  line-height: 1.7;
}

.next-card {
  display: grid;
  gap: 8px;
  align-content: center;
  border-left: 1px solid #cfe2ff;
  padding-left: 18px;
}

.next-card span,
.next-card small {
  color: var(--muted);
}

.next-card strong {
  font-size: 22px;
}

.admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.context-chip {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.current-exam-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid #b9d7ff;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.08);
}

.current-exam-hero.compact {
  margin-bottom: 14px;
}

.hero-main h2 {
  margin: 6px 0 8px;
  font-size: 28px;
  line-height: 1.18;
}

.hero-main p {
  color: var(--muted);
  line-height: 1.6;
}

.hero-actions,
.exam-chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.exam-chip-row span {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}

.hero-status {
  display: grid;
  align-content: center;
  gap: 10px;
  border-left: 1px solid #cfe2ff;
  padding-left: 18px;
}

.hero-status strong {
  font-size: 18px;
}

.hero-status small {
  color: var(--muted);
  line-height: 1.5;
}

.metric-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.metric-card.done {
  border-color: #bbf7d0;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.metric-card small {
  display: block;
  margin-top: 8px;
  color: #77839a;
  line-height: 1.4;
}

.metric-action {
  min-height: 32px;
  margin-top: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
  gap: 16px;
  align-items: start;
}

.content-grid.two-one {
  grid-template-columns: minmax(0, 1fr) 330px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

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

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

.exam-editor {
  margin-bottom: 16px;
  border-color: #b9d7ff;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.exam-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.exam-editor-head h2 {
  margin: 4px 0 6px;
  font-size: 24px;
}

.exam-editor-head p {
  margin: 0;
  color: var(--muted);
}

.exam-editor-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.exam-editor-summary div {
  border: 1px solid #cfe2ff;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
}

.exam-editor-summary span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.exam-editor-summary strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  word-break: break-all;
}

.exam-form {
  display: grid;
  gap: 14px;
}

.exam-form.compact {
  margin-top: 16px;
}

.exam-form-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.exam-form-section h3 {
  margin-bottom: 12px;
  font-size: 16px;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.quick-actions button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.create-exam-details {
  margin-bottom: 16px;
}

.create-exam-details summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}

.create-exam-details summary::-webkit-details-marker {
  display: none;
}

.create-exam-details summary span {
  font-size: 18px;
  font-weight: 800;
}

.create-exam-details summary small {
  color: var(--muted);
}

.create-exam-details summary::after {
  content: "展开";
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  padding: 5px 10px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 800;
}

.create-exam-details[open] summary::after {
  content: "收起";
}

.step-list {
  display: grid;
  gap: 10px;
}

.step-list div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
  color: var(--muted);
  line-height: 1.5;
}

.step-list strong {
  color: var(--text);
}

.rule-list {
  display: grid;
  gap: 4px;
  margin: 10px 0 0;
  padding: 0 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.rule-list li {
  padding-left: 2px;
}

.rule-list.inline-rules {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.import-single-column {
  max-width: 920px;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.workflow-card {
  min-height: 118px;
  display: grid;
  align-content: start;
  gap: 7px;
  text-align: left;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.workflow-card span {
  width: max-content;
  border-radius: 999px;
  padding: 2px 8px;
  color: #7a4b00;
  background: #fff4d6;
  font-size: 12px;
}

.workflow-card.done span {
  color: #146c43;
  background: #dff7e8;
}

.workflow-card small {
  color: var(--muted);
  line-height: 1.45;
}

.ops-progress {
  margin-bottom: 16px;
}

.ops-step-list {
  display: grid;
  gap: 10px;
}

.ops-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.ops-step:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.ops-step.done {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.ops-step-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 900;
}

.ops-step.done .ops-step-index {
  color: #047857;
  background: #dcfce7;
}

.ops-step-main {
  display: grid;
  gap: 4px;
}

.ops-step-main small {
  color: var(--muted);
}

.ops-step-action {
  border-radius: 999px;
  padding: 6px 10px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 900;
}

.ops-step.done .ops-step-action {
  color: #047857;
  background: #dcfce7;
}

.csv-box {
  font-family: Consolas, "Microsoft YaHei", monospace;
  min-height: 178px;
  white-space: pre;
}

.import-progress {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.import-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 800;
}

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

.import-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #0ea5e9);
  transition: width 0.25s ease;
}

.import-progress.error {
  border-color: #fecaca;
  background: #fef2f2;
}

.import-progress.error .import-progress-head {
  color: #b91c1c;
}

.import-progress.error .import-progress-track {
  background: #fee2e2;
}

.import-progress.error .import-progress-track span {
  background: #dc2626;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.filter-bar select {
  width: 130px;
}

.filter-bar input {
  width: min(320px, 100%);
}

.filter-spacer {
  flex: 1;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.pager select {
  width: 108px;
}

.scroll-table {
  max-height: 390px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.scroll-table .table-wrap {
  overflow: visible;
}

.tool-strip {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(100px, 0.6fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.paper-tabs {
  display: inline-flex;
  gap: 6px;
  margin: 14px 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: #f7faff;
}

.paper-tabs button {
  min-width: 110px;
  min-height: 36px;
  border-color: transparent;
  background: transparent;
  color: #475569;
}

.paper-tabs button.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(23, 105, 224, 0.18);
}

.student-tabs {
  margin-top: 8px;
}

.student-filter-bar input {
  width: min(440px, 100%);
}

.student-filter-bar select:first-child {
  width: 150px;
}

.paper-mode {
  display: grid;
  gap: 16px;
}

.compose-card,
.score-panel {
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.paper-compose-strip {
  grid-template-columns: minmax(220px, 1fr) minmax(140px, 0.5fr) minmax(120px, 0.35fr);
}

.paper-score-strip {
  grid-template-columns: minmax(160px, 220px) minmax(140px, 200px);
}

.manual-pick-panel {
  padding: 0;
  overflow: hidden;
}

.manual-pick-panel summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 14px 18px;
  cursor: pointer;
  color: #0f2d52;
  font-weight: 800;
  background: #f8fbff;
}

.manual-pick-panel[open] summary {
  border-bottom: 1px solid var(--line);
}

.manual-pick-panel > p,
.manual-pick-panel > .filter-bar,
.manual-pick-panel > .panel-header,
.manual-pick-panel > .table-wrap,
.manual-pick-panel > .pager {
  margin-left: 18px;
  margin-right: 18px;
}

.manual-pick-panel > p {
  margin-top: 14px;
}

.compact-filter {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(120px, 0.38fr) minmax(260px, 1fr) auto auto;
  align-items: end;
}

.compact-filter select,
.compact-filter input {
  width: 100%;
}

.paper-pick-table {
  max-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.paper-manage-table {
  max-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.paper-pick-table th:first-child,
.paper-pick-table td:first-child {
  width: 44px;
  text-align: center;
}

.align-end {
  align-self: end;
}

.score-input {
  max-width: 96px;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-form input {
  width: 82px;
}

.exam-detail-strip {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(160px, 0.7fr));
  gap: 10px;
  margin-bottom: 14px;
}

.exam-detail-strip > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--panel-soft);
}

.exam-detail-strip span,
.exam-detail-strip small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.exam-detail-strip strong {
  display: block;
  margin: 5px 0 4px;
  color: var(--text);
  font-size: 18px;
}

.view-toggle {
  display: inline-flex;
  gap: 6px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.view-toggle button {
  min-height: 30px;
  padding: 5px 12px;
  color: #334155;
  background: transparent;
  border-color: transparent;
}

.view-toggle button.active {
  color: #fff;
  background: var(--primary);
}

.student-detail-table {
  max-height: 620px;
}

.student-detail-table table {
  min-width: 1180px;
  table-layout: fixed;
  font-size: 13px;
}

.student-detail-table th:nth-child(1) {
  width: 178px;
}

.student-detail-table th:nth-child(2) {
  width: 280px;
}

.student-detail-table th:nth-child(3) {
  width: 78px;
}

.student-detail-table th:nth-child(4) {
  width: 180px;
}

.student-detail-table th:nth-child(5) {
  width: 70px;
}

.student-detail-table th:nth-child(6) {
  width: 170px;
}

.student-detail-table th:nth-child(7) {
  width: 220px;
}

.student-detail-table th,
.student-detail-table td {
  vertical-align: top;
  padding: 8px 9px;
}

.student-detail-table td strong,
.student-detail-table td small {
  display: block;
}

.student-detail-table tbody tr:hover {
  background: #f8fbff;
}

.student-name-cell {
  min-width: 0;
}

.student-info-cell {
  min-width: 0;
  max-width: none;
  word-break: break-word;
}

.student-info-cell strong {
  margin-bottom: 2px;
}

.student-info-cell small,
.student-name-cell small,
.time-cell small,
.timer-policy-cell small {
  color: #334155;
  font-size: 12px;
  line-height: 1.45;
}

.student-id-line {
  font-family: Consolas, "Microsoft YaHei", monospace;
  color: #0f172a;
  word-break: break-all;
}

.time-cell {
  min-width: 0;
}

.time-cell small {
  white-space: nowrap;
}

.timer-policy-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 6px;
  min-width: 0;
}

.timer-policy-cell small {
  grid-column: 1 / -1;
}

.student-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.timer-policy-cell select,
.student-card-tools select {
  min-height: 34px;
  padding: 6px 9px;
  min-width: 0;
}

.timer-policy-cell button,
.student-actions button,
.student-card-tools button {
  min-height: 32px;
  padding: 6px 8px;
  white-space: nowrap;
}

.student-actions .inline-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
}

.student-actions .inline-form input {
  width: 58px;
  min-width: 0;
  padding: 6px 7px;
}

.student-actions .inline-form button {
  min-width: 0;
}

.student-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(380px, 1fr));
  gap: 12px;
}

.student-detail-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

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

.student-detail-card header strong,
.student-detail-card header small {
  display: block;
}

.student-detail-card header small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.student-detail-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
  margin: 0 0 10px;
}

.student-detail-card dt {
  color: var(--muted);
  font-size: 12px;
}

.student-detail-card dd {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 13px;
  word-break: break-word;
}

.student-card-tools {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(88px, auto) minmax(88px, auto);
  gap: 8px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.student-card-tools select {
  grid-column: 1 / 3;
  width: 100%;
  min-width: 0;
}

.student-card-tools > button {
  white-space: nowrap;
}

.student-card-tools > button:nth-of-type(1) {
  grid-column: 3 / 4;
}

.student-card-tools > button:nth-of-type(2) {
  grid-column: 3 / 4;
}

.student-card-tools > button:nth-of-type(3) {
  grid-column: 1 / 2;
}

.student-card-tools > button:nth-of-type(4) {
  grid-column: 2 / 4;
}

.student-card-tools .inline-form {
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: 72px minmax(112px, auto);
  gap: 6px;
  min-width: 0;
}

.student-card-tools .inline-form input {
  width: 72px;
}

.exam-picker {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  gap: 16px;
}

.exam-picker-meta {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  color: var(--muted);
}

.ops-admin {
  min-height: 100vh;
  background: #f4f7fb;
  color: var(--text);
}

.ops-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 0.95fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 28px;
  border-bottom: 1px solid rgba(209, 219, 232, 0.88);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(12px);
}

.ops-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ops-brand span,
.ops-exam-select label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.ops-exam-select {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.ops-select-note {
  grid-column: 2;
  margin-top: -5px;
  color: #64748b;
  font-size: 12px;
}

.ops-header-actions,
.ops-focus-actions,
.button-stack {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ops-header-actions {
  justify-content: flex-end;
}

.ops-flow-nav {
  position: sticky;
  top: 66px;
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 28px;
  border-bottom: 1px solid rgba(209, 219, 232, 0.8);
  background: rgba(244, 247, 251, 0.88);
  backdrop-filter: blur(12px);
}

.ops-flow-nav button {
  min-height: 50px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: #0f172a;
  text-align: left;
}

.ops-flow-nav button:hover,
.ops-flow-nav button.active {
  border-color: #2563eb;
  background: #1f6feb;
  color: #fff;
}

.ops-flow-nav button > span:last-child {
  display: grid;
  gap: 2px;
}

.ops-flow-nav small {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.ops-flow-nav strong {
  color: inherit;
  font-size: 15px;
}

.ops-flow-nav button:hover small,
.ops-flow-nav button.active small {
  color: rgba(255, 255, 255, 0.9);
}

.ops-flow-nav button:hover .nav-icon,
.ops-flow-nav button.active .nav-icon {
  color: #1f6feb;
  background: #fff;
}

.ops-page {
  display: grid;
  gap: 16px;
  width: min(100%, 1520px);
  margin: 0 auto;
  padding: 22px 28px 34px;
}

.ops-layout,
.ops-focus,
.overview-board,
.current-exam-hero,
.exam-editor,
.panel {
  border-radius: 14px;
}

.ops-focus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: stretch;
  padding: 18px 22px;
  border: 1px solid #b9d7ff;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff 0%, #edf6ff 100%);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.08);
}

.ops-focus h1,
.task-heading h1,
.ops-empty h1 {
  margin: 6px 0 8px;
  font-size: 26px;
  line-height: 1.16;
}

.ops-focus p,
.task-heading p,
.ops-empty p,
.muted {
  color: var(--muted);
  line-height: 1.65;
}

.ops-status-card {
  display: grid;
  align-content: center;
  gap: 8px;
  border-left: 1px solid #c9defc;
  padding-left: 20px;
}

.ops-status-card strong,
.task-kpis strong {
  font-size: 22px;
}

.ops-check-panel {
  padding: 14px;
}

.panel-header.compact {
  margin-bottom: 12px;
}

.ops-check-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.ops-check-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.ops-check-item.done {
  border-color: #b7efca;
  background: #f4fff8;
}

.ops-check-index {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1d4ed8;
  background: #dbeafe;
  font-weight: 900;
}

.ops-check-item.done .ops-check-index {
  color: #047857;
  background: #d8f8e4;
}

.ops-check-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.ops-check-item button {
  grid-column: 2;
  justify-self: start;
  min-height: 28px;
  padding: 4px 9px;
  font-size: 12px;
}

.ops-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ops-stat-strip div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
  background: #fff;
}

.ops-stat-strip.compact {
  margin: 14px 0;
}

.ops-stat-strip span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.ops-stat-strip strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
}

.ops-stat-strip small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.ops-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.ops-layout.wide-main {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.ops-primary-panel {
  min-width: 0;
  padding: 22px;
}

.task-heading {
  margin-bottom: 18px;
}

.task-heading.row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.task-kpis {
  min-width: 120px;
  display: grid;
  justify-items: end;
  color: var(--muted);
}

.ops-form {
  display: grid;
  gap: 15px;
}

.ops-form.compact {
  margin-top: 14px;
}

.ops-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 980px;
}

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

.ops-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.ops-side .panel {
  padding: 16px;
}

.ops-side-status {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.button-stack {
  align-items: stretch;
}

.button-stack button {
  flex: 1 1 100%;
}

.danger-zone {
  margin-top: 12px;
  border-top: 1px dashed #fecaca;
  padding-top: 12px;
}

.danger-zone summary {
  cursor: pointer;
  color: #b91c1c;
  font-weight: 800;
}

.danger-zone button {
  margin-top: 10px;
}

.exam-switch-list {
  display: grid;
  gap: 8px;
}

.bank-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.exam-switch-list button {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: #0f172a;
  text-align: left;
}

.bank-list button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 8px;
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: #0f172a;
  text-align: left;
}

.bank-list button.active,
.bank-list button:hover {
  border-color: #8bbcff;
  background: #f0f7ff;
}

.bank-list small {
  color: #475569;
}

.bank-list .danger-link {
  grid-row: span 2;
  align-self: center;
}

.exam-switch-list button.active,
.exam-switch-list button:hover {
  border-color: #8bbcff;
  background: #f0f7ff;
  color: #0f172a;
}

.exam-switch-list small {
  color: #475569;
}

.exam-switch-list button.active small,
.exam-switch-list button:hover small {
  color: #475569;
}

.filter-bar.prominent {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.tall-table {
  max-height: 620px;
  overflow: auto;
}

.footer-pager {
  margin-top: 12px;
}

.csv-box.compact {
  min-height: 150px;
  max-height: 220px;
}

.ops-full-row {
  grid-column: 1 / -1;
}

.compact-scroll {
  max-height: 320px;
}

.ops-empty {
  padding: 28px;
}

/* Student entry */

.student-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding: 28px;
  background: #081426 url("/assets/exam-login-bg-poster.jpg") center / cover no-repeat;
}

.login-bg-video,
.login-bg-shade {
  position: absolute;
  inset: 0;
}

.login-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.login-bg-shade {
  background:
    radial-gradient(circle at 22% 20%, rgba(77, 171, 247, 0.34), transparent 34%),
    linear-gradient(90deg, rgba(4, 12, 27, 0.82), rgba(4, 12, 27, 0.64));
}

.student-entry {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
}

.entry-card {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(380px, 0.96fr);
  gap: 0;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.entry-card.login-focused {
  width: min(760px, 100%);
  min-height: auto;
  margin: 0 auto;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
}

.entry-main,
.entry-login {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.entry-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  padding: clamp(34px, 4vw, 50px);
  background:
    linear-gradient(160deg, rgba(10, 53, 114, 0.96), rgba(8, 24, 58, 0.94));
}

.login-focused .entry-main,
.login-focused .entry-login {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.login-focused .entry-main {
  padding: 34px 42px 18px;
}

.login-focused .entry-login {
  padding: 20px 42px 38px;
  align-self: stretch;
}

.entry-main h1 {
  font-size: clamp(38px, 4.4vw, 54px);
  line-height: 1.08;
  margin-bottom: 12px;
}

.login-focused .entry-main h1 {
  font-size: 30px;
}

.login-focused .entry-notice {
  margin-top: 18px;
}

.entry-main > p {
  max-width: 430px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.entry-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0;
}

.entry-facts span {
  border-radius: 999px;
  padding: 7px 11px;
  color: #dff4ff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(186, 230, 253, 0.36);
  font-weight: 700;
  font-size: 13px;
}

.entry-notice {
  margin-top: auto;
  border: 1px solid rgba(186, 230, 253, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  padding: 16px 18px;
}

.entry-notice strong {
  display: block;
  margin-bottom: 10px;
}

.entry-notice ol {
  margin: 0;
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.83);
  line-height: 1.8;
}

.entry-login {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 4vw, 46px);
  background: rgba(255, 255, 255, 0.98);
}

.entry-login h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.entry-login p {
  margin-bottom: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.login-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.login-steps span {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 6px 8px;
  text-align: center;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 800;
}

.login-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
}

.id-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: 8px;
  align-items: center;
}

.id-prefix:disabled {
  color: #475467;
  background: #f2f5f9;
  -webkit-text-fill-color: #475467;
  cursor: not-allowed;
}

.id-last4 {
  text-align: center;
  font-weight: 800;
  letter-spacing: 0;
  border-color: #1f6feb;
  background: #fff;
}

.id-last4.hint-pulse {
  animation: idLast4Pulse 0.8s ease-in-out 2;
}

@keyframes idLast4Pulse {
  0%, 100% {
    border-color: #1f6feb;
    box-shadow: 0 0 0 0 rgba(31, 111, 235, 0);
    background: #fff;
  }
  50% {
    border-color: #f59e0b;
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.22);
    background: #fff8eb;
  }
}

.field-help {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.field-help.warning {
  color: #8a4b00;
}

.student-login.gradient-login {
  min-height: 100vh;
  padding: 32px;
  background:
    radial-gradient(circle at 6% 12%, rgba(255, 255, 255, 0.34), transparent 28%),
    radial-gradient(circle at 96% 86%, rgba(255, 255, 255, 0.28), transparent 26%),
    linear-gradient(135deg, #7fd2ff 0%, #b7eaff 44%, #e7f8ff 100%);
}

.student-login.gradient-login::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 8% 92%, rgba(37, 99, 235, 0.08), transparent 34%),
    radial-gradient(ellipse at 92% 8%, rgba(14, 165, 233, 0.08), transparent 30%);
  pointer-events: none;
}

.notice-entry-card {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 36px));
  display: grid;
  gap: 20px;
  padding: 32px 44px 30px;
  border: 1px solid rgba(147, 197, 253, 0.56);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 54px rgba(14, 105, 171, 0.2);
}

.notice-entry-card h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.25;
}

.notice-box {
  position: relative;
  border: 1px solid #d6e8fb;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  padding: 22px 18px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.notice-tab {
  position: absolute;
  top: -1px;
  left: 18px;
  transform: translateY(-50%);
  border-radius: 6px;
  padding: 6px 13px;
  color: #fff;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.24);
}

.notice-scroll {
  max-height: 270px;
  overflow-y: auto;
  padding: 4px 12px 4px 6px;
  color: #1f2a44;
  line-height: 1.9;
  scrollbar-width: thin;
}

.notice-scroll p {
  margin: 0 0 12px;
}

.notice-start {
  justify-self: center;
  min-width: 220px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.32);
}

.notice-start:disabled {
  color: #7c8ca6;
  background: #e6eef8;
  box-shadow: none;
  cursor: not-allowed;
}

.form-entry .entry-card.login-card {
  min-height: 520px;
  grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.08fr);
  width: min(1040px, calc(100vw - 36px));
  box-shadow: 0 24px 70px rgba(37, 99, 235, 0.2);
}

.compact-info {
  background:
    linear-gradient(160deg, rgba(13, 86, 150, 0.96), rgba(24, 58, 124, 0.95)),
    radial-gradient(circle at 22% 16%, rgba(125, 211, 252, 0.3), transparent 34%);
}

.entry-notice.light {
  margin-top: 28px;
  background: rgba(255, 255, 255, 0.13);
}

.login-input-panel,
.login-confirm-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(30px, 4vw, 46px);
}

.login-input-panel {
  background: #fff;
}

.login-confirm-panel {
  border-left: 1px solid #d6e4f7;
  background:
    linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}

.panel-step {
  width: max-content;
  margin-bottom: 14px;
  border-radius: 999px;
  padding: 6px 12px;
  color: #0b63ce;
  background: #e8f2ff;
  border: 1px solid #bfdbfe;
  font-size: 13px;
  font-weight: 800;
}

.login-input-panel h2,
.login-confirm-panel h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
}

.login-input-panel > p,
.login-confirm-panel > p {
  margin: 0 0 24px;
  color: #52637a;
  line-height: 1.7;
}

.input-guidance {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  border: 1px solid #d8e8fb;
  border-radius: 10px;
  padding: 14px;
  color: #38516f;
  background: #f7fbff;
}

.input-guidance strong {
  color: #0f2d52;
}

.input-guidance span {
  font-size: 13px;
  line-height: 1.6;
}

.confirm-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  margin: 4px 0 16px;
  border: 1px dashed #b8cce6;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  color: #64748b;
  background: rgba(255, 255, 255, 0.74);
}

.confirm-empty strong {
  color: #1e3a5f;
  font-size: 18px;
}

.confirm-empty span {
  max-width: 280px;
  line-height: 1.7;
}

.loading-state {
  border-style: solid;
}

.loading-state::before {
  width: 28px;
  height: 28px;
  color: #1d4ed8;
}

.registration-card {
  margin: 4px 0 16px;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  background: #f0fdf4;
  padding: 18px;
}

.registration-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.registration-head strong {
  color: #166534;
}

.registration-head span {
  color: #15803d;
  font-size: 12px;
}

.registration-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
}

.registration-card div {
  min-width: 0;
}

.registration-card dt {
  color: #64748b;
  font-size: 12px;
}

.registration-card dd {
  margin: 3px 0 0;
  color: #0f172a;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* Student exam */

.exam-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  position: relative;
  background: #f5f7fb;
}

.exam-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  padding: 13px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.04);
}

.exam-header h1 {
  font-size: 20px;
  margin-bottom: 6px;
}

.exam-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.exam-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.progress-text {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.timer {
  min-width: 116px;
  text-align: center;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff2ef;
  color: var(--red);
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.exam-workspace {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 18px;
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.exam-content {
  min-width: 0;
}

.question-nav {
  position: sticky;
  top: 86px;
  z-index: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  max-height: calc(100vh - 106px);
  overflow: auto;
}

.answer-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.answer-card-head span {
  color: var(--primary);
  font-weight: 800;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #e6ebf3;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.nav-summary {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 12px;
}

.dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 4px;
}

.answered-dot {
  background: var(--primary);
}

.unanswered-dot {
  background: #cbd5e1;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.nav-type-section {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.nav-type-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
}

.nav-type-title span {
  color: var(--muted);
  font-size: 12px;
}

.question-nav-button {
  display: grid;
  place-items: center;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 700;
}

.question-nav-button.type-single {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.question-nav-button.type-multiple {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.question-nav-button.type-judge {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.question-nav-button.type-text {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #6d28d9;
}

.question-nav-button.answered {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.nav-footer {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.nav-footer strong {
  color: var(--text);
}

.watermark {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 70px 42px;
  overflow: hidden;
  padding: 60px 20px;
  color: rgba(15, 23, 42, 0.07);
  font-size: 18px;
  transform: rotate(-24deg) scale(1.08);
  transform-origin: center;
}

.watermark span {
  white-space: nowrap;
}

.exam-header,
.exam-workspace {
  z-index: 1;
}

.question {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 14px;
}

.question-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
}

.question-title strong {
  display: block;
}

.question-index {
  min-width: 42px;
  height: 32px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  background: #e8f2ff;
  color: var(--primary);
  font-weight: 800;
}

.question-stem {
  margin-bottom: 14px;
  line-height: 1.85;
  font-size: 18px;
  color: #18243b;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 12px;
  border-top: 1px solid #edf1f6;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.65;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.option:hover {
  background: #f3f8ff;
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.option.selected {
  background: #eaf3ff;
  box-shadow: inset 0 0 0 1px #60a5fa;
  color: #0f3f8c;
}

.option span {
  font-weight: 650;
}

.option input {
  width: auto;
  min-height: auto;
  margin-top: 7px;
  cursor: pointer;
}

.save-state {
  min-height: 22px;
  margin-top: 6px;
}

.submit-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.submit-panel div {
  display: grid;
  gap: 4px;
}

.submit-panel span {
  color: var(--muted);
  font-size: 13px;
}

.result-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 34%),
    linear-gradient(135deg, #eef6ff, #f8fbff);
}

.result-card {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 34px;
  text-align: center;
  box-shadow: var(--shadow);
}

.result-icon {
  width: 68px;
  height: 68px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  margin-bottom: 14px;
  color: #fff;
  background: var(--green);
  font-size: 38px;
  font-weight: 900;
}

.result-card h1 {
  margin-bottom: 10px;
}

.result-card p {
  margin: 0;
}

.result-lead {
  color: var(--muted);
  line-height: 1.6;
}

.result-info {
  display: grid;
  gap: 10px;
  margin: 22px 0;
  text-align: left;
}

.result-info div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #f8fafc;
}

.result-info dt {
  color: var(--muted);
  font-size: 13px;
}

.result-info dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  word-break: break-all;
}

.result-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 18, 36, 0.58);
  backdrop-filter: blur(5px);
}

.submit-modal {
  width: min(460px, 100%);
  border-radius: 14px;
  padding: 28px;
  background: #fff;
  border: 1px solid rgba(37, 99, 235, 0.2);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.28);
  text-align: center;
}

.submit-modal h2 {
  margin: 10px 0;
  font-size: 28px;
}

.submit-modal p {
  color: var(--muted);
  line-height: 1.7;
}

.submit-modal p strong {
  color: var(--red);
  font-size: 20px;
}

.modal-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 12px;
  color: #9f1239;
  background: #ffe4e6;
  font-size: 12px;
  font-weight: 900;
}

.modal-countdown {
  display: grid;
  gap: 4px;
  place-items: center;
  margin: 18px 0 22px;
}

.modal-countdown strong {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  font-size: 34px;
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.28);
}

.modal-countdown span {
  color: var(--muted);
  font-size: 13px;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.answer-review-modal {
  width: min(1080px, 96vw);
  max-height: 88vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(37, 99, 235, 0.22);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.3);
}

.answer-review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.answer-review-header h2 {
  margin: 4px 0;
  font-size: 28px;
}

.answer-review-header p {
  margin: 0;
  color: var(--muted);
}

.icon-close {
  min-width: 76px;
}

.answer-review-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 24px;
  background: #f8fbff;
  border-bottom: 1px solid var(--line);
}

.answer-review-summary div {
  border: 1px solid #d8e5f7;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.answer-review-summary span,
.answer-review-summary small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.answer-review-summary strong {
  display: block;
  margin: 4px 0;
  font-size: 22px;
  color: var(--text);
}

.answer-review-list {
  min-height: 0;
  overflow: auto;
  padding: 16px 24px 24px;
  display: grid;
  gap: 12px;
}

.answer-review-item {
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}

.answer-review-item > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.answer-review-item > header > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.answer-review-score {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.answer-review-score span {
  border-radius: 999px;
  padding: 4px 9px;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.answer-review-score strong {
  color: var(--text);
}

.answer-review-stem {
  margin: 12px 0;
  line-height: 1.75;
  color: var(--text);
}

.answer-option-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  list-style: none;
}

.answer-option-list li {
  line-height: 1.65;
  color: #334155;
}

.answer-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.answer-compare div {
  min-width: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fafc;
}

.answer-compare dt {
  color: var(--muted);
  font-size: 12px;
}

.answer-compare dd {
  margin: 5px 0 0;
  color: var(--text);
  line-height: 1.6;
  word-break: break-word;
}

.answer-status-correct {
  border-left-color: #16a34a;
}

.answer-status-wrong {
  border-left-color: var(--red);
}

.answer-status-unanswered {
  border-left-color: #f59e0b;
}

.answer-status-manual {
  border-left-color: #2563eb;
}

.answer-status-correct .answer-review-score span {
  color: #15803d;
  background: #dcfce7;
}

.answer-status-wrong .answer-review-score span {
  color: #b91c1c;
  background: #fee2e2;
}

.answer-status-unanswered .answer-review-score span {
  color: #b45309;
  background: #fef3c7;
}

.danger-text {
  color: var(--red);
}

.student-form-modal {
  width: min(720px, 96vw);
  max-height: 88vh;
  overflow: auto;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(37, 99, 235, 0.22);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.3);
}

.student-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 24px;
}

.student-form-grid .wide {
  grid-column: 1 / -1;
}

.field.required label::after {
  content: " *";
  color: var(--red);
}

.student-form-actions {
  padding: 0 24px 24px;
}

@media (max-width: 980px) {
  .ops-header,
  .ops-layout,
  .ops-layout.wide-main,
  .ops-focus {
    grid-template-columns: 1fr;
  }

  .ops-header {
    position: static;
    padding: 12px 16px;
  }

  .ops-exam-select {
    grid-template-columns: 1fr;
  }

  .ops-flow-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 16px;
  }

  .ops-page {
    padding: 16px;
  }

  .ops-status-card {
    border-left: 0;
    border-top: 1px solid #c9defc;
    padding-left: 0;
    padding-top: 14px;
  }

  .ops-check-list,
  .exam-detail-strip,
  .student-card-grid,
  .ops-stat-strip,
  .ops-form-grid {
    grid-template-columns: 1fr;
  }

  .student-card-tools {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .student-card-tools > button:nth-of-type(1),
  .student-card-tools > button:nth-of-type(2),
  .student-card-tools > button:nth-of-type(3),
  .student-card-tools > button:nth-of-type(4),
  .student-card-tools .inline-form {
    grid-column: 1 / -1;
  }

  .answer-review-summary,
  .answer-option-list,
  .answer-compare,
  .student-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .workbench-header {
    position: static;
    grid-template-columns: 1fr;
    padding: 14px 16px;
  }

  .workbench-current {
    grid-template-columns: 1fr;
  }

  .workbench-actions {
    justify-content: flex-start;
  }

  .workbench-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px 16px 0;
  }

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

  .admin-main {
    padding: 16px;
  }

  .admin-topbar,
  .exam-header,
  .submit-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-grid,
  .workflow-grid,
  .student-detail-card dl,
  .current-exam-hero,
  .overview-board,
  .exam-editor-summary,
  .content-grid,
  .content-grid.two-one,
  .form-grid.three,
  .form-grid.two,
  .entry-card {
    grid-template-columns: 1fr;
  }

  .exam-editor-head,
  .create-exam-details summary {
    flex-direction: column;
    align-items: stretch;
  }

  .ops-step {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .ops-step-action {
    grid-column: 2;
    width: max-content;
  }

  .entry-card {
    min-height: auto;
  }

  .form-entry .entry-card.login-card {
    grid-template-columns: 1fr;
  }

  .entry-main,
  .entry-login,
  .login-input-panel,
  .login-confirm-panel {
    padding: 28px;
  }

  .login-confirm-panel {
    border-left: 0;
    border-top: 1px solid #d6e4f7;
  }

  .hero-status {
    border-left: 0;
    border-top: 1px solid #cfe2ff;
    padding-left: 0;
    padding-top: 16px;
  }

  .next-card {
    border-left: 0;
    border-top: 1px solid #cfe2ff;
    padding-left: 0;
    padding-top: 16px;
  }

  .tool-strip {
    grid-template-columns: 1fr;
  }

  .paper-compose-strip,
  .paper-score-strip,
  .compact-filter {
    grid-template-columns: 1fr;
  }

  .paper-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .exam-workspace {
    grid-template-columns: 1fr;
  }

  .question-nav {
    position: static;
    max-height: none;
  }

  .question-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media (max-width: 620px) {
  .admin-login-layout {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .exam-detail-strip,
  .student-card-grid,
  .student-detail-card dl {
    grid-template-columns: 1fr;
  }

  .student-card-tools {
    grid-template-columns: minmax(0, 1fr);
  }

  .student-card-tools select,
  .student-card-tools > button:nth-of-type(1),
  .student-card-tools > button:nth-of-type(2),
  .student-card-tools > button:nth-of-type(3),
  .student-card-tools > button:nth-of-type(4),
  .student-card-tools .inline-form {
    grid-column: 1 / -1;
  }

  .filter-bar,
  .pager,
  .topbar-actions,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-bar input,
  .filter-bar select,
  .pager select,
  .topbar-actions > *,
  .button-row > * {
    width: 100%;
  }

  .student-login {
    padding: 12px;
  }

  .notice-entry-card {
    width: 100%;
    padding: 24px 18px 20px;
    border-radius: 14px;
  }

  .notice-scroll {
    max-height: 52vh;
  }

  .entry-main,
  .entry-login,
  .login-input-panel,
  .login-confirm-panel {
    padding: 22px;
  }

  .registration-card dl {
    grid-template-columns: 1fr;
  }

  .id-split {
    grid-template-columns: 1fr;
  }

  .question-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .watermark {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    font-size: 15px;
  }
}
