/* ===== Tokens ===== */
:root {
  --color-primary:        #1976d2;
  --color-primary-dark:   #1565c0;
  --color-primary-soft:   #e8f1fb;
  --color-primary-50:     #f3f8fd;

  --color-success:        #16a34a;
  --color-success-soft:   #e7f6ec;

  --color-danger:         #dc2626;
  --color-danger-soft:    #fdecec;

  --color-warning:        #b45309;
  --color-warning-soft:   #fef4e2;

  --color-neutral:        #64748b;
  --color-neutral-soft:   #eef0f3;
  --color-neutral-strong: #334155;

  --color-bg:             #f4f6f9;
  --color-surface:        #ffffff;
  --color-border:         #e5e9ef;
  --color-border-strong:  #d6dbe3;

  --color-text:           #1f2937;
  --color-text-muted:     #6b7280;
  --color-text-caption:   #9ca3af;

  --side-nav-w:           248px;
  --sub-nav-w:            248px;
  --radius:               8px;
  --radius-lg:            12px;
  --shadow-sm:            0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md:            0 6px 18px rgba(15, 23, 42, 0.10);
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); }
button { font-family: inherit; }

.app-shell {
  display: grid;
  grid-template-columns: var(--side-nav-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* ===== Side nav (primary product rail — unchanged) ===== */
.side-nav {
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 16px;
}
.brand-mark { color: var(--color-success); font-size: 20px; display: inline-flex; }
.account-chip {
  display: flex; gap: 10px; align-items: center;
  margin: 0 12px 10px; padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fafbfd;
}
.account-chip .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--color-primary-soft); color: var(--color-primary-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.account-chip .hello { font-size: 12px; font-weight: 600; }
.account-chip .acct  { font-size: 11px; color: var(--color-text-muted); }

.nav-search { position: relative; margin: 0 12px 10px; }
.nav-search i {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--color-text-caption);
}
.nav-search input {
  width: 100%;
  padding: 7px 10px 7px 30px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
}
.nav-search input:focus { outline: none; border-color: var(--color-primary); }

.nav-list { flex: 1; overflow-y: auto; padding: 4px 8px 12px; scrollbar-width: thin; }
.nav-list::-webkit-scrollbar { width: 6px; }
.nav-list::-webkit-scrollbar-thumb { background: #d6dbe3; border-radius: 3px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  color: var(--color-text); font-size: 13px;
  position: relative; margin: 1px 0;
}
.nav-item i { color: var(--color-text-muted); font-size: 15px; }
.nav-item .ext, .nav-item .chev {
  margin-left: auto; font-size: 11px; color: var(--color-text-caption);
}
.nav-item:hover { background: #f1f4f9; }
.nav-item.active {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-weight: 600;
}
.nav-item.active i { color: var(--color-primary-dark); }
.nav-item.active::before {
  content: "";
  position: absolute; left: -8px; top: 6px; bottom: 6px; width: 3px;
  background: var(--color-primary);
  border-radius: 0 3px 3px 0;
}
.nav-section {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--color-text-caption);
  padding: 14px 12px 6px;
  text-transform: uppercase;
}
.pill-new {
  margin-left: auto;
  background: var(--color-success-soft);
  color: var(--color-success);
  border-radius: 999px;
  font-size: 10px; padding: 2px 7px; font-weight: 700;
}
.side-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-top: 1px solid var(--color-border);
  background: #fafbfd;
}
.lang-btn, .collapse-btn {
  border: none; background: transparent;
  color: var(--color-text-muted);
  font-size: 12px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 6px; border-radius: 4px;
}
.lang-btn:hover, .collapse-btn:hover { background: #eef1f6; color: var(--color-text); }

/* Desktop manual collapse (same visual behavior as narrow breakpoint rail). */
/* Grid items default to min-width:auto, which blocks shrinking — force the rail width. */
.app-shell.side-collapsed {
  grid-template-columns: 64px minmax(0, 1fr);
}
.app-shell.side-collapsed .side-nav {
  min-width: 0;
  max-width: 64px;
  width: 100%;
  box-sizing: border-box;
}
.app-shell.side-collapsed .side-nav .brand-text,
.app-shell.side-collapsed .side-nav .account-chip,
.app-shell.side-collapsed .side-nav .nav-search,
.app-shell.side-collapsed .side-nav .nav-item span,
.app-shell.side-collapsed .side-nav .nav-item .ext,
.app-shell.side-collapsed .side-nav .nav-item .chev,
.app-shell.side-collapsed .side-nav .pill-new,
.app-shell.side-collapsed .side-nav .nav-section,
.app-shell.side-collapsed .side-nav .side-foot .lang-btn { display: none; }
.app-shell.side-collapsed .side-nav .brand {
  justify-content: center;
  padding: 14px 8px;
}
.app-shell.side-collapsed .side-nav .nav-item { justify-content: center; }
.app-shell.side-collapsed .side-nav .side-foot { justify-content: center; padding: 10px 8px; }
.app-shell.side-collapsed .side-nav .collapse-btn { font-size: 0; padding: 6px; }
.app-shell.side-collapsed .side-nav .collapse-btn i { font-size: 14px; transform: rotate(180deg); }

/* ===== Main / stage tabs ===== */
.main-area { min-width: 0; background: var(--color-bg); display: flex; flex-direction: column; }
.stage-tabs {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 14px 28px 0;
  position: sticky; top: 0; z-index: 5;
}
.stage-tabs .crumb {
  font-size: 12px; color: var(--color-text-caption); margin-bottom: 6px;
}
.tab-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 4px; overflow-x: auto;
}
.tab-list a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}
.tab-list a:hover { color: var(--color-text); }
.tab-list a.active {
  color: var(--color-primary-dark);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}
.tab-list a.disabled { color: var(--color-text-caption); cursor: not-allowed; }
.tab-list a.disabled:hover { color: var(--color-text-caption); }

/* ===== Module body: sub-nav + content ===== */
.module-body {
  display: grid;
  grid-template-columns: var(--sub-nav-w) 1fr;
  flex: 1;
  min-height: 0;
}

/* ===== Sub-nav ===== */
.sub-nav {
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 56px; /* sits under stage-tabs */
  max-height: calc(100vh - 56px);
  overflow: hidden;
}
.sn-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--color-border);
}
.sn-eyebrow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-caption);
  font-weight: 700;
  margin-bottom: 2px;
}
.sn-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}
.sn-tree {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px 20px;
  scrollbar-width: thin;
}
.sn-tree::-webkit-scrollbar { width: 6px; }
.sn-tree::-webkit-scrollbar-thumb { background: #d6dbe3; border-radius: 3px; }

.sn-group-head {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-caption);
  padding: 14px 10px 4px;
  font-weight: 700;
}
.sn-group-head:first-child { padding-top: 2px; }

.sn-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--color-text);
  font-size: 13px;
  text-decoration: none;
  margin: 1px 0;
  cursor: pointer;
  line-height: 1.3;
}
.sn-item:hover { background: #f1f4f9; color: var(--color-text); }
.sn-item.active {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-weight: 600;
}
.sn-item.active .dot { box-shadow: 0 0 0 3px #fff; }
.sn-item.not-used { color: var(--color-text-muted); }
.sn-item .dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
  background: transparent;
  border: 1.5px solid transparent;
}
.sn-item .dot.complete       { background: var(--color-success); }
.sn-item .dot.incomplete     { background: var(--color-danger); }
.sn-item .dot.not_applicable  { background: var(--color-text-caption); }
.sn-item .dot.not_used        { background: transparent; border-color: var(--color-border-strong); opacity: 0.5; }
.sn-item .label { flex: 1; min-width: 0; }

/* ===== Module content ===== */
.module-content {
  min-width: 0;
  padding: 28px 36px 80px;
  max-width: 1000px;
  width: 100%;
}

.module-hero { margin-bottom: 22px; }
.module-hero--split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.module-hero-main { flex: 1; min-width: 0; }
.module-back {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--color-text-muted);
  background: transparent; border: none; padding: 0;
  cursor: pointer; margin-bottom: 8px;
}
.module-back:hover { color: var(--color-primary); }
.module-title-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.module-title {
  font-size: 22px; font-weight: 700; margin: 0;
}
.module-subtitle {
  font-size: 13px; color: var(--color-text-muted);
  margin: 8px 0 0; max-width: 680px; line-height: 1.55;
}

/* ===== Status badges ===== */
.badge-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  font-size: 11px; font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-status .dot { width: 6px; height: 6px; border-radius: 50%; }
.badge-complete       { background: var(--color-success-soft); color: #0e7c39; border-color: #c6ebd3; }
.badge-complete .dot       { background: var(--color-success); }
.badge-incomplete     { background: var(--color-danger-soft); color: #a31818; border-color: #f3c5c5; }
.badge-incomplete .dot     { background: var(--color-danger); }
.badge-not_used {
  background: var(--color-neutral-soft); color: var(--color-neutral-strong); border-color: #d8dde6;
}
.badge-not_used .dot { background: var(--color-neutral); }
.badge-not_applicable { background: #f5f6f8; color: var(--color-text-caption); border-color: #e5e8ee; }
.badge-not_applicable .dot { background: var(--color-text-caption); }

/* ===== Section blocks (modality / workflow / access) ===== */
.section-block { margin-bottom: 24px; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 14px;
  margin-bottom: 10px;
}
.section-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.section-help {
  font-size: 12px; color: var(--color-text-caption);
}
.section-help-modality {
  font-weight: 600;
  color: var(--color-text);
}

/* ===== Modality picker on the overview ===== */
.modality-picker {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.modality-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.12s;
}
.modality-row:last-child { border-bottom: none; }
.modality-row:hover { background: #fafbfd; }
.modality-row:not(.on) { color: var(--color-text-muted); }
.modality-row:not(.on) .name { color: var(--color-text); }

.mr-toggle {
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  margin: 0;
  flex: 1;
  min-width: 0;
}
.mr-toggle input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer; margin: 0;
  flex-shrink: 0;
}
.mr-toggle .name { font-weight: 600; font-size: 14px; }
.mr-toggle .desc { font-size: 12.5px; color: var(--color-text-muted); margin-top: 2px; }

.mr-right {
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0;
}
.mr-right .muted { font-size: 12px; color: var(--color-text-caption); }

.open-link {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: 12px; font-weight: 500;
  color: var(--color-primary);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
}
.open-link:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}
.open-link i { font-size: 12px; }

/* ===== Workflow question rows ===== */
.question-list {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.question-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
}
.question-row:last-child { border-bottom: none; }
.question-list--embedded {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0;
}
.question-row--rv-nested {
  background: #f8fafc;
  padding-left: 22px;
  border-left: 3px solid var(--color-primary-soft);
  margin: 0;
}
.question-row .q-text { flex: 1; min-width: 0; }
.question-row .q {
  font-size: 13.5px; font-weight: 500; line-height: 1.4;
  color: var(--color-text);
}
.question-row .subq {
  font-size: 12px; color: var(--color-text-caption);
  margin-top: 4px;
}
.q-right {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}

.yn-group {
  display: inline-flex;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.yn-btn {
  background: transparent; border: none;
  padding: 6px 14px;
  font-size: 12.5px; font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.yn-btn + .yn-btn { border-left: 1px solid var(--color-border); }
.yn-btn:hover:not(.active) { background: #f3f5f9; color: var(--color-text); }
.yn-btn.active {
  background: var(--color-primary);
  color: #fff;
}

/* ===== Switch (Used toggle) ===== */
.used-switch {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--color-text-muted);
  cursor: pointer; user-select: none;
  margin: 0;
}
.used-switch input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 34px; height: 20px; border-radius: 999px;
  background: #d6dbe3;
  position: relative; cursor: pointer;
  transition: background 0.15s;
  margin: 0;
}
.used-switch input[type="checkbox"]:checked { background: var(--color-primary); }
.used-switch input[type="checkbox"]::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff; border-radius: 50%;
  transition: transform 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.used-switch input[type="checkbox"]:checked::after { transform: translateX(14px); }

/* ===== Sub-workflow page ===== */
.use-toggle-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 22px;
}
.use-toggle-panel .label { font-size: 13px; font-weight: 600; }
.use-toggle-panel .help  { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }

.note-banner {
  display: flex; gap: 10px;
  align-items: flex-start;
  padding: 10px 14px;
  background: #fbf7e8;
  border: 1px solid #f1d9a4;
  border-radius: var(--radius);
  color: #7a5a0e;
  font-size: 12.5px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.note-banner i { margin-top: 2px; }

/* Home collection KB video + setup cards */
.hc-video-section {
  overflow: hidden;
}
.hc-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.hc-video-grid--single {
  grid-template-columns: minmax(0, 1fr);
}
.hc-video-grid--single .hc-video-card {
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  grid-template-rows: auto;
}
.hc-video-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  align-items: stretch;
  background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
  border: 1px solid #d9e8fb;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(20, 63, 112, 0.08);
}
.hc-video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(24, 95, 173, 0.22), rgba(19, 175, 135, 0.14)),
    #0f172a;
  aspect-ratio: 16 / 9;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}
