:root {
  --blue: #0b41cd;
  --bright: #1482fa;
  --teal: #0a7a73;
  --ink: #182235;
  --muted: #65748b;
  --line: #dce4f2;
  --soft-blue: #eaf0fe;
  --soft-teal: #e6f5f2;
  --soft-warning: #fff3df;
  --surface: #ffffff;
  --page: #f7f9fc;
  --danger: #b42318;
  --shadow: 0 12px 28px rgba(15, 36, 73, 0.08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, "Segoe UI", "Noto Sans KR", Arial, sans-serif;
  line-height: 1.45;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(20, 130, 250, 0.3);
  outline-offset: 2px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 22px 16px 16px;
  z-index: 20;
}

.brand-block { display: flex; align-items: center; gap: 10px; padding: 2px 8px 20px; }
.brand-name { color: var(--blue); font-size: 19px; font-weight: 750; }
.brand-name em { font-style: italic; }
.brand-meta { margin-top: 2px; color: var(--muted); font-size: 12px; }

.nav { min-height: 0; flex: 1 1 auto; display: grid; gap: 18px; overflow-y: auto; padding-right: 4px; }
.nav-group { display: grid; gap: 3px; }
.nav-heading { margin: 0 8px 5px; color: var(--muted); font-size: 13px; font-weight: 750; letter-spacing: 0; text-transform: uppercase; }
summary.nav-heading {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 5px;
  padding: 4px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
summary.nav-heading::-webkit-details-marker { display: none; }
summary.nav-heading::after {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(45deg);
  transition: transform 160ms ease;
}
.nav-group:not([open]) > summary.nav-heading { margin-bottom: 0; }
.nav-group:not([open]) > summary.nav-heading::after { transform: rotate(-45deg); }
summary.nav-heading:hover { color: var(--blue); background: var(--soft-blue); }
summary.nav-heading:focus-visible { outline: 2px solid var(--bright); outline-offset: 2px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-size: 14px;
}
.nav-item:hover { color: var(--blue); background: var(--soft-blue); }
.nav-item.is-active { color: var(--blue); background: var(--soft-blue); font-weight: 700; }
.nav-item svg { width: 17px; height: 17px; flex: 0 0 auto; }

/* Correlation 제목 줄 + 장비/시약 하위 항목. */
.nav-branch { display: grid; gap: 3px; }
.nav-branch-label { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 11px 4px; color: var(--muted); font-size: 14px; }
.nav-branch-label svg { width: 17px; height: 17px; flex: 0 0 auto; }
.nav-sublist { display: grid; gap: 2px; margin-left: 19px; padding-left: 10px; border-left: 1px solid var(--line); }
.nav-subitem { padding: 8px 11px; font-size: 13px; }

.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 14px 8px 2px; color: var(--muted); font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }

.main { min-width: 0; padding: 0 34px 42px; }
.topbar {
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.topbar-title { min-width: 0; }
.topbar-title span { display: block; color: var(--muted); font-size: 12px; }
.topbar-title h1 { margin: 2px 0 0; font-size: 22px; letter-spacing: 0; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface);
}
.icon-button:hover { color: var(--blue); border-color: var(--bright); }
.icon-button svg { width: 17px; height: 17px; }
.menu-button { display: none; }
.profile-button { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 6px; padding: 8px 10px; color: var(--ink); background: transparent; font-size: 13px; }
.profile-button:hover { background: var(--soft-blue); }
.profile-button.is-admin { color: #09654f; background: var(--soft-teal); font-weight: 700; }
.profile-button svg { width: 16px; height: 16px; color: var(--blue); }
.profile-button:disabled { cursor: default; opacity: 0.72; }

[data-static-only] { display: none !important; }
html[data-deployment="static"] [data-static-only] { display: flex !important; }
.deployment-notice {
  align-items: flex-start;
  gap: 10px;
  max-width: 1220px;
  margin: 18px auto 0;
  border: 1px solid #b9d4f5;
  border-radius: 8px;
  padding: 11px 13px;
  color: #153b6b;
  background: #f1f7ff;
  font-size: 12px;
  line-height: 1.55;
}
.deployment-notice > svg { width: 18px; height: 18px; margin-top: 1px; color: var(--blue); flex: 0 0 auto; }
.deployment-notice > div { display: grid; gap: 2px; }
.help-button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--surface); font-size: 13px; font-weight: 650; }
.help-button:hover { color: var(--blue); border-color: var(--bright); background: var(--soft-blue); }
.help-button svg { width: 16px; height: 16px; }

