:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --teal: #0d9488;
  --teal-soft: #f0fdfa;
  --green: #10b981;
  --green-soft: #ecfdf5;
  --amber: #f59e0b;
  --amber-soft: #fffbeb;
  --red: #ef4444;
  --red-soft: #fef2f2;
  --purple: #8b5cf6;
  --purple-soft: #f5f3ff;
  --ink: #0f172a;
  --text: #1e293b;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --bg: #f4f7fb;
  --card: #ffffff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI",
    system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(37, 99, 235, 0.07), transparent 30%),
    radial-gradient(circle at 95% 10%, rgba(13, 148, 136, 0.06), transparent 26%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--primary);
  text-decoration: none;
}

.hidden {
  display: none !important;
}

/* ------------------------------------------------------------------ */
/* 顶部导航                                                           */
/* ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 13px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  font-size: 23px;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.brand strong {
  display: block;
  font-size: 17px;
  letter-spacing: 0.01em;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.student-badge,
.teacher-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 13px;
  font-weight: 700;
}

.teacher-badge {
  color: var(--teal);
  background: var(--teal-soft);
}

.ghost-link {
  color: var(--muted);
  font-size: 14px;
  transition: color 0.18s ease;
}

.ghost-link:hover {
  color: var(--primary);
}

/* ------------------------------------------------------------------ */
/* 通用组件                                                           */
/* ------------------------------------------------------------------ */
.page-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 26px 28px 60px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.btn-success {
  color: #fff;
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 8px 18px rgba(16, 185, 129, 0.2);
}

.btn-outline {
  color: var(--primary);
  background: #fff;
  border-color: #bfdbfe;
}

.btn-outline:hover {
  background: var(--primary-soft);
  border-color: #93c5fd;
}

.btn-ghost {
  color: var(--muted);
  background: #f8fafc;
  border-color: var(--line);
}

.btn-ghost:hover {
  color: var(--text);
  background: #f1f5f9;
}

.btn-warning {
  color: #fff;
  background: var(--amber);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 13px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
  transition: 0.18s ease;
}

.icon-btn:hover {
  color: var(--primary);
  border-color: #bfdbfe;
  background: var(--primary-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.section-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-title h2 {
  color: var(--ink);
  font-size: clamp(20px, 2.2vw, 26px);
  letter-spacing: -0.02em;
}

.hint-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.lede {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

/* ------------------------------------------------------------------ */
/* 学生端：入口                                                       */
/* ------------------------------------------------------------------ */
.hero-card {
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  padding: 42px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.94)),
    var(--card);
  box-shadow: var(--shadow);
}

.hero-card::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1), transparent 68%);
  pointer-events: none;
}

.hero-card::after {
  content: "";
  position: absolute;
  bottom: -170px;
  left: 36%;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.08), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 44px;
  align-items: center;
}

.hero-grid h1 {
  color: var(--ink);
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.22;
  letter-spacing: -0.04em;
}

.hero-grid h1 em {
  color: var(--primary);
  font-style: normal;
  background: linear-gradient(transparent 68%, rgba(37, 99, 235, 0.13) 68%);
}

.hero-grid > div > p {
  max-width: 610px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.hero-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}

.hero-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  font-weight: 600;
}

.hero-step span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 800;
}

.join-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.join-card h2 {
  color: var(--ink);
  font-size: 20px;
}

.join-card > p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.field {
  margin-top: 18px;
}

.field label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.field label span {
  color: var(--faint);
  font-size: 12px;
  font-weight: 400;
}

.field select,
.field input,
.filter-select,
.search-input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: none;
  color: var(--text);
  background: #fff;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.field select:focus,
.field input:focus,
.filter-select:focus,
.search-input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.join-card .btn {
  margin-top: 20px;
  height: 48px;
  font-size: 15px;
}

.join-hint {
  margin-top: 13px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* 学生端：实验区                                                     */
/* ------------------------------------------------------------------ */
.progress-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 18px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
}

.step-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.step-chip.active {
  color: var(--primary);
  background: var(--primary-soft);
}

.step-chip.done {
  color: var(--green);
  background: var(--green-soft);
}

.progress-bar > span {
  flex: 1;
  min-width: 12px;
  height: 1px;
  background: var(--line);
}

