/* ==========================================================================
   IRB Copilot / SmartRec 知情同意书生成器 - 专业临床医学设计系统
   遵循 DESIGN.md：严肃、严谨、安静留白、精细微质感、去除浮夸廉价感
   ========================================================================== */

:root {
  /* 背景与表面 */
  --bg-app: #F8FAFC;
  --surface: #FFFFFF;
  --surface-subtle: #F1F5F9;
  --surface-hover: #F8FAFC;

  /* 边框体系 */
  --border-light: rgba(226, 232, 240, 0.8);
  --border-default: #E2E8F0;
  --border-strong: #CBD5E1;

  /* 严肃高对比文字体系 (Slate 系列) */
  --text-title: #0F172A;        /* Slate 900 */
  --text-body: #334155;         /* Slate 700 */
  --text-secondary: #64748B;    /* Slate 500 */
  --text-muted: #94A3B8;        /* Slate 400 */

  /* 核心临床医学科技深蓝主色 (Clinical Medical Tech Blue) */
  --primary: #1D4ED8;
  --primary-hover: #1E40AF;
  --primary-active: #172554;
  --primary-subtle: #EFF6FF;
  --primary-border: #BFDBFE;
  --primary-glow: rgba(29, 78, 216, 0.15);

  /* 临床警示与待人工确认 (Clinical Amber) */
  --warning: #B45309;
  --warning-subtle: #FFFBEB;
  --warning-border: #FDE68A;

  /* 错误与删除 (Subtle Crimson) */
  --danger: #BE123C;
  --danger-subtle: #FFF1F2;
  --danger-border: #FECDD3;

  /* 文件类型色彩标签 */
  --file-pdf: #BE123C;
  --file-pdf-bg: #FFF1F2;
  --file-docx: #1D4ED8;
  --file-docx-bg: #EFF6FF;
  --file-txt: #475569;
  --file-txt-bg: #F1F5F9;

  /* 阴影系统 */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 5px -1px rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 6px 18px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -2px rgba(15, 23, 42, 0.03);
  --shadow-dropdown: 0 14px 36px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.05);

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-card: 16px;

  /* 外壳尺寸 */
  --header-height: 60px;
  --stepper-height: 56px;
  --footer-height: 66px;
}

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

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-app);
  color: var(--text-body);
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 数字等宽排版 */
.num-tabular, [data-tabular] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* 外壳主容器 */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background-color: var(--bg-app);
}

/* ==========================================================================
   1. 顶部页头 (Header) - 精英临床医学气质
   ========================================================================== */
.app-header {
  height: var(--header-height);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-default);
  background-color: var(--surface);
  padding: 0 32px;
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-title);
}

.brand-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25);
}

.brand-name-group {
  display: flex;
  flex-direction: column;
}

.brand-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-title);
}

.brand-badge {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--primary);
  background-color: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  padding: 1px 6px;
  border-radius: 4px;
}

.brand-subtext {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-demo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--surface-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-demo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.btn-header-help {
  background-color: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-header-help:hover {
  background-color: var(--surface-hover);
  color: var(--text-title);
  border-color: var(--border-strong);
}

/* ==========================================================================
   2. 横向步骤导航条 (Stepper Bar) - 胶囊里程碑
   ========================================================================== */
.stepper-bar {
  height: var(--stepper-height);
  flex-shrink: 0;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  z-index: 90;
}

.stepper-track {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 880px;
  width: 100%;
  justify-content: space-between;
}

.step-nav-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: default;
  padding: 6px 14px;
  border-radius: 24px;
  color: var(--text-muted);
  transition: all 0.2s ease;
  outline: none;
}

.step-nav-btn.completed {
  cursor: pointer;
  color: var(--text-body);
}

.step-nav-btn.completed:hover {
  background-color: var(--surface-subtle);
  color: var(--text-title);
}

.step-nav-btn.active {
  cursor: default;
  color: var(--primary);
  background-color: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  font-weight: 600;
}

.step-nav-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--surface-subtle);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.step-nav-btn.completed .step-nav-num {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.step-nav-btn.active .step-nav-num {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.step-nav-content {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.step-nav-label {
  font-size: 13px;
  line-height: 1.2;
}

.step-nav-subtext {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.step-nav-btn.active .step-nav-subtext {
  color: var(--primary);
  opacity: 0.85;
}

.step-nav-divider {
  flex: 1;
  height: 2px;
  background-color: var(--border-default);
  min-width: 32px;
  border-radius: 1px;
  transition: background-color 0.25s ease;
}

.step-nav-divider.completed {
  background-color: var(--primary);
}

/* ==========================================================================
   3. 中央舞台 (App Stage) & 屏幕独立滚动
   ========================================================================== */
.app-stage {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-app);
}

.step-screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 28px 36px 36px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(0);
  transition: opacity 220ms ease, transform 220ms ease;
  display: flex;
  flex-direction: column;
}

.step-screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  z-index: 2;
}

.step-screen.slide-out-left {
  opacity: 0;
  transform: translateX(-32px);
  pointer-events: none;
}

.step-screen.slide-in-right {
  opacity: 0;
  transform: translateX(32px);
  pointer-events: none;
}

.step-screen.hidden {
  display: none !important;
}

/* 通用严肃临床卡片 */
.card {
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-step-badge {
  background-color: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
}

.card-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-title);
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ==========================================================================
   第一屏：资料与标准 (Screen 1)
   ========================================================================== */
.screen-1-container {
  max-width: 1060px;
  margin: 0 auto;
  width: 100%;
}

.screen-header-brief {
  text-align: center;
  margin-bottom: 24px;
}

.screen-header-brief h2 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-title);
}

