/* NewOIS 前台视觉层（正式上线版设计系统，2026-10-22 重制）
   设计目标：临床可用 —— 信息密度适中、状态一眼可辨、操作路径短、长时间阅读不疲劳。
   纪律：纯展示层 CSS——语义 DOM（aria-label/role/文案/class）由测试冻结，本文件不改任何语义。
   结构：左侧分组导航 + 顶部条（面包屑/当前用户）+ 内容区；页面内 panel 卡片承载业务分区。 */

/* ── 设计令牌 ── */
:root {
  /* 2026-11-16 切方案 D「暖阳临床版」（交接包 output/theme-d-handoff）：
     暖白画布 + 深青绿品牌，替代原来的冷灰底 + 医院蓝。
     只改变量值不改变量名——全站组件零改动自动换肤；旧主题留在 ois-theme.css.bak-scheme-d */
  /* 品牌与中性色 */
  --brand: #0f766e;
  --brand-h: #0b5a54;
  --brand-l: #e0f2ef;
  --navy: #08433e;
  --navy-2: #0b5a54;
  --bg: #f8f4ee;
  --card: #fdfaf5;
  --line: #efe6da;
  --line-2: #e3d8c9;
  --ink: #2e2a26;
  --ink-2: #6b6157;
  --muted: #a89d8f;
  --faint: #fdfaf5;

  /* 语义色（状态/结果） */
  --ok: #3d9a6c;
  --ok-bg: #e4f4eb;
  --ok-line: #c5e7d5;
  --warn: #c98a1e;
  --warn-bg: #fbf1dc;
  --warn-line: #eddcb4;
  --bad: #e86a4a;
  --bad-bg: #fdeae3;
  --bad-line: #f6cabb;
  --info: #4a90c2;
  --info-bg: #e6f0f9;
  --info-line: #c9def1;
  --gray-bg: #f4eee5;

  --radius: 8px;
  --radius-s: 6px;
  --shadow: 0 1px 2px rgba(46, 42, 38, .05), 0 1px 3px rgba(46, 42, 38, .06);
  --shadow-pop: 0 8px 24px rgba(46, 42, 38, .12);
  --sidebar-w: 208px;
  --topbar-h: 56px;
}

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

body {
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ── 应用壳：左侧导航 + 顶部条 + 内容区 ── */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: none;
  /* 2026-11-16 方案 D：侧栏由深色渐变改浅米白，只留品牌块做深青绿锚点 */
  background: var(--card);
  color: var(--ink-2);
  border-right: 1px solid var(--line);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.sbrand {
  height: var(--topbar-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 18px;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
}
.sbrand span {
  font-size: 11px;
  font-weight: 400;
  color: #7f9bbb;
  letter-spacing: 1.4px;
  margin-top: 1px;
}
.snav { padding: 10px 10px 24px; overflow-y: auto; flex: 1; }
.ngroup { margin-bottom: 14px; }
.ngtitle {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1.5px;
  padding: 6px 10px 4px;
  font-weight: 600;
}
.nitem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-s);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13px;
  transition: background .12s, color .12s;
  position: relative;
}
.nitem:hover { background: var(--brand-l); color: var(--brand); }
.nitem.on {
  background: var(--brand-l);
  color: var(--brand);
  font-weight: 600;
}
.nitem.on::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
}

.main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  flex: none;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.crumb { color: var(--muted); font-size: 13px; }
.crumb .now { color: var(--ink); font-weight: 600; }
.who {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 12.5px;
}
.who .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-l);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}
/* fb-2473：顶栏「切换账号 / 退出」——走查台没有登录态，两个动作都落在人员页选人；
   用链接不用按钮（壳层不放 role=button，见 harness/main.tsx 头注） */
.who-name { white-space: nowrap; }
.who-act {
  color: var(--brand);
  font-size: 12.5px;
  text-decoration: none;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}
.who-act:hover { border-color: var(--brand); background: var(--brand-l); }
.content { padding: 20px 22px 32px; max-width: 1480px; width: 100%; }