.help-dialog { flex-direction: column; width: min(680px, calc(100vw - 32px)); max-height: min(82vh, 760px); border: 0; border-radius: 10px; padding: 0; color: var(--ink); background: var(--surface); box-shadow: 0 24px 70px rgba(15, 36, 73, 0.24); overflow: hidden; }
.help-dialog[open] { display: flex; }
.help-dialog::backdrop { background: rgba(24, 34, 53, 0.52); }
.help-dialog-head { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.help-dialog-head h2 { margin: 2px 0 0; font-size: 20px; }
.help-dialog-body { flex: 1 1 auto; min-height: 0; padding: 18px 22px 24px; overflow-y: auto; overscroll-behavior: contain; }
.help-dialog-body p.help-intro { margin: 0 0 4px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.help-dialog-body h3 { margin: 20px 0 8px; font-size: 13px; font-weight: 750; letter-spacing: 0.02em; text-transform: uppercase; color: var(--blue); }
.help-dialog-body ol, .help-dialog-body ul { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.65; }
.help-dialog-body li + li { margin-top: 6px; }
.help-dialog-body ul { list-style: none; padding-left: 4px; }
.help-dialog-body ul li { position: relative; padding-left: 16px; color: var(--muted); }
.help-dialog-body ul li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--teal); }
.help-dialog-body strong { color: var(--ink); }
.help-flows { display: grid; gap: 8px; }
.help-flow { display: grid; gap: 2px; margin: 0; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--soft-blue); font-size: 13.5px; line-height: 1.6; }
.help-flow strong { color: var(--blue); }
.help-flow span { color: var(--ink); }

.view { max-width: 1220px; margin: 0 auto; padding-top: 28px; }
.view[hidden] { display: none; }
.workspace-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.workspace-header h2 { margin: 0; font-size: 23px; letter-spacing: 0; }
.workspace-header p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.report-status-stack { display: grid; justify-items: end; gap: 7px; }
.readiness { display: flex; align-items: baseline; gap: 8px; min-width: 110px; justify-content: flex-end; }
.readiness-label { color: var(--muted); font-size: 12px; }
.readiness strong { color: var(--blue); font-size: 19px; }

.section-block { padding: 22px 0; border-top: 1px solid var(--line); }
.section-last { border-bottom: 1px solid var(--line); }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-header h3 { margin: 1px 0 0; font-size: 17px; letter-spacing: 0; }
.section-eyebrow { margin: 0; color: var(--bright); font-size: 11px; font-weight: 750; letter-spacing: 0; }