.screen-header-brief p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.screen-1-grid {
  display: grid;
  grid-template-columns: 1.18fr 1fr;
  gap: 22px;
  align-items: start;
}

.screen-1-single-card-wrap {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

.standard-config-card {
  margin-bottom: 22px;
  border-left: 3.5px solid var(--primary);
  background: var(--surface);
  transition: all 0.2s ease;
}

.standard-config-card:hover {
  box-shadow: var(--shadow-md);
}

/* 资料上传区 Hub */
.dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 26px 20px;
  text-align: center;
  background-color: var(--surface-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.dropzone:hover, .dropzone.drag-over {
  border-color: var(--primary);
  background-color: var(--primary-subtle);
}

.dropzone:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.dropzone-icon-box {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

.dropzone-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-title);
}

.dropzone-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.chip-format {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.chip-format.pdf {
  color: var(--file-pdf);
  background-color: var(--file-pdf-bg);
  border: 1px solid #FECDD3;
}

.chip-format.docx {
  color: var(--file-docx);
  background-color: var(--file-docx-bg);
  border: 1px solid #BFDBFE;
}

.chip-format.txt {
  color: var(--file-txt);
  background-color: var(--file-txt-bg);
  border: 1px solid #CBD5E1;
}

.dropzone-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 8px;
}

.upload-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.btn-demo-pill {
  background: var(--surface);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 20px;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}

.btn-demo-pill:hover {
  background-color: var(--primary-subtle);
  border-color: var(--primary);
}

/* 文件列表（内部滚动条，不撑满整屏） */
.files-list {
  margin-top: 16px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background-color: var(--surface);
  overflow-y: auto;
  max-height: 230px;
  box-shadow: var(--shadow-xs);
}

.file-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
  transition: background-color 0.15s ease;
}

.file-item:last-child {
  border-bottom: none;
}

.file-item:hover {
  background-color: var(--surface-hover);
}

.file-badge-type {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.file-status-tag {
  color: var(--primary);
  background-color: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.primary-badge-btn {
  background: var(--surface-subtle);
  border: 1px solid var(--border-default);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

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

.primary-badge-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(29, 78, 216, 0.3);
}

.file-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: all 0.15s ease;
}

.file-remove-btn:hover {
  background-color: var(--danger-subtle);
  color: var(--danger);
}

/* 标准选择器 */
.standard-select-box {
  position: relative;
}

.standard-select-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background-color: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-title);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  box-shadow: var(--shadow-xs);
}

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

.standard-select-btn:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.select-arrow {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.standard-select-box.open .select-arrow {
  transform: rotate(180deg);
}

.standard-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
  z-index: 50;
  display: none;
  overflow: hidden;
}

.standard-select-box.open .standard-dropdown {
  display: block;
}

.standard-search-input {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid var(--border-default);
  font-size: 13px;
  outline: none;
  background-color: var(--surface-hover);
}

.standard-options-list {
  max-height: 220px;
  overflow-y: auto;
}

.standard-group-title {
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  background-color: var(--surface-subtle);
  letter-spacing: 0.5px;
}

.standard-option-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.12s ease;
}

.standard-option-item:hover, .standard-option-item.selected {
  background-color: var(--primary-subtle);
  color: var(--primary);
  font-weight: 500;
}

/* 标准摘要面板 */
.standard-summary {
  margin-top: 14px;
  padding: 14px;
  background-color: var(--surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-secondary);
}

.standard-summary-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 6px;
}

.standard-summary-line:last-child {
  margin-bottom: 0;
}

.standard-summary-label {
  font-weight: 600;
  color: var(--text-title);
  flex-shrink: 0;
}

.details-toggle {
  margin-top: 14px;
}

.details-summary {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  outline: none;
}

.details-summary:hover {
  color: var(--primary);
}

.details-content {
  margin-top: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background-color: var(--surface);
  font-size: 13px;
}

/* ==========================================================================
   第二屏：确认目录 (Screen 2) - 严谨规范目录
   ========================================================================== */
.screen-2-container {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.screen-summary-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
}

.screen-summary-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-body);
  background-color: var(--surface-subtle);
  border: 1px solid var(--border-default);
  padding: 3px 10px;
  border-radius: 14px;
}

.stale-warning {
  display: none;
  padding: 12px 16px;
  background-color: var(--warning-subtle);
  color: var(--warning);
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 18px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--warning-border);
}

.stale-warning.visible {
  display: flex;
}

.outline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.outline-item {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background-color: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
  position: relative;
}

.outline-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.outline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.outline-num-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background-color: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  padding: 1px 6px;
  border-radius: 4px;
}

.outline-required-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.outline-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 4px;
}

.outline-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* ==========================================================================
   第三屏：生成与下载 (Screen 3)
   ========================================================================== */
.screen-3-container {
  max-width: 940px;
  margin: 0 auto;
  width: 100%;
}

/* 生成中卡片 */
.progress-card {
  text-align: center;
  padding: 44px 28px;
  margin-bottom: 24px;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background-color: var(--surface-subtle);
  border-radius: 3px;
  overflow: hidden;
  margin: 24px 0 18px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #10B981 100%);
  width: 15%;
  transition: width 0.3s ease;
}

.stage-tracker {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
}

.stage-step {
  font-size: 12px;
  color: var(--text-muted);
  flex: 1;
  text-align: center;
  position: relative;
}

.stage-step.active {
  color: var(--primary);
  font-weight: 700;
}

.stage-step.completed {
  color: var(--text-body);
  font-weight: 500;
}

.cancel-action {
  margin-top: 24px;
}