.identity {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.identity strong {
  color: var(--ink);
}

.task-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 84px;
  padding: 14px;
  max-height: calc(100vh - 104px);
  overflow: auto;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.sidebar-head span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.sidebar-head small {
  color: var(--faint);
  font-size: 10px;
}

.reagent-group {
  margin-bottom: 12px;
}

.reagent-group-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.reagent-group-title::before {
  content: "";
  width: 3px;
  height: 11px;
  border-radius: 2px;
  background: var(--primary);
}

.reagent-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.reagent-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  cursor: grab;
  user-select: none;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.reagent-item:hover {
  border-color: #93c5fd;
  background: var(--primary-soft);
  transform: translateY(-1px);
}

.reagent-item:active {
  cursor: grabbing;
}

.reagent-item.is-picked {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 7px 16px rgba(37, 99, 235, 0.2);
}

.reagent-item.is-picked::after {
  content: "✓";
  position: absolute;
  right: 8px;
  font-size: 11px;
}

.operation-list .reagent-item {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.operation-list .reagent-item:hover {
  border-color: #4ade80;
  background: #dcfce7;
}

.operation-list .reagent-item.is-picked {
  border-color: var(--green);
  background: var(--green);
}

.sidebar-divider {
  height: 1px;
  margin: 13px 0;
  background: var(--line);
}

.sidebar-tip {
  padding: 9px 10px;
  border-radius: 9px;
  color: #92400e;
  background: var(--amber-soft);
  font-size: 10.5px;
  line-height: 1.65;
}

.sidebar .btn-change {
  width: 100%;
  margin-top: 12px;
}

.main-panel {
  padding: 20px;
  min-height: 440px;
}

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

.ion-card {
  position: relative;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.ion-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 9px 24px rgba(37, 99, 235, 0.07);
}

.ion-symbol {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ion-symbol::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ion-color, var(--primary));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ion-color, var(--primary)) 13%, transparent);
}

.drop-zone {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 9px;
  color: var(--faint);
  background: #f8fafc;
  font-size: 12px;
  text-align: center;
  word-break: break-all;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.drop-zone.drag-over {
  transform: scale(1.015);
}

.drop-zone.filled {
  border-style: solid;
  border-color: #6ee7b7;
  color: #047857;
  background: var(--green-soft);
  font-weight: 800;
}

.drop-zone.filled.impurity {
  border-color: #fca5a5;
  color: #b91c1c;
  background: var(--red-soft);
}

.new-ion-section {
  margin-top: 16px;
  padding: 12px;
  border: 1px dashed #fca5a5;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffafa, #fff);
}

.new-ion-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.new-ion-head .warn-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #b91c1c;
  background: var(--red-soft);
  font-size: 12px;
}

.new-ion-head h4 {
  color: #9f1239;
  font-size: 12px;
}

.new-ion-head p {
  margin-top: 2px;
  color: #be123c;
  font-size: 10px;
  line-height: 1.55;
}

.new-ion-section .ion-grid {
  margin-top: 10px;
}

.new-ion-section .ion-symbol {
  color: #b91c1c;
  font-size: 15px;
}

.new-ion-section .ion-card {
  background: #fff;
}

.feedback {
  margin-top: 15px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f8fafc;
}

.feedback.error {
  border-color: #fecaca;
  background: var(--red-soft);
}

.feedback.success {
  border-color: #a7f3d0;
  background: var(--green-soft);
}

.feedback.info {
  border-color: #bfdbfe;
  background: var(--primary-soft);
}

.feedback-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.feedback.error .feedback-title {
  color: #b91c1c;
}

.feedback.success .feedback-title {
  color: #047857;
}

.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.75;
}

.feedback-list .item {
  display: flex;
  gap: 7px;
}

.feedback-list .item::before {
  content: "•";
  color: var(--faint);
}

.feedback.error .feedback-list .item::before {
  color: #f87171;
}

