/* =====================================================================
   专病数据库 · 全站样式（依据 reference/design_ui.md）
   目录：1 设计令牌  2 基础元素  3 通用组件  4 外框布局（侧栏/顶栏/主区）
        5 各页面  6 核查页兼容  7 响应式（只用三档断点）
   断点：手机 max-width:767px ｜ 平板 768–1099px ｜ 桌面 min-width:1100px
   说明：核查页（review.css）复用这里的令牌和 class，改名前请先全局搜索。
   ===================================================================== */

/* ---------- 1 设计令牌 ---------- */
:root {
  /* 主色：沿用医疗蓝，与 theme-color 一致 */
  --c-primary: #0d4382;
  --c-primary-hover: #093769;
  --c-primary-press: #082c54;
  --c-primary-soft: #eaf2ff;
  --c-primary-line: #b9cff0;

  /* 中性色：文字 / 线 / 背景 */
  --c-ink: #172f4c;
  --c-ink-2: #3d5570;
  --c-muted: #5f738a;
  --c-faint: #8a9bb0;
  --c-line: #d9e3ef;
  --c-line-strong: #c2d1e3;
  --c-bg: #f4f7fb;
  --c-surface: #ffffff;
  --c-surface-2: #f7f9fc;

  /* 状态色：每种 = 文字色 / 底色 / 边线色 */
  --s-pending-fg: #8a4b00;
  --s-pending-bg: #fff4e0;
  --s-pending-line: #f2cf8f;
  --s-done-fg: #1e6549;
  --s-done-bg: #e9f4ee;
  --s-done-line: #bcdccb;
  --s-fail-fg: #a33a2b;
  --s-fail-bg: #fff1ee;
  --s-fail-line: #efc2b8;
  --s-queue-fg: #4f5f73;
  --s-queue-bg: #eef2f7;
  --s-queue-line: #d3dce7;
  --s-info-fg: #1d4f99;
  --s-info-bg: #eaf2ff;
  --s-info-line: #bcd2f2;
  --s-manual-fg: #6b3fa0;
  --s-manual-bg: #f4eefc;
  --s-manual-line: #d9c7f0;

  /* 双模型专用（核查页） */
  --m-primary: #d66413;
  --m-second: #7a3fc4;
  --diff-del-bg: #ffe0d6;
  --diff-ins-bg: #e7dcfa;

  /* 字体 */
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Noto Sans Mono CJK SC", "PingFang SC", monospace;

  /* 字号阶梯（px）。手机端正文与控件不得小于 14 */
  --fs-12: 12px;
  --fs-14: 14px;
  --fs-15: 15px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-20: 20px;
  --fs-24: 24px;
  --fs-30: 30px;
  --lh-tight: 1.3;
  --lh-body: 1.6;

  /* 间距：4 的倍数 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;

  /* 圆角 */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;

  /* 阴影 */
  --sh-1: 0 1px 2px #1a335214;
  --sh-2: 0 4px 14px #1a33521a;
  --sh-3: 0 12px 32px #1a33522e;

  /* 尺寸 */
  --rail: 232px;
  --tap: 44px;
  --tap-min: 40px;
  --topbar: 56px;

  /* 旧变量别名（保留，指向新令牌） */
  --blue: var(--c-primary);
  --blue-dark: #103975;
  --ink: var(--c-ink);
  --muted: var(--c-muted);
  --line: var(--c-line);
  --soft: var(--c-surface-2);
  --tint: var(--c-primary-soft);
  --canvas: var(--c-bg);
  --radius: var(--r-lg);

  font-family: var(--font-sans);
  font-size: var(--fs-15);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

/* ---------- 2 基础元素 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

body { margin: 0; background: var(--c-bg); }
a { color: var(--c-primary); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, summary, select { cursor: pointer; }
button { color: inherit; }
h1, h2, h3, p, dl, dd { margin: 0; }

h1 {
  font-size: var(--fs-24);
  font-weight: 650;
  line-height: var(--lh-tight);
}

h2 {
  font-size: var(--fs-18);
  font-weight: 650;
  line-height: 1.4;
}

h3 {
  font-size: var(--fs-16);
  font-weight: 650;
}

small, .field-hint {
  color: var(--c-muted);
  font-size: var(--fs-14);
}

:focus-visible {
  outline: 3px solid #367ce1;
  outline-offset: 2px;
}

[hidden] { display: none !important; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }

.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: middle;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.num { font-variant-numeric: tabular-nums; }

.skip {
  position: fixed;
  left: 8px;
  top: -100px;
  z-index: 80;
  background: #fff;
  padding: 10px 16px;
  border-radius: var(--r-sm);
}
.skip:focus { top: 8px; }

/* 仅屏幕阅读器可见 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 3 通用组件 ---------- */

/* 3.1 按钮：primary 主 / quiet 次 / danger 危险（仅二次确认框）/ icon-button 图标 */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: var(--tap-min);
  padding: 8px 18px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: var(--fs-15);
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}

.button .icon {
  width: 18px;
  height: 18px;
}

.button.primary {
  color: #fff;
  background: var(--c-primary);
  box-shadow: var(--sh-1);
}
.button.primary:hover { background: var(--c-primary-hover); }
.button.primary:active { background: var(--c-primary-press); }

.button.quiet {
  color: var(--c-primary-hover);
  background: var(--c-surface);
  border-color: var(--c-line-strong);
}
.button.quiet:hover {
  background: var(--c-primary-soft);
  border-color: var(--c-primary-line);
}

.button.ghost {
  color: var(--c-primary-hover);
  background: transparent;
}
.button.ghost:hover { background: var(--c-primary-soft); }

.button.danger {
  color: #fff;
  background: var(--s-fail-fg);
}
.button.danger:hover { background: #8a2e21; }

/* 桌面表格行内的小按钮：36px，手机自动变 40px */
.button.small {
  min-height: 36px;
  padding: 6px 12px;
  font-size: var(--fs-14);
  border-radius: var(--r-sm);
}

.button.block { width: 100%; }

button:disabled,
.button[aria-disabled=true] {
  opacity: .5;
  cursor: not-allowed;
}

/* 提交中：文字已由脚本改成"正在提交…"，这里只防止重复点击 */
[aria-busy=true] {
  opacity: .75;
  pointer-events: none;
}

/* 文字链接类操作 */
.text-link,
.inline-action,
.back {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--c-primary);
}

.text-link:hover,
.inline-action:hover,
.back:hover,
.person-name:hover,
.plain-button:hover { text-decoration: underline; }

.text-link .icon,
.inline-action .icon { width: 16px; height: 16px; }

.back {
  color: var(--c-muted);
  margin: 0 0 var(--sp-3);
  min-height: 32px;
}
.back .icon { width: 16px; height: 16px; }

.icon-button,
.plain-button {
  border: 0;
  background: none;
}

.icon-button {
  width: var(--tap);
  height: var(--tap);
  display: inline-grid;
  place-items: center;
  border-radius: var(--r-md);
  color: var(--c-ink-2);
}
.icon-button:hover { background: var(--c-surface-2); }

.plain-button {
  color: var(--c-primary);
  padding: 6px 2px;
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
}

/* 3.2 标签：圆点前缀 + 文字，不能只靠颜色区分 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: var(--fs-14);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.tag.warm,
.tag.pending { color: var(--s-pending-fg); background: var(--s-pending-bg); border-color: var(--s-pending-line); }
.tag.done { color: var(--s-done-fg); background: var(--s-done-bg); border-color: var(--s-done-line); }
.tag.info { color: var(--s-info-fg); background: var(--s-info-bg); border-color: var(--s-info-line); }
.tag.neutral { color: var(--s-queue-fg); background: var(--s-queue-bg); border-color: var(--s-queue-line); }
.tag.fail { color: var(--s-fail-fg); background: var(--s-fail-bg); border-color: var(--s-fail-line); }
.tag.manual { color: var(--s-manual-fg); background: var(--s-manual-bg); border-color: var(--s-manual-line); }

/* 计数小块 */
.count {
  display: inline-block;
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--c-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* 3.3 卡片 */
.card {
  min-width: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}

.card-body { padding: var(--sp-5); }

.card-head,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.card-head {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--c-line);
}