/* 完成结果工具条 */
.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
}

.result-summary-group h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-title);
}

.result-summary-meta {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* 待确认缺口抽屉 */
.unconfirmed-banner {
  background-color: var(--warning-subtle);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 20px;
}

.unconfirmed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.unconfirmed-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--warning);
}

.unconfirmed-list {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(180, 83, 9, 0.25);
  font-size: 12.5px;
  color: #78350F;
}

.unconfirmed-item {
  margin-bottom: 8px;
  line-height: 1.55;
}

.unconfirmed-item:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   真实 A4 临床纸张排版 (Document Paper)
   ========================================================================== */
.document-paper {
  background-color: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
  padding: 60px 72px;
  margin: 0 auto 36px;
  user-select: text;
  max-width: 860px;
}

.doc-header {
  text-align: center;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--text-title);
  padding-bottom: 22px;
}

.doc-org-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.doc-main-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-title);
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.doc-study-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.doc-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.doc-disclaimer-box {
  background-color: var(--warning-subtle);
  border: 1px solid var(--warning-border);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--warning);
  margin-bottom: 28px;
  line-height: 1.55;
  font-weight: 500;
}

.doc-section {
  margin-bottom: 26px;
}

.doc-section-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 10px;
  border-left: 3.5px solid var(--primary);
  padding-left: 10px;
}

.doc-section-body {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-body);
  white-space: pre-line;
}

/* 待确认标记微质感 Chip */
.doc-section-body mark.unconfirmed-highlight {
  background-color: #FFF1F2;
  color: var(--danger);
  border: 1px dashed var(--danger);
  border-radius: 4px;
  padding: 2px 6px;
  font-weight: 600;
  display: inline-block;
  margin: 3px 0;
}

/* 签署区真实版式 */
.doc-signatures-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-default);
}

.signature-col h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 8px;
}

.signature-line {
  height: 38px;
  border-bottom: 1px solid var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: flex-end;
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   4. 底部常驻操作栏 (Bottom Action Bar - 居中紧凑控制舱)
   ========================================================================== */
.app-bottom-bar {
  height: var(--footer-height);
  flex-shrink: 0;
  background-color: var(--surface);
  border-top: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  z-index: 90;
  box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.03);
}

