:root {
  --bg-deep: #060b16;
  --bg-panel: rgba(15, 23, 42, 0.84);
  --bg-card: rgba(30, 41, 59, 0.56);
  --border-subtle: rgba(148, 163, 184, 0.16);
  --border-highlight: rgba(56, 189, 248, 0.45);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --crimson: #f43f5e;
  --crimson-glow: rgba(244, 63, 94, 0.32);
  --cyan: #38bdf8;
  --emerald: #10b981;
  --amber: #f59e0b;
  --orange: #f97316;
  --danger: #ef4444;
  --radius-lg: 16px;
  --radius-md: 11px;
  --radius-sm: 7px;
  color-scheme: dark;
}

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

/* 全局及左右面板定制深色流光胶囊滚动条（与深海蓝/冰青/红心主题融为一体） */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: rgba(6, 11, 22, 0.45);
  border-radius: 999px;
  margin: 6px 0;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.32), rgba(100, 116, 139, 0.36));
  border-radius: 999px;
  border: 1.5px solid rgba(9, 14, 28, 0.65);
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.72), rgba(244, 63, 94, 0.58));
}

::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, #38bdf8, #f43f5e);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

.input-tab-pane,
.report-scroll-body {
  scrollbar-gutter: stable;
}

@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.38) rgba(6, 11, 22, 0.45);
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(circle at 50% 18%, rgba(159, 18, 57, 0.18), transparent 48%),
    radial-gradient(circle at 12% 80%, rgba(14, 116, 144, 0.14), transparent 42%),
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 28px 28px, 28px 28px;
  color: var(--text-main);
  line-height: 1.55;
  min-height: 100vh;
}

/* 顶部导航栏 */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(9, 14, 28, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 30;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-pulse-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #f43f5e, #9f1239);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px var(--crimson-glow);
  animation: iconBeat 1.15s infinite ease-in-out;
}

@keyframes iconBeat {
  0%, 100% { transform: scale(1); }
  18% { transform: scale(1.10); }
  34% { transform: scale(0.97); }
  50% { transform: scale(1.05); }
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.16);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.brand-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.preset-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.preset-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 2px;
}

.preset-chip {
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid var(--border-subtle);
  color: #e2e8f0;
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.preset-chip:hover {
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(245, 158, 11, 0.16);
}

.preset-chip.comparing-active {
  background: rgba(245, 158, 11, 0.24);
  border: 1.5px dashed #fbbf24;
  color: #fef3c7;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.36);
}

.preset-chip .chip-cancel-tag {
  display: inline-block;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.32);
  color: #fffbeb;
  font-size: 10.5px;
  font-weight: 800;
}

.preset-chip.user-case-chip {
  background: rgba(14, 165, 233, 0.14);
  border: 1.5px solid rgba(56, 189, 248, 0.55);
  color: #bae6fd;
  font-weight: 700;
}

.preset-chip.user-case-chip:hover {
  background: rgba(14, 165, 233, 0.28);
  border-color: #38bdf8;
  color: #fff;
}

.preset-chip.user-case-chip.active {
  background: linear-gradient(135deg, #0284c7, #0d9488);
  border-color: #5eead4;
  color: #fff;
  box-shadow: 0 0 14px rgba(20, 184, 166, 0.42);
}

.preset-divider {
  width: 1px;
  height: 18px;
  background: rgba(148, 163, 184, 0.28);
  margin: 0 3px;
}

/* 三栏主工作台布局 */
.workspace-grid {
  display: grid;
  grid-template-columns: 408px minmax(430px, 1fr) 412px;
  gap: 16px;
  padding: 16px 20px 24px;
  max-width: 1780px;
  margin: 0 auto;
  align-items: start;
}

.panel-box {
  background: var(--bg-panel);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34);
}

/* 强化左栏录入工作台视觉醒目度 */
.input-panel {
  border-top: 3px solid var(--cyan);
  border-color: rgba(56, 189, 248, 0.34);
  box-shadow: 0 14px 40px rgba(2, 132, 199, 0.14), 0 14px 36px rgba(0, 0, 0, 0.36);
}

.panel-header {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.input-hero-header {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.16), rgba(15, 23, 42, 0.6));
}

.input-hero-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.entry-step-tag {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.45);
  white-space: nowrap;
  flex-shrink: 0;
}

.panel-header h2 {
  font-size: 15.5px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
}

/* 左侧 2x2 醒目四大录入入口卡片网格 */
.entry-portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px;
  background: rgba(9, 14, 28, 0.68);
  border-bottom: 1px solid var(--border-subtle);
}

.portal-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1.5px solid rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.62);
  color: #cbd5e1;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
}

.portal-card:hover {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(30, 58, 95, 0.55);
  color: #fff;
  transform: translateY(-1px);
}

.portal-card.active {
  border-color: var(--cyan);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(2, 132, 199, 0.16));
  color: #fff;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.24);
}