.hc-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.hc-video-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 4px 2px 2px;
}
.hc-video-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.hc-video-copy h2 {
  font-size: 20px;
  line-height: 1.2;
  margin: 0 0 8px;
}
.hc-video-copy p {
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 14px;
}
.billing-eligibility-partner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.billing-eligibility-partner-card {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 128px;
  border-radius: 16px;
  border: 1px solid #d9e8fb;
  background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
  box-shadow: 0 12px 30px rgba(20, 63, 112, 0.08);
  padding: 18px;
}
.billing-eligibility-partner-mark {
  min-width: 138px;
  text-align: center;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 14px;
}
.billing-eligibility-partner-mark--waystar {
  background: #0f2b6b;
  color: #fff;
}
.billing-eligibility-partner-mark--pverify {
  background: #0d8f70;
  color: #fff;
}
.billing-eligibility-partner-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.hc-guide-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-dark);
  background: var(--color-primary-soft);
  margin-bottom: 12px;
}
.hc-guide-step {
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.hc-guide-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hc-guide-chips span {
  border-radius: 999px;
  background: #f3f6fb;
  border: 1px solid #dfe7f1;
  color: #506070;
  font-size: 11px;
  padding: 3px 8px;
}
.hc-config-list {
  gap: 12px;
}
.hc-config-card {
  align-items: stretch;
}
.hc-config-card .main {
  min-width: 0;
}
.hc-config-detail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #dfe7f1;
}
.hc-config-kicker {
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.hc-config-detail p {
  color: var(--color-text);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 10px;
}
.appt-doc-grid {
  display: grid;
  gap: 16px;
}
.appt-doc-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
  gap: 16px;
  align-items: stretch;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.appt-doc-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.appt-doc-step {
  color: var(--color-primary-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.appt-doc-copy h3 {
  font-size: 17px;
  margin: 0 0 8px;
}
.appt-doc-copy p {
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}
.appt-doc-shot {
  margin: 0;
  border-radius: 14px;
  border: 1px solid #dfe7f1;
  overflow: hidden;
  background: #f8fafc;
}
.appt-doc-shot img {
  display: block;
  width: 100%;
  height: auto;
}
.appt-doc-shot--qc-hero {
  border-radius: 16px;
  border: 1px solid #d9e8fb;
  background: #f8fbff;
  box-shadow: 0 10px 24px rgba(20, 63, 112, 0.08);
}
.appt-doc-card--qc-approval-shot {
  grid-template-columns: 1fr;
}
.appt-doc-card--qc-approval-shot .appt-doc-shot {
  max-height: none;
}
.appt-doc-card--qc-approval-shot .appt-doc-shot img {
  width: 100%;
  height: auto;
}
.aa-node .dwv-config-shot {
  margin-top: 12px;
}
.aa-node .dwv-config-shot figcaption {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--color-text-muted);
  border-top: 1px solid #dfe7f1;
  background: #fff;
}
@media (max-width: 900px) {
  .hc-video-grid,
  .billing-eligibility-partner-grid,
  .hc-video-grid--single .hc-video-card {
    grid-template-columns: 1fr;
  }
  .appt-doc-card {
    grid-template-columns: 1fr;
  }
}

/* Subtle per-modality release notes (expandable, top-right of module hero) */
.module-updates-wrap {
  flex-shrink: 0;
  align-self: flex-start;
}
.module-updates {
  position: relative;
  font-size: 12px;
}
.module-updates-summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  color: var(--color-text-muted);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.module-updates-summary::-webkit-details-marker { display: none; }
.module-updates-summary::before {
  content: "";
  display: inline-block;
  width: 0.35em;
  height: 0.35em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  margin-right: 2px;
  opacity: 0.65;
  transition: transform 0.15s;
}
.module-updates[open] > .module-updates-summary::before {
  transform: rotate(45deg);
  margin-top: 2px;
}
.module-updates-summary:hover {
  background: var(--color-neutral-soft);
  color: var(--color-text);
  border-color: var(--color-border);
}
.module-updates-summary i.bi-journal-text { font-size: 13px; opacity: 0.75; }
.module-updates-badge {
  font-size: 10px;
  font-weight: 700;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}
.module-updates-panel {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 6px;
  width: min(340px, calc(100vw - 48px));
  max-height: min(380px, 55vh);
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 10px 12px 12px;
  z-index: 20;
}
.module-updates-source {
  font-size: 11px;
  color: var(--color-text-caption);
  margin: 0 0 8px;
  line-height: 1.4;
}
.module-updates-source a { font-weight: 500; }
.module-updates-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.module-updates-item {
  padding: 8px 0;
  border-top: 1px solid var(--color-border);
}
.module-updates-item:first-child { border-top: none; padding-top: 2px; }
.module-updates-item-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
}
.module-updates-item-link:hover { color: var(--color-primary); }
.module-updates-item-link i.bi-box-arrow-up-right {
  font-size: 11px;
  opacity: 0.45;
  flex-shrink: 0;
}
.module-updates-item-period {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-caption);
  margin-top: 2px;
}
.module-updates-item-hint {
  font-size: 11px;
  color: var(--color-text-muted);
  margin: 4px 0 0;
  line-height: 1.4;
}

.configs-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.config-list { display: flex; flex-direction: column; gap: 8px; }
.config-row {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}
.config-row .name {
  font-weight: 600; font-size: 14px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.config-row .req-star {
  color: var(--color-danger); font-weight: 700;
}
.config-row .desc {
  font-size: 12.5px; color: var(--color-text-muted);
  margin-top: 4px; line-height: 1.5;
}
.config-row .meta {
  font-size: 12px; color: var(--color-text-caption);
  margin-top: 8px;
  display: flex; flex-wrap: wrap; column-gap: 14px; row-gap: 4px;
}
.config-row .meta > span { display: inline-flex; align-items: center; gap: 5px; }
.config-row .meta i { font-size: 11px; }
.config-row .actions {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.config-row .actions .btn { font-size: 12px; padding: 4px 10px; }
.config-row .actions .btn-link { padding: 0; }

/* Report Validation workflow blocks (checkbox + meaning + open) */
.rv-workflow-card .mr-toggle { align-items: flex-start; }
.rv-workflow-card .mr-toggle input[type="checkbox"] { margin-top: 3px; }
.rv-workflow-card .name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rv-workflow-card.on { border-color: #cfe0ff; background: #fbfdff; }
.rv-next-step-flow {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  padding: 14px 16px;
}
.rv-next-step-node {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fafbfd;
  padding: 10px 12px;
}
.rv-next-step-node--start {
  background: var(--color-primary-50);
  border-color: #c8dcfb;
}
.rv-next-step-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}
.rv-next-step-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  cursor: pointer;
}
.rv-next-step-choice input[type="radio"] {
  width: 14px;
  height: 14px;
  margin: 0;
}
.rv-next-step-choice .rv-next-step-title {
  margin-bottom: 0;
}
.rv-next-step-sub {
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
}
.rv-next-step-tag {
  display: inline-block;
  margin-bottom: 7px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}
.rv-next-step-tag--signed {
  background: #e9f2ff;
  color: #1453b2;
  border-color: #c8d9fb;
}
.rv-next-step-tag--completed {
  background: #e7f6ec;
  color: #108045;
  border-color: #c8e8d2;
}
.rv-next-step-tag--dispatch {
  background: #0b6a2f;
  color: #ffffff;
  border-color: #095627;
}
.rv-next-step-arrows {
  display: flex;
  justify-content: center;
  gap: 18px;
  font-size: 18px;
  color: var(--color-text-caption);
  margin: 10px 0;
}
.rv-next-step-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.rv-bulk-release-flow {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(260px, 1.3fr) auto minmax(260px, 1.3fr);
  gap: 10px;
  align-items: stretch;
}
.rv-bulk-release-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fafbfd;
  padding: 10px 12px;
}
.rv-bulk-release-card--instrument {
  background: var(--color-primary-50);
  border-color: #c8dcfb;
}
.rv-bulk-release-step {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-text-caption);
  margin-bottom: 4px;
}
.rv-bulk-release-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}
.rv-bulk-release-sub {
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
}
.rv-bulk-release-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-caption);
  font-size: 18px;
  padding: 0 2px;
}
.rv-bulk-release-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.rv-bulk-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}
.rv-bulk-chip--released {
  background: #e8f7ef;
  color: #0f7f43;
  border-color: #c5ead5;
}
.rv-bulk-chip--waiting {
  background: #fff6e5;
  color: #9a5b00;
  border-color: #f0d9aa;
}
.rv-bulk-release-status {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
}
.rv-bulk-release-status--waiting { color: #9a5b00; }
.rv-bulk-release-status--released { color: #0f7f43; }

@media (max-width: 980px) {
  .rv-bulk-release-flow {
    grid-template-columns: 1fr;
  }
  .rv-bulk-release-arrow {
    transform: rotate(90deg);
    height: 18px;
  }
}

.aa-setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.aa-flow-board {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  padding: 14px 16px;
}
.aa-rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.aa-node {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fafbfd;
  padding: 10px 12px;
}
.aa-node--setup {
  background: #f5f8ff;
  border-color: #d6e2fb;
}
.aa-step {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-text-caption);
  margin-bottom: 4px;
}
.aa-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}
.aa-sub {
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
}
.aa-list,
.aa-ordered {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.aa-node--stack { grid-column: 1 / -1; }
.aa-result {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #c5ead5;
  background: #e8f7ef;
  border-radius: 8px;
  padding: 8px 10px;
}
.aa-result--ok { color: #0f7f43; }
.aa-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.aa-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 600;
}
.aa-chip--ok {
  background: #e8f7ef;
  color: #0f7f43;
  border-color: #c5ead5;
}
.aa-chip--no {
  background: #fdecef;
  color: #a31818;
  border-color: #f4c5cf;
}
@media (max-width: 980px) {
  .aa-rules-grid { grid-template-columns: 1fr; }
  .aa-node--stack { grid-column: auto; }
}

/* Ordering fields guide — wider concept grid on large screens */
@media (min-width: 1100px) {
  .aa-rules-grid.aa-rules-grid--ordering-fields {
    grid-template-columns: repeat(3, minmax(200px, 1fr));
  }
}

@media (min-width: 1100px) {
  .aa-rules-grid.aa-rules-grid--accession-basic {
    grid-template-columns: repeat(3, minmax(240px, 1fr));
  }
}

@media (min-width: 900px) {
  .aa-rules-grid.aa-rules-grid--sample-vial,
  .aa-rules-grid.aa-rules-grid--dept-wise,
  .aa-rules-grid.aa-rules-grid--batch-transfer {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

.aa-flow-board--sample-vial {
  margin-top: 4px;
}

.aa-flow-board--dept-wise {
  margin-top: 8px;
}

.aa-flow-board--batch-transfer {
  margin-top: 8px;
}

.accession-batch-sheet-note {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
}

.accession-batch-sheet-hint {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.aa-setup-actions.aa-setup-actions--wrap {
  flex-wrap: wrap;
  gap: 8px;
}

@media (min-width: 900px) {
  .aa-rules-grid.aa-rules-grid--remote-print {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

.aa-flow-board--remote-print {
  margin-top: 8px;
}

.accession-dept-wise-intro-lead {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-primary);
}

.aa-node--accession-concept .aa-sub {
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.45;
}

.aa-node--accession-concept-compact {
  padding: 12px 14px;
}

.aa-node--accession-concept-compact .aa-title {
  font-size: 14px;
  margin-bottom: 6px;
}

.aa-node--eligibility-highlight {
  padding: 16px 18px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
  border-color: #cfe0fb;
  box-shadow: 0 8px 20px rgba(20, 63, 112, 0.08);
}

.aa-node--eligibility-highlight .aa-title {
  font-size: 16px;
}

.aa-node--eligibility-highlight .aa-sub {
  font-size: 13px;
  line-height: 1.55;
}

.aa-node--eligibility-highlight .aa-chip-row--accession-tight .aa-chip {
  font-size: 11.5px;
  padding: 5px 9px;
}

.aa-node--eligibility-verify-table {
  padding: 16px 18px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
  border-color: #cfe0fb;
  box-shadow: 0 8px 20px rgba(20, 63, 112, 0.08);
}

.aa-node--eligibility-verify-table .aa-title {
  font-size: 16px;
}

.aa-node--eligibility-verify-table .aa-sub {
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 10px;
}

.eligibility-verify-table-wrap {
  overflow-x: auto;
}

.eligibility-verify-table th {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.eligibility-verify-table td {
  font-size: 12px;
  line-height: 1.45;
  vertical-align: top;
}

.aa-chip-row--accession-tight {
  margin-top: 8px;
}

.aa-chip-row--accession-tight .aa-chip {
  font-size: 11px;
  padding: 4px 8px;
}

.accession-basic-sub-hint {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.section-block--accession-vial-intro .accession-vial-intro-lead {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-primary);
}

.accession-vial-intro-bullets {
  margin: 0 0 12px;
}

.accession-vial-intro-release {
  margin: 0;
  font-size: 13px;
}

.accession-vial-intro-release a {
  text-decoration: none;
}

.accession-vial-intro-release a:hover {
  text-decoration: underline;
}

.accession-remote-print-intro-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-primary);
}

/* Barcode format — example cards & illustrative strips */
.bc-format-examples .bc-token-reference {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bc-example-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 900px) {
  .bc-example-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
}

.bc-example-card {
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.bc-example-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
}

.bc-example-use {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--color-text-secondary);
}

.bc-pattern-panel {
  margin-top: 14px;
  padding: 12px;
  background: var(--color-neutral-soft, #f8fafc);
  border-radius: 8px;
}

.bc-panel-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-caption);
  margin-bottom: 6px;
}

.bc-pattern-code {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  word-break: break-word;
}

.bc-token-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bc-token-pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #e0e7ff;
  color: #3730a3;
}

.bc-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  font-size: 12px;
}