/* 兼容旧壳类（board 页与历史页面仍在用） */
.sysbar { display: flex; align-items: center; gap: 16px; padding: 8px 16px; background: var(--navy); color: #fff; }
.sysbar .brand { font-weight: 700; }
.sysbar .mainnav { display: flex; gap: 2px; flex-wrap: wrap; }
.sysbar .mainnav a { color: #c4d3e5; text-decoration: none; padding: 6px 12px; border-radius: 6px; }
.sysbar .mainnav a.on { background: rgba(37, 99, 168, .5); color: #fff; }
.wrap { max-width: 1480px; margin: 0 auto; padding: 20px 22px; }
.foot { text-align: center; padding: 16px; color: var(--muted); font-size: 12px; }

/* ── 页面标题 ── */
.page-title, .page > h1, .page > h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
  letter-spacing: .2px;
}
.page { }

/* ── 卡片（panel / card 两种历史类，统一观感）── */
.panel, .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.panel > .ph, .card > h3 {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  background: #fcfdff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.panel > .ph::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--brand);
  flex: none;
}
.panel > .ph .aux { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--muted); }
.panel > .pb, .card > .pb { padding: 16px; }
/* card 内直接子元素（表单页未包 pb 时的兜底内边距） */
.card > label.frow, .card > p, .card > button.btn, .card > div.toolbar { margin: 0 16px; }
.card > button.btn { margin-bottom: 16px; }
.card > p:last-of-type { margin-bottom: 12px; }

/* ── 数据表（grid 历史类 + tbl 新类，同一观感）── */
table.grid, table.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  font-size: 13px;
}
table.grid th, table.tbl th {
  background: var(--faint);
  color: var(--ink-2);
  font-weight: 600;
  /* fb-103：表头字号必须 ≥ 正文（原 12.5px < 正文 13px，看着像"标题比内容小"） */
  font-size: 13px;
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: sticky;
  top: 0;
}
table.grid td, table.tbl td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}
table.grid tbody tr:hover td, table.tbl tbody tr:hover td { background: #f7fafd; }
table.grid tbody tr:last-child td, table.tbl tbody tr:last-child td { border-bottom: none; }
table.grid td.empty { color: var(--muted); text-align: center; padding: 28px; }
table.grid td.num, table.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid td:first-child, table.tbl td:first-child { color: var(--ink-2); }

/* 表格内按钮更紧凑（行内操作） */
td > .btn, td > button.btn { margin-right: 6px; }

/* 签字确认窗里的三栏窄格（fb-9672 / fb-9675）：
   摆位三轴 Vrt/Lng/Lat 与 摆位人1/摆位人2/记录人 各占一格，不再挤成一串文字。
   一格 = 小标签 + 输入框，标签定宽让三格的输入框左边缘对齐。 */
.sign-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; }
.sign-grid > label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px; }
.sign-grid .sign-k { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sign-grid .inp { min-width: 0; padding: 4px 6px; }
/* 人员三格：标签摆到输入框上方——「摆位人1」比「Vrt」长，并排放会把输入框挤成一条缝 */
.sign-grid.is-stack > label { grid-template-columns: minmax(0, 1fr); gap: 2px; }

/* ── 按钮 ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius-s);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .12s, background .12s, box-shadow .12s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--brand); color: var(--brand); background: #fbfdff; }
.btn:active { background: var(--brand-l); }
.btn:focus-visible { outline: 2px solid #bcd4f5; outline-offset: 1px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; border-color: var(--line); color: var(--muted); }
/* 主操作按钮（表单提交位置的主按钮用 .pri；表格内默认也是描边，主次分明） */
.btn.pri { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }
/* 禁用的主按钮必须看得出来（.pri 的底色会盖掉 .btn[disabled] 的灰字，只剩 55% 透明度）：
   已完成/已锁定的条目上，"保存修改"是蓝的会让人以为还能点（2026-11-05 走查者） */
.btn.pri[disabled] { background: var(--line-2, #cbd5e1); border-color: var(--line-2, #cbd5e1); opacity: .8; cursor: not-allowed; }
.inp:disabled { background: var(--faint); color: var(--muted); cursor: not-allowed; }
.btn.pri:hover { background: var(--brand-h); border-color: var(--brand-h); color: #fff; }
/* 卡片内单独存在的提交按钮（表单末尾）视作主操作 */
.card > button.btn:not([disabled]) { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }
.card > button.btn:not([disabled]):hover { background: var(--brand-h); border-color: var(--brand-h); }
/* 表格内按钮降级为小号 */
td .btn, td button.btn { height: 26px; padding: 0 10px; font-size: 12.5px; }

/* ── 输入控件 ── */
input.inp, select.inp, textarea.inp {
  height: 34px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  padding: 0 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color .12s, box-shadow .12s;
  width: 100%;
}
textarea.inp { height: auto; padding: 8px 10px; }
input.inp:hover, select.inp:hover { border-color: #b9c4d3; }
input.inp:focus, select.inp:focus, textarea.inp:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 168, .12);
}
input.inp::placeholder { color: #a9b3c1; }
select.inp { cursor: pointer; }
/* 系统带入的字段：视觉弱化，提示不可改（避免临床误以为是手工录入项） */
input.inp[readonly] {
  background: var(--faint);
  color: var(--muted);
  border-style: dashed;
  cursor: default;
}
input.inp[readonly]:focus { border-color: var(--line-2); box-shadow: none; }
label.req { color: var(--bad); }

/* ── 表单行（label.frow > .fk + .inp）── */
.frow {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.frow > .fk {
  color: var(--ink-2);
  font-size: 13px;
  text-align: right;
  min-width: 0;
}
.frow > .inp { min-width: 0; }
/* fb-125：必填星号（标签后紧跟，红点，不改变对齐） */
.frow > .fk .req { color: var(--bad); margin-left: 3px; font-weight: 700; }
/* fb-3517/3520/3525：字典复选（勾选块）。比 <select multiple> 直白——
   勾了就是选了，收起状态下也看得见选了哪几项；Windows 下没人会按 Ctrl 点选。 */
.mchips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.mchips .chk {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-size: 12.5px; color: var(--ink-2); cursor: pointer; user-select: none;
}
.mchips .chk:hover { border-color: var(--brand); }
.mchips .chk.is-on {
  border-color: var(--brand); background: var(--brand-bg, #f0f6ff);
  color: var(--brand); font-weight: 600;
}
.mchips .chk input { accent-color: var(--brand); margin: 0; width: 13px; height: 13px; cursor: pointer; }
.mchips .chk input:disabled { cursor: not-allowed; }
/* fb-108：带清除按钮的输入框（姓名/病案号这类独立输入框，原生 type=search 的 × 只在部分浏览器有） */
.inp-wrap { position: relative; display: inline-flex; align-items: center; min-width: 0; flex: 1 1 auto; }
.inp-wrap > .inp { width: 100%; padding-right: 26px; }
.inp-wrap > .inp-clr {
  position: absolute;
  right: 6px;
  width: 16px;
  height: 16px;
  line-height: 14px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--line-2);
  color: var(--ink-2);
  font-size: 12px;
  cursor: pointer;
}
.inp-wrap > .inp-clr:hover { background: var(--muted); color: #fff; }
/* 数据字典选择器（fb-154/167/170/176/179）：检索式下拉，带编码、名称与备注 */
.dictpick { position: relative; min-width: 0; flex: 1 1 auto; }
/* 展开时把整个**表单行**抬起来：.fgrid 的 grid item 各自成层，只抬 .dictpick 抬不出去，
   下一行的输入框照样压在候选列表上（fb-179 走查截图暴露） */
.frow:focus-within { position: relative; z-index: 50; }
.dictmenu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  /* 器官列只有 200px 宽：编码 + 中文名 + 备注挤在里面认不出来，给个下限（向右溢出不碍事） */
  min-width: 240px;
  max-height: 264px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  /* --panel 这个变量从来没定义过（写成 var(--panel) 等于没背景）：
     向下弹时底下多是空白看不出来，fb-2817 翻到上方盖住表格就整块透出来。改成实心卡片色 */
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}
/* fb-2817：贴着视口底部时向下弹会落到视口外（点开等于没反应），翻到输入框上方 */
.dictmenu.is-up {
  top: auto;
  bottom: calc(100% + 4px);
}
/* fb-2817 第二层：表格卡片设了 overflow 裁溢出（圆角 + 横向滚动都要它），
   于是翻到上方的候选菜单会被卡片边界整块切掉——量坐标看着正常，屏幕上什么都没有。
   展开候选时放开裁剪，收起后规则自动失效，圆角与横向滚动照旧。 */
.card:has(.dictmenu),
.plan-tbl-wrap:has(.dictmenu) {
  overflow: visible;
}
.dictopt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.dictopt.is-active { background: var(--brand-l, rgba(37, 99, 168, 0.12)); }
.dictopt[aria-selected="true"] .dictcode { color: var(--brand); font-weight: 700; }
.dictcode { color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 52px; flex: 0 0 auto; }
.dictname { flex: 1 1 auto; min-width: 0; }
.dictnote { color: var(--muted); font-size: 12px; flex: 0 0 auto; }
.dictico { height: 34px; flex: 0 0 auto; display: inline-flex; align-items: center; }
.dictico > svg { height: 34px; width: auto; }
/* 带图示的行给足高度，否则 24×46 的人形缩到 13px 宽只剩一个黑点 */
.dictopt:has(.dictico) { min-height: 42px; }
.dictempty { padding: 8px; color: var(--muted); font-size: 12.5px; }
/* 部位图示（fb-179）：小人体示意，高亮当前部位 */
.bsi { display: inline-block; vertical-align: middle; }
.bsi .bsi-body { fill: none; stroke: var(--line-2); stroke-width: 1.4; }
.bsi .bsi-on { fill: var(--brand); opacity: 0.9; stroke: none; }
/* 定位申请的患者上下文（fb-164）：用知情卡片替掉裸 ID */
.pcard > h3 { margin-bottom: 10px; }
.pid { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0 0 12px; }
.pid > div { display: flex; align-items: baseline; gap: 6px; }
.pid dt { color: var(--ink-2); font-size: 12.5px; }
.pid dd { margin: 0; font-size: 14px; font-weight: 600; }
.plist { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.plist-row { display: flex; align-items: baseline; gap: 10px; justify-content: flex-start; text-align: left; }
.plist-name { font-weight: 600; }
.plist-meta { color: var(--ink-2); font-size: 12.5px; }
.siteprev { display: flex; align-items: center; gap: 10px; margin: 6px 16px 10px; color: var(--ink-2); }
/* 数据字典管理页（fb-173） */
.dictmeta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 10px 0 4px; }
.dictmeta > div { display: flex; align-items: baseline; gap: 6px; }
.dictmeta dt { color: var(--ink-2); font-size: 12.5px; }
.dictmeta dd { margin: 0; font-size: 13px; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.2px; }
/* 卡片内表单单行不留外边界（用 grid 列对齐，视觉更齐） */
.card > label.frow { margin: 0 16px 10px; }
.card > label.frow:first-of-type { margin-top: 4px; }

/* 2026-11-17：列数自适应——3 个字段就铺 3 列（原来固定 4 列，右侧总空一格） */
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 8px 16px; }
.fgrid.two { grid-template-columns: repeat(2, 1fr); }
.hint { color: var(--muted); font-size: 12px; margin-top: 10px; }
/* fb-1280：已有疗程清单（登记页两段式与病案号重复弹窗共用）——横排胶囊，一眼数得清几个 */
ul.cref { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
ul.cref li {
  font-size: 12px; color: var(--ink-2); background: var(--faint);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
}

/* ── 状态徽标 / 提示条 / 标签 ── */
.st { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 9px; font-size: 12px; white-space: nowrap; font-weight: 500; }
.st.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); }
.st.cur { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); }
.st.wait { background: var(--gray-bg); color: var(--muted); border: 1px solid var(--line-2); }
.st.bad { background: var(--bad-bg); color: var(--bad); border: 1px solid var(--bad-line); }
.st.info { background: var(--info-bg); color: var(--info); border: 1px solid var(--info-line); }

/* chip：非提示条时是行内小标签 */
.chip {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  border: 1px solid var(--line);
  background: var(--faint);
  color: var(--muted);
  margin-right: 6px;
}
.chip b { color: var(--ink); margin-left: 4px; }
/* 提示条（role=status / alert）：块级、带色、可读 */
p.chip[role="status"], p.chip[role="alert"], p.chip:only-of-type {
  display: block;
  border-radius: var(--radius-s);
  padding: 9px 13px;
  margin: 0 0 12px;
  font-size: 13px;
}
p.chip[role="status"] { background: var(--info-bg); border-color: var(--info-line); color: #1e40af; }
p.chip[role="alert"] { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
p.chip:not([role]) { background: var(--faint); border-color: var(--line); color: var(--muted); }

/* ── 检索条 / 工具条 / 分页 ── */
form.searchbar { display: flex; gap: 10px; margin-bottom: 12px; }
form.searchbar input.inp { max-width: 440px; }
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.toolbar label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.toolbar label .inp { width: auto; min-width: 120px; }
.toolbar .btn:last-child { margin-left: 0; }
.actionbar {
  display: flex;
  gap: 10px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
.pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 2px 0; font-size: 12.5px; color: var(--muted); }

/* ── 流程步骤条（workflow-view 冻结渲染面：只着色，不改结构）── */
ol[aria-label="流程步骤"] { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
ol[aria-label="流程步骤"] > li {
  flex: 1;
  min-width: 160px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fff;
}
ol[aria-label="流程步骤"] > li > span { display: block; }
ol[aria-label="流程步骤"] > li > span:first-child { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
ol[aria-label="流程步骤"] > li > span:nth-child(2) { font-size: 12px; color: var(--muted); }
ol[aria-label="流程步骤"] > li > span:nth-child(3) { font-size: 12px; color: var(--brand); margin-top: 2px; }

/* ── 时间线 ── */
ol.timeline { list-style: none; }
ol.timeline li {
  display: flex;
  gap: 14px;
  padding: 10px 12px;
  border-left: 2px solid var(--line);
  margin-left: 9px;
  position: relative;
}
ol.timeline li:hover { background: #fafcff; }
ol.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 15px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--brand);
}
ol.timeline time { color: var(--muted); font-size: 12px; min-width: 88px; font-variant-numeric: tabular-nums; }
ol.timeline .tl-main { font-weight: 600; color: var(--ink); min-width: 120px; }
ol.timeline .tl-detail { color: var(--ink-2); }
/* 治疗行右侧动作（fb-1293）：开定位申请 / 开计划申请 挂在每条治疗上 */
ol.timeline .tl-body { display: flex; gap: 14px; align-items: baseline; flex: 1; }
ol.timeline .tl-acts { display: flex; gap: 8px; margin-left: auto; flex: none; }
ol.timeline .tl-acts .btn { height: 28px; padding: 0 10px; font-size: 12.5px; }
/* fb-3511：流程节点条并进治疗行——行改两列换行（编号/动作在上，节点条另起一行铺满） */
ol.timeline li.has-flow { flex-wrap: wrap; }
ol.timeline li.has-flow .tp-flow { flex: 0 0 100%; width: 100%; }
ol.timeline .tp-count { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ── 治疗进度流程图（fb-1296，参照 CCIP「计划设计进度」） ──
   横向节点条：圆形序号 + 节点名 + 签名人 + 完成时间；已完成蓝实心、未开始灰空心。 */
.tp-block { margin-bottom: 14px; }
.tp-block:last-child { margin-bottom: 0; }
.tp-title { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; font-size: 13px; }
.tp-title .tp-count { color: var(--muted); font-size: 12px; }
.tp-flow {
  list-style: none; margin: 0; padding: 10px 4px 2px; display: flex; gap: 0;
  overflow-x: auto; border-top: 1px solid var(--line);
}
.tp-node {
  position: relative; flex: 1 0 96px; min-width: 96px; display: flex; flex-direction: column;
  align-items: center; gap: 3px; padding: 0 4px; text-align: center;
}
/* 节点之间的连线：从左半段画到右半段，首尾点自然收口 */
.tp-node::before {
  content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px;
  background: var(--line-2, #d5dce6); z-index: 0;
}
.tp-node:first-child::before { display: none; }
.tp-dot {
  position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: #fff; border: 2px solid var(--line-2, #d5dce6); color: var(--muted);
}
.tp-node.is-done .tp-dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.tp-node.is-done::before { background: var(--brand); }
.tp-name { font-size: 12px; color: var(--muted); line-height: 1.3; }
.tp-node.is-done .tp-name { color: var(--ink); font-weight: 500; }
.tp-who { font-size: 11.5px; color: var(--brand); }
.tp-when { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ── 病案视图字段 ── */
.fl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 16px; }
.fl .i {
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 8px 11px;
  background: #fcfdff;
}
.fl .i dt { display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 2px; }
.fl .i dd { margin: 0; font-weight: 600; color: var(--ink); font-size: 13px; }

/* ── 叫号大屏（暗色，独立页面）── */
.board-screen {
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% -20%, #16324f, #0b1a2b);
  color: #e8eef5;
  padding: 26px 34px;
}
.board-screen .board-back { color: #7fa8d9; text-decoration: none; font-size: 13px; }
.board-screen .board-back:hover { color: #fff; }
.board-head { text-align: center; margin: 12px 0 24px; }
.board-head h1 { font-size: 34px; letter-spacing: 6px; color: #fff; }
.board-head .dev { color: #8fb3dd; font-size: 15px; margin-top: 6px; letter-spacing: 2px; }
.board-empty { text-align: center; color: #6d88a8; font-size: 22px; padding: 60px 0; }
ul.board-rows { list-style: none; max-width: 980px; margin: 0 auto; }
ul.board-rows li {
  display: flex;
  align-items: center;
  gap: 22px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(143, 179, 221, .28);
  border-radius: 12px;
  padding: 18px 26px;
  margin-bottom: 14px;
}
ul.board-rows li.passed { opacity: .55; }
ul.board-rows .apt { font-size: 30px; font-weight: 700; color: #ffd54f; letter-spacing: 2px; }
ul.board-rows .bstat { font-size: 20px; padding: 4px 18px; border-radius: 999px; }
ul.board-rows .bstat.calling { background: #e84040; color: #fff; }
ul.board-rows .bstat.passed { background: #44586e; color: #c6d4e6; }
ul.board-rows .cnt { font-size: 18px; color: #c6d4e6; }
ul.board-rows .tm { margin-left: auto; color: #8fb3dd; font-size: 15px; }

/* ── 窄屏适配（值班手机/小屏查看）── */
@media (max-width: 1080px) {
  :root { --sidebar-w: 172px; }
  .fl { grid-template-columns: repeat(2, 1fr); }
  .fgrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .sidebar { position: static; width: 100%; }
  .app { display: block; }
  .main { margin-left: 0; }
  .snav { display: flex; gap: 8px; overflow-x: auto; padding: 8px; }
  .ngroup { margin-bottom: 0; }
  .ngtitle { display: none; }
  .nitem { white-space: nowrap; }
  .frow { grid-template-columns: 96px minmax(0, 1fr); }
}

/* 汇总页统计 */
.fb-stats { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.fb-stat {
  flex: 1;
  min-width: 116px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow);
}
.fb-stat .n { display: block; font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.fb-stat .l { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.fb-stat.s-open { border-left: 3px solid #94a3b8; }
.fb-stat.s-accepted { border-left: 3px solid var(--info); }
.fb-stat.s-fixed { border-left: 3px solid var(--ok); }
.fb-stat.s-wontfix { border-left: 3px solid var(--bad); }
.fb-el { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.fb-desc-cell { max-width: 320px; }
.fb-time { font-size: 11.5px; color: var(--muted); }

.fb-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
}
.fb-link:hover { text-decoration: underline; }
.inp-sm { height: 26px; padding: 0 6px; font-size: 12px; }
.fb-ops { display: flex; gap: 5px; flex-wrap: wrap; }

/* ── 必须先改的 N 条：同处多人提 → 合并计票后排序 ──
   只占一条横栏，点一行即筛到该页；不抢表格的位置。 */
.fb-pri {
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid #d97706;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.fb-pri-h {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 14px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #33465c;
}
.fb-pri-note { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.fb-pri-list { display: flex; flex-direction: column; }
.fb-pri-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  border: 0;
  border-top: 1px solid var(--line-2);
  background: none;
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.fb-pri-row:hover { background: #f8fafc; }
/* 序号与「N 人同提」标签：汇总页自有样式（不借用 SDK 内的 fb-row-no / fb-tag） */
.fb-pri-no {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #d97706;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
}
.fb-pri-tag {
  flex: none;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  background: #eef4fb;
  color: #2563a8;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
}
.fb-pri-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-pri-main b { font-weight: 600; color: var(--ink); }
.fb-pri-el { color: var(--muted); }
.fb-pri-open { flex: none; font-size: 11.5px; color: var(--muted); }

/* 演示数据重置入口：页脚一行小字，避免误触 */
.fb-reset {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 18px;
  font-size: 11.5px;
  color: var(--muted);
}

/* ══════════════ 走查向导（7 段路线）══════════════
   悬浮在内容区左下角，与右下角「标记问题」分居两侧，互不遮挡。
   收起时只有一枚胶囊；展开才出要点。视觉上比反馈按钮更淡，避免抢业务界面的注意力。 */
.wg {
  position: fixed;
  left: calc(var(--sidebar-w) + 22px);
  bottom: 22px;
  z-index: 895;
}
.wg-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 13px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: #33465c;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.wg-pill:hover { border-color: var(--brand); color: var(--brand); }
.wg-pill.on { border-color: var(--brand); color: var(--brand); background: var(--brand-l); }
.wg-dots { display: flex; gap: 3px; }
.wg-dots i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-2);
}
.wg-dots i.done { background: #93b8dd; }
.wg-dots i.cur { background: var(--brand); box-shadow: 0 0 0 2px rgba(37, 99, 168, .18); }

.wg-panel {
  position: absolute;
  left: 0;
  bottom: 42px;
  width: 348px;
  max-height: 66vh;
  overflow-y: auto;
  padding: 12px 14px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-pop);
}
.wg-h { display: flex; align-items: baseline; gap: 8px; }
.wg-step { font-size: 11.5px; font-weight: 700; color: var(--brand); }
.wg-min { flex: 1; font-size: 11.5px; color: var(--muted); }
.wg-x {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
}
.wg-x:hover { color: var(--brand); text-decoration: underline; }
.wg-t { margin-top: 3px; font-size: 15px; font-weight: 700; color: var(--ink); }
.wg-bar {
  height: 4px;
  margin: 8px 0 10px;
  border-radius: 2px;
  background: var(--gray-bg);
  overflow: hidden;
}
.wg-bar i { display: block; height: 100%; background: var(--brand); transition: width .2s; }
.wg-sec {
  margin: 10px 0 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: #33465c;
}
.wg-pages { display: flex; flex-wrap: wrap; gap: 5px; }
.wg-page {
  padding: 3px 9px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12px;
  text-decoration: none;
}
.wg-page:hover { border-color: var(--brand); color: var(--brand); }
.wg-page.on { border-color: var(--brand); background: var(--brand-l); color: var(--brand); font-weight: 600; }
.wg-points { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.wg-points li {
  position: relative;
  padding-left: 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.wg-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand);
}
.wg-ask {
  margin-top: 10px;
  padding: 8px 10px;
  border-left: 3px solid #d97706;
  border-radius: 0 6px 6px 0;
  background: #fffdf6;
  font-size: 12.5px;
  line-height: 1.65;
  color: #6b4a10;
}
.wg-f { display: flex; gap: 8px; margin-top: 10px; }
.wg-f .btn { flex: 1; height: 30px; font-size: 12px; }
.wg-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--muted);
}
.wg-foot .fb-link { margin-left: auto; }

/* ── 人员管理（identity）：当前操作人条 / 新增表单 / 角色多选 / 停用行 ── */
.who-link { color: var(--brand); text-decoration: none; font-weight: 600; }
.who-link:hover { text-decoration: underline; }
.staff-me {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
}
.staff-me-l { font-size: 12px; color: var(--muted); }
.staff-me strong { font-size: 14px; color: var(--ink); }
.staff-unset { color: #b45309; font-weight: 600; }
.staff-me label { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.hint { font-size: 12px; color: var(--muted); }
.staff-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  padding: 14px 16px;
}
.staff-form-h { grid-column: 1 / -1; font-weight: 600; font-size: 13px; color: var(--ink); }
.staff-form > label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
/* 角色行独占整行；"启用"回一行横排（不被 .staff-form > label 的竖向布局压成上下叠） */
.staff-form > .role-pick { grid-column: 1 / -1; }
.staff-form > .staff-active { flex-direction: row; align-items: center; gap: 6px; color: var(--ink-2); }
.staff-active { flex-direction: row; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.staff-form-f { grid-column: 1 / -1; display: flex; gap: 8px; }
.role-pick { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.role-box { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
.staff-user { color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.staff-badge {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--brand-l);
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
}
.staff-off td { opacity: .6; }

/* SC1：单字代号列（排班格上显示的就是这个字）与三段式编辑面板 */
.staff-initial {
  display: inline-block;
  min-width: 22px;
  text-align: center;
  font-weight: 700;
  color: var(--ink);
}
.staff-initial.miss { color: var(--muted); font-weight: 400; }
.staff-initial + .aux { margin-left: 4px; }
.staff-edit-row > td { background: var(--bg-2, #f8fafc); }
.staff-panel { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
.staff-sec {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0;
  padding: 8px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.staff-sec > legend { padding: 0 6px; font-size: 12px; color: var(--muted); }
.staff-sec > label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.staff-form > .staff-sec { grid-column: 1 / -1; }
.perm-pick { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.perm-box { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-2); }

/* 纸面单授权矩阵（2026-11-05）：七张单 × 三个动作。
   一格三态——继承（灰底）/ 加授（绿）/ 停授（红）。
   为什么按钮里既写符号又写文字：光有 ✓/✕ 分不清"角色给的"还是"单独加的"，
   而这两件事在追责时完全不是一回事。 */
.perm-panel { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.perm-h { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-2); }
/* 选择器带 table. 前缀：基类 `table.grid, table.tbl { width:100% }` 是元素+类（0,1,1），
   只写 .perm-tbl（0,1,0）压不住，矩阵会被拉成整屏宽、三列各自漂到很远。 */
table.perm-tbl { width: auto; min-width: 520px; align-self: flex-start; }
table.perm-tbl th[scope="row"] { text-align: left; white-space: nowrap; font-weight: 600; }
table.perm-tbl thead th { text-align: center; }
table.perm-tbl td { text-align: center; }
.perm-cell {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--line, #e2e8f0); background: #fff;
  font-size: 12px; color: var(--ink-2); line-height: 1.4;
}
.perm-cell span { font-size: 11px; opacity: .85; }
.perm-cell.is-inherit { background: #f8fafc; color: var(--muted, #64748b); }
.perm-cell.is-grant { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.perm-cell.is-deny { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.perm-cell:disabled { cursor: not-allowed; opacity: .6; }
.perm-role td { font-size: 11.5px; white-space: nowrap; }
.perm-role td.is-grant { background: #ecfdf5; color: #047857; }
.perm-role td.is-inherit { color: var(--muted, #64748b); }

/* ── 定位申请单 A4 纸面（fb-184）────────────────────────────────────────────
   纸的规则跟屏幕是两套：这里按 mm 定尺寸、按 pt 定字号，屏上给阴影模拟纸张，
   打印时（@media print）把外壳全部收掉，只留这张纸。 */
.sheetwrap { margin: 0 0 18px; }
.sheettools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.danger:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
.chip.warn { color: var(--bad); border-color: var(--bad); }
.a4 {
  width: 210mm;
  min-height: 297mm;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 16mm 14mm;
  background: #fff;
  color: #111827;
  font-size: 12.5px;
  line-height: 1.75;
  box-shadow: 0 2px 14px rgba(15, 23, 42, .18);
  border: 1px solid #d8dde6;
}
.a4-hd { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 8px; border-bottom: 2px solid #111827; }
.a4-hosp { font-size: 11.5px; color: #4b5563; flex: 0 0 auto; padding-top: 6px; }
.a4-title { flex: 1 1 auto; margin: 0; text-align: center; font-size: 20px; font-weight: 700; letter-spacing: 3px; }
.a4-no { flex: 0 0 auto; text-align: right; font-size: 11.5px; color: #374151; line-height: 1.5; }
.a4-id { width: 100%; border-collapse: collapse; margin-top: 10px; }
.a4-id th, .a4-id td { border: 1px solid #374151; padding: 5px 8px; text-align: left; }
.a4-id th { width: 16mm; background: #f3f4f6; text-align: center; font-weight: 600; }
.a4-tbl { width: 100%; border-collapse: collapse; margin-top: -1px; table-layout: fixed; }
.a4-tbl th, .a4-tbl td { border: 1px solid #374151; padding: 6px 8px; vertical-align: top; }
.a4-tbl th { width: 26mm; background: #f3f4f6; text-align: center; font-weight: 600; }
.a4-tbl .a4-multiline { display: block; min-height: 42px; white-space: pre-wrap; }
.a4-tbl .inp { width: 100%; box-sizing: border-box; }
.a4-tbl .dictpick { width: 100%; }
.a4-sign { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 18px; font-size: 12px; }
.a4-note { margin-top: 14px; padding-top: 8px; border-top: 1px dashed #9ca3af; font-size: 11px; color: #4b5563; }

@media print {
  @page { size: A4; margin: 12mm; }
  .sidebar, .topbar, .sheettools, .page > h2, .page > .chip, .card { display: none !important; }
  .app, .main, .content, .page, .sheetwrap { display: block !important; margin: 0 !important; padding: 0 !important; max-width: none !important; background: #fff !important; }
  .a4 { width: auto; min-height: 0; margin: 0; padding: 0; border: none; box-shadow: none; font-size: 11.5pt; }
  [data-fb-sdk] { display: none !important; }
}

/* ── 侧边栏「当前患者」（fb-194）：常驻显示在谁的病例里，切换新开标签页 ── */
.cpat { margin: 10px 12px 4px; padding: 9px 10px; border-radius: 10px; background: rgba(255,255,255,.08); }
.cpat-hd { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cpat-t { font-size: 11.5px; letter-spacing: .5px; opacity: .78; }
.cpat-sw {
  border: none; background: transparent; color: inherit; font-size: 11.5px;
  padding: 1px 6px; border-radius: 6px; cursor: pointer; opacity: .9;
}
.cpat-sw:hover { background: rgba(255,255,255,.16); }
.cpat-card { margin-top: 6px; }
.cpat-name { font-size: 15px; font-weight: 600; line-height: 1.3; }
.cpat-meta { font-size: 11.5px; opacity: .8; margin-top: 2px; }
.cpat-card.is-empty { font-size: 12.5px; opacity: .7; }
.cpat-pick { margin-top: 8px; }
.cpat-pick .inp-wrap { width: 100%; }
.cpat-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cpat-item {
  width: 100%; display: flex; align-items: baseline; gap: 8px; text-align: left;
  border: none; background: rgba(255,255,255,.1); color: inherit;
  border-radius: 7px; padding: 5px 8px; cursor: pointer; font-size: 12.5px;
}
.cpat-item:hover { background: rgba(255,255,255,.2); }
.cpat-in { font-weight: 600; }
.cpat-im { opacity: .78; font-size: 11.5px; }
.cpat-hint { margin: 6px 0 0; font-size: 11.5px; opacity: .75; line-height: 1.5; }

/* ── 排程日视图（fb-197）：行=时段 列=设备 ── */
.dvw { overflow-x: auto; }
/* 列宽固定：时段 66px，其余设备列均分（默认 auto 布局会按内容撑宽，
   一台机器排得多就比别人宽，看着像两台机器规格不同） */
.dvw-tbl { min-width: 520px; table-layout: fixed; }
.dvw-tbl thead th:first-child { width: 66px; }
.dvw-tbl th.dvw-time { width: 66px; font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 500; text-align: right; padding-right: 10px; }
/* 日视图是"一屏看完一天"，行必须比普通表格密：30 分钟一格 ≈ 26px，
   整点行压一条实线（.dvw-hour）当小时分隔，眼睛不必逐行读时间 */
.dvw-tbl td.dvw-cell { height: 26px; padding: 1px 6px; vertical-align: middle; }
.dvw-tbl tr.dvw-hour > th, .dvw-tbl tr.dvw-hour > td { border-top: 1px solid var(--line-2); }
.dvw-cell.is-busy { background: var(--brand-l, #eef4ff); }
.dvw-apt {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 1px 7px; border-radius: 999px; margin-right: 4px;
  font-size: 12px; font-weight: 600; color: #fff; background: var(--brand, #2563eb);
}
.dvw-apt em { font-style: normal; font-weight: 400; opacity: .8; font-size: 11px; }
.dvw-apt.st-finished { background: #6b7280; }
.dvw-apt.st-cancelled { background: #9ca3af; text-decoration: line-through; }
.dvw-apt.st-late, .dvw-apt.st-broke { background: #b45309; }
.dvw-apt.st-pause { background: #7c3aed; }

/* ── 计划申请单（fb-188）：顶部平铺信息 / 下面整宽剂量（与纸面单同一套排法）── */
.plan-page .plan-split { display: block; }
.plan-page .plan-col {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px; align-items: start; margin-bottom: 14px;
}
.plan-page .plan-col > .plan-card { margin-bottom: 0; }
.plan-page .plan-col-wide { display: flex; flex-direction: column; align-items: stretch; }
.plan-page .plan-col-wide > * { min-width: 0; }
.plan-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.plan-card h3 { margin: 0 0 10px; }
.plan-card .pid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.plan-diag { display: flex; gap: 8px; margin: 6px 0; font-size: 13px; }
/* 诊断 | 疗程 同一行：疗程短（C1/C2），诊断长，给诊断让位 */
.plan-diag-row { display: flex; gap: 16px; align-items: baseline; }
.plan-diag-row > .plan-diag { margin: 0; min-width: 0; }
.plan-diag-row > .plan-diag:first-child { flex: 1 1 auto; }
.plan-diag-row > .plan-diag:last-child { flex: 0 0 auto; white-space: nowrap; }
.plan-diag .v { min-width: 0; overflow-wrap: anywhere; }
.plan-diag .fk { color: var(--ink-2); min-width: 34px; }
/* 双备注：标签在上、框占满整行——横排标签吃掉 128px 后，380px 的左栏只剩 200px 给正文 */
.plan-note { display: block; margin-top: 8px; }
/* 标签压到控件上方 = 整行左对齐；不覆盖 .frow > .fk 的右对齐会让标签飘到右端（fb-157 实测） */
.plan-note > .fk { display: block; margin-bottom: 3px; font-size: 12px; color: var(--ink-2); text-align: left; }
.plan-note > .inp { width: 100%; box-sizing: border-box; }
/* 处方八项：4 列 × 2 行，标签压在控件上方。
   为什么不做"标签在左"：.frow 的标签列固定 128px，四列摊下来每个下拉只剩 70px，
   浏览器原生 select 不会打省略号，「（未指定）」直接被裁成「（未指」——实拍发现后改的。 */
/* 2026-11-04：纸面改成整宽后，固定 4 列会把 9 个字段摊成三行；按可用宽自适应，全宽时一行六格 */
.plan-req-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 12px; }
.plan-req-grid .frow { grid-template-columns: minmax(0, 1fr); gap: 3px; margin: 0; align-items: stretch; }
.plan-req-grid .frow > .fk { text-align: left; font-size: 12px; }
.plan-req-grid .inp { width: 100%; box-sizing: border-box; }
.plan-dose { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 0; font-size: 13px; }
.plan-impl { font-size: 13px; }
.plan-impl th { width: 84px; color: var(--ink-2); font-weight: 500; background: var(--faint); }
.plan-impl th, .plan-impl td { padding: 5px 8px; }
.plan-steps { list-style: none; margin: 0; padding: 0; }
.plan-step {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center; gap: 8px; padding: 5px 0;
  border-bottom: 1px dashed var(--line); font-size: 12.5px;
}
.plan-step:last-child { border-bottom: none; }
.plan-step-no {
  width: 18px; height: 18px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 11px;
  background: var(--line-2); color: #fff;
}
.plan-step.is-done .plan-step-no { background: var(--brand); }
.plan-step-name { color: var(--ink-2); }
.plan-step.is-done .plan-step-name { color: var(--ink); font-weight: 600; }
.plan-step-meta { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.plan-progress-count { margin-left: 8px; font-size: 11.5px; }
.plan-list tr.is-sel td { background: var(--brand-l, #eef4ff); }
.plan-tbl-wrap { overflow-x: auto; }
/* fb-7087（2026-11-18）：14 列压到 A4 纸宽时不再靠 min-width 撑出横向滚动条。
   靶区表已改成「每个处方两行」（六向 Margin 落第二行），列数降到 8；
   OAR 表同理收紧。真要溢出时 .plan-tbl-wrap 仍可横向滚动兜底。 */
.plan-tbl { min-width: 0; width: 100%; }
/* 14 列塞在 912px 的右栏里：单元格左右各留 6px 会白吃掉 180px，六向 Margin 和「删」就被挤到滚动区外。
   收到 2px 刚好装得下——这是数据网格，不是正文。
   注意选择器要写全 table.plan-tbl（不是 .plan-tbl）：通用表格是 table.grid th（0,1,2），
   只写 .plan-tbl th（0,1,1）权重不够，样式会被通用规则吃掉——这条踩过一次。 */
table.plan-tbl th, table.plan-tbl td { padding: 4px 2px; white-space: nowrap; }
.plan-tbl .btn { padding: 0 6px; }
.plan-cell { padding: 4px 6px; font-size: 12.5px; }
.plan-rx-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding: 10px 12px; }
.plan-rx-form .frow { margin: 0; width: 120px; }
.plan-rx-form .frow:first-child { width: 180px; }

/* ── 分期字典（fb-157）：左侧体系清单 + 右侧判定条件，患者详情里复用同一张表样式 ── */
.chip.ok { color: var(--ok); border-color: var(--ok-line); background: var(--ok-bg); }
.chip.off { color: var(--muted); background: var(--gray-bg); border-color: var(--line-2); }
/* 表格内副文本（体系版本/病种/录入人）：.aux 原本只在 .panel > .ph 下有线，表格里得单独给 */
.aux { font-size: 11.5px; color: var(--muted); }
.stg-split { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; align-items: start; }
.stg-side { display: flex; flex-direction: column; gap: 6px; }
.stg-item {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  text-align: left; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: var(--radius-s); background: var(--card); cursor: pointer;
}
.stg-item:hover { border-color: var(--brand); }
.stg-item.on { border-color: var(--brand); background: var(--brand-l); }
.stg-item-name { font-weight: 600; font-size: 13px; color: var(--ink); }
.stg-item-meta { font-size: 11.5px; color: var(--muted); }
.stg-main { min-width: 0; overflow-wrap: anywhere; }
.stg-title { margin: 0 0 4px; font-size: 15px; display: flex; align-items: baseline; gap: 8px; }
.stg-title .aux { font-weight: 400; }
.stg-sub { margin: 14px 0 6px; font-size: 13px; color: var(--ink-2); }
/* 判定条件是这一页的主体：允许换行、不 nowrap（与靶区表相反——那是数据网格，这是正文） */
table.stg-tbl { width: 100%; }
table.stg-tbl th, table.stg-tbl td {
  padding: 5px 8px; font-size: 12.5px; vertical-align: top; white-space: normal;
}
/* 操作列不折行（「作废重录」断成两行按钮会变形），窄屏靠外层 wrap 横滚兜住 */
table.stg-tbl th:last-child, table.stg-tbl td:last-child { white-space: nowrap; }
.stg-tbl-wrap { overflow-x: auto; }
.stg-def { margin: 8px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-2);
  background: var(--faint); border-left: 3px solid var(--brand); padding: 6px 10px; border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.stg-def-inline { color: var(--muted); }
.stg-fields { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.7; }
.stg-fields strong { margin: 0 6px 0 4px; }
.stg-form, .stg-void { margin: 8px 0 12px; padding: 10px 12px; background: var(--faint); border: 1px solid var(--line); border-radius: var(--radius-s); }
/* 录入表单在 grid 里：备注横跨整行（否则 .plan-note 的 display:block 落进单元格，
   标签压在上行、输入框甩到下一列，实测就是这样错位的） */
.stg-form .fgrid { max-width: 980px; }
.stg-form .fgrid > .plan-note, .stg-void > .plan-note { grid-column: 1 / -1; }
.hint.en { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; }

/* ── 排班网格（C4 重做）：左时间栏 × 5 个时段位，格内四角 + 五档底色 ──
   为什么自己写 grid 而不用 table.grid：一格要放五行内容（姓名/分次/代号/技术/定位），
   table 的单元格会让长姓名把列撑变形；固定列宽 + 横向滚动才能保证"一屏扫下来对齐"。
   配色优先级（灰>绿>黄>粉>白）由 lib/schedule-colors 判定，样式只负责上色。 */
.sched-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 14px; }
.sched-bar .frow { margin: 0; }
.sched-date { display: inline-flex; align-items: center; gap: 6px; }
.sched-date .inp { width: 148px; }
.sched-stats { display: inline-flex; align-items: baseline; gap: 6px; margin-left: auto; font-size: 12px; color: var(--muted); }
.sched-stats b { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 8px; }
.sched-stats em { font-style: normal; }
.sched-card { padding: 0; overflow: hidden; }

.sched-grid { display: grid; grid-template-columns: 96px repeat(5, minmax(132px, 1fr)); min-width: 760px; }
.sched-head { display: contents; }
.sched-th {
  padding: 7px 8px; font-size: 12px; font-weight: 600; color: var(--ink-2);
  background: var(--faint); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  text-align: center;
}
.sched-th.time { text-align: left; padding-left: 10px; }
.sched-row { display: contents; }
.sched-time {
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  padding: 4px 6px 4px 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  background: var(--faint);
}
.sc-time {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--brand); text-align: left;
  font-variant-numeric: tabular-nums;
}
.sc-time:hover { text-decoration: underline; }
.sc-time.static { color: var(--ink); cursor: default; }
.sc-custom {
  font-style: normal; font-size: 10px; color: var(--warn); margin-left: 4px;
  border: 1px solid var(--warn-line); background: var(--warn-bg); border-radius: 3px; padding: 0 3px;
}
.sc-end { font-style: normal; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 格：position:relative 给气泡与动作区做锚点；min-height 让整行等高 */
/* fb-6772：只看某一条治疗时，其他格暗下去但仍可点（机器占用要看得见） */
/* 聚焦模式（fb-6772）里不是这条治疗的格暗下去。
   filter 只挂在格内主体上：格子本身带 filter 会成为 fixed 后代的包含块，
   气泡就会被按格子坐标定位（贴着格子而不是视口）——看起来像气泡错位。 */
.sched-cell.is-dim { opacity: .35; }
.sched-cell.is-dim .sc-body { filter: grayscale(.5); }

.sched-cell {
  position: relative; min-height: 58px;
  border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  background: var(--card);
}
/* 2026-11-18（走查者，照协和 CCIP 排班表）：底色只三档——白 / 绿（已治）/ 灰（禁排）。
   "这格归不归我管"改由左上角小红方块表达，不再占用底色。 */
.sched-cell.tone-plain { background: #fff; }
.sched-cell.tone-done { background: #cbead6; }           /* 绿：已排入且今天做完了 */
.sched-cell.tone-locked {                                /* 灰：锁定不可排（斜纹提示"别动"） */
  background: repeating-linear-gradient(135deg, #f1f4f8, #f1f4f8 6px, #e9eef5 6px, #e9eef5 12px);
}
.sc-body {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto;
  gap: 1px 6px; width: 100%; height: 100%; min-height: 62px;
  padding: 5px 7px; border: 0; background: none; text-align: left; cursor: pointer;
  font: inherit; color: inherit;
}
.sched-cell.tone-locked .sc-body { cursor: not-allowed; }
.sc-name {
  grid-area: 1 / 1; display: flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 小红方块：登录人就是这条疗程的三名医生之一 */
.sc-dot { flex: none; width: 7px; height: 7px; border-radius: 1px; background: #dc2626; }
.sc-frac { grid-area: 1 / 2; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sc-doc { grid-area: 2 / 1; font-size: 11.5px; color: var(--ink-2); letter-spacing: .5px; }
/* 右下：体位固定装置 */
.sc-fix { grid-area: 2 / 2; justify-self: end; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
/* 第三行居中：特殊治疗技术 */
.sc-tech {
  grid-area: 3 / 1 / 4 / 3; justify-self: center; align-self: end;
  font-size: 10.5px; color: var(--bad); font-weight: 600;
}
.sc-lock {
  position: absolute; top: 3px; right: 3px; z-index: 2;
  font-size: 10px; color: var(--ink-2); background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line-2); border-radius: 3px; padding: 0 3px; line-height: 14px;
}
.sc-actions {
  position: absolute; left: 5px; bottom: 3px; z-index: 2;
  display: none; gap: 4px;
}
.sched-cell:hover .sc-actions, .sched-cell:focus-within .sc-actions { display: flex; }
/* fb-4151：锁定格的「解锁」常显——原来只在 hover 时出现，鼠标移过去的路上它就没了，
   看起来就是"点了没反应"。锁定的格本来就该一眼看到怎么解。 */
.sched-cell.tone-locked .sc-actions { display: flex; }
.sc-act {
  font: inherit; font-size: 10.5px; line-height: 16px; padding: 0 5px;
  border: 1px solid var(--line-2); border-radius: 3px; background: var(--card);
  color: var(--ink-2); cursor: pointer;
}
.sc-act:hover { border-color: var(--brand); color: var(--brand); }

/* fb-1307：设备窗口不足 24 行时的留白行——刻度不编造，只把位置留出来 */
.sched-row.is-blank .sc-time.static { color: var(--line-2); font-weight: 400; }
.sched-row.is-blank .sched-cell { background: repeating-linear-gradient(
  135deg, var(--card), var(--card) 8px, var(--faint) 8px, var(--faint) 16px); }

/* fb-1302：可拖拽的格给抓手光标，拖起来的格半透明表示"正在搬运" */
.sched-cell .sc-body[draggable="true"] { cursor: grab; }
.sched-cell.is-dragging { opacity: .45; }
.sched-cell.is-dragging .sc-body { cursor: grabbing; }

/* fb-1299：编辑态弹层顶部显示"当前是谁"，避免医生改完才发现改错了格 */
.assign-current {
  margin: 0 0 8px; font-size: 12px; color: var(--ink-2);
  padding: 5px 8px; border-radius: 5px; background: var(--faint);
}
.sc-act[disabled] { opacity: .5; cursor: not-allowed; }

/* 悬浮气泡：**半透明**窗——底下的格子要能透出来（"这格排了谁、周围排了谁"的上下文不能丢）。
   位置由 JS 在进格那一刻算好（position: fixed），不走"挂格子下方"的绝对定位：
   .sched-card 是 overflow:hidden，最右一列的气泡会被卡片右边界切一截、最下一行整块看不见。
   显隐仍由 CSS 的 :hover/:focus-within 管——键盘 Tab 与自动化断言都拿得到内容。 */
.sched-tip {
  position: fixed; z-index: 35;
  width: 240px; padding: 8px 10px; border-radius: var(--radius-s);
  background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(6px) saturate(1.2);
  backdrop-filter: blur(6px) saturate(1.2);
  border: 1px solid rgba(148, 163, 184, .6);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .18);
  visibility: hidden; opacity: 0; transition: opacity .08s linear;
  font-size: 12px; text-align: left; pointer-events: none;
}
.sched-cell:hover .sched-tip, .sched-cell:focus-within .sched-tip { visibility: visible; opacity: 1; }
.sched-tip-name { font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.sched-tip-row { display: flex; gap: 6px; line-height: 1.5; }
.sched-tip-k { flex: none; width: 30px; color: var(--muted); }
.sched-tip-v { color: var(--ink-2); word-break: break-word; }

/* 弹层（时段编辑 / 排患者）：贴在页面底部而不是遮罩居中——排班要边看网格边改 */
.slot-editor, .assign-dialog, .partial-note {
  margin: 10px 0 0; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--brand-l, #cfe0f5); border-left: 3px solid var(--brand);
  border-radius: var(--radius-s); box-shadow: var(--shadow);
}
/* fb-1299：点格弹出的排程界面必须"就近可见"。
   上面那条是流式（margin-top），24 行网格里点 07:00 的格，界面出现在 1900px 之外的页尾——
   医生点完以为没反应，得先滚到底才知道弹出来了。固定成右上浮动卡：
   点任何格都在同一处出现，且不遮住当前列的上下文（遮罩会挡住"这个格周围排了谁"）。 */
.assign-dialog {
  position: fixed; top: 84px; right: 24px; width: 340px; margin: 0; z-index: 40;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .18);
}
.slot-editor-title, .assign-title, .partial-note-title {
  margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink);
}
.slot-mode { display: flex; gap: 16px; flex-wrap: wrap; margin: 6px 0 2px; font-size: 12.5px; color: var(--ink-2); }
.slot-mode label { display: inline-flex; align-items: center; gap: 5px; }
.slot-editor-error, .assign-error, .partial-note-hint { margin: 6px 0 0; font-size: 12px; color: var(--bad); }
.partial-note-hint { color: var(--muted); }
.slot-editor-actions, .assign-actions, .partial-note-actions { display: flex; gap: 8px; margin-top: 10px; }
/* fb-2766：已排格操作窗比排入弹层多一个按钮（保存修改 / 取消排程 / 进入定位执行 / 关闭），
   340px 一行放不下，最后一个按钮会被挤出卡片外；放宽到 400px 并允许换行。 */
.ct-menu { width: 400px; }
.ct-menu .assign-actions { flex-wrap: wrap; }
.exec-actions { display: flex; gap: 8px; margin: 0 16px 16px; }
.rec-partial td { background: var(--warn-bg); }
.rec-note { display: block; font-size: 11px; color: var(--warn); margin-top: 2px; }

/* PT2：疗程检索点进来的落点卡——高亮一圈，医生一眼看出"就是这一次" */
.panel.is-focus { box-shadow: 0 0 0 2px var(--brand), 0 2px 10px rgba(37, 99, 168, 0.12); }

/* ══════════ SM1/SM2 断层图示（fb-280 / fb-283） ══════════ */
.bsd { display: block; width: auto; height: auto; max-width: 100%; background: #fbfcfe; border: 1px solid var(--line); border-radius: var(--radius-s); }
/* 2026-11-02：换成走查者提供的解剖图（位图），fill / stroke 对 <image> 不生效，这里只管整体浓淡 */
.bsd-body { opacity: 0.9; }
.bsd-band { fill: rgba(37, 99, 168, 0.20); stroke: rgba(37, 99, 168, 0.55); stroke-width: 1; pointer-events: none; }
.bsd-line { stroke: var(--brand); stroke-width: 2.4; stroke-linecap: round; }
.bsd-grip { fill: var(--brand); stroke: #fff; stroke-width: 1.6; }
.bsd-handle:focus { outline: none; }
.bsd-handle:focus-visible .bsd-line { stroke: #1d4ed8; stroke-width: 3.4; }
.bsd-handle.is-ro .bsd-line { stroke: #4b5563; }
.bsd-handle.is-ro .bsd-grip { fill: #4b5563; }
.bsd-vw { font-size: 12px; fill: var(--muted); }

/* fb-3558（2026-11-05）：图示靠右、其余靠左。原来图示独占一整行（屏显 360px / 纸面 180px 高），
   一张定位单为它多翻一页；并排后左栏那几行正好填满图示的高度。
   用 grid 的第二列 auto 而不是固定像素：图示宽度由 svg 自己决定，改高度时不用跟着调列宽。 */
/* 2026-11-17：三列——扫描参数 | 解剖图 | 层厚/扫描方式/运动管理/增强说明（原先这四项压在图下面） */
/* 2026-11-17 定稿：两列（扫描参数+四字段 | 图）——四字段放左列下方那片空白里，2×2 排 */
/* 2026-11-17 定稿：两列（扫描参数+四字段 | 图）。左列拉伸到与图同高，
   参数在上、四字段在下——四字段正好落在图左侧中部那片空白里 */
.scan-field { margin: 4px 0 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 14px; align-items: stretch; }
/* 四字段跟在扫描范围后面正常流；行高压到 26px，左列总高才装得进图的高度 */
.scan-left .frow { height: 26px; }
.scan-left .inp { height: 24px; }
.scan-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 14px; margin: auto 0 0; }
.scan-extra .frow { height: 26px; }
.scan-extra .inp { height: 24px; }
.scan-extra .frow { display: flex; align-items: center; gap: 6px; }
.scan-extra .fk { flex: 0 0 auto; white-space: nowrap; }
.scan-extra .inp { flex: 1 1 auto; min-width: 0; }
.scan-left { display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; }
/* 左列里那句「图示：距颅顶 Xcm → Ycm」与图上刻度重复，且占掉四字段要用的高度 */
.scan-left > .hint { display: none; }
/* 2026-11-17：常用套餐挪到扫描范围下面单独一行，这里只留上界/下界两格 */
.scan-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.scan-body { display: flex; justify-content: center; }
.scan-text { margin-top: 0; }
.scan-ro { text-align: center; }
.scan-ro-txt { margin: 6px 0 0; font-size: 12px; color: var(--ink-2); }

/* A4 纸面：左参数表 + 右断层图示（打印同构） */
.a4-body { display: grid; grid-template-columns: minmax(0, 1fr) 62mm; gap: 0; align-items: start; }
.a4-fig { border: 1px solid #374151; border-left: none; padding: 6px 4px; text-align: center; }
.a4-fig-hd { font-size: 11.5px; font-weight: 600; color: #374151; border-bottom: 1px solid #d1d5db; padding-bottom: 4px; margin-bottom: 6px; }
.a4-fig .bsd { background: #fff; border: none; }
.a4-exec-note { font-size: 11.5px; color: #374151; margin: 6px 0 0; }
@media print {
  .a4-body { grid-template-columns: minmax(0, 1fr) 58mm; }
}

/* 定位页：左侧列表模块 + 右侧工作区（SM6②） */
.sim-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; align-items: start; }
.sim-list { margin: 0; }
.sim-list .tbl { margin: 0 12px 12px; }
.sim-ops { display: flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 1100px) { .sim-layout { grid-template-columns: 1fr; } }

/* 执行完成弹层（SM6③）：与时段编辑器同款内联卡片 */
.exec-dialog { margin: 10px 0 0; padding: 12px 14px; background: var(--card); border: 1px solid var(--brand-l, #cfe0f5); border-left: 3px solid var(--brand); border-radius: var(--radius-s); box-shadow: var(--shadow); }
.exec-dialog-title { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.exec-dialog-actions { display: flex; gap: 8px; margin-top: 10px; }

/* 限量三段（PL5）+ 限定值单位继承（PL6）：三段挤在一格里，靠 flex 收窄而不是换行。
   fb-3595（2026-11-05）：行高从 42 收到 34——之前 34px 的控件 + 上下各 4px 内边距，
   一屏看不全两条限值；现在控件 28、单元格上下 3，一行 34。
   fb-3613/3617 之后**每段都禁压缩**（flex: 0 0 auto）：宽度是有临床含义的
   （"cGy" 这类单位名要看得全），不能因为表格要挤就先拿它们开刀——
   之前 62px 的指标单位被压到 41px，结果连 "cGy" 都显示不全，走查者以为控件坏了。 */
.oar-metric { display: flex; align-items: center; gap: 3px; }
/* fb-4188：统计量没有数值——用静态标记代替"改不了的输入框"，一眼看出不用填 */
.oar-metric > .oar-metric-novalue {
  width: 52px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  color: #9ca3af; font-size: 12px; background: #f3f4f6;
  border: 1px dashed var(--line-2); border-radius: 4px;
}
.oar-limit { display: flex; align-items: center; gap: 3px; }
.oar-metric > *, .oar-limit > * { flex: 0 0 auto; }
/* 选择器必须带父级（0,2,0）压过 `input.inp { width: 100% }`（0,1,1）——
   只写 .oar-metric-kind 时宽度不生效，flex-basis:auto 回退到 width:100%，
   三段各占满 205px 把格子撑爆（这条只在这一版实测才暴露）。 */
.oar-metric > .oar-metric-kind { width: 74px; }
.oar-metric > .oar-metric-value { width: 50px; text-align: right; }
.oar-metric > .oar-metric-unit { width: 58px; }
.oar-metric-raw { font-size: 11px; color: #92400e; white-space: nowrap; }
.oar-limit > .oar-limit-value { width: 56px; text-align: right; }
.oar-limit > .oar-limit-unit { width: 64px; }
/* 只标「继承」，不再标「已改写」（fb-3620）：手工覆盖是正常动作，不是要被复审的异常 */
/* 固定 26px：带「继承」的行和不带的行业不能因此抖动，也不该把「限定值」列撑出滚动条 */
/* 2026-11-18：「继承」小标已去掉（单位按类型给默认，每行都命中，标了没信息量），
   样式一并删掉；.oar-unit-tag 若还有别处在用，加回来即可。 */

/* 关系三选一（fb-3629）：原来是被挤到 34×34 的 <select>，走查者点了以为没反应。
   三个按钮段把选项直接摆在纸面上——不用展开、不用瞄准，打印出来也读得出是不超过还是不低于。 */
.rel-seg { display: inline-flex; height: 28px; border: 1px solid var(--line-2); border-radius: var(--radius-s); overflow: hidden; background: #fff; }
.rel-seg-btn { width: 20px; padding: 0; border: 0; border-left: 1px solid var(--line-2); background: #fff; color: var(--ink-2); font-size: 12px; line-height: 1; cursor: pointer; }
.rel-seg-btn:first-child { border-left: 0; }
.rel-seg-btn:hover:not(:disabled) { background: var(--brand-l, #eef4ff); }
.rel-seg-btn.is-on { background: var(--brand); color: #fff; font-weight: 600; }
.rel-seg-btn:disabled { cursor: not-allowed; opacity: .55; }

/* OAR 表整行紧凑（fb-3595）：只在含限量三段的表上生效，别动到处方靶区表 */
table.plan-tbl:has(.oar-metric) td { padding: 3px 2px; }
table.plan-tbl:has(.oar-metric) input.inp,
table.plan-tbl:has(.oar-metric) select.inp,
table.plan-tbl:has(.oar-metric) .plan-cell { height: 28px; font-size: 12px; }

/* fb-3707：纸面单里「靶区处方剂量」数据行的字比表头小一圈——
   `.step-sheet .inp` 通用把输入框压成 7.5pt(≈10px)，而表头仍是 13px，同一行读起来是两种字号。
   只给靶区表调回 12px：OAR 表带 .oar-metric，继续走上面那条紧凑规则，两边互不牵动。 */
.step-sheet table.plan-tbl:not(:has(.oar-metric)) .plan-cell { font-size: 12px; }

/* 处方靶区（PL3/PL9）：第 1 行即处方剂量 —— 用底色与徽标把"这一行是主剂量"钉住 */
.rx-targets .is-primary { background: #f1f7ff; }
.rx-targets .is-drop { outline: 2px dashed var(--brand); outline-offset: -2px; }
.rx-handle { white-space: nowrap; }
.rx-drag { cursor: grab; border: 1px solid #cbd5e1; background: #fff; border-radius: 3px; padding: 0 3px; font-size: 11px; line-height: 16px; color: #475569; }
.rx-drag:disabled { cursor: not-allowed; color: #cbd5e1; border-color: #e5e7eb; }
.rx-sortno { font-size: 11px; color: #64748b; margin-left: 2px; }
.rx-primary-tag { display: inline-block; margin-left: 4px; font-size: 10.5px; color: #1e40af; background: #dbeafe; border-radius: 3px; padding: 0 3px; }
.rx-total { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* fb-2843/2849：单次剂量是派生的只读值，总量后面跟死单位 cGy（单位列已拿掉） */
.rx-single { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; color: #0f172a; }
.rx-unit { margin-left: 3px; font-size: 11.5px; color: #64748b; }
.rx-ops { white-space: nowrap; }

/* 锁定态（WF4）：横幅要显眼但不能像报错 */
.chip-lock { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; margin: 6px 0; }
.chip-err { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.chip-ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; }

/* 模板中心（PL2/PL9）：三块勾选横排，勾选状态直接对应导出文件的键 */
.plan-template .tpl-blocks { display: flex; gap: 14px; flex-wrap: wrap; margin: 6px 0 8px; }
.plan-template .tpl-block { display: flex; align-items: center; gap: 4px; font-size: 12.5px; }
.plan-template .tpl-count { color: #94a3b8; font-size: 11px; }
.tpl-actions { display: flex; gap: 8px; align-items: center; }
.tpl-file { display: none; }
.tpl-confirm { margin: 10px 0 0; padding: 10px 12px; background: #fffbeb; border: 1px solid #fcd34d; border-left: 3px solid #f59e0b; border-radius: var(--radius-s); }
.tpl-confirm-title { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: #92400e; }
.tpl-confirm-actions { display: flex; gap: 8px; margin-top: 8px; }

/* 直接提交处方（PL8）：七格两列，比原来那张"新建勾画任务"窄一半 */
.plan-submit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin-bottom: 8px; }
.plan-submit .hint { margin: 6px 0 0; }

/* PL7 版本回退：与 WF3「回退到上一步」不共用样式（这是处方版本，不是流程节点） */
.btn-rx-rollback { border-color: #c7d2fe; color: #3730a3; background: #eef2ff; }

/* ── 治疗执行页（批 6 TX1~TX5）──────────────────────────────────────────────
   一屏一位患者：头部信息块 + 本次治疗录入卡 + 记录表。
   头部用 dl 而不是再开一张表：它是"读一眼"的信息，不需要对齐到列宽。 */
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--faint); color: var(--ink); }
.tx-head { padding: 14px 16px; }
.tx-head-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tx-head-title h3 { margin: 0; font-size: 17px; }
.tx-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 4px 18px; margin: 10px 0 0; }
.tx-meta > div { display: flex; gap: 6px; align-items: baseline; font-size: 13px; min-width: 0; }
.tx-meta dt { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.tx-meta dd { margin: 0; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.tx-head-actions { display: flex; gap: 8px; margin-top: 12px; }
.tx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2px 14px; margin: 4px 16px 8px; }
.tx-cumulative { margin: 4px 16px 10px; padding: 8px 12px; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: var(--radius-s); font-size: 13px; color: #1e293b; }
.tx-cumulative strong { font-size: 16px; color: #1d4ed8; }
.tx-cumulative-note { color: var(--muted); font-size: 12px; }

/* ── 治疗单页（TX6）：可打印的纸面 ─────────────────────────────────────────
   与定位申请单同一套纸面规则：屏上给白底阴影，打印时把壳与工具条收掉只留纸。 */
.sheet-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
/* 2026-11-09 走查者：所有表单 A4 竖置，内容没排满也要显示整张纸（所见即所得）。
   min-height 297mm 而不是 height：内容超过一页时卡片照旧长出去（分页标记另有机制），
   不会把内容裁掉。box-sizing 全局是 border-box，所以 297mm 含 padding。 */
.sheet-card { max-width: 210mm; min-height: 297mm; margin: 0 auto 20px; padding: 14mm 12mm; background: #fff; color: #111827; border: 1px solid #d8dde6; border-radius: 4px; box-shadow: 0 2px 14px rgba(15, 23, 42, .16); }
.sheet-head { border-bottom: 2px solid #111827; padding-bottom: 6px; margin-bottom: 10px; }
.sheet-head h2 { margin: 0; text-align: center; font-size: 19px; letter-spacing: 3px; }
.sheet-head p { margin: 4px 0 0; text-align: center; font-size: 12.5px; color: #374151; }
.sheet-meta { margin-top: 0; }

/* ── 治疗单（2026-11-20 按 kimioutput/d 参考稿改版）──────────
   版式全部走 paper.css 的 A4 规范类（.doc-org/.doc-title/.doc-sub/.doc-info/
   .sec/.drow/.dtable/.doc-cont/.flow-rec/.doc-foot），这里只留治疗单自己的三件事：
   纸内边距、页眉右侧照片位、纸外操作按钮。
   原来的 tx-form/tx-info/tx-brief/tx-plan/tx-sec/tx-sub/tx-plan-image/tx-photo-inline
   等密排表样式随组件一起退场（CCIP 复印件那套与系统其他单不是一个家族）。 */
.tx-sheet { padding: 10mm 9mm; position: relative; }
/* 页眉三层纸头；右侧留 24mm 给患者照片（fb-4131 / 2026-11-20 走查者要求右上角必须有照片）。
   照片 26mm 高比三层纸头（约 20mm）高，纸头 min-height 跟着长，
   否则照片会压到下面的 .doc-info 信息栏上。 */
.tx-doc-head { position: relative; padding-right: 24mm; margin-bottom: 10px; min-height: 27mm; }
.tx-photo-head {
  position: absolute; right: 0; top: 0; width: 22mm; height: 26mm;
  object-fit: cover; border: 1px solid #374151; background: #fff;
}
/* 没拍过照：虚线占位框（纸上这块本来就要贴照片，空着像漏印） */
.tx-photo-head.is-empty {
  display: flex; align-items: center; justify-content: center;
  border-style: dashed; border-color: #9ca3af; color: #9ca3af;
  font-size: 10px; letter-spacing: 1px;
}
/* fb-4356：纸面右侧的操作按钮。不能用 flex 并排——纸面会被挤到 271px（本该 733px），
   表格每列都窄。按钮改悬浮，不参与布局。 */
.tx-sheet-with-actions { display: block; }
.tx-sheet-actions { position: fixed; right: 22px; top: 120px; z-index: 6; }
/* 台账预印空行必须等高：空单元格没有行盒，不钉 height 会塌成 5px（实测 35 行只剩 214px）。
   .dtable 的 padding 5/8 对 35 行太高，这里压到 2/6 并钉 22px 行高。 */
.tx-sheet .dtable.sheet-ledger th, .tx-sheet .dtable.sheet-ledger td {
  padding: 2px 6px; font-size: 11px; line-height: 1.5; height: 22px;
}
/* 部分完成那行要一眼看出来（黄底）；.dtable 隔行底色特异性更高，这里钉一道 */
.tx-sheet .dtable.sheet-ledger tr.rec-partial td { background: var(--warn-bg); }

/* fb-3765：治疗单的工具栏移到纸外右侧竖排，不占纸面宽度（纸是 A4，不能被按钮挤窄） */
.sheet-toolbar.side {
  position: fixed; right: 14px; top: 92px; z-index: 20;
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  width: 148px; margin: 0; padding: 10px; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 2px 10px rgba(15,23,42,.1);
}
.sheet-toolbar.side .btn { width: 100%; }

/* fb-3977：工作日日历（月历，7 列；白底=上班、灰底=休息） */.cal {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px; max-width: 640px; margin: 12px 0;
}
.cal-w { text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 2px; }
.cal-blank { min-height: 56px; }
.cal-d {
  position: relative; min-height: 56px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; color: var(--ink); font-size: 14px; cursor: pointer;
}
.cal-d.is-rest { background: #eef0f3; color: #6b7280; }
.cal-d.is-work:hover { background: #f6f9ff; }
.cal-d.is-rest:hover { background: #e3e7ec; }
.cal-d.is-today { outline: 2px solid #2563eb; outline-offset: 1px; }
.cal-n { position: absolute; left: 8px; top: 5px; font-variant-numeric: tabular-nums; }
.cal-dot { position: absolute; right: 8px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: #f59e0b; }

/* 录入区只在屏幕上出现（打印时 .no-print 已隐藏，这里再钉一道） */
.tx-entry { max-width: 210mm; margin: 0 auto 14px; }

@media print {
  .tx-sheet { break-after: page; }
  .tx-sheet:last-of-type { break-after: auto; }
}
.sheet-block { border: 1px solid #d1d5db; border-radius: 4px; padding: 8px 10px 10px; margin: 0 0 12px; }
.sheet-block > legend { padding: 0 6px; font-size: 12.5px; font-weight: 600; color: #374151; }
.sheet-block > .frow { margin: 0 0 6px; }
.sheet-subtitle { margin: 14px 0 6px; font-size: 13px; color: #374151; }
/* fb-3724：签署栏变成两段——本单必签行 + 全流程签名轨迹，所以外层改竖排 */
.sheet-sign { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; padding-top: 8px; border-top: 1px dashed #9ca3af; font-size: 12.5px; }
.sheet-sign-own { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
/* 轨迹：七张单逐个占位，日期紧跟签名（不写"日期："抬头）；未发生的名字位置是留白线 */
.sheet-sign-trail {
  list-style: none; margin: 2px 0 0; padding: 3px 0 0;
  border-top: 1px dotted #cbd5e1;
  display: flex; flex-wrap: wrap; gap: 1px 12px;
  font-size: .92em;
}
.sheet-sign-trail li { display: inline-flex; gap: 3px; align-items: baseline; white-space: nowrap; }
.sheet-sign-trail .tr-step { color: #6b7280; }
.sheet-sign-trail .tr-date { font-variant-numeric: tabular-nums; color: #4b5563; }

/* ── 环节纸面单（B 组五张，2026-11-03）────────────────────────────────────────
   走查者：「想直接生成表单，在留白处直接填」——纸就是表单：
   抬头（单据名）→ 身份条 → 正文章节 → 签署栏，四段与纸质单一一对应。
   fb-3104 后五个环节摆的都是同一张计划申请单（双栏大表），所以纸一律横版 297mm。 */
/* 2026-11-04 第三轮（走查者）：A4 改竖版。210mm 宽 = 794px，正文 734px。 */
/* 2026-11-17：白边从 10mm/8mm 收到 7mm/6mm，把省下的高度让给加大的字号 */
.step-sheet { margin: 0 auto; max-width: 210mm; padding: 7mm 6mm; }

/* 抬头+身份条的跨页载体（2026-11-04）：这张纸会随靶区/OAR 行数扩到第二页，
   浏览器分页时把 <thead> 带到每页页首，第二页才不是没姓名的散纸。
   表格只是一层壳，不许给它任何边框/内距，否则屏幕上的纸头会多一圈线。 */
.sheet-flow { width: 100%; table-layout: fixed; border-collapse: collapse; }
.sheet-flow > thead > tr > td,
.sheet-flow > tbody > tr > td { padding: 0; border: 0; vertical-align: top; }
.sheet-flow .a4-id { margin-bottom: 10px; }
/* 标签格按字宽自适应：定宽会把"治疗号"挤成两行（纸面上很难看） */
.sheet-flow .a4-id th { width: 1%; white-space: nowrap; }

/* 纸外侧面（2026-11-04 走查者：模板中心不打印，别占 A4 的高度）：
   **永远贴在纸右侧**——原来 flex-wrap 在 1700px 以下的窗口就会把侧栏折到纸下面，
   笔记本上看着就像"模板中心在纸下方"。改成不换行、纸让位（A4 宽度只是上限），
   侧栏按 clamp 收窄，纸多长它就跟多高（sticky）。打印时整块不出现。 */
.sheet-zone { display: flex; flex-wrap: nowrap; gap: 14px; align-items: flex-start; justify-content: center; }
/* 尺寸纪律（2026-11-09）：纸是 A4 竖版，宽就是 210mm，不随容器收缩。
   原来这条写的是 `flex: 0 1 297mm`（横版时代的基准 + 可收缩），竖版改造时漏改——
   窗口一窄，纸被压到 500 多像素，屏幕上看到的比例和打印出来的不是一张纸。 */
.sheet-zone > .sheet-card { flex: 0 0 210mm; width: 210mm; min-width: 0; }
.sheet-rail {
  flex: 0 0 clamp(220px, 20%, 320px); min-width: 0; align-self: flex-start;
  position: sticky; top: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.sheet-rail > .card { margin-bottom: 0; }
/* 侧栏第一格：打印入口（模板中心由纸里的组件 portal 进来，排在它下方） */
.sheet-rail-print { display: flex; flex-direction: column; gap: 4px; }
.sheet-rail-print .btn { width: 100%; }
.sheet-rail-print .hint { margin: 0; font-size: 11px; color: var(--ink-2); line-height: 1.35; }

/* 纸面里的申请单（2026-11-04 走查者第二版）：原来是"左窄栏信息 / 右宽栏剂量"，
   左栏只有一张患者卡+实施方式，底下大片空白全浪费；改成**顶部平铺、下面一律整宽**：
   患者基本信息 | 治疗实施方式 并排占满一行，剂量三表各占整行（表宽 880 正好舒展）。 */
.step-sheet .plan-split { display: block; }
.step-sheet .plan-col {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px; align-items: start; margin-bottom: 8px;
}
.step-sheet .plan-col > .plan-card { margin-bottom: 0; }
/* .plan-col-wide 也命中 .plan-col 的 align-items:start，不补 stretch 的话每张卡都按内容撑宽
   （计划基本信息 714、OAR 882，右边空一大截）；min-width:0 让表宽 880 肯退让、改由 wrap 滚动 */
.step-sheet .plan-col-wide { display: flex; flex-direction: column; gap: 0; align-items: stretch; }
.step-sheet .plan-col-wide > * { min-width: 0; }
/* 表宽 880 不再被窄栏挤压：wrap 必须真的被压到栏宽才会出横向滚动条，
   否则整张表撑破纸面（1022 宽的纸会把页面拉出横向滚动） */
.step-sheet .plan-tbl-wrap { max-width: 100%; }
/* 竖版纸只有 734px 正文：表按内容自适应（实测 729 刚好），别再留 880 的下限逼出内部滚动条 */
.step-sheet .plan-tbl { min-width: 0; }
.step-sheet .plan-card { margin-bottom: 8px; }
.step-sheet .plan-card > h3 { padding: 6px 10px; font-size: 12.5px; }
.step-sheet .plan-card > p,
.step-sheet .plan-card > label.frow,
.step-sheet .plan-card > .toolbar { margin-left: 10px; margin-right: 10px; }
.step-sheet .hint { margin: 4px 10px 6px; font-size: 11.5px; }

/* 双备注并排已随 fb-9883（统一备注流）删除——.plan-notes 外壳不再渲染（.plan-note 单数仍在别处用） */

/* 治疗实施方式：三列排（原来七行一行一项，白占半张纸） */
.plan-impl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 4px 10px; font-size: 12.5px; }
.plan-kv { display: flex; gap: 6px; min-width: 0; }
.plan-kv .k { flex: 0 0 auto; color: var(--ink-2); }
.plan-kv .v { min-width: 0; overflow-wrap: anywhere; }
/* 书写区：横线纸，不是网页输入框。行高与格线周期必须相等（28px） */
.sheet-write { border: 1px solid #d1d5db; border-radius: 3px; padding: 2px 8px; background: #fff; }
.sheet-write textarea {
  display: block; width: 100%; box-sizing: border-box; margin: 0; padding: 0; border: 0;
  font: inherit; font-size: 13px; line-height: 28px; color: #111827;
  background-color: transparent; resize: vertical; min-height: 84px;
  background-image: repeating-linear-gradient(transparent 0 27px, #e5e7eb 27px 28px);
  background-attachment: local;
}
.sheet-write textarea:focus { outline: none; }
.sheet-write textarea::placeholder { color: #9ca3af; }
.step-decision .frow { align-items: start; }
.step-decision .frow > .fk { padding-top: 6px; }
/* fb-9985（2026-11-21 走查）：「新备注」书写框要吃足 A4 纸宽——
   .paper .frow 是 flex，.sheet-write 不在拉伸名单里，textarea width:100%
   对不定宽父级退化成默认 cols（实测只 135px）。书写行改「标签在上、格框通栏」，
   与 fb-9979 内容框同口径。 */
.step-decision label.frow:has(> .sheet-write) { display: block; }
.step-decision label.frow:has(> .sheet-write) > .fk {
  display: block; width: auto; min-width: 0; text-align: left; padding-top: 0; margin-bottom: 2px;
}
.step-decision .sheet-write { width: 100%; }
/* fb-9883 统一备注流：迁移条目（原意见/医生备注/物理师备注）在前、本环节新备注在后；
   条目细线分隔，署名行（谁 · 何时）压小一号，正文保持纸面字号 */
.notes-flow { display: block; min-width: 0; }
.notes-flow > .hint { margin: 0; }
.note-item { margin: 0 0 4px; padding: 2px 0 4px; border-bottom: 1px solid #e5e7eb; }
.note-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.note-meta { display: block; font-size: 11px; color: var(--ink-2); }
.note-content { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }

/* ══════ 纸面排版（2026-11-05）：屏幕与打印同一套 ══════
   用户要求「计划申请单里靶区/OAR 多了超一页时，直接在显示界面就显示分页后的效果，实现所见即所得」。
   要所见即所得，屏幕与纸上的排版密度必须一样——屏幕 3 页、纸上 2 页等于没预览。
   所以把 @media print 里那套字号/间距**提到屏幕**（值逐条对齐，改一处必须两处同步）。
   为什么是复制而不是搬走：print 块里还混着「隐藏按钮/操作列/去装饰」的规则，
   整体搬家会让屏幕上的「删」「加器官」和只读提示一起消失，那就没法填单了。
   两处的值若有分歧，以本段为准（屏幕是常态，打印是它的投影）。
   纸内距也一并对齐：屏幕 padding 8mm ↔ 打印 @page margin 8mm + 卡片 padding 0，
   两边的可用内容区都是 194×281mm，分页位置才谈得上一致。 */
.step-sheet { padding: 8mm; font-size: 9pt; }
.step-sheet .sheet-head { padding-bottom: 2px; margin-bottom: 4px; }
.step-sheet .sheet-head h2 { font-size: 12pt; letter-spacing: 2px; }
.step-sheet .sheet-head p { font-size: 8pt; margin-top: 1px; }
.step-sheet .a4-id { margin-bottom: 3px; }
.step-sheet .a4-id th, .step-sheet .a4-id td { padding: 1px 5px; font-size: 8.5pt; }
.step-sheet .pid { margin-bottom: 2px; gap: 2px 12px; }
.step-sheet .pid dt { font-size: 7.5pt; }
.step-sheet .pid dd { font-size: 8.5pt; }
.step-sheet .plan-diag { margin: 0; font-size: 7.5pt; }
.step-sheet .plan-req-grid { gap: 2px 8px; }
.step-sheet .plan-req-grid .frow > .fk { font-size: 7pt; }
.step-sheet .plan-split { gap: 8px; }
.step-sheet .plan-col { gap: 4px; }
.step-sheet .plan-card { margin-bottom: 3px; }
.step-sheet .plan-card > h3 { padding: 1px 6px; font-size: 8.5pt; line-height: 1.25; }
.step-sheet .tbl th, .step-sheet .tbl td { padding: 1px 4px; font-size: 7.5pt; }
/* 2026-11-17：走查者说输入字太小——7.5pt(≈10px) 提到 9pt(≈12px)，与表头 13px 接近 */
.step-sheet .inp, .step-sheet select { font-size: 9pt; padding: 1px 4px; height: auto; min-height: 0; }
.step-sheet .plan-tbl { min-width: 0; width: 100%; }
.step-sheet .plan-tbl-wrap { overflow: visible; }
.step-sheet .sheet-block { padding: 3px 6px 4px; margin-bottom: 5px; }
.step-sheet .sheet-block > legend { font-size: 8.5pt; }
.step-sheet .step-decision .frow { margin-bottom: 2px; }
.step-sheet .step-fs { padding: 4px 8px 1px; margin-bottom: 2px; }
.step-sheet .step-fs legend { font-size: 8.5pt; line-height: 1.1; }
.step-sheet .step-form .fgrid { gap: 0 10px; }
.step-sheet .scan-field { gap: 0 10px; }
.step-sheet .scan-left { gap: 3px; }
.step-sheet .scan-picks { gap: 3px 8px; }
.step-sheet .scan-body { padding: 0; }
/* 2026-11-17：解剖图放大（走查者要求）——原来固定 180px，四行扫描参数因此贴着图底 */
/* 2026-11-17：解剖图放大到 320px（原 180）——420 时宽度到 266px，把左边扫描字段挤成一溜小格 */
.step-sheet .scan-body svg { height: 230px; width: auto; }
.step-sheet .sheet-write textarea {
  min-height: 32px; line-height: 16px;
  background-image: repeating-linear-gradient(transparent 0 15px, #e5e7eb 15px 16px);
}
.step-sheet .sheet-sign { margin-top: 2px; padding-top: 1px; font-size: 8pt; }

.sheet-body { display: block; }
/* 纸边是 DOM 里的一条真元素（.sheet-cut），不是伪元素：断在表格行上时 `tr` 的 margin 不生效、
   `::before` 也不渲染，只靠属性时屏幕上看不到任何分页痕迹（页数对、纸边没有）。
   屏幕显示，打印与量高一律 display:none。 */
.sheet-cut { display: none; }

@media screen {
  .sheet-body .sheet-cut {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    margin: 6px 0;
    background: #eef2f7;
    border-top: 1px solid #d7dee8;
    border-bottom: 1px solid #d7dee8;
    font-size: 11px;
    letter-spacing: 1px;
    color: #64748b;
  }
  /* 表格行里的纸边要插 <tr>：div 塞进 tbody 会被浏览器挪到表外，纸边就跑到表格上面去了 */
  .sheet-body tr.sheet-cut { display: table-row; }
  .sheet-body tr.sheet-cut > td {
    height: 34px;
    padding: 0;
    text-align: center;
    vertical-align: middle;
    background: #eef2f7;
    border-top: 1px solid #d7dee8;
    border-bottom: 1px solid #d7dee8;
    font-size: 11px;
    letter-spacing: 1px;
    color: #64748b;
  }
}

/* 量纸面密度用的临时类（2026-11-05）：只在 JS 读高度的几毫秒里挂上，用户看不见。
   为什么要它：屏幕上有提示条、标签、操作列、按钮，纸上一律没有，内距与字号也不一样，
   实测同一张单屏幕比纸高 578px（半页多）——直接拿屏幕高度算页数会多报一页。
   所以量高度时先把纸面的"减法"做一遍，量完立刻摘掉。
   **内距不要跟着清成 0**：纸的 8mm 白边由 @page 页边距提供，正文宽同样是 194mm；
   一旦把纸上内距清零，屏幕正文就比纸宽 59px、行被压扁，反而量不准。
   **改 @media print 里任何影响高度/宽度/字号的规则，必须回来同步这一段**，否则页数又对不上。 */
/* display:block 是必须的：屏幕上的 .sheet-zone 是 flex 容器，卡片宽度由 flex-basis:297mm 决定，
   `width` 管不了它——实测量高时正文宽 1123px（而不是 194mm 的 733px），
   场格按 7 列排、卡片矮了 38px，整张单因此少数三行器官。纸上 .sheet-zone 本来就是 block。 */
.sheet-measure { font-size: 11pt !important; display: block !important; }
.sheet-measure .step-sheet { width: 194mm !important; flex: 0 0 auto !important; }
/* 上面这条 width 是关键：打印时纸的内距归零、白边由 @page 的 8mm 提供，正文宽正好 194mm。
   不把宽度钉成 194mm，镜像进来的 `.step-sheet { padding: 0 }` 会让正文比纸宽 60px，
   行内文字少折一行，量出来就偏矮。钉住之后 pageHeightOf(194mm) 正好是 281mm 的纸高。 */
.sheet-measure .hint,
.sheet-measure .chip,
.sheet-measure .btn,
.sheet-measure .tpl-actions,
.sheet-measure .plan-rx-form,
.sheet-measure .plan-tbl button { display: none !important; }
.sheet-measure .plan-tbl > thead > tr > th:last-child,
.sheet-measure .plan-tbl > tbody > tr > td:last-child { display: none !important; }
/* 屏幕上这三张表靠横向滚动（min-width 880），纸上按纸宽重排——量高度时也要重排，
   否则列的换行不一样，行高就不是纸上的行高 */
.sheet-measure .plan-tbl { min-width: 0 !important; width: 100% !important; }
.sheet-measure .plan-tbl-wrap { overflow: visible !important; }
/* 屏幕上的纸边（34px 灰带 + 上下 6px 间距）纸上是没有的，量高度时它本身就已经被摘掉了；
   这一条是兜底：万一有残留的纸边，也不许算进纸面高度，否则每断一页就多算 46px */
.sheet-measure .sheet-cut { display: none !important; }

@media print {
  /* 环节纸面单是竖版 A4（2026-11-04 走查者） */
  @page { size: A4 portrait; margin: 8mm; }
  /* 别用命名页（`page: step-sheet-a4`）给这张纸"圈地"——它是"屏上一页、打印两页"的最后一个真凶：
     命名页与默认页不同名时，两者的交界处会**强制断页**。纸后面的任何盒子（浮层、空占位、脚本插入的
     1px 块，哪怕 display 在屏幕上看着没用）一旦落在默认页上，浏览器就为它另开一页，
     而那一页什么内容都没有 → 内容流只有 1 字节的纯空白页。
     实测（2026-11-04）：在纸后插一个 1px 块，页数 1→2；同一处改成 page:auto，页数回到 1。 */
  .sheet-zone > .step-sheet { page: auto; }
  .sheet-zone { display: block; }
  /* 兜底：纸之后的任何兄弟块都不许进纸（同页多一个盒子 = 多一张白纸） */
  .sheet-zone ~ *, .app ~ *, body > *:not(#root) { display: none !important; }
  .sheet-rail { display: none !important; }
  .tabstrip { display: none !important; }
  /* 悬浮件一律不许进纸（2026-11-04，第二条导致"假第二页"的路子）：
     .wg（走查向导）是 position:fixed 贴窗口底部。窗口比纸张高时（常见于 1080p 以上屏幕，
     窗口 1200~1300px > 页面框 1061px），它被排到页面框之外，
     浏览器为放下它多开一页——纸内只有 2/3、页数却是 2，正是这个现象。 */
  .wg, .fb-badge, .fb-panel, .fb-toast, .toast, .dictmenu, .modal-backdrop { display: none !important; }
  /* 「屏上一页、打印两页」的真凶（2026-11-04 修复）：
     .app { min-height: 100vh } 在分页媒体里按**页高**解析，整篇被撑到页面框边缘。
     页面框 281mm 与 100vh 只要差一点（浏览器扣页眉页脚、mm→px 舍入），
     超出的那几像素就单独占第二页，而纸内其实只有 204mm 内容。打印时不许有视口高。 */
  html, body { height: auto; min-height: 0; }
  /* 纸以外的壳层不许印出灰底：body 的 --bg 在纸上会变成纸底一条灰带（2026-11-04 实测） */
  html, body, .app, .main, .content, .page, .page.task-step > .panel { background: #fff !important; }
  .app { min-height: 0; }
  .main { min-height: 0; }
  /* 纸框交给 @page 的 8mm 页边距：卡片自己再留 10mm 内距就是双份白边，
     而且跨页时那一圈边框会在页缝处断开，很难看 */
  .step-sheet { padding: 0; border: none; box-shadow: none; background: none; }
  /* 分页：靶区/OAR 多到十几行时这张纸自动扩到第二页（走查者 2026-11-04）。
     小格子卡片整块不拆；带剂量表的卡片必须允许拆——实测 16 行时"整块不拆"会把
     一张 409px 的表整个推到下一页，16 行要印成 3 页；允许拆后是 2 页。
     行本身不拆（`tr` 的 break-inside:avoid），表头由它自己的 <thead> 带到下一页；
     纸头在 .sheet-flow 的 <thead> 里，每页页首都会重印。 */
  .step-sheet .card { break-inside: avoid; }
  .step-sheet .plan-card:has(.plan-tbl) { break-inside: auto; }
  .step-sheet .plan-tbl tr { break-inside: avoid; }
  .step-sheet .sheet-sign { break-inside: avoid; }
  .sheet-flow > thead > tr > td { break-inside: avoid; }
  /* 环节页只印那张纸：页头、患者条、进度条、保存与签字条、提示条都不印 */
  .page.task-step > .page-title,
  .page.task-step > .task-step-ctx,
  .page.task-step > .step-track,
  .page.task-step > .toolbar,
  .page.task-step > .hint,
  .page.task-step > .step-sign,
  .page.task-step > .panel > .ph { display: none !important; }
  .page.task-step > .panel { border: none; box-shadow: none; margin: 0; }
  .page.task-step > .panel > .pb { padding: 0; }
  /* 上面那条全局 .card{display:none}（为定位申请单写的）会把申请单里的卡片一起藏掉 */
  .step-sheet .card { display: block !important; }
  /* 一页 A4 横版要装下整张申请单：纸上按 8~9pt、2px 行距收紧（屏幕尺寸不受影响） */
  .step-sheet { font-size: 9pt; }
  .step-sheet .sheet-head { padding-bottom: 2px; margin-bottom: 4px; }
  .step-sheet .sheet-head h2 { font-size: 12pt; letter-spacing: 2px; }
  .step-sheet .sheet-head p { font-size: 8pt; margin-top: 1px; }
  /* 屏幕上"本环节可编辑"的提示不属于这张纸，打印时整条不印 */
  .step-sheet .plan-review > .chip, .step-sheet .chip { display: none !important; }
  .step-sheet .plan-req-grid { gap: 2px 8px; }
  .step-sheet .plan-req-grid .frow > .fk { font-size: 7pt; }
  /* 屏幕上这三张表靠横向滚动（min-width: 880），打印没有滚动条 —— 直接按纸宽重排，否则右列被裁 */
  .step-sheet .plan-tbl { min-width: 0; width: 100%; }
  .step-sheet .plan-tbl-wrap { overflow: visible; }
  /* 「操作」列（空输入框 + 删除/新增按钮）是交互控件，纸上没意义：整列不印，腾出的宽度给备注 */
  .step-sheet .plan-tbl > thead > tr > th:last-child,
  .step-sheet .plan-tbl > tbody > tr > td:last-child,
  .step-sheet .plan-tbl button { display: none !important; }
  .step-sheet .pid { gap: 2px 12px; margin-bottom: 4px; }
  .step-sheet .pid dt { font-size: 7.5pt; }
  .step-sheet .pid dd { font-size: 8.5pt; }
  .step-sheet .a4-id { margin-bottom: 6px; }
  .step-sheet .a4-id th, .step-sheet .a4-id td { padding: 2px 5px; font-size: 8.5pt; }
  .step-sheet .plan-split { gap: 8px; }
  .step-sheet .plan-col { gap: 4px; }
  .step-sheet .plan-card { margin-bottom: 3px; }
  .step-sheet .plan-card > h3 { padding: 3px 6px; font-size: 9pt; }
  .step-sheet .tbl th, .step-sheet .tbl td { padding: 1px 4px; font-size: 7.5pt; }
  /* 2026-11-17：走查者说输入字太小——7.5pt(≈10px) 提到 9pt(≈12px)，与表头 13px 接近 */
.step-sheet .inp, .step-sheet select { font-size: 9pt; padding: 1px 4px; height: auto; min-height: 0; }
  .step-sheet .plan-diag { margin: 1px 0; font-size: 7.5pt; }
  .step-sheet .hint, .step-sheet .btn, .step-sheet .tpl-actions { display: none !important; }
  .step-sheet .plan-card > h3 { padding: 2px 6px; font-size: 8.5pt; }
  .step-sheet .sheet-block { padding: 3px 6px 4px; margin-bottom: 5px; }
  .step-sheet .sheet-block > legend { font-size: 8.5pt; }
  .step-sheet .step-decision .frow { margin-bottom: 2px; }
  /* 定位申请/执行单（2026-11-04）：分节框收内距，人体示意图在纸上不必占 300px */
  /* 2026-11-05：定位执行单比申请单多一块「与申请不一致」，纸面 1032px 顶到页底，
     签署栏被挤到第 2 页（一页纸两页签，纸上不能这么签）。分节间距与图例行高各收一点，
     省出约 30px 让它回到一页；字号一点没动（字号见小是另一个待定项）。 */
  .step-sheet .step-fs { padding: 4px 8px 1px; margin-bottom: 2px; }
  .step-sheet .step-fs legend { font-size: 8.5pt; line-height: 1.1; }
  .step-sheet .step-form .fgrid { gap: 0 10px; }
  /* fb-3558 之后左栏是 flex 列：间距走 gap，不再用 margin-bottom */
  .step-sheet .scan-field { gap: 0 10px; }
  .step-sheet .scan-left { gap: 3px; }
  .step-sheet .scan-picks { gap: 3px 8px; }
  .step-sheet .scan-body { padding: 0; }
  /* 2026-11-05：200→180px。执行单的差一块「与申请不一致」，纸面只剩 3px 余量时
     任何一行多出来的字都会把签署栏顶到第 2 页；示意图收 20px 换出稳定余量。 */
  /* 2026-11-17：解剖图放大（走查者要求）——原来固定 180px，四行扫描参数因此贴着图底 */
/* 2026-11-17：解剖图放大到 320px（原 180）——420 时宽度到 266px，把左边扫描字段挤成一溜小格 */
.step-sheet .scan-body svg { height: 230px; width: auto; }
  /* 顶部平铺后正文比原来长（左右分栏没了），再挤掉三处纯屏上元素才装得回一页：
     ① 处方流转按钮行（提交处方/回退到上一版）② 身份条下边距 ③ 卡片标题行高 */
  .step-sheet .plan-rx-form { display: none !important; }
  .sheet-flow .a4-id { margin-bottom: 3px; }
  .step-sheet .plan-card > h3 { padding: 1px 6px; line-height: 1.25; }
  /* 再挤 10px：身份条内距、诊断/疗程行距——都是一眼看不出的地方 */
  .step-sheet .a4-id th, .step-sheet .a4-id td { padding: 1px 5px; }
  .step-sheet .plan-diag { margin: 0; }
  .step-sheet .pid { margin-bottom: 2px; }

  .step-sheet .sheet-write textarea {
    min-height: 32px; line-height: 16px;
    background-image: repeating-linear-gradient(transparent 0 15px, #e5e7eb 15px 16px);
  }
  .step-sheet .sheet-sign { margin-top: 2px; padding-top: 1px; font-size: 8pt; }

  .no-print, .sheet-toolbar, [data-fb-sdk], .sheet-page-cut { display: none !important; }
  .sheet-page { display: block !important; margin: 0 !important; padding: 0 !important; max-width: none !important; background: #fff !important; }
  .sheet-page > .chip { display: none !important; }
  .sheet-card { max-width: none; min-height: 0; margin: 0; padding: 0; border: none; box-shadow: none; border-radius: 0; font-size: 11pt; }
  .sheet-block { break-inside: avoid; }
  .sheet-ledger { break-inside: auto; }
  .tx-grid { margin-left: 0; margin-right: 0; }
}

/* ══════════ 批A（2026-10-30）：门户 + 模块子导航 + 模块上下文条 ══════════ */

/* 门户卡片（ONIS 桌面形态）：大图标 + 模块名 + 一行说明 */
.portal { max-width: 1080px; }
.portal-sub { margin: 4px 0 18px; color: var(--ink-2, #475569); font-size: 13px; }
.portal-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.portal-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 18px; border: 1px solid var(--line, #e2e8f0); border-radius: 12px;
  background: var(--card, #fff); text-decoration: none; color: var(--ink, #0f172a);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06); transition: box-shadow .15s, transform .15s;
}
.portal-card:hover { box-shadow: 0 6px 18px rgba(15, 23, 42, .14); transform: translateY(-2px); }
.portal-icon { font-size: 30px; line-height: 1; }
.portal-label { font-size: 16px; font-weight: 600; }
.portal-desc { font-size: 12.5px; color: var(--muted, #64748b); }
.portal-foot { margin-top: 18px; display: flex; gap: 14px; }
.portal-card.is-small { flex-direction: row; align-items: center; padding: 12px 16px; }
.portal-card.is-small .portal-icon { font-size: 20px; }

/* 模块内子导航的「‹ 门户」返回链接 */
.ngtitle .nhome { margin-right: 8px; color: var(--brand, #2563a8); text-decoration: none; font-size: 12px; }
.ngtitle .nhome:hover { text-decoration: underline; }

/* 模块上下文条：患者相关页顶栏「页面标题 — 患者姓名（性别·年龄·病案号）」 */
.modbar { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.modbar-title { font-weight: 600; }
.modbar-sep { color: var(--muted, #94a3b8); }
.modbar-switch { position: relative; }
.modbar-patient {
  display: inline-flex; align-items: baseline; gap: 8px; cursor: pointer;
  padding: 4px 12px; border-radius: 8px; background: var(--brand-bg, #eff6ff);
  border: 1px solid var(--brand-l, #cfe0f5); list-style: none;
}
.modbar-patient::-webkit-details-marker { display: none; }
.modbar-patient:hover { background: var(--brand-l, #dbeafe); }
.modbar-patient.is-empty {
  text-decoration: none; color: var(--brand, #2563a8); background: none; border-style: dashed;
  font-size: 13px;
}
.modbar-meta { font-size: 12.5px; color: var(--ink-2, #475569); font-weight: 400; }
.modbar-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  width: 300px; padding: 10px; background: var(--card, #fff);
  border: 1px solid var(--line, #e2e8f0); border-radius: 10px; box-shadow: 0 10px 30px rgba(15,23,42,.16);
}
.modbar-kw { width: 100%; }
.modbar-hint { margin: 8px 2px 0; font-size: 12px; color: var(--muted, #64748b); }
.modbar-hits { list-style: none; margin: 8px 0 0; padding: 0; max-height: 240px; overflow: auto; }
.modbar-hits li + li { border-top: 1px solid var(--line, #f1f5f9); }
.modbar-hits a {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 7px 6px; text-decoration: none; color: var(--ink, #0f172a); font-size: 13px;
}
.modbar-hits a:hover { background: var(--brand-bg, #f0f6ff); border-radius: 6px; }
.modbar-hits span { font-size: 12px; color: var(--muted, #64748b); }

/* fb-1987：治疗进度三态——进行中（蓝空心高亮）/ 未激活（降透明度）/ 已完成（既有蓝实心） */
.tp-node.is-active .tp-dot {
  border-color: var(--brand); color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-bg, #eff6ff);
}
.tp-node.is-active .tp-name { color: var(--brand); font-weight: 600; }
.tp-node.is-active .tp-who { color: var(--brand); font-weight: 500; }
.tp-node.is-pending { opacity: .55; }
.tp-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tp-node.is-done .tp-link:hover .tp-name,
.tp-node.is-active .tp-link:hover .tp-name { text-decoration: underline; }

/* fb-1981：患者照片位（信息块左侧小方图）与拍照弹层 */
.pphoto { float: right; margin-left: 14px; }
.pphoto-img {
  width: 84px; height: 84px; border-radius: 10px; object-fit: cover;
  border: 1px solid var(--line, #e2e8f0); cursor: pointer; display: block;
}
.pphoto-empty {
  width: 84px; height: 84px; border-radius: 10px; border: 1px dashed var(--line-2, #cbd5e1);
  background: var(--bg, #f8fafc); color: var(--muted, #64748b); font-size: 13px; cursor: pointer;
}
.pphoto-dialog {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, .45);
}
.pphoto-body {
  background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 16px 48px rgba(15,23,42,.3);
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.pphoto-video, .pphoto-preview { width: 320px; height: 320px; border-radius: 8px; background: #0f172a; object-fit: cover; }
.pphoto-actions { display: flex; gap: 8px; }

/* fb-1970 → 2026-11-02 重做：定位排程改成 OIS「CT定位时间安排」那种网格表
   行=时间格（设备窗口 × 时间格长度），列=周一～周五（可开周末），
   左侧「项次」按小时合并；一格一人，格内三行：姓名+号码 / 技师·体位 / 诊断。 */
.ctgrid {
  width: 100%; border-collapse: collapse; margin-top: 10px; background: #fff;
  table-layout: fixed; font-size: 12.5px;
}
.ctgrid-cap { caption-side: top; padding: 6px 0 10px; text-align: center; }
.ctgrid-title { display: block; font-size: 17px; font-weight: 700; letter-spacing: .5px; color: var(--ink); }
.ctgrid-range {
  display: block; margin-top: 6px; font-size: 13px; color: var(--ink-2);
  border-bottom: 1px solid var(--ink-2); padding-bottom: 4px;
}
.ctgrid th, .ctgrid td { border: 1px solid var(--line, #e2e8f0); padding: 0; vertical-align: middle; }
.ctgrid thead th { background: var(--faint); font-weight: 600; padding: 5px 6px; text-align: center; }
.ctgrid thead .ctgrid-time { width: 62px; }
.ctgrid-date { font-weight: 500; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ctgrid thead th.is-today { color: var(--brand); box-shadow: inset 0 -2px 0 var(--brand); }
.ctgrid-hour {
  width: 62px; background: var(--faint); text-align: center; font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--ink-2); padding: 6px 4px;
}
.ctgrid td { height: 46px; }
.ctgrid td.is-today { background: #f7fbff; }
.ctgrid td.is-past { background: #fafafa; }
/* 格：按钮本体，三行信息竖排 */
.ct-cell {
  display: flex; flex-direction: column; gap: 1px; width: 100%; height: 100%;
  border: 0; background: none; font-family: inherit; font-size: 12.5px; text-align: left;
  padding: 4px 6px; cursor: pointer; color: inherit; line-height: 1.35;
}
.ct-cell.is-empty { color: var(--line-2, #cbd5e1); align-items: center; justify-content: center; font-size: 15px; }
.ct-cell.is-empty:hover { color: var(--brand); background: var(--brand-bg, #f0f6ff); }
.ct-cell:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
/* 2026-11-18（走查者）：状态看底色——「待定位」白底，「定位已完成」绿底。
   原来是"已排=浅绿、已完成=再深一点"，两者差别不明显，走查时看不出谁做完了。 */
.ct-cell.is-booked { background: #fff; }
.ct-cell.is-booked:hover { box-shadow: inset 0 0 0 1px var(--brand); }
.ct-cell.is-done { background: #cbead6; }
.ct-cell.is-cancelled { background: #f4f4f5; color: var(--muted); }
.ct-cell.is-cancelled .ct-l1 b { text-decoration: line-through; }
.ct-l1 { display: flex; justify-content: space-between; gap: 4px; }
.ct-l1 b { font-weight: 600; }
.ct-l1 i { font-style: normal; font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ct-l2 { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px; color: var(--brand); }
.ct-l2 .ct-docpair { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ct-l3 { font-size: 11.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 拖拽的三个视觉反馈（2026-11-05 走查者："CT 定位的排程还不能拖动"）：
   手势本来就有，但 .ct-ghost 只有内联的 left/top、**没有任何定位声明**，等于一个静态块躺在
   表格下面不动；is-dragging / is-drop 也只给治疗排程写过样式。所以拖起来屏幕上什么都不变，
   看着就像"不能拖"。下面三条是拖拽的可见证据：幽灵跟手、源格变淡、目标格描边。 */
.ct-ghost {
  position: fixed; z-index: 9999; pointer-events: none;
  max-width: 280px; padding: 5px 11px; border-radius: 999px;
  background: var(--navy, #1e293b); color: #fff; font-size: 12px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .3);
}
.ct-cell.is-booked { cursor: grab; }
.ct-cell.is-dragging { opacity: .38; cursor: grabbing; }
.ctgrid td.is-drop { background: var(--brand-bg, #f0f6ff); outline: 2px dashed var(--brand); outline-offset: -2px; }

/* ── 计划申请：五签条（2026-10-30 fb-2074） ─────────────────────────────
   不是装饰性进度条——每格就是该步的操作入口。已完成为实心绿、当前步为品牌蓝高亮、
   未轮到为灰；格子里的"角色 + 签名人 + 时间"回答了"这一步该谁、签了没有"。 */
.pflow-wrap { margin: 10px 0 14px; }
.pflow { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.pflow-list { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.pflow-step {
  flex: 1 1 168px; min-width: 168px; display: flex; gap: 8px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px; background: var(--faint);
  position: relative;
}
.pflow-step.is-current { border-color: var(--brand); background: var(--brand-l); box-shadow: inset 0 0 0 1px var(--brand); }
.pflow-step.is-done { border-color: var(--ok-line); background: var(--ok-bg); }
.pf-dot {
  flex: 0 0 20px; width: 20px; height: 20px; line-height: 19px; text-align: center; border-radius: 50%;
  font-size: 12px; font-weight: 700; color: #fff; background: var(--muted);
}
.pflow-step.is-current .pf-dot { background: var(--brand); }
.pflow-step.is-done .pf-dot { background: var(--ok); }
.pf-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pf-name { font-size: 13px; color: var(--ink); }
.pf-role { font-size: 11px; color: var(--brand); }
.pflow-step.is-pending .pf-role { color: var(--muted); }
.pf-sign { font-size: 12px; color: var(--ink-2); }
.pf-time { font-size: 11px; color: var(--muted); }
.pf-acts { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 4px; }
.pf-acts .btn { padding: 3px 8px; font-size: 12px; }
.pf-gate { position: absolute; left: 10px; bottom: -18px; font-size: 11px; color: var(--warn); }
.pflow-now { margin: 8px 2px 0; font-size: 13px; color: var(--ink-2); }
.pflow-now.is-done { color: var(--ok); }

/* ── 顶部选项卡（fb-2062）：桌面固定第一格 + 患者页新增格，可关闭切换，4 小时窗口 ── */
.tabstrip {
  flex: none;
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 0 14px;
  background: #fbfcfe;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
  /* fb-2465：走查者要求「状态栏不要随鼠标向下滚动而消失，始终位于顶部」——
     顶栏自己 sticky 在 0，选项卡贴住顶栏下沿（z-index 比顶栏低一档，滚动时不盖住它） */
  position: sticky;
  top: var(--topbar-h);
  z-index: 9;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 240px;
  padding: 7px 10px 6px;
  font-size: 12.5px;
  color: var(--ink-2, #44506a);
  text-decoration: none;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  white-space: nowrap;
  position: relative;
  top: 1px;
}
.tab:hover { background: #eef2f8; }
.tab.on {
  background: #fff;
  border-color: var(--line);
  color: var(--brand);
  font-weight: 600;
}
.tab.is-pinned { color: var(--brand); font-weight: 600; }
.tab-link { color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.tab-x {
  border: none;
  background: transparent;
  color: var(--muted, #8894a8);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  border-radius: 4px;
}
.tab-x:hover { background: #e6ecf5; color: #c0392b; }

/* ══════════ 环节表单（2026-11-02：七个环节七张独立单 + 签字/撤回） ══════════ */
.task-step-ctx { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.task-step-ctx span {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 10px; font-size: 12.5px; color: var(--ink-2);
}

/* 九节点进度：点哪个进哪张单 */
.step-track { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 14px; }
.step-track-i { flex: 1 1 104px; }
.step-track-a {
  display: flex; flex-direction: column; gap: 1px; padding: 7px 9px;
  border: 1px solid var(--line); border-radius: var(--radius-s);
  background: #fff; text-decoration: none; color: inherit;
}
.step-track-n { font-size: 11px; color: #9aa4b2; }
.step-track-t { font-weight: 600; font-size: 12.5px; }
.step-track-s { font-size: 11px; color: var(--ink-2); }
.step-track-i.is-finished .step-track-a { border-color: #b9d8c2; background: #f3faf5; }
.step-track-i.is-processing .step-track-a { border-color: var(--brand); background: #eef4fc; }
.step-track-i.is-on .step-track-a { box-shadow: inset 0 0 0 2px rgba(37, 99, 168, 0.35); }

/* 表单分节 */
.step-form .step-fs {
  border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 10px 12px 4px; margin: 0 0 12px; background: #fff;
}
.step-form .step-fs legend { font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 0 6px; }
.step-form .fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 16px; }

/* 「本环节需核对」的只读表 */
.step-up { width: 100%; }
.step-up th {
  width: 110px; text-align: left; font-weight: 500; color: var(--ink-2);
  font-size: 12.5px; padding: 4px 8px; background: #fafbfc;
}
.step-up td { padding: 4px 8px; font-size: 12.5px; }

/* 同意 / 不同意 */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.seg-i { padding: 5px 14px; background: #fff; border: none; cursor: pointer; font-size: 12.5px; color: var(--ink-2); }
.seg-i.on { background: var(--brand); color: #fff; }
.seg-i:disabled { cursor: not-allowed; opacity: 0.6; }

/* 签字栏 */
.step-sign {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 12px 0 4px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff;
}
.step-sign-info { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.step-sign-step { font-weight: 700; }
.step-sign-role { color: var(--ink-2); }
.step-sign-done { color: #1f5d3a; }
.step-sign-deny { color: #8a1f1f; }

/* ── DVH 卡片（2026-11-09）：质量条 / 曲线 / 指标表 / 提示清单 ──────────────
   曲线图宽度吃满卡片（viewBox + width:100%），但纸宽下要能收住——
   在 A4 里它跟着 .plan-card 的宽度走，不另设固定像素。 */
.dvh-apply { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-2); }
.dvh-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
.dvh-meta { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chip.chip-danger { background: var(--bad-bg); border-color: var(--bad-line, #f3c0c0); color: var(--bad); font-weight: 600; }
.dvh-chart { display: block; width: 100%; max-width: 100%; height: auto; margin: 4px 0 10px; }
.dvh-image { display: block; max-width: 100%; height: auto; margin: 4px 0 10px; }
.dvh-list { margin: 6px 0 0; padding-left: 18px; font-size: 12px; color: var(--ink-2); }
.dvh-list li { margin: 2px 0; }
.dvh-list-bad { color: var(--bad); }
.plan-tbl td .ok { color: var(--ok); }
.plan-tbl td .bad { color: var(--bad); }
/* DVH 图例：放在图外（绘图区留给曲线；叠在图里会盖住靶区 75%~100% 那段关键覆盖） */
.dvh-figure { margin: 4px 0 10px; }
.dvh-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 11.5px; color: var(--ink-2); }
.dvh-legend-i { display: inline-flex; align-items: center; gap: 5px; }
.dvh-legend-i > i { width: 14px; height: 3px; border-radius: 1px; display: inline-block; }
.dvh-legend-more { color: var(--muted); }

/* T-EMR-05 结构化病历书写（深蓝主色 + 卡片式；版心按纸宽） */
.emr-flow-text { line-height: 1.9; margin: 8px 0; color: var(--ink); }
.emr-el { display: inline-flex; align-items: center; gap: 8px; margin: 6px 10px 6px 0; }
.emr-el select, .emr-el input { padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; }
.emr-el fieldset { border: 1px solid var(--line); }
.emr-table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.emr-table caption { text-align: left; font-weight: 600; padding: 6px 0; }
.emr-table th, .emr-table td { border: 1px solid var(--line); padding: 4px 6px; }
.emr-table input { width: 96%; border: 0; border-bottom: 1px solid var(--line); }
.emr-reflock { background: var(--faint); border: 1px dashed var(--line); padding: 8px 10px; margin: 8px 0; }
.emr-hint { color: var(--muted); font-size: 13px; margin: 6px 0; }
.emr-hint.fixed { color: var(--ink-2); border-left: 3px solid var(--line); padding-left: 8px; }
.emr-paper { box-shadow: 0 1px 6px rgba(16, 42, 92, 0.12); }
/* 2026-11-20：书写区做成 A4 纸（fb 走查）——与其他七张单据同一套纸头语言。
   宽 210mm、自由高（病历内容长度不定，不钉 297mm），内边距按 A4 规范。 */
.emr-paper.emr-a4 {
  width: 210mm; max-width: 210mm; margin: 0 auto; padding: 10mm 12mm;
  background: #fff; border: 1px solid #d8dde6; border-radius: 4px;
  box-shadow: 0 2px 14px rgba(15, 23, 42, .16);
  max-height: none; overflow: visible; color: var(--ink);
}
.emr-doc-head .doc-title { text-align: center; font-size: 19px; font-weight: 700; letter-spacing: 6px; margin: 4px 0 2px; }
.emr-doc-head .doc-org { text-align: center; font-size: 12px; color: var(--ink-2); letter-spacing: 2px; }
.emr-doc-head .doc-sub {
  display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted);
  border-bottom: 2px solid var(--ink); padding-bottom: 6px; margin-bottom: 0;
}
/* fb-9902（2026-11-21 走查）：主诉前的患者基本信息（姓名/病案号/性别/年龄）——
   两列 · label 64px 右对齐（A4 纸头规范），打印随纸输出（不进 no-print 纸头）。
   覆盖 paper.css .doc-info 的四列信息条版式：这里字段少、要对齐书写区的 label 列宽。 */
.emr-a4 .emr-patient-info {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px;
  border: 0; border-bottom: 1px solid var(--line); margin: 10px 0 2px; padding: 4px 0 10px;
  font-size: 12.5px;
}
.emr-a4 .emr-patient-info .di-f { display: flex; align-items: baseline; gap: 8px; border: 0; padding: 0; }
.emr-a4 .emr-patient-info .di-f > label {
  width: 64px; flex-shrink: 0; text-align: right; font-size: 12px; color: var(--ink-2); font-weight: 600;
}
.emr-a4 .emr-patient-info .di-v { font-weight: 600; }
.emr-a4 .emr-patient-info .di-v.mono { font-family: Consolas, "JetBrains Mono", monospace; }
/* 段落标题用规范的青绿竖条；正文控件行距放开到书写密度 */
.emr-a4 .sec-t { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; margin: 12px 0 8px; }
.emr-a4 .sec-t::before { content: ""; width: 4px; height: 14px; border-radius: 2px; background: var(--brand); }
.emr-sec-body { margin-bottom: 6px; }
.emr-a4 .emr-el { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.emr-a4 .emr-el-k { flex: 0 0 64px; text-align: right; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.emr-a4 .emr-el input, .emr-a4 .emr-el select { flex: 1; max-width: 420px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--faint); font-size: 12.5px; }
.emr-a4 .emr-flow-text { line-height: 1.9; margin: 8px 0; color: var(--ink); }
/* fb-9865（2026-11-21 走查）：内容框自动换行增高——fill 文本域由单行 input 换多行 textarea */
.emr-el textarea {
  padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px;
  resize: none; overflow: hidden; font-family: inherit; line-height: 1.6;
}
.emr-a4 .emr-el textarea {
  flex: 1; max-width: 420px; padding: 6px 9px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--faint); font-size: 12.5px;
}
/* fb-9979（2026-11-21 走查）：「内容」标签去掉，内容栏吃满 A4 纸宽 */
.emr-el--nolabel { display: block; }
.emr-el--nolabel textarea,
.emr-el--nolabel input[type="text"],
.emr-el--nolabel input[type="number"],
.emr-el--nolabel input[type="date"] {
  width: 100%; max-width: none; box-sizing: border-box;
}
/* fb-9982（2026-11-21 走查）：病历模板弹窗 + 段落按钮 + 公私分组 + 拖拽排序 */
.tpl-btn-row { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.tpl-cat-btn { font-size: 11px; padding: 3px 8px; }
.tpl-cat-btn.active { background: var(--brand); color: #fff; }
.tpl-save-btn { margin: 4px 0; font-size: 11px; }
.tpl-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.tpl-dialog {
  background: var(--panel, #fff); border-radius: 10px; padding: 16px 20px;
  min-width: 340px; max-width: 480px; max-height: 70vh; overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.tpl-dialog-head {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; font-size: 14px; margin-bottom: 10px;
}
.tpl-scope-group { margin-bottom: 12px; }
.tpl-row {
  display: flex; align-items: center; gap: 6px; padding: 4px 0;
  border-bottom: 1px solid var(--line, #eee);
}
.tpl-grip { cursor: grab; color: var(--muted, #999); font-size: 12px; user-select: none; }
.tpl-apply-btn { flex: 1; text-align: left; font-size: 12px; }
.tpl-save-form { display: flex; flex-direction: column; gap: 10px; }
.tpl-save-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; }
.tpl-save-form input, .tpl-save-form select {
  padding: 6px 10px; border: 1px solid var(--line, #ccc); border-radius: 6px; font-size: 13px;
}
/* fb-9862（2026-11-21 走查）：分期/靶区剂量移入纸面节化——纸内去卡片框，
   节标题由 .sec-t 承担，面板标题行降为工具行（只留说明与按钮） */
.emr-a4 .emr-paper-extra .panel,
.emr-a4 .emr-paper-extra .card {
  background: transparent; border: 0; box-shadow: none; margin: 0; overflow: visible;
}
.emr-a4 .emr-paper-extra .panel > .ph {
  padding: 2px 0 8px; border-bottom: 0; background: transparent;
  font-size: 12px; color: var(--ink-2);
}
.emr-a4 .emr-paper-extra .panel > .ph::before { display: none; }
.emr-a4 .emr-paper-extra .panel > .pb { padding: 0; }
/* 段落导航在窄屏时收进纸上方，避免压住 A4 纸 */
@media print {
  .emr-a4 { width: auto; max-width: none; border: none; box-shadow: none; padding: 0; }
  .emr-doc-head { display: none; }
}

/* ============================================================
   2026-11-17：定位/执行申请单按 A4-PAPER-PATTERN 规范整容
   参考：output/ui-designs/d/sim-order.html + paper.css
   只换视觉（分区标题 / label 对齐 / 控件密度），不动分页测量逻辑
   —— StepSheet 的 238 行分页判据是"屏幕页数 == 纸页数"的唯一真值，重写会破掉它
   ============================================================ */
/* 分区改成无框 + 青绿竖条标题（规范 §3 第 6 行：.sec > .sec-t） */
.step-sheet .step-fs { border: none; padding: 0; margin: 0 0 12px; }
.step-sheet .step-fs > legend {
  display: flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 700; color: var(--ink);
  margin: 0 0 8px; padding: 0; line-height: 1.3;
}
.step-sheet .step-fs > legend::before {
  content: ""; width: 4px; height: 14px; border-radius: 2px; background: var(--brand); flex: 0 0 4px;
}
/* label 固定 64px 右对齐（规范 §3 第 6 行：label 固定 64px 右对齐） */
.step-sheet .frow > .fk, .step-sheet .frow > span.fk {
  flex: 0 0 64px; width: 64px; text-align: right; font-size: 11.5px;
  color: var(--ink-2); font-weight: 600;
}
.step-sheet .frow { gap: 8px; }
.step-sheet .fgrid { gap: 7px 14px; }
/* 控件高度对齐规范（30px） */
.step-sheet .inp, .step-sheet select { min-height: 26px; border-radius: 5px; }

/* 2026-11-17：定位排程只看某一条治疗时，其它条目暗下去 */
.ct-block[data-dim="1"] { opacity: .32; filter: grayscale(.6); }

/* ── fb-7087：靶区表每个处方占两行，第二行是六向外扩 ───────────────────────── */
.plan-margins { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.plan-margin { display: inline-flex; align-items: center; gap: 3px; }
.plan-margin .pm-k { font-size: 11px; color: var(--muted); width: 10px; text-align: center; }
.plan-margin .plan-cell { width: 34px; }
/* fb-9859（2026-11-21 走查）：标签并入数值行——每格标签在上、输入在下，
   「六向外扩（mm）」落在 A P S I R L 正上方（表头只留靶区行） */
.plan-lbl { display: block; font-size: 11px; color: var(--muted); line-height: 1.6; }
/* 两行之间的分隔只画在「主行」上方，视觉上仍是一条一条的处方 */
/* fb-9874/9877/9899（2026-11-21）：靶区处方剂量表两行独立列宽（每处方一个块，块内主行/数值行
   各成一张 table）——共享列网格时「描述列 366px」与「六向外扩 250px」在 701px 纸宽内互斥。 */
.plan-tv-block { border-top: 1px solid var(--line-2); }
.plan-tv-block.is-drop { outline: 2px dashed var(--brand); outline-offset: -2px; }
.plan-tv-block .plan-tv-main,
.plan-tv-block .plan-tv-margin { table-layout: fixed; }
.plan-tv-block .plan-tv-main td,
.plan-tv-block .plan-tv-margin td { vertical-align: top; }
.plan-tv-main .tv-c-name { width: 82px; }
.plan-tv-main .tv-c-desc { width: 366px; }
.plan-tv-main .tv-c-act { width: 37px; }
.plan-tv-margin .tv-c-vol { width: 65px; }
.plan-tv-margin .tv-c-rel { width: 54px; }
.plan-tv-margin .tv-c-dose { width: 96px; }
.plan-tv-margin .tv-c-fx { width: 48px; }
.plan-tv-block .plan-tv-margin td { border-top: none; padding-top: 0 !important; padding-bottom: 4px; }
@media print {
  /* 一个处方的两行不拆页（fb-7087 两行约束的打印侧） */
  .plan-tv-block { break-inside: avoid; }
}