.feedback-actions {
  display: flex;
  gap: 9px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.submit-note {
  color: var(--faint);
  font-size: 12px;
  line-height: 1.6;
}

/* ------------------------------------------------------------------ */
/* 学生端：任务二流程                                                 */
/* ------------------------------------------------------------------ */
.flow-scroll {
  margin-top: 16px;
  padding: 14px 10px 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, #fbfdff, #f8fafc),
    #f8fafc;
}

.flow-track {
  display: flex;
  align-items: stretch;
  gap: 6px;
  min-width: max-content;
  min-height: 118px;
}

.flow-block {
  position: relative;
  width: 108px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-label {
  height: 16px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.flow-box {
  position: relative;
  flex: 1;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7px 5px;
  border: 1.5px solid #bfdbfe;
  border-radius: 10px;
  color: var(--text);
  background: #fff;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  word-break: break-all;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.flow-box:hover,
.flow-box.drag-over {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.flow-box.start-box {
  border-color: #cbd5e1;
  color: var(--slate-700, #334155);
  background: #f1f5f9;
}

.flow-box.start-box .sub-label {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.4;
}

.flow-box.fixed-box {
  border-color: #86efac;
  color: #166534;
  background: #f0fdf4;
}

.flow-box.empty {
  border-style: dashed;
  color: var(--faint);
  font-weight: 500;
}

.flow-box.empty::after {
  content: "拖入试剂 / 操作";
  font-size: 9.5px;
}

.flow-box.has-value::after {
  display: none;
}

.flow-box.is-crystal {
  border-color: #fcd34d;
  color: #92400e;
  background: #fffbeb;
}

.flow-arrow {
  align-self: center;
  margin-top: 20px;
  color: #94a3b8;
  font-size: 16px;
  font-weight: 700;
  user-select: none;
}

.precip-badge {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  max-width: 120px;
  padding: 3px 6px;
  border: 1px solid #7dd3fc;
  border-radius: 6px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
  text-align: center;
}

.precip-badge::before {
  content: "↓ ";
  color: #0284c7;
}

.flow-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.flow-actions .step-counter {
  margin-left: auto;
  color: var(--faint);
  font-size: 12px;
}

/* ------------------------------------------------------------------ */
/* 教师端登录                                                         */
/* ------------------------------------------------------------------ */
.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-wrap {
  width: min(440px, 100%);
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-bottom: 22px;
  color: var(--ink);
}

.login-card {
  padding: 30px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
}

.login-card h1 {
  color: var(--ink);
  font-size: 25px;
  letter-spacing: -0.03em;
}

.login-card > p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.form-error {
  margin-top: 17px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #b91c1c;
  background: var(--red-soft);
  font-size: 12px;
}

.login-card .field {
  margin-top: 20px;
}

.login-card .btn {
  margin-top: 18px;
  height: 47px;
}

.login-back {
  display: block;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.login-back:hover {
  color: var(--primary);
}

.login-tip {
  margin-top: 17px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* 教师端看板                                                         */
/* ------------------------------------------------------------------ */
.teacher-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 26px 28px 60px;
}

.dashboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.dashboard-head h1 {
  color: var(--ink);
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: -0.04em;
}

.dashboard-head p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
  animation: pulse 1.9s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0.03);
  }
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 18px;
  padding: 11px 14px;
  border: 1px solid #fde68a;
  border-radius: 11px;
  color: #92400e;
  background: var(--amber-soft);
  font-size: 12px;
  line-height: 1.6;
}

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

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -25px;
  bottom: -35px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--metric-tint, rgba(37, 99, 235, 0.06));
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-label span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--metric-tint, var(--primary-soft));
  font-size: 13px;
}

.metric-value {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  color: var(--ink);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.metric-value small {
  margin-left: 4px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.metric-sub {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  color: var(--faint);
  font-size: 11px;
}

/* ------------------------------------------------------------------ */
/* 教师端：AI 整体分析                                                */
/* ------------------------------------------------------------------ */
.ai-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 20px;
  border-color: #dbeafe;
  background:
    radial-gradient(circle at 96% 0%, rgba(37, 99, 235, 0.08), transparent 34%),
    linear-gradient(135deg, #ffffff, #f8fbff);
}

.ai-card::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -50px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.07), transparent 68%);
  pointer-events: none;
}

.ai-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.ai-heading {
  display: flex;
  align-items: center;
  gap: 11px;
}

.ai-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
  font-size: 20px;
}

.ai-heading h2 {
  color: var(--ink);
  font-size: 17px;
  letter-spacing: -0.02em;
}

.ai-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.ai-badge {
  padding: 5px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(239, 246, 255, 0.8);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.ai-summary {
  position: relative;
  z-index: 1;
  padding: 11px 14px;
  border-left: 3px solid var(--primary);
  border-radius: 0 10px 10px 0;
  color: var(--text);
  background: rgba(239, 246, 255, 0.65);
  font-size: 12px;
  line-height: 1.8;
}

.ai-insights {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 11px;
}

.ai-insight {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
  font-size: 10.5px;
  line-height: 1.65;
}

.ai-insight::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--teal);
}

.ai-scheme-grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 14px;
}

.ai-scheme-card {
  position: relative;
  flex: 1 1 260px;
  min-width: 0;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.035);
}

