/* 样式源自原型 prototype.html（V5.6），按专业医疗行业 SaaS 视觉规范精修并扩展平台全局样式 */

:root {
  /* 中性灰阶（Clinical Cool Slate） */
  --gray-25: #fcfdfe;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-150: #e9eff5;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* 背景与边框语义映射 */
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: var(--gray-50);
  --surface-3: var(--gray-100);
  --ink: var(--gray-900);
  --ink-2: var(--gray-700);
  --muted: var(--gray-500);
  --line: var(--gray-200);
  --line-strong: var(--gray-300);

  /* 主色：深青医疗色 */
  --accent: #0f4c5c;
  --accent-hover: #0b3b48;
  --accent-active: #082d37;
  --accent-soft: #eff6f8;
  --accent-soft-hover: #e1eef2;
  --accent-border: #b8d7e0;
  --accent-ring: rgba(15, 76, 92, 0.16);

  /* 语义色：成功 / 警告 / 危险 / 信息 */
  --ok: #15803d;
  --ok-hover: #166534;
  --ok-ink: #14532d;
  --ok-soft: #f0fdf4;
  --ok-border: #bbf7d0;

  --warn: #b45309;
  --warn-ink: #92400e;
  --warn-bg: #fffbeb;
  --warn-border: #fcd34d;
  --warn-accent: #f59e0b;

  --err: #dc2626;
  --err-hover: #b91c1c;
  --err-ink: #991b1b;
  --err-bg: #fef2f2;
  --err-border: #fecaca;
  --err-accent: #ef4444;

  --info: #0369a1;
  --info-ink: #075985;
  --info-bg: #f0f9ff;
  --info-border: #bae6fd;

  /* 尺寸、圆角与阴影规范 */
  --radius-lg: 10px;
  --radius-md: 7px;
  --radius-sm: 5px;
  --ctrl-h: 36px;
  --ctrl-h-sm: 32px;
  --ctrl-h-xs: 28px;
  --pad-card: 20px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-float: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-modal: 0 20px 48px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 全局排版层级 */
h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.012em;
}
h1 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}
h2 {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 12px;
}
h3 {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
}
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }

/* Dense prominent watermark (on top of page content, strictly non-interactive) */
#watermark-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 120;
  opacity: 0.85;
  background-repeat: repeat;
}

#global-drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}
#global-drop-overlay.active { display: flex; }
.drop-overlay-box {
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 32px 28px;
  text-align: center;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-modal);
}

.demo-banner {
  display: none;
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-bottom: 1px solid var(--warn-border);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.demo-banner.active { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* 顶部全局导航栏 */
.global-nav {
  min-height: 52px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 24px;
  position: sticky;
  top: 0;
  z-index: 80;
}
.brand {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.brand::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.nav-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-user {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface-3);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 999px;
}
.nav-user:empty { display: none; }
.save-pill { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.save-pill.warn { color: var(--warn-ink); font-weight: 600; }
.nav-btn {
  min-height: var(--ctrl-h-sm);
  min-width: 32px;
  padding: 4px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px 96px;
}

/* 一级容器卡片 */
.surface-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--pad-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
  margin-bottom: 14px;
}

/* Course Strip（专家端顶部课程条） */
.course-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px var(--pad-card);
  border-left: 3px solid var(--accent);
}
.course-strip > span {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 999px;
}
.course-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1;
}
.course-title-row strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.expert-hello { font-size: 13.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.course-name-btn {
  background: none;
  border: 0;
  padding: 2px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  overflow-wrap: anywhere;
}
.course-name-btn:hover { color: var(--accent); }
.pill-mini {
  min-height: var(--ctrl-h-xs);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

/* 步骤指示器 */
.step-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.step-pill {
  min-height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.step-pill:hover:not(:disabled):not(.active) {
  border-color: var(--accent-border);
  color: var(--accent);
}
.step-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
}
.step-pill.done {
  background: var(--ok-soft);
  border-color: var(--ok-border);
  color: var(--ok-ink);
}
.step-pill:disabled { opacity: 0.5; cursor: not-allowed; }
.course-strip + .step-bar .step-pill { white-space: normal; }

/* 提交回执与完成提示卡片 */
.complete-card {
  background: var(--ok-soft);
  border: 1px solid var(--ok-border);
  border-left: 3px solid var(--ok);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.complete-card.submitted-receipt {
  display: grid;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 36px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--ok);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.submitted-receipt h1, .submitted-receipt p { margin: 0; }
.submitted-receipt h1 { color: var(--ok); font-size: 20px; }
.submitted-receipt p { color: var(--ink-2); font-size: 13.5px; }
.submitted-receipt .toolbar { justify-content: center; margin-top: 8px; }

/* 三步骤分块与编号对齐 */
.screen-block { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.screen-block:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.step-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--ink);
  line-height: 1.4;
}
.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; }
.kpi-num { font-size: 20px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--ink); }
.kpi-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
@media (max-width: 760px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 按钮层级：主按钮 / 确认按钮 / 次按钮 / 警告按钮 / 低噪危险按钮 */
.btn {
  min-height: var(--ctrl-h);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 76, 92, 0.18);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-primary:active:not(:disabled) {
  background: var(--accent-active);
}

.btn-soft {
  background: var(--surface);
  color: var(--ink-2);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}
.btn-soft:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--gray-400);
  color: var(--ink);
}