.app-bottom-bar-inner {
  width: 100%;
  max-width: 1140px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.bar-left-info {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar-nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bar-left-actions, .bar-right-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bar-center-info {
  font-size: 12.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 权威按钮系统 */
.btn-primary {
  background: linear-gradient(180deg, var(--primary) 0%, #1D4ED8 100%);
  color: #FFFFFF;
  border: 1px solid #1E40AF;
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #3B82F6 0%, var(--primary) 100%);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.btn-primary:disabled, .btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--text-title);
  border: 1px solid var(--border-default);
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--surface-hover);
  border-color: var(--border-strong);
}

/* 模态框 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background-color: var(--surface);
  border-radius: var(--radius-card);
  max-width: 580px;
  width: 100%;
  padding: 28px 32px;
  box-shadow: var(--shadow-dropdown);
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid var(--border-default);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 14px;
}

.modal-body {
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.65;
}

.modal-body p {
  margin-bottom: 12px;
}

.modal-body ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}

.modal-close-btn:hover {
  background-color: var(--surface-subtle);
  color: var(--text-title);
}

/* 减少动画设置 */
@media (prefers-reduced-motion: reduce) {
  .step-screen {
    transition: none !important;
    transform: none !important;
  }
}

/* 响应式断点适配 */
@media (max-width: 820px) {
  html, body {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    width: 100%;
    max-width: 100vw;
  }
  .app-shell {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .app-stage {
    overflow-x: hidden;
    overflow-y: visible;
    min-height: calc(100vh - 180px);
    width: 100%;
  }
  .step-screen {
    position: relative;
    inset: auto;
    overflow-y: visible;
    overflow-x: hidden;
    padding: 16px 12px;
    width: 100%;
    box-sizing: border-box;
  }
  .step-screen:not(.active) {
    display: none !important;
  }

  /* 1. 顶部页头响应式 */
  .app-header {
    height: auto;
    padding: 10px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
  }
  .header-brand {
    justify-content: space-between;
    width: 100%;
  }
  .brand-subtext {
    display: none;
  }
  .header-actions {
    display: none;
  }
  .mode-switch-group {
    width: 100%;
    display: flex;
    max-width: 100%;
  }
  .mode-switch-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 6px;
    font-size: 12.5px;
    gap: 5px;
    min-height: 38px;
  }
  .mode-switch-btn .mode-badge-pill {
    padding: 1px 4px;
    font-size: 10px;
  }

  /* 2. 步骤条响应式 */
  .stepper-bar {
    height: 48px;
    padding: 0 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    box-sizing: border-box;
    scrollbar-width: none;
  }
  .stepper-bar::-webkit-scrollbar {
    display: none;
  }
  .stepper-track {
    gap: 3px;
    width: 100%;
    min-width: 0;
  }
  .step-nav-btn {
    padding: 3px 5px;
    gap: 4px;
    flex-shrink: 1;
    min-width: 0;
  }
  .step-nav-num {
    width: 18px;
    height: 18px;
    font-size: 10.5px;
    flex-shrink: 0;
  }
  .step-nav-subtext {
    display: none !important;
  }
  .step-nav-label {
    font-size: 11px;
    white-space: nowrap;
    letter-spacing: -0.2px;
  }
  .step-nav-divider {
    min-width: 4px;
    height: 2px;
    flex-shrink: 1;
  }

  @media (max-width: 375px) {
    .step-nav-btn:not(.active) .step-nav-content {
      display: none;
    }
  }

  /* 3. 底部操作栏响应式与安全区 */
  .app-bottom-bar {
    position: sticky;
    bottom: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    height: auto;
    flex-wrap: wrap;
    gap: 8px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
    width: 100%;
    box-sizing: border-box;
  }
  .app-bottom-bar-inner {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .bar-left-info {
    display: none !important;
  }
  .bar-nav-controls {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 8px;
  }
  .bar-left-actions, .bar-right-actions {
    flex: 1;
    display: flex;
  }
  .bar-left-actions .btn-secondary,
  .bar-right-actions .btn-primary,
  .bar-right-actions .btn-secondary {
    flex: 1;
    justify-content: center;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 13.5px;
  }
  .kbd-hint {
    display: none !important;
  }

  /* 4. 容器、卡片与栅格 */
  .screen-1-container, .screen-2-container {
    padding: 8px 0 !important;
    width: 100%;
    max-width: 100%;
  }
  .screen-1-grid, .outline-grid, .standard-cards-grid, .institution-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .screen-1-single-card-wrap {
    width: 100%;
  }
  .card {
    padding: 16px 14px !important;
  }
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .dropzone {
    padding: 24px 10px;
  }
  .dropzone-text {
    font-size: 13px;
  }
  .btn-demo-pill {
    padding: 4px 8px;
    font-size: 11px;
    margin-top: 6px;
  }
  .diag-grid, .ethics-fact-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .card-selected-standard {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  #inst-detail-panel {
    padding: 14px 12px !important;
  }
  .ethics-track-bars-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .outline-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .outline-search-box {
    min-width: 0 !important;
    width: 100%;
  }
  .outline-filter-pills {
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    scrollbar-width: none;
  }

  /* 5. ICF 第四屏草稿文档与纸张 */
  .result-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .doc-stats-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 12px;
  }
  .stats-metrics-group {
    flex-wrap: wrap;
    gap: 6px;
  }
  .zoom-controls-group {
    display: none;
  }
  .doc-toc-rail {
    padding: 8px 10px;
  }
  .toc-rail-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none;
  }
  .document-paper {
    padding: 18px 12px !important;
    box-shadow: none !important;
    border-radius: 8px;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border-left: none;
    border-right: none;
    font-size: 13.5px !important;
  }
  .doc-main-title {
    font-size: 17px !important;
  }
  .doc-study-title {
    font-size: 13.5px !important;
  }
  .doc-meta {
    flex-direction: column;
    gap: 2px !important;
    font-size: 11.5px !important;
  }
  .section-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .btn-copy-section {
    width: 100%;
    justify-content: center;
  }
  .btn-floating-gap {
    bottom: 80px;
    right: 12px;
    padding: 8px 12px;
    font-size: 12px;
  }

  /* 6. 伦理审查第四屏合规看板与规则列表 */
  .ethics-scorecard-card {
    padding: 14px 12px !important;
  }
  .ethics-scorecard-header {
    flex-direction: column;
    align-items: stretch !important;
    gap: 14px;
  }
  .ethics-scorecard-main {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }
  .score-circle-box {
    margin: 0 auto;
  }
  .ethics-scorecard-download {
    width: 100%;
  }
  #btn-top-download-docx {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    padding: 12px 14px !important;
  }
  .track-tab-group {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    width: 100%;
    scrollbar-width: none;
    padding: 4px;
  }
  .track-tab-group::-webkit-scrollbar,
  .filter-pills-group::-webkit-scrollbar {
    display: none;
  }
  .track-tab-btn {
    flex-shrink: 0;
    padding: 7px 12px !important;
    font-size: 12px !important;
    min-height: 36px;
  }
  .filter-pills-group {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    width: 100%;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .filter-pill {
    flex-shrink: 0;
    padding: 5px 12px !important;
    font-size: 12px !important;
    min-height: 36px;
  }
  .rule-card {
    padding: 14px 12px !important;
  }
  .rule-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .rule-suggestion-box {
    padding: 12px 10px 14px !important;
  }
  .btn-copy-suggestion {
    position: static !important;
    display: flex;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
    min-height: 38px;
    align-items: center;
  }
  .rule-footer-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  /* 7. Toast 通知响应式 */
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  .toast-item {
    min-width: 0;
    max-width: 100%;
  }
}

/* ==========================================================================
   Pro Max UI / UX Clinical Ergonomics System
   ========================================================================== */

/* 1. 快捷键微质感徽章 (Keyboard Hint Tags) */
.kbd-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #FFFFFF;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
  margin-left: 6px;
  vertical-align: middle;
}

.btn-secondary .kbd-hint {
  background: var(--surface-subtle);
  border-color: var(--border-default);
  color: var(--text-secondary);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
  margin-left: 0;
  margin-right: 6px;
}

/* 2. 临床级全局 Toast 通知容器 (Clinical Toast System) */
.toast-container {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
  padding: 12px 16px;
  min-width: 290px;
  max-width: 420px;
  animation: toastSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  overflow: hidden;
  border-left: 4px solid var(--primary);
}

.toast-item.toast-success { border-left-color: var(--primary); }
.toast-item.toast-warning { border-left-color: var(--warning); }
.toast-item.toast-error { border-left-color: var(--danger); }
.toast-item.toast-info { border-left-color: #2563EB; }

.toast-item.toast-fading {
  animation: toastFadeOut 0.24s ease forwards;
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.toast-success .toast-icon { color: var(--primary); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-error .toast-icon { color: var(--danger); }
.toast-info .toast-icon { color: #2563EB; }

.toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toast-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-title);
  line-height: 1.3;
}

.toast-message {
  font-size: 12.5px;
  color: var(--text-body);
  line-height: 1.4;
  word-break: break-word;
}

.toast-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.toast-close-btn:hover {
  color: var(--text-title);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2.5px;
  background: var(--primary);
  width: 100%;
  animation: toastProgress linear forwards;
}

.toast-warning .toast-progress { background: var(--warning); }
.toast-error .toast-progress { background: var(--danger); }
.toast-info .toast-progress { background: #2563EB; }

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastFadeOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
}

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

/* 3. 第一屏：主研究方案临床要素智能预检 (Protocol Readiness Diagnostics) */
.protocol-diagnostics-card {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(180deg, #F8FCFB 0%, #FFFFFF 100%);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.25s ease;
}

.diag-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(167, 243, 208, 0.4);
}

.diag-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.diag-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  display: inline-block;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.05); }
}

