:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-soft: #eff6ff;
  --pass: #15803d;
  --pass-bg: #f0fdf4;
  --pass-border: #bbf7d0;
  --fail: #b91c1c;
  --fail-bg: #fef2f2;
  --fail-border: #fecaca;
  --pending: #a16207;
  --pending-bg: #fffbeb;
  --pending-border: #fde68a;
  --unset: #6b7280;
  --unset-bg: #f9fafb;
  --module-w: 240px;
  --rail-w: 168px;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 13px;
  line-height: 1.5;
}

.app-shell {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.app-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

.app-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px 16px;
  overflow: auto;
}

/* —— 顶栏全宽：logo + 大标题独占一行（深色，与侧栏同系） —— */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  background: #0b1220;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 20px;
  box-shadow: none;
  border-radius: 0;
  flex-shrink: 0;
  min-width: 0;
  z-index: 60;
}

.app-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.app-header-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.app-header-text {
  min-width: 0;
}

.app-header-title {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  color: #f9fafb;
  line-height: 1.35;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.app-user-label {
  font-size: 13px;
  color: #d1d5db;
}

.app-header-actions .app-logout-btn,
.app-header-actions #exec-logout {
  background: transparent;
  color: #f3f4f6;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.app-header-actions .app-logout-btn:hover,
.app-header-actions #exec-logout:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
}

.app-header .header-sub {
  margin: 2px 0 0;
  max-width: none;
  color: #9ca3af;
}

/* —— 侧栏：浅色 Tab + 底部主操作 —— */
.site-rail {
  width: var(--rail-w);
  flex-shrink: 0;
  background: #ffffff;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 10px;
  border-right: 1px solid var(--border);
  z-index: 50;
}

.site-rail-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.site-rail-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
}

.site-rail-link:hover {
  color: var(--text);
  background: var(--bg);
}

.site-rail-link.is-active {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 600;
}

.site-rail-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
}

.site-rail-actions .btn-primary,
.site-rail-actions .btn-default {
  width: 100%;
  justify-content: center;
  text-align: center;
}

@supports (view-transition-name: none) {
  @view-transition {
    navigation: auto;
  }
  .app-header {
    view-transition-name: qa-app-header;
  }
  .site-rail {
    view-transition-name: qa-site-rail;
  }
}

.hidden { display: none !important; }
.required { color: var(--fail); }

/* —— Top bar —— */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.brand {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.brand img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.topbar-meta { min-width: 0; }
.topbar-meta h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 36vw;
}

/* —— 复测链轮次导航（header 副标题下） —— */
.chain-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1;
}
.chain-nav.hidden { display: none; }
.chain-step {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}
a.chain-step { cursor: pointer; }
a.chain-step:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface);
}
.chain-step.is-current {
  color: var(--text);
  font-weight: 600;
  border-color: var(--primary);
  background: var(--primary-soft);
}
.chain-step.is-open { color: var(--text); }
.chain-step-state {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  color: var(--pass);
}
.chain-step.is-open .chain-step-state { color: var(--pending); }
.chain-step-missing {
  color: var(--muted);
  border: 1px dashed var(--border);
  cursor: not-allowed;
  opacity: 0.8;
}
.chain-step-missing .chain-step-name { text-decoration: line-through; }
.chain-sep {
  color: var(--muted);
  font-size: 11px;
  padding: 0 1px;
  opacity: 0.7;
}
@media (max-width: 720px) {
  .chain-nav { font-size: 11px; }
}

.topbar-right,
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  justify-self: end;
  min-height: 36px;
}

.workbench-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg);
  padding: 2px;
  border-radius: 6px;
}

.workbench-tab {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.workbench-tab:hover { color: var(--text); }
.workbench-tab.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow);
}

.tab-badge {
  min-width: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

/* —— Exec strip: 本轮/复测 + 轮次链（概览与筛选之间） —— */
.exec-strip {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: #fafbfc;
}

.exec-strip .exec-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 0;
  border-bottom: none;
  min-width: 0;
  flex: 1;
}

.exec-strip-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.exec-strip .workbench-tabs {
  display: inline-flex;
  flex-direction: row;
  width: auto;
  flex-shrink: 0;
}

.exec-strip .workbench-tab {
  width: auto;
  justify-content: center;
  padding: 6px 12px;
}

.exec-strip .chain-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin-top: 0;
}

.exec-strip .chain-nav.hidden { display: none; }

.exec-strip .chain-sep {
  display: inline;
}

.exec-strip .chain-step {
  width: auto;
  border-radius: 999px;
  padding: 3px 9px;
}

/* —— 测试流转：Review → 首轮执行 → 复测轮… —— */
.flow-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  min-width: 0;
  flex: 1;
  font-size: 12px;
  line-height: 1;
}

