body {
  background:
    radial-gradient(900px 500px at 0% -10%, rgba(199, 223, 203, 0.75) 0%, transparent 60%),
    radial-gradient(880px 460px at 100% -10%, rgba(205, 222, 242, 0.75) 0%, transparent 58%),
    linear-gradient(180deg, #faf7f0 0%, var(--bg) 100%);
}

body.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.layout {
  max-width: 1620px;
  margin: 0 auto;
  padding: 24px 24px 36px;
}

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

.hero {
  min-width: 0;
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 3vw, 40px);
  letter-spacing: -0.03em;
}

h1,
h2,
h3 {
  font-family: var(--font-sans);
}

h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

h3 {
  margin: 0;
  font-size: 16px;
}

.subhead {
  margin: 6px 0 0;
  font-size: 16px;
}

.muted {
  margin: 0 0 8px;
  color: var(--muted);
}

.tiny {
  font-size: 12px;
}

.top-space {
  margin-top: 18px;
}

.card {
  border: 1px solid rgba(201, 193, 171, 0.85);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, var(--surface) 100%);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.card.subtle {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.75);
}

.step-shell {
  padding: 18px 20px;
  margin-bottom: 16px;
}

.stepper {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
}

.step {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.85);
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.step::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(100% + 7px);
  width: 14px;
  height: 2px;
  background: var(--line-strong);
  transform: translateY(-50%);
}

.step:last-child::after {
  display: none;
}

.step:hover:not(.locked) {
  transform: translateY(-1px);
  border-color: #b8c5dd;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.08);
}