.ai-scheme-card.rank-1 {
  border-color: #fcd34d;
  background: linear-gradient(180deg, #fffdf4, #fff);
}

.ai-scheme-card.rank-2 {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #fbfdff, #fff);
}

.ai-scheme-card.rank-3 {
  border-color: #fdba74;
  background: linear-gradient(180deg, #fffaf5, #fff);
}

.ai-rank {
  position: absolute;
  top: 11px;
  right: 11px;
  min-width: 28px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 7px;
  color: #fff;
  background: var(--primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ai-scheme-card.rank-1 .ai-rank {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.ai-scheme-card.rank-2 .ai-rank {
  background: linear-gradient(135deg, #64748b, #94a3b8);
}

.ai-scheme-card.rank-3 .ai-rank {
  background: linear-gradient(135deg, #c2410c, #fb923c);
}

.ai-scheme-seq {
  padding-right: 38px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
  word-break: break-all;
}

.ai-scheme-meta {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

.ai-scheme-meta b {
  color: var(--primary);
  font-size: 17px;
  font-weight: 800;
}

.ai-scheme-meta span {
  color: var(--faint);
}

.ai-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 64px;
  margin-top: 9px;
  padding-right: 2px;
  overflow: auto;
}

.ai-group-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 6px;
  border-radius: 5px;
  color: #1e40af;
  background: #eff6ff;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.ai-scheme-flow {
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
  color: var(--faint);
  font-size: 9px;
  line-height: 1.55;
}

.ai-scheme-flow b {
  color: var(--muted);
  font-weight: 700;
}

.ai-footnote {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.6;
}

.ai-empty {
  grid-column: 1 / -1;
  padding: 24px;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* 教师端：图表                                                       */
/* ------------------------------------------------------------------ */
.chart-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(340px, 1.15fr);
  gap: 14px;
  margin-bottom: 16px;
}

.chart-card {
  padding: 19px;
  min-height: 330px;
}

.chart-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.chart-card h2,
.lower-grid h2,
.records-card h2 {
  color: var(--ink);
  font-size: 15px;
  letter-spacing: -0.01em;
}

.chart-card header p {
  color: var(--faint);
  font-size: 11px;
}

.chart-note {
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: #f1f5f9;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(68px, 0.9fr) minmax(90px, 2.6fr) 36px;
  gap: 9px;
  align-items: center;
}

.bar-label {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f5f9;
}

.bar-fill {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--bar-color, #60a5fa), var(--bar-color-2, #2563eb));
  animation: bar-grow 0.65s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

@keyframes bar-grow {
  from {
    width: 0;
  }
  to {
    width: var(--w, 0%);
  }
}

.bar-value {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.scheme-bars .bar-row {
  grid-template-columns: minmax(120px, 1.8fr) minmax(80px, 1.4fr) 30px;
}

.scheme-bars .bar-label {
  white-space: normal;
  line-height: 1.45;
  font-weight: 600;
}

.chart-empty {
  display: grid;
  place-items: center;
  min-height: 210px;
  color: var(--faint);
  font-size: 12px;
}

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
  gap: 14px;
  margin-bottom: 16px;
}

.lower-grid > .card {
  padding: 19px;
}

.lower-grid h2 {
  margin-bottom: 14px;
}

.ion-breakdown {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ion-line {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
}

.ion-line-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-top: 3px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.ion-line-label i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ion-color, var(--primary));
}

.ion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ion-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #f8fafc;
  font-size: 11px;
  font-weight: 600;
}

.ion-chip b {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 4px;
  border-radius: 5px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 10px;
}

.group-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  padding-right: 3px;
  overflow: auto;
}

.group-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}

.group-row .group-name {
  min-width: 52px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.group-row .group-bar {
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f5f9;
}

.group-row .group-bar span {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5eead4, #0d9488);
}

.group-row .group-count {
  color: var(--faint);
  font-size: 10px;
  white-space: nowrap;
}

.records-card {
  padding: 19px;
}

.records-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 14px;
}

.records-head p {
  margin-top: 4px;
  color: var(--faint);
  font-size: 11px;
}

.record-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-select {
  width: auto;
  height: 36px;
  padding: 0 28px 0 10px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.search-input {
  width: 210px;
  height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 11px;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.records-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  font-size: 12px;
}

.records-table th {
  padding: 10px 12px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: left;
  white-space: nowrap;
}

.records-table td {
  padding: 11px 12px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

.records-table tbody tr {
  transition: background 0.15s ease;
}

.records-table tbody tr:hover {
  background: #fbfdff;
}

.cell-group strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.cell-group small {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 10px;
}

.cell-time {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.task1-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 255px;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border-radius: 6px;
  color: var(--muted);
  background: #f1f5f9;
  font-size: 9px;
  white-space: nowrap;
}

.mini-tag b {
  color: var(--text);
  font-weight: 700;
}

.flow-mini {
  max-width: 300px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-empty {
  padding: 44px 20px;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 30px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
  text-align: center;
}

.empty-state .empty-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 18px;
  background: var(--primary-soft);
  font-size: 28px;
}

.empty-state h2 {
  color: var(--ink);
  font-size: 18px;
}

.empty-state p {
  max-width: 360px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.loading-box {
  display: grid;
  place-items: center;
  min-height: 420px;
  color: var(--muted);
  font-size: 13px;
}

.spinner {
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  border: 3px solid #dbeafe;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ------------------------------------------------------------------ */
/* 教师端详情弹窗                                                     */
/* ------------------------------------------------------------------ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}

.modal-panel {
  width: min(860px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.24);
  animation: modal-in 0.2s ease both;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 15px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.modal-head h2 {
  color: var(--ink);
  font-size: 19px;
  letter-spacing: -0.02em;
}

.modal-head p {
  margin-top: 4px;
  color: var(--faint);
  font-size: 11px;
}

.modal-body {
  padding: 20px 22px 24px;
}

.detail-section {
  margin-bottom: 20px;
}

.detail-section h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 13px;
}

.detail-section h3::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--primary);
}

.ion-map {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ion-map-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
  font-size: 11px;
}

.ion-map-item .from {
  color: var(--muted);
}

.ion-map-item .arrow {
  color: var(--faint);
}

.ion-map-item .to {
  color: var(--primary);
  font-weight: 800;
}

.detail-flow {
  display: flex;
  align-items: stretch;
  gap: 7px;
  padding: 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.detail-flow-block {
  width: 118px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9px 7px;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  color: var(--text);
  background: #fff;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  word-break: break-all;
}

.detail-flow-block.start {
  border-color: #cbd5e1;
  color: #334155;
  background: #f1f5f9;
}

.detail-flow-block.fixed {
  border-color: #86efac;
  color: #166534;
  background: #f0fdf4;
}

.detail-flow-block.crystal {
  border-color: #fcd34d;
  color: #92400e;
  background: #fffbeb;
}

.detail-flow-arrow {
  align-self: center;
  color: var(--faint);
  font-size: 14px;
}

.detail-flow-sub {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: 8px;
  font-weight: 400;
  line-height: 1.4;
}

.feedback-detail {
  padding: 13px 15px;
  border: 1px solid #a7f3d0;
  border-radius: 11px;
  background: var(--green-soft);
}

.feedback-detail .item {
  display: flex;
  gap: 7px;
  color: #065f46;
  font-size: 12px;
  line-height: 1.75;
}

.feedback-detail .item + .item {
  margin-top: 4px;
}

.feedback-detail .item::before {
  content: "✓";
  color: var(--green);
  font-weight: 800;
}

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

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

.detail-meta span {
  display: block;
  color: var(--faint);
  font-size: 9px;
  font-weight: 700;
}

.detail-meta strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
}

/* ------------------------------------------------------------------ */
/* Toast                                                              */
/* ------------------------------------------------------------------ */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  z-index: 200;
  max-width: min(420px, calc(100vw - 32px));
  padding: 11px 18px;
  border-radius: 11px;
  color: #fff;
  background: #0f172a;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-12px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  background: var(--red);
}

.toast.success {
  background: var(--green);
}

.toast.info {
  background: var(--primary);
}

/* ------------------------------------------------------------------ */
/* 响应式                                                             */
/* ------------------------------------------------------------------ */
@media (max-width: 1160px) {
  .chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

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

  .sidebar {
    position: static;
    max-height: none;
  }

  .reagent-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .sidebar-head small {
    display: none;
  }

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

  .dashboard-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .header-inner,
  .page-shell,
  .teacher-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand small {
    display: none;
  }

  .hero-card {
    padding: 26px 20px;
  }

  .hero-grid h1 {
    font-size: 31px;
  }

  .main-panel {
    padding: 19px;
  }

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

  .panel-title {
    flex-direction: column;
  }

  .hint-pill {
    white-space: normal;
  }

  .progress-bar {
    overflow-x: auto;
  }

  .identity {
    display: none;
  }

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

  .ai-insights {
    grid-template-columns: 1fr;
  }

  .ai-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .records-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .record-filters {
    width: 100%;
  }

  .search-input {
    flex: 1;
    min-width: 140px;
  }

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

  .submit-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .submit-row .btn {
    width: 100%;
  }
}

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

  .flow-actions .step-counter {
    width: 100%;
    margin-left: 0;
  }
}