.flow-sep {
  color: var(--muted);
  font-size: 11px;
  padding: 0 2px;
  opacity: 0.7;
  user-select: none;
}

.flow-step {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.flow-step:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface);
}

.flow-step.is-current {
  color: var(--text);
  font-weight: 600;
  border-color: var(--primary);
  background: var(--primary-soft);
}

.flow-step.is-open {
  color: var(--text);
}

.flow-step.is-done {
  color: var(--pass);
}

.flow-step-state {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  color: var(--pass);
}

.flow-step.is-open .flow-step-state,
.flow-step.is-current.is-open .flow-step-state {
  color: var(--pending);
}

.flow-step-missing {
  color: var(--muted);
  border: 1px dashed var(--border);
  cursor: not-allowed;
  opacity: 0.8;
  padding: 5px 10px;
  border-radius: 999px;
}

.flow-step-missing .flow-step-name {
  text-decoration: line-through;
}

body.flow-readonly .case-card.is-locked .row-confirm,
body.flow-readonly .case-card.is-locked .verdict-btn {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .flow-nav { font-size: 11px; }
  .flow-step { padding: 4px 8px; }
}

.case-pane.is-retest-empty > .phase-bar,
.case-pane.is-retest-empty > .overview,
.case-pane.is-retest-empty > .toolbar,
.case-pane.is-retest-empty > .filter-context,
.case-pane.is-retest-empty > .bulk-bar,
.case-pane.is-retest-empty > .case-list-wrap {
  display: none !important;
}

/* —— Site nav (legacy class kept for safety; rail is primary) —— */
.site-nav {
  display: none;
}

.site-nav-link {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.site-nav-link.is-active {
  color: var(--text);
  background: var(--surface);
  font-weight: 600;
}

/* —— Phase bar (Review → Execute) —— */
.phase-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  box-shadow: var(--shadow);
}

.case-pane > .phase-bar {
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  flex-shrink: 0;
}

.phase-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}

.phase-sep {
  color: var(--muted);
  font-size: 12px;
}

.phase-step {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: default;
}

button.phase-step {
  cursor: pointer;
}

button.phase-step:hover {
  background: var(--bg);
  color: var(--text);
}

.phase-step.done {
  color: var(--pass);
  font-weight: 600;
}

.phase-step.active {
  background: var(--primary-soft);
  border-color: #bfdbfe;
  color: var(--primary);
  font-weight: 650;
}

.phase-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ov-banner {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ov-banner.exec {
  background: var(--primary);
}

/* 收尾态徽章：已完成 / 已定稿（绿），与绿色提示条同色系，不再与「执行中」矛盾 */
.ov-banner.done {
  background: var(--pass);
}

.origin-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: #f3f4f6;
  color: #374151;
}

.origin-badge.origin-ai {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}

.origin-badge.origin-ai-edited {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.origin-badge.origin-human {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.badge-review-pending {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}

.badge-review-reviewed,
.badge-review-confirmed {
  background: var(--pass-bg);
  color: var(--pass);
  border-color: var(--pass-border);
}

.badge-review-modified {
  background: var(--pending-bg);
  color: var(--pending);
  border-color: var(--pending-border);
}

.review-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 96px;
}

.review-btns .active-soft,
.verdict-btns .active-soft {
  box-shadow: inset 0 0 0 1px currentColor;
}

.module-pending-review {
  color: #9a3412;
  font-weight: 600;
}

.case-basis {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border-radius: 6px;
  border: 1px dashed var(--border);
}

.case-basis summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  user-select: none;
}

.case-basis .block-text {
  margin-top: 6px;
  white-space: pre-wrap;
}

body.mode-review .case-card.rs-pending {
  border-left: 3px solid #f59e0b;
}

body.mode-execute .case-card.is-unset {
  border-left: 3px solid #93c5fd;
}

/* —— Overview —— */
.overview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  box-shadow: var(--shadow);
}

.case-pane > .overview {
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  flex-shrink: 0;
}