.diag-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.2px;
}

.diag-badge-gcp {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  border-radius: 999px;
  padding: 1px 7px;
}

.diag-doc-tag {
  font-size: 11.5px;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border-default);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diag-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin: 12px 0 10px 0;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.diag-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.diag-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.diag-value {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-title);
  line-height: 1.3;
}

.diag-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--primary);
  font-weight: 500;
  padding-top: 6px;
}

/* 4. 第二屏：规范章节筛选工具条 (Outline Toolbar & Search) */
.outline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
}

.outline-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 240px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.outline-search-box:focus-within {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 122, 104, 0.12);
}

.outline-search-box input {
  border: none;
  background: transparent;
  font-size: 13px;
  width: 100%;
  color: var(--text-title);
  outline: none;
}

.btn-clear-search {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.btn-clear-search:hover {
  color: var(--text-title);
}

.outline-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-pill {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  border-color: var(--primary-border);
  color: var(--primary);
}

.filter-pill.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: var(--shadow-xs);
}

.outline-count-hint {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

/* 目录卡片交互与内窥指示 */
.outline-item {
  cursor: pointer;
  position: relative;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.outline-item:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.outline-item:active {
  transform: translateY(0);
}

.outline-view-details-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--primary);
  font-weight: 600;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-light);
}

/* 5. 章节审查详情弹窗 (Chapter Inspector Modal) */
.inspector-modal-content {
  max-width: 580px;
  padding: 24px 28px;
}

.inspector-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.inspector-num-badge {
  font-size: 11.5px;
  font-weight: 700;
  background: var(--primary-subtle);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--primary-border);
}

.inspector-risk-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.inspector-risk-tag.high {
  background: var(--warning-subtle);
  color: var(--warning);
  border-color: var(--warning-border);
}

.inspector-risk-tag.rights {
  background: #EFF6FF;
  color: #1D4ED8;
  border-color: #BFDBFE;
}

.inspector-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-title);
  line-height: 1.35;
  margin-bottom: 18px;
}

.inspector-section-block {
  margin-bottom: 16px;
}

.inspector-block-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}

.inspector-gcp-box {
  background: var(--surface-subtle);
  border-left: 3.5px solid var(--primary);
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-title);
  line-height: 1.4;
}

.inspector-req-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inspector-req-list li {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.45;
  position: relative;
  padding-left: 18px;
}

.inspector-req-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
}

.inspector-rationale-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}

.inspector-footer-action {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--border-default);
}

/* 6. 第三屏：审阅人机工程与快速锚点 (Review Ergonomics & Quick TOC Rail) */
.doc-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
  gap: 12px;
}

.stats-metrics-group {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
}

.stat-badge.warning-stat {
  color: var(--warning);
  font-weight: 600;
}

.zoom-controls-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.zoom-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.btn-zoom {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-default);
  border-radius: 4px;
  background: var(--surface-subtle);
  color: var(--text-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-zoom:hover {
  background: var(--surface);
  border-color: var(--primary);
  color: var(--primary);
}

.zoom-level {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-title);
  min-width: 38px;
  text-align: center;
}

/* Sticky 章节快速跳转导轨 */
.doc-toc-rail {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(248, 250, 251, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 0 10px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.toc-rail-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.toc-rail-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
}

.toc-rail-scroll::-webkit-scrollbar {
  display: none;
}

.toc-pill {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-default);
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.toc-pill:hover {
  border-color: var(--primary-border);
  color: var(--primary);
}

.toc-pill.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

/* 章节复制按钮 */
.doc-section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.btn-copy-section {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-default);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  opacity: 0.6;
}

.doc-section:hover .btn-copy-section {
  opacity: 1;
}

.btn-copy-section:hover {
  border-color: var(--primary-border);
  color: var(--primary);
  background: var(--primary-subtle);
}

/* 7. 悬浮待确认项快捷导航胶囊 (Floating Gap Navigator) */
.btn-floating-gap {
  position: fixed;
  bottom: 80px;
  right: 32px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1.5px solid var(--warning);
  border-radius: 999px;
  padding: 8px 16px;
  box-shadow: 0 10px 25px -4px rgba(180, 83, 9, 0.2), 0 4px 10px -2px rgba(180, 83, 9, 0.08);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--warning);
}

.btn-floating-gap:hover {
  transform: translateY(-2px);
  background: #FFFBEB;
  box-shadow: 0 14px 28px -4px rgba(180, 83, 9, 0.3);
}

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

.floating-gap-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--warning);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.25);
  animation: pulseAmber 1.5s infinite ease-in-out;
}

@keyframes pulseAmber {
  0%, 100% { box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.25); }
  50% { box-shadow: 0 0 0 5px rgba(217, 119, 6, 0.1); }
}