.btn-ok {
  background: var(--ok);
  border-color: var(--ok);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(21, 128, 61, 0.18);
}
.btn-ok:hover:not(:disabled) {
  background: var(--ok-hover);
  border-color: var(--ok-hover);
}

.btn-warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-color: var(--warn-border);
  font-weight: 600;
}
.btn-warn:hover:not(:disabled) {
  background: #fef3c7;
}

/* 危险按钮：常态克制无框红字，悬停显色，与「改字」次按钮严格区分 */
.btn-danger {
  color: var(--err);
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.btn-danger:hover:not(:disabled) {
  background: var(--err-bg);
  border-color: var(--err-border);
  color: var(--err-hover);
}

.btn-sm { min-height: var(--ctrl-h-sm); padding: 4px 12px; font-size: 13px; border-radius: var(--radius-md); }
.btn-xs { min-height: var(--ctrl-h-xs); padding: 3px 9px; font-size: 12.5px; border-radius: var(--radius-sm); }

.link-btn {
  background: none;
  border: 0;
  color: var(--accent);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px;
  min-height: var(--ctrl-h-sm);
  display: inline-flex;
  align-items: center;
}
.link-btn:hover { text-decoration: underline; }

/* 上传区与素材列表 */
.dropzone {
  border: 1.5px dashed var(--line-strong);
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone h2 { margin: 0 0 4px; font-size: 15px; }
.dropzone p { margin: 0 0 10px; font-size: 13px; color: var(--muted); }

.asset-list { display: grid; gap: 8px; margin-top: 12px; }
.asset-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  flex-wrap: wrap;
}
.asset-item.video-placeholder-item {
  background: var(--info-bg);
  border-style: dashed;
  border-color: var(--info-border);
}
.video-placeholder-glyph {
  width: 38px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.asset-meta { min-width: 0; flex: 1; }
.asset-name { font-weight: 600; font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
.asset-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

.review-video-cue {
  border: 1px dashed var(--accent-border);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 单选结构与档位卡片 */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid-2 > * { min-width: 0; }
.choice-card {
  position: relative;
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}
.choice-card:hover {
  border-color: var(--accent-border);
  background: var(--gray-25);
}
.choice-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice-card.selected,
.choice-card:has(input[type="radio"]:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.choice-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.choice-title::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-400);
  background: var(--surface);
  flex-shrink: 0;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.choice-card.selected .choice-title::before,
.choice-card:has(input[type="radio"]:checked) .choice-title::before {
  border-color: var(--accent);
  border-width: 4.5px;
}
.choice-desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; padding-left: 22px; }

/* 自动目录微调面板 */
.auto-outline-box {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.auto-outline-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.auto-outline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.auto-outline-idx {
  min-width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.auto-outline-row input[type="text"] {
  flex: 1;
  min-width: 0;
  min-height: var(--ctrl-h-sm);
  height: var(--ctrl-h-sm);
  padding: 4px 10px;
  font-size: 13.5px;
}

.template-fallback {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 8px 12px;
}
.template-fallback summary {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
}
.template-fallback summary::-webkit-details-marker { display: none; }
.template-fallback summary::after {
  content: "展开选用 ▾";
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  flex-shrink: 0;
}
.template-fallback[open] summary::after { content: "收起 ▴"; }
.template-fallback[open] summary { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }

/* 表单输入统一高度与清晰 Focus 态 */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="email"],
input[type="url"],
input:not([type]),
textarea,
select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 6px 11px;
  min-height: var(--ctrl-h);
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="email"],
input[type="url"],
input:not([type]),
select {
  height: var(--ctrl-h);
}
input::placeholder, textarea::placeholder {
  color: var(--gray-400);
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input:not([type]):focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
input:disabled, textarea:disabled, select:disabled {
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
}
input[type="file"] {
  width: 100%;
  max-width: 100%;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 5px 8px;
}
input[type="file"]::file-selector-button {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  margin-right: 10px;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}
input[type="file"]::file-selector-button:hover {
  background: var(--surface-3);
  border-color: var(--gray-400);
}
textarea { min-height: 84px; height: auto; resize: vertical; line-height: 1.55; padding: 8px 11px; }

.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.muted-note, .muted { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
h1 + .muted-note, h2 + .muted-note { margin-top: 3px; }

/* 状态徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  max-width: 100%;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.badge-ok { background: var(--ok-soft); color: var(--ok-ink); border: 1px solid var(--ok-border); }
.badge-warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-border); }
.badge-err { background: var(--err-bg); color: var(--err-ink); border: 1px solid var(--err-border); }
.badge-blue { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border); }
.badge-gray { background: var(--surface-3); color: var(--gray-600); border: 1px solid var(--line); }

/* 提示横幅（补齐默认中性态与三类语义态） */
.alert-bar {
  padding: 9px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 10px;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.alert-bar:last-child { margin-bottom: 0; }
.alert-warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-color: var(--warn-border);
  border-left: 3px solid var(--warn-accent);
}
.alert-ok {
  background: var(--ok-soft);
  color: var(--ok-ink);
  border-color: var(--ok-border);
  border-left: 3px solid var(--ok);
}
.alert-err {
  background: var(--err-bg);
  color: var(--err-ink);
  border-color: var(--err-border);
  border-left: 3px solid var(--err-accent);
}

/* Step 3 Processing */
.stage-list { display: grid; gap: 8px; margin: 14px 0; }
.stage-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 13.5px;
}
.stage-row.active { border-color: var(--accent); background: var(--accent-soft); }
.stage-row.done { border-color: var(--ok-border); background: var(--ok-soft); }

/* 分段切换器（审校教案 / 音视频准备单） */
.seg-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}
.seg-tab {
  min-height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--gray-600);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}
.seg-tab:hover:not(.active) { color: var(--ink); }
.seg-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

/* 审校双栏工作区（左栏目录导航 + 右栏正文） */
.review-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
#app-root .review-workspace .review-layout {
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 16px;
}
.review-layout > * { min-width: 0; }

.catalog-nav {
  position: sticky;
  top: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-card);
}
.catalog-nav-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-bottom: 8px;
  padding: 0 4px;
}
.catalog-anchor-list { display: grid; gap: 3px; }
.catalog-anchor {
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  transition: background 0.12s ease, color 0.12s ease;
}
.catalog-anchor > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.catalog-anchor:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.mobile-filter-bar { display: none; }