.bc-meta-row code {
  font-size: 12px;
  padding: 1px 6px;
  background: #fff;
  border-radius: 4px;
}

.bc-label-preview {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fafafa;
}

.bc-strip {
  margin: 8px 0 4px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.bc-strip-inner {
  display: flex;
  align-items: stretch;
  height: 36px;
}

.bc-bar {
  flex-shrink: 0;
  display: block;
  height: 100%;
}

.bc-bar--b {
  background: #0f172a;
}

.bc-bar--w {
  background: #fff;
}

.bc-strip-caption {
  font-size: 11px;
  color: var(--color-text-caption);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bc-strip-caption code {
  font-size: 12px;
  color: var(--color-text-primary);
}

.bc-strip-hint {
  font-style: italic;
}

.bc-label-lines {
  margin-top: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #111827;
}

.bc-label-line--strong {
  font-weight: 600;
}

.bc-example-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.aa-node--fdc-intro {
  margin-bottom: 12px;
}

.fdc-examples-hint {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text-caption);
  margin: 8px 0 4px;
}

.ordering-fields-guide-row.on {
  border-color: #cfe0ff;
  background: #fbfdff;
}

.fdc-subwf-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-caption);
  background: var(--color-neutral-soft);
  border-radius: 999px;
  vertical-align: middle;
}

.ordering-fields-subwf-row .name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.ordering-reg-field-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 2px 8px;
}

.ordering-reg-field-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fafbfd;
  cursor: pointer;
  margin: 0;
}

.ordering-reg-field-check input {
  margin-top: 3px;
}

.ordering-reg-field-check span {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

.fdc-ta-list-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

/* ===== QC / Westgard flow board (prototype) ===== */
.wg-flow-board {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fafbfd 0%, var(--color-surface) 55%);
  padding: 14px 16px;
}
.wg-flow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}
.wg-node {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  padding: 10px 12px;
  min-width: min(100%, 200px);
  flex: 1 1 180px;
}
.wg-node--ingest {
  background: var(--color-primary-50);
  border-color: #c8dcfb;
}
.wg-node--engine {
  background: #f6f7fb;
}
.wg-node--pass {
  border-color: #c5ead5;
  background: #f4fbf7;
}
.wg-node--warn {
  border-color: #f1ddb1;
  background: #fffbf4;
}
.wg-node--block {
  border-color: #f4c5cf;
  background: #fff8f9;
}
.wg-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-caption);
  margin-bottom: 4px;
}
.wg-node-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}
.wg-node-sub {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
}
.wg-node-foot {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
}
.wg-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wg-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
}
.wg-pill--accent {
  border-color: #b8d4ff;
  background: #e8f0ff;
  color: #2158ad;
}
.wg-pill--on {
  border-color: #c5ead5;
  background: #e8f7ef;
  color: #0f7f43;
}
.wg-pill--off {
  border-color: #e5e9ef;
  background: #f1f3f6;
  color: var(--color-text-caption);
  text-decoration: line-through;
  text-decoration-color: rgba(0, 0, 0, 0.25);
}
.wg-metric-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--color-text-muted);
}
.wg-metric-label {
  font-weight: 600;
  color: var(--color-text);
}
.wg-metric-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
}
.wg-metric-unit {
  font-weight: 600;
  color: var(--color-text-muted);
}
.wg-metric-hint {
  font-size: 11px;
  color: var(--color-text-caption);
}
.wg-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-caption);
  font-size: 20px;
  font-weight: 600;
  flex: 0 0 auto;
  min-width: 28px;
}
.wg-outcomes {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 8px;
  flex: 2 1 420px;
}
.wg-outcomes .wg-node {
  min-width: 0;
}
.wg-status-chip {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.wg-status-chip--ok {
  background: #e8f7ef;
  color: #0f7f43;
  border: 1px solid #c5ead5;
}
.wg-status-chip--warn {
  background: #fff6e5;
  color: #9a5b00;
  border: 1px solid #f0d9aa;
}
.wg-status-chip--hold {
  background: #fdecef;
  color: #a31818;
  border: 1px solid #f4c5cf;
}
.wg-mix-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: 10px;
}
.wg-mix-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  padding: 12px 14px;
}
.wg-mix-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}
.wg-mix-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--color-text-muted);
}
.wg-mix-note {
  list-style: none;
  margin-left: -18px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--color-border);
  color: var(--color-text-muted);
}
@media (max-width: 1100px) {
  .wg-outcomes {
    grid-template-columns: 1fr;
  }
  .wg-flow-row {
    flex-direction: column;
  }
  .wg-arrow {
    transform: rotate(90deg);
    height: 24px;
  }
}
@media (max-width: 980px) {
  .wg-mix-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== QC result-wise validation / approval before LJ plot ===== */
.qca-release-ref a {
  font-weight: 500;
}
.qca-flow-board {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qca-flow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}
.qca-flow-row--split {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}
.qca-node {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fafbfd;
  padding: 10px 12px;
  flex: 1 1 200px;
  min-width: min(100%, 180px);
}
.qca-node--device {
  background: var(--color-primary-50);
  border-color: #c8dcfb;
}
.qca-node--panel {
  background: #f8f9fc;
}
.qca-node--action {
  background: #fffefb;
  border-color: #eee4d6;
}
.qca-node--lj {
  background: #f4fbf7;
  border-color: #c5ead5;
}
.qca-node--alert {
  background: #fffbf4;
  border-color: #f1ddb1;
}
.qca-node--summary {
  background: #f5f8ff;
  border-color: #d6e2fb;
}
.qca-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-caption);
  margin-bottom: 4px;
}
.qca-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}
.qca-sub {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
}
.qca-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.qca-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.qca-chip--muted {
  opacity: 0.9;
}
.qca-mini-table {
  border: 1px dashed var(--color-border);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
}
.qca-mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid var(--color-border);
}
.qca-mini-row:last-child {
  border-bottom: none;
}
.qca-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.qca-pill--pending {
  background: #fff6e5;
  color: #9a5b00;
  border: 1px solid #f0d9aa;
}
.qca-action-pair {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.qca-btn-ghost {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.qca-btn-ghost--ok {
  border-color: #c5ead5;
  color: #0f7f43;
  background: #e8f7ef;
}
.qca-btn-ghost--no {
  border-color: #e5e9ef;
  color: var(--color-text-muted);
}
.qca-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-caption);
  font-size: 18px;
  font-weight: 600;
  flex: 0 0 24px;
}
.qca-lj-sketch {
  margin-top: 6px;
  padding: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
}
.qca-lj-line {
  height: 1px;
  background: var(--color-border-strong);
  margin: 14px 8px 0;
  position: relative;
}
.qca-lj-dots {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  gap: 8px;
  min-height: 36px;
  padding: 0 4px;
}
.qca-lj-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-neutral-soft);
  border: 1px solid var(--color-border);
}
.qca-lj-dot--new {
  width: 10px !important;
  height: 10px !important;
  background: #16a34a !important;
  border-color: #15803d !important;
}
.qca-lj-caption {
  display: block;
  font-size: 10px;
  color: var(--color-text-caption);
  margin-top: 4px;
  text-align: center;
}
.qca-alert-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff6e5;
  color: #9a5b00;
  border: 1px solid #f0d9aa;
}
.qca-summary-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-muted);
}
@media (max-width: 1100px) {
  .qca-flow-row--main {
    flex-direction: column;
  }
  .qca-arrow {
    transform: rotate(90deg);
    height: 20px;
    align-self: center;
  }
  .qca-flow-row--split {
    grid-template-columns: 1fr;
  }
}

/* ===== QC Lot management flow ===== */
.qcl-release-ref a {
  font-weight: 500;
}
.qcl-flow-board {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qcl-flow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}
.qcl-flow-row--monitor {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: 10px;
}
.qcl-node {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fafbfd;
  padding: 10px 12px;
  flex: 1 1 200px;
  min-width: min(100%, 180px);
}
.qcl-node--lot {
  background: #f5f8ff;
  border-color: #d6e2fb;
}
.qcl-node--map {
  background: #fffefb;
  border-color: #eee4d6;
}
.qcl-node--qc {
  background: #f4fbf7;
  border-color: #c5ead5;
}
.qcl-node--exp-soon {
  background: #fffbf4;
  border-color: #f1ddb1;
}
.qcl-node--expired {
  background: #fff8f8;
  border-color: #f4c5cf;
}
.qcl-node--steps {
  background: #f8f9fc;
}
.qcl-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-caption);
  margin-bottom: 4px;
}
.qcl-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}
.qcl-sub {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
}
.qcl-foot {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
}
.qcl-mini-card {
  border: 1px dashed var(--color-border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11px;
}
.qcl-mini-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.qcl-mini-row:last-child {
  border-bottom: none;
}
.qcl-mini-row code {
  font-size: 10px;
}
.qcl-map-visual {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.qcl-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.qcl-pill--active {
  border-color: #c5ead5;
  background: #e8f7ef;
  color: #0f7f43;
}
.qcl-map-join {
  color: var(--color-text-caption);
  font-weight: 600;
}
.qcl-result-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 11px;
}
.qcl-result-tag {
  font-weight: 600;
  color: var(--color-text);
}
.qcl-result-val {
  color: var(--color-text-muted);
}
.qcl-result-lot {
  margin-left: auto;
  font-weight: 600;
  color: #2158ad;
}
.qcl-alert-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  margin-top: 6px;
}
.qcl-alert-strip--warn {
  background: #fff6e5;
  color: #9a5b00;
  border: 1px solid #f0d9aa;
}
.qcl-alert-strip--hold {
  background: #fdecef;
  color: #a31818;
  border: 1px solid #f4c5cf;
}
.qcl-step-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--color-text-muted);
}
.qcl-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-caption);
  font-size: 18px;
  font-weight: 600;
  flex: 0 0 24px;
}
@media (max-width: 1100px) {
  .qcl-flow-row--main {
    flex-direction: column;
  }
  .qcl-arrow {
    transform: rotate(90deg);
    height: 20px;
    align-self: center;
  }
  .qcl-flow-row--monitor {
    grid-template-columns: 1fr;
  }
}

.cc-flow {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(320px, 1.2fr);
  gap: 10px;
  align-items: stretch;
}
.cc-flow--secondary {
  margin-top: 10px;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}
.cc-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fafbfd;
  padding: 10px 12px;
}
.cc-card--start {
  background: var(--color-primary-50);
  border-color: #c8dcfb;
}
.cc-card--warn {
  background: #fff7e9;
  border-color: #f1ddb1;
}
.cc-step {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-text-caption);
  margin-bottom: 4px;
}
.cc-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}
.cc-sub {
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
}
.cc-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-caption);
  font-size: 18px;
}
.cc-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.cc-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #d9e2f5;
  background: #f5f8ff;
  color: #2158ad;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}
@media (max-width: 980px) {
  .cc-flow { grid-template-columns: 1fr; }
  .cc-flow--secondary { grid-template-columns: 1fr; }
  .cc-arrow { transform: rotate(90deg); height: 18px; }
}

/* ===== Instruments (per modality) ===== */
.device-section .section-head { margin-bottom: 10px; }