.floating-gap-action {
  font-size: 11.5px;
  opacity: 0.85;
}

/* 待确认标记聚焦光晕动画 */
mark.unconfirmed-highlight.pulse-focus {
  animation: gapPulseFocus 1.8s ease;
}

@keyframes gapPulseFocus {
  0% {
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.6);
    background-color: #FEF08A;
  }
  50% {
    box-shadow: 0 0 0 8px rgba(217, 119, 6, 0.2);
    background-color: #FDE047;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0);
    background-color: #FEF3C7;
  }
}

/* ==========================================================================
   伦理审查向导与送审机构模式扩展样式 (Ethics Review Wizard Styles)
   ========================================================================== */

/* 顶层模式切换开关 (Pill Switcher) */
.mode-switch-group {
  display: inline-flex;
  align-items: center;
  background: var(--surface-subtle);
  border: 1px solid var(--border-default);
  padding: 3px;
  border-radius: var(--radius-md);
  gap: 4px;
}

.mode-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-switch-btn:hover {
  color: var(--text-title);
  background: rgba(255, 255, 255, 0.6);
}

.mode-switch-btn.active {
  background: var(--surface);
  color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.mode-badge-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(29, 78, 216, 0.1);
  color: var(--primary);
}

/* 机构选择与版本筛选器增强 */
.inst-filter-card {
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.inst-search-input:focus {
  border-color: var(--primary) !important;
  background-color: #FFFFFF !important;
  box-shadow: 0 0 0 3px var(--primary-subtle);
}

.btn-clear-search:hover {
  color: var(--text-title) !important;
  background: var(--surface-hover) !important;
  border-radius: 50%;
}

.inst-region-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.inst-region-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-body);
  background: var(--surface);
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.inst-region-pill:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--text-title);
}

.inst-region-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25);
}

.inst-region-pill .pill-count {
  font-size: 11px;
  opacity: 0.85;
}

.institution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
  margin-top: 16px;
  max-height: 480px;
  overflow-y: auto;
  padding: 4px 2px;
}

.institution-grid::-webkit-scrollbar {
  width: 6px;
}

.institution-grid::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 3px;
}

.institution-card {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-card);
  padding: 16px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.institution-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.institution-card.active {
  border-color: var(--primary);
  background: #FBFCFE;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.12);
}

.inst-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.inst-badges-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.inst-region-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: #EEF2FF;
  color: #4F46E5;
  border: 1px solid #E0E7FF;
}

.inst-tier-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: #F1F5F9;
  color: var(--text-secondary);
}

.inst-card-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.inst-check-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #E2E8F0;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.institution-card.active .inst-check-mark {
  background: var(--primary);
  color: #FFFFFF;
}

.inst-versions-count-tag {
  font-size: 11px;
  color: #0284C7;
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
  margin-top: 8px;
  align-self: flex-start;
}

.inst-chip {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #F1F5F9;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.institution-card.active .inst-chip {
  background: var(--primary-subtle);
  color: var(--primary);
  border-color: var(--primary-border);
}

/* 机构审查版本选择卡片 */
.inst-version-panel {
  transition: all 0.2s ease;
}

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

.version-option-card {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
}

.version-option-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}

.version-option-card.active {
  border-color: var(--primary);
  background: #FFFFFF;
  box-shadow: 0 2px 10px rgba(29, 78, 216, 0.12);
}

.ver-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.ver-radio-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.version-option-card.active .ver-radio-indicator {
  border-color: var(--primary);
}

.ver-radio-indicator::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  display: none;
}

.version-option-card.active .ver-radio-indicator::after {
  display: block;
}

.ver-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-title);
}

.ver-status-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.ver-status-badge.active-status {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #BBF7D0;
}

.ver-status-badge.standard-status {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #E2E8F0;
}

.ver-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 4px;
}

.ver-highlight-line {
  font-size: 11.5px;
  color: var(--primary);
  font-weight: 500;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ICF 下拉框区域标签与版本切换 Pills */
.dropdown-region-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border-default);
  cursor: pointer;
  white-space: nowrap;
  color: var(--text-secondary);
  transition: all 0.12s ease;
}

.dropdown-region-pill:hover {
  background: var(--surface-hover);
  color: var(--text-title);
}

.dropdown-region-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
}

.icf-ver-pill {
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 14px;
  background: #F1F5F9;
  border: 1px solid var(--border-default);
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.icf-ver-pill:hover {
  background: var(--surface-hover);
  border-color: var(--primary-border);
}

.icf-ver-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
}

/* =========================================================================
   极简单行机构列表与 ICF 精简选定卡片 (Compact Institution & Collapsible View)
   ========================================================================= */

/* 已选定机构精简卡片 (选择完后其他消失，只保留此项) */
.icf-selected-card {
  background: var(--surface);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.icf-selected-card:hover {
  border-color: var(--primary-border);
}

.icf-selected-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.icf-selected-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.icf-selected-icon {
  font-size: 22px;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icf-selected-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.icf-selected-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-title);
  margin: 0;
}

.icf-selected-ver-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* 机构选择器面板 */
.icf-picker-panel {
  background: var(--surface);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* 单行极简机构列表 - 单纯机构就是一条，不需要占用那么大空间 */
.compact-inst-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.compact-inst-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--surface);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 42px;
  box-sizing: border-box;
}

.compact-inst-item:hover {
  border-color: var(--primary);
  background: var(--surface-hover);
}

.compact-inst-item.active {
  border-color: var(--primary);
  background: #EFF6FF;
  box-shadow: 0 1px 4px rgba(29, 78, 216, 0.1);
}