.card-head h2,
.section-heading h2 {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-16);
}

.card-head h2 .icon { color: var(--c-primary); }

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--c-line);
  background: var(--c-surface-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* 3.4 提示条 */
.notice,
.form-error {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  padding: 10px 14px;
  border: 1px solid var(--s-done-line);
  border-radius: var(--r-md);
  background: var(--s-done-bg);
  color: var(--s-done-fg);
  font-size: var(--fs-14);
}

.notice.danger,
.form-error {
  background: var(--s-fail-bg);
  border-color: var(--s-fail-line);
  color: var(--s-fail-fg);
}
.notice.info { background: var(--s-info-bg); border-color: var(--s-info-line); color: var(--s-info-fg); }
.notice.warn { background: var(--s-pending-bg); border-color: var(--s-pending-line); color: var(--s-pending-fg); }
.form-error { margin: var(--sp-3) 0 0; }

/* 3.5 表单 */
.field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  color: var(--c-ink);
  font-size: var(--fs-14);
  font-weight: 600;
}

.field-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}

.field-hint {
  font-weight: 400;
  line-height: 1.5;
}

.field-error {
  color: var(--s-fail-fg);
  font-size: var(--fs-14);
  font-weight: 400;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

.req { color: var(--s-fail-fg); }

/* 文本框、下拉框统一外观（不含复选框和单选框，避免撑大核查页的复选框） */
input:not([type=hidden]):not([type=file]):not([type=checkbox]):not([type=radio]),
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: var(--tap-min);
  padding: 8px 12px;
  background: var(--c-surface);
  color: var(--c-ink);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-md);
  font-size: var(--fs-15);
  font-weight: 400;
  line-height: 1.4;
  transition: border-color .15s, box-shadow .15s;
}

input::placeholder,
textarea::placeholder { color: var(--c-faint); }

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-soft);
}

input[aria-invalid=true],
input:user-invalid,
select:user-invalid { border-color: var(--s-fail-fg); }

input[type=checkbox],
input[type=radio] {
  width: 18px;
  height: 18px;
  accent-color: var(--c-primary);
}

textarea {
  resize: vertical;
  min-height: 112px;
}

select.inline-select {
  width: auto;
  max-width: 130px;
  min-height: 32px;
  padding: 0 2px;
  border: 0;
  border-radius: var(--r-sm);
  box-shadow: none;
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--c-primary);
  background: transparent;
}

.stack {
  display: grid;
  gap: var(--sp-4);
}

/* 选填字段折叠 */
.more-fields { margin-top: var(--sp-3); }

.more-fields summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap-min);
  color: var(--c-ink-2);
  font-size: var(--fs-14);
  font-weight: 600;
}

.more-fields summary .icon {
  width: 16px;
  height: 16px;
  transition: transform .15s;
}
.more-fields[open] summary .icon { transform: rotate(180deg); }
.more-fields summary span { color: var(--c-faint); font-weight: 400; }
.more-fields .field-grid { margin-top: var(--sp-2); }

/* 3.6 标签页 / 分段切换 */
.tabs,
.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
}

.tabs a,
.segmented a,
.segmented button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border: 0;
  border-radius: var(--r-sm);
  color: var(--c-ink-2);
  background: transparent;
  font-size: var(--fs-14);
  font-weight: 600;
  white-space: nowrap;
}

.tabs a:hover,
.segmented a:hover { color: var(--c-primary); }

.tabs a.selected,
.segmented .active {
  color: var(--c-primary);
  background: var(--c-surface);
  box-shadow: var(--sh-1);
}

.tabs b {
  min-width: 22px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  font-size: var(--fs-12);
  line-height: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--s-queue-fg);
  background: var(--s-queue-bg);
}

.tabs a.selected b {
  color: var(--s-pending-fg);
  background: var(--s-pending-bg);
}

/* 3.7 搜索框 */
.search-form,
.filter-form {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-md);
}

.search-box:focus-within {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-soft);
}

.search-box .icon {
  width: 18px;
  height: 18px;
  color: var(--c-faint);
}

.search-box input[type=search] {
  width: clamp(200px, 24vw, 320px);
  padding-left: 0;
  border: 0 !important;
  box-shadow: none !important;
}

/* 3.8 列表通用 */
.list-card {
  padding: 0;
  overflow: hidden;
}

.list-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--c-line);
}

.list-tools h2 { font-size: var(--fs-16); }

.list-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px var(--sp-5);
  color: var(--c-muted);
  background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-line);
  font-size: var(--fs-12);
  font-weight: 600;
}

.data-row,
.patient-row,
.manage-row {
  position: relative;
  min-height: 56px;
  padding: 12px var(--sp-5);
  border-bottom: 1px solid var(--c-line);
}

.data-row:last-child,
.patient-row:last-child,
.manage-row:last-child { border-bottom: 0; }

.data-row:hover,
.patient-row:hover,
.manage-row:hover { background: var(--c-surface-2); }

.row-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.person-name {
  color: var(--c-ink);
  font-size: var(--fs-16);
  font-weight: 650;
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin-top: 2px;
  color: var(--c-muted);
  font-size: var(--fs-14);
}

.mini-avatar {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--c-primary-soft);
  color: var(--c-primary);
}
.mini-avatar .icon { width: 20px; height: 20px; }

/* 进度条：已完成色 done，未完成底 line */
progress {
  appearance: none;
  -webkit-appearance: none;
  height: 6px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--c-line);
  color: var(--s-done-fg);
  overflow: hidden;
}
progress::-webkit-progress-bar { background: var(--c-line); border-radius: var(--r-pill); }
progress::-webkit-progress-value { background: var(--s-done-fg); border-radius: var(--r-pill); }
progress::-moz-progress-bar { background: var(--s-done-fg); border-radius: var(--r-pill); }

/* 报告列表（待核查清单、患者详情共用）。桌面为 7 列网格 */
.report-grid {
  display: grid;
  align-items: center;
  gap: var(--sp-4);
  grid-template-columns: minmax(170px, 1.7fr) 112px 52px 92px minmax(120px, 1fr) 124px 92px;
}

.row-time,
.row-pages,
.row-progress,
.row-diff {
  font-size: var(--fs-14);
  font-variant-numeric: tabular-nums;
}

.row-time { color: var(--c-muted); }
.row-pages { font-weight: 600; }
.row-progress { color: var(--c-muted); }

.row-progress progress {
  display: block;
  width: 100%;
  max-width: 130px;
  margin-top: 4px;
}

.row-diff .has-diff {
  color: var(--s-pending-fg);
  font-weight: 700;
}
.row-diff .no-diff { color: var(--c-faint); }

.row-status {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.report-grid .row-action { justify-self: end; }

/* 手机专用的一行摘要，桌面隐藏 */
.row-summary { display: none; }

/* 首页用的紧凑行：第一行姓名 + 标签，第二行说明 */
.mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  min-height: 64px;
  padding: 10px var(--sp-5);
  border-bottom: 1px solid var(--c-line);
}
.mini-row:last-child { border-bottom: 0; }
.mini-row:hover { background: var(--c-surface-2); }
.mini-main { min-width: 0; }

.mini-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px var(--sp-2);
}