.state-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.state-ready { color: #09654f; background: var(--soft-teal); }
.state-muted { color: var(--muted); background: #edf1f7; }
.state-warning { color: #9a5b00; background: var(--soft-warning); }

.two-column-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.report-options-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.correlation-source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.correlation-source-grid > div { display: grid; align-content: start; gap: 12px; min-width: 0; }
.compact-dropzone { min-height: 96px; }
.lox-options { margin-top: 18px; }
.file-field, .field-label, .criteria-summary, .revision-field { display: grid; gap: 7px; min-width: 0; color: var(--muted); font-size: 13px; }
.assay-picker-summary { display: grid; grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.assay-group-field { max-width: 360px; }
.assay-group-field small { color: var(--muted); font-size: 12px; }
.assay-chip-panel { margin-top: 18px; border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: var(--surface); }
.assay-chip-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.assay-chip-heading strong { color: var(--ink); font-size: 14px; }
.assay-chip-heading span { color: var(--muted); font-size: 12px; font-weight: 700; }
.assay-alpha-filter { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.assay-alpha-button { min-width: 30px; min-height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; color: var(--muted); background: #f7f9fc; font-size: 11px; font-weight: 700; }
.assay-alpha-button:hover:not(:disabled) { border-color: var(--bright); color: var(--blue); background: var(--soft-blue); }
.assay-alpha-button[aria-pressed="true"] { border-color: var(--blue); color: #fff; background: var(--blue); }
.assay-alpha-button:disabled { cursor: not-allowed; opacity: 0.35; }
.assay-chip-list { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; max-height: 240px; overflow-y: auto; padding: 2px; }
.assay-choice-chip { border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; color: var(--ink); background: #f7f9fc; font-size: 12px; font-weight: 700; transition: border-color 140ms ease, color 140ms ease, background 140ms ease; }
.assay-choice-chip:hover:not(:disabled) { border-color: var(--bright); color: var(--blue); background: var(--soft-blue); }
.assay-choice-chip[aria-pressed="true"] { border-color: var(--blue); color: #fff; background: var(--blue); }
.assay-choice-chip:disabled { cursor: not-allowed; opacity: 0.5; }
.assay-chip-empty { width: 100%; margin: 18px 0; color: var(--muted); text-align: center; font-size: 13px; }
.assay-chip-hint { display: block; margin-top: 10px; color: var(--muted); font-size: 12px; }
.file-field > input, .revision-field > input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.file-field small, .revision-field small { min-height: 18px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.file-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  border: 1px solid var(--blue);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--blue);
  background: var(--surface);
  font-size: 13px;
  font-weight: 650;
}
.file-button svg { width: 15px; height: 15px; }
.file-field:hover .file-button, .revision-field:hover .file-button { background: var(--soft-blue); }
.criteria-summary { align-content: start; }
.criteria-summary strong { color: var(--ink); font-size: 16px; }
.criteria-summary small { color: var(--muted); font-size: 12px; }
.text-button { width: max-content; border: 0; padding: 0; color: var(--blue); background: transparent; font-size: 13px; font-weight: 650; }
.text-button:hover { text-decoration: underline; }

.protocol-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.check-row { display: flex; align-items: center; gap: 8px; min-height: 38px; color: var(--ink); font-size: 14px; }
.check-row input { width: 16px; height: 16px; accent-color: var(--bright); }
.report-checkbox-field { align-self: end; padding-bottom: 9px; }

.protocol-detail-option { margin-top: 12px; }
.protocol-detail-option .check-row { cursor: help; }

/* 마우스를 올리면 뜨는 안내창. 문장마다 줄을 나눠 읽기 쉽게 한다. */
.hint-host { position: relative; width: fit-content; max-width: 100%; }
.hint-icon { width: 15px; height: 15px; margin-left: 2px; color: var(--muted); flex: 0 0 auto; }
.hint-host:hover .hint-icon, .hint-host:focus-within .hint-icon { color: var(--bright); }
.hint-bubble {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 6px;
  width: max-content;
  max-width: min(460px, calc(100vw - 48px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 13.5px;
  line-height: 1.6;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms;
}
.hint-bubble::before, .hint-bubble::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 16px;
  border: 7px solid transparent;
}
.hint-bubble::before { border-bottom-color: var(--line); }
.hint-bubble::after { margin-bottom: -1px; border-bottom-color: var(--surface); }
.hint-bubble > span { display: block; }
.hint-host:hover .hint-bubble, .hint-host:focus-within .hint-bubble {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 평가 기본 정보: 2열 격자, 평가 목적만 전체 폭을 쓴다. */
.protocol-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; align-items: start; }
.protocol-info-grid > .field-label { align-content: start; }
/* 라벨을 반 줄 아래로 내려 위쪽 칸과 붙어 보이지 않게 한다. */
.protocol-info-grid > .field-label > span:first-child { margin-top: 9px; }
.protocol-purpose-field { grid-column: 1 / -1; }
.protocol-purpose-field textarea { resize: vertical; }
.protocol-period-inputs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.protocol-period-inputs input { min-width: 0; }
.protocol-period-separator { color: var(--muted); font-size: 13px; font-weight: 700; }

/* 프로토콜 본문 편집기는 기본으로 접어 두고 필요할 때만 펼친다. */
.protocol-template-details > .protocol-template-summary { margin-bottom: 0; cursor: pointer; list-style: none; }
.protocol-template-details[open] > .protocol-template-summary { margin-bottom: 16px; }
.protocol-template-summary::-webkit-details-marker { display: none; }
.protocol-template-summary:focus-visible { outline: 2px solid var(--bright); outline-offset: 3px; border-radius: 6px; }
.protocol-template-summary-side { display: inline-flex; align-items: center; gap: 10px; }
.protocol-template-chevron { width: 18px; height: 18px; color: var(--muted); transition: transform 0.15s ease; }
.protocol-template-details[open] .protocol-template-chevron { transform: rotate(180deg); }

.protocol-template-hint { margin: -6px 0 14px; color: var(--muted); font-size: 12px; }
.protocol-template-editor { display: grid; grid-template-columns: minmax(240px, 0.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.protocol-template-picker { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--surface); }
.protocol-template-picker-title { margin: 0 0 9px; color: var(--muted); font-size: 12px; font-weight: 700; }
.protocol-template-list { display: grid; gap: 5px; }
.protocol-template-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 7px 10px;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
}
.protocol-template-tab:hover { border-color: var(--line); background: var(--soft-blue); }
.protocol-template-tab.is-active { border-color: var(--bright); color: var(--blue); background: var(--soft-blue); }
.protocol-template-tab svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--bright); opacity: 0; }
.protocol-template-tab.is-edited svg { opacity: 1; }
.protocol-template-tab.is-unsupported { color: var(--muted); cursor: not-allowed; opacity: 0.6; }
.protocol-template-tab.is-unsupported:hover { border-color: transparent; background: transparent; }
.protocol-template-badge { flex: 0 0 auto; border-radius: 999px; padding: 2px 7px; color: var(--muted); background: #edf1f7; font-size: 11px; font-style: normal; font-weight: 700; }
.protocol-template-fields { display: grid; gap: 14px; min-width: 0; }
.protocol-template-fields textarea { min-height: 39px; line-height: 1.55; resize: vertical; font-family: inherit; font-size: 13px; }
.protocol-template-reference { margin-top: -2px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.protocol-template-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 16px; }
.protocol-template-actions .secondary-button { margin-right: auto; }
@media (max-width: 900px) {
  .protocol-template-editor { grid-template-columns: minmax(0, 1fr); }
}

.convert-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: end; margin-top: 18px; }
.field-label select, .field-label input, .field-label textarea, .search-field input, .data-table input {
  width: 100%;
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--surface);
}
.dropzone { position: relative; min-height: 112px; display: grid; place-items: center; align-content: center; gap: 5px; border: 1px dashed #afc3e8; border-radius: 8px; color: var(--muted); background: #f7fafe; text-align: center; transition: border-color 160ms ease, background 160ms ease; }
.dropzone:hover, .dropzone.is-dragging { border-color: var(--bright); background: var(--soft-blue); }
.dropzone input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.dropzone svg { width: 22px; height: 22px; color: var(--blue); }
.dropzone strong { color: var(--ink); font-size: 14px; }
.dropzone span { font-size: 12px; }
.primary-button, .secondary-button {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  padding: 9px 13px;
  font-weight: 700;
  font-size: 13px;
}
.primary-button { border: 1px solid var(--blue); color: #fff; background: var(--blue); }
.primary-button:hover:not(:disabled) { background: #0735a7; }
.primary-button:disabled { cursor: not-allowed; opacity: 0.45; }
.secondary-button { border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.secondary-button:hover { border-color: var(--bright); color: var(--blue); }
.primary-button svg, .secondary-button svg { width: 16px; height: 16px; }
.report-cancel-button { border-color: #e3aaa5; color: var(--danger); background: var(--surface); }
.report-cancel-button:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); background: #fff1f1; }
.report-cancel-button:disabled { cursor: wait; opacity: 0.55; }
.report-cancel-button[hidden] { display: none; }
.compact { min-height: 33px; padding: 6px 9px; }
.result-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line); border-left: 3px solid var(--bright); border-radius: 6px; background: var(--surface); font-size: 13px; }
.result-row > svg { width: 17px; height: 17px; color: var(--teal); flex: 0 0 auto; }
.result-row strong { min-width: 0; overflow-wrap: anywhere; }
.result-row span { color: var(--muted); margin-right: auto; }
.result-row .icon-button { margin-left: auto; }
.result-row .secondary-button { margin-left: auto; }

.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.assay-table-toolbar { align-items: flex-end; flex-wrap: nowrap; overflow-x: auto; }
.criteria-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.criteria-basis-field { width: 190px; text-align: left; }
.assay-bulk-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin: 0 0 12px; }
.assay-local-note { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 400; }
.assay-table-filters { display: flex; flex: 0 0 auto; flex-wrap: nowrap; align-items: flex-end; gap: 12px; }
.assay-table-filters .field-label { width: min(210px, 100%); }
.assay-table-toolbar .search-field { flex: 0 1 340px; min-width: 220px; margin-left: auto; }
.table-sort {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; border-radius: 4px; padding: 0; background: none;
  color: inherit; font: inherit; font-weight: 700; cursor: pointer;
}
.table-sort::after { content: "↕"; font-size: 11px; opacity: 0.4; }
.table-sort[data-direction="asc"]::after { content: "↑"; color: var(--bright); opacity: 1; }
.table-sort[data-direction="desc"]::after { content: "↓"; color: var(--bright); opacity: 1; }
.table-sort:hover:not(:disabled) { color: var(--blue); }
.table-sort:disabled { cursor: default; opacity: 0.55; }
.table-sort:focus-visible { outline: 2px solid var(--bright); outline-offset: 2px; }
.search-field { position: relative; display: block; width: min(340px, 100%); }
.search-field svg { position: absolute; width: 16px; height: 16px; left: 11px; top: 11px; color: var(--muted); }
.search-field input { padding-left: 34px; }
.data-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; min-width: 800px; font-size: 13px; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.data-table th { color: var(--muted); background: #f8fafe; font-weight: 700; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table input, .data-table select { min-height: 32px; border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; color: var(--ink); background: var(--surface); }
.data-table input[type="checkbox"] { width: 16px; min-height: 16px; accent-color: var(--bright); }
.data-table select { min-width: 100px; }
.data-table .table-empty-cell { height: 110px; color: var(--muted); text-align: center; }
.assay-table { min-width: 1180px; }
.criteria-table { min-width: 2960px; }
.assay-table-wrap { max-height: min(64vh, 640px); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.criteria-table-wrap { max-height: min(64vh, 640px); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.assay-table thead,
.criteria-table thead { position: sticky; top: 0; z-index: 3; box-shadow: 0 1px 0 var(--line); }
.assay-table .assay-name-column,
.criteria-table .assay-name-column {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 180px;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--line), 7px 0 10px -10px rgba(23, 53, 87, 0.8);
}
.assay-table thead .assay-name-column,
.criteria-table thead .assay-name-column { z-index: 4; background: #f8fafe; }
.criteria-table thead tr:first-child th[colspan],
.admin-assay-table thead tr:first-child th[colspan] { text-align: center; color: var(--blue); }
.criteria-table th[rowspan],
.admin-assay-table th[rowspan] { vertical-align: middle; }
.criteria-table .criteria-value-input { width: 112px; min-width: 112px; }
.criteria-table .criteria-source-input { width: 220px; min-width: 220px; }
.criteria-table tr.is-criteria-incomplete > td { background: var(--soft-blue); }
.assay-range-editor { display: flex; align-items: center; gap: 6px; }
.data-table .assay-range-input { width: 78px; min-width: 78px; }
.assay-reference-editor { display: grid; gap: 6px; }
.assay-reference-row { display: flex; align-items: center; gap: 6px; }
.assay-reference-row > span { width: 16px; color: var(--muted); font-size: 11px; font-weight: 700; }
.assay-interpretation-card { display: grid; gap: 6px; min-width: 250px; max-width: 380px; white-space: normal; }
.assay-interpretation-badge { justify-self: start; border-radius: 999px; padding: 3px 8px; color: var(--blue); background: var(--soft-blue); font-size: 11px; font-weight: 750; }
.assay-interpretation-badge.qualitative_cutoff { color: #087568; background: #e9f8f5; }
.assay-cutoff-rule { margin: 0; overflow-wrap: anywhere; white-space: pre-line; color: var(--ink); font-size: 12px; line-height: 1.55; }

.report-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.report-tab { border: 0; border-bottom: 2px solid transparent; padding: 9px 11px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 700; }
.report-tab:hover { color: var(--blue); }
.report-tab.is-active { border-bottom-color: var(--blue); color: var(--blue); }

/* 장비 / 시약 하위 탭: 상위 프로토콜 탭과 구분되도록 알약 형태로 표시. */
.report-subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 18px; }
.report-subtabs[hidden] { display: none; }
.report-subtab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--muted);
  background: var(--surface);
  font-size: 13px;
  font-weight: 650;
}
.report-subtab svg { width: 15px; height: 15px; flex: 0 0 auto; }
.report-subtab:hover { border-color: var(--bright); color: var(--blue); }
.report-subtab.is-active { border-color: var(--blue); color: var(--blue); background: var(--soft-blue); }

.empty-panel { display: grid; justify-items: center; gap: 8px; border: 1px dashed #afc3e8; border-radius: 8px; padding: 30px 20px; background: #f7fafe; text-align: center; }
.empty-panel > svg { width: 26px; height: 26px; color: var(--bright); }
.empty-panel strong { color: var(--ink); font-size: 14px; }
.empty-panel span { max-width: 520px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.empty-panel button { margin-top: 8px; }
.report-output-choice {
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfe;
}
.report-output-choice legend { padding: 0 6px; color: var(--ink); font-size: 14px; font-weight: 750; }
.report-output-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.report-output-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
}
.report-output-option:hover { border-color: var(--bright); }
.report-output-option.is-selected { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.report-output-option.is-disabled { cursor: not-allowed; opacity: 0.56; }
.report-output-option.is-disabled:hover { border-color: var(--line); }
.report-output-option input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--blue); flex: 0 0 auto; }
.report-output-option span { display: grid; gap: 3px; }
.report-output-option strong { color: var(--ink); font-size: 14px; }
.report-output-option small { color: var(--muted); font-size: 12px; }
.report-output-choice > p { margin: 10px 2px 0; color: var(--muted); font-size: 12px; }
.workflow { display: grid; grid-template-columns: auto minmax(18px, 1fr) auto minmax(18px, 1fr) auto minmax(18px, 1fr) auto; align-items: center; margin: 16px 0 4px; }
.workflow-step { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.workflow-step span { display: inline-grid; width: 24px; height: 24px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: var(--surface); font-weight: 700; }
.workflow-step.is-current, .workflow-step.is-done { color: var(--ink); }
.workflow-step.is-current span { border-color: var(--bright); color: #fff; background: var(--bright); }
.workflow-step.is-done span { border-color: var(--teal); color: #fff; background: var(--teal); }
.workflow-line { height: 1px; margin: 0 8px; background: var(--line); }
.report-source-card, .direct-report-source { margin-top: 18px; border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: #fbfcfe; }
.report-source-card { border-color: #c9d9f1; background: #f9fbff; }
.report-source-card h3, .direct-report-source h3 { margin: 2px 0 0; font-size: 16px; }
.report-source-intro { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.report-source-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 16px 0 0; padding: 0; list-style: none; }
.report-source-steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: 9px; min-width: 0; border: 1px solid var(--line); border-radius: 7px; padding: 11px; background: var(--surface); }
.report-source-steps li > span { display: inline-grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; color: #fff; background: var(--blue); font-size: 11px; font-weight: 750; }
.report-source-steps li > div { display: grid; gap: 4px; min-width: 0; }
.report-source-steps strong { color: var(--ink); font-size: 12px; }
.report-source-steps small { color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.report-dropzone { margin-top: 18px; }
.report-source-note, .direct-report-note { margin: 14px 0 0; border-radius: 6px; padding: 9px 11px; color: var(--muted); background: #eef4fd; font-size: 12px; line-height: 1.55; }
.direct-report-note { margin-bottom: 14px; background: #f1f4f8; }
.direct-report-source .revision-field { margin-top: 0; }
.dropzone:focus-within { border-color: var(--bright); box-shadow: 0 0 0 3px rgba(20, 130, 250, 0.18); }
.revision-field > input:focus-visible + .file-button { outline: 3px solid rgba(20, 130, 250, 0.3); outline-offset: 2px; }
.report-progress { display: grid; gap: 7px; margin-top: 16px; }
.report-progress > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.report-progress strong { color: var(--blue); }
.report-progress progress { width: 100%; height: 8px; accent-color: var(--bright); }
.inline-error { margin-top: 14px; border-left: 3px solid var(--danger); padding: 10px 12px; color: #8f1d20; background: #fff1f1; font-size: 13px; white-space: pre-wrap; }
.reference-options-intro { margin: -5px 0 14px; color: var(--muted); font-size: 13px; }
.reference-analysis-summary, .reference-direct-note { margin-bottom: 14px; border-radius: 6px; padding: 10px 12px; font-size: 13px; }
.reference-analysis-summary { color: var(--ink); background: var(--soft-blue); }
.reference-direct-note { border: 1px solid #f0d09c; color: #875100; background: var(--soft-warning); }
.reference-coi-block { margin-bottom: 16px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: var(--surface); }
.reference-coi-block details { margin: 4px 0 0 24px; color: var(--muted); font-size: 12px; }
.reference-coi-block summary { cursor: pointer; font-weight: 650; }
.reference-coi-block ul { margin: 7px 0 0; padding-left: 18px; }
.reference-split-controls { margin-top: 4px; }
.reference-split-hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.reference-sequence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 14px; }
.reference-candidate-files { display: grid; gap: 14px; margin-top: 18px; }
.reference-file-card { min-width: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.reference-file-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border-bottom: 1px solid var(--line); background: #f8fafe; }
.reference-file-heading strong { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.reference-file-heading span { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.reference-warning-list { margin: 0; padding: 9px 28px; border-bottom: 1px solid var(--line); color: #8f5a00; background: var(--soft-warning); font-size: 12px; }
.reference-candidate-header, .reference-candidate-row { display: grid; grid-template-columns: minmax(220px, 1.6fr) 80px minmax(130px, 0.8fr) 150px; align-items: center; gap: 10px; padding: 9px 13px; }
.reference-candidate-header { color: var(--muted); background: #fbfcfe; font-size: 11px; font-weight: 700; }
.reference-candidate-row { border-top: 1px solid var(--line); font-size: 12px; }
.reference-candidate-header + .reference-candidate-row { border-top: 0; }
.reference-candidate-name { min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-weight: 650; }
.reference-candidate-recognition { min-width: 0; overflow-wrap: anywhere; color: var(--muted); }
.reference-candidate-row select { width: 100%; min-height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; color: var(--ink); background: var(--surface); }
.reference-candidate-row.is-excluded { opacity: 0.48; }
.reference-candidate-empty { padding: 14px 13px; color: var(--muted); font-size: 12px; }
.review-summary { max-height: 360px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 6px; padding: 12px; color: var(--ink); background: #f8fafe; font: inherit; font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow: auto; overflow-wrap: anywhere; }
.artifact-list { display: grid; gap: 7px; margin-top: 8px; }
.artifact-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 42px; border-bottom: 1px solid var(--line); padding: 6px 2px; }
.artifact-item:last-child { border-bottom: 0; }
.artifact-item span { min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-size: 12px; font-weight: 650; }
.action-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.revision-field { margin-top: 14px; }

/* 시약 상관성: 인식된 검사 항목 칩 + X/Y 짝 지정 행 */
/* 장비군 선택: 기본 화살표 대신 오른쪽에서 조금 안쪽으로 들어온 화살표를 그린다. */
.device-select-field { position: relative; }
.field-label select.device-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%2365748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
}
.select-hint {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 6;
  margin: 0;
  border: 1px solid var(--bright);
  border-radius: 6px;
  padding: 8px 11px;
  color: var(--ink);
  background: var(--soft-blue);
  box-shadow: var(--shadow);
  font-size: 12px;
  line-height: 1.5;
}
.select-hint::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 16px;
  border: 6px solid transparent;
  border-bottom-color: var(--bright);
}

.reagent-items-hint { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.reagent-item-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.reagent-item-chip { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; color: var(--ink); background: #f7f9fc; font-size: 12px; font-weight: 650; }
.reagent-item-chip.is-qualitative { border-color: #f0d09c; color: #875100; background: var(--soft-warning); }
.reagent-pair-list { display: grid; gap: 10px; }
.reagent-pair-row { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 28px; align-items: end; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--surface); }
.reagent-pair-row .field-label { margin: 0; }
.reagent-pair-swap { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-bottom: 5px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--surface); }
.reagent-pair-swap:hover { color: var(--blue); border-color: var(--bright); background: var(--soft-blue); }
.reagent-pair-swap svg { width: 15px; height: 15px; }
.reagent-pair-row .final-file-remove { padding-bottom: 9px; }
.reagent-pair-actions { justify-content: space-between; }
.reagent-output-choice { margin-top: 18px; }

.empty-state { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 92px; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; font-size: 13px; }
.empty-state svg { width: 18px; height: 18px; }
.item-actions { display: flex; gap: 4px; }
.final-slots { display: grid; gap: 12px; }
.final-slot { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--surface); }
.final-slot-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.final-slot-title { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.final-slot-title strong { color: var(--ink); font-weight: 700; }
.final-slot-count { min-width: 22px; height: 20px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 10px; font-size: 11px; font-weight: 750; color: var(--muted); background: #edf1f7; }
.final-slot-count.has-files { color: #fff; background: var(--blue); }
.final-slot-attach { display: inline-flex; cursor: pointer; }
.final-slot-list { display: grid; gap: 6px; margin-top: 10px; }
.final-slot-empty { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.final-file-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; background: var(--page); font-size: 13px; }
.final-file-row > svg { width: 15px; height: 15px; color: var(--muted); flex: 0 0 auto; }
.final-file-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.final-file-remove { border: 0; padding: 2px; background: transparent; color: var(--muted); display: inline-grid; place-items: center; flex: 0 0 auto; }
.final-file-remove:hover { color: var(--danger); }
.final-file-remove svg { width: 15px; height: 15px; }
.final-unsorted { margin-top: 14px; padding: 12px 14px; border: 1px solid #f0d9a6; border-radius: 8px; background: var(--soft-warning); }
.final-unsorted-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: #784c00; font-size: 13px; }
.final-unsorted-head svg { width: 16px; height: 16px; flex: 0 0 auto; }
.final-unsorted .final-file-row { background: var(--surface); }
.final-unsorted-select { font: inherit; font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; background: var(--surface); color: var(--ink); flex: 0 0 auto; }
.final-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cover-artifact { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft-teal); font-size: 13px; }
.cover-artifact > svg { width: 18px; height: 18px; color: var(--teal); flex: 0 0 auto; }
.cover-artifact strong { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 650; }
.final-purpose-field { margin-top: 16px; }
.final-purpose-field textarea { resize: vertical; line-height: 1.5; }
.final-cover-option { margin-top: 12px; }
.blank-report-correlation-fields { margin-top: 18px; }
.cover-protocol-hint { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.cover-protocol-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cover-protocol-grid .check-row { align-items: flex-start; line-height: 1.45; }
.cover-protocol-grid .check-row input { margin-top: 2px; flex: 0 0 auto; }
.item-actions .icon-button { width: 30px; height: 30px; }

.toast { position: fixed; right: 22px; bottom: 22px; max-width: min(360px, calc(100vw - 44px)); padding: 11px 14px; border-radius: 6px; color: #fff; background: var(--ink); box-shadow: var(--shadow); font-size: 13px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 180ms ease, transform 180ms ease; z-index: 30; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

.macro-trust-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid #d8e2ec;
  border-radius: 6px;
  color: var(--muted);
  background: #f7f9fb;
  font-size: 12px;
  line-height: 1.55;
}

.macro-trust-note strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
}

.admin-login-dialog {
  width: min(430px, calc(100vw - 32px));
  border: 0;
  border-radius: 10px;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(15, 36, 73, 0.24);
}
.admin-login-dialog::backdrop { background: rgba(24, 34, 53, 0.52); }
.admin-login-dialog form { margin: 0; }
.admin-login-body { display: grid; gap: 14px; padding: 20px 22px 22px; }
.admin-login-body > p { margin: 0 0 2px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.admin-login-body .inline-error { margin-top: 0; }
.admin-editor { border-bottom: 1px solid var(--line); }
.admin-fieldset { margin: 0; border: 0; border-top: 1px solid var(--line); padding: 18px 0 2px; }
.admin-fieldset + .admin-fieldset { margin-top: 16px; }
.admin-fieldset legend { padding: 0 10px 0 0; color: var(--blue); font-size: 13px; font-weight: 750; }
.admin-fieldset-note { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.admin-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.admin-span-2 { grid-column: span 2; }
.admin-default-selection { grid-column: span 2; align-self: end; }
.admin-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.admin-assay-table { min-width: 3422px; }
.admin-assay-table .admin-criteria-value-cell { min-width: 112px; }
.admin-assay-table .admin-criteria-source-cell { min-width: 220px; }
.admin-table-actions { display: flex; gap: 6px; }
.admin-delete-button { border-color: #e3aaa5; color: var(--danger); }
.admin-delete-button:hover { border-color: var(--danger); color: var(--danger); background: #fff1f1; }

.warning-dialog {
  width: min(620px, calc(100vw - 32px));
  border: 0;
  border-radius: 10px;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(15, 36, 73, 0.24);
}
.warning-dialog::backdrop { background: rgba(24, 34, 53, 0.52); }
.warning-dialog form { padding: 22px; }
.warning-dialog-heading { display: flex; align-items: flex-start; gap: 12px; }
.warning-dialog-heading > svg { width: 24px; height: 24px; margin-top: 2px; color: #9a5b00; flex: 0 0 auto; }
.warning-dialog-heading h2 { margin: 2px 0 0; font-size: 19px; }
.warning-dialog > form > p, .warning-dialog ol { font-size: 13px; line-height: 1.65; }
.warning-dialog ol { margin: 14px 0; padding-left: 22px; }
.warning-dialog li + li { margin-top: 7px; }
.warning-dialog-caution { border-left: 3px solid #d99a2b; padding: 9px 11px; color: #784c00; background: var(--soft-warning); }
.warning-dialog-actions { display: flex; justify-content: flex-end; margin-top: 18px; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; width: 260px; transform: translateX(-102%); box-shadow: var(--shadow); transition: transform 180ms ease; }
  .sidebar.is-open { transform: translateX(0); }
  .menu-button { display: inline-grid; }
  .main { padding: 0 22px 34px; }
}

@media (max-width: 720px) {
  .main { padding: 0 16px 28px; }
  .deployment-notice { margin: 14px 0 0; }
  .topbar { min-height: 72px; }
  .profile-button span { display: none; }
  .workspace-header, .section-header { align-items: flex-start; flex-direction: column; }
  .table-toolbar { align-items: stretch; flex-direction: column; }
  .assay-table-toolbar { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: end; }
  .assay-table-toolbar .assay-table-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assay-table-toolbar .assay-table-filters .field-label { width: auto; }
  .assay-table-toolbar .search-field { width: 100%; min-width: 0; margin-left: 0; }
  .assay-bulk-actions { justify-content: flex-start; }
  .workspace-header { gap: 10px; }
  .report-status-stack { justify-items: start; }
  .readiness { justify-content: flex-start; }
  .two-column-form, .assay-picker-summary, .report-options-grid, .report-output-options, .correlation-source-grid, .convert-controls, .protocol-grid, .protocol-info-grid { grid-template-columns: 1fr; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .admin-span-2, .admin-default-selection { grid-column: auto; }
  .report-source-steps { grid-template-columns: 1fr; }
  .reagent-pair-row { grid-template-columns: minmax(0, 1fr) 28px; }
  .reagent-pair-swap { grid-column: 2; }
  .reagent-pair-row .field-label { grid-column: 1; }
  .reagent-pair-row .final-file-remove { grid-row: 1; grid-column: 2; }
  .reference-sequence-grid { grid-template-columns: 1fr; }
  .reference-candidate-header { display: none; }
  .reference-candidate-row { grid-template-columns: minmax(0, 1fr) 72px; }
  .reference-candidate-recognition { grid-column: 1; }
  .reference-candidate-row select { grid-column: 2; grid-row: 1 / span 2; }
  .workflow { grid-template-columns: 1fr; gap: 8px; }
  .workflow-line { width: 1px; height: 16px; margin: -2px 0 -2px 12px; }
  .workflow-step { font-size: 13px; }
  .final-slot-head { flex-wrap: wrap; }
}