.compact-inst-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.compact-inst-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-title);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-inst-region-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: #4F46E5;
  background: #EEF2FF;
  border: 1px solid #E0E7FF;
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}

.compact-inst-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.compact-inst-ver-tag {
  font-size: 10.5px;
  color: #0284C7;
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  padding: 1px 6px;
  border-radius: 3px;
}

.compact-inst-arrow {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: bold;
  transition: transform 0.15s ease;
}

.compact-inst-item.active .compact-inst-arrow {
  color: var(--primary);
  transform: translateX(2px);
}

.icf-ver-pill:hover {
  background: var(--surface-hover);
  border-color: var(--primary-border);
}

.icf-ver-pill.active {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

/* 综合评分卡片 */
.score-circle-box {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--surface);
  border: 4px solid var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.score-num-big {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
}

.score-label-sub {
  font-size: 9.5px;
  color: var(--text-secondary);
  margin-top: 3px;
  font-weight: 600;
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.risk-low {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.risk-medium {
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.risk-high {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.inst-tag-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #F1F5F9;
  color: var(--text-body);
  font-weight: 600;
  border: 1px solid var(--border-default);
}

/* 审查维度卡片 */
.dimension-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dimension-card {
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  transition: all 0.2s ease;
}

.dimension-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.dimension-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dimension-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dimension-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-title);
}

.dimension-law {
  font-size: 11.5px;
  color: var(--text-secondary);
  background: var(--surface-subtle);
  padding: 1px 6px;
  border-radius: 4px;
}

.dim-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.dim-status-pass {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.dim-status-warning {
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.dim-status-fail {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.dim-finding-box {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.6;
  margin-top: 6px;
}

.dim-sugg-box {
  margin-top: 8px;
  padding: 10px 14px;
  background: #F8FAFC;
  border-left: 3px solid var(--primary);
  border-radius: 0 6px 6px 0;
  font-size: 12.5px;
  color: #1E293B;
  line-height: 1.6;
}

.dim-sugg-box strong {
  color: var(--primary);
}

/* 阶段指示器 */
.inspection-stage-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stage-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.stage-item.completed {
  background: #F0FDF4;
  border-color: #BBF7D0;
}

.stage-item.active {
  background: #EFF6FF;
  border-color: #BFDBFE;
}

.stage-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #CBD5E1;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.stage-item.completed .stage-dot {
  background: #10B981;
}

.stage-item.active .stage-dot {
  background: var(--primary);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(29, 78, 216, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(29, 78, 216, 0); }
  100% { box-shadow: 0 0 0 0 rgba(29, 78, 216, 0); }
}

.stage-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-title);
}

.stage-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* 响应式适配 */
@media (max-width: 860px) {
  .institution-grid {
    grid-template-columns: 1fr;
  }
}

/* 打印样式适配 */
@media print {
  body, html {
    overflow: visible !important;
    height: auto !important;
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  .app-header,
  .stepper-bar,
  .app-bottom-bar,
  #screen-1,
  #screen-2,
  #screen-3-generating,
  .result-toolbar,
  .unconfirmed-banner,
  .modal-overlay,
  .toast-container,
  .btn-floating-gap,
  .doc-toc-rail,
  .doc-stats-bar,
  .btn-copy-section {
    display: none !important;
  }
  .app-shell, .app-stage, #screen-3 {
    display: block !important;
    position: static !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
  }
  .document-paper {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    transform: none !important;
  }
  mark.unconfirmed-highlight {
    background: none !important;
    border: none !important;
    border-bottom: 1px solid #000000 !important;
    color: #000000 !important;
  }
}

/* ============================================================
   SmartRec 双轨伦理预审样式体系 (SCI + ETH Dual-Track Review)
   ============================================================ */

.track-tab-group {
  display: inline-flex;
  background: #F1F5F9;
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
  border: 1px solid var(--border-light);
}

.track-tab-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.track-tab-btn:hover {
  color: var(--text-title);
  background: rgba(255, 255, 255, 0.6);
}

.track-tab-btn.active {
  background: #FFFFFF;
  color: var(--text-title);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.filter-pill {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border-default);
  background: #FFFFFF;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.filter-pill.active {
  background: #1E293B;
  color: #FFFFFF;
  border-color: #1E293B;
}

/* 规则卡片 */
.rule-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-card);
  padding: 20px 22px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
  position: relative;
  border-left: 4px solid #94A3B8;
}

.rule-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.rule-card.verdict-pass {
  border-left-color: #10B981;
}

.rule-card.verdict-needs-revision {
  border-left-color: #DC2626;
  background: #FFFBFB;
}

.rule-card.verdict-insufficient {
  border-left-color: #D97706;
  background: #FFFDF7;
}

.rule-card.verdict-na {
  border-left-color: #94A3B8;
  opacity: 0.85;
}

.rule-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.rule-meta-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rule-track-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.rule-track-badge.track-sci {
  background: #E0F2FE;
  color: #0369A1;
  border: 1px solid #BAE6FD;
}

.rule-track-badge.track-eth {
  background: #D1FAE5;
  color: #047857;
  border: 1px solid #A7F3D0;
}

.rule-key-badge {
  font-family: monospace;
  font-size: 11px;
  color: #64748B;
  background: #F1F5F9;
  padding: 2px 6px;
  border-radius: 4px;
}

.rule-category-text {
  font-size: 12px;
  color: #64748B;
}

.rule-verdict-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}