/* Compact device grid: open = navigate to /device/{id} */
.device-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
a.device-tile {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 10px 12px;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
}
a.device-tile:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 10px rgba(30, 64, 120, 0.08);
  text-decoration: none;
  color: inherit;
}
a.device-tile:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.device-tile-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 6px;
  margin-bottom: 8px;
}
.device-tile-name {
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.25;
  /* clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.device-tile-chev { flex-shrink: 0; color: var(--color-text-caption); font-size: 16px; margin-top: 1px; }

/* Per-step status (compact cards + device hero): plain text, no letter codes */
.device-tile .device-status-summary { margin-bottom: 8px; }
.device-status-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--color-text-caption);
}
.device-status-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.device-status-name {
  color: var(--color-text-caption);
  font-weight: 500;
  min-width: 0;
}
.device-status-val {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--color-text-muted);
}
.device-status-val.is-done { color: var(--color-primary, #1e5a8a); }
.device-status-summary--hero {
  margin-top: 6px;
  max-width: 360px;
  font-size: 12px;
  gap: 4px;
  padding: 8px 10px;
  background: #f6f7fa;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.device-status-summary--hero .device-status-name { color: var(--color-text); font-size: 12px; }
.device-status-summary--hero .device-status-val { font-size: 12px; }

.device-tile-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--color-text-caption);
}
.device-tile-count { font-weight: 600; color: var(--color-text); }
.device-tile-hint { text-transform: uppercase; letter-spacing: 0.04em; }

.ordering-integration-app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.ordering-integration-app-card {
  display: flex;
  min-height: 178px;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.ordering-integration-app-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 10px rgba(30, 64, 120, 0.08);
}
.ordering-integration-app-top {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.ordering-integration-app-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-size: 15px;
}
.ordering-integration-app-name {
  color: var(--color-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}
.ordering-integration-app-category {
  color: var(--color-text-muted);
  font-size: 12px;
  margin-top: 3px;
}
.ordering-integration-app-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ordering-integration-app-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-neutral-strong);
  font-size: 11px;
  font-weight: 600;
}
.ordering-integration-app-note {
  color: var(--color-text-muted);
  font-size: 12.5px;
  line-height: 1.45;
  margin: 0;
  flex: 1;
}

/* Device detail page (full checklist + notes) */
.device-detail-panel {
  margin-top: 4px;
  max-width: 640px;
}
.device-detail-h {
  font-size: 1rem; font-weight: 700; margin: 0 0 4px;
}
.device-detail-lead {
  font-size: 13px; color: var(--color-text-muted);
  margin: 0 0 16px; line-height: 1.45;
}
.device-detail-notes { margin-top: 20px; }
.device-detail-notes-lab {
  display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px;
  color: var(--color-text);
}
.device-detail-notes-ta { font-size: 13px; resize: vertical; min-height: 72px; }
.device-detail-actions { margin-top: 16px; padding-top: 8px; }

.device-checks {
  list-style: none; margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
}
.device-checks li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
}
.device-checks li:last-child { border-bottom: none; }
.device-checks li:hover { background: #fafbfd; }
.device-checks .check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px;
  cursor: pointer;
  margin: 0;
  min-width: 0;
}
.device-checks .check-body {
  display: flex; flex-direction: column; gap: 3px;
  min-width: 0;
}
.device-checks .check-label { font-weight: 500; }
.device-checks .check-where {
  font-size: 12px; color: var(--color-text-muted);
  display: flex; align-items: flex-start; gap: 4px; line-height: 1.35;
}
.device-checks .check-where i { margin-top: 2px; flex-shrink: 0; }
.device-checks .check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer; margin: 0;
  flex-shrink: 0;
  margin-top: 2px;
}
.device-checks [data-open] { font-size: 12px; padding: 0; }

.btn-ghost {
  background: transparent; border: none;
  color: var(--color-text-muted);
  padding: 4px 8px; border-radius: 4px;
  cursor: pointer; font-size: 14px;
  line-height: 1;
}
.btn-ghost:hover { background: #eef1f6; color: var(--color-danger); }

.device-add { margin-top: 4px; }
.device-add-form {
  display: flex; gap: 8px; align-items: flex-start;
  margin-top: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 8px;
  flex-wrap: wrap;
}
.device-add-form input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
}
.device-add-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

/* Search combobox (instrument catalog) */
.device-add-form--search {
  flex-direction: row;
  align-items: flex-start;
}
.device-search-col {
  flex: 1 1 200px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.device-search-wrap {
  position: relative;
  z-index: 2;
}
.device-search-input {
  width: 100%;
  min-height: 34px;
}
.device-search-list {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  margin: 0;
  margin-top: 2px;
  padding: 4px 0;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(20, 28, 44, 0.12);
}
.device-search-list[hidden] { display: none; }
.device-search-sep {
  list-style: none; margin: 0; padding: 0;
  border-bottom: 1px solid var(--color-border);
  pointer-events: none;
}
.device-search-sep span {
  display: block;
  padding: 6px 10px 4px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-caption);
  background: #f6f7fa;
}
.device-search-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.3;
  border: none;
  background: #fff;
  color: var(--color-text);
  cursor: pointer;
  margin: 0;
}
.device-search-item:hover,
.device-search-item:focus {
  background: #f0f4fb;
  outline: none;
}
.device-search-item.is-active {
  background: #e4efff;
}
.device-search-empty {
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--color-text-muted);
}
.device-search-footnote {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0;
}
.device-search-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  align-items: center;
  padding-top: 2px;
}
@media (max-width: 600px) {
  .device-add-form--search {
    flex-direction: column;
  }
  .device-search-actions {
    width: 100%;
    padding-top: 0;
  }
  .device-search-actions .btn { flex: 1; }
}

.empty-block.small {
  padding: 22px 18px;
}
.empty-block.small .title { font-size: 13.5px; }
.empty-block.small .help { font-size: 12.5px; }

/* ===== Empty / placeholder states ===== */
.empty-block {
  background: var(--color-surface);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  color: var(--color-text-muted);
}
.empty-block .title {
  font-weight: 600; color: var(--color-text);
  margin-bottom: 4px; font-size: 15px;
}
.empty-block .help { font-size: 13px; }

.placeholder-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
}
.placeholder-block .title {
  font-weight: 700; font-size: 15px; margin-bottom: 6px;
}
.placeholder-block .help {
  font-size: 13px; color: var(--color-text-muted);
  max-width: 440px; margin: 0 auto;
}
.placeholder-tutorials-intro {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0 0 10px;
  padding: 10px 14px;
  background: var(--color-primary-50);
  border: 1px solid var(--color-primary-200, var(--color-border));
  border-radius: var(--radius);
}

/* ===== Buttons (overrides on Bootstrap) ===== */
.btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}
.btn-light {
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.btn-light:hover { background: #f3f5f9; border-color: var(--color-border-strong); }
.btn-link {
  text-decoration: none;
  font-weight: 500;
}

/* ===== Toasts ===== */
.toast-host {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 80;
  display: flex; flex-direction: column-reverse; gap: 8px;
}
.toast-msg {
  background: var(--color-text);
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  box-shadow: var(--shadow-md);
  max-width: 360px;
  animation: toast-in 0.2s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Responsive nudges ===== */
@media (max-width: 1100px) {
  .module-body { grid-template-columns: 220px 1fr; }
  :root { --sub-nav-w: 220px; }
  .module-content { padding: 24px 24px 60px; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 64px minmax(0, 1fr); }
  .side-nav .brand-text,
  .side-nav .account-chip,
  .side-nav .nav-search,
  .side-nav .nav-item span,
  .side-nav .nav-item .ext,
  .side-nav .nav-item .chev,
  .side-nav .pill-new,
  .side-nav .nav-section,
  .side-nav .side-foot { display: none; }
  .side-nav .nav-item { justify-content: center; }
}
@media (max-width: 768px) {
  .module-body { grid-template-columns: 1fr; }
  .sub-nav { display: none; }
  .module-content { padding: 16px 14px 60px; }
  .modality-row,
  .question-row { flex-wrap: wrap; }
  .mr-right { width: 100%; justify-content: flex-end; }
  .q-right { width: 100%; justify-content: flex-end; }
  .config-row { grid-template-columns: 1fr; }
  .config-row .actions { flex-direction: row; justify-content: flex-start; }
  .device-tile-grid { grid-template-columns: 1fr; }
}

/* ===== Academy tutorial links ===== */

/* Inline "Watch tutorial" button next to each config row's Open/Mark actions. */
.btn-tutorial {
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.btn-tutorial i { font-size: 1.05em; }
.btn-tutorial:hover { color: var(--color-primary-dark); text-decoration: underline; }

/* Bigger tutorial card used at the top of a stage or modality page. */
.tutorial-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  margin: 8px 0 20px;
}
.tutorial-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  background: var(--color-primary-50);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.tutorial-card:hover {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}
.tutorial-card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--color-primary);
  color: white;
  display: grid; place-items: center;
  font-size: 22px;
}
.tutorial-card-eyebrow {
  font-size: 12px;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.tutorial-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 2px;
}
.tutorial-card-meta {
  display: flex;
  gap: 14px;
  color: var(--color-text-muted);
  font-size: 12px;
  margin-top: 4px;
}
.tutorial-card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.tutorial-card-chev { color: var(--color-text-muted); font-size: 18px; }

/* ===== Tutorial video modal ===== */
body.no-scroll { overflow: hidden; }

.tutorial-modal {
  position: fixed; inset: 0;
  display: none;
  z-index: 1000;
}
.tutorial-modal.open { display: block; }

.tutorial-modal .tm-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.tutorial-modal .tm-dialog {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(1080px, 94vw);
  max-height: 92vh;
  background: var(--color-surface);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tutorial-modal .tm-header {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--color-border);
  position: relative;
}
.tutorial-modal .tm-eyebrow {
  font-size: 12px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tutorial-modal .tm-title {
  font-size: 18px;
  font-weight: 600;
  margin: 2px 0 0;
  padding-right: 36px;
  color: var(--color-text);
}
.tutorial-modal .tm-close {
  position: absolute; top: 10px; right: 10px;
  background: transparent;
  border: 0;
  width: 32px; height: 32px;
  border-radius: 8px;
  color: var(--color-text-muted);
  cursor: pointer;
}
.tutorial-modal .tm-close:hover { background: var(--color-neutral-soft); color: var(--color-text); }

.tutorial-modal .tm-body {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  gap: 0;
  overflow: hidden;
}
.tutorial-modal .tm-video {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tutorial-modal .tm-video video {
  width: 100%;
  height: 100%;
  max-height: 72vh;
  outline: none;
}
.tutorial-modal .tm-side {
  padding: 16px 18px 20px;
  overflow-y: auto;
  border-left: 1px solid var(--color-border);
  background: var(--color-primary-50);
}
.tutorial-modal .tm-meta {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: var(--color-text-muted);
  margin-bottom: 10px;
}
.tutorial-modal .tm-meta span,
.tutorial-modal .tm-meta a { display: inline-flex; align-items: center; gap: 4px; }
.tutorial-modal .tm-meta a { color: var(--color-primary); text-decoration: none; }
.tutorial-modal .tm-meta a:hover { text-decoration: underline; }
.tutorial-modal .tm-summary-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 6px;
}
.tutorial-modal .tm-summary {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text);
  margin: 6px 0 0;
  white-space: pre-line;
}
.tutorial-modal .tm-summary.muted { color: var(--color-text-muted); }

.tutorial-modal .tm-placeholder {
  width: 100%;
  padding: 40px 32px;
  text-align: center;
  color: #e5e7eb;
  background: linear-gradient(135deg, #1f2937 0%, #0f172a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 300px;
}
.tutorial-modal .tm-placeholder-icon {
  font-size: 48px;
  color: #60a5fa;
  opacity: 0.9;
}
.tutorial-modal .tm-placeholder-title {
  font-size: 18px;
  font-weight: 600;
  color: #f3f4f6;
}
.tutorial-modal .tm-placeholder-body {
  font-size: 14px;
  color: #cbd5e1;
  max-width: 420px;
  line-height: 1.5;
}
.tutorial-modal .tm-placeholder .btn {
  margin-top: 8px;
}

@media (max-width: 820px) {
  .tutorial-modal .tm-body { grid-template-columns: 1fr; }
  .tutorial-modal .tm-side { border-left: 0; border-top: 1px solid var(--color-border); }
  .tutorial-modal .tm-video video { max-height: 50vh; }
}

/* Biochemistry — global report format (overview + parameter grid) */
.rf-workspace {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.rf-overview {
  padding: 18px 20px 22px;
}
.rf-guide-heading {
  font-size: 15px;
  font-weight: 600;
  margin: 20px 0 12px;
  color: var(--color-text);
}
.rf-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.rf-guide-block {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: #fafbfd;
  font-size: 13px;
  line-height: 1.45;
}
.rf-guide-block--wide {
  grid-column: 1 / -1;
}
.rf-guide-block-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--color-text);
}
.rf-guide-label {
  display: inline;
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 6px;
}
.rf-guide-mean,
.rf-guide-detail,
.rf-guide-example {
  margin: 0 0 6px;
  color: var(--color-text);
}
.rf-guide-example {
  margin-bottom: 0;
  font-size: 12.5px;
  color: var(--color-text-muted);
}
.rf-guide-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.rf-guide-sub {
  padding: 10px 12px;
  border-radius: calc(var(--radius) - 2px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.rf-guide-sub-title {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 6px;
}
.rf-guide-sub .rf-guide-mean {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.rf-guide-sub .rf-guide-example {
  font-size: 12px;
  color: var(--color-text);
  font-style: italic;
}
.pw-color-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}
.pw-legend-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--color-border);
}
.pw-status-completed { background: #e7f6ec; color: #0e7c39; border-color: #c8e8d2; }
.pw-status-partial { background: #fff7e5; color: #9a5b00; border-color: #f1ddb1; }
.pw-status-signed { background: #e9f2ff; color: #1453b2; border-color: #c8d9fb; }
.pw-color-table-wrap {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.pw-color-table {
  font-size: 12.5px;
  margin-bottom: 0;
}
.pw-color-table thead th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  background: #fafbfd;
}
.pw-row-completed td { background: #f2fbf5; }
.pw-row-partial td { background: #fffaf0; }
.pw-row-signed td { background: #f3f8ff; }
.rf-callout--entry {
  margin-top: 18px;
  align-items: flex-start;
}
.rf-callout-body {
  flex: 1;
  min-width: 0;
}
.rf-overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 4px;
}
.rf-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  background: #fafbfd;
  padding: 0 8px;
}
.rf-tab {
  appearance: none;
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.rf-tab:hover { color: var(--color-text); background: rgba(255,255,255,0.6); }
.rf-tab.is-active {
  color: var(--color-primary-dark);
  border-bottom-color: var(--color-primary);
  background: var(--color-surface);
}
.rf-panels { padding: 18px 20px 22px; }
.rf-panel:not(.is-active) { display: none; }
.rf-panel.is-active { display: block; }
.rf-lead { font-size: 14px; line-height: 1.55; margin: 0 0 8px; color: var(--color-text); }
.rf-meta { font-size: 12px; color: var(--color-text-muted); margin: 0 0 16px; }
.rf-meta i { margin-right: 4px; opacity: 0.75; }
.rf-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-primary-50);
}
.rf-callout-title { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.rf-callout-desc { font-size: 12px; color: var(--color-text-muted); max-width: 520px; line-height: 1.45; }
.rf-panel-intro { font-size: 13px; color: var(--color-text-muted); margin: 0 0 12px; line-height: 1.5; }
.rf-list { margin: 0; padding-left: 1.2rem; font-size: 13px; line-height: 1.55; color: var(--color-text); }
.rf-list li { margin-bottom: 6px; }
.rf-table-wrap { margin-top: 4px; }
.rf-table { margin-bottom: 0; font-size: 13px; }
.rf-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); }
.rf-grid-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.rf-grid-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.param-grid-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.param-grid-table { margin-bottom: 0; font-size: 13px; }
.param-grid-table thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.param-grid-table code { font-size: 12px; }

/* Hematology report format — cell count method + parameter grid */
.rf-hem-type-intro { margin-top: 0; }
.hem-cellcount-block { margin-top: 4px; }
.hem-cellcount-block .section-head { margin-bottom: 12px; }
.hem-cc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.hem-cc-mode {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: #fafbfd;
}
.hem-cc-h {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--color-text);
}
.hem-cc-body {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text);
  margin: 0 0 10px;
}
.hem-cc-link-wrap {
  margin: 0;
  font-size: 12.5px;
}
.hem-cc-link {
  font-weight: 500;
  text-decoration: none;
  color: var(--color-primary-dark);
}
.hem-cc-link:hover {
  text-decoration: underline;
}
.hem-cc-link i {
  font-size: 0.85em;
  margin-left: 2px;
  vertical-align: -0.1em;
  opacity: 0.85;
}
.hem-param-grid th:nth-child(6) { min-width: 5.5rem; }

.rf-bulk-section { margin-top: 8px; }
.rf-bulk-label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--color-text-muted); }
.rf-bulk-textarea { font-size: 13px; font-family: ui-monospace, monospace; }
.rf-bulk-actions { margin-top: 10px; }