.portal-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.portal-texts {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.portal-title {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
}

.portal-sub {
  font-size: 10.5px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-card.active .portal-sub {
  color: #bae6fd;
}

/* 通用一键点选胶囊按钮组（彻底替代繁琐下拉框） */
.sr-hidden-select {
  display: none !important;
}

.choice-pill-group {
  display: grid;
  gap: 9px 6px;
  margin-top: 6px;
}

.choice-pill-group.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-pill-group.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-pill-group.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.choice-pill.full-pill-span {
  grid-column: 1 / -1;
}

/* 叠加比对模式：在不动用户当前选中项的前提下，用醒目金色虚线框标出比对案例所在的选项 */
.choice-pill,
.iq-btn,
.lab-q-chip {
  position: relative;
}

.choice-pill.comp-framed,
.iq-btn.comp-framed,
.lab-q-chip.comp-framed {
  outline: 2px dashed #fbbf24;
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.16), 0 3px 10px rgba(245, 158, 11, 0.26);
  z-index: 2;
}

.choice-pill.comp-framed::after,
.iq-btn.comp-framed::after {
  content: "比对在此";
  position: absolute;
  top: -8px;
  right: 3px;
  background: #f59e0b;
  color: #1c1917;
  font-size: 9px;
  font-weight: 800;
  padding: 0 4.5px;
  line-height: 13px;
  border-radius: 4px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
}

.choice-pill.active.comp-framed,
.iq-btn.active.comp-framed {
  outline-color: #fcd34d;
}

.choice-pill.active.comp-framed::after,
.iq-btn.active.comp-framed::after {
  content: "与比对同档";
  background: #fde047;
  color: #1e293b;
}

.lab-q-chip.comp-framed::after {
  content: "比对档";
  position: absolute;
  top: -7px;
  right: 2px;
  background: #f59e0b;
  color: #1c1917;
  font-size: 8.5px;
  font-weight: 800;
  padding: 0 3.5px;
  line-height: 12px;
  border-radius: 3px;
  pointer-events: none;
}

/* 数值型输入卡（验血/体征/年龄/CAC）的比对叠加框 */
.comp-num-overlay,
.micro-comp-overlay {
  margin-top: 5px;
  padding: 3px 7px;
  border: 1.5px dashed rgba(251, 191, 36, 0.78);
  background: rgba(245, 158, 11, 0.11);
  border-radius: 6px;
  font-size: 10.8px;
  color: #fde68a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.comp-num-overlay .diff-better {
  color: #6ee7b7;
  font-weight: 700;
}

.comp-num-overlay .diff-worse {
  color: #fca5a5;
  font-weight: 700;
}

.comp-num-overlay .diff-same {
  color: #cbd5e1;
}

/* 冠脉CTA滑块与卡片头的比对叠加标记 */
.vessel-badges-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.vessel-comp-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 5px;
  border: 1.5px dashed #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  color: #fde68a;
  white-space: nowrap;
}

.slider-track-wrap {
  position: relative;
  margin-top: 5px;
  padding: 2px 0;
}

.slider-comp-tick {
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 10px;
  transform: translateX(-50%);
  border: 1.5px dashed #fbbf24;
  background: rgba(251, 191, 36, 0.22);
  border-radius: 3px;
  pointer-events: none;
}

.tele-comp-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 4px;
  border: 1px dashed rgba(251, 191, 36, 0.8);
  background: rgba(245, 158, 11, 0.16);
  color: #fde68a;
  margin-left: 3px;
}

.choice-pill {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: #cbd5e1;
  border-radius: 7px;
  padding: 7px 6px;
  font-size: 11.8px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.14s ease;
  line-height: 1.25;
}

.choice-pill:hover {
  border-color: rgba(148, 163, 184, 0.6);
  color: #fff;
  background: rgba(51, 65, 85, 0.72);
}

.choice-pill.active {
  color: #fff;
  border-color: var(--cyan);
  background: rgba(14, 165, 233, 0.28);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.22);
}

.choice-pill.tone-ok.active {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.26);
  color: #d1fae5;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.choice-pill.tone-mild.active {
  border-color: #facc15;
  background: rgba(234, 179, 8, 0.24);
  color: #fef08a;
}

.choice-pill.tone-warn.active {
  border-color: #fb923c;
  background: rgba(249, 115, 22, 0.28);
  color: #ffedd5;
}

.choice-pill.tone-danger.active {
  border-color: #f87171;
  background: rgba(239, 68, 68, 0.32);
  color: #fee2e2;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.28);
}

/* 验血卡片快捷一键填入微胶囊 */
.lab-quick-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin: 5px 0 4px;
}

.lab-q-chip {
  flex: 1;
  min-width: 44px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #cbd5e1;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 5px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.14s;
}

.lab-q-chip:hover {
  border-color: var(--cyan);
  color: #fff;
  background: rgba(14, 165, 233, 0.22);
}