.rule-verdict-pill.verdict-pass {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.rule-verdict-pill.verdict-needs-revision {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

.rule-verdict-pill.verdict-insufficient {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.rule-verdict-pill.verdict-na {
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

.rule-confidence-tag {
  font-size: 11px;
  color: #64748B;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  padding: 2px 7px;
  border-radius: 4px;
}

.rule-confidence-tag.low-conf {
  color: #C2410C;
  background: #FFF7ED;
  border-color: #FFEDD5;
}

.rule-question {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-title);
  line-height: 1.5;
  margin-bottom: 12px;
}

.rule-opinion-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: #334155;
  line-height: 1.65;
  margin-bottom: 12px;
}

.rule-suggestion-box {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.65;
  color: #1E3A8A;
  position: relative;
}

.rule-suggestion-box.highlight-revision {
  background: #FFFBEB;
  border-color: #FCD34D;
  border-left-color: #F59E0B;
  color: #78350F;
}

.btn-copy-suggestion {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy-suggestion:hover {
  background: #F1F5F9;
  color: var(--text-title);
}

.rule-points-checklist {
  margin: 10px 0 14px 0;
  background: #FAFAFA;
  border: 1px dashed #E2E8F0;
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.point-item {
  font-size: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #475569;
}

.point-item.point-pass {
  color: #15803D;
}

.point-item.point-fail {
  color: #B91C1C;
  font-weight: 600;
}

.rule-evidence-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid #CBD5E1;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  color: #475569;
  cursor: pointer;
  margin-top: 4px;
}

.rule-evidence-toggle:hover {
  background: #F1F5F9;
}

.rule-evidence-box {
  margin-top: 8px;
  background: #F1F5F9;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
  color: #334155;
  border-left: 3px solid #64748B;
}

.evidence-quote-snippet {
  font-style: italic;
  margin: 4px 0;
  color: #1E293B;
  background: rgba(255, 255, 255, 0.8);
  padding: 6px 10px;
  border-radius: 4px;
}

.rule-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #F1F5F9;
  font-size: 11.5px;
  color: #64748B;
  flex-wrap: wrap;
}

.severity-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
}

.severity-blocking {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.severity-critical {
  background: #FEF3C7;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.severity-recommended {
  background: #F1F5F9;
  color: #64748B;
}

/* ==========================================================================
   SmartRec 伦理送审材料清单与约束扩展样式 (Dossier Checklist Styles)
   ========================================================================== */

.dossier-readiness-card {
  padding: 20px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFBFD 100%);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
}

.dossier-readiness-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.dossier-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dossier-status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #D97706;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.15);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.dossier-status-dot.ready {
  background: #059669;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.15);
}

.dossier-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-title);
  margin: 0;
}

.dossier-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

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

.dossier-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
}

.dossier-badge-warning {
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.dossier-badge-success {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.dossier-progress-track {
  width: 100%;
  height: 8px;
  background: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.dossier-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #D97706 0%, #059669 100%);
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dossier-missing-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-sm);
  color: #92400E;
  transition: all 0.3s ease;
}

.dossier-missing-alert.all-ready {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #065F46;
}

/* 10 项材料槽位网格 */
.dossier-checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.dossier-slot-card {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-default);
  background: var(--surface);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 88px;
}

.dossier-slot-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.dossier-slot-card.ready {
  border-color: #A7F3D0;
  background: #F0FDF4;
}

.dossier-slot-card.missing-mandatory {
  border-color: #FED7AA;
  background: #FFFBF7;
}

.dossier-slot-card.missing-optional {
  border-color: #E2E8F0;
  background: #FAFAFA;
}

.dossier-slot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.dossier-slot-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-title);
  line-height: 1.3;
}

.dossier-slot-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
}

.dossier-slot-badge.mandatory {
  background: #FEF3C7;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.dossier-slot-badge.optional {
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

.dossier-slot-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.dossier-slot-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
}

.dossier-slot-status.ready {
  color: #059669;
  font-weight: 600;
}

.dossier-slot-status.unfilled {
  color: #94A3B8;
}

/* 已上传材料清单网格与卡片 */
.materials-items-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.material-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  gap: 12px;
  flex-wrap: wrap;
  transition: all 0.2s ease;
}

.material-item-card:hover {
  background: var(--surface);
  border-color: var(--border-strong);
}

.material-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.material-format-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.material-format-pill.docx, .material-format-pill.doc {
  background: #DBEAFE;
  color: #1D4ED8;
}

.material-format-pill.pdf {
  background: #FEE2E2;
  color: #DC2626;
}

.material-format-pill.txt {
  background: #F1F5F9;
  color: #475569;
}

.material-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.material-item-size {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.material-item-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.material-type-select {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--surface);
  color: var(--text-body);
  font-weight: 500;
  cursor: pointer;
  outline: none;
}

.material-type-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.15);
}

.btn-remove-material {
  border: none;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-remove-material:hover {
  background: #FEE2E2;
}

/* 移动端视口适配 (≤390px) */
@media (max-width: 600px) {
  .dossier-checklist-grid {
    grid-template-columns: 1fr;
  }
  .dossier-readiness-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .material-item-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .material-item-right {
    width: 100%;
    justify-content: space-between;
  }
  .institution-grid {
    grid-template-columns: 1fr;
    max-height: 420px;
  }
  .inst-version-options-grid {
    grid-template-columns: 1fr;
  }
  .inst-region-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .inst-region-pill {
    flex-shrink: 0;
  }
  .icf-selected-card {
    padding: 14px 14px;
  }
  .icf-selected-header {
    align-items: flex-start;
    gap: 8px;
  }
  .icf-selected-icon {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }
  .icf-selected-name {
    font-size: 14px;
    line-height: 1.35;
  }
  .icf-selected-header #btn-icf-change-inst {
    padding: 4px 8px;
    font-size: 11.5px;
  }
}