.empty-preview {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
}
.empty-preview .muted { font-size: 12px; }

/* Molecular — report structure (report parameters / column config) */
.ml-rf-workspace { padding: 18px 20px 24px; }
.ml-rf-workspace .rf-lead { margin-bottom: 16px; }
.ml-rf-h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 10px;
  color: var(--color-text);
}
.ml-rf-prose {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin: 0 0 20px;
  max-width: 52rem;
}
.ml-rf-prose-short {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin: -6px 0 14px;
  max-width: 40rem;
}
.ml-rf-comp {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--color-border);
}
.ml-rf-comp:last-of-type { border-bottom: 0; margin-bottom: 12px; padding-bottom: 0; }
.ml-rf-comp-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 8px;
}
.ml-rf-comp-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: var(--color-text);
}
.ml-rf-badge {
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ml-rf-badge strong {
  font-weight: 600;
  color: var(--color-text);
  text-transform: none;
  letter-spacing: 0;
}
.ml-rf-comp-notes {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--color-text-muted);
  margin: 0 0 8px;
  max-width: 36rem;
}
.ml-rf-field-list { margin: 0; padding: 0; }
.ml-rf-field-item {
  font-size: 12.5px;
  line-height: 1.5;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
  align-items: baseline;
}
.ml-rf-field-item:last-child { border-bottom: 0; }
.ml-rf-field-name {
  font-weight: 600;
  color: var(--color-text);
  min-width: 6.5rem;
}
.ml-rf-field-sep { color: var(--color-text-muted); }
.ml-rf-field-means { color: var(--color-text-muted); flex: 1; min-width: 12rem; }
.ml-rf-panel-section { margin: 28px 0 20px; padding-top: 8px; border-top: 1px solid var(--color-border); }
.ml-rf-panel-section--top {
  margin: 0 0 24px;
  padding-top: 0;
  border-top: 0;
}
.ml-rf-panel-intro { font-size: 12.5px; line-height: 1.55; color: var(--color-text); margin: 0 0 14px; max-width: 44rem; }
.ml-rf-ex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.ml-rf-ex {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: #fafbfd;
  font-size: 12.5px;
  line-height: 1.45;
}
.ml-rf-ex-label { font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.ml-rf-ex-text { margin: 0; color: var(--color-text-muted); }
.ml-rf-nav-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 24px;
  padding-top: 4px;
}
.ml-rf-tests-section { margin-top: 8px; }
.ml-rf-test-wrap { margin-top: 8px; }
.ml-rf-test-table { font-size: 12.5px; }
.ml-rf-test-table thead th { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.ml-rf-tests-only { padding: 16px 20px 20px; }
.ml-rf-tests-foot { margin-top: 12px; margin-bottom: 0; }

/* Toxicology — report structure */
.tox-rf-workspace { padding: 18px 20px 24px; }
.tox-rf-workspace .rf-lead { margin-bottom: 18px; }
.tox-rf-section {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--color-border);
}
.tox-rf-section--last { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.tox-rf-h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--color-text);
}
.tox-rf-intro {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin: 0 0 12px;
  max-width: 48rem;
}
.tox-rf-footer {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin: 14px 0 0;
  max-width: 44rem;
}
.tox-rf-block-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.tox-rf-block {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: #fafbfd;
  font-size: 12.5px;
  line-height: 1.45;
}
.tox-rf-block-name { font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.tox-rf-block-blurb { margin: 0; color: var(--color-text-muted); }
.tox-rf-eg {
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
  margin: 8px 0 0;
  padding-left: 2px;
}
.tox-rf-eg-lbl { font-weight: 600; color: var(--color-text); margin-right: 5px; }
.tox-rf-h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 8px;
  color: var(--color-text);
}
.tox-rf-bill { font-size: 12.5px; line-height: 1.5; margin-top: 14px; max-width: 44rem; color: var(--color-text-muted); }
.tox-rf-bill strong { font-weight: 600; color: var(--color-text); }
.tox-rf-intro--html strong { font-weight: 600; color: var(--color-text); }
.tox-rf-field-list { margin: 0; padding: 0; }
.tox-rf-field-item {
  font-size: 12.5px;
  line-height: 1.5;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
  align-items: baseline;
}
.tox-rf-field-item:last-child { border-bottom: 0; }
.tox-rf-field-name { font-weight: 600; color: var(--color-text); min-width: 7rem; }
.tox-rf-field-sep { color: var(--color-text-muted); }
.tox-rf-field-means { color: var(--color-text-muted); flex: 1; min-width: 12rem; }
.tox-rf-ul { margin: 0 0 14px; padding-left: 1.15rem; font-size: 12.5px; line-height: 1.55; color: var(--color-text); max-width: 46rem; }
.tox-rf-li { margin-bottom: 8px; }
.tox-rf-li strong { font-weight: 600; color: var(--color-text); }
.tox-rf-ex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.tox-rf-ex {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 12.5px;
  line-height: 1.45;
}
.tox-rf-ex-label { font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.tox-rf-ex-text { margin: 0; color: var(--color-text-muted); }
.tox-rf-reflex-item { margin-bottom: 16px; }
.tox-rf-reflex-item:last-child { margin-bottom: 0; }
.tox-rf-reflex-h {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--color-text);
}
.tox-rf-reflex-body { font-size: 12.5px; line-height: 1.5; color: var(--color-text-muted); margin: 0; max-width: 48rem; }
.tox-rf-tests-section .tox-rf-intro { margin-bottom: 10px; }
.tox-rf-test-wrap { margin-top: 4px; }
.tox-rf-test-table { font-size: 12.5px; }
.tox-rf-test-table thead th { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; }

/* Radiology — Word report structure */
.rad-rf-workspace { padding: 18px 20px 24px; }
.rad-rf-workspace .rf-lead { margin-bottom: 12px; }
.rad-rf-lead-short { max-width: 48rem; }
.rad-rf-type-ul {
  margin: 0 0 16px;
  padding-left: 1.2rem;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text);
  max-width: 48rem;
}
.rad-rf-type-ul li { margin-bottom: 4px; }
.rad-rf-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  background: #fafbfd;
  padding: 0 8px;
  margin-top: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.rad-rf-tab {
  appearance: none;
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.rad-rf-tab:hover { color: var(--color-text); background: rgba(255,255,255,0.6); }
.rad-rf-tab.is-active {
  color: var(--color-primary-dark);
  border-bottom-color: var(--color-primary);
  background: var(--color-surface);
}
.rad-rf-panels {
  padding: 14px 0 4px;
  border: 1px solid var(--color-border);
  border-top: none;
  background: var(--color-surface);
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: 8px;
}
.rad-rf-panel[hidden] { display: none !important; }
.rad-rf-panel { padding: 0 16px 16px; }
.rad-rf-panel-hint {
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
  margin: 0 0 10px;
  max-width: 48rem;
}
.rad-rf-h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--color-text);
}
.rad-rf-data-table { font-size: 12.5px; }
.rad-rf-data-table thead th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  background: #fafbfd;
  border-bottom: 1px solid var(--color-border);
}
.rad-rf-grid-wrap { border-radius: var(--radius); border: 1px solid var(--color-border); }
.rad-rf-callout {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid #e6d9a0;
  background: #fffbeb;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text);
  margin-bottom: 20px;
  max-width: 52rem;
}
.rad-rf-callout i { flex-shrink: 0; margin-top: 2px; opacity: 0.85; }
.rad-rf-callout--split { align-items: flex-start; flex-wrap: wrap; }
.rad-rf-callout-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
@media (min-width: 520px) {
  .rad-rf-callout-main {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
}
.rad-rf-drive-section {
  margin: 20px 0 8px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: #f8fafc;
}
.rad-rf-drive-section .rad-rf-h3 {
  margin-top: 0;
}
.rad-rf-drive-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rad-rf-ph-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 16px;
  max-width: 48rem;
}
.rad-rf-ph-actions-hint {
  font-size: 12px;
  line-height: 1.45;
}
.rad-rf-ph-inline {
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 3px;
  background: #f1f3f5;
}
body.rad-ph-modal-open {
  overflow: hidden;
}
.rad-ph-modal {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.rad-ph-modal[hidden] {
  display: none !important;
}
.rad-ph-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.rad-ph-modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(640px, 100%);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--color-surface, #fff);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.2);
  border: 1px solid var(--color-border);
}
.rad-ph-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.rad-ph-modal-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  padding-right: 8px;
  color: var(--color-text);
}
.rad-ph-modal-body {
  padding: 12px 16px 16px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.rad-ph-modal-body .rad-rf-intro {
  margin-top: 0;
}
.rad-rf-h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 22px 0 10px;
  color: var(--color-text);
}
.rad-rf-h2:first-of-type { margin-top: 0; }
.rad-rf-ol {
  margin: 0 0 8px;
  padding-left: 1.2rem;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--color-text);
  max-width: 48rem;
}
.rad-rf-ol li { margin-bottom: 6px; }
.rad-rf-section { margin-top: 8px; }
.rad-rf-lead { font-size: 12.5px; line-height: 1.55; color: var(--color-text-muted); margin: 0 0 14px; max-width: 48rem; }
.rad-rf-lead strong { font-weight: 600; color: var(--color-text); }
.rad-rf-ctx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.rad-rf-ctx {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: #fafbfd;
  font-size: 12.5px;
  line-height: 1.45;
}
.rad-rf-ctx-type { font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.rad-rf-ctx-blurb { margin: 0 0 8px; color: var(--color-text-muted); }
.rad-rf-ctx-ex { margin: 0; color: var(--color-text); font-size: 12px; }
.rad-rf-ctx-ex .rad-rf-eg-lbl { font-weight: 600; color: var(--color-text); margin-right: 6px; }
.rad-rf-intro { font-size: 12.5px; line-height: 1.5; color: var(--color-text-muted); margin: 0 0 12px; max-width: 48rem; }
.rad-rf-ph-wrap { margin-top: 4px; }
.rad-rf-ph-table { font-size: 12px; margin-bottom: 0; }
.rad-rf-ph-table thead th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  background: #fafbfd;
}
.rad-rf-ph { font-size: 11.5px; }
.rad-rf-section--last { padding-bottom: 4px; }