.mini-sub {
  margin-top: 2px;
  color: var(--c-muted);
  font-size: var(--fs-14);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.mini-side {
  display: flex;
  align-items: center;
  flex: none;
  gap: var(--sp-3);
}

.card-more {
  display: flex;
  justify-content: center;
  padding: var(--sp-2);
  border-top: 1px solid var(--c-line);
}

/* 分页：上一页 · 第 x / y 页 · 下一页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-5);
  border-top: 1px solid var(--c-line);
  color: var(--c-muted);
  font-size: var(--fs-14);
  font-variant-numeric: tabular-nums;
}
.pagination form { margin: 0; }
.pagination > span:empty { display: none; }

/* 3.6 空状态：64px 圆形底 + 40px 图标 */
.empty {
  display: grid;
  justify-items: center;
  gap: var(--sp-2);
  padding: 48px var(--sp-4);
  text-align: center;
}

.empty strong {
  font-size: var(--fs-16);
  font-weight: 600;
}

.empty p {
  color: var(--c-muted);
  font-size: var(--fs-14);
}

.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--sp-1);
  border-radius: 50%;
  background: var(--c-primary-soft);
  color: var(--c-primary);
}
.empty-icon .icon { width: 36px; height: 36px; }
.empty .button { margin-top: var(--sp-2); }

.compact-empty {
  padding: var(--sp-4) 0;
  color: var(--c-muted);
  font-size: var(--fs-14);
}

.heading-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  background: var(--c-primary-soft);
  color: var(--c-primary);
}
.heading-icon .icon { width: 18px; height: 18px; }

/* 键值对 */
.facts {
  margin: 0 0 var(--sp-5);
  padding: 4px var(--sp-4);
  background: var(--c-surface-2);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
}

.facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 10px 0;
}
.facts div + div { border-top: 1px dashed var(--c-line); }

.facts dt {
  color: var(--c-muted);
  font-size: var(--fs-14);
  white-space: nowrap;
}

.facts dd {
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

/* 展开操作面板（更名、重置密码等） */
.action-panel { position: relative; }

.action-panel > summary {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  color: var(--c-primary);
  font-size: var(--fs-14);
  font-weight: 600;
}

.action-panel > summary:hover,
.action-panel[open] > summary { background: var(--c-primary-soft); }

.action-panel form {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 8;
  width: min(300px, 80vw);
  padding: var(--sp-4);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-3);
}

/* 3.10 二次确认框（由 ui.js 生成，原生 dialog） */
.confirm-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: var(--sp-6);
  border: 0;
  border-radius: var(--r-lg);
  background: var(--c-surface);
  color: var(--c-ink);
  box-shadow: var(--sh-3);
}
.confirm-dialog::backdrop { background: #000a; }
.confirm-dialog h2 { font-size: var(--fs-18); }

.confirm-dialog p {
  margin-top: var(--sp-2);
  color: var(--c-ink-2);
  font-size: var(--fs-15);
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

/* ---------- 4 外框布局 ---------- */

/* 4.1 侧栏 */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  padding: var(--sp-5) var(--sp-3) var(--sp-4);
  overflow-y: auto;
  background: var(--c-surface);
  border-right: 1px solid var(--c-line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--c-ink);
  white-space: nowrap;
  line-height: 1.25;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  color: #fff;
  background: var(--c-primary);
}
.brand-mark .icon { width: 22px; height: 22px; }

.brand-text { display: grid; }
.brand strong { font-size: var(--fs-18); font-weight: 650; }

.brand-sub {
  color: var(--c-muted);
  font-size: var(--fs-12);
  font-weight: 500;
}

.side-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-2);
}

/* 单位切换（平台管理员） */
.unit-switch,
.fixed-unit {
  margin: var(--sp-5) 0 var(--sp-4);
  background: var(--c-surface-2);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
}

.unit-switch summary,
.fixed-unit {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--tap);
  padding: 8px 12px;
  color: var(--c-ink);
  font-size: var(--fs-14);
  font-weight: 600;
}

.unit-switch summary span,
.fixed-unit span { overflow-wrap: anywhere; }

.unit-switch summary .icon:first-child,
.fixed-unit .icon {
  width: 18px;
  height: 18px;
  color: var(--c-primary);
}

.unit-switch summary .icon:last-child {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--c-faint);
}
.unit-switch[open] summary .icon:last-child { transform: rotate(180deg); }

.unit-switch form {
  display: grid;
  gap: 2px;
  max-height: 240px;
  padding: 0 6px 6px;
  overflow: auto;
}

.unit-switch button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-height: var(--tap-min);
  padding: 8px 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--c-surface);
  color: var(--c-ink);
  font-size: var(--fs-14);
  text-align: left;
  overflow-wrap: anywhere;
}

.unit-switch button:hover,
.unit-switch button[aria-current=true] {
  background: var(--c-primary-soft);
  color: var(--c-primary);
}
.unit-switch button .icon { width: 16px; height: 16px; }

/* 导航 */
.menu {
  display: grid;
  gap: 2px;
}
.side-top + .menu { margin-top: var(--sp-6); }

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  padding: 8px 12px;
  border-radius: var(--r-md);
  color: var(--c-ink-2);
  font-weight: 550;
}

.nav-link .icon { color: var(--c-muted); }
.nav-link:hover { background: var(--c-surface-2); color: var(--c-ink); }

/* 当前项：浅蓝底 + 主色字 + 左侧 3px 竖条 */
.nav-link.active {
  background: var(--c-primary-soft);
  color: var(--c-primary);
  font-weight: 650;
}
.nav-link.active .icon { color: var(--c-primary); }

.nav-link.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--c-primary);
}

.nav-count {
  margin-left: auto;
  min-width: 22px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: var(--s-pending-bg);
  color: var(--s-pending-fg);
  font-size: var(--fs-12);
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.menu-divider {
  height: 1px;
  margin: var(--sp-3) var(--sp-2);
  background: var(--c-line);
}

/* 底部账号区：头像 + 账号名 + 退出图标按钮 */
.account-panel {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: auto;
  padding: var(--sp-3) var(--sp-2) 0;
  border-top: 1px solid var(--c-line);
}

.account-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.account-id .avatar {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--c-primary-soft);
  color: var(--c-primary);
}
.account-id .avatar .icon { width: 19px; height: 19px; }
.account-id div { min-width: 0; }

.account-id strong,
.account-id div span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-id div span {
  color: var(--c-muted);
  font-size: var(--fs-12);
}

.account-panel form { margin: 0; }
.account-panel .icon-button:hover { color: var(--s-fail-fg); }

/* 手机顶栏：桌面隐藏 */
.mobile-bar,
.menu-close { display: none; }

.bar-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.bar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap-min);
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: var(--s-pending-bg);
  color: var(--s-pending-fg);
  font-size: var(--fs-14);
  font-weight: 650;
}

/* 4.2 主内容区 */
.work-main {
  min-height: 100vh;
  margin-left: var(--rail);
  padding: var(--sp-8) var(--sp-10) 56px;
}

.main-inner {
  max-width: 1280px;
  margin-inline: auto;
  min-width: 0;
}

.page-heading { margin-bottom: var(--sp-6); }

.page-heading p {
  margin-top: 4px;
  color: var(--c-muted);
}

.heading-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.heading-actions h1 { overflow-wrap: anywhere; }

.eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--c-primary);
  font-size: var(--fs-14);
  font-weight: 600;
}

/* 当前单位（管理员）：点击打开单位切换 */
.unit-context {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap-min);
  padding: 6px 12px;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-ink-2);
  font-size: var(--fs-14);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.unit-context .icon { width: 16px; height: 16px; }
button.unit-context:hover { background: var(--c-surface-2); }

/* ---------- 5 各页面 ---------- */