.lab-q-chip.warn:hover {
  border-color: #fb923c;
  background: rgba(249, 115, 22, 0.24);
}

.lab-q-chip.danger:hover {
  border-color: #f87171;
  background: rgba(239, 68, 68, 0.26);
}

/* 心脏底部选中血管内镜直接点选条 */
.inspector-quick-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  padding: 6px 9px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.26);
  border-radius: 8px;
}

.iq-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.iq-label {
  font-size: 11px;
  color: #94a3b8;
  margin-right: 2px;
}

.iq-btn {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.14s;
}

.iq-btn:hover {
  border-color: var(--cyan);
  color: #fff;
}

.iq-btn.active {
  background: rgba(14, 165, 233, 0.28);
  border-color: var(--cyan);
  color: #fff;
}

.iq-btn.danger.active {
  background: rgba(239, 68, 68, 0.30);
  border-color: #f87171;
  color: #fee2e2;
}

.input-tab-pane {
  display: none;
  padding: 14px;
  max-height: calc(100vh - 235px);
  overflow-y: auto;
}

.input-tab-pane.active {
  display: block;
}

.smart-parse-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  background: rgba(14, 165, 233, 0.08);
  border-left: 3px solid var(--cyan);
  padding: 8px 10px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* 医院报告图片上传 / 拖拽 / 粘贴区 */
.ocr-upload-zone {
  border: 1.5px dashed rgba(56, 189, 248, 0.48);
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.09), rgba(15, 23, 42, 0.72));
  border-radius: var(--radius-md);
  padding: 15px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ocr-upload-zone:hover,
.ocr-upload-zone.dragover {
  border-color: var(--cyan);
  background: rgba(14, 165, 233, 0.16);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.18);
}

.ocr-zone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.14);
  margin-bottom: 6px;
}

.ocr-zone-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 4px;
}

.ocr-zone-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.ocr-zone-sub kbd {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10.5px;
  color: #e2e8f0;
}

.ocr-zone-cta-btn {
  display: inline-block;
  margin-top: 9px;
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.28);
}

.btn-qr-mini {
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s;
}

.btn-qr-mini:hover {
  background: rgba(14, 165, 233, 0.30);
  color: #fff;
}

.lan-qr-trigger-btn {
  width: 100%;
  margin-top: 9px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(14, 165, 233, 0.18));
  border: 1px solid rgba(52, 211, 153, 0.48);
  color: #d1fae5;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.18s;
}

.lan-qr-trigger-btn:hover {
  border-color: #34d399;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(14, 165, 233, 0.28));
  color: #fff;
}

.qr-modal-card {
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.38);
  border-radius: var(--radius-lg);
  width: min(440px, 92vw);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

.qr-modal-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.qr-svg-box {
  background: #ffffff;
  padding: 10px;
  border-radius: 14px;
  min-width: 240px;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  font-size: 13px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}

.qr-sync-pill {
  width: 100%;
  text-align: center;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.qr-sync-pill.waiting {
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.36);
  color: #bae6fd;
}

.qr-sync-pill.synced {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.48);
  color: #6ee7b7;
}

.qr-ip-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
}

.qr-ip-row select {
  flex: 1;
}

.qr-url-box {
  width: 100%;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 11.5px;
  color: var(--text-muted);
  word-break: break-all;
}

.qr-url-box code {
  color: #7dd3fc;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.qr-steps-list {
  width: 100%;
  padding-left: 18px;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tab-fill-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 4.5px;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.24);
  color: #6ee7b7;
  margin-left: 1px;
  vertical-align: middle;
}

.tab-fill-badge.warn {
  background: rgba(249, 115, 22, 0.28);
  color: #fdba74;
}

.lifestyle-goto-btn {
  width: 100%;
  margin-top: 10px;
  padding: 7px 10px;
  background: rgba(56, 189, 248, 0.10);
  border: 1px dashed rgba(56, 189, 248, 0.42);
  border-radius: 7px;
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s;
}

.lifestyle-goto-btn:hover {
  background: rgba(56, 189, 248, 0.20);
  color: #fff;
}

/* 生活习惯采集面板 */
.lifestyle-summary-strip {
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-bottom: 11px;
  border: 1px solid var(--border-subtle);
}

.lifestyle-summary-strip.ok {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.36);
  color: #a7f3d0;
}

.lifestyle-summary-strip.warn {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.42);
  color: #fde68a;
}

.lifestyle-summary-strip.danger {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.48);
  color: #fecdd3;
}

.lifestyle-card-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.lifestyle-field-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.lifestyle-field-card label {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
}

.lifestyle-field-card.risk-active {
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(124, 45, 18, 0.16);
}

.sample-img-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.sample-img-btn {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}

.sample-img-btn.highlight {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
  font-weight: 600;
}

.sample-img-btn:hover {
  background: rgba(14, 165, 233, 0.24);
  color: #fff;
}