.ov-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.ov-item strong {
  font-size: 16px;
  font-weight: 650;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.ov-item.pass strong { color: var(--pass); }
.ov-item.fail strong { color: var(--fail); }
.ov-item.pending strong { color: var(--pending); }
.ov-item.unset strong { color: var(--unset); }

.ov-progress {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.ov-bar {
  flex: 1;
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.ov-bar > span {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
}

.ov-rate {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* —— Workspace —— */
.workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.module-pane {
  width: var(--module-w);
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.module-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.module-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.module-nav {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

.module-group { margin-bottom: 2px; }

.module-group-btn,
.module-leaf {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}

.module-group-btn {
  padding: 8px 12px;
  font-weight: 600;
  font-size: 12px;
}

.module-group-btn:hover { background: var(--bg); }

.module-chevron {
  width: 12px;
  color: var(--muted);
  font-size: 10px;
  flex-shrink: 0;
}

.module-leaf {
  padding: 7px 12px 7px 28px;
  border-left: 2px solid transparent;
}

.module-leaf:hover { background: var(--primary-soft); color: var(--primary); }

.module-leaf.active {
  background: var(--primary-soft);
  border-left-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.module-leaf-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-leaf-meta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

.module-mini-bar {
  width: 36px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.module-mini-bar > span {
  display: block;
  height: 100%;
  background: var(--pass);
}

.module-nav-empty {
  padding: 20px 12px;
  color: var(--muted);
  font-size: 12px;
}

.case-pane {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* —— Toolbar —— */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.toolbar-spacer { flex: 1; min-width: 8px; }

.filter-input {
  width: 200px;
  height: 32px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font: inherit;
  background: #fff;
}

.filter-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* 状态下拉多选：与左侧搜索框同高同边框 */
.status-filter {
  position: relative;
  flex-shrink: 0;
}

.status-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  max-width: 220px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.status-filter-btn:hover {
  border-color: #cbd5e1;
}

.status-filter.is-open .status-filter-btn,
.status-filter-btn:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.status-filter-btn #status-filter-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-filter-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted);
  flex-shrink: 0;
}

.status-filter.is-open .status-filter-caret {
  transform: rotate(180deg);
}

.status-filter-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 40;
  min-width: 100%;
  width: max-content;
  max-width: 260px;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.status-filter-menu.hidden {
  display: none;
}

.status-filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.status-filter-option:hover {
  background: var(--bg);
}

.status-filter-option input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.view-btn {
  border: none;
  background: #fff;
  padding: 5px 10px;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}

.view-btn + .view-btn { border-left: 1px solid var(--border); }
.view-btn.active {
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
}

/* —— Bulk bar —— */
.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.bulk-select-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}

.bulk-count {
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
  margin-right: 4px;
}

.danger-text { color: var(--fail) !important; }

/* —— Case list —— */
.case-list-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.case-list {
  flex: 1;
  padding: 8px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.case-card {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.case-card:hover { border-color: var(--border-strong); }

.case-card.is-pass { border-left: 3px solid var(--pass); }
.case-card.is-fail { border-left: 3px solid var(--fail); background: #fffbfb; }
.case-card.is-pending { border-left: 3px solid var(--pending); }
.case-card.is-unset { border-left: 3px solid transparent; }
.case-card.is-new { background: #f8fbff; border-color: #bfdbfe; }
.case-card.is-expanded { border-color: #93c5fd; box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08); }

.case-card-main {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 10px 12px;
}

.case-check {
  margin-top: 3px;
}

.case-body { min-width: 0; }

.case-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.case-expand {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

.case-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.case-meta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid transparent;
}

.badge-pass { background: var(--pass-bg); color: var(--pass); border-color: var(--pass-border); }
.badge-fail { background: var(--fail-bg); color: var(--fail); border-color: var(--fail-border); }
.badge-pending { background: var(--pending-bg); color: var(--pending); border-color: var(--pending-border); }
.badge-unset { background: var(--unset-bg); color: var(--unset); border-color: var(--border); }

.case-id {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.primary-hint {
  font-size: 11px;
  color: var(--muted);
}

.case-preview {
  margin-top: 4px;
  display: grid;
  gap: 2px;
  font-size: 12px;
  color: var(--muted);
}

.case-preview-one .case-preview-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.case-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  align-items: center;
}

.review-gate-actions {
  flex-direction: column;
  align-items: stretch;
}

.review-gate-actions .btn-primary,
.review-gate-actions .btn-default {
  width: 100%;
  justify-content: center;
}

.confirm-filtered-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}

.confirm-filtered-count {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.confirm-filtered-btn.is-empty,
.confirm-filtered-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.confirm-filtered-btn.btn-primary:disabled {
  filter: none;
}

.exec-now-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.case-card.is-current-exec {
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
  background: #f8fbff;
}

.case-card.is-current-exec .case-actions .verdict-btn {
  min-height: 34px;
  font-weight: 650;
}

.case-card.exec-flash {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
  transition: box-shadow 0.3s ease;
}

.exec-empty-hint {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 12px;
}

/* Floating status / toast: never affect document flow (avoids page jump). */
.draft-hint,
.exec-advance-hint {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  max-width: min(640px, calc(100vw - 32px));
  margin: 0;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
  pointer-events: none;
}

.draft-hint {
  top: auto;
  bottom: 24px;
}

.exec-advance-hint {
  display: none;
  top: auto;
  bottom: 72px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #f8fafc;
  font-size: 13px;
}

.exec-advance-hint.is-on {
  display: block;
}

.draft-hint {
  color: #92400e;
  background: var(--pending-bg);
  border: 1px solid var(--pending-border);
}

/* 用例库漂移告示：Amber 提示色 */
.snapshot-hint {
  margin: 0;
  padding: 7px 14px;
  border: 1px solid var(--pending-border);
  border-left: 3px solid var(--pending);
  background: var(--pending-bg);
  color: var(--pending);
  border-radius: var(--radius);
  font-size: 12px;
  line-height: 1.6;
  box-shadow: var(--shadow);
}

.tapd-done {
  font-size: 11px;
  color: var(--muted);
}

.danger-text {
  color: var(--fail) !important;
}

.case-card.mode-review-card .case-actions {
  min-width: 88px;
}

.case-preview-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.case-preview-line em {
  font-style: normal;
  color: #9ca3af;
  margin-right: 4px;
}

.case-detail {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  display: grid;
  gap: 8px;
}

.case-block h4 {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.case-block pre,
.case-block .block-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  font-size: 12px;
  color: var(--text);
  line-height: 1.55;
}

.case-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 148px;
}

.verdict-btns {
  display: flex;
  gap: 4px;
}

.verdict-btn {
  flex: 1;
  min-width: 0;
  padding: 5px 0;
  font-size: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.verdict-btn:hover { border-color: var(--primary); color: var(--primary); }

.verdict-btn.active.verdict-pass {
  background: var(--pass-bg);
  border-color: var(--pass);
  color: var(--pass);
  font-weight: 600;
}

.verdict-btn.active.verdict-fail {
  background: var(--fail-bg);
  border-color: var(--fail);
  color: var(--fail);
  font-weight: 600;
}

.verdict-btn.active.verdict-pending {
  background: var(--pending-bg);
  border-color: var(--pending);
  color: var(--pending);
  font-weight: 600;
}

/* 整链定稿只读：判定按钮弱化锁定（row-confirm 走 btn-primary:disabled 弱化） */
.case-card.is-locked .verdict-btn {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 执行硬锁（进行中 AI 轮未确认的卡）：verdict / 补缺陷按钮禁用弱化（保留 hover 出 tooltip） */
.case-card .verdict-btn:disabled,
.case-card .verdict-btn:disabled:hover {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: var(--border-strong);
  color: var(--text);
  background: #fff;
}
.case-card .row-tapd:disabled,
.case-card .row-tapd:disabled:hover {
  opacity: 0.45;
  cursor: not-allowed;
}

.case-more {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.link-btn,
.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-size: 12px;
}

.link-btn:hover,
.btn-link:hover { text-decoration: underline; }

.btn-link.danger { color: var(--fail); }

/* Buttons */
.btn-primary,
.btn-default {
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  font: inherit;
}

.btn-sm { padding: 5px 10px; font-size: 12px; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}

a.btn-primary,
a.btn-default {
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
}

.btn-primary:hover:not(:disabled) { filter: brightness(1.05); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-default {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-default:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-default:disabled { opacity: 0.5; cursor: not-allowed; }

/* Empty / loading */
.empty-state,
.loading-state {
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* 加载中：外框/模块栏/概览/流转条/筛选条都留着，只换用例列表，避免错位跳动 */
body.is-session-loading .exec-strip-actions,
body.is-session-loading .bulk-bar,
body.is-session-loading .pagination,
body.is-content-loading .exec-strip-actions,
body.is-content-loading .bulk-bar,
body.is-content-loading .pagination {
  display: none !important;
}

body.is-session-loading .case-list-wrap,
body.is-content-loading .case-list-wrap {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.is-session-loading .flow-nav,
body.is-content-loading .flow-nav,
body.is-session-loading .module-pane,
body.is-content-loading .module-pane,
body.is-session-loading .overview,
body.is-content-loading .overview,
body.is-session-loading .toolbar,
body.is-content-loading .toolbar {
  pointer-events: none;
  opacity: 0.85;
}

.app-main-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 48px 16px;
  color: var(--muted);
  font-size: 13px;
}

.retest-empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.page-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font: inherit;
}

.page-btn:hover:not(:disabled) { color: var(--primary); border-color: var(--primary); }
.page-btn.active { color: #fff; background: var(--primary); border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: flex;
  justify-content: flex-end;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
}

.drawer-panel {
  position: relative;
  width: min(440px, 100%);
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 24px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
}

.drawer-header,
.drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.drawer-footer {
  border-bottom: none;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
  gap: 8px;
}

.drawer-header h2 {
  margin: 0;
  font-size: 15px;
}

.drawer-heading {
  min-width: 0;
}

.drawer-progress {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}

.drawer-progress-sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}

.drawer-hint {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.drawer-footer-right {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.drawer-close {
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.form-input,
.form-textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Modal / Bug modal (保留既有交互) */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.modal-box {
  background: #fff;
  padding: 22px;
  border-radius: 8px;
  min-width: 340px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.modal-box h2 { margin: 0 0 8px; font-size: 16px; }
.modal-actions { display: flex; gap: 8px; margin-top: 18px; }
.modal-retest-note { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.modal-summary {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.04);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-line;
}

/* 整链定稿面板：不可逆语义，Amber 强调 */
#settle-modal .modal-box { border-top: 3px solid var(--pending); }
#settle-modal h2 { color: var(--pending); }
#settle-modal .modal-retest-note {
  color: var(--pending);
  font-weight: 500;
}

.bug-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.bug-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.bug-modal.is-open .bug-modal-backdrop { opacity: 1; }

.bug-modal-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(860px, 92vh);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  transform: translateY(8px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.bug-modal.is-open .bug-modal-panel {
  transform: translateY(0);
  opacity: 1;
}

.bug-modal-header,
.bug-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  flex-shrink: 0;
}

.bug-modal-header { border-bottom: 1px solid var(--border); }
.bug-modal-footer { border-top: 1px solid var(--border); justify-content: flex-end; }

.bug-modal-header h2 { margin: 0; font-size: 15px; }
.bug-modal-ref { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.bug-modal-close {
  border: none;
  background: none;
  font-size: 22px;
  color: var(--muted);
  cursor: pointer;
}

.bug-modal-body {
  padding: 12px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.bug-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(110px, 0.6fr) minmax(110px, 0.6fr);
  gap: 10px;
}

.bug-bind-panel {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
}
.bug-bind-panel.hidden { display: none; }
.bug-bind-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
}
.bug-bind-message {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.bug-owner-wrap {
  position: relative;
}
.bug-owner-dropdown {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.bug-owner-dropdown.hidden { display: none; }
.bug-owner-option {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
}
.bug-owner-option:hover,
.bug-owner-option:focus {
  background: rgba(0, 0, 0, 0.04);
}
.bug-bind-steps {
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.bug-bind-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
#bug-form-panel.hidden { display: none; }

.bug-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.bug-field-detail {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.bug-input,
.bug-textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

.bug-textarea-detail {
  flex: 1 1 auto;
  min-height: 220px;
  resize: none;
  line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
}

.bug-input.is-error,
.bug-textarea.is-error { border-color: var(--fail); }
.bug-field-hint { margin: 4px 0 0; font-size: 11px; color: var(--muted); }
.bug-field-error {
  margin: 0;
  font-size: 12px;
  color: var(--fail);
  flex-shrink: 0;
}
.bug-field-error.hidden { display: none; }
.bug-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .bug-field-row { grid-template-columns: 1fr; }
  .bug-meta-grid { grid-template-columns: 1fr; }
  .bug-textarea-detail { min-height: 160px; }
}
.bug-field select.bug-input {
  appearance: auto;
  cursor: pointer;
}

.report-modal-panel {
  width: min(720px, 100%);
  max-height: min(900px, 94vh);
}
.report-modal-body {
  overflow: auto;
}
.report-readonly {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  background: #f7f8fa;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  max-height: 140px;
  overflow: auto;
  white-space: pre-wrap;
}
.report-readonly a { color: var(--accent, #0052cc); }

.btn-submit-tapd { min-width: 96px; }
.bug-modal-footer { flex-wrap: wrap; }
#bug-fail-only-btn { margin-right: auto; }

.exec-note-hint {
  display: inline-block;
  max-width: 100%;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.case-exec-note {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.03);
  font-size: 13px;
  line-height: 1.45;
}
.case-exec-note strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.bug-ref-link { font-weight: 600; }

/* Detail mode: always show detail blocks */
.case-list.detail-mode .case-preview { display: none; }
.case-list.detail-mode .case-detail { display: grid !important; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.case-list.detail-mode .case-expand { visibility: hidden; }

/* Responsive */
@media (max-width: 960px) {
  .workspace { flex-direction: column; }
  .module-pane {
    width: 100%;
    max-height: 160px;
  }
  .module-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
  }
  .module-group { width: 100%; }
  .module-leaf {
    padding-left: 12px;
    border-left: none;
    border-radius: 6px;
  }
  .case-card-main {
    grid-template-columns: 24px minmax(0, 1fr);
  }
  .case-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
  }
  .verdict-btns { flex: 1; }
  .ov-progress { width: 100%; margin-left: 0; }
  .header-sub { max-width: 40vw; }
}

@media (max-width: 640px) {
  .app-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
  .app-body {
    flex-direction: column;
    overflow: visible;
  }
  .site-rail {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 10px;
    gap: 8px;
  }
  .site-rail-nav {
    flex-direction: row;
    flex: 1;
  }
  .site-rail-link {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
  }
  .site-rail-actions {
    margin-top: 0;
    width: 100%;
    flex-direction: row;
    padding-top: 0;
  }
  .app-main { padding: 8px; }
  .filter-input { width: 100%; }
}

/* —— Board —— */
.page-context-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}

body.board-shell .site-rail-actions[hidden] {
  display: none !important;
}

.board-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  flex-shrink: 0;
}

.board-card {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 72px;
}

.board-card:hover {
  border-color: var(--border-strong);
}

.board-card.is-active {
  border-color: #93c5fd;
  background: var(--primary-soft);
}

.board-card-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.board-card-value {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.2;
}

.board-card-hint {
  font-size: 11px;
  color: var(--muted);
}

.board-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.board-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.board-filter select {
  min-width: 140px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.board-filter-check .board-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

.board-empty,
.board-error {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  flex-shrink: 0;
}

.board-error {
  color: var(--fail);
  border-color: var(--fail-border);
  background: var(--fail-bg);
}

.board-table-wrap {
  flex: 1;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: auto;
}

.board-table-wrap.is-empty,
.board-table-wrap:has(#board-empty:not(.hidden)),
.board-table-wrap:has(#platform-empty:not(.hidden)),
.board-table-wrap:has(#platform-projects-empty:not(.hidden)),
.board-table-wrap:has(#bugs-empty:not(.hidden)),
.board-table-wrap:has(#users-empty:not(.hidden)) {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.board-table-wrap.is-empty .board-table,
.board-table-wrap:has(#board-empty:not(.hidden)) .board-table,
.board-table-wrap:has(#platform-empty:not(.hidden)) .board-table,
.board-table-wrap:has(#platform-projects-empty:not(.hidden)) .board-table,
.board-table-wrap:has(#bugs-empty:not(.hidden)) .board-table,
.board-table-wrap:has(#users-empty:not(.hidden)) .board-table {
  display: none;
}

.board-empty-center {
  margin: 0;
  padding: 48px 16px;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.board-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.board-table th,
.board-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

.board-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: #fafafa;
  position: sticky;
  top: 0;
  z-index: 1;
}

.board-table tbody tr:last-child td {
  border-bottom: none;
}

.board-table tbody tr:hover td {
  background: #fafbfd;
}

.board-group-header td {
  background: #f3f4f6 !important;
  font-weight: 600;
  padding-top: 12px;
  padding-bottom: 8px;
}

.board-group-title {
  margin-right: 10px;
}

.board-group-meta {
  font-weight: 400;
  font-size: 12px;
}

.board-row-child td {
  background: #fcfcfd;
}

.board-tree-root,
.board-tree-child {
  font-weight: 600;
}

.board-tree-child {
  color: var(--muted);
  padding-left: 8px;
}

.board-table .board-suite {
  font-weight: 600;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-table .mono {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

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

.board-table .num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.board-table .num.pass { color: var(--pass); }
.board-table .num.fail { color: var(--fail); }
.board-table .num.pending { color: var(--pending); }
.board-table .num.bug { color: #9a3412; }

.board-bug-btn {
  appearance: none;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border-radius: 999px;
  min-width: 28px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 12px;
}

.board-bug-btn:hover {
  border-color: #fdba74;
}

.board-bug-detail-row td {
  background: #fffaf5 !important;
  white-space: normal;
  padding: 8px 16px 12px 28px;
}

.board-bug-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
}

.board-bug-list li { margin: 4px 0; }

.board-bug-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.board-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.board-status-progress {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: #bfdbfe;
}

.board-status-retest {
  color: var(--pending);
  background: var(--pending-bg);
  border-color: var(--pending-border);
}

.board-status-done {
  color: var(--muted);
  background: var(--unset-bg);
  border-color: var(--border);
}

.board-actions {
  white-space: nowrap;
}

.board-actions a,
.board-actions button {
  text-decoration: none;
  display: inline-block;
  vertical-align: middle;
}

.board-delete-btn {
  color: #b42318;
  border-color: #fecdca;
}

.board-delete-btn:hover:not(:disabled) {
  background: #fef3f2;
  border-color: #f97066;
}

@media (max-width: 900px) {
  .board-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-table .board-suite { max-width: 140px; }
}

@media (max-width: 640px) {
  .board-summary { grid-template-columns: 1fr 1fr; }
}

/* —— 复测池组成说明条 + 当前筛选上下文条（新入口防懵） —— */
.retest-pool-strip {
  margin: 0;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--pending);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  font-size: 12px;
  line-height: 1.6;
  box-shadow: var(--shadow);
}

.filter-context {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 5px 12px;
  background: var(--unset-bg);
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
}

.filter-context .fc-part { font-weight: 600; color: var(--text); }
.filter-context .fc-sep { color: var(--border-strong); }
.filter-context .fc-count { margin-left: auto; white-space: nowrap; }

/* —— 平台登录页（独立壳，不走执行台顶栏） —— */
.login-page {
  min-height: 100vh;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #1a2332;
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(14, 165, 233, 0.16), transparent 55%),
    radial-gradient(900px 500px at 90% 110%, rgba(250, 204, 21, 0.14), transparent 50%),
    #eef2f6;
}

.login-corner {
  position: fixed;
  top: 24px;
  left: 32px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #0f172a;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.login-corner img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: block;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.16);
}

.login-corner:hover {
  color: #0284c7;
}

.login-stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  box-sizing: border-box;
}

.login-panel {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: stretch;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 20px 40px rgba(15, 23, 42, 0.1);
}

.login-brand,
.login-form-pane {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 520px;
  padding: 56px 48px;
}

.login-brand {
  position: relative;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 18px;
  padding-top: 48px;
  padding-left: 44px;
  color: #0f172a;
  background: linear-gradient(165deg, #dff3fb 0%, #d0ebf7 45%, #f6e9a6 100%);
  overflow: hidden;
}

.login-form-pane {
  justify-content: flex-start;
  align-items: stretch;
  background: #fff;
  padding: 56px 52px 48px;
  border-left: 1px solid #eef2f7;
}

.login-brand::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -48px;
  width: 200px;
  height: 200px;
  border-radius: 42% 58% 52% 48%;
  background: rgba(14, 165, 233, 0.14);
  pointer-events: none;
}

.login-brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.22);
  position: relative;
  z-index: 1;
}

.login-brand-title {
  margin: 0;
  font-size: 32px;
  font-weight: 750;
  line-height: 1.28;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.login-brand-desc {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: #475569;
  position: relative;
  z-index: 1;
}

.login-form {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.login-form-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.login-form-hello {
  margin: 0;
  font-size: 28px;
  font-weight: 750;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.login-form-accent {
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
}

.login-form-hint {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #64748b;
}

.login-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-label {
  font-size: 13px;
  font-weight: 650;
  color: #334155;
}

.login-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  font-size: 15px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-input::placeholder {
  color: #94a3b8;
}

.login-input:hover {
  border-color: #c5d3e2;
}

.login-input:focus {
  outline: none;
  background: #fff;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.login-submit {
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 100%);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.28);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.login-submit:hover:not(:disabled) {
  filter: brightness(1.04);
}

.login-submit:active:not(:disabled) {
  transform: translateY(1px);
}

.login-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.login-error {
  margin: -8px 0 0;
  font-size: 13px;
  color: #dc2626;
}

.admin-perm-toast {
  position: fixed;
  left: 50%;
  top: 16px;
  z-index: 1200;
  box-sizing: border-box;
  max-width: min(360px, calc(100vw - 24px));
  margin: 0;
  padding: 9px 14px;
  border-radius: 4px;
  border: 1px solid #ffccc7;
  background: #fff2f0;
  color: #cf1322;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  transform: translate(-50%, -6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.admin-perm-toast.is-on {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.login-page .hidden {
  display: none !important;
}

@media (max-width: 820px) {
  .login-panel {
    grid-template-columns: 1fr;
  }

  .login-brand,
  .login-form-pane {
    min-height: 0;
    padding: 36px 28px;
  }

  .login-brand-title {
    font-size: 26px;
  }
}

/* 兼容旧类名（若其它页误引用） */
.login-shell .app-body {
  justify-content: center;
}

.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 24px;
}

.login-card {
  width: min(400px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-title {
  margin: 0;
  font-size: 20px;
}

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

.login-card .form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.platform-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

/* —— 管理后台独立壳（含侧栏 Tab，与执行端分离） —— */
.admin-shell {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg, #f3f4f6);
  overflow: hidden;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: #0b1220;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.admin-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-header-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.admin-header-title {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  color: #f9fafb;
  line-height: 1.3;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.admin-user-label {
  font-size: 13px;
  color: #d1d5db;
}

.admin-header-actions .admin-logout-btn,
.admin-header-actions #platform-logout {
  background: transparent;
  color: #f3f4f6;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.admin-header-actions .admin-logout-btn:hover,
.admin-header-actions #platform-logout:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
}

.admin-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

.admin-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 16px 20px 24px;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.admin-main > .platform-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.admin-main > .platform-panel > .board-table-wrap {
  flex: 1;
  min-height: 220px;
}

.users-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  min-width: 160px;
}

.users-field-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text);
  min-width: auto;
  padding-bottom: 6px;
}

.users-actions {
  white-space: nowrap;
}

.users-create-modal-panel {
  width: min(420px, calc(100vw - 32px));
  transform: translateY(16px) scale(0.96);
  opacity: 0;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease;
}

#users-create-modal.is-open .users-create-modal-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

#users-create-modal .bug-modal-backdrop {
  transition: opacity 0.28s ease;
}

#users-create-open {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

#users-create-open:active {
  transform: scale(0.96);
}

.users-create-modal-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.users-create-modal-form .bug-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.users-create-modal-form .users-field {
  min-width: 0;
  width: 100%;
}

.users-create-modal-form .filter-input {
  width: 100%;
}

.platform-panel-head h2 {
  margin: 0;
  font-size: 16px;
  flex: 1;
  min-width: 0;
}

.platform-panel-head .btn-default {
  flex-shrink: 0;
}

.platform-user {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--muted);
}

.platform-meta {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
}

.platform-stats {
  margin: 8px 0 16px;
  flex-shrink: 0;
}

.platform-detail-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.platform-filter-bar.toolbar {
  padding: 0 0 12px;
  margin: 0 0 14px;
  border: 0;
  border-bottom: 0;
  background: transparent;
}

.platform-filter-count {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.platform-cases-board {
  flex: 1;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.platform-cases-board-head {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.platform-cases-board-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.platform-cases-board .platform-cases {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 10px 12px 14px;
  gap: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.platform-dials {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px 16px;
  width: 100%;
  max-width: none;
  justify-items: center;
}

.platform-dial {
  --p: 0;
  --dial-color: #2563eb;
  --dial-track: #e5e7eb;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.platform-dial-ring {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(
    var(--dial-color) 0 calc(var(--p) * 1%),
    var(--dial-track) calc(var(--p) * 1%) 100%
  );
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.platform-dial-ring::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.platform-dial-value {
  position: relative;
  z-index: 1;
  font-size: 26px;
  font-weight: 750;
  line-height: 1;
  color: var(--text);
}

.platform-dial-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.platform-dial.tone-count {
  --dial-color: #2563eb;
  --dial-track: #e5e7eb;
}
.platform-dial.tone-progress {
  --dial-color: #059669;
  --dial-track: #e5e7eb;
}
.platform-dial.tone-pass {
  --dial-color: #16a34a;
  --dial-track: #e5e7eb;
}
.platform-dial.tone-fail {
  --dial-color: #dc2626;
  --dial-track: #e5e7eb;
}
.platform-dial.tone-blocked {
  --dial-color: #7c3aed;
  --dial-track: #e5e7eb;
}
.platform-dial.tone-retest {
  --dial-color: #d97706;
  --dial-track: #e5e7eb;
}

/* 无填充：整圈灰色，避免浅色底被当成已拉满 */
.platform-dial.is-empty {
  --dial-color: #9ca3af;
  --dial-track: #e5e7eb;
}
.platform-dial.is-empty .platform-dial-value {
  color: #6b7280;
}
.platform-dial:not(.is-empty) .platform-dial-value {
  color: var(--dial-color);
}

.platform-run-hint {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.platform-case-verdict-tag {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.platform-case-card[data-verdict="pass"] .platform-case-verdict-tag { color: #059669; }
.platform-case-card[data-verdict="fail"] .platform-case-verdict-tag { color: #dc2626; }
.platform-case-card[data-verdict="blocked"] .platform-case-verdict-tag { color: #d97706; }

.platform-case-bug-block .platform-case-bug-content {
  margin: 4px 0 0;
  padding: 8px 10px;
  background: var(--unset-bg);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

.platform-case-bug-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.platform-case-bug-link:hover {
  text-decoration: underline;
}

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

.platform-verdict-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: 6px;
  padding: 5px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.platform-verdict-btn:hover { background: var(--unset-bg); }
.platform-verdict-btn.is-active {
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 1200px) {
  .platform-dials { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .platform-dials { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.platform-cases {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.platform-case-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  flex: 0 0 auto;
}

.platform-case-toggle {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  cursor: pointer;
}

.platform-case-toggle:hover {
  background: var(--unset-bg);
}

.platform-case-chevron {
  flex: 0 0 auto;
  width: 0.55em;
  height: 0.55em;
  margin-top: 0.45em;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.platform-case-card:not(.is-collapsed) .platform-case-chevron {
  margin-top: 0.55em;
  transform: rotate(-135deg);
}

.platform-case-title {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
  color: var(--text);
}

.platform-case-title strong {
  color: var(--text);
  font-weight: 650;
}

.platform-case-card .muted {
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
}

.platform-case-body {
  padding: 0 14px 14px 34px;
}

.platform-case-card.is-collapsed .platform-case-body {
  display: none;
}

.platform-case-block {
  margin-top: 8px;
}

.platform-case-block:first-child {
  margin-top: 0;
}

.platform-case-block pre {
  margin: 4px 0 0;
  padding: 8px 10px;
  background: var(--unset-bg);
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.5;
}