/* 5.1 统计卡 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: var(--sp-5);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  color: var(--c-ink);
}

a.stat-card:hover {
  border-color: var(--c-primary-line);
  box-shadow: var(--sh-2);
}

.stat-icon {
  position: absolute;
  right: var(--sp-4);
  top: var(--sp-4);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--c-primary-soft);
  color: var(--c-primary);
}
.stat-icon .icon { width: 19px; height: 19px; }

.stat-label {
  color: var(--c-ink-2);
  font-size: var(--fs-14);
  font-weight: 600;
}

.stat-value {
  font-size: var(--fs-30);
  font-weight: 650;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.stat-value small {
  margin-left: 4px;
  color: var(--c-muted);
  font-size: var(--fs-14);
  font-weight: 400;
}

.stat-card.is-alert { border-color: var(--s-pending-line); }
.stat-card.is-alert .stat-icon { background: var(--s-pending-bg); color: var(--s-pending-fg); }
.stat-card.is-alert .stat-value { color: var(--s-pending-fg); }

/* 5.2 首页（核查角色）：左侧待核查和最近上报，右侧快速上报 */
.desk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  grid-template-areas:
    "queue upload"
    "recent upload";
  grid-template-rows: auto 1fr;
  gap: var(--sp-6);
  align-items: start;
  align-content: start;
}

.desk-grid > .upload-card {
  grid-area: upload;
  position: sticky;
  top: var(--sp-6);
}
.desk-grid > .queue-card { grid-area: queue; }
.desk-grid > .recent-card { grid-area: recent; }

/* 5.3 上报表单（核查角色在右栏，上报员单独一栏） */
.upload-card { min-width: 0; }

.upload-section {
  padding: var(--sp-5);
  border-bottom: 1px solid var(--c-line);
}
.upload-section:last-of-type { border-bottom: 0; }
.upload-section .section-heading { margin-bottom: var(--sp-3); }
.upload-section h2 { font-size: var(--fs-16); }

.destination {
  padding: var(--sp-4) var(--sp-5);
  background: var(--c-primary-soft);
  border-bottom: 1px solid var(--c-line);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.destination .field { max-width: 420px; }

.destination > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 拍照、相册两个选择入口：文件框透明地铺满 label */
.pickers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.picker {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  min-height: 64px;
  min-width: 0;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-primary-hover);
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}

.picker:hover { background: var(--c-primary-soft); border-color: var(--c-primary-line); }
.picker:focus-within { outline: 3px solid #367ce1; outline-offset: 2px; }

.picker input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.pick-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
}
.pick-icon .icon { width: 24px; height: 24px; }

.picker b { display: block; font-size: var(--fs-16); }
.picker small { display: block; color: inherit; opacity: .85; font-weight: 400; }

/* 拍照按钮是主按钮样式 */
.picker.camera {
  border-color: var(--c-primary);
  background: var(--c-primary);
  color: #fff;
  box-shadow: var(--sh-1);
}
.picker.camera:hover { background: var(--c-primary-hover); }

.limits {
  margin-top: var(--sp-3);
  color: var(--c-muted);
  font-size: var(--fs-14);
}

/* 已选患者（补传） */
.selected-patient {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 12px var(--sp-4);
  border: 1px solid var(--c-primary-line);
  border-radius: var(--r-md);
  background: var(--c-primary-soft);
}

.selected-patient strong { font-size: var(--fs-18); overflow-wrap: anywhere; }
.selected-patient small { display: block; }

.selected-patient a {
  white-space: nowrap;
  font-size: var(--fs-14);
  font-weight: 600;
}

/* 待提交照片队列 */
.queue {
  margin: 0;
  padding: 0;
  list-style: none;
}
.queue:not(:empty) { margin-top: var(--sp-3); }

.queue li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 8px 0;
  border-top: 1px solid var(--c-line);
}

.queue li img,
.queue .thumb {
  width: 44px;
  height: 56px;
  object-fit: cover;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
}

.queue .thumb {
  display: grid;
  place-items: center;
  background: var(--c-surface-2);
  font-size: var(--fs-12);
}

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

.file-info small {
  display: block;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.queue .quiet {
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  padding: 6px 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--c-primary);
  font-size: var(--fs-14);
  font-weight: 600;
}
.queue .quiet:hover { background: var(--c-primary-soft); }

/* 提交栏：核查角色在卡片底部，上报员手机上固定在屏幕底部 */
.submit-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--c-line);
  background: var(--c-surface-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* 5.4 上报员首页 */
.reporter-desk {
  display: grid;
  gap: var(--sp-4);
  max-width: 760px;
  margin-inline: auto;
}
.reporter-desk .page-heading { margin-bottom: 0; }

.reporter-desk .pickers { grid-template-columns: 1fr; }

.reporter-desk .picker.camera {
  min-height: 88px;
  font-size: var(--fs-18);
}
.reporter-desk .picker.camera b { font-size: var(--fs-20); }
.reporter-desk .picker.camera .pick-icon .icon { width: 32px; height: 32px; }
.reporter-desk .picker:not(.camera) { min-height: 56px; }

.reporter-desk .submit-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding-bottom: calc(var(--sp-4) + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 12px #1a33520f;
}

.receipt-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  min-height: 64px;
  padding: 10px var(--sp-5);
  border-bottom: 1px solid var(--c-line);
}
.receipt-item:last-child { border-bottom: 0; }
.receipt-item > div:first-child { min-width: 0; }
.receipt-item b { overflow-wrap: anywhere; }
.receipt-item small { display: block; font-variant-numeric: tabular-nums; }

.receipt-lookup {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-3);
}
.receipt-lookup .field { flex: 1 1 220px; }

/* 5.5 回执 */
.receipt-card {
  max-width: 640px;
  margin: var(--sp-4) auto;
  padding: clamp(24px, 4vw, 40px);
  text-align: center;
}

.receipt-check {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto var(--sp-4);
  border-radius: 50%;
  background: var(--s-done-bg);
  color: var(--s-done-fg);
}
.receipt-check .icon { width: 34px; height: 34px; }

.receipt-card > p {
  margin: var(--sp-2) 0 var(--sp-5);
  color: var(--c-muted);
}

.receipt-no {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--c-primary-line);
  border-radius: var(--r-md);
  background: var(--c-primary-soft);
  text-align: left;
  flex-wrap: wrap;
}
.receipt-no small { display: block; }
.receipt-no .mono { font-size: var(--fs-20); font-weight: 650; white-space: nowrap; }

.receipt-card .facts { text-align: left; }

.receipt-card .actions {
  justify-content: center;
  margin-bottom: var(--sp-4);
}
.receipt-card .actions .button { flex: 1 1 200px; }

/* 5.6 患者列表、患者详情 */
.patient-row,
.manage-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.patient-row .row-title,
.manage-row .row-title { flex: 1; }

.manage-row .row-title small { display: block; }

.patient-stats {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--c-muted);
  font-size: var(--fs-14);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pick-hint { margin-bottom: var(--sp-4); }

.patient-facts {
  margin-bottom: var(--sp-4);
  padding: var(--sp-5);
}

.patient-facts dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
}

.patient-facts dt {
  color: var(--c-muted);
  font-size: var(--fs-14);
}

.patient-facts dd {
  margin-top: 2px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.card-stack {
  display: grid;
  gap: var(--sp-4);
}

.field-line-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 10px var(--sp-5);
  border-bottom: 1px solid var(--c-line);
}
.field-line-item:last-child { border-bottom: 0; }
.field-line-item b { font-variant-numeric: tabular-nums; }
.field-line-item small { white-space: nowrap; }

/* 5.7 管理页（单位、账号） */
.admin-add { margin-bottom: var(--sp-5); }

.admin-add > .card-body,
.admin-add > form { padding: var(--sp-5); }

.admin-add h2 { margin-bottom: var(--sp-3); }

.inline-form,
.account-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--sp-3);
}

.inline-form .field { flex: 1 1 320px; max-width: 520px; }
.account-form .field { flex: 1 1 170px; }

.manage-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-2);
}
.manage-actions form { margin: 0; }