/* 批量识别总进度条 */
.ocr-batch-progress {
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(14, 165, 233, 0.10);
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: var(--radius-sm);
}

.ocr-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #bae6fd;
  margin-bottom: 5px;
}

.ocr-progress-track {
  height: 5px;
  background: rgba(15, 23, 42, 0.85);
  border-radius: 99px;
  overflow: hidden;
}

.ocr-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9, #34d399);
  transition: width 0.25s ease;
}

.ocr-doc-type-tag {
  position: absolute;
  left: 5px;
  bottom: 5px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  pointer-events: none;
}

.ocr-jump-links {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed rgba(16, 185, 129, 0.28);
  flex-wrap: wrap;
}

.jump-tab-link {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
}

.jump-tab-link:hover {
  background: rgba(16, 185, 129, 0.22);
  color: #fff;
}

/* 自动填入后的表单项高亮反馈 */
.auto-filled-card {
  border-color: rgba(16, 185, 129, 0.55) !important;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.18);
}

.autofill-mini-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
  padding: 0 5px;
  border-radius: 4px;
  margin-left: 5px;
}

.raw-text-details summary::-webkit-details-marker {
  color: var(--cyan);
}

/* 已上传图片缩略图列表 */
.ocr-image-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.ocr-image-gallery:empty {
  display: none;
}

.ocr-thumb-card {
  position: relative;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  overflow: hidden;
}

.ocr-thumb-img-wrap {
  position: relative;
  width: 100%;
  height: 78px;
  background: #090e1c;
  cursor: zoom-in;
  overflow: hidden;
}

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

/* 正在识别时的激光扫描线动画 */
.ocr-thumb-card.scanning .ocr-thumb-img-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, transparent, #38bdf8, #a5f3fc, #38bdf8, transparent);
  box-shadow: 0 0 10px #38bdf8;
  animation: ocrScanMove 1.25s infinite ease-in-out;
}

@keyframes ocrScanMove {
  0% { top: 4%; }
  50% { top: 92%; }
  100% { top: 4%; }
}

.ocr-thumb-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  font-size: 10.5px;
  gap: 4px;
}

.ocr-thumb-name {
  color: #cbd5e1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.ocr-thumb-status {
  font-weight: 600;
  white-space: nowrap;
}

.ocr-thumb-status.scanning { color: #38bdf8; }
.ocr-thumb-status.done { color: #34d399; }
.ocr-thumb-status.err { color: #f87171; }

.ocr-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.ocr-thumb-remove:hover {
  background: var(--danger);
}

/* 识别出的结构化指标面板 */
.ocr-extracted-panel {
  margin-top: 10px;
  padding: 9px 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.30);
  border-radius: var(--radius-sm);
}

.ocr-extracted-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #a7f3d0;
  margin-bottom: 6px;
}

.ocr-count-badge {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 10.5px;
}

.ocr-hits-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ocr-hit-chip {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}

.ocr-hit-chip.vessel {
  border-color: rgba(244, 63, 94, 0.45);
  color: #fecdd3;
}

.ocr-hit-chip.lab {
  border-color: rgba(56, 189, 248, 0.42);
  color: #bae6fd;
}

.ocr-hit-chip.vital {
  border-color: rgba(168, 85, 247, 0.42);
  color: #e9d5ff;
}

.link-upload-txt {
  font-size: 11px;
  font-weight: 500;
  color: var(--cyan);
  cursor: pointer;
}

.link-upload-txt:hover {
  text-decoration: underline;
}

/* 原图放大预览弹窗 */
.img-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2, 6, 23, 0.84);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.img-modal-content {
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.img-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13.5px;
  font-weight: 700;
}

.img-modal-body {
  padding: 12px;
  overflow: auto;
  max-height: calc(90vh - 56px);
}

.img-modal-body img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.report-textarea {
  width: 100%;
  min-height: 115px;
  resize: vertical;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--radius-md);
  color: #f8fafc;
  padding: 11px 12px;
  font-size: 13px;
  line-height: 1.6;
  font-family: inherit;
}

.report-textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.18);
}

.parse-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.16s;
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(51, 65, 85, 0.65);
  color: #e2e8f0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-secondary:hover {
  background: rgba(71, 85, 105, 0.8);
}

.parse-feedback {
  display: none;
  margin-top: 10px;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.parse-feedback.show {
  display: block;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #bae6fd;
}

.parse-feedback.show.success {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.38);
  color: #a7f3d0;
}

.parse-feedback.show.warn {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fde68a;
}

.quick-symptom-box {
  margin-top: 14px;
  padding: 11px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.quick-symptom-box.in-lifestyle-top {
  margin-top: 0;
  border-color: rgba(56, 189, 248, 0.28);
}

.section-mini-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 冠脉交互编辑卡 */
.vessel-edit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  margin-bottom: 10px;
  transition: border-color 0.18s, background 0.18s;
}