.manuscript-wrap {
  max-width: 820px;
  min-width: 0;
}

/* 章节卡片与模块卡片层次区分（避免同权重白卡片层层套叠） */
.catalog-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.catalog-block:last-child { margin-bottom: 0; }

.catalog-heading {
  font-size: 14.5px;
  font-weight: 600;
  padding: 11px var(--pad-card);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.catalog-heading > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.catalog-heading > span:first-child::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.module-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--gray-25);
  transition: border-color 0.14s ease, background 0.14s ease;
}
.catalog-block > .module-card {
  margin: 12px var(--pad-card);
}
.catalog-block > .review-video-cue {
  margin: 10px var(--pad-card) 14px;
}
.module-card.prov-ai {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  border-left: 3px solid var(--warn-accent);
}
.module-card.prov-missing {
  background: var(--err-bg);
  border-color: var(--err-border);
  border-left: 3px solid var(--err-accent);
}

.module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.module-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.module-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.module-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--gray-800);
}
.module-body p { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.module-body p:last-child { margin-bottom: 0; }
.module-body ul { margin: 6px 0 10px; padding-left: 20px; }
.module-body li { margin-bottom: 4px; }

/* 习题选项与解析 */
.opt-list { display: grid; gap: 5px; margin: 8px 0; font-size: 13.5px; }
.opt-row {
  padding: 6px 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.module-body > .opt-row { margin-top: 5px; }
.opt-row.correct {
  background: var(--ok-soft);
  border-color: var(--ok-border);
  color: var(--ok-ink);
  font-weight: 600;
}
.answer-line {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ok);
  margin: 8px 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.exp-box {
  font-size: 13.5px;
  color: var(--ink-2);
  border-top: 1px dashed var(--line-strong);
  padding-top: 8px;
  margin-top: 8px;
}
.exp-box:empty { display: none; }

/* 题目分支配置与答案勾选器 */
.branch-box {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
}
.branch-box.has-branch {
  background: var(--info-bg);
  border-color: var(--info-border);
  border-style: solid;
}
.branch-box summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.branch-box summary::-webkit-details-marker { display: none; }
.branch-mode-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 6px;
}
.branch-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.branch-pill.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.ans-check-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ans-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  min-height: var(--ctrl-h-sm);
  transition: border-color 0.14s ease, background 0.14s ease;
}
.ans-check-pill input { width: 15px; height: 15px; min-height: auto; accent-color: var(--ok); }
.ans-check-pill:has(:checked) { color: var(--ok-ink); background: var(--ok-soft); border-color: var(--ok); }