.step-index {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.step-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.step-copy strong {
  font-size: 14px;
  font-weight: 700;
  color: inherit;
}

.step-copy small {
  color: inherit;
  opacity: 0.82;
  font-size: 12px;
}

.step.active {
  border-color: rgba(37, 99, 235, 0.34);
  background: linear-gradient(180deg, #f9fbff 0%, var(--primary-soft) 100%);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.14);
  color: var(--primary-ink);
}

.step.active .step-index {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.step.done {
  border-color: rgba(31, 122, 77, 0.3);
  background: linear-gradient(180deg, #fbfffd 0%, var(--ok-soft) 100%);
  color: var(--ok);
}

.step.done .step-index {
  border-color: var(--ok);
  background: var(--ok);
  color: #fff;
}

.step.locked {
  opacity: 0.56;
  cursor: not-allowed;
}

.step-card {
  display: none;
}

.step-card.active {
  display: block;
}

.main-column .card + .card {
  margin-top: 16px;
}

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

.main-column,
.side-column {
  min-width: 0;
}

.step-nav-shell {
  padding-top: 14px;
  padding-bottom: 14px;
}

.step-actions {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.step-actions .muted {
  margin: 0;
  text-align: center;
}

.run-card {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.section-heading {
  display: grid;
  gap: 4px;
}

.section-heading.compact {
  margin-bottom: 10px;
}

.task-create-panel {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(207, 198, 177, 0.85);
  border-radius: var(--radius-md);
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 244, 235, 0.96) 100%);
}

.task-create-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.task-create-user {
  min-width: 0;
}

.readonly-shell {
  max-width: none;
}

.readonly-field {
  color: var(--ink);
  background: #f3efe6;
  border-color: #d2cbba;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.readonly-field[readonly] {
  cursor: default;
}

.task-create-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.4fr) minmax(220px, 1fr);
  gap: 14px;
  align-items: start;
}

.task-side-grid {
  display: grid;
  gap: 14px;
}

.task-title-field input.invalid {
  border-color: rgba(180, 35, 24, 0.46);
  background: #fff6f5;
}

.required-dot {
  color: var(--warn);
}

.input-meta {
  min-height: 18px;
  color: transparent;
}

.input-meta.error {
  color: var(--warn);
}

.task-create-advanced {
  border: 1px solid rgba(205, 196, 174, 0.9);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.55);
  padding: 10px 12px;
}

.task-create-advanced summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

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

.task-create-advanced summary::after {
  content: "展开";
  margin-left: 8px;
  font-size: 12px;
  color: var(--muted);
}

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

.task-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.task-toolbar-main,
.task-toolbar-danger {
  margin-top: 0;
}

.task-toolbar-danger {
  margin-left: auto;
}

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

.actions {
  margin-top: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.registry-shell {
  display: grid;
  gap: 12px;
}

.global-registry-shell .registry-row {
  grid-template-columns: minmax(280px, 1fr) auto;
}

.registry-row {
  display: grid;
  grid-template-columns: minmax(280px, 420px) auto;
  gap: 12px 16px;
  align-items: end;
}

.registry-input-field {
  min-width: 0;
}

.registry-actions {
  margin-top: 0;
}

.global-registry-shell .registry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.global-registry-list {
  display: grid;
  gap: 12px;
}

.job-archive-list {
  display: grid;
  gap: 12px;
}

.global-registry-school,
.global-registry-grade {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.job-archive-group {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.global-registry-school-summary,
.global-registry-grade-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.global-registry-school-summary::-webkit-details-marker,
.global-registry-grade-summary::-webkit-details-marker {
  display: none;
}

.global-registry-school-summary strong,
.global-registry-grade-summary strong {
  font-size: 15px;
}

.global-registry-school-summary span,
.global-registry-grade-summary span {
  color: var(--muted);
  font-size: 12px;
}

.job-archive-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.job-archive-summary::-webkit-details-marker {
  display: none;
}

.job-archive-summary strong {
  font-size: 15px;
}

.job-archive-summary span {
  color: var(--muted);
  font-size: 12px;
}

.global-registry-school-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.job-archive-body {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.job-archive-note {
  color: var(--muted);
  font-size: 12px;
  padding: 0 4px;
}

.job-archive-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.global-registry-grade {
  border-radius: 12px;
  background: rgba(250, 250, 247, 0.92);
}

.global-registry-grade-summary {
  padding: 12px 14px;
}

.global-registry-student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 0 12px 12px;
}

.global-student-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.global-student-card strong {
  font-size: 15px;
}

.global-student-meta {
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}

.global-template-link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
}

.global-template-link:hover {
  text-decoration: underline;
}

.info-chip {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: help;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  font-size: 14px;
}

input,
select,
button,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cec7b6;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  padding: 10px 12px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 42px;
  background: linear-gradient(180deg, #3b82f6 0%, var(--primary) 100%);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.16);
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

button.ghost {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(197, 189, 170, 0.94);
  color: var(--ink);
  box-shadow: none;
}

button.danger {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(180, 35, 24, 0.28);
  color: var(--warn);
}

.logout-link {
  padding-inline: 12px;
  min-height: 36px;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.logout-link:hover:not(:disabled) {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
}

.with-icon {
  padding-left: 40px;
}

.with-icon::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background: currentColor;
  opacity: 0.82;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.icon-refresh::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16.5 10a6.5 6.5 0 1 1-1.9-4.6'/%3E%3Cpath d='M16.5 4.5v3.8h-3.8'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16.5 10a6.5 6.5 0 1 1-1.9-4.6'/%3E%3Cpath d='M16.5 4.5v3.8h-3.8'/%3E%3C/svg%3E");
}

.icon-terminal::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 4.5h13a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-13a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1Z'/%3E%3Cpath d='m6 8 2 2-2 2'/%3E%3Cpath d='M10.5 12H14'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 4.5h13a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-13a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1Z'/%3E%3Cpath d='m6 8 2 2-2 2'/%3E%3Cpath d='M10.5 12H14'/%3E%3C/svg%3E");
}

button.is-busy {
  padding-right: 38px;
}

button.is-busy::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-top-color: rgba(255, 255, 255, 0.96);
  transform: translateY(-50%);
  animation: spin 0.75s linear infinite;
}

button.ghost.is-busy::after,
button.danger.is-busy::after {
  border-color: rgba(24, 32, 47, 0.18);
  border-top-color: rgba(24, 32, 47, 0.8);
}

@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.jobs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.job-item {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(207, 199, 177, 0.92);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.job-item:hover {
  transform: translateY(-1px);
  border-color: rgba(120, 142, 182, 0.5);
}

.job-item.active {
  border-color: rgba(37, 99, 235, 0.42);
  background: linear-gradient(180deg, #fafcff 0%, #eef4ff 100%);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
}

.job-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.job-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.job-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.job-badge,
.wf-pill,
.stage-light {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(204, 197, 179, 0.92);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  line-height: 1.2;
  color: #5d6678;
  white-space: nowrap;
}

.job-badge {
  padding-inline: 8px;
}

.job-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

.job-meta {
  font-size: 12px;
  color: var(--muted);
}

.job-workflow {
  font-size: 12px;
  color: var(--muted);
  border-top: 1px dashed rgba(208, 200, 180, 0.8);
  padding-top: 8px;
}

.workflow-bar {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wf-pill.running,
.stage-light.running {
  border-color: rgba(178, 107, 0, 0.28);
  background: var(--running-soft);
  color: var(--running);
}

.wf-pill.completed,
.stage-light.completed {
  border-color: rgba(31, 122, 77, 0.28);
  background: var(--ok-soft);
  color: var(--ok);
}

.wf-pill.failed,
.stage-light.failed {
  border-color: rgba(180, 35, 24, 0.24);
  background: var(--warn-soft);
  color: var(--warn);
}

.run-toolbar {
  margin-top: 0;
  margin-bottom: 10px;
  gap: 10px;
}

.uploader-card,
.grade-progress-card,
.artifact-list {
  border: 1px solid rgba(208, 200, 180, 0.9);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.uploader-card {
  padding: 12px;
  display: grid;
  gap: 14px;
}

.dropzone {
  border: 1px dashed #9aa6ba;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fbfcfe 0%, #f2f6fd 100%);
  color: #516077;
  font-size: 13px;
  padding: 18px 12px;
  text-align: center;
}

.dropzone.dragging {
  border-color: rgba(37, 99, 235, 0.62);
  background: var(--primary-soft);
  color: var(--primary-ink);
}

.doc-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
}

.doc-list {
  border: 1px solid rgba(208, 200, 180, 0.92);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.94);
  padding: 8px;
  min-height: 180px;
  max-height: 360px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-item {
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  border: 1px solid rgba(216, 210, 194, 0.95);
  border-radius: var(--radius-xs);
  text-align: left;
  box-shadow: none;
}

.doc-item.active {
  border-color: rgba(37, 99, 235, 0.38);
  background: var(--primary-soft);
}

.doc-review-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.editor {
  width: 100%;
  min-height: 280px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
}

.editor.short {
  min-height: 120px;
}

.doc-dirty-note {
  min-height: 18px;
  margin: 0 0 6px;
}

.doc-dirty-note.dirty-note {
  color: #8a5800;
  font-weight: 600;
}

.pdf-frame,
.md-preview,
.split-rule-builder {
  border: 1px solid rgba(208, 200, 180, 0.92);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.95);
}

.pdf-frame {
  width: 100%;
  min-height: 420px;
}

.split-rule-builder {
  padding: 10px;
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.split-rule-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  align-items: center;
}

.split-rule-label {
  margin: 0;
  min-width: 0;
  display: block;
  font-weight: 600;
}

.split-rule-input {
  width: 100%;
}

.md-preview {
  min-height: 280px;
  max-height: 480px;
  overflow: auto;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
}

.md-preview h1,
.md-preview h2,
.md-preview h3,
.md-preview h4,
.md-preview h5,
.md-preview h6 {
  margin: 0.4em 0 0.3em;
}

.md-preview p {
  margin: 0.42em 0;
}

.md-preview ul,
.md-preview ol {
  margin: 0.42em 0;
  padding-left: 1.25em;
}

.md-preview pre {
  margin: 0.55em 0;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  overflow: auto;
  background: #f7f5ee;
  border: 1px solid #e3ddcb;
  font-size: 13px;
}

.md-preview code {
  font-family: var(--font-mono);
}

.status {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(208, 200, 180, 0.9);
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 12px;
}

.status.error {
  color: var(--warn);
  border-color: rgba(180, 35, 24, 0.2);
  background: var(--warn-soft);
}

.status.warn {
  color: #8a5800;
  border-color: rgba(178, 107, 0, 0.22);
  background: var(--running-soft);
}

.status.subtle {
  padding: 8px 10px;
  font-size: 13px;
  border-style: dashed;
}

.preset-summary {
  white-space: pre-line;
  line-height: 1.5;
}

.grade-progress-shell {
  display: grid;
  gap: 10px;
}

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

.grade-progress-card {
  padding: 12px;
}

.grade-progress-card h3 {
  margin: 0 0 8px;
}

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

.grade-list-scroll {
  max-height: 360px;
  overflow: auto;
  overscroll-behavior: contain;
  cursor: grab;
}

.grade-list-scroll[data-dragging="1"] {
  cursor: grabbing;
  user-select: none;
}

.grade-list-item {
  border: 1px solid rgba(219, 212, 195, 0.94);
  border-radius: var(--radius-xs);
  background: #fbfaf6;
  padding: 8px 10px;
  display: grid;
  gap: 4px;
}

.grade-list-item.error {
  border-color: rgba(180, 35, 24, 0.16);
  background: #fff7f6;
}

.grade-list-item .meta {
  color: var(--muted);
  font-size: 12px;
}

.grade-list-body {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.grade-list-body-pre {
  max-height: 14rem;
  overflow: auto;
  white-space: pre-wrap;
}

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

.summary-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(208, 200, 180, 0.9);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.94);
}

.summary-card.completed {
  border-color: rgba(31, 122, 77, 0.24);
  background: linear-gradient(180deg, #fcfffd 0%, var(--ok-soft) 100%);
}

.summary-card.pending {
  border-color: rgba(191, 145, 59, 0.22);
  background: linear-gradient(180deg, #fffdf7 0%, #fff9ef 100%);
}

.summary-card.running {
  border-color: rgba(178, 107, 0, 0.24);
  background: linear-gradient(180deg, #fffdf7 0%, var(--running-soft) 100%);
}

.summary-card.failed {
  border-color: rgba(180, 35, 24, 0.18);
  background: linear-gradient(180deg, #fffdfd 0%, var(--warn-soft) 100%);
}

.summary-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.summary-value {
  font-size: 20px;
  line-height: 1.3;
}

.summary-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.summary-empty {
  margin-top: 10px;
  padding: 14px;
  border: 1px dashed rgba(208, 200, 180, 0.9);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.75);
}

.log-section {
  margin-top: 14px;
  border: 1px solid rgba(208, 200, 180, 0.9);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 12px;
}

.log-section summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.log-section summary::-webkit-details-marker {
  display: none;
}

.log-section summary::after {
  content: "展开";
  margin-left: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

.log-section[open] summary::after {
  content: "收起";
}

.panel {
  margin: 8px 0 0;
  border: 1px solid rgba(208, 200, 180, 0.9);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.95);
  overflow: auto;
  max-height: 280px;
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: pre-wrap;
}

.log {
  min-height: 220px;
  max-height: 42vh;
  padding: 14px;
  border-color: rgba(208, 200, 180, 0.9);
  background: #fcfbf8;
  color: #324055;
  line-height: 1.6;
}

.detail {
  min-height: 160px;
  max-height: 260px;
}

.artifact-list {
  margin-top: 12px;
  padding: 10px 12px;
}

.export-advanced {
  margin-top: 10px;
}

.export-grid {
  align-items: start;
}

.artifact-empty {
  display: grid;
  gap: 6px;
  padding: 10px 2px;
}

.artifact-empty strong {
  font-size: 16px;
}

.artifact-download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #fbfdff 0%, #eef4ff 100%);
}

.artifact-download-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.artifact-kicker {
  margin: 0;
  color: var(--primary-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.artifact-download-meta h3 {
  margin: 0;
  font-size: 24px;
}

.artifact-file-name {
  margin: 0;
  word-break: break-all;
  color: var(--ink);
  font-weight: 600;
}

.artifact-download-actions {
  flex: none;
}

.artifact-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3b82f6 0%, var(--primary) 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.16);
}

.artifact-download-btn:hover {
  filter: brightness(1.03);
}

.upload-result {
  margin: 8px 0 0;
  padding-left: 18px;
  max-height: 180px;
  overflow-y: auto;
}

.upload-result li {
  margin: 4px 0;
  font-size: 13px;
}

.upload-result li.warn {
  color: #8a5800;
}

.upload-result li.error {
  color: var(--warn);
}

.activity-feed {
  margin: 8px 0 0;
  padding: 8px;
  list-style: none;
  border: 1px solid rgba(208, 200, 180, 0.9);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.92);
  max-height: 220px;
  overflow: auto;
}

.activity-item {
  font-size: 12px;
  line-height: 1.45;
  color: #314157;
  padding: 7px 6px;
  border-bottom: 1px solid #ece6d6;
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-item.success {
  color: var(--ok);
}

.activity-item.warning {
  color: #8a5800;
}

.activity-item.error {
  color: var(--warn);
}

.checkbox {
  margin-top: 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.inline {
  margin-top: 0;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: none;
}

.auth-shell {
  width: min(520px, calc(100vw - 32px));
}

.auth-card {
  display: grid;
  gap: 14px;
}

.auth-error {
  color: var(--warn);
  font-size: 14px;
  min-height: 20px;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  filter: none;
}

@media (max-width: 1480px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .run-card {
    position: static;
    max-height: none;
  }
}

@media (max-width: 1280px) {
  .stepper {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .step::after {
    display: none;
  }
}

@media (max-width: 1080px) {
  .layout {
    padding-inline: 16px;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .task-create-grid,
  .task-side-grid,
  .registry-row,
  .registry-meta-grid,
  .upload-grid,
  .doc-layout,
  .doc-review-panels,
  .grade-progress-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

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

  .step-actions {
    grid-template-columns: 1fr;
  }

  .step-actions .muted {
    order: 3;
    text-align: left;
  }

  .task-toolbar-danger {
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .layout {
    padding-inline: 12px;
  }

  .card,
  .step-shell {
    padding: 14px;
  }

  .stepper,
  .jobs {
    grid-template-columns: 1fr;
  }

  .job-meta-grid {
    grid-template-columns: 1fr;
  }

  button,
  .logout-link {
    width: 100%;
    justify-content: center;
  }

  .actions,
  .row,
  .task-toolbar,
  .task-toolbar-main,
  .task-toolbar-danger,
  .run-toolbar,
  .registry-actions {
    width: 100%;
  }

  .run-toolbar .checkbox {
    width: 100%;
  }

  .artifact-download-card {
    flex-direction: column;
    align-items: stretch;
  }

  .artifact-download-btn {
    width: 100%;
  }
}

body {
  background: transparent;
}

body.auth-page {
  display: block;
  min-height: 100vh;
}

.layout {
  max-width: 1600px;
  padding: 32px 28px 48px;
}

.page-header {
  align-items: center;
  margin-bottom: 24px;
}

.hero h1 {
  color: var(--text-strong);
  font-size: clamp(32px, 3.2vw, 44px);
}

.card,
.step-shell,
.task-create-panel,
.uploader-card,
.doc-list,
.pdf-frame,
.split-rule-builder,
.md-preview,
.status,
.grade-progress-card,
.panel,
.activity-feed,
.artifact-list,
.summary-card,
.log-section {
  border: 1px solid var(--glass-line);
  background: var(--glass-bg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 24px;
}

.card,
.step-shell,
.task-create-panel,
.uploader-card,
.doc-list,
.pdf-frame,
.split-rule-builder,
.md-preview,
.status,
.grade-progress-card,
.panel,
.activity-feed,
.artifact-list,
.summary-card,
.log-section,
.job-item,
.doc-item,
.grade-list-item,
.artifact-download-card,
.task-create-advanced,
.dropzone {
  border-color: var(--glass-line-strong);
}

.step-shell,
.run-card {
  background: var(--glass-bg-strong);
}

.step {
  border-color: rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: var(--text-body);
}

.step::after {
  background: rgba(148, 163, 184, 0.42);
}

.step-index {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-strong);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  border-radius: 8px;
}

.step.active {
  border-color: rgba(59, 130, 246, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(59, 130, 246, 0.16) 100%);
  box-shadow: 0 14px 34px rgba(59, 130, 246, 0.12);
}

.step.active .step-index {
  background: linear-gradient(180deg, #60a5fa 0%, var(--primary) 100%);
  border-color: transparent;
}

.step.done {
  border-color: rgba(16, 185, 129, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0%, rgba(16, 185, 129, 0.12) 100%);
}

.step.done .step-index {
  background: linear-gradient(180deg, #34d399 0%, var(--ok) 100%);
  border-color: transparent;
}

.task-create-panel,
.task-create-advanced,
.dropzone,
.job-item,
.doc-item,
.grade-list-item,
.summary-card,
.artifact-download-card {
  background: rgba(255, 255, 255, 0.78);
}

.task-create-advanced,
.log-section {
  background: rgba(255, 255, 255, 0.72);
}

.task-create-panel,
.uploader-card,
.summary-card,
.grade-progress-card,
.artifact-download-card {
  gap: 16px;
}

.readonly-field,
input,
select,
textarea {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  border-radius: 8px;
}

.readonly-field {
  background: rgba(255, 255, 255, 0.8);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(59, 130, 246, 0.32);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.08);
}

button {
  background: linear-gradient(180deg, #60a5fa 0%, var(--primary) 100%);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.18);
  border-radius: 8px;
}

button.ghost,
button.danger,
.logout-link {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

button.ghost {
  color: var(--ink);
}

button.danger {
  color: var(--warn);
}

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

.logout-link:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.58);
}

.jobs {
  gap: 16px;
}

.job-item {
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  gap: 12px;
}

.job-item.active,
.doc-item.active {
  border-color: rgba(59, 130, 246, 0.24);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.1);
}

.muted,
.job-meta,
.summary-note,
.step-copy small {
  color: var(--text-body);
}

.job-meta {
  color: var(--text-body);
  font-size: 14px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.job-meta::before {
  content: "";
  flex: none;
}

.job-title,
.artifact-file-name,
.job-workflow,
.summary-note,
.summary-value,
.job-meta,
.step-copy strong,
.step-copy small {
  min-width: 0;
}

.job-title,
.artifact-file-name,
.job-workflow {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-item-top {
  gap: 12px;
}

.wf-pill,
.stage-light,
.job-badge {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 8px;
}

.status.subtle,
.preset-summary {
  background: rgba(255, 255, 255, 0.32);
}

.summary-card.completed,
.wf-pill.completed,
.stage-light.completed {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(16, 185, 129, 0.12) 100%);
}

.summary-card.pending,
.wf-pill.pending,
.stage-light.pending {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(148, 163, 184, 0.12) 100%);
}

.summary-card.running,
.wf-pill.running,
.stage-light.running {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(245, 158, 11, 0.12) 100%);
}

.summary-card.failed,
.wf-pill.failed,
.stage-light.failed {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(239, 68, 68, 0.12) 100%);
}

.log {
  background: rgba(241, 245, 249, 0.96);
  color: var(--text-strong);
  max-height: 240px;
}

.panel,
.detail,
.md-preview,
.split-rule-builder,
.doc-list,
.artifact-list,
.activity-feed {
  background: rgba(255, 255, 255, 0.82);
}

.detail,
.activity-feed,
.doc-list,
.artifact-list,
.grade-list-scroll,
.log {
  overflow-y: auto;
}

.detail {
  white-space: pre-line;
  line-height: 1.7;
  color: var(--text-body);
  max-height: 220px;
}

.artifact-download-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(59, 130, 246, 0.12) 100%);
}

.artifact-download-btn {
  box-shadow: 0 14px 28px rgba(59, 130, 246, 0.16);
  border-radius: 8px;
}

.auth-shell {
  width: min(540px, calc(100vw - 40px));
}

.auth-card {
  gap: 18px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(148, 163, 184, 0.26);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.08);
}

.auth-card h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 38px);
  letter-spacing: -0.03em;
}

.auth-card .actions {
  margin-top: 4px;
}

.auth-error {
  color: var(--warn);
}

.row,
.actions {
  gap: 12px;
}

.actions {
  margin-top: 12px;
}

.grid,
.upload-grid,
.doc-layout,
.doc-review-panels,
.summary-grid,
.grade-progress-grid {
  gap: 16px;
}

label {
  gap: 8px;
  font-size: 14px;
  color: var(--text-body);
}

label > input,
label > select,
label > textarea {
  margin-top: 0;
}

.checkbox {
  gap: 10px;
  align-items: center;
  color: var(--text-body);
}

.checkbox input[type="checkbox"] {
  margin: 0;
}

.summary-label {
  color: var(--text-body);
  font-size: 12px;
  letter-spacing: 0.05em;
}

.summary-value {
  color: var(--text-strong);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.35;
}

.summary-note {
  font-size: 13px;
  color: var(--text-weak);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.run-toolbar,
.workflow-bar,
.job-badges,
.task-toolbar,
.task-toolbar-main,
.task-toolbar-danger {
  gap: 12px;
}

.workflow-bar {
  margin-bottom: 16px;
}

.job-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.job-workflow {
  font-size: 13px;
  color: var(--text-weak);
  padding-top: 10px;
  margin-top: 2px;
}

.artifact-download-meta {
  gap: 6px;
}

.artifact-kicker {
  color: var(--text-weak);
  font-size: 12px;
}

.artifact-file-name {
  font-size: 14px;
  color: var(--text-body);
}

.status,
.status.subtle,
.preset-summary,
.muted,
.tiny,
#logMeta {
  color: var(--text-body);
}

.tiny {
  font-size: 12px;
}

.doc-list,
.activity-feed {
  max-height: 220px;
}

.upload-feedback-shell {
  display: grid;
  gap: 8px;
}

.upload-result:empty {
  display: none;
}

#questionFileSelection,
#answerFileSelection,
#studentAutoFilesSelection,
#studentManualFilesSelection,
#uploadPolicy {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-item {
  color: var(--text-body);
  padding: 10px 6px;
}

@media (max-width: 1080px) {
  .layout {
    padding-inline: 18px;
  }
}

button {
  background: linear-gradient(180deg, #6ea8ff 0%, #4f7cff 100%);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

button:hover:not(:disabled) {
  box-shadow: 0 6px 10px -2px rgba(0, 0, 0, 0.08), 0 3px 6px -3px rgba(0, 0, 0, 0.08);
  filter: none;
}

button.ghost {
  background: #fff;
  border: 1px solid #e5e7eb;
  color: var(--ink);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

button.ghost:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #d1d5db;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

button.danger,
.logout-link {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid transparent;
  color: #ef4444;
  box-shadow: none;
  text-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

button.danger:hover:not(:disabled),
.logout-link:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
  box-shadow: none;
  text-shadow: none;
  filter: none;
  transform: none;
}

.artifact-download-btn {
  border-radius: 8px;
  background: linear-gradient(180deg, #6ea8ff 0%, #4f7cff 100%);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.artifact-download-btn:hover {
  box-shadow: 0 6px 10px -2px rgba(0, 0, 0, 0.08), 0 3px 6px -3px rgba(0, 0, 0, 0.08);
  filter: none;
}

.form-hidden,
.review-note {
  display: none;
}

.aligned-field {
  min-width: 0;
}

.field-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  min-width: 0;
}

.field-label {
  min-width: 0;
  line-height: 1.35;
}

.field-label-required {
  color: #ef4444;
  font-weight: 600;
  flex: none;
}

.section-label {
  margin: 0;
  min-height: 24px;
  display: flex;
  align-items: center;
}

.uploader-card {
  grid-template-rows: auto 88px auto minmax(20px, auto) auto;
  align-content: start;
}

.uploader-card h3 {
  margin: 0;
  min-height: 56px;
}

.dropzone {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-selection {
  margin: 0;
  min-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uploader-card .actions {
  margin-top: auto;
}

.doc-layout > div,
.doc-review-panels > div {
  display: grid;
  gap: 10px;
  align-content: start;
}

#uploadSummary {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Current admin entrypoint override: port the newer flat SaaS visual language
   without rewriting the existing split admin/user structure. */
body {
  background:
    linear-gradient(to right, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    radial-gradient(960px 520px at 0% -10%, rgba(37, 99, 235, 0.08) 0%, transparent 62%),
    radial-gradient(840px 440px at 100% -10%, rgba(6, 182, 212, 0.08) 0%, transparent 58%),
    linear-gradient(180deg, #fcfdff 0%, var(--bg) 100%);
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
}

.layout {
  max-width: 1480px;
  padding: 32px 24px 48px;
}

.page-header {
  align-items: flex-start;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

.card,
.step-shell,
.task-create-panel,
.uploader-card,
.doc-list,
.pdf-frame,
.split-rule-builder,
.md-preview,
.status,
.grade-progress-card,
.panel,
.activity-feed,
.artifact-list,
.summary-card,
.log-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card,
.step-shell,
.task-create-panel,
.uploader-card,
.status,
.grade-progress-card,
.artifact-list,
.summary-card,
.log-section {
  padding: 24px;
}

.card.subtle,
.task-create-advanced,
.status.subtle {
  border-color: var(--line-strong);
  background: var(--surface-muted);
  box-shadow: none;
}

.step-shell {
  padding: 16px 24px;
  margin-bottom: 24px;
}

.stepper {
  gap: 16px;
}

.step {
  padding: 10px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.step::after {
  left: calc(100% + 2px);
  width: 12px;
  background: var(--line);
  border-radius: 999px;
}

.step:hover:not(.locked) {
  transform: none;
  background: var(--bg-soft);
  border-color: var(--line);
  box-shadow: none;
}

.step-index {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border-color: var(--line-strong);
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  box-shadow: none;
}

.step-copy {
  gap: 1px;
}

.step-copy strong {
  color: var(--text-strong);
  font-weight: 600;
}

.step-copy small {
  color: var(--muted);
  opacity: 1;
}

.step.active {
  border-color: rgba(37, 99, 235, 0.18);
  background: rgba(37, 99, 235, 0.08);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.04);
}

.step.active .step-index {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.step.active .step-copy strong {
  color: var(--primary-ink);
}

.step.active .step-copy small {
  color: var(--primary);
}

.step.done {
  border-color: rgba(5, 150, 105, 0.18);
  background: rgba(5, 150, 105, 0.06);
}

.step.done .step-index {
  border-color: var(--ok);
  background: var(--ok);
  color: #fff;
}

.step.locked {
  opacity: 0.42;
  filter: grayscale(1);
}

.workspace {
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
}

.step-nav-shell {
  padding-top: 16px;
  padding-bottom: 16px;
}

.step-actions {
  display: flex;
  justify-content: space-between;
}

.step-actions .muted {
  text-align: left;
}

.run-card {
  top: 24px;
  max-height: calc(100vh - 48px);
}

.section-heading.compact {
  margin-bottom: 12px;
}

.task-create-panel {
  gap: 16px;
  border-color: var(--line);
  background: var(--bg-soft);
}

.task-create-grid,
.task-side-grid,
.grid,
.upload-grid,
.doc-review-panels,
.summary-grid,
.grade-progress-grid {
  gap: 16px;
}

.row,
.actions,
.workflow-bar,
.job-badges,
.task-toolbar,
.task-toolbar-main,
.task-toolbar-danger,
.run-toolbar,
.registry-actions {
  gap: 12px;
}

.actions {
  margin-top: 12px;
}

label {
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-strong);
}

input,
select,
textarea,
.readonly-field {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  color: var(--text-strong);
  padding: 8px 12px;
  line-height: 1.5;
  box-shadow: none;
}

.readonly-field {
  background: var(--bg-soft);
  color: var(--muted);
  pointer-events: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: var(--ring);
}

.task-title-field input.invalid {
  border-color: var(--warn);
  background: #fef2f2;
}

.input-meta {
  min-height: 18px;
  font-size: 12px;
}

.task-create-advanced {
  padding: 12px 14px;
}

.task-create-advanced summary {
  font-size: 14px;
}

button,
.artifact-download-btn {
  border-radius: var(--radius-md);
  min-height: 38px;
  padding: 8px 16px;
  background: var(--primary);
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

button:hover:not(:disabled),
.artifact-download-btn:hover {
  background: var(--primary-ink);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

button.ghost {
  background: var(--surface-strong);
  border-color: var(--line-strong);
  color: var(--text-strong);
  box-shadow: var(--shadow-sm);
}

button.ghost:hover:not(:disabled) {
  background: var(--bg-soft);
  border-color: var(--muted);
}

button.danger,
.logout-link {
  background: rgba(220, 38, 38, 0.08);
  border-color: transparent;
  color: var(--warn);
  box-shadow: none;
}

button.danger:hover:not(:disabled),
.logout-link:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.14);
  color: #b91c1c;
  transform: none;
}

.with-icon {
  padding-left: 36px;
}

.with-icon::before {
  left: 12px;
  width: 16px;
  height: 16px;
  opacity: 1;
}

.icon-refresh::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3Cpath d='M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16'/%3E%3Cpath d='M16 21v-5h5'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3Cpath d='M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16'/%3E%3Cpath d='M16 21v-5h5'/%3E%3C/svg%3E");
}

.icon-terminal::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 17 10 11 4 5'/%3E%3Cline x1='12' y1='19' x2='20' y2='19'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 17 10 11 4 5'/%3E%3Cline x1='12' y1='19' x2='20' y2='19'/%3E%3C/svg%3E");
}

.jobs {
  gap: 16px;
}

.job-item,
.uploader-card,
.doc-item,
.global-student-card,
.summary-card,
.grade-list-item,
.artifact-download-card {
  border-color: var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  box-shadow: var(--shadow-sm);
}

.job-item:hover,
.doc-item:hover,
.artifact-download-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.job-item.active,
.doc-item.active {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.06);
  box-shadow: var(--shadow-md);
}

.job-badge,
.wf-pill,
.stage-light,
.info-chip {
  border-color: var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
}

.dropzone {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  color: var(--muted);
}

.dropzone.dragging {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary-ink);
}

.editor {
  min-height: 380px;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  background: #1e293b;
  color: #f8fafc;
  padding: 16px;
  line-height: 1.6;
}

.editor.short {
  min-height: 120px;
}

.doc-review-panels > div {
  position: relative;
}

.doc-dirty-note {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}

.doc-dirty-note.dirty-note {
  color: var(--running);
}

.pdf-frame {
  min-height: 500px;
  border: none;
}

.md-preview,
.split-rule-builder,
.doc-list,
.artifact-list,
.activity-feed {
  background: var(--surface);
}

.md-preview {
  min-height: 380px;
  max-height: 600px;
  padding: 20px;
  line-height: 1.7;
}

.md-preview pre {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  overflow-x: auto;
}

.md-preview code {
  font-family: var(--font-mono);
}

.split-rule-builder {
  padding: 16px;
  gap: 12px;
  max-height: 500px;
}

.split-rule-row {
  grid-template-columns: 80px 1fr;
  gap: 12px;
}

.status {
  padding: 12px 16px;
  background: var(--surface);
}

.status.error {
  border-color: var(--warn-border);
  background: #fef2f2;
  color: var(--warn);
}

.status.warn {
  border-color: var(--running-border);
  background: #fffbeb;
  color: var(--running);
}

.status.subtle {
  border-style: dashed;
  color: var(--muted);
}

.summary-card {
  border-left: 4px solid var(--line-strong);
}

.summary-card.completed {
  border-left-color: var(--ok);
}

.summary-card.pending {
  border-left-color: var(--line-strong);
}

.summary-card.running {
  border-left-color: var(--running);
}

.summary-card.failed {
  border-left-color: var(--warn);
}

.summary-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.summary-value {
  font-size: 24px;
  font-weight: 700;
}

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

.grade-progress-shell {
  gap: 16px;
}

.grade-list-scroll {
  max-height: 400px;
  padding-right: 4px;
}

.log-section {
  border-color: #334155;
  background: var(--surface-terminal);
  color: #94a3b8;
}

.log-section summary {
  color: #e2e8f0;
  font-weight: 600;
}

.log-section summary::after {
  color: #64748b;
}

.panel,
.log,
.detail {
  border-color: #1e293b;
  background: #020617;
  color: #38bdf8;
}

.log {
  min-height: 260px;
  max-height: 50vh;
}

.detail {
  min-height: 120px;
  color: #a7f3d0;
}

.activity-item {
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}

.activity-item.success {
  border-left: 3px solid var(--ok);
  padding-left: 13px;
}

.activity-item.warning {
  border-left: 3px solid var(--running);
  padding-left: 13px;
}

.activity-item.error {
  border-left: 3px solid var(--warn);
  padding-left: 13px;
}

.checkbox {
  gap: 10px;
  cursor: pointer;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.auth-shell {
  width: min(440px, calc(100vw - 32px));
}

.auth-card {
  gap: 20px;
  padding: 32px;
}

@media (max-width: 1280px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .run-card {
    position: static;
    max-height: none;
  }
}

@media (max-width: 1080px) {
  .step-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  .layout {
    padding-inline: 16px;
  }

  .card,
  .step-shell,
  .task-create-panel,
  .uploader-card,
  .artifact-list,
  .summary-card,
  .log-section {
    padding: 16px;
  }

  button,
  .logout-link,
  .artifact-download-btn {
    width: 100%;
    justify-content: center;
  }
}

.job-item-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.job-badges {
  justify-content: flex-end;
  min-width: 0;
  max-width: min(45%, 13rem);
}

.job-badge {
  max-width: 100%;
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
}

.job-meta-grid > * {
  min-width: 0;
}

.job-title,
.summary-value,
.artifact-file-name {
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.job-title,
.summary-value {
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.job-title {
  -webkit-line-clamp: 2;
  line-height: 1.25;
}

.summary-value {
  -webkit-line-clamp: 2;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.15;
}

.artifact-file-name {
  line-height: 1.45;
}

.doc-layout {
  align-items: start;
  gap: 20px;
}

.doc-layout-side,
.doc-layout-main,
.doc-pane {
  min-width: 0;
}

.doc-layout-side,
.doc-layout-main {
  display: grid;
  gap: 12px;
  align-content: start;
}

.doc-layout-side {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.doc-layout-main {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.doc-layout-side > .section-label,
.doc-current-row {
  margin: 0;
  min-height: 28px;
  display: flex;
  align-items: center;
}

.doc-current-row {
  font-weight: 500;
}

.doc-current-row span {
  margin-left: 6px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-review-panels {
  align-items: stretch;
  gap: 20px;
}

.doc-pane {
  display: grid;
  gap: 12px;
  align-content: start;
  grid-template-rows: auto minmax(0, 1fr);
}

.doc-list-subhead,
.doc-pane-head {
  min-height: 32px;
  display: flex;
  align-items: center;
}

.doc-list-subhead {
  justify-content: flex-start;
}

.doc-pane-head {
  justify-content: space-between;
  gap: 12px;
}

.doc-pane-head .section-label {
  margin: 0;
  min-height: 0;
}

.doc-dirty-note {
  position: static;
  min-height: 0;
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

.editor,
.md-preview {
  min-height: 400px;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  color: var(--text-strong);
  box-shadow: var(--shadow-sm);
}

.editor {
  padding: 18px 20px;
  line-height: 1.7;
}

.editor:focus {
  border-color: var(--primary);
  box-shadow: var(--ring);
}

.md-preview {
  padding: 18px 20px;
}

.doc-list {
  min-height: 400px;
  height: 100%;
}

.log-section {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text-body);
}

.log-section summary {
  color: var(--text-strong);
}

.log-section summary::after {
  color: var(--muted);
}

.panel,
.log,
.detail {
  border-color: var(--line);
  background: var(--surface-strong);
  color: var(--text-strong);
}

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

.detail {
  color: var(--text-body);
}

/* Admin flow consistency overrides */
.task-create-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.task-create-meta-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.task-create-user {
  min-width: min(320px, 100%);
}

.task-create-user .readonly-field {
  min-height: 40px;
}

.jobs {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.job-item {
  gap: 14px;
  padding: 16px;
}

.job-item-top {
  align-items: flex-start;
}

.job-title-stack {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.job-subtitle {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-badge {
  align-self: flex-start;
  flex: none;
  padding: 6px 10px;
}

.job-meta-list {
  display: grid;
  gap: 8px;
}

.job-meta-list .job-meta {
  font-size: 13px;
  display: block;
}

.job-workflow {
  display: none;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.info-field {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  min-width: 0;
}

.info-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.info-value {
  min-width: 0;
  font-size: 14px;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.split-mode-shell {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.split-mode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.split-mode-label {
  font-size: 13px;
  color: var(--text-strong);
  font-weight: 600;
}

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

.split-channel-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(208, 200, 180, 0.9);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.94);
}

.split-channel-card h3 {
  margin: 0;
  font-size: 15px;
}

.split-channel-meta {
  color: var(--muted);
  font-size: 12px;
}

.split-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.split-exception-shell,
.split-legacy-shell {
  display: grid;
  gap: 14px;
}

.split-exception-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.split-exception-tab {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(208, 200, 180, 0.9);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.94);
  cursor: pointer;
  text-align: left;
}

.split-exception-tab.active {
  border-color: rgba(37, 99, 235, 0.24);
  background: linear-gradient(180deg, #f9fbff 0%, #eef4ff 100%);
}

.split-exception-tab.partial {
  border-color: rgba(178, 107, 0, 0.24);
  background: linear-gradient(180deg, #fffdf8 0%, rgba(245, 158, 11, 0.1) 100%);
}

.split-exception-tab.partial .meta {
  color: var(--running);
}

.split-exception-tab.partial.active {
  border-color: rgba(178, 107, 0, 0.34);
  box-shadow: 0 12px 24px rgba(178, 107, 0, 0.12);
}

.split-exception-tab.completed {
  border-color: rgba(31, 122, 77, 0.24);
  background: linear-gradient(180deg, #fcfffd 0%, var(--ok-soft) 100%);
}

.split-exception-tab.completed .meta {
  color: var(--ok);
}

.split-exception-tab.completed.active {
  border-color: rgba(31, 122, 77, 0.34);
  box-shadow: 0 12px 24px rgba(31, 122, 77, 0.12);
}

.split-exception-tab strong {
  font-size: 13px;
}

.split-exception-tab .meta {
  color: var(--muted);
  font-size: 12px;
}

.split-exception-layout {
  display: grid;
  gap: 16px;
}

.split-exception-preview,
.split-exception-controls {
  min-width: 0;
}

.split-exception-preview {
  display: flex;
  justify-content: center;
}

.split-exception-preview-stage {
  width: min(100%, 920px);
  height: min(78vh, 1080px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  border: 1px solid rgba(208, 200, 180, 0.92);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.95);
}

.split-exception-preview .pdf-frame,
#splitExceptionFrame {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: transparent;
}

.split-exception-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.split-exception-controls {
  display: grid;
  gap: 14px;
}

.split-exception-banner {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(238, 244, 255, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.split-exception-banner strong {
  font-size: 14px;
}

.split-exception-banner-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.split-exception-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.split-exception-form label {
  display: grid;
  gap: 8px;
}

.split-exception-controls .actions {
  justify-content: flex-start;
}

.summary-grid.compact {
  margin-top: 0;
}

.stage-control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 16px;
  align-items: start;
}

.stage-control-main,
.stage-control-side {
  display: grid;
  gap: 12px;
}

.stage-control-side {
  align-content: start;
  justify-items: end;
}

.stage-control-side .checkbox {
  width: 100%;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}

.stage-control-side .checkbox input[type="checkbox"] {
  width: auto;
}

#splitPreviewPanel {
  min-height: 150px;
}

#transcribePresetSummary,
#gradePresetSummary,
#extractQuestionHint,
#extractSolutionHint,
#splitModeNotice {
  white-space: pre-line;
}

@media (max-width: 980px) {
  .task-create-grid,
  .stage-control-grid,
  .split-exception-layout,
  .split-exception-form,
  .split-channel-grid {
    grid-template-columns: 1fr;
  }

  .task-create-meta-row,
  .stage-control-side {
    justify-content: stretch;
    justify-items: stretch;
  }

  .task-create-user {
    min-width: 0;
    width: 100%;
  }
}

.task-create-panel {
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: none;
}

.task-create-head .section-heading {
  display: grid;
  gap: 6px;
}

.task-create-caption {
  margin: 0;
  color: var(--text-body);
  font-size: 13px;
  line-height: 1.6;
}

.task-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.92fr);
  grid-template-areas:
    "title user"
    "subtitle preview"
    "archive preview";
  gap: 16px 20px;
  align-items: start;
}

.task-create-main,
.task-create-side,
.task-input-stack {
  display: contents;
}

.task-title-field {
  grid-area: title;
}

.task-subtitle-field {
  grid-area: subtitle;
}

.task-archive-picker {
  grid-area: archive;
}

.task-create-user {
  grid-area: user;
}

.task-create-preview-card {
  grid-area: preview;
}

.task-title-field,
.task-subtitle-field,
.task-create-user,
.task-create-preview-card,
.task-archive-picker {
  min-width: 0;
  align-self: stretch;
}

.task-title-field input,
.task-subtitle-field input,
.task-create-user .readonly-field {
  min-height: 50px;
  border-radius: 14px;
  padding-inline: 16px;
}

.task-title-field .input-meta {
  min-height: 20px;
}

.task-create-user,
.task-create-preview-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-strong);
  box-shadow: none;
}

.task-create-user .readonly-field {
  background: var(--bg-soft);
  border-color: var(--line);
  color: var(--text-body);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.task-create-preview-label,
.task-archive-preview-label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text-weak);
}

.task-create-preview-title,
.task-archive-preview-value {
  font-size: 17px;
  line-height: 1.45;
  color: var(--text-strong);
  word-break: break-word;
}

.task-create-preview-note,
.task-archive-preview-note {
  margin: 0;
  color: var(--text-body);
  font-size: 13px;
  line-height: 1.6;
}

.task-create-preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-create-preview-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text-body);
  font-size: 12px;
  font-weight: 500;
}

.task-create-preview-chip.subtle {
  color: var(--text-body);
  font-weight: 500;
}

.task-archive-picker {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-strong);
  overflow: hidden;
  box-shadow: none;
}

.task-archive-picker-summary {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.task-archive-picker-summary::-webkit-details-marker {
  display: none;
}

.task-archive-picker-summary::after {
  content: "点击展开";
  justify-self: end;
  margin-top: 2px;
  color: var(--text-weak);
  font-size: 12px;
  font-weight: 600;
}

.task-archive-picker[open] .task-archive-picker-summary::after {
  content: "点击收起";
}

.task-archive-picker-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.task-archive-picker-copy strong {
  font-size: 15px;
}

.task-archive-picker-value {
  color: var(--text-body);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
}

.task-archive-picker-meta {
  margin: 0;
  color: var(--text-body);
  font-size: 13px;
  line-height: 1.6;
}

.task-archive-picker-body {
  display: grid;
  gap: 14px;
  padding: 0 18px 18px;
  border-top: 1px solid var(--line);
}

.task-archive-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 14px;
}

.task-archive-option {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.task-archive-option:hover {
  transform: none;
  border-color: var(--line-strong);
  box-shadow: none;
}

.task-archive-option.active {
  border-color: var(--line-strong);
  background: var(--surface-muted);
  box-shadow: none;
}

.task-archive-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.task-archive-option-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-body);
  font-family: "Fira Code", monospace;
  font-size: 11px;
  font-weight: 600;
}

.task-archive-option strong {
  font-size: 15px;
  line-height: 1.4;
}

.task-archive-option small {
  color: var(--text-body);
  font-size: 12px;
  line-height: 1.6;
}

.task-archive-preview {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-muted);
}

.task-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding-top: 4px;
}

.task-toolbar-main {
  justify-self: start;
}

.task-toolbar-danger {
  justify-self: end;
  margin-left: 0;
}

@media (max-width: 1100px) {
  .task-create-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "subtitle"
      "archive"
      "user"
      "preview";
  }
}

@media (max-width: 760px) {
  .task-create-panel {
    padding: 14px;
  }

  .task-archive-picker-copy {
    flex-direction: column;
    align-items: flex-start;
  }

  .task-archive-picker-value {
    text-align: left;
  }

  .task-archive-options,
  .task-create-layout {
    grid-template-columns: 1fr;
  }

  .task-toolbar {
    grid-template-columns: 1fr;
  }

  .task-toolbar-danger {
    justify-self: start;
  }
}