.vessel-edit-card.selected {
  border-color: var(--cyan);
  background: rgba(14, 116, 144, 0.16);
}

.vessel-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}

.vessel-title {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
}

.vessel-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.vessel-stenosis-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.vessel-stenosis-pill.ok {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
}

.vessel-stenosis-pill.mild {
  background: rgba(234, 179, 8, 0.18);
  color: #fde047;
}

.vessel-stenosis-pill.warn {
  background: rgba(249, 115, 22, 0.22);
  color: #fdba74;
}

.vessel-stenosis-pill.danger {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.vessel-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.control-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-field.full-span {
  grid-column: 1 / -1;
}

.control-field label {
  font-size: 11.5px;
  color: #cbd5e1;
  display: flex;
  justify-content: space-between;
}

.stenosis-slider {
  width: 100%;
  accent-color: var(--crimson);
  cursor: pointer;
}

select,
input[type="number"] {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: #f8fafc;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12.5px;
}

select:focus,
input[type="number"]:focus {
  outline: none;
  border-color: var(--cyan);
}

.bridge-toggle-row {
  margin-top: 2px;
  padding-top: 5px;
  border-top: 1px dashed rgba(148, 163, 184, 0.16);
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 7px;
  cursor: pointer;
  font-size: 11.5px;
  color: #e2e8f0;
}

/* 验血表单网格 */
.lab-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.lab-input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.lab-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: #cbd5e1;
  margin-bottom: 5px;
}

.lab-unit {
  font-size: 10.5px;
  color: var(--text-muted);
}

.lab-flag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 99px;
  font-weight: 600;
}

.lab-flag.ok { background: rgba(16, 185, 129, 0.14); color: #6ee7b7; }
.lab-flag.warn { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.lab-flag.high { background: rgba(249, 115, 22, 0.22); color: #fdba74; }
.lab-flag.critical { background: rgba(239, 68, 68, 0.28); color: #fca5a5; }

/* 左栏血压对血管壁质量实时条 */
.bp-vascular-strip {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 11.8px;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
}

.bp-vascular-strip.ok {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.36);
  color: #a7f3d0;
}

.bp-vascular-strip.mild {
  background: rgba(234, 179, 8, 0.13);
  border-color: rgba(234, 179, 8, 0.38);
  color: #fef08a;
}

.bp-vascular-strip.warn {
  background: rgba(249, 115, 22, 0.16);
  border-color: rgba(249, 115, 22, 0.45);
  color: #fdba74;
}

.bp-vascular-strip.high {
  background: rgba(239, 68, 68, 0.20);
  border-color: rgba(248, 113, 113, 0.55);
  color: #fecaca;
}

/* 中央核心：跳动心脏数字孪生视窗 */
.center-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 模拟对比典型病例时的顶部醒目返回条 */
.preset-preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 14px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.22), rgba(14, 165, 233, 0.20));
  border: 1.5px solid rgba(251, 191, 36, 0.58);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.ppb-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #fef3c7;
}

.ppb-badge {
  background: rgba(245, 158, 11, 0.32);
  border: 1px solid rgba(251, 191, 36, 0.6);
  color: #fde68a;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.ppb-return-btn {
  background: linear-gradient(135deg, #0284c7, #0d9488);
  border: 1px solid #5eead4;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(20, 184, 166, 0.35);
  transition: transform 0.14s, filter 0.14s;
}

.ppb-return-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.heart-viewport-card {
  position: relative;
}

.viewport-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(9, 14, 28, 0.56);
  flex-wrap: wrap;
  gap: 8px;
}

.btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tool-btn {
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.16s;
}

.tool-btn:hover {
  border-color: var(--cyan);
  color: #fff;
}

.tool-btn.active {
  background: rgba(14, 165, 233, 0.24);
  border-color: var(--cyan);
  color: #7dd3fc;
}

.tool-btn.stress-btn.active {
  background: rgba(244, 63, 94, 0.26);
  border-color: #fb7185;
  color: #fecdd3;
}

/* 位于心脏画布下方的独立体征遥测条（彻底避开上方弹出浮窗，0 遮挡） */
.telemetry-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 14px;
  background: rgba(6, 11, 22, 0.62);
  border-top: 1px solid var(--border-subtle);
}

.tele-pill {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11.5px;
  color: #cbd5e1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.tele-pill strong {
  font-size: 14.5px;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
}

.tele-pill.hr strong { color: #fb7185; }
.tele-pill.ef strong { color: #38bdf8; }

.heart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 468px;
}

#heartCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* 独立底部图例条（不遮挡心脏底部血管标注） */
.legend-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 7px 14px;
  background: rgba(9, 14, 28, 0.72);
  border-top: 1px solid var(--border-subtle);
  font-size: 11.5px;
  color: #cbd5e1;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}

/* 心电图条带 */
.ecg-strip-wrap {
  border-top: 1px solid var(--border-subtle);
  padding: 8px 14px 10px;
  background: rgba(6, 11, 22, 0.72);
}

.ecg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11.5px;
  margin-bottom: 4px;
}