.editor-step-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  margin-bottom: 12px;
}
.editor-step-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 8px;
  flex-wrap: wrap;
}

/* 临床配图条 */
.img-strip {
  display: grid;
  gap: 8px;
  margin: 8px 0;
}
.img-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  margin-top: 8px;
  flex-wrap: wrap;
}
.img-card img {
  width: 136px;
  max-width: 100%;
  /* 超长条图（如整页截图）按宽度缩放后高度会到几千像素，把整页撑开，
     这里限高并等比缩进框内，专家点开原图再看细节 */
  max-height: 180px;
  object-fit: contain;
  background: var(--gray-50, #f8fafc);
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  display: block;
}
.img-meta { flex: 1; min-width: 180px; }

/* 数据表格：统一压暗表头、斑马纹与行 Hover */
.table-wrap { overflow-x: auto; }
table.clean,
table.clean-table,
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
table.clean th,
table.clean td,
table.clean-table th,
table.clean-table td,
.data-table th,
.data-table td {
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.clean thead th,
table.clean-table thead th,
.data-table thead th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--gray-600);
  background: var(--gray-100);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
table.clean tbody tr:last-child td,
table.clean-table tbody tr:last-child td,
.data-table tbody tr:last-child td {
  border-bottom: 0;
}
table.clean tbody tr:nth-child(even) td,
table.clean-table tbody tr:nth-child(even) td,
.data-table tbody tr:nth-child(even) td {
  background: var(--gray-25);
}
table.clean tbody tr:hover td,
table.clean-table tbody tr:hover td,
.data-table tbody tr:hover td {
  background: var(--accent-soft);
}
table.clean td input,
.data-table td input {
  height: 30px;
  min-height: 30px;
  padding: 4px 8px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.mobile-cards { display: none; gap: 10px; }
.mobile-task-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--surface-2);
  display: grid;
  gap: 6px;
  font-size: 13.5px;
}