.assigned-unit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: center;
  min-height: var(--tap);
  color: var(--c-ink-2);
  font-weight: 600;
}

/* 账号行的操作区：桌面直接展开，手机折叠为"更多" */
.more-menu > summary { display: none; }
.more-menu .more-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-2);
}

/* 5.8 单列表单（编辑患者、修改密码、提示信息） */
.single-form {
  max-width: 640px;
  margin-bottom: var(--sp-5);
}

.single-form > .card-body { padding: var(--sp-6); }
.single-form h1 { margin-bottom: var(--sp-2); font-size: var(--fs-20); }
.single-form .actions { margin-top: var(--sp-5); }
.password-card { max-width: 480px; }

.settings-card {
  max-width: 720px;
  margin-bottom: var(--sp-5);
  padding: var(--sp-5);
}
.settings-card h2 { margin-bottom: var(--sp-3); }
.settings-card h3 { margin-top: var(--sp-2); font-size: var(--fs-15); }
.settings-card p { margin: 4px 0 var(--sp-4); color: var(--c-muted); }

.model-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px var(--sp-3);
  margin: 0 0 var(--sp-2);
  color: var(--c-ink);
}

/* 5.9 字段摘录 */
.ext-grid {
  display: grid;
  align-items: center;
  gap: var(--sp-4);
  grid-template-columns: minmax(120px, 1.2fr) minmax(90px, 1fr) 80px minmax(100px, 1fr) minmax(110px, 1.2fr) 110px;
}

.ext-value {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.ext-sub { display: none; }

.ext-source {
  display: block;
  margin-top: 2px;
  color: var(--c-muted);
  font-size: var(--fs-14);
  font-weight: 400;
  overflow-wrap: anywhere;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--sp-3);
}
.filter-bar .field { min-width: 240px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap-min);
  padding: 4px 6px 4px 12px;
  border: 1px solid var(--c-primary-line);
  border-radius: var(--r-pill);
  background: var(--c-primary-soft);
  color: var(--c-primary-hover);
  font-size: var(--fs-14);
  font-weight: 600;
}

.chip a {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: inherit;
}
.chip a:hover { background: var(--c-primary-line); }
.chip .icon { width: 16px; height: 16px; }

.summary-line {
  padding: 10px var(--sp-5);
  border-bottom: 1px solid var(--c-line);
  background: var(--c-surface-2);
  color: var(--c-ink-2);
  font-size: var(--fs-14);
}

/* 5.10 登录页 */
.public-main {
  display: grid;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--sp-8);
}

.public-main > .main-inner { width: min(1040px, 100%); }

.login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  box-shadow: var(--sh-3);
}

/* 左侧：浅蓝底 + 品牌 + 说明 + 报告插画 */
.login-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 500px;
  padding: 40px;
  overflow: hidden;
  background: var(--c-primary-soft);
}

.login-copy {
  position: relative;
  z-index: 2;
  margin-top: 56px;
}

.login-copy h1 { font-size: 30px; }

.login-copy p {
  max-width: 24em;
  margin-top: var(--sp-3);
  color: var(--c-ink-2);
}

.report-art {
  position: absolute;
  right: 40px;
  bottom: -36px;
  width: 210px;
  height: 200px;
  transform: rotate(-8deg);
}

.art-paper {
  position: absolute;
  inset: 0;
  border-radius: 10px 10px 0 0;
  background: #fff;
  border: 1px solid var(--c-primary-line);
}
.back-paper { transform: translate(-24px, 9px) rotate(-11deg); background: var(--c-primary-line); }
.front-paper { padding: 22px; box-shadow: -6px -4px 20px #1a335222; }
.paper-icon { color: var(--c-primary); }

.art-title,
.art-rule,
.art-table {
  display: block;
  height: 5px;
  margin-top: 10px;
  border-radius: 3px;
  background: var(--c-primary-line);
}
.art-title { width: 55%; height: 8px; margin-bottom: 16px; background: var(--c-primary); opacity: .65; }
.art-rule.short { width: 75%; }

.art-table {
  height: 54px;
  border: 1px solid var(--c-primary-line);
  background:
    repeating-linear-gradient(to bottom, transparent 0 12px, var(--c-primary-line) 12px 13px),
    repeating-linear-gradient(to right, transparent 0 43px, var(--c-primary-line) 43px 44px);
}

.login-panel {
  display: grid;
  align-items: center;
  padding: clamp(28px, 4vw, 52px);
}

.login-panel h2 { font-size: var(--fs-24); }

.login-panel > div > p {
  margin: 4px 0 var(--sp-6);
  color: var(--c-muted);
}

.pw-field { position: relative; }
.pw-field input { padding-right: 68px !important; }

.pw-field button {
  position: absolute;
  top: 4px;
  right: 4px;
  bottom: 4px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--c-surface-2);
  color: var(--c-primary);
  font-size: var(--fs-14);
  font-weight: 600;
}

/* 验证码：输入框 + 图片 + 换一张，同一行 */
.captcha-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.captcha-row input { flex: 1; min-width: 0; }

#captcha-image {
  display: block;
  flex: none;
  width: 132px;
  height: 45px;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-sm);
}

.captcha-change {
  flex: none;
  min-height: var(--tap-min);
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--c-primary);
  font-size: var(--fs-14);
  font-weight: 600;
  white-space: nowrap;
}
.captcha-change:hover { text-decoration: underline; }

#captcha-status:empty { display: none; }
#captcha-status {
  color: var(--c-muted);
  font-size: var(--fs-14);
  font-weight: 400;
}

.login-submit {
  width: 100%;
  min-height: 48px;
  margin-top: var(--sp-1);
  font-size: var(--fs-16);
}

.login-foot {
  margin-top: var(--sp-5);
  color: var(--c-muted);
  font-size: var(--fs-14);
  text-align: center;
}

.no-unit {
  padding: var(--sp-8) var(--sp-5);
  text-align: center;
}
.no-unit .empty { padding: 0 0 var(--sp-4); }

/* ---------- 6 核查页兼容（review.html 使用的 ui.css 类，勿删改名） ---------- */
.pages-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 var(--sp-4);
}