.ecg-status.ok { color: #34d399; }
.ecg-status.warn { color: #fbbf24; font-weight: 600; }
.ecg-status.danger { color: #fb7185; font-weight: 700; }

.ecg-canvas-holder {
  width: 100%;
  height: 58px;
}

#ecgCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* 血管微距内镜检视器 */
.microscope-card {
  padding: 13px 16px;
}

.micro-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.micro-header h3 {
  font-size: 14.5px;
  color: var(--cyan);
}

.micro-header span {
  font-size: 11.5px;
  color: var(--text-muted);
}

.micro-canvas-holder {
  width: 100%;
  height: 144px;
  background: rgba(6, 11, 22, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

#microscopeCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.micro-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 9px;
}

.micro-stat {
  background: var(--bg-card);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.micro-label {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
}

.micro-val {
  font-size: 13px;
  color: #f8fafc;
}

.text-danger {
  color: #fca5a5 !important;
}

.micro-note {
  margin-top: 8px;
  font-size: 12px;
  color: #cbd5e1;
}

/* 右侧：医学评估报告与行动建议 */
.report-scroll-body {
  padding: 14px 16px;
  max-height: calc(100vh - 142px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.diagnosis-banner {
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.30);
}

.diagnosis-banner.level-low {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(15, 23, 42, 0.85));
  border-color: rgba(16, 185, 129, 0.42);
}

.diagnosis-banner.level-mild {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.16), rgba(15, 23, 42, 0.85));
  border-color: rgba(234, 179, 8, 0.45);
}

.diagnosis-banner.level-moderate {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.20), rgba(15, 23, 42, 0.88));
  border-color: rgba(249, 115, 22, 0.5);
}

.diagnosis-banner.level-high {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.24), rgba(15, 23, 42, 0.88));
  border-color: rgba(244, 63, 94, 0.58);
}

.diagnosis-banner.level-critical {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.34), rgba(69, 10, 10, 0.88));
  border-color: #f87171;
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.28);
}

.diag-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.score-ring-box {
  display: flex;
  align-items: baseline;
  gap: 5px 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.score-num {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}

.score-unit {
  font-size: 11.5px;
  color: #cbd5e1;
  white-space: nowrap;
}

.score-band-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

/* 我的情况 vs 典型临床情况：双栏评分与状态叠加比对模块 */
.case-comparison-block {
  position: relative;
  overflow: visible !important;
  z-index: 24;
  background: var(--bg-panel);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-lg);
  padding: 12px 15px;
}

.h2h-reopen-pill {
  background: rgba(245, 158, 11, 0.20);
  border: 1px dashed #fbbf24;
  color: #fde68a;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.h2h-reopen-pill:hover {
  background: rgba(245, 158, 11, 0.34);
  color: #fff;
}

.comp-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.comp-block-head h3 {
  margin-bottom: 0;
}

.comp-back-mini {
  background: rgba(14, 165, 233, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.comp-back-mini:hover {
  background: rgba(14, 165, 233, 0.38);
  color: #fff;
}

.comp-sub-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.case-comparison-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.case-comparison-list.two-col-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 720px) {
  .case-comparison-list.two-col-grid {
    grid-template-columns: 1fr;
  }
}

.comp-row {
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.16);
  cursor: pointer;
  transition: all 0.15s ease;
}

.comp-row:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(30, 58, 95, 0.45);
}

.comp-row.is-user {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.18), rgba(16, 185, 129, 0.12));
  border-color: rgba(45, 212, 191, 0.52);
  cursor: default;
}

.row-comp-toggle {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(14, 165, 233, 0.16);
  color: #bae6fd;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
}

.comp-row:not(.is-user):hover .row-comp-toggle {
  border-color: #fbbf24;
  background: rgba(245, 158, 11, 0.22);
  color: #fef3c7;
}

.row-comp-toggle.active {
  border: 1px dashed #fbbf24;
  background: #f59e0b;
  color: #1c1917;
  font-weight: 800;
}

.gold-frame-demo {
  display: inline-block;
  padding: 0 5px;
  margin: 0 2px;
  border: 1.5px dashed #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  color: #fde68a;
  border-radius: 4px;
  font-weight: 700;
  font-size: 10.5px;
}

.comp-row.is-comparing {
  border: 1.5px dashed #fbbf24;
  background: rgba(245, 158, 11, 0.13);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.22);
}

.comp-viewing-tag.gold {
  background: rgba(245, 158, 11, 0.28);
  border: 1px dashed #fbbf24;
  color: #fef08a;
}