/* Code-like Docx Preview */
.docx-preview-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 540px;
  overflow-y: auto;
}

/* 底部交付操作条 */
.bottom-bar {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 12px var(--pad-card);
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.bottom-bar strong { font-size: 14px; color: var(--ink); }

/* 弹窗与对话框 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.active { display: flex; }
.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  width: min(600px, 100%);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}
.modal-card > [data-np-panel] {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}
.modal-head {
  padding: 14px var(--pad-card);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}
.modal-head h3 { margin: 0; font-size: 15.5px; font-weight: 600; }
.modal-body {
  padding: 16px var(--pad-card);
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
}
#edit-body { max-height: 68vh; overflow: auto; }
.modal-foot {
  padding: 12px var(--pad-card);
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.field { display: grid; gap: 5px; min-width: 0; }
.field > span,
fieldset.field > legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.4;
}
.field + .field { margin-top: 12px; }
fieldset.field { margin-inline: 0; padding: 0; border: 0; }
fieldset.field legend { padding: 0; margin-bottom: 5px; }

/* 音视频登记表单对齐 */
#media-form {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  gap: 10px;
  align-items: flex-end;
}
#media-form .field { margin: 0; }
#media-form #media-type {
  min-height: var(--ctrl-h) !important;
  height: var(--ctrl-h);
}
#media-form > span.muted-note {
  height: var(--ctrl-h);
  display: inline-flex;
  align-items: center;
}
#catalog-media-modal #media-form {
  background: transparent;
  border: 0;
  padding: 0;
}

.media-correction {
  color: var(--accent);
  background: transparent;
  border: 0;
  padding: 3px 0;
  font: inherit;
  font-size: 12.5px;
  text-decoration: underline;
  cursor: pointer;
}
.media-correction:hover { color: var(--accent-hover); }

.expert-dialog {
  width: min(600px, calc(100% - 32px));
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  max-height: calc(100dvh - 32px);
}
.expert-dialog[open] { display: flex; flex-direction: column; }
.expert-dialog::backdrop { background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(2px); }

.progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.3s ease; }
#organize-box:has(.progress) { margin-top: 14px; font-size: 14px; font-weight: 600; }
#organize-box .progress, #organize-box p { margin: 6px 0; }

.floating-help-btn {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 70;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-float);
  cursor: pointer;
}
.page-footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 8px 0 64px;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 76px;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-float);
  z-index: 400;
  display: none;
  max-width: calc(100vw - 32px);
  text-align: center;
}
#toast.show { display: block; }

/* ---------- 平台全局扩展：登录 / 编辑工作台 / 课程页 / 项目总览 / 弹窗组件 ---------- */

.grid-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wrap-narrow { max-width: 960px; margin: 0 auto; padding: 20px; }
.wrap-wide { max-width: 1180px; margin: 0 auto; padding: 20px; }

/* 卡片顶部含标题的主工具栏左右对齐（项目列表页头、课程页头、施工单页头） */
.surface-card > .toolbar:has(h1, h2) {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.surface-card > .toolbar h1,
.surface-card > .toolbar h2 {
  margin-bottom: 0;
}
#app-root > section.surface-card:first-child:has(h1) {
  padding: 16px var(--pad-card);
  border-left: 3px solid var(--accent);
}