/* Radiology · Word Help Center embedded guide */
.rad-word-pack-frame {
  display: flex;
  align-items: center;
  justify-content: center;
}
.rad-word-pack-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: rgba(248, 250, 252, 0.92);
}
.rad-word-pack-inner i {
  font-size: 2.75rem;
}
.rad-word-guide-card .rad-rf-ol {
  margin-top: 4px;
}
.rad-word-vars-card .rad-rf-intro {
  max-width: none;
}
@media (min-width: 640px) {
  .rad-word-guide-card--span {
    grid-column: 1 / -1;
  }
}
.rad-word-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.rad-word-chip code {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.rad-word-faq-grid .rad-rf-ctx-blurb {
  margin-bottom: 0;
}

/* Reflex — behavior page (intro + sample rules grid) */
.reflex-bh-workspace {
  padding: 4px 20px 20px;
}
.reflex-bh-lead {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text);
  margin: 0 0 14px;
  max-width: 52rem;
}
.reflex-bh-h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0 8px;
  color: var(--color-text);
}
.reflex-bh-h2-note {
  font-weight: 400;
  font-size: 12px;
  color: var(--color-text-muted);
}
.reflex-bh-examples {
  margin: 0 0 4px;
  padding-left: 1.2rem;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text);
  max-width: 48rem;
}
.reflex-bh-examples li { margin-bottom: 6px; }
.reflex-bh-ex-label { font-weight: 600; color: var(--color-text); margin-right: 6px; }
.reflex-bh-grid-wrap {
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  margin-top: 6px;
}
.reflex-bh-data-table { font-size: 12.5px; }
.reflex-bh-data-table thead th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  background: #fafbfd;
  border-bottom: 1px solid var(--color-border);
}

/* Auto validation — structured know-how */
.av-kb-workspace .rf-guide-heading { margin-top: 20px; }
.av-kb-workspace .rf-guide-heading:first-of-type { margin-top: 8px; }
.av-kb-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}
.av-kb-summary-card {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: #fafbfd;
  font-size: 13px;
  line-height: 1.5;
}
.av-kb-summary-card p { margin: 0; color: var(--color-text); }
.av-kb-summary-card--accent {
  border-color: #c5daf5;
  background: #f0f6ff;
}
.av-kb-summary-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  margin-bottom: 6px;
}
.av-kb-func-wrap {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 4px;
}
.av-kb-func-table { font-size: 12.5px; }
.av-kb-func-table thead th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  background: #fafbfd;
}
.av-kb-func-table td:first-child { white-space: nowrap; }
.av-kb-flow.aa-flow-board {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 4px;
}
.av-kb-steps {
  margin: 8px 0 0;
  padding-left: 1.15rem;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--color-text);
}
.av-kb-steps li { margin-bottom: 6px; }
@media (max-width: 900px) {
  .av-kb-summary { grid-template-columns: 1fr; }
  .av-kb-flow.aa-flow-board { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .av-kb-flow.aa-flow-board { grid-template-columns: 1fr; }
}
.av-kb-rule-video { margin-top: 12px; }
.av-kb-rule-video-frame {
  max-width: 520px;
  border-radius: 12px;
  border: 1px solid #dfe7f1;
  overflow: hidden;
}
.reflex-bh-status-cell { width: 90px; vertical-align: middle; }
.reflex-bh-switch {
  display: inline-block;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #dee2e6;
  position: relative;
  vertical-align: middle;
}
.reflex-bh-switch--on { background: #0d6efd; }
.reflex-bh-switch-knob {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: transform 0.12s ease;
}
.reflex-bh-switch--on .reflex-bh-switch-knob {
  transform: translateX(18px);
}

/* Rerun — behavior page (help links + sample tests / flags) */
.rerun-bh-workspace {
  padding: 4px 20px 20px;
}
.rerun-bh-lead {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text);
  margin: 0 0 16px;
  max-width: 52rem;
}
.rerun-bh-h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 18px 0 10px;
  color: var(--color-text);
}
.rerun-bh-h2-note {
  font-weight: 400;
  font-size: 12px;
  color: var(--color-text-muted);
}
.rerun-bh-articles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}
.rerun-bh-article {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fafbfd;
  font-size: 12.5px;
  line-height: 1.45;
}
.rerun-bh-article-link {
  font-weight: 600;
  text-decoration: none;
  color: var(--color-primary-dark, #084298);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.rerun-bh-article-link:hover {
  text-decoration: underline;
}
.rerun-bh-article-link i {
  font-size: 0.75rem;
  opacity: 0.85;
}
.rerun-bh-desc {
  margin: 8px 0 6px;
  color: var(--color-text);
}
.rerun-bh-ex {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 12px;
  line-height: 1.45;
}
.rerun-bh-ex-lbl {
  font-weight: 600;
  color: var(--color-text);
  margin-right: 4px;
}
.rerun-bh-grid-wrap {
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  margin-top: 6px;
}
.rerun-bh-data-table {
  font-size: 12.5px;
}
.rerun-bh-data-table thead th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  background: #fafbfd;
  border-bottom: 1px solid var(--color-border);
}
.rerun-bh-yn {
  font-weight: 500;
  white-space: nowrap;
  width: 7rem;
}
.rerun-bh-flags-cell {
  line-height: 1.6;
}
.rerun-bh-flag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e7f1ff;
  color: #084298;
  border: 1px solid #b6d4fe;
  margin: 0 6px 4px 0;
}

/* Outsourced reporting — 3-type setup view */
.outs-bh-workspace {
  padding: 4px 20px 20px;
}
.outs-bh-lead {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text);
  margin: 0 0 14px;
  max-width: 52rem;
}
.outs-bh-section {
  margin-top: 16px;
}
.outs-bh-h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--color-text);
}
.outs-bh-h3 {
  font-size: 12.5px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--color-text);
}
.outs-bh-intro {
  margin: 0 0 10px;
  color: var(--color-text-muted);
  font-size: 12.5px;
  line-height: 1.5;
  max-width: 60rem;
}
.outs-bh-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}
.outs-bh-list-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fafbfd;
}
.outs-bh-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text);
}
.outs-bh-list li {
  margin-bottom: 6px;
}
.outs-bh-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  background: #fafbfd;
  padding: 0 8px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.outs-bh-tab {
  appearance: none;
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.outs-bh-tab:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.6);
}
.outs-bh-tab.is-active {
  color: var(--color-primary-dark);
  border-bottom-color: var(--color-primary);
  background: var(--color-surface);
}
.outs-bh-panels {
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--color-surface);
}
.outs-bh-panel {
  padding: 12px 14px 14px;
}
.outs-bh-panel[hidden] {
  display: none !important;
}
.outs-bh-grid-wrap {
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}
.outs-bh-data-table {
  font-size: 12.5px;
}
.outs-bh-data-table thead th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  background: #fafbfd;
  border-bottom: 1px solid var(--color-border);
}
.outs-bh-section--integration {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px 14px 14px;
  background: #f8fafc;
}

/* Biochemistry — same test, different machine (report templates guide) */
.stdm-section .stdm-prose {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text);
}
.stdm-section .stdm-prose p { margin-bottom: 10px; }
.stdm-section .stdm-prose-lead { margin-top: 12px; margin-bottom: 0; }
.stdm-list {
  margin: 0 0 12px;
  padding-left: 1.2rem;
  font-size: 13px;
  line-height: 1.5;
}
.stdm-list li { margin-bottom: 4px; }
.stdm-flow {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.stdm-flow-step {
  padding: 14px 16px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fafbfd;
  margin-bottom: 10px;
}
.stdm-flow-step-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--color-text);
}
.stdm-flow-step p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.stdm-flow-example {
  padding: 10px 12px;
  border-radius: calc(var(--radius) - 2px);
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  font-size: 12.5px;
}
.stdm-flow-example-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.stdm-flow-example ul {
  margin: 0;
  padding-left: 1.1rem;
}
.stdm-flow-example li { margin-bottom: 4px; }
.stdm-example-card {
  padding: 4px 0 0;
}
.stdm-table {
  font-size: 13px;
  margin-bottom: 0;
}
.stdm-table thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.stdm-table tbody th {
  font-weight: 600;
  width: 38%;
  color: var(--color-text);
}
.stdm-example-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text-muted);
  background: var(--color-primary-50);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.stdm-checklist tbody td { vertical-align: middle; }
.stdm-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.stdm-status--ok {
  background: var(--color-success-soft);
  color: #0e7c39;
}
.stdm-status--pending {
  background: #f5f6f8;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.stdm-warnings {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stdm-warn {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid #e8d9c4;
  background: var(--color-warning-soft);
  font-size: 13px;
}
.stdm-warn-title {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--color-warning);
}
.stdm-warn p {
  margin: 0;
  color: var(--color-text);
  line-height: 1.45;
}
.stdm-actions-section .stdm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Microbiology — report format workspace */
.micro-rf-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--color-text);
}
.micro-rf-list li { margin-bottom: 6px; }
.micro-rf-prose {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin: 0 0 10px;
}
.micro-rf-prose--tail {
  margin-top: 10px;
  font-style: italic;
}
.micro-rf-pf {
  margin-top: 20px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}
.micro-rf-pf-lead {
  max-width: 72ch;
  margin-bottom: 16px;
}
.micro-rf-pf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.micro-rf-pf-card {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: #fafbfd;
  font-size: 13px;
  line-height: 1.5;
}
.micro-rf-pf-card-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--color-text);
}
.micro-rf-pf-decision {
  margin: 0;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  max-width: 72ch;
}
.micro-rf-pf-decision .bi {
  margin-right: 8px;
  color: #d97706;
}
.add-findings-workspace {
  padding: 18px 20px 28px;
  max-width: 720px;
}
.add-findings-lead {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin: 0 0 20px;
}
.add-findings-steps {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.add-findings-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: #fafbfd;
}
.add-findings-step-num {
  flex: 0 0 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--color-primary-100, #e0e7ff);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
}
.add-findings-step-label {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--color-text);
}
.add-findings-step-detail {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}
.add-findings-note {
  margin: 20px 0 0;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
  background: #f0f7ff;
  border: 1px solid #c7dff4;
  border-radius: var(--radius);
}
.add-findings-note .bi {
  margin-right: 8px;
  color: #2563eb;
}
.micro-master-workspace {
  padding: 16px 18px 22px;
}
.micro-master-table {
  margin-bottom: 0;
}
.micro-master-table thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.micro-rf-fmg {
  margin-top: 10px;
}
.micro-rf-fmg-table {
  min-width: 960px;
}
.micro-rf-fmg-ops {
  max-width: 200px;
  white-space: normal;
}
.micro-rf-ttm {
  margin-top: 8px;
}
.micro-rf-ttm .section-title {
  font-size: 16px;
}
.micro-rf-ttm-table {
  min-width: 900px;
}
.micro-rf-ttm-map {
  max-width: 360px;
  font-size: 12.5px;
  line-height: 1.4;
  white-space: normal;
}
.micro-rf-research {
  margin: 10px 0 8px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.micro-rf-research .rf-guide-heading {
  margin-top: 0;
}
.micro-rf-culture,
.micro-rf-methods {
  margin-top: 8px;
}
.micro-rf-table {
  font-size: 13px;
  margin-bottom: 0;
}
.micro-rf-table thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.micro-rf-table tbody th {
  font-weight: 600;
  width: 28%;
  color: var(--color-text);
  vertical-align: top;
}
.micro-rf-growth-grid {
  margin: 20px 0 8px;
  padding: 0 0 8px;
}
.micro-rf-growth-pair {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.micro-rf-growth-card {
  flex: 1 1 240px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  font-size: 13px;
  line-height: 1.45;
}
.micro-rf-growth-card--pos {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.micro-rf-growth-card--neg {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.micro-rf-growth-label {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--color-text);
}
.micro-rf-growth-maps {
  margin: 0;
  color: var(--color-text-muted);
}
.micro-rf-growth-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  flex: 0 0 auto;
  align-self: center;
}
.micro-rf-growth-note {
  margin: 14px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text-muted);
}
.micro-rf-growth-note .bi {
  margin-right: 6px;
  color: var(--color-text-muted);
}
.micro-kind-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
}
.micro-kind-badge--organism {
  background: #ede9fe;
  color: #5b21b6;
}
.micro-kind-badge--antibiotic {
  background: #dbeafe;
  color: #1e40af;
}
.micro-kind-badge--comment {
  background: #f3f4f6;
  color: #4b5563;
}
.table.micro-param-grid tbody td {
  vertical-align: middle;
}