/* 我的程度 vs 比对对象：悬浮弹出式核心差异对照盒（不挤压下方心脏视窗） */
.head-to-head-diff-box.popover-mode {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 45;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(251, 191, 36, 0.78);
  background: rgba(9, 14, 28, 0.96);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.72), 0 0 20px rgba(245, 158, 11, 0.22);
  animation: h2hPopIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.head-to-head-diff-box.popover-mode::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 36px;
  width: 10px;
  height: 10px;
  background: rgba(9, 14, 28, 0.96);
  border-left: 1.5px solid rgba(251, 191, 36, 0.78);
  border-top: 1.5px solid rgba(251, 191, 36, 0.78);
  transform: rotate(45deg);
}

@keyframes h2hPopIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.h2h-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #fde68a;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.h2h-title-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.h2h-close-btn {
  background: rgba(51, 65, 85, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.h2h-close-btn:hover {
  background: rgba(71, 85, 105, 0.95);
  color: #fff;
}

.h2h-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

@media (max-width: 720px) {
  .h2h-rows {
    grid-template-columns: 1fr;
  }
}

.h2h-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 11.3px;
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.65);
}

.h2h-label {
  color: #cbd5e1;
  font-weight: 600;
}

.h2h-vals {
  display: flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.h2h-me {
  color: #7dd3fc;
  font-weight: 700;
}

.h2h-vs {
  color: #64748b;
  font-size: 10px;
}

.h2h-comp {
  color: #fde68a;
  padding: 0 5px;
  border: 1px dashed rgba(251, 191, 36, 0.7);
  border-radius: 4px;
  font-weight: 700;
}

.comp-row-line1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.comp-title {
  font-size: 12.2px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
}

.comp-row-line2 {
  display: grid;
  grid-template-columns: 128px minmax(36px, 1fr) 36px;
  align-items: center;
  gap: 6px;
}

.comp-viewing-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.25);
  color: #bae6fd;
  white-space: nowrap;
  flex-shrink: 0;
}

.comp-stenosis-tag {
  font-size: 10.8px;
  color: #94a3b8;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.comp-score-num {
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}