/* 1. 登录页（renderLogin） */
.login-wrap {
  max-width: 400px;
  margin: 56px auto 0;
}
.login-wrap > .surface-card {
  padding: 28px 28px 24px;
  border-top: 3px solid var(--accent);
  box-shadow: var(--shadow-float);
}
.login-wrap h1 {
  font-size: 19px;
  margin-bottom: 4px;
}
.login-wrap > .surface-card > p.muted-note:first-of-type {
  margin-bottom: 18px;
}
.login-wrap .toolbar {
  margin-top: 14px;
}
.login-wrap #do-login {
  width: 100%;
  min-height: 38px;
}
#login-msg:not(:empty),
#boot-msg:not(:empty) {
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--err-bg);
  color: var(--err-ink);
  border: 1px solid var(--err-border);
  font-size: 12.5px;
}
.login-wrap details {
  margin-top: 18px !important;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.login-wrap details summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  user-select: none;
}
.login-wrap details summary::-webkit-details-marker { display: none; }
.login-wrap details summary::after {
  content: "展开 ▾";
  font-size: 12px;
  color: var(--gray-400);
}
.login-wrap details[open] summary::after { content: "收起 ▴"; }
.login-wrap details summary:hover { color: var(--accent); }

/* 2. 编辑台首页：项目卡片 + 课程表（消除双层白卡片嵌套，统一左基线） */
#app-root > section.surface-card:has(> .catalog-block[data-project]) {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.catalog-block[data-project] > div[id^="courses-"] > p.muted-note {
  margin: 0;
  padding: 16px var(--pad-card);
}
.catalog-block[data-project] table.clean {
  border: 0;
  border-radius: 0;
}
.catalog-block[data-project] table.clean th:first-child,
.catalog-block[data-project] table.clean td:first-child {
  padding-left: var(--pad-card);
}
.catalog-block[data-project] table.clean th:last-child,
.catalog-block[data-project] table.clean td:last-child {
  padding-right: var(--pad-card);
}
.catalog-block[data-project] table.clean td:nth-child(3) {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 13px;
}

/* 3. 编辑端课程页：素材文件条、施工单与整理结果层次 */
#file-list {
  display: grid;
  gap: 8px;
}
#file-list .alert-bar {
  margin-bottom: 0;
  padding: 8px 12px;
}
#file-list [data-del-asset] {
  min-height: var(--ctrl-h-xs);
  padding: 3px 10px;
  font-size: 12.5px;
  color: var(--err);
  border-color: var(--err-border);
  background: var(--surface);
}
#file-list [data-del-asset]:hover {
  background: var(--err-bg);
}

#ws-summary {
  margin-top: 6px;
}
#ws-list > div {
  padding: 9px 10px !important;
  margin: 0 -10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  transition: background 0.12s ease;
}
#ws-list > div:hover {
  background: var(--surface-2);
}
#ws-list > div:last-child {
  border-bottom: 0 !important;
}

/* 编辑端课程页内嵌的「整理结果」章节采用轻底分组，不重复投影 */
.surface-card:not(.review-workspace) > .catalog-block:not([data-project]) {
  box-shadow: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.surface-card:not(.review-workspace) > .catalog-block:not([data-project]) > .catalog-heading {
  background: var(--surface-3);
  padding: 10px 16px;
}
.surface-card:not(.review-workspace) > .catalog-block:not([data-project]) > .module-card {
  margin: 10px 14px;
  background: var(--surface);
}
.surface-card:not(.review-workspace) > .catalog-block:not([data-project]) > .module-card.prov-ai {
  background: var(--warn-bg);
}
.surface-card:not(.review-workspace) > .catalog-block:not([data-project]) > .module-card.prov-missing {
  background: var(--err-bg);
}

/* 4. 项目总览页（/p/<token>） */
.surface-card > h2:has(> .muted-note) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.surface-card > .module-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 12px 14px;
  margin: 8px 0 0 !important;
}
.surface-card > .module-card:hover {
  background: var(--surface);
  border-color: var(--accent-border);
}
.surface-card > .module-card > .toolbar {
  justify-content: space-between;
}

/* 5. 专家端审校工作区去重外框，突出左目录+右原稿 */
.surface-card.review-workspace {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.review-workspace > .toolbar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px var(--pad-card);
  margin-bottom: 14px !important;
  box-shadow: var(--shadow-xs);
}