/* Report templates gallery (Softr-style, CrelioHealth public site) */
.rtg-page {
  padding: 8px 4px 32px;
  max-width: 1100px;
  margin: 0 auto;
}
.rtg-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.rtg-back {
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  cursor: pointer;
}
.rtg-back:hover {
  color: #3278ff;
}
.rtg-external {
  font-size: 13px;
  color: #3278ff;
  text-decoration: none;
  font-weight: 500;
}
.rtg-external:hover {
  text-decoration: underline;
}
.rtg-hero {
  text-align: center;
  margin-bottom: 20px;
  padding: 0 8px 8px;
}
.rtg-hero-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #152237;
  margin: 0 0 8px;
  font-family: "Inter", system-ui, sans-serif;
}
.rtg-hero-sub {
  font-size: 15px;
  color: #5c6578;
  margin: 0 auto 8px;
  max-width: 38rem;
  line-height: 1.5;
}
.rtg-hero-note {
  font-size: 12.5px;
  color: var(--color-text-muted);
  max-width: 40rem;
  margin: 0 auto 16px;
  line-height: 1.45;
}
.rtg-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.rtg-pill {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.rtg-pill:hover {
  border-color: #c7d7ff;
  color: #1e40af;
}
.rtg-pill.active {
  background: #3278ff;
  border-color: #3278ff;
  color: #fff;
}
.rtg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  padding: 0 4px;
}
.rtg-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.rtg-card-preview {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  aspect-ratio: 4/3;
  min-height: 200px;
}
.rtg-iframe {
  width: 100%;
  height: 100%;
  min-height: 200px;
  border: 0;
  display: block;
  background: #fff;
}
.rtg-card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rtg-card-dept {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #3278ff;
  margin-bottom: 2px;
}
.rtg-card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: #152237;
  line-height: 1.3;
}
.rtg-card-desc {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--color-text-muted);
  margin: 0 0 8px;
  flex: 1;
}
.rtg-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rtg-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 16px;
  font-size: 14px;
}

/* ----- Patient portal branding (product-style console mock) ----- */
.pp-brand-page {
  max-width: 1200px;
}
.pp-brand-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}
.pp-brand-toolbar-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--color-text) !important;
  padding: 0;
}
.pp-brand-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pp-brand-tabs {
  border-bottom: 1px solid var(--color-border);
}
.pp-brand-tabs .nav-link {
  border: none;
  border-radius: 0;
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 16px;
}
.pp-brand-tabs .nav-link:hover {
  color: var(--color-text);
  border-color: transparent;
}
.pp-brand-tabs .nav-link.active {
  color: var(--color-primary-dark);
  border-bottom: 2px solid var(--color-primary);
  margin-bottom: -1px;
  background: transparent;
}
.pp-brand-tab-panels {
  border-color: var(--color-border) !important;
  min-height: 320px;
}
.pp-brand-phone-prefix {
  font-size: 12px;
  white-space: nowrap;
}
.pp-brand-preview-wrap {
  position: sticky;
  top: 12px;
}
.pp-brand-preview-title {
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 11px !important;
}
.pp-brand-browser {
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}
.pp-brand-browser-chrome {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 10px 12px 8px;
  background: #e8ecf2;
  border-bottom: 1px solid var(--color-border-strong);
}
.pp-brand-browser-tabstrip {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-top: 22px;
}
.pp-brand-browser-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.pp-brand-browser-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c5cdd8;
}
.pp-brand-browser-url {
  flex: 1;
  background: #fff;
  border: 1px solid #d1d9e4;
  border-radius: 4px;
  padding: 4px 10px;
  color: var(--color-text-muted);
}
.pp-brand-browser-content {
  background: linear-gradient(145deg, #f8fafc 0%, #eef2f7 100%);
  padding: 14px;
}
.pp-brand-mock-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 12px;
  align-items: stretch;
  min-height: 300px;
}
@media (max-width: 991px) {
  .pp-brand-mock-split {
    grid-template-columns: 1fr;
  }
  .pp-brand-preview-wrap {
    position: static;
  }
}
.pp-brand-mock-banner {
  position: relative;
  border-radius: 10px;
  background: linear-gradient(160deg, #dbeafe 0%, #e0e7ff 45%, #fce7f3 100%);
  border: 1px solid #c7d2fe;
  min-height: 260px;
  overflow: hidden;
}
.pp-brand-mock-banner-inner {
  position: relative;
  height: 100%;
  min-height: 240px;
  padding: 16px;
}
.pp-brand-mock-notif {
  font-size: 10px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  max-width: 85%;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.pp-brand-mock-notif--a {
  background: #fff;
  color: #334155;
  margin-bottom: 8px;
}
.pp-brand-mock-notif--b {
  background: #ecfdf5;
  color: #047857;
}
.pp-brand-mock-illus {
  position: absolute;
  right: 8%;
  bottom: 10%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff 0%, transparent 45%),
    linear-gradient(135deg, #93c5fd, #a78bfa);
  opacity: 0.85;
}
.pp-brand-mock-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pp-brand-mock-fake-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  max-width: 200px;
}
.pp-brand-tiny-fav {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--color-primary);
  flex-shrink: 0;
}
.pp-brand-mock-contact {
  position: relative;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 12px;
}
.pp-brand-mock-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--color-text-muted);
}
.pp-brand-mock-login {
  flex: 1;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.pp-brand-mock-terms-wrap {
  position: relative;
  text-align: center;
  padding-top: 20px;
}
.pp-brand-mock-terms {
  color: var(--color-primary);
  text-decoration: underline;
  cursor: default;
}
.pp-brand-callout {
  position: absolute;
  z-index: 2;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  padding: 5px 8px;
  border-radius: 4px;
  background: #ffe4e6;
  color: #9f1239;
  border: 1px solid #fda4af;
  max-width: 160px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.pp-brand-callout--tl {
  top: 8px;
  left: 8px;
}
.pp-brand-callout--favicon {
  top: 0;
  left: 0;
}
.pp-brand-callout--contact {
  top: -10px;
  right: 8px;
}
.pp-brand-callout--terms {
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -4px);
  margin-bottom: 0;
}

/* ----- Patient portal: Custom Domain (admin console mock) ----- */
.cd-custom-domain-page {
  max-width: 1100px;
}
.cd-custom-domain-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}
.cd-custom-domain-head-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cd-custom-domain-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--color-text) !important;
  width: fit-content;
}
.cd-custom-domain-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}
.cd-custom-domain-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.cd-btn-refresh {
  border: 1px solid var(--color-success);
  color: var(--color-success);
  background: #fff;
  font-weight: 600;
}
.cd-btn-refresh:hover {
  background: var(--color-success-soft);
  color: var(--color-success);
  border-color: var(--color-success);
}
.cd-domain-tabs {
  border-bottom: 1px solid var(--color-border);
  gap: 0;
}
.cd-domain-tabs .nav-item {
  margin-bottom: -1px;
}
.cd-domain-tabs .nav-link {
  border: none;
  border-radius: 0;
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 18px;
}
.cd-domain-tabs .nav-link:hover {
  color: var(--color-text);
}
.cd-domain-tabs .nav-link.active {
  color: var(--color-primary-dark);
  border-bottom: 2px solid var(--color-primary);
  background: transparent;
}
.cd-domain-table-wrap {
  background: var(--color-surface);
}
.cd-domain-table thead th {
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  color: var(--color-text-muted);
  border-bottom-width: 1px;
  white-space: nowrap;
}
.cd-th-filter {
  font-size: 11px;
  opacity: 0.55;
  margin-left: 2px;
}
.cd-table-group td {
  background: #f8fafc;
  font-size: 13px;
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}
.cd-table-group-toggle {
  font-size: 13px !important;
}
.cd-table-data-row td {
  font-size: 13px;
  vertical-align: middle;
}
.cd-badge-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 0.35em 0.65em;
  border-radius: 6px;
}
.cd-badge-pill--primary {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}
.cd-badge-pill--ssl {
  background: var(--color-success-soft);
  color: var(--color-success);
  border: 1px solid #86efac;
}
.cd-badge-pill--pending {
  background: #fef9c3;
  color: #a16207;
  border: 1px solid #fde047;
}

/* ----- B2B: Organization login page (Center Management mock) ----- */
.b2b-org-page {
  margin: -8px -12px 0;
}
@media (min-width: 992px) {
  .b2b-org-page {
    margin: 0;
  }
}
.b2b-org-shell {
  display: grid;
  grid-template-columns: minmax(200px, 228px) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: 520px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 991px) {
  .b2b-org-shell {
    grid-template-columns: 1fr;
  }
}
.b2b-org-sidebar {
  background: #fafbfd;
  border-right: 1px solid var(--color-border);
  padding: 14px 10px 20px;
}
@media (max-width: 991px) {
  .b2b-org-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }
}
.b2b-org-sidebar-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-caption);
  margin: 0 8px 10px;
}
.b2b-org-sn-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.b2b-org-sn-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--color-text);
  padding: 8px 10px;
  border-radius: 6px;
  cursor: default;
}
.b2b-org-sn-item:hover {
  background: rgba(25, 118, 210, 0.06);
}
.b2b-org-sn-item.is-active {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-weight: 600;
}
.b2b-org-main {
  padding: 18px 20px 24px;
  background: var(--color-bg);
  min-width: 0;
}
.b2b-org-main-head {
  margin-bottom: 12px;
}
.b2b-org-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--color-text) !important;
}
.b2b-org-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.b2b-org-section .card-body {
  padding: 16px 18px;
}
.b2b-org-preview {
  overflow: hidden;
  border: 1px solid var(--color-border) !important;
}
.b2b-org-preview-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #e8ecf2;
  border-bottom: 1px solid var(--color-border-strong);
}
.b2b-org-preview-dots {
  display: flex;
  gap: 5px;
}
.b2b-org-preview-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c5cdd8;
}
.b2b-org-preview-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  max-width: 220px;
}
.b2b-org-preview-fav {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: #6366f1;
  flex-shrink: 0;
}
.b2b-org-preview-body {
  padding: 12px 14px 16px;
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
}
.b2b-org-pv-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 16px;
  padding: 6px 4px 10px;
  font-size: 12px;
}
.b2b-org-pv-hlink {
  color: var(--color-primary);
  text-decoration: underline;
  cursor: default;
}
.b2b-org-pv-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
  align-items: stretch;
}
@media (max-width: 520px) {
  .b2b-org-pv-split {
    grid-template-columns: 1fr;
  }
}
.b2b-org-pv-login {
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
.b2b-org-pv-logo {
  height: 36px;
  width: 100px;
  margin: 0 auto 10px;
  border-radius: 4px;
  background: linear-gradient(135deg, #93c5fd, #a78bfa);
}
.b2b-org-pv-title {
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  line-height: 1.3;
}
.b2b-org-pv-tag {
  text-align: center;
  margin-bottom: 4px;
}
.b2b-org-pv-banner {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  min-height: 180px;
}
.b2b-org-pv-banner-inner {
  height: 100%;
  min-height: 180px;
  background: linear-gradient(160deg, #ddd6fe 0%, #bfdbfe 50%, #fce7f3 100%);
}
.b2b-org-pv-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--color-border);
  font-size: 11px;
}
.b2b-org-pv-flink {
  color: var(--color-text-muted);
  text-decoration: underline;
  cursor: default;
}
.b2b-org-pv-disclaimer {
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}
.b2b-org-preview-doctor-link {
  color: var(--color-primary);
  text-decoration: underline;
  cursor: default;
}

/* B2B portal — clients grid */
.b2b-pc-page {
  max-width: 1100px;
}
.b2b-pc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}
.b2b-pc-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--color-text) !important;
}
.b2b-pc-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}
.b2b-pc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  align-items: stretch;
}
.b2b-pc-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.b2b-pc-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.b2b-pc-name {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}
.b2b-pc-dl {
  margin: 0 0 4px;
  font-size: 13px;
}
.b2b-pc-dl > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
  margin-bottom: 6px;
}
.b2b-pc-dl dt {
  margin: 0;
  color: var(--color-text-muted);
  font-weight: 500;
}
.b2b-pc-dl dd {
  margin: 0;
}