.comp-score-num.lv-low { color: #34d399; }
.comp-score-num.lv-mild { color: #facc15; }
.comp-score-num.lv-moderate { color: #fb923c; }
.comp-score-num.lv-high,
.comp-score-num.lv-critical { color: #fb7185; }

.comp-bar-track {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  overflow: hidden;
}

.comp-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.28s ease;
}

.comp-bar-fill.lv-low { background: linear-gradient(90deg, #0d9488, #10b981); }
.comp-bar-fill.lv-mild { background: linear-gradient(90deg, #ca8a04, #eab308); }
.comp-bar-fill.lv-moderate { background: linear-gradient(90deg, #ea580c, #f97316); }
.comp-bar-fill.lv-high,
.comp-bar-fill.lv-critical { background: linear-gradient(90deg, #e11d48, #ef4444); }

.case-comparison-insight {
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: 7px;
  background: rgba(14, 165, 233, 0.11);
  border-left: 3px solid var(--cyan);
  font-size: 11.5px;
  color: #e0f2fe;
}

.temporal-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 5px;
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
}

.cadrads-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #7dd3fc;
  white-space: nowrap;
  flex-shrink: 0;
}

.diag-headline {
  font-size: 15.5px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.diag-summary {
  font-size: 12.5px;
  color: #e2e8f0;
  margin-bottom: 7px;
}

.diag-cadrads-note {
  font-size: 11.5px;
  color: #bae6fd;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.report-block h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.report-block h3::before {
  content: "";
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: var(--crimson);
}

/* 逐支血管进度条表（纯展示无点选态） */
.vessel-summary-row {
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: 6px;
}

.vs-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 5px;
  gap: 6px;
}

.vs-name { font-weight: 700; color: #f1f5f9; }
.vs-plaque { font-size: 11px; color: var(--text-muted); flex: 1; text-align: right; margin-right: 6px; }
.vs-pct { font-weight: 700; font-size: 11.5px; }

.bar-ok-text { color: #6ee7b7; }
.bar-mild-text { color: #fde047; }
.bar-warn-text { color: #fdba74; }
.bar-danger-text { color: #fca5a5; }

.vs-progress-track {
  position: relative;
  height: 6px;
  background: rgba(15, 23, 42, 0.85);
  border-radius: 99px;
  overflow: visible;
}

.vs-comp-marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 9px;
  transform: translateX(-50%);
  border: 1.5px dashed #fbbf24;
  background: rgba(251, 191, 36, 0.26);
  border-radius: 3px;
  z-index: 3;
  pointer-events: none;
}

.vs-comp-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 4px;
  border: 1px dashed rgba(251, 191, 36, 0.78);
  background: rgba(245, 158, 11, 0.14);
  color: #fde68a;
  margin-left: 4px;
}

.vs-progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s ease;
}

.bar-ok { background: #10b981; }
.bar-mild { background: #eab308; }
.bar-warn { background: #f97316; }
.bar-danger { background: linear-gradient(90deg, #f97316, #ef4444); }

.vs-threshold-mark {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: rgba(255, 255, 255, 0.48);
}

/* 鉴别诊断与验血解读条目 */
.finding-item {
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border-left: 3px solid #64748b;
  margin-bottom: 7px;
}

.finding-item.ok { border-left-color: var(--emerald); }
.finding-item.mild { border-left-color: #eab308; }
.finding-item.warn, .finding-item.moderate { border-left-color: var(--orange); }
.finding-item.high { border-left-color: var(--danger); }

.finding-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 3px;
}

.finding-desc {
  font-size: 11.8px;
  color: #cbd5e1;
}

/* 行动建议卡片 */
.action-card {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
  font-size: 12px;
  color: #e2e8f0;
}

.action-card.priority-urgent {
  background: rgba(153, 27, 27, 0.35);
  border-color: #f87171;
}

.action-card.priority-high {
  border-color: rgba(249, 115, 22, 0.5);
}

.action-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 4px;
  margin-bottom: 5px;
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
}

.priority-urgent .action-tag {
  background: #ef4444;
  color: #fff;
}

.priority-high .action-tag {
  background: rgba(249, 115, 22, 0.26);
  color: #fdba74;
}

.disclaimer-box {
  font-size: 11px;
  color: var(--text-muted);
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.65);
  border: 1px dashed rgba(148, 163, 184, 0.25);
}

/* 响应式适配 */
@media (max-width: 1320px) {
  .workspace-grid {
    grid-template-columns: 350px 1fr;
  }
  .report-panel {
    grid-column: 1 / -1;
  }
  .report-scroll-body {
    max-height: none;
  }
}

@media (max-width: 880px) {
  .workspace-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .input-tab-pane {
    max-height: none;
  }
  .heart-canvas-wrap {
    height: 430px;
  }
}

@media (max-width: 600px) {
  .telemetry-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 页面底部：评估临床指南与文献参考依据区域 */
.evidence-footer {
  max-width: 1760px;
  margin: 4px auto 36px;
  padding: 0 20px;
}

.evidence-container {
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.evidence-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.evidence-title {
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 4px;
}

.evidence-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
}

.evidence-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.34);
  color: #7dd3fc;
  white-space: nowrap;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.evidence-card {
  background: rgba(30, 41, 59, 0.50);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.evidence-card.full-width-card {
  grid-column: 1 / -1;
}

.ev-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ev-domain-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
}

.ev-domain-pill.cad {
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
}

.ev-domain-pill.ccs {
  background: rgba(249, 115, 22, 0.20);
  color: #fdba74;
}

.ev-domain-pill.lipid {
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
}

.ev-domain-pill.hf {
  background: rgba(168, 85, 247, 0.20);
  color: #d8b4fe;
}

.ev-domain-pill.life {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

.ev-year {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.evidence-card h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
}

.ev-mapping {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.6;
}

.ev-mapping code {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 4px;
  padding: 0 5px;
  font-size: 11px;
  color: #bae6fd;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ev-cite {
  font-size: 11.2px;
  color: #94a3b8;
  line-height: 1.5;
  padding-top: 5px;
  border-top: 1px dashed rgba(148, 163, 184, 0.16);
}

@media (max-width: 880px) {
  .evidence-footer {
    padding: 0 12px;
  }
  .evidence-grid {
    grid-template-columns: 1fr;
  }
}

/* 打印样式优化（彻底排除所有比对模块与叠加比对框，仅输出用户个人评估报告） */
@media print {
  body {
    background: #fff;
    color: #0f172a;
  }
  .top-header .preset-bar,
  .input-panel,
  .viewport-toolbar,
  .inspector-quick-bar,
  #btnPrintReport,
  #caseComparisonBlock,
  #presetPreviewBanner,
  .no-print,
  .comp-num-overlay,
  .micro-comp-overlay,
  .vessel-comp-pill,
  .slider-comp-tick,
  .tele-comp-tag,
  .vs-comp-tag,
  .vs-comp-marker {
    display: none !important;
  }
  .choice-pill.comp-framed,
  .iq-btn.comp-framed,
  .lab-q-chip.comp-framed {
    outline: none !important;
    box-shadow: none !important;
  }
  .choice-pill.comp-framed::after,
  .iq-btn.comp-framed::after,
  .lab-q-chip.comp-framed::after {
    display: none !important;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .panel-box,
  .diagnosis-banner,
  .evidence-container,
  .evidence-card {
    background: #fff !important;
    color: #0f172a !important;
    box-shadow: none;
    border: 1px solid #cbd5e1 !important;
  }
  .score-num,
  .score-unit,
  .score-band-pill,
  .diag-headline,
  .diag-summary,
  .diag-cadrads-note,
  .cadrads-tag,
  .evidence-title,
  .evidence-card h4,
  .ev-mapping,
  .ev-cite {
    color: #1e293b !important;
  }
  .report-scroll-body {
    max-height: none;
    overflow: visible;
  }
}