.page-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  color: var(--c-ink-2);
  font-size: var(--fs-14);
  font-weight: 600;
}
.page-tab:hover { border-color: var(--c-primary); color: var(--c-primary); }
.page-tab.selected { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.page-tab .icon { width: 14px; height: 14px; color: var(--s-done-fg); }
.page-tab.selected .icon { color: #fff; }

.review-layout {
  display: grid;
  grid-template-columns: 1.04fr 1fr;
  gap: var(--sp-4);
  align-items: start;
}

.review-card { padding: var(--sp-4); }
.review-card .section-heading { margin-bottom: var(--sp-3); }

.review-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.image-window {
  height: clamp(300px, 66vh, 780px);
  overflow: auto;
  background: #e6edf2;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  overscroll-behavior: contain;
}

.figure {
  position: relative;
  width: 100%;
  margin: auto;
}
.figure img { display: block; width: 100%; height: auto; }

#box {
  position: absolute;
  border: 2px solid var(--m-primary);
  background: #ffa53624;
  pointer-events: none;
}

.fit-page { margin-top: var(--sp-2); }

.ocr-lines {
  margin-bottom: var(--sp-4);
  padding: 10px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
}
.ocr-lines summary { color: var(--c-primary); font-size: var(--fs-14); font-weight: 600; }
.ocr-lines summary::before { content: "▸ "; }
.ocr-lines[open] summary::before { content: "▾ "; }
.ocr-lines p { margin: 6px 0; color: var(--c-muted); font-size: var(--fs-14); }

.lines { display: grid; max-height: 235px; overflow: auto; gap: 1px; }

.line {
  display: block;
  width: 100%;
  padding: 5px 6px;
  border: none;
  border-radius: 4px;
  background: transparent;
  font-size: var(--fs-14);
  text-align: left;
  overflow-wrap: anywhere;
}
.line:hover,
.line[aria-current] { background: var(--c-primary-soft); color: var(--c-primary); }

.review-form .actions { margin-top: var(--sp-4); }

/* ---------- 7 响应式 ---------- */

/* 平板 + 手机（< 1100）：统计卡 2×2，首页单列，侧栏收窄 */
@media (max-width: 1099px) {
  .work-main { padding: var(--sp-6) var(--sp-5) var(--sp-10); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* 首页单列：统计卡 → 上报卡 → 待核查 → 最近上报 */
  .desk-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "upload"
      "queue"
      "recent";
  }
  .desk-grid > .upload-card { position: static; }

  .patient-facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 平板（768–1099）：72px 图标侧栏，悬停/聚焦显示文字提示 */
@media (min-width: 768px) and (max-width: 1099px) {
  :root { --rail: 72px; }

  .sidebar {
    padding: var(--sp-4) var(--sp-2);
    overflow: visible;
  }

  .side-top { justify-content: center; padding: 0; }
  .brand-text { display: none; }

  .menu-label,
  .nav-text,
  .account-id div { display: none; }

  .nav-link {
    justify-content: center;
    padding: 8px;
  }
  .nav-link.active::before { left: -8px; }

  /* 待核查数量改为图标右上角的小徽标 */
  .nav-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    padding: 0 4px;
    font-size: 11px;
    line-height: 18px;
  }

  /* 文字提示：悬停或键盘聚焦时显示 */
  .nav-link[data-tip]:hover::after,
  .nav-link[data-tip]:focus-visible::after {
    content: attr(data-tip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    z-index: 40;
    transform: translateY(-50%);
    padding: 6px 10px;
    border-radius: var(--r-sm);
    background: var(--c-ink);
    color: #fff;
    font-size: var(--fs-14);
    white-space: nowrap;
    pointer-events: none;
  }

  .unit-switch,
  .fixed-unit { margin: var(--sp-3) 0; }

  .unit-switch summary,
  .fixed-unit { justify-content: center; padding: 8px; }

  .unit-switch summary span,
  .unit-switch summary .icon:last-child,
  .fixed-unit span { display: none; }

  /* 单位列表向右侧弹出 */
  .unit-switch { position: relative; }

  .unit-switch form {
    position: absolute;
    left: calc(100% + 8px);
    top: 0;
    z-index: 40;
    width: 240px;
    padding: 6px;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    box-shadow: var(--sh-3);
  }

  .account-panel {
    flex-direction: column;
    padding: var(--sp-3) 0 0;
  }
  .account-id { flex: none; }

  /* 报告列表：平板宽度不够，隐藏"页数"列（页数仍显示在核查进度里） */
  .report-grid {
    grid-template-columns: minmax(130px, 1.5fr) 92px 84px minmax(90px, 1fr) 112px 88px;
    gap: var(--sp-3);
  }
  .report-grid > :nth-child(3) { display: none; }
}

/* 手机（≤767）：顶栏 + 抽屉菜单，单列 */
@media (max-width: 767px) {
  :root { --rail: 0px; }

  body { font-size: var(--fs-16); }
  h1 { font-size: 22px; }

  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--topbar);
    padding: 6px 8px 6px 16px;
    border-bottom: 1px solid var(--c-line);
    background: var(--c-surface);
  }

  .mobile-bar .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .mobile-bar .brand-mark .icon { width: 19px; height: 19px; }
  .mobile-bar .brand-sub { display: none; }

  /* 抽屉：从左侧滑出 */
  .sidebar {
    width: min(84vw, 320px);
    padding: var(--sp-4) var(--sp-3);
    visibility: hidden;
    transform: translateX(-101%);
    box-shadow: var(--sh-3);
    transition: transform .2s ease, visibility .2s;
  }
  .menu-open .sidebar { transform: translateX(0); visibility: visible; }
  .menu-open { overflow: hidden; }
  .menu-close { display: inline-grid; }
  .nav-link.active::before { left: 0; }

  #shade {
    position: fixed;
    inset: 0;
    z-index: 25;
    border: 0;
    background: #000a;
  }

  .work-main { margin-left: 0; padding: var(--sp-5) var(--sp-4) var(--sp-8); }
  .page-heading { margin-bottom: var(--sp-4); }
  .heading-actions { flex-wrap: wrap; align-items: flex-start; }
  .heading-actions > .button,
  .heading-actions > .actions { width: 100%; }
  .heading-actions > .actions .button { flex: 1; }

  /* 字号与触控目标：输入框 16px，可点元素不小于 40px */
  input:not([type=hidden]):not([type=file]):not([type=checkbox]):not([type=radio]),
  select,
  textarea {
    min-height: var(--tap);
    font-size: var(--fs-16);
  }

  .button { min-height: var(--tap); }
  .button.small { min-height: var(--tap-min); }
  .tag { height: 26px; }
  .text-link, .inline-action, .back { min-height: var(--tap-min); }
  .tabs a, .segmented a, .segmented button { min-height: var(--tap-min); }
  .tabs b { font-size: var(--fs-14); }
  .field-grid { grid-template-columns: 1fr; gap: var(--sp-3); }
  .more-fields .field-grid { grid-template-columns: 1fr 1.25fr; }
  select.inline-select { min-height: var(--tap-min); }

  .card-head,
  .card-body,
  .card-foot,
  .list-tools,
  .upload-section,
  .destination,
  .submit-bar,
  .summary-line,
  .receipt-item,
  .mini-row,
  .field-line-item { padding-inline: var(--sp-4); }

  .card-body,
  .upload-section { padding-block: var(--sp-4); }

  .single-form > .card-body { padding: var(--sp-5) var(--sp-4); }

  /* 统计卡 2×2 紧凑 */
  .stat-grid { gap: var(--sp-3); margin-bottom: var(--sp-4); }
  .stat-card { padding: var(--sp-4); }
  .stat-value { font-size: 26px; }
  .stat-icon { width: 30px; height: 30px; right: 12px; top: 12px; }
  .stat-icon .icon { width: 16px; height: 16px; }

  /* 上报入口：核查角色手机端同样单列大按钮 */
  .pickers { grid-template-columns: 1fr; }
  .picker { min-height: 56px; }
  .reporter-desk .picker.camera { min-height: 88px; }

  .reporter-desk .submit-bar {
    padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom));
  }
  .submit-bar .button { flex: 1; min-height: 48px; font-size: var(--fs-16); }
  .receipt-lookup { flex-direction: column; align-items: stretch; }
  .receipt-lookup .field { flex: none; }

  /* 列表：每行变成两行卡片（姓名 + 标签 / 摘要 + 操作），整行可点 */
  .list-tools { align-items: stretch; }
  .search-form { width: 100%; }
  .search-box { flex: 1; min-width: 0; }
  .search-box input[type=search] { width: 100%; }
  .list-head { display: none; }

  .report-grid.data-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    min-height: 72px;
    padding: 12px var(--sp-4);
  }

  .report-grid .row-title { grid-area: 1 / 1; }
  .report-grid .row-status { grid-area: 1 / 2; justify-content: flex-end; }
  .report-grid .row-summary { grid-area: 2 / 1; display: block; color: var(--c-muted); font-size: var(--fs-14); font-variant-numeric: tabular-nums; }
  .report-grid .row-action { grid-area: 2 / 2; align-self: end; }
  .report-grid .row-time,
  .report-grid .row-pages,
  .report-grid .row-diff,
  .report-grid .row-progress { display: none; }

  /* 主操作链接撑满整行；姓名链接保持在上层仍可单独点 */
  .report-grid .row-action::after {
    content: "";
    position: absolute;
    inset: 0;
  }
  .report-grid .person-name { position: relative; z-index: 1; }

  .patient-row,
  .manage-row {
    flex-wrap: wrap;
    gap: var(--sp-2) var(--sp-3);
    padding: 12px var(--sp-4);
  }

  .patient-stats {
    order: 4;
    width: 100%;
    flex-wrap: wrap;
    padding-left: 52px;
    white-space: normal;
  }
  .patient-row .row-action { margin-left: auto; }

  .manage-actions { width: 100%; justify-content: flex-start; }
  .patient-facts dl { grid-template-columns: 1fr 1fr; }
  .inline-form,
  .account-form { display: grid; grid-template-columns: 1fr; }
  .inline-form .field { max-width: none; }
  .filter-form { width: 100%; }
  .filter-form select { flex: 1; }
  .filter-bar .field { min-width: 0; flex: 1 1 100%; }

  /* 账号行：操作折叠到"更多" */
  .more-menu { width: 100%; }

  .more-menu > summary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: var(--tap);
    padding: 0 8px;
    color: var(--c-primary);
    font-size: var(--fs-14);
    font-weight: 600;
  }

  .more-menu .more-body {
    display: grid;
    gap: 2px;
    margin-top: var(--sp-1);
  }

  .more-menu .more-body > *,
  .more-menu .more-body .action-panel > summary,
  .more-menu .more-body .plain-button {
    min-height: var(--tap);
  }

  .more-menu .more-body .plain-button { display: flex; align-items: center; width: 100%; padding: 0 8px; }
  .action-panel form { position: static; width: 100%; margin-top: var(--sp-2); box-shadow: none; }

  .pagination { padding-inline: var(--sp-4); gap: var(--sp-3); }
  .pagination form { flex: 1; }
  .pagination .button { width: 100%; }
  .pagination > span { flex: none; }
  .pagination > span:empty { display: block; flex: 1; }

  /* 字段摘录：每行变卡片 */
  .ext-grid.data-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    padding: 12px var(--sp-4);
  }
  .ext-grid .ext-label { grid-area: 1 / 1; font-size: var(--fs-18); }
  .ext-grid .ext-sub { grid-area: 2 / 1; display: block; color: var(--c-muted); font-size: var(--fs-14); }
  .ext-grid .ext-link { grid-area: 1 / 2 / 3 / 3; align-self: center; }
  .ext-grid .ext-col { display: none; }

  /* 核查页兼容 */
  .review-layout { grid-template-columns: minmax(0, 1fr); }
  .image-window { height: 50vh; min-height: 245px; }

  .receipt-card { margin: 0; }
  .receipt-card .actions { flex-direction: column; align-items: stretch; }
  .receipt-card .actions .button { flex: none; width: 100%; }

  /* 登录：隐藏左侧插画，表单卡片满宽 */
  .public-main { align-items: start; padding: var(--sp-3); }
  .login-layout { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .login-intro { min-height: 0; padding: var(--sp-5) var(--sp-5) 0; background: var(--c-surface); }
  .login-copy,
  .report-art { display: none; }
  .login-panel { padding: var(--sp-5); }
  .captcha-row { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 补充：列表附加样式 ---------- */
.sort-line {
  padding-block: var(--sp-2);
  background: var(--c-surface-2);
}

@media (max-width: 767px) {
  /* 患者行：整行点击进入患者详情，右侧"补传/选择"按钮保持在上层 */
  .mobile-bar .brand,
  .person-name {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap-min);
  }
  .action-panel > summary { min-height: var(--tap-min); }
  .patient-row .person-name::after {
    content: "";
    position: absolute;
    inset: 0;
  }
  .patient-row .row-action {
    position: relative;
    z-index: 1;
  }
  .sort-line { padding-block: var(--sp-2); }
}

.platform-name { font-size: 19px; font-weight: 700; letter-spacing: .035em; color: var(--c-primary); }
.top-account { display: none; }
.sidebar { background: var(--c-primary); border-right: 0; }
.sidebar .platform-name, .sidebar .menu-close, .sidebar .nav-link, .sidebar .nav-link .icon,
.sidebar .account-id strong, .sidebar .account-id div span, .sidebar .account-panel .icon-button { color: white; }
.sidebar .nav-link:hover, .sidebar .nav-link:focus-visible { background: #ffffff22; }
.sidebar .nav-link.active { background: white; color: var(--c-primary); }
.sidebar .nav-link.active .icon { color: var(--c-primary); }
.sidebar .menu-divider { background: #ffffff49; }
.sidebar .account-panel { border-color: #ffffff49; }
.sidebar .fixed-unit, .sidebar .unit-switch { border-color: transparent; }
.upload-home { max-width: 1000px; margin: 0 auto; }
.upload-home .page-heading h1 { border-left: 4px solid var(--c-primary); padding-left: 12px; }
.upload-home .upload-card { background: white; }
.upload-home .picker small { display: block; margin-top: 3px; font-size: 13px; font-weight: 400; }
.receipt-history > summary { cursor: pointer; padding: 12px 0; color: var(--c-primary); font-weight: 600; }
.receipt-history[open] .card + .card { margin-top: 12px; }
@media (min-width:768px) {
  .workspace .mobile-bar { display:flex; align-items:center; justify-content:space-between; height:60px; background:white; border-bottom:1px solid var(--c-line); padding:0 24px; position:sticky; top:0; z-index:32; }
  .top-account, .top-account > span { display:flex; align-items:center; gap:12px; }
  .top-account > span { gap:6px; }
  .workspace #mobile-menu, .sidebar .side-top, .sidebar .account-panel { display:none; }
  .sidebar { top:60px; }
  .reporter-desk.upload-home .pickers { grid-template-columns:1fr 1fr; gap:16px; }
  .reporter-desk.upload-home .picker { min-height:98px; }
  .upload-home .submit-bar { position:static; box-shadow:none; }
  .public .login-intro { background:var(--c-primary); }
  .public .login-intro > .brand { display:none; }
  .public .login-copy h1 { color:white; }
  .public .login-copy p { color:#e3edfa; }
}
@media (max-width:767px) {
  .mobile-bar .platform-name { font-size:17px; }
  .upload-home .picker small { display:none; }
}

.sidebar .menu-close { color: var(--c-primary); }

/* Platform artwork belongs to the signed-out login screen. */
.public .main-inner:has(.login-layout) { width: min(1440px, 100%); margin-inline: auto; }
.public .login-layout { grid-template-columns: minmax(0, 1.8fr) minmax(365px, 1fr); }
.public .login-intro {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #0d4382;
}
.public .login-intro::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: -1;
  background: #0d4382 url("registry-home-hero.webp") center / cover no-repeat;
  filter: blur(22px) saturate(.85);
}
.public .login-intro::after {
  content: "";
  content: "" / "智能采集、精准提取、规范入库";
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(105deg, #0d438212, transparent), url("registry-home-hero.webp") center / cover no-repeat;
  filter: saturate(.88);
}
.public .login-intro > .brand, .public .login-intro > .report-art { display: none; }
.public .login-intro .login-copy {
  display: block;
  position: absolute;
  margin: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (max-width: 950px) {
  .public .login-layout { grid-template-columns: 1fr; max-width: 490px; margin: 0 auto; }
  .public .login-intro::after { aspect-ratio: 2.5; background-position: center 56%; }
}

.workspace .mobile-bar { background: #103d71; border-color: #0c355f; }
.mobile-bar .platform-name, .top-account { color: white; }
.mobile-bar .icon-button, .top-account .button { color: white; border-color: #7190ad; background: transparent; }
.mobile-bar .icon-button:hover, .top-account .button:hover { color: white; background: #245480; }
.reporter-desk.upload-home .pickers { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.reporter-desk.upload-home .picker { min-height: 48px; padding: 8px 12px; gap: 8px; background: var(--c-primary); color: white; border-color: var(--c-primary); box-shadow: none; }
.reporter-desk.upload-home .picker:hover { background: var(--c-primary-hover); }
.reporter-desk.upload-home .picker b { font-size: 16px; }
.reporter-desk.upload-home .picker .pick-icon .icon { width: 20px; height: 20px; }
#toggle-pw { min-width: 44px; display: grid; place-items: center; }
#toggle-pw[hidden], #toggle-pw .icon:last-child { display: none; }
#toggle-pw[aria-pressed=true] .icon:first-child { display: none; }
#toggle-pw[aria-pressed=true] .icon:last-child { display: block; }
.receipt-card .actions { flex-wrap: wrap; }

/* 已确认字段按患者汇总，保留跨报告的多次观察。 */
.fx-card .fx-totals,.fx-person{margin:0;padding:18px clamp(16px,3vw,32px);border-top:1px solid #dfe7ef}
.fx-totals{display:flex;align-items:center;gap:18px;flex-wrap:wrap;background:#f3f7fb;color:#38516b}
.fx-totals strong,.fx-person h2 a{color:#164b79}
.fx-person{overflow-wrap:anywhere}
.fx-person-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.fx-person-head h2{font-size:1.12rem;margin:0}
.fx-person-head .text-link{flex:none}
.fx-person p{margin:8px 0;line-height:1.55}
.fx-person .fx-meta,.fx-person small{font-size:.84rem;color:#566b80}
.fx-values{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(210px,100%),1fr));gap:9px;margin:12px 0 4px}
.fx-values>div{min-width:0;background:#f4f7fa;border-radius:6px;padding:8px 12px}
.fx-values dt{font-size:.82rem;color:#415d76}
.fx-values dd{margin:3px 0 0;line-height:1.5;white-space:pre-wrap}
.fx-more{margin-top:12px}.fx-more summary{cursor:pointer;color:#165584}
.fx-detail .fx-result{color:#143f63;font-size:1.05rem;font-weight:650;white-space:pre-wrap}
.fx-detail .fx-evidence{background:#f4f7fa;padding:8px 12px;color:#475e73;white-space:pre-wrap}
@media(max-width:620px){.fx-filter{width:100%;flex-wrap:wrap}.fx-filter .field{flex:1 1 145px;min-width:0}.fx-filter input,.fx-filter select{width:100%}.fx-values{grid-template-columns:1fr 1fr}.fx-totals{gap:10px}}
/* Hospital signature from the supplied artwork, framed in its original proportions. */
body.public:has(.login-layout) { background: #f1f4f7; }
.public .public-main:has(.login-layout) { padding: clamp(24px, 5vw, 72px); }
.public .main-inner:has(.login-layout) { width: min(1120px, 100%); margin-inline: auto; }
.public .login-layout {
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 1fr);
  max-width: none; margin: 0; border: 1px solid #cfd9e0; border-radius: 8px;
  background: white; box-shadow: 0 5px 20px rgb(22 50 74 / 6%);
}
.public .login-intro {
  display: flex; flex-flow: column; align-items: flex-start; justify-content: center;
  position: relative; isolation: isolate; min-height: 508px;
  padding: 48px clamp(28px, 4vw, 58px); background: linear-gradient(115deg,#073b78,#104b86);
}
.public .login-intro::before {
  content: ""; content: "" / "河南省肿瘤医院";
  position: absolute; inset: 40px auto auto clamp(24px, 3.8vw, 54px); z-index: 1;
  width: 234px; height: auto; aspect-ratio: 440/106;
  background: url("hospital-identity-831f.jpg") 5.55% 5.9% / 312.73% auto no-repeat;
  filter: none;
  mask-image: linear-gradient(to right,transparent,#000 4% 96%,transparent),
              linear-gradient(to bottom,transparent,#000 8% 92%,transparent);
  mask-composite: intersect;
}
.public .login-intro::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  inset: auto -30px -52px auto; width: 49%; height: 148px; aspect-ratio: auto;
  background: none; filter: none; border: 1px solid rgb(226 238 247 / 18%);
  box-shadow: -9px -9px 0 -1px #0e4983,-9px -9px 0 0 rgb(226 238 247 / 15%),
              -18px -18px 0 -1px #0e4983,-18px -18px 0 0 rgb(226 238 247 / 12%);
}
.public .login-intro > .brand,.public .login-intro > .report-art { display:none; }
.public .login-intro .login-copy {
  display: block; position: relative; inset: auto; z-index: 1; margin: 24px 0 0;
  width: auto; height: auto; max-width: 100%; clip-path: none; overflow: visible;
}
.public .login-copy h1 {
  margin: 0; color: #fff; font-size: clamp(30px, 3.1vw, 44px);
  line-height: 1.35; font-weight: 650; letter-spacing: .025em; text-wrap: balance;
}
.public .login-copy p { display: none; }
.public .login-layout .login-panel { padding: clamp(30px,4.2vw,64px); }
.public .login-panel h2 { color: #162f46; font-size: 26px; font-weight: 650; }
.public .login-panel > div > p { color: #536578; margin: 6px 0 24px; }
.public .login-panel .login-submit { background: #10467f; border-color: #10467f; border-radius: 5px; }
.public .login-panel .login-submit:hover { background: #093965; }
.public .login-foot,.public .login-submit .icon { display: none; }
@media (max-width: 760px) {
  .public .public-main:has(.login-layout) { align-items: start; padding: 14px; }
  .public .main-inner:has(.login-layout) { max-width: 510px; }
  .public .login-layout { grid-template-columns: minmax(0,1fr); }
  .public .login-intro {
    min-height: 0; padding: 83px 22px 23px; justify-content: flex-end;
  }
  .public .login-intro::before {
    inset: 20px auto auto 20px; width: 173px;
  }
  .public .login-intro::after { width: 19%; height: 52px; right: -18px; bottom: -28px; }
  .public .login-intro .login-copy { margin: 0; }
  .public .login-copy h1 { font-size: clamp(23px,6.6vw,28px); }
  .public .login-layout .login-panel { padding: 25px 22px 27px; }
  .public .login-panel h2 { font-size: 22px; }
}
@media (max-width: 355px) {
  .public .public-main:has(.login-layout) { padding: 8px; }
  .public .login-layout .login-panel { padding-inline: 16px; }
  .public .captcha-row { gap: 5px; }
  .public #captcha-image { width: 102px; object-fit: contain; }
}

/* 修改密码：规则清单逐项打勾 */
.pw-rules { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -4px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--c-muted, #5b6b7f); }
.pw-rules li { display: inline-flex; align-items: center; gap: 5px; }
.pw-rules li::before { content: ""; width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 50%; box-sizing: border-box; }
.pw-rules li.met { color: var(--s-done-fg, #1e6549); font-weight: 600; }
.pw-rules li.met::before { content: "✓"; border: 0; background: var(--s-done-fg, #1e6549); color: white; font-size: 10px; line-height: 14px; text-align: center; }
/* 账号管理：初始密码说明 */
.account-note { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; }
.account-note .icon { width: 16px; height: 16px; }
.account-form [data-unit-field][hidden] { display: none; }

/* Shanghai upload / original archive */
.current-unit { display:flex; align-items:center; gap:8px; color:#0d4382; margin:0 0 12px; overflow-wrap:anywhere; }
.current-unit svg { width:20px; height:20px; flex:none; }
.original-search,.original-tools { display:flex; flex-wrap:wrap; gap:12px; align-items:end; margin:16px 0; }
.original-search .field { flex:1; min-width:180px; }
.original-list { display:grid; gap:12px; grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); }
.original-item { padding:18px; overflow-wrap:anywhere; }
.original-select { display:flex; gap:12px; align-items:center; font-size:18px; }
.original-select input { width:20px; height:20px; }
@media(max-width:767px) { .original-tools .button { flex:1 1 100%; } .original-tools { align-items:center; } }