/* B2B — organisation hierarchy explainer */
.b2b-hier-page {
  max-width: 900px;
}
.b2b-hier-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--color-text) !important;
}
.b2b-hier-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}
.b2b-hier-concept-card {
  border-radius: var(--radius);
  padding: 14px 16px;
  height: 100%;
}
.b2b-hier-concept-card--neutral {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.b2b-hier-concept-card--accent {
  background: linear-gradient(145deg, #ede9fe 0%, #e9d5ff 100%);
  border: 1px solid #d8b4fe;
  color: #4c1d95;
}
.b2b-hier-concept-card--accent .small {
  color: #5b21b6;
}
.b2b-hier-tree .card-body {
  padding: 16px 18px;
}
.b2b-hier-sublist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.b2b-hier-sub-item {
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid var(--color-border);
}
.b2b-hier-sub-name {
  font-weight: 600;
  font-size: 13px;
}

/* ===== Test List (Profile & Report Management prototype) ===== */
.test-list-main {
  padding: 0;
  overflow: auto;
}
.test-list-page {
  padding: 20px 28px 40px;
  max-width: 1400px;
}
.test-list-toolbar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.test-list-crumb {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-caption);
  margin-bottom: 4px;
}
.test-list-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.test-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.nav-sub {
  margin: 2px 0 8px 8px;
  padding-left: 8px;
  border-left: 2px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-sub-item {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--color-text-muted);
}
.nav-sub-item:hover {
  background: #f1f4f9;
  color: var(--color-text);
}
.nav-sub-item.active {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-weight: 600;
}

/* Setup health banner (in-product messaging) */
.setup-health-banner {
  background: linear-gradient(135deg, var(--color-primary-50) 0%, #e8f4fc 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.setup-health-banner-inner {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
}
.setup-health-copy {
  flex: 1;
  min-width: 0;
}
.setup-health-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 1.25rem;
}
.setup-health-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  margin-bottom: 6px;
}
.setup-health-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.35;
}
.setup-health-body {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--color-text-muted);
  max-width: 720px;
  line-height: 1.5;
}
.setup-health-progress-row {
  margin-bottom: 14px;
  max-width: 420px;
}
.setup-health-progress-label {
  font-size: 13px;
  margin-bottom: 6px;
}
.setup-health-bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(25, 118, 210, 0.15);
  overflow: hidden;
}
.setup-health-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary) 0%, #42a5f5 100%);
  transition: width 0.35s ease;
}
.setup-health-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.setup-health-dismiss {
  margin-left: auto;
  font-size: 12px !important;
}
@media (max-width: 640px) {
  .setup-health-dismiss {
    margin-left: 0;
  }
}
.setup-health-detail {
  padding: 0 20px 18px;
  border-top: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.55);
}
.setup-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.setup-checklist-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.setup-checklist-item--done {
  opacity: 0.72;
  background: var(--color-neutral-soft);
}
.setup-checklist-status {
  font-weight: 700;
  color: var(--color-primary);
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
}
.setup-checklist-item--done .setup-checklist-status {
  color: var(--color-success);
}
.setup-checklist-label {
  font-weight: 600;
  font-size: 13px;
}
.setup-checklist-detail {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
  line-height: 1.4;
}
.setup-checklist-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}

.setup-banner-stub {
  padding: 8px 12px;
  margin-bottom: 16px;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.test-list-tabs {
  border-bottom-color: var(--color-border);
  margin-bottom: 0;
}
.test-list-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--color-text-muted);
  font-weight: 500;
  padding: 10px 16px;
}
.test-list-tabs .nav-link:hover {
  color: var(--color-text);
}
.test-list-tabs .nav-link.active {
  color: var(--color-primary-dark);
  background: transparent;
  border-bottom-color: var(--color-primary);
}
.test-list-meta-row {
  padding: 12px 0 8px;
}
.test-list-table-wrap {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}
.test-list-table thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  border-bottom-width: 1px;
  white-space: nowrap;
}
.test-list-group-row td {
  background: var(--color-neutral-soft);
  font-size: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}
.badge-not-verified {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 4px;
  background: #fef08a;
  color: #854d0e;
  vertical-align: middle;
}
.test-list-footnote {
  margin-top: 16px;
}
.test-list-footnote code {
  font-size: 12px;
}

/* ===== Lab onboarding: KB collaboration layer ===== */

/* ── isolated single-feature view (lab action link) ── */
.app-shell.onboarding-isolated {
  grid-template-columns: minmax(0, 1fr);
}
.app-shell.onboarding-isolated .side-nav   { display: none !important; }
.app-shell.onboarding-isolated .stage-tabs { display: none !important; }
.app-shell.onboarding-isolated .sub-nav    { display: none !important; }
.app-shell.onboarding-isolated #collabBar  { display: none !important; }
.app-shell.onboarding-isolated .module-body {
  grid-template-columns: minmax(0, 1fr);
}
.app-shell.onboarding-isolated .module-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 40px 64px;
}
.app-shell.onboarding-isolated .module-back {
  display: none !important;
}
.app-shell.onboarding-isolated .use-toggle-panel,
.app-shell.onboarding-isolated .badge-status,
.app-shell.onboarding-isolated .config-status,
.app-shell.onboarding-isolated .mr-toggle input,
.app-shell.onboarding-isolated .yn-group,
.app-shell.onboarding-isolated [data-act="mark"] {
  display: none !important;
}

/* ── standalone (KB reading mode) ── */
.app-shell.onboarding-standalone {
  grid-template-columns: minmax(0, 1fr);
}
.app-shell.onboarding-standalone .side-nav   { display: none !important; }
.app-shell.onboarding-standalone .stage-tabs { display: none; }
.app-shell.onboarding-standalone .module-body {
  grid-template-columns: var(--sub-nav-w) minmax(0, 1fr);
}
.app-shell.onboarding-standalone .sub-nav {
  top: 60px;
  max-height: calc(100vh - 60px);
}
.app-shell.onboarding-standalone .sn-item .dot,
.app-shell.onboarding-standalone .use-toggle-panel,
.app-shell.onboarding-standalone .badge-status,
.app-shell.onboarding-standalone .config-status,
.app-shell.onboarding-standalone .mr-toggle input,
.app-shell.onboarding-standalone .yn-group,
.app-shell.onboarding-standalone [data-act="mark"] {
  display: none !important;
}

/* ── AM in-product view: sub-nav + content, no stage tabs ── */
.app-shell.kb-am-mode .stage-tabs { display: none; }

/* ── Lab in-product view: full-width content, no sub-nav, no stage tabs ── */
.app-shell.kb-lab-mode .stage-tabs { display: none; }
.app-shell.kb-lab-mode .sub-nav    { display: none; }
.app-shell.kb-lab-mode .module-body {
  grid-template-columns: minmax(0, 1fr);
}

/* ── Collab bar ── */
.collab-bar {
  padding: 10px 20px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 8;
}
.collab-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
}
.collab-bar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.collab-bar-right {
  display: flex;
  align-items: center;
}
.collab-bar-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-right: 8px;
}
.collab-lab-select {
  width: auto;
  max-width: 200px;
}
.kb-bar-brand {
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text);
  margin-right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.kb-stage-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.kb-stage-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
}
.kb-search {
  position: relative;
  flex: 1 1 280px;
  max-width: 460px;
  margin-left: auto;
}
.kb-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-caption);
  font-size: 13px;
  pointer-events: none;
}
.kb-search-input {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px 7px 32px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text);
  font-size: 13px;
}
.kb-search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12);
}
.kb-search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(520px, calc(100vw - 32px));
  max-height: 420px;
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 30;
}
.kb-search-results[hidden] { display: none; }
.kb-search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  color: inherit;
}
.kb-search-result:hover,
.kb-search-result:focus {
  background: var(--color-primary-50);
  outline: none;
}
.kb-search-result-title {
  color: var(--color-text);
  font-size: 13.5px;
  font-weight: 700;
}
.kb-search-result-section {
  color: var(--color-primary-dark);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.kb-search-result-snippet {
  grid-column: 1 / -1;
  color: var(--color-text-muted);
  font-size: 12px;
  line-height: 1.4;
}
.kb-search-empty {
  padding: 12px;
  color: var(--color-text-muted);
  font-size: 13px;
}

/* ── sub-nav icon item (Overview link) ── */
.sn-item .sn-icon {
  font-size: 14px;
  color: var(--color-text-muted);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.sn-item.active .sn-icon { color: var(--color-primary-dark); }
.collab-feedback-slot { display: none; }

/* ═══════════════════════════════════════════════════════
   LAB VIEW — module overview + per-section feature list
   ═══════════════════════════════════════════════════════ */
.kb-lab-mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  padding-bottom: 40px;
  max-width: 960px;
}
.kb-lab-mod-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
  font: inherit;
  color: inherit;
}
.kb-lab-mod-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}
.kb-lab-mod-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.kb-lab-mod-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.kb-lab-mod-icon {
  font-size: 22px;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.kb-lab-mod-heading-wrap { flex: 1; min-width: 0; }
.kb-lab-mod-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--color-text);
}
.kb-lab-mod-meta {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-muted);
}
.kb-lab-mod-chevron {
  color: var(--color-text-muted);
  font-size: 16px;
  margin-top: 4px;
  flex-shrink: 0;
}
.kb-lab-mod-progress {
  height: 4px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.kb-lab-mod-progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 999px;
  transition: width 0.25s ease;
}
.kb-lab-mod-foot {
  font-size: 11px;
  color: var(--color-text-muted);
}

.kb-lab-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 40px;
  max-width: 800px;
}
.kb-lab-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  transition: border-color 0.12s;
}
.kb-lab-card:hover { border-color: var(--color-primary); }
.kb-lab-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.kb-lab-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}
.kb-lab-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}
.kb-lab-kb-btn {
  flex-shrink: 0;
  white-space: nowrap;
}
.kb-lab-feedback {
  border-top: 1px solid var(--color-border);
  padding-top: 14px;
}
.kb-lab-feedback-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.kb-lab-na-row {
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  max-width: 360px;
}
.kb-lab-na-row:has(.kb-na:checked) {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 6%, transparent);
}
.kb-lab-try-row {
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  max-width: 360px;
}
.kb-lab-try-row:has(.kb-trying-out:checked) {
  border-color: color-mix(in srgb, var(--color-secondary, #64748b) 45%, var(--color-border));
  background: color-mix(in srgb, var(--color-secondary, #64748b) 7%, transparent);
}
.kb-lab-setup-hint {
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.4;
}
.kb-stars-wrap.disabled {
  opacity: 0.42;
  pointer-events: none;
}
.kb-stars {
  display: flex;
  align-items: center;
  gap: 2px;
}
.kb-star {
  border: none;
  background: transparent;
  padding: 4px 3px;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
}
.kb-star i { font-size: 20px; transition: color 0.12s, transform 0.12s; }
.kb-star:hover i { color: var(--color-primary); transform: scale(1.08); }
.kb-star.active i { color: #f0a010; }
.kb-star-caption {
  font-size: 13px;
  color: var(--color-text-muted);
}
.kb-star-caption:empty {
  display: none;
}
.kb-star-caption--warn {
  color: #b45309;
  font-weight: 500;
}
.kb-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.kb-preset-chip {
  white-space: normal;
  text-align: left;
  line-height: 1.35 !important;
  max-width: 100%;
  border-radius: var(--radius) !important;
}

/* ═══════════════════════════════════════════════════════
   AM VIEW — overview grid
   ═══════════════════════════════════════════════════════ */
.kb-am-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  padding-bottom: 40px;
}
.kb-am-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  cursor: pointer;
  transition: box-shadow 0.12s, border-color 0.12s;
}
.kb-am-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}
.kb-am-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.kb-am-icon {
  font-size: 18px;
  color: var(--color-primary);
}
.kb-am-card-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}
.kb-am-progress {
  height: 4px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.kb-am-progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.kb-am-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.kb-am-stat {
  display: flex;
  flex-direction: column;
}
.kb-am-stat .n {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}
.kb-am-stat .l {
  font-size: 10px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* AM feature detail */
.kb-am-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.kb-am-detail-body { padding-top: 8px; max-width: 640px; }
.kb-am-feedback-card { background: var(--color-bg); }
.kb-am-field-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.kb-am-field-val { font-size: 14px; }
.kb-am-comment {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text);
  white-space: pre-wrap;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  min-height: 56px;
}

/* ═══════════════════════════════════════════════════════
   AM Settings modal
   ═══════════════════════════════════════════════════════ */
.kb-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}
.kb-settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.kb-settings-dialog {
  position: relative;
  margin: 40px auto;
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 80px);
  overflow: auto;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  padding: 24px;
}
.kb-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}
.kb-settings-head h2 { font-size: 17px; font-weight: 700; }
.kb-settings-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.kb-modal-module {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px;
}
.kb-modal-module-head {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}
.kb-modal-module-list { display: grid; gap: 8px; }
.kb-modal-feature {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.4;
}
.kb-settings-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