/* 6. 新建项目与立项书导入弹窗 */
.plan-tabs {
  display: flex;
  gap: 4px;
  padding: 0 var(--pad-card);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.plan-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.14s ease, border-color 0.14s ease;
}
.plan-tab.active {
  color: var(--accent);
  font-weight: 600;
  border-bottom-color: var(--accent);
}
.plan-tab:hover { color: var(--accent); }

.prop-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}
.prop-upload-row input[type="file"] {
  flex: 1;
}
#prop-notes:not(:empty) {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--info-bg);
  color: var(--info-ink);
  border: 1px solid var(--info-border);
}

.radio-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.radio-item { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; max-width: 320px; }
.radio-item input[type="radio"] { margin-top: 3px; flex: none; width: 16px; height: 16px; accent-color: var(--accent); }
.radio-item b { display: block; font-size: 14px; }
.radio-item span { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-top: 2px; }

/* 手机 / 微信电脑打开提示层 */
.mobile-tip-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  padding: 20px;
  overflow: auto;
}
.mobile-tip-card {
  max-width: 400px;
  margin: 10vh auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-float);
}
.mobile-tip-card h3 {
  margin: 0 0 10px;
  font-size: 17px;
  color: var(--ink);
}
.mobile-tip-card p {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.65;
}
.mobile-tip-url {
  margin: 4px 0 16px;
  padding: 9px 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  font-size: 12.5px;
  color: var(--accent);
  word-break: break-all;
}

/* ---------- 响应式适配（平板 <= 899px / 手机 <= 760px 单栏保持不坏） ---------- */
@media (max-width: 899px) {
  .review-layout,
  #app-root .review-workspace .review-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .catalog-nav { display: none; }
  .mobile-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 55;
    background: var(--bg);
  }
  .mobile-chip {
    min-height: 32px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
  }
  .mobile-chip.active { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-ink); }
}

@media (max-width: 760px) {
  :root {
    --pad-card: 14px;
  }
  .global-nav { padding: 8px 14px; }
  .container { padding: 12px 12px calc(96px + env(safe-area-inset-bottom)); }
  .login-wrap { margin-top: 24px; }
  .login-wrap > .surface-card { padding: 20px 18px; }
  .surface-card { padding: 14px; }
  .catalog-heading { padding: 10px 14px; }
  .catalog-block > .module-card { margin: 10px 12px; padding: 12px; }
  .catalog-block > .review-video-cue { margin: 8px 12px 12px; }
  .img-card { flex-direction: column; }
  .img-card img { width: 100%; max-width: 280px; }
  .img-meta { min-width: 0; width: 100%; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .step-bar { grid-template-columns: minmax(0, 1fr) !important; gap: 6px; }
  .step-pill { font-size: 13px; padding: 6px 10px; justify-content: flex-start; }
  .seg-tabs { gap: 4px; padding: 3px; }
  .seg-tab { font-size: 13px; padding: 5px 6px; min-height: 34px; }
  .desktop-table-wrap { display: none; }
  .mobile-cards { display: grid; }
  table.clean { display: block; overflow-x: auto; }
  .floating-help-btn { display: none; }
  .modal-card { width: 100%; max-height: calc(100dvh - 16px); border-radius: var(--radius-lg); }
}

/* 总览页：整班进度概要 */
.progress-summary { margin: 14px 0 10px; }
.progress-track { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #e2e8f0; }
.progress-track .seg { display: block; height: 100%; }
.progress-track .seg-ok { background: #15803d; }
.progress-track .seg-run { background: #b45309; }
.progress-legend { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 8px; font-size: 12.5px; color: #475569; }
.progress-legend .lg { display: inline-flex; align-items: center; gap: 5px; }
.progress-legend .lg::before { content: ""; width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.progress-legend .lg-ok::before { background: #15803d; }
.progress-legend .lg-run::before { background: #b45309; }
.progress-legend .lg-idle::before { background: #cbd5e1; }
.progress-legend b { color: #0f172a; font-weight: 700; }
