/* 益牙所口腔后台 · 布局对齐参考产品（窄侧栏 + 顶栏 + 浅灰内容区 + 密集表格） */
:root {
  --g: #2BA471;
  --g-dark: #23915F;
  --g-light: #E8F6F0;
  --side: #1B2735;
  --side-2: #16202B;
  --bg: #F0F2F5;
  --card: #FFFFFF;
  --line: #E6EBF0;
  --line-2: #F2F4F7;
  /* 表头底色：原系统是**中性灰**（#F7F8FA 一档），我们原来是偏蓝的 #F0F4F9 → 2026-10-14 对齐 */
  --th: #F7F8FA;
  --text: #1F2D3D;
  --sub: #5A6B7B;
  --aux: #8A98A8;
  --red: #E64545;
  --orange: #E98A1F;
  --blue: #2F80ED;
  --radius: 6px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ---------------- 登录 ---------------- */
.login-mask {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #1B2735, #2BA471);
}
.login-box { width: 400px; background: #fff; border-radius: 8px; padding: 32px 32px 24px; box-shadow: 0 16px 48px rgba(0,0,0,.22); }
.login-logo {
  /* 诊所 LOGO 图：圆形白底 + 按比例缩放（不拉伸） */
  width: 56px; height: 56px; border-radius: 50%; background: #fff; object-fit: contain; display: block;
}
.login-title { margin-top: 16px; font-size: 19px; font-weight: 700; }
.login-sub { margin-top: 6px; color: var(--aux); font-size: 12px; }
.login-field { margin-top: 16px; }
.login-field label { display: block; font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.login-field input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 4px; padding: 0 10px; font-size: 14px; }
.login-field input:focus { outline: none; border-color: var(--g); }
.login-btn { width: 100%; height: 40px; margin-top: 20px; font-size: 14px; }
.login-tip { min-height: 18px; color: var(--red); font-size: 12px; margin-top: 6px; }
/* 每店入口：登录页顶一条「本入口固定门店」，员工进错店能立刻发现 */
.login-store { margin-top: 8px; padding: 6px 10px; border: 1px solid #bcd8ff; background: #f3f8ff; color: #2563eb; font-size: 12px; border-radius: 6px; text-align: center; }
/* 启动遮罩：新标签页被节流时至少能看到"正在进入"，不会是一片空白 */
.boot-splash { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: #f4f6f9; }
.boot-splash.hidden { display: none; }
.boot-box { text-align: center; }
.boot-logo { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; background: #fff; object-fit: contain; display: block; }
.boot-text { font-size: 16px; color: #2c3542; }
.boot-tip { font-size: 12px; margin-top: 8px; max-width: 420px; line-height: 1.7; }
/* 多店：分发弹窗（功能总店 → 门店） */
.dist-block { margin-bottom: 14px; }
.dist-block .dist-title { font-size: 14px; font-weight: 600; color: #2c3542; margin-bottom: 6px; }
.dist-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; font-size: 14px; }
.dist-scope { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.dist-ok { color: #16a34a; font-size: 14px; margin-bottom: 6px; }
.dist-err { color: #dc2626; font-size: 14px; }
.dist-line { font-size: 12px; color: #475569; line-height: 1.8; }
/* 打印模板 · 按纸张比例的"纸"预览 */
.pt-paper-wrap { display: flex; flex-direction: column; align-items: center; }
.pt-paper { background: #fff; border: 1px solid #cfd6df; border-radius: 4px; box-shadow: 0 6px 18px rgba(15, 32, 56, 0.12); padding: 14px 16px; overflow: hidden; }
.pt-pv-clinic { font-size: 14px; color: #2c3542; margin-bottom: 6px; }
.pt-pv-title { font-size: 16px; font-weight: 700; text-align: center; letter-spacing: 2px; margin: 6px 0 10px; }
.pt-pv-row { display: flex; justify-content: space-between; font-size: 12px; color: #475569; padding: 3px 0; border-bottom: 1px dashed #eef1f5; }
.pt-pv-foot { margin-top: 10px; font-size: 12px; color: #94a3b8; text-align: center; }
/* 小程序装修：下线的行灰掉，「已上线」按钮绿一点 */
.mp-off td { color: #98a2b3; }
.mp-off td:nth-child(2) { text-decoration: line-through; text-decoration-color: #cbd5e1; }
.btn-mini.mp-on { background: #e8f7f1; color: #0b8064; border-color: #b6e3d3; }
/* 小程序装修 · 首页模块开关行 */
.mp-mod-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.mp-mod-row .mp-mod-name { min-width: 90px; font-weight: 600; color: #2c3542; }
/* 小程序装修 · 电子病历「患者端预览」（照勾选实时变化） */
/* 角色权限设置（对齐原系统）：左员工列表 + 右四页签权限树 */
.rperm-wrap { display: flex; gap: 14px; width: 1000px; max-width: 96vw; height: 70vh; }
.rperm-left { width: 240px; flex: none; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.rperm-left-head { font-size: 14px; font-weight: 700; padding: 4px 0 8px; }
.rperm-left-foot { padding-top: 8px; font-size: 12px; }
.rperm-right { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rperm-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); padding: 0 4px; }
.rperm-tab { font-size: 14px; color: var(--sub); padding: 8px 2px 10px; cursor: pointer; position: relative; }
.rperm-tab.on { color: var(--g-dark); font-weight: 700; }
.rperm-tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--g); }
.rperm-toolbar { display: flex; align-items: center; padding: 8px 4px; }
.rperm-body { flex: 1; overflow-y: auto; padding-right: 4px; }
.rperm-mod { display: flex; align-items: center; gap: 6px; padding: 5px 0; font-size: 14px; }
.rperm-mod-lab { display: flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; }
.rperm-tri { width: 14px; color: var(--aux); cursor: pointer; user-select: none; font-size: 12px; }
.rp-kids { padding: 2px 0 6px 46px; }
.rperm-leaf { display: block; font-size: 12px; color: var(--sub); padding: 4px 0; cursor: pointer; }
.rperm-leaf input { margin-right: 6px; }
.rperm-node { display: flex; align-items: center; gap: 6px; font-size: 14px; padding: 4px 0; }
.rperm-node-lab { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text); }
.rperm-scope-row { font-size: 14px; color: var(--text); padding: 8px 0; }
.rperm-scope-row .muted { margin-left: 10px; font-size: 12px; }
/* 收费明细：折扣框下面的「最低折扣」提示（对齐原系统：保存前就知道会不会被拦） */
.tx-md { font-size: 12px; color: #94a3b8; margin-top: 2px; white-space: nowrap; }
.tx-md-bad { color: #e64545; font-weight: 600; }
/* 表单字数计数器（对齐原系统的 0/50） */
.form-row { position: relative; }
.f-count { position: absolute; right: 8px; bottom: 6px; font-size: 12px; color: #b6c0cc; pointer-events: none; }
/* 手机那格：关系下拉 + 号码 合成一格（对齐原系统 手机 [本人 ▾][号码]） */
.pf-inline { display: flex; gap: 6px; align-items: center; }
.pf-inline .pf-rel { width: 92px; flex: none; }
.pf-inline input { flex: 1; min-width: 0; }
/* 省 / 市 / 区县 三级联动（对齐原系统「新增患者」）：三段下拉同格，末尾一个小链接可切手填 */
.pf-area { display: flex; gap: 6px; align-items: center; }
.pf-area select { flex: 1; min-width: 0; }
.pf-area select:disabled { background: #f7f8fa; color: #b6c0cc; }
.pf-area .pf-area-switch { flex: none; font-size: 12px; color: var(--g); text-decoration: none; white-space: nowrap; }
.pf-area .pf-area-switch:hover { text-decoration: underline; }
.pf-area-tip { margin-left: 6px; font-size: 12px; color: #d97706; white-space: nowrap; }

/* 挂号分诊（对齐原系统：患者列表每行的「挂号」→ 选医生的那张弹窗） */
.tr-head { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tr-avatar { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--g-light); color: var(--g-dark); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; }
.tr-name { font-size: 16px; font-weight: 600; }
.tr-sub { font-size: 12px; color: var(--sub); margin-top: 3px; }
.tr-que { margin-left: auto; font-size: 12px; color: var(--sub); }
.tr-que b { font-size: 16px; color: var(--g-dark); margin-left: 4px; }
.tr-info { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 16px; margin-bottom: 14px; }
.tr-cell { display: flex; align-items: center; gap: 6px; font-size: 14px; min-width: 0; }
.tr-cell > label { flex: none; color: var(--sub); }
.tr-cell > span { color: #1d2129; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-cell.wide { grid-column: span 2; }
.tr-cell.wide .input { flex: 1; min-width: 0; }
.tr-sec { font-size: 14px; color: var(--sub); margin: 4px 0 8px; }
.tr-depts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tr-dept { padding: 4px 12px; border-radius: 14px; background: #f2f4f6; font-size: 12px; color: #56636f; cursor: pointer; }
.tr-dept:hover { background: var(--g-light); color: var(--g-dark); }
.tr-dept.on { background: var(--g); color: #fff; }
.tr-docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-height: 300px; overflow: auto; }
.tr-doc { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; cursor: pointer; }
.tr-doc:hover { border-color: var(--g); }
.tr-doc.on { border-color: var(--g); background: var(--g-light); }
.tr-doc.off { opacity: .55; }
.tr-doc-n { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.tr-doc-t { font-size: 12px; font-weight: 400; color: var(--sub); }
.tr-doc-x { font-size: 12px; color: #f53f3f; }
.tr-doc-ok { margin-left: auto; color: var(--g); }
.tr-doc-d { font-size: 12px; color: #56636f; margin-top: 5px; }
.tr-doc-s { font-size: 12px; color: var(--aux); margin-top: 3px; }
.tr-tip { margin-right: auto; font-size: 12px; color: var(--sub); }
/* 「系统设置」那一页的说明条（用户反馈"看不懂"+问"增加门店在哪里"） */
.cfg-tip { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 9px 14px; background: #F5F7FA; border-left: 3px solid var(--g); border-radius: 4px; font-size: 14px; color: #56636f; }
.cfg-tip b { color: #1d2129; }
.cfg-tip-act { margin-left: auto; display: flex; align-items: center; gap: 8px; }
/* 患者表单里"可引用"的格子（选项来自患者就诊设置）+ 患者标签「选标签」 */
.pf-pick-set { flex: none; font-size: 12px; color: var(--g); text-decoration: none; white-space: nowrap; }
.pf-pick-set:hover { text-decoration: underline; }
/* 「设置 / 引用 / 选标签」这类小链接：放**行尾**固定宽度的一格里（`.fr-extra`），
   每一行都留同样宽 → 控件左右都能对齐（2026-10-14）。 */
.fr-extra { flex: none; margin-left: 8px; }
.fr-extra a { margin-left: 8px; }
.fr-extra a:first-child { margin-left: 0; }
/* 患者表单（用户 2026-10-14 图 2 的样例：「姓名 ▢ 性别 ●男○女」）：
   **标签在左、控件在右、同一行**；标签右对齐（宽度固定）→ 控件的左边缘自然对齐。 */
.pf-drawer .form-grid-4 .form-row { display: flex; align-items: center; gap: 8px; }
/* 多行框那一行标签靠上（不然会贴着中间） */
.pf-drawer .form-grid-4 .form-row:has(textarea) { align-items: flex-start; }
.pf-drawer .form-grid-4 .form-row:has(textarea) > label { padding-top: 8px; }
.pf-drawer .form-grid-4 .form-row > label {
  flex: 0 0 84px; margin: 0; text-align: right; white-space: nowrap; font-size: 13px;
}
.pf-drawer .form-grid-4 .form-row > .fr-ctl { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.pf-drawer .form-grid-4 .form-row > .fr-ctl > *:not(.f-count) { flex: 1; min-width: 0; }
.pf-drawer .form-grid-4 .form-row > .fr-ctl > .f-count { flex: none; }
.pf-drawer .form-grid-4 .form-row > .fr-extra { flex: 0 0 44px; text-align: right; font-size: 12px; white-space: nowrap; }
/* 多行框那一行放两个链接（引用 + 设置）→ 这一格给宽些，别换行 */
.pf-drawer .form-grid-4 .form-row.full > .fr-extra { flex-basis: 84px; }
.pf-drawer .form-grid-4 .form-row > .fr-extra a { color: var(--g); text-decoration: none; white-space: nowrap; }
.pf-drawer .form-grid-4 .form-row > .fr-extra a:hover { text-decoration: underline; }
/* 出生日期那三个下拉：给足最小宽度，别把「2017 年」截成「201▾」 */
.pf-drawer .pf-date select { min-width: 74px; }
/* 有字数计数器的格子：正文留出右边距，别钻到计数器下面 */
.pf-drawer .fr-ctl:has(.f-count) > input { padding-right: 46px; }
/* 用户 2026-10-14 图 2：「这个页面的类似这样的全删除」—— 患者表单上的**字数计数器**（0/50、0/500…）
   一律不显示（含病历号那个 11 / 30）。DOM 还在，想要回来把这两行删掉即可。 */
.pf-drawer .f-count,
.pf-drawer .pf-no-count { display: none; }
.pf-drawer .fr-ctl:has(.f-count) > input { padding-right: 10px; }
.pf-drawer .pf-no input { padding-right: 10px; }
/* 患者列表：最左边勾选列 + 「批量处理」下拉菜单 + 已选择 N 条 */
.cb-col { width: 38px; min-width: 38px !important; text-align: center; }
.cb-col input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--g); cursor: pointer; vertical-align: middle; }
.pg-batch-wrap { position: relative; display: inline-flex; align-items: center; }
.pg-selinfo { margin-left: 10px; font-size: 12px; color: var(--sub); }
.pg-selinfo b { color: var(--g); }
.pg-menu { position: fixed; z-index: 200; min-width: 176px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 26px rgba(15, 23, 42, .16); }
.pg-menu-i { padding: 8px 12px; font-size: 14px; color: #33455c; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.pg-menu-i:hover { background: var(--g-light); color: var(--g); }
/* 「显示字段」弹窗：一格格勾选要显示的列 */
.pg-cols { display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 4px 2px 8px; max-height: 52vh; overflow: auto; }
.pg-col { display: inline-flex; align-items: center; gap: 5px; width: 172px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; color: #33455c; cursor: pointer; background: #fff; }
.pg-col:hover { border-color: var(--g); background: var(--g-light); }
.pg-col input { width: 15px; height: 15px; accent-color: var(--g); }
.pg-col .muted { font-size: 12px; }
/* 「高级筛选」里的标签格：整格可点的下拉式（只读输入框 + 右边 ▾），点了开标签大对话框 */
.pf-tagwrap { position: relative; display: inline-block; }
.pf-tagwrap .pf-tagbox { cursor: pointer; background: #fff; padding-right: 24px; }
.pf-caret { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: #86909c; font-style: normal; font-size: 12px; pointer-events: none; }
/* 「引用」弹列表（叠在患者抽屉上，用 on-top） */
.pk-list { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow: auto; }
.pk-item { padding: 8px 12px; border-radius: 4px; font-size: 14px; cursor: pointer; }
.pk-item:hover { background: var(--g-light); color: var(--g-dark); }
/* 连锁管理 · 配置分发（对齐原系统「诊所管理 → 连锁管理 → 配置分发」） */
.chain-auto { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #56636f; white-space: nowrap; cursor: pointer; }
.chain-force { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sub); }
.chain-cnt { font-size: 12px; color: var(--aux); white-space: nowrap; }
/* 「配置分发 → 下级到位」那一列（2026-10-16 用户图 2：「有没有分发到位我根本不清楚」）：
   逐店一颗小标签 + 一行汇总（到位 / 未到位），一眼能看出是哪几家没分到。 */
.chain-sync-head { font-size: 12px; margin-bottom: 4px; }
.chain-sync-head.ok { color: var(--g-dark); }
.chain-sync-head.bad { color: #d4380d; font-weight: 600; }
.chain-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chain-chip { display: inline-block; padding: 1px 6px; border-radius: 9px; font-size: 11px; border: 1px solid var(--line); color: var(--sub); background: #F7F8FA; white-space: nowrap; }
.chain-chip.ok { border-color: #b7eb8f; background: #f6ffed; color: #237804; }
.chain-chip.bad { border-color: #ffbb96; background: #fff2e8; color: #d4380d; }
.chain-never { color: var(--aux); }
.chain-ok-tag { color: #237804; font-size: 12px; }
.chain-bad-tag { color: #d4380d; font-size: 12px; }
.chain-managed { color: var(--g-dark); }
.chain-hq { background: var(--g-light); color: var(--g-dark); font-size: 12px; padding: 2px 7px; border-radius: 3px; }
/* 加微信 · 绑定患者（弹窗） */
.wb-box { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--g-light); border-radius: 4px; margin-bottom: 12px; }
.wb-ok { flex: 1; font-size: 14px; color: var(--g-dark); }
.wb-mini { padding: 8px 12px; margin-bottom: 10px; border-radius: 4px; background: #f5f8fb; color: #64748b; font-size: 12px; line-height: 1.6; }
.wb-mini b { color: var(--g-dark); }
.wb-sec { font-size: 14px; font-weight: 600; margin: 14px 0 8px; }
.wb-qr { text-align: center; padding: 10px 0; }
.wb-qr img { width: 190px; height: 190px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.wb-warn { padding: 10px 12px; background: #FFF7E6; border-left: 3px solid #F5A623; border-radius: 4px; font-size: 14px; color: #8B5A00; line-height: 1.8; }
.wb-cand { display: flex; align-items: center; gap: 10px; }
.wb-cand .muted { font-size: 12px; flex: 1; }
.wb-bind { flex: none; font-size: 12px; color: var(--g); }
/* 企微好友：三个统计卡 + 绑定患者的小标签（对齐参考产品图 1） */
.wxc-cards { display: flex; gap: 16px; margin-bottom: 14px; }
.wxc-card { flex: 1; border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; text-align: center; }
.wxc-num { font-size: 26px; font-weight: 700; color: var(--g-dark); }
.wxc-label { font-size: 12px; color: var(--sub); margin-top: 4px; }
.wxc-bind { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: var(--g-light); color: var(--g-dark); border-radius: 4px; padding: 2px 6px; margin: 2px 4px 2px 0; }
.wxc-bind i { font-style: normal; background: #fff; border-radius: 3px; padding: 0 4px; font-size: 12px; color: var(--sub); }
.wxc-bind .muted { font-size: 12px; }
.wxc-x { color: #c0392b; text-decoration: none; padding: 0 2px; }
/* 编辑员工信息（对齐原系统）：基础信息 + 账号信息两块 */
.se-wrap { width: 1080px; max-width: 96vw; height: 68vh; overflow-y: auto; }
.se-sec { font-size: 14px; font-weight: 700; color: #1d2129; margin: 4px 0 12px; padding-left: 9px; border-left: 3px solid var(--g); }
.se-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.se-grid .form-row.full { grid-column: 1 / -1; }
.se-radios, .se-multi { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 4px; }
/* 通用抽屉里的「勾选式多选」（2026-10-15：岗位(多选) 接字典后用的就是这个） */
.df-multi { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 4px; }
.se-chk { font-size: 14px; color: var(--sub); display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.se-imgs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.se-img { border: 1px dashed var(--line); border-radius: 8px; padding: 10px; }
.se-img-t { font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.se-img input { width: 100%; font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; }
.se-up { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--g-dark); cursor: pointer; }
.se-add { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.se-add input { width: 220px; font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; }
.mp-preview { max-width: 380px; border: 1px solid var(--line); border-radius: 10px; background: #f7faf9; padding: 12px 14px; }
.mp-pv-head { font-size: 14px; font-weight: 700; color: #0b8064; padding-bottom: 8px; border-bottom: 1px solid #e3ece8; }
.mp-pv-line { font-size: 12px; color: #475569; line-height: 1.7; padding: 5px 0; }
.mp-pv-line b { display: inline-block; min-width: 68px; color: #94a3b8; font-weight: 500; }
.login-accounts { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.login-accounts-title { font-size: 12px; color: var(--aux); margin-bottom: 6px; }
.login-account { font-size: 12px; color: var(--sub); padding: 5px 8px; border-radius: 4px; cursor: pointer; }
.login-account:hover { background: var(--g-light); color: var(--g-dark); }

/* ---------------- 骨架 ---------------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 92px; flex: none; background: var(--side); display: flex; flex-direction: column;
  height: 100vh; position: sticky; top: 0; overflow-y: auto; overflow-x: hidden;
}
.sidebar::-webkit-scrollbar { width: 0; }
.logo { height: 56px; flex: none; background: var(--side-2); display: flex; align-items: center; justify-content: center; }
.logo-mark {
  /* 诊所 LOGO 图（用户 2026-10-08）：圆形白底 + object-fit: contain —— 按比例缩放、不拉伸 */
  width: 34px; height: 34px; border-radius: 50%; background: #fff; object-fit: contain; display: block;
}
.menu { padding: 6px 0 24px; }
.menu-group-title { font-size: 10px; color: #5A6B7A; padding: 8px 10px 4px; letter-spacing: .5px; }
.menu-item {
  display: flex; align-items: center; gap: 5px; height: 36px; padding: 0 6px 0 8px;
  color: #B8C4D0; font-size: 12px; cursor: pointer; border-left: 3px solid transparent; white-space: nowrap;
}
.menu-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.menu-item.on { background: rgba(43,164,113,.16); border-left-color: var(--g); color: #fff; }
.menu-icon {
  width: 20px; height: 20px; border-radius: 5px; background: rgba(255,255,255,.09);
  display: flex; align-items: center; justify-content: center; font-size: 12px; flex: none; color: #C4D0DA;
}
.menu-item.on .menu-icon { background: var(--g); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px; flex: none; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; padding: 0 16px; position: sticky; top: 0; z-index: 20;
}
.tb-brand { flex: none; max-width: 280px; padding-right: 14px; margin-right: 4px; border-right: 1px solid var(--line); }
.tb-brand-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
/* 顶栏店名现在跟着"诊所管理 → 门店名称"走，名字可能很长 → 超长省略，别把右边搜索框挤扁 */
.tb-brand-name #tbBrandName { overflow: hidden; text-overflow: ellipsis; }
.tb-brand-name .ver-badge { flex: none; }
.tb-brand-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ver-badge {
  background: #FFF3E0; color: #C77800; font-size: 10px; font-weight: 400;
  padding: 1px 6px; border-radius: 3px; border: 1px solid #FFE0AE;
}
.tb-brand-sub { font-size: 12px; color: var(--aux); margin-top: 2px; white-space: nowrap; }
.side-collapse {
  position: fixed; left: 92px; top: 50%; transform: translateY(-50%); width: 15px; height: 62px;
  background: #fff; border: 1px solid var(--line); border-left: none; border-radius: 0 6px 6px 0;
  display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl;
  font-size: 10px; color: var(--aux); cursor: pointer; z-index: 30; user-select: none;
}
.side-collapse:hover { color: var(--g); background: var(--g-light); }
.app.collapsed .sidebar { width: 56px; }
.app.collapsed .side-collapse { left: 56px; }
.app.collapsed .menu-item { padding: 0 0 0 15px; gap: 0; }
.app.collapsed .menu-item .menu-label { display: none; }
.app.collapsed .menu-group-title { display: none; }
.app.collapsed .logo-mark { width: 30px; height: 30px; font-size: 16px; }
.tb-search {
  flex: none; width: 280px; height: 32px; border: 1px solid var(--line); border-radius: 4px;
  display: flex; align-items: center; padding: 0 10px; gap: 6px; background: #FAFBFC;
}
.tb-search input { flex: 1; border: none; background: transparent; font-size: 12px; outline: none; }
.tb-search .ico { color: var(--aux); font-size: 14px; }
.tb-icons { display: flex; align-items: center; margin-left: auto; }
.tb-item {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-size: 12px; color: var(--sub); padding: 0 9px; cursor: pointer; position: relative;
}
.tb-item:hover { color: var(--g); }
.tb-item .ico { font-size: 16px; line-height: 1; }
.tb-item .hot {
  position: absolute; top: -4px; right: 2px; background: var(--red); color: #fff;
  font-size: 10px; padding: 0 3px; border-radius: 3px; transform: scale(.9);
}
.tb-user { display: flex; align-items: center; gap: 8px; padding-left: 12px; border-left: 1px solid var(--line); }
.tb-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--g-light); color: var(--g-dark);
  font-size: 14px; display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.user-name { font-size: 12px; color: var(--sub); }
.role-badge { background: var(--g-light); color: var(--g-dark); font-size: 12px; padding: 2px 7px; border-radius: 3px; }

.content { padding: 12px 16px 40px; }
.page-title { display: flex; align-items: center; gap: 8px; margin: 2px 0 12px; }
.page-title .pt-icon {
  /* 2026-10-14 按原系统改：原系统的页面标题是**纯文字**（没有色块图标），
     这里把原来的绿色圆角块收成一根 3px 的绿色小竖条 —— 保留一点品牌色当视觉锚点，
     又不会像色块那样"每个页面顶着一块绿"。想彻底去掉就把 display 改成 none。 */
  width: 3px; height: 15px; border-radius: 2px; background: var(--g);
  margin-right: 2px; flex: none; overflow: hidden; text-indent: -9999px;
}
.page-title span { font-size: 16px; font-weight: 700; color: var(--text); }

/* ---------------- 按钮 ---------------- */
/* ⚠️ 2026-10-16 用户：「把所有的按键大小做大一号」—— 整条按钮体系统一加一档
   （主按钮 32→36、小按钮 24→30、迷你按钮 24→28、行内图标钮 24→28），字号 14→15 / 12→13。
   改完记得跑布局敏感的那几条（分页条 / 日期框 / 患者页签 / 收费 9 张卡）。 */
.btn { border: 1px solid transparent; border-radius: 4px; padding: 0 16px; height: 36px; font-size: 15px; background: #fff; white-space: nowrap; flex: none; }
.btn-primary { background: var(--g); color: #fff; }
.btn-primary:hover { background: var(--g-dark); }
.btn-outline { border-color: var(--g); color: var(--g); background: #fff; }
.btn-outline:hover { background: var(--g-light); }
.btn-ghost { border-color: var(--line); color: var(--sub); }
.btn-ghost:hover { border-color: var(--g); color: var(--g); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn-mini {
  height: 28px; min-width: 30px; padding: 0 9px; font-size: 13px; border-radius: 4px;
  border: 1px solid var(--line); background: #fff; color: var(--sub); margin-right: 4px;
}
.btn-mini:hover { border-color: var(--g); color: var(--g); }
.btn-mini.danger:hover { border-color: var(--red); color: var(--red); }

/* ---------------- 指标卡 ---------------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; display: flex; align-items: center; gap: 10px;
}
.kpi-icon {
  width: 34px; height: 34px; border-radius: 8px; flex: none; font-size: 14px; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.ico-green { background: #3FBF8F; }
.ico-blue { background: #5B9BF5; }
.ico-orange { background: #F2A45C; }
.ico-pink { background: #EE7BA8; }
/* 工作台第 5 张卡（返现抵扣，2026-10-09）用的紫色 */
.ico-purple { background: #8B7BF0; }
.ico-teal { background: #2FB6B0; }
/* 统计卡里的小字提示（例：现金流那张卡下面写「其中返现抵扣 ¥39」） */
.bs-note { color: #8B7BF0; }
/* 账单里"有退款、却没有退款流水"（作废 / 手工改账单）时，收款页签上面那条提示 */
.bs-warn-line {
  margin: 8px 0 0; padding: 8px 12px; border-radius: 8px;
  background: #FFF6E5; border: 1px solid #FFE0AE; color: #A96B00; font-size: 12px; line-height: 1.7;
}
.kpi-label { font-size: 14px; color: var(--sub); }
.kpi-value { margin-left: auto; font-size: 20px; font-weight: 600; }
.kpi-value .unit { font-size: 12px; font-weight: 400; color: var(--aux); margin-left: 3px; }
.kpi-eye { font-size: 12px; color: var(--aux); cursor: pointer; margin-left: 6px; }

/* 指标卡的 ⓘ 口径说明 + 右上角统一的金额显示/隐藏开关（对齐原系统） */
.kpi-info { font-size: 12px; color: #b8bec9; margin-left: 5px; cursor: help; }
.kpi-info:hover { color: var(--g); }
.kpi-eye-toggle { font-size: 16px; line-height: 1; cursor: pointer; user-select: none; margin-left: 10px; align-self: center; }
.kpi-eye-toggle:hover { opacity: .7; }

/* ---------------- 面板 ---------------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
/* 左侧「今日待办」：用户 2026-10-12「把这里的宽度减小些」→ 262 → 206px（窄一档，右边表格多出 ~56px） */
.layout-2 { display: grid; grid-template-columns: 206px 1fr; gap: 12px; margin-top: 12px; align-items: start; }
.layout-2 > .panel { min-width: 0; }
.side-list { padding: 4px 0; }
.side-row { display: flex; align-items: center; gap: 9px; padding: 11px 14px; font-size: 14px; color: var(--sub); border-bottom: 1px solid var(--line-2); }
.side-row:last-child { border-bottom: none; }
.side-row .si {
  width: 20px; height: 20px; border-radius: 5px; font-size: 12px; color: #fff;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.side-row .sv { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--text); }
.panel-title { font-size: 14px; font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.panel-body { padding: 14px 16px; }

/* ---------------- 工具条 ---------------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.input, .select { height: 32px; border: 1px solid var(--line); border-radius: 4px; padding: 0 10px; font-size: 14px; background: #fff; color: var(--text); }
.input:focus, .select:focus { outline: none; border-color: var(--g); }
.input-search { width: 240px; }
.input-date { width: 140px; }
/**
 * 日期框统一给足最小宽度。
 * 原生 `<input type="date">` 右边自带日历图标，宽度不够时 Chrome 会把**年份剪掉**
 * （显示成 `yyy/mm/日`）—— 用户 2026-10-09 截图：「这个字段做宽点 **整个系统的类似于这个字段都要改**」。
 * 用 `min-width` 兜底：各页原来的 `width:140/148/150px` 都自动被抬到够宽，不必逐处改。
 */
input[type="date"] { min-width: 178px; }
/**
 * 日期框**外观统一**（用户 2026-10-09 第三次提：「这个日期要搞好」「已经出现在好几个地方了 这样真的太难看了」）。
 *
 * 病根：原生 `<input type="date">` 在**空值**时会露出浏览器自带的占位文本（`yyyy/mm/日`，
 * Chrome 中文环境还是"年 /月/日"混排），全系统几十处筛选框都是这个样子。
 *
 * 做法：**只在确认空值**时（`mountDateSkin()` 给挂的 `.date-empty` 类）把原生文本置透明，
 * 改显示我们自己的淡色提示（`data-ph`：起始 / 结束 / 选择日期）；有值或聚焦时照常显示真实日期。
 * 注意这里是"**加类才生效**"而不是"没值就生效" —— 万一脚本没跑到，最坏只是退回原生样子，
 * 绝不会出现"有日期却被藏起来"（这条是踩过的：第一版用 `.hasval` 反着写，标记一丢日期就看不见了）。
 * 见 `admin/app.js` 的 `mountDateSkin()`。
 */
input[type="date"], input[type="datetime-local"] { position: relative; }
input[type="date"].date-empty:not(:focus)::-webkit-datetime-edit,
input[type="datetime-local"].date-empty:not(:focus)::-webkit-datetime-edit { color: transparent; }
input[type="date"].date-empty:not(:focus)::before,
input[type="datetime-local"].date-empty:not(:focus)::before {
  content: attr(data-ph);
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #9AA7B4;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}
.step-btn { width: 28px; height: 32px; border: 1px solid var(--line); background: #fff; border-radius: 4px; color: var(--sub); font-size: 14px; }
.toolbar-right { margin-left: auto; display: flex; gap: 8px; }

/* ---------- 状态页签 ---------- */
.tabs { display: flex; align-items: center; gap: 22px; padding: 0 14px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs::-webkit-scrollbar { height: 0; }
.tab { font-size: 14px; color: var(--sub); padding: 11px 0; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--g); }
.tab.on { color: var(--g); font-weight: 600; border-bottom-color: var(--g); }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
/* 单元格留白 / 表头字号：对齐原系统那种"行高更松一点、表头 13px 深灰"的观感（2026-10-14） */
th, td { padding: 12px 12px; text-align: left; border-bottom: 1px solid var(--line-2); border-right: 1px solid #F5F7FA; white-space: nowrap; }
th { background: var(--th); color: #4E5969; font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--line); }
th:last-child, td:last-child { border-right: none; }
tbody tr:hover { background: #FAFDFC; }
.row-clickable { cursor: pointer; }

/* ---------------- 工作台（对齐参考页面） ---------------- */
.dash-notice {
  display: flex; align-items: center; gap: 8px;
  background: #FFF6E5; border: 1px solid #FFE0AE; color: #A96B00;
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; font-size: 14px;
}
.dash-notice-close { margin-left: auto; cursor: pointer; color: #C48A2E; }
.dash-head { display: flex; align-items: center; gap: 16px; }
/* 工作台顶部指标卡：2026-10-09 起是**5 张**（初诊/总就诊 · 现金流收入 · 应收/收款 · 充值收入 · 返现抵扣），
   所以这一行固定 5 等分（窄屏仍走下面那条 2 列的兜底） */
.dash-head .kpis { flex: 1; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dash-tools { display: flex; align-items: center; gap: 14px; }
.dash-check { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--sub); }
.dash-check input { width: 14px; height: 14px; }
.gear { color: var(--aux); font-size: 16px; cursor: pointer; }
.mini-avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  border-radius: 50%; background: #E4EFF6; color: #3C6E8F; font-size: 12px; margin-right: 6px;
  vertical-align: middle; flex: none;
}
.link-name { color: #1A2230; cursor: pointer; font-weight: 600; margin-right: 6px; }
.link-name:hover { text-decoration: underline; }
.scr-project-link { color: var(--g-dark); }
.name-cell { white-space: nowrap; }
.dash-table th, .dash-table td { padding: 9px 8px; }
.dash-table th.act-th { text-align: center; font-size: 12px; padding: 8px 2px; min-width: 34px; }
.dash-table td.act-cell { text-align: center; padding: 8px 2px; }
.dash-table td.status-cell { text-align: center; font-weight: 600; }
.act-btn {
  width: 28px; height: 28px; line-height: 1; padding: 0; border-radius: 5px;
  border: 1px solid #B9DCD2; background: #fff; color: var(--g); font-size: 15px; cursor: pointer;
}
.dash-table .act-btn { width: 26px; height: 26px; font-size: 15px; }
/* 「完成的打勾」：这一步已经做过了 —— 绿底勾、不可点（用户 2026-10-12） */
.dash-table .act-btn.ok { display: inline-flex; align-items: center; justify-content: center; border-color: #9fd6b5; background: #e8f7ee; color: #137a3c; cursor: default; font-weight: 700; }
.dash-table td { color: #1A2230; }
.dash-table td .k { color: var(--sub); }
.dash-table th { color: #3C4A5A; }
/* ⚠️ 2026-10-12：这里有过的"把每列 min-width 放开、让文字折行"那套压缩规则**已经撤回** ——
   用户看了直说「比例不协调　感观不佳　这里退回上一次的字段宽度」：压是压进一屏了，但患者姓名、
   预约项目都折成两行、金额被折成「¥7140./00」，比例很难看。现在**字段宽度回到原来的样子**
   （各列按 min-width 撑开，内容不折行），只保留用户明确要的两件事：
   ①「更多」「操作」两列删掉（在 app.js 里）；②左侧「今日待办」收窄到 206px。
   代价是列多时仍会横向滚动 —— 这跟原系统一样（他们那张图底部也有横向滚动条），是"好看"和"一屏放下"之间的取舍。 */

/* 指标卡：按参考图做小一半（矮 + 只占半行宽） */
.dash-head .kpis { flex: none; width: 50%; gap: 8px; }
.dash-head .kpi { padding: 4px 8px; gap: 6px; border-radius: 4px; }
.dash-head .kpi-icon { width: 20px; height: 20px; border-radius: 5px; font-size: 12px; }
/* 一行装下：图标 + 标签 + 数值。标签过长省略号，避免换行把卡片顶高（#59 加了 ⓘ 之后曾涨到 86px）；
   ⚠️ 2026-10-12：省略号只是"最后一道保险"，不该是常态 —— 上面那条把这一行放宽后，5 张卡实测都能完整显示。 */
.dash-head .kpi { flex-wrap: nowrap; align-items: center; }
.dash-head .kpi-label { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dash-head .kpi-label .kpi-info { flex: none; }
.dash-head .kpi-value { font-size: 13px; white-space: nowrap; }
.dash-head .kpi-icon { width: 18px; height: 18px; font-size: 11px; }
.dash-head .kpi-value .unit { font-size: 10px; }
.dash-head .kpi-eye { font-size: 10px; }
.dash-head .page-title span { font-size: 16px; }

/* 左侧今日待办：可折叠、更紧凑 */
.layout-2.side-collapsed { grid-template-columns: 40px 1fr; }
.side-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700;
}
.side-toggle { cursor: pointer; color: var(--aux); font-size: 16px; line-height: 1; }
.side-toggle:hover { color: var(--g); }
.side-panel.collapsed .side-head { justify-content: center; padding: 9px 0; }
.side-panel.collapsed .side-title, .side-panel.collapsed .side-list { display: none; }
.side-list .side-row { cursor: pointer; padding: 9px 12px; }
.side-list .side-row:hover { background: #FAFDFC; }
.side-list .side-row.active { background: var(--g-light); color: var(--g-dark); font-weight: 600; }

/* 自定义设置弹窗（对齐参考产品） */
.modal.modal-lg { width: 1020px; max-width: 94vw; }
.modal-head.modal-head-center { justify-content: center; position: relative; }
.modal-head.modal-head-center .drawer-close { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); }
.set-group-title { font-size: 14px; font-weight: 600; margin: 4px 0 10px; }
.set-group-head { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 10px; }
.set-group-head .set-group-title { margin: 0; }
.set-all { font-size: 12px; color: var(--sub); display: flex; align-items: center; gap: 5px; cursor: pointer; }
.set-fixed { display: flex; gap: 10px; flex-wrap: wrap; }
.set-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.set-fixed .set-item, .set-grid .set-item, .tab-col-grid .set-item {
  display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sub);
  background: #F5F7FA; border-radius: 3px; padding: 7px 9px; cursor: pointer; white-space: nowrap;
}
.set-grid .set-item, .tab-col-grid .set-item { justify-content: space-between; }
.tab-col-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.form-grid.form-grid-2 { grid-template-columns: repeat(2, 1fr); }

/* 家庭信息：客户关系 + 亲友关系图 */
.rel-tools { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.rel-tools .btn { margin-left: auto; }
.rel-chart { display: flex; flex-direction: column; align-items: center; padding: 16px 14px 4px; }
.rel-node { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rel-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: #E4EFF6; color: #3C6E8F;
  display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600;
}
.rel-node.self .rel-avatar { width: 50px; height: 50px; font-size: 19px; background: var(--g-light); color: var(--g-dark); }
.rel-name { font-size: 14px; font-weight: 600; }
.rel-sub { font-size: 12px; color: var(--aux); }
.rel-rel { font-size: 12px; color: var(--g-dark); background: var(--g-light); border-radius: 3px; padding: 1px 7px; }
.rel-line { width: 2px; height: 26px; background: #D7DEE6; position: relative; }
.rel-line::after {
  content: ''; position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%);
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid #D7DEE6;
}

/* 自动生成的标签小图标（对齐原系统：**浅底 + 同色深字**；用户 2026-10-12「底色太显眼了」）
   注意：底/字色由 `tagTint()` 按标签色算出来写在行内样式上，这里的 color 只是兜底。 */
.tag-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px;
  padding: 0 5px; border-radius: 6px; color: #4b5563; font-size: 12px; font-weight: 600;
  margin-right: 4px; vertical-align: middle; white-space: nowrap;
}
.tag-badge:last-child { margin-right: 0; }
.mini-avatar + .link-name + .tag-badge { margin-left: 2px; }
.pl-name .tag-badge { min-width: 20px; height: 20px; font-size: 10px; border-radius: 5px; }
.rel-tags { display: flex; gap: 2px; margin-top: 2px; }
.rel-link { color: var(--g); cursor: pointer; }
.rel-link:hover { text-decoration: underline; }
.rel-node .rel-name.rel-link { color: var(--g); }

/* 性别头像（内联 SVG，男女不同） */
.pa-wrap { position: relative; display: inline-flex; }
.pa { width: 46px; height: 46px; display: block; border-radius: 12px; }
.rel-node.self .pa { width: 54px; height: 54px; }
.pa-sex {
  position: absolute; right: -4px; bottom: -4px; width: 17px; height: 17px; border-radius: 50%;
  color: #fff; font-size: 12px; line-height: 17px; text-align: center; border: 2px solid #fff;
}
.pa-sex.m { background: #5B9BF5; }
.pa-sex.f { background: #EE7BA8; }
.pa.lg { width: 52px; height: 52px; border-radius: 14px; }
.pa-wrap.lg .pa-sex { width: 19px; height: 19px; font-size: 12px; line-height: 19px; }
.pa.sm { width: 38px; height: 38px; border-radius: 10px; }
.pa-wrap.sm .pa-sex { width: 14px; height: 14px; font-size: 10px; line-height: 14px; border-width: 1px; right: -3px; bottom: -3px; }

/* 关系树：患者在上，家属一排在下并连线 */
.rel-trunk { width: 2px; height: 26px; background: #D7DEE6; }
.rel-branch { position: relative; display: flex; justify-content: center; align-items: flex-start; padding-top: 26px; flex-wrap: wrap; }
.rel-child { position: relative; padding: 0 22px; display: flex; flex-direction: column; align-items: center; }
.rel-child::before {
  content: ''; position: absolute; top: -26px; left: 50%; width: 2px; height: 26px; background: #D7DEE6;
}
.rel-child::after {
  content: ''; position: absolute; top: -26px; left: 0; width: 100%; height: 2px; background: #D7DEE6;
}
.rel-child:first-child::after { left: 50%; width: 50%; }
.rel-child:last-child::after { left: 0; width: 50%; }
.rel-child:only-child::after { left: 50%; width: 0; }
.kv-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 20px; padding: 6px 14px 16px; }
.kv-4 .kv { border-bottom: 1px solid var(--line-2); }
.set-item .set-l { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.set-item .set-l { flex: 1; }
.set-item .set-l span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-item .set-n { color: var(--aux); font-size: 12px; margin-left: 8px; flex: none; }
.set-item input { width: 13px; height: 13px; flex: none; }
.set-item.fixed { background: #EDF2F7; cursor: default; }
.tab-col-grid .set-item { gap: 4px; }
.tab-col-grid .set-r { display: flex; align-items: center; gap: 2px; flex: none; }
.tab-col-grid .set-n { margin-left: 0; min-width: 14px; text-align: right; }
.tab-col-grid .set-move { display: inline-flex; gap: 2px; margin-left: 3px; }
.tab-col-grid .set-mv {
  width: 18px; height: 18px; padding: 0; border: 1px solid var(--line); border-radius: 3px;
  background: #fff; color: var(--sub); font-size: 11px; line-height: 1; cursor: pointer;
}
.tab-col-grid .set-mv:hover:not(:disabled) { border-color: var(--g); color: var(--g); }
.tab-col-grid .set-mv:disabled { opacity: .3; cursor: not-allowed; }

/* 编辑标签（患者标签点选器，对齐参考产品） */
/* 标签选择区：**给个最小高度**，标签少的门店也不会缩成一条小条
   （用户 2026-10-09：「最好是弹出编辑标签对话框那么大 这样好选」） */
.tag-pick-body { padding: 0; max-height: 68vh; min-height: 460px; display: flex; }
.tag-pick-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tag-pick-scroll { flex: 1; overflow-y: auto; padding: 0 16px 18px; }
.pick-sec-head { display: flex; align-items: center; gap: 8px; margin: 14px 0 10px; }
.pick-sec-head .bar { width: 3px; height: 14px; background: var(--g); border-radius: 2px; }
.pick-sec-title { font-size: 14px; font-weight: 700; }
.pick-toggle { margin-left: auto; font-size: 12px; color: var(--aux); cursor: pointer; }
.pick-toggle:hover { color: var(--g); }
.pick-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-chip {
  display: inline-block; padding: 6px 12px; border-radius: 4px; background: #F2F5F8; color: #5A6B7B;
  font-size: 12px; cursor: pointer; border: 1px solid transparent; user-select: none;
}
.pick-chip:hover { border-color: var(--g); color: var(--g); }
.pick-chip.on { background: var(--g-light); color: var(--g-dark); border-color: var(--g); font-weight: 600; }
.modal-foot.pick-foot { justify-content: space-between; align-items: center; }
.pick-hint { font-size: 12px; color: var(--sub); display: flex; align-items: center; }
.pick-tip {
  display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px;
  border-radius: 50%; background: #F2A45C; color: #fff; font-size: 10px; margin-right: 6px; flex: none;
}
.pick-btns { display: flex; gap: 10px; }
.tabs-gear { margin-left: auto; align-self: center; cursor: pointer; color: var(--aux); font-size: 16px; padding: 0 8px; }
.tabs-gear:hover { color: var(--g); }

/* 患者标签管理（对齐参考产品弹窗） */
.modal.modal-xl { width: 1180px; max-width: 96vw; }
.tag-lib-body { padding: 0; max-height: 74vh; display: flex; }
.tag-group-pane { width: 190px; flex: none; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.tag-group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700;
}
.tg-ops { display: flex; align-items: center; gap: 8px; }
.tg-op { color: var(--aux); font-size: 14px; cursor: pointer; line-height: 1; }
.tg-op:hover { color: var(--g); }
.tag-group-list { padding: 8px 0; overflow-y: auto; }
.tag-group-item { padding: 9px 14px; font-size: 14px; color: var(--sub); cursor: pointer; border-left: 3px solid transparent; }
.tag-group-item:hover { background: #F7FAF9; }
.tag-group-item.on { background: var(--g-light); color: var(--g-dark); font-weight: 600; border-left-color: var(--g); }
/* 会员卡「会员等级规则 → 升级规则」的结构化条件行（对齐原系统 2026-10-13） */
.mc-rule-row { flex-wrap: wrap; gap: 6px; }
.mc-rule-seg { display: inline-flex; align-items: center; gap: 6px; }
.mc-or { color: var(--sub); padding: 0 4px; }
/* 会员卡列表「等级条件」那一格：折成两三行（对齐原系统，别把表格撑到横向滚动） */
.mc-cond-cell { max-width: 340px; white-space: normal; word-break: break-all; line-height: 1.5; color: #4E5969; }
/* 用户 2026-10-13 图 4：分组行右侧的「✎ 重命名 / 🗑 删除」（平时淡、悬停才明显，别打扰点分组） */
.tag-group-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tag-group-item .tg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-group-item .tg-acts { display: none; gap: 2px; flex: none; }
.tag-group-item:hover .tg-acts { display: inline-flex; }
/* 共享权限的勾选框排一行（用户 2026-10-13 图 2） */
.share-perm { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 4px 0; }
.tag-lib-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tag-lib-tools { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.tag-search {
  flex: 1; max-width: 360px; height: 32px; border: 1px solid var(--line); border-radius: 4px;
  display: flex; align-items: center; padding: 0 10px; gap: 6px; background: #fff;
}
.tag-search input { flex: 1; border: none; outline: none; font-size: 12px; background: transparent; }
.tag-search .ico { color: var(--aux); cursor: pointer; }
.tag-lib-tools .btn-primary { margin-left: auto; }
.tag-lib-tools .btn-outline { margin-left: auto; }
.tag-lib-tools .btn-outline + .btn-primary { margin-left: 8px; }
.tag-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tag-table th { background: var(--th); color: var(--sub); font-weight: 600; font-size: 12px; }
.tag-table th, .tag-table td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); border-right: 1px solid #F5F7FA; text-align: center; }
.tag-table th:first-child, .tag-table td:first-child, .tag-table th:nth-child(2), .tag-table td:nth-child(2) { text-align: left; }
.tag-table th:last-child, .tag-table td:last-child { border-right: none; }
.tag-table td .q { color: var(--aux); font-size: 12px; }
.tag-table .sorter { color: var(--aux); font-size: 12px; }
.tg-drag { color: #B8C4D0; cursor: grab; font-size: 14px; user-select: none; letter-spacing: 1px; }
.tg-drag:active { cursor: grabbing; }
.tag-table tr.dragging { background: #F0F6FF; }
.tag-table tr.drop-target { box-shadow: inset 0 2px 0 var(--g); }
.tag-preview {
  display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px;
  padding: 0 6px; border-radius: 12px; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.tag-table td:last-child { white-space: nowrap; }
.tg-link { color: var(--g); cursor: pointer; font-size: 12px; display: inline-block; margin-right: 16px; }
.tg-link:last-child { margin-right: 0; }
.tg-link:hover { text-decoration: underline; }
.tg-link.danger { color: var(--red); }
.tg-page {
  display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px;
  border: 1px solid var(--line); border-radius: 4px; cursor: pointer; color: var(--sub); font-size: 12px;
}
.tg-page:hover { border-color: var(--g); color: var(--g); }
.tg-page.on { background: var(--g); border-color: var(--g); color: #fff; font-weight: 600; }

/* ---------------- 会员体系（对齐参考产品「诊所营销」） ---------------- */
.menu-parent {
  display: flex; align-items: center; gap: 5px; height: 36px; padding: 0 6px 0 8px;
  color: #B8C4D0; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.menu-parent:hover { background: rgba(255,255,255,.06); color: #fff; }
.menu-parent .menu-label { flex: 1; }
.menu-caret { font-size: 10px; color: #7E8C9A; }
.menu-children { background: rgba(0,0,0,.16); }
.menu-item.menu-child { height: 32px; padding-left: 18px; font-size: 12px; }
.menu-item.menu-child .menu-icon { width: 18px; height: 18px; font-size: 10px; }

.mc-tabs { display: flex; gap: 10px; margin-bottom: 14px; }
.mc-tab {
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 4px; font-size: 12px;
  color: var(--sub); cursor: pointer; background: #fff;
}
.mc-tab.on { background: var(--g); border-color: var(--g); color: #fff; }
.mc-panel { padding: 0 14px 6px; }
/* 会员卡弹窗（对齐原系统 2026-10-13）：段标题=浅灰带 + **左侧绿条**、标签灰、字号与行距贴原系统 */
.mc-title { font-size: 14px; font-weight: 600; color: #1d2129; background: #F5F7FA; padding: 9px 12px; border-left: 3px solid var(--g); border-radius: 2px; margin-bottom: 14px; }
.mc-sub { font-size: 14px; font-weight: 600; color: #1d2129; margin: 18px 0 8px 14px; }
.mc-row { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; padding-left: 14px; font-size: 14px; color: #1d2129; flex-wrap: wrap; }
.mc-row.mc-indent { padding-left: 40px; }
.mc-label { color: #4E5969; min-width: 96px; }
.mc-req { color: var(--red); margin-right: -4px; }
.mc-in { height: 32px; font-size: 13px; }
.mc-live { color: #4E5969; font-size: 13px; }
.mc-tip { font-size: 12px; color: #86909C; }
.mc-right { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 8px; }
.sw {
  width: 40px; height: 20px; border-radius: 10px; background: #D7DEE6; position: relative; flex: none; cursor: pointer;
}
.sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.sw.on { background: #37B77E; }
.sw.on::after { left: 22px; }
/* 折扣 / 赠送 / 充值 / 开卡礼包那几张表：**全边框**（原系统是带网格的表格），表头浅灰 */
.scheme-tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0 0 6px 14px; border: 1px solid #E5E6EB; }
.scheme-tbl th { background: #F5F7FA; color: #4E5969; font-weight: 600; padding: 8px 10px; text-align: left; border: 1px solid #E5E6EB; font-size: 13px; }
.scheme-tbl td { padding: 6px 8px; border: 1px solid #E5E6EB; }
.scheme-tbl .mc-cell { height: 28px; border-color: transparent; background: transparent; }
.scheme-tbl .mc-cell:focus { border-color: var(--g); background: #fff; }
.mc-cell { height: 28px; width: 100%; min-width: 70px; }

/* ---------------- 处置收费（对齐参考产品） ---------------- */
/* 收费页签 */
.bs-row { display: grid; grid-template-columns: repeat(5, 1fr) auto; gap: 10px; align-items: center; }
.bs-card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px; }
.bs-l { font-size: 12px; color: var(--aux); }
.bs-v { font-size: 24px; font-weight: 700; color: #1A2230; }
.bs-v.red { color: #E64545; }
.bs-sub { margin-top: 2px; min-height: 16px; }
.bs-link { color: var(--g); font-size: 12px; cursor: pointer; margin-right: 12px; }
.bs-link:hover { text-decoration: underline; }
.bs-link.danger { color: var(--red); }
.bs-tools { display: flex; align-items: center; gap: 8px; }
.bs-eye { color: var(--aux); cursor: pointer; }
.bs-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.bs-f-label { color: var(--sub); }
.bs-date { width: 128px; height: 30px; }
.bill-card { border: 1px solid var(--line); border-radius: 6px; margin-top: 12px; overflow: hidden; }
.bill-card.bill-voided { border-style: dashed; background: #FAFAFA; opacity: .82; }
.bill-card.bill-voided .bill-head { background: #F3F4F6; }
.bill-head { padding: 10px 14px; background: #F7FAFC; border-bottom: 1px solid var(--line); }
.bill-h-row { display: flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 6px; flex-wrap: wrap; }
.bill-h-row .k { color: var(--aux); }
.bill-h-row .v { color: #1A2230; margin-right: 22px; }
.bill-h-row .v.red { color: #E64545; font-weight: 600; }
.bill-acts { margin-left: auto; display: flex; align-items: center; gap: 10px; }
/* 账单卡的「⌃ 收起 / ⌄ 展开」（用户 2026-10-09 图 1，对齐原系统） */
.bill-fold { font-size: 12px; color: var(--sub); cursor: pointer; white-space: nowrap; user-select: none; }
.bill-fold:hover { color: var(--g); }

/* 收费弹窗 */
.bm-patient { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.bm-p-name { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.bm-p-meta { display: flex; gap: 18px; margin-left: auto; font-size: 12px; color: var(--sub); flex-wrap: wrap; }
.bm-hint { font-size: 12px; color: var(--sub); margin-bottom: 10px; }
.bm-sum { display: flex; gap: 34px; align-items: flex-end; padding: 12px 0; border-top: 1px dashed var(--line); margin-top: 12px; }
.bm-sum-right { margin-left: auto; display: flex; align-items: baseline; gap: 10px; }
.bm-sum3 { display: flex; gap: 60px; padding: 12px 0; }
.pay-tabs { display: flex; align-items: center; gap: 6px; margin: 8px 0; }
.pay-tab { padding: 6px 18px; font-size: 14px; background: #F5F7FA; border-radius: 4px; cursor: pointer; color: var(--sub); }
.pay-tab.on { background: #FFF3E4; color: #C77800; font-weight: 600; }
.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pay-cell { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; font-size: 14px; }
.pay-name { flex: none; min-width: 56px; color: var(--sub); }
.pay-in { flex: 1; height: 28px; min-width: 60px; }
.pay-unit { color: var(--aux); font-size: 12px; }
.pay-bal { color: var(--aux); font-size: 12px; }
/* 储值账本（2026-10-09）：收款格子里填的储值金额**超过余额**时把这行标红（真正拦在服务端） */
.pay-bal.over { color: #d93025; font-weight: 600; }
.bm-remark { margin-top: 10px; }
.bm-warn { background: #F5F7FA; border-radius: 4px; padding: 10px 12px; font-size: 12px; color: var(--sub); line-height: 1.9; }
.tx-block { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 14px; overflow: hidden; }
.tx-block-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #F7FAFC; font-size: 14px; }
.print-pick { display: flex; gap: 16px; flex-wrap: wrap; }
.print-card { flex: 1; min-width: 260px; border: 1px solid var(--line); border-radius: 6px; padding: 18px; display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.print-card:hover { border-color: var(--g); }

/* 组合处置设置 */
/* 树头（费用类型 ⊕ ↑ ↓）吸在左树顶部：左树自己滚的时候它不跟着走 */
.ci-tree-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; position: sticky; top: 0; background: #fff; z-index: 2; }
/**
 * 左树的展开/收起三角（用户 2026-10-17 图 1：红圈圈住「治疗」前面那颗小三角，批注
 *   「**这个键太小了**」+「**这里的下拉很不灵敏**」；同一张图里他圈了**处置框**的左树夸
 *   「这里很灵敏 按键也刚刚好那么大」）。
 * → 原来 `.ci-arrow` **根本没有样式**：就是一个小字形（约 8px 宽），点起来十次有三次点空。
 *   现在跟处置框那颗（`.tx-arrow`：18px 宽 + hover 底色）对齐，并给它上下各 4px 内边距把热区做大
 *   （负 margin 抵消，行高不变）。
 */
.ci-arrow {
  flex: none; width: 20px; text-align: center; font-size: 15px; line-height: 1;
  padding: 4px 0; margin: -4px 0; cursor: pointer; color: var(--aux);
  user-select: none; border-radius: 3px;
}
.ci-arrow:hover { color: var(--g); background: var(--g-light); }
.ci-type.ci-minor { padding-left: 32px; font-size: 12px; }
/* 三级「费用分类」：原来没有这条规则 → 用了基础样式的 16px，缩进**比二级还浅**，层级看着是反的。
   按「一级 16 / 二级 32 / 三级 48」排开。 */
.ci-type.ci-leaf { padding-left: 48px; font-size: 12px; }
/* 库存分类换成**真三级嵌套**（2026-10-16）：一级 16 / 二级「费用类型」32 / 三级「物品小类」48 */
.ci-type.ci-fee { padding-left: 32px; font-size: 12px; }
.ci-type.ci-fee.is-muted .ci-name { color: var(--aux); }
.ci-type.ci-fee .ci-name { color: var(--sub); }
/* 右表「费用类型（二级）」那格：一级行是汇总（浅灰）、三级行没填就标红提示 */
.sc-fee-sum { color: var(--aux); font-size: 12px; }
.sc-fee { font-size: 12px; }
.sc-fee.is-empty { color: #d4380d; }
/* 四级「处置名称」= 收费项本身（2026-10-16 用户图 1：「在这里加多一个可编辑的下级（处置名称）」）。
   一级 16 / 二级 32 / 三级 48 / 四级 64，逐层缩进。 */
.ci-type.ci-leaf4 { padding-left: 64px; font-size: 12px; color: var(--aux); }
.ci-type.ci-leaf4 .ci-name { color: var(--sub); }
/* （`ci-leaf4-empty`「（还没有处置名称，点 ＋ 添加）」那行占位 2026-10-16 已按用户要求去掉，规则一起删） */
.ci-tree-tip { margin: 10px 14px 3px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 11px; color: var(--aux); line-height: 1.5; }
.cb-card { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 14px; overflow: hidden; }
.cb-head { display: flex; align-items: center; padding: 10px 14px; background: #F5F7FA; font-size: 14px; }
.cb-title { font-weight: 700; }
.cb-acts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.cb-collapse { color: var(--sub); font-size: 12px; cursor: pointer; }
.ct-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 14px; }

.tx-toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tx-date { width: 140px; height: 30px; }
.tx-kw { width: 200px; height: 30px; }
.tx-collapse { font-size: 12px; color: var(--g); cursor: pointer; }
.tx-toolbar .tx-add { margin-left: auto; }
.tx-order { border: 1px solid var(--line); border-radius: 6px; margin: 12px 14px; overflow: hidden; }
.tx-order-head { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: #E7F7EF; font-size: 14px; color: #1F2D3D; flex-wrap: wrap; }
.tx-order-head .tx-check { color: #37B77E; font-weight: 700; }
.tx-order-head .tx-visit { font-weight: 600; }
.tx-order-head .tx-vtype { color: var(--g-dark); }
.tx-order-head .tx-meta { color: var(--sub); }
.tx-order-head .tx-order-acts { margin-left: auto; display: flex; gap: 8px; }
.tx-order-head .tx-charge { font-weight: 700; color: #1F2D3D; }
.tx-order-body { padding: 12px 14px 16px; }
.tx-diag { font-size: 14px; margin-bottom: 10px; }
.tx-diag .k, .tx-remark .k { color: var(--sub); }
.tx-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.tx-table th { background: var(--th); color: var(--sub); font-weight: 600; padding: 9px 10px; text-align: left; }
.tx-table td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); }
.tx-remark { font-size: 14px; margin-top: 10px; }

.modal.modal-xxl { width: 1420px; max-width: 97vw; }
.tx-body { padding: 0; max-height: 74vh; display: flex; }
.tx-main { flex: 1; min-width: 0; overflow-y: auto; padding: 14px 16px; }
.tx-side { width: 300px; flex: none; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.tx-side-tabs { padding: 0 12px; gap: 14px; }
.tx-side-tabs .tab { padding: 10px 0; font-size: 12px; }
.tx-tree-search { display: flex; align-items: center; gap: 6px; padding: 10px 12px; }
.tx-tree-search .input { flex: 1; height: 28px; }
.tx-tree { flex: 1; overflow-y: auto; padding: 0 8px 12px; }
/* 处置框左树跟「处置收费项设置」同一套四级：项目大类 ▸ 费用类型 ▸ 费用分类 ▸ 处置名称
   （用户 2026-10-16：「处置框那里还没有同步」）→ 多一档缩进 `.tx-tree-sub2`。 */
.tx-tree-group, .tx-tree-sub { font-size: 12px; font-weight: 600; color: var(--sub); padding: 7px 8px 3px; }
.tx-tree-sub { padding-left: 16px; color: #4A5A6A; }
.tx-tree-sub2 { font-size: 12px; font-weight: 600; color: var(--aux); padding: 6px 8px 3px 28px; }
.tx-tree-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; padding: 6px 8px 6px 40px; border-radius: 4px; cursor: pointer; }
.tx-tree-item span:first-child { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ↑↓「调顺序」（用户 2026-10-16：「做个升降」）—— 鼠标停到那一行才出现，平时不占视觉 */
.tx-ops { display: none; flex: none; gap: 2px; margin-left: 4px; }
.tx-tree-group:hover .tx-ops, .tx-tree-sub:hover .tx-ops, .tx-tree-sub2:hover .tx-ops, .tx-tree-item:hover .tx-ops { display: inline-flex; }
.tx-op { font-size: 12px; line-height: 1; color: var(--aux); cursor: pointer; padding: 1px 3px; border-radius: 3px; }
.tx-op:hover { color: var(--g); background: var(--g-light); }
.tx-tree-item:hover { background: var(--g-light); }
.tx-tree-price { color: var(--aux); font-size: 12px; }
.tx-head-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 14px; margin-bottom: 14px; }
.tx-h label { display: block; font-size: 12px; color: var(--sub); margin-bottom: 4px; }
.tx-h .input { width: 100%; height: 30px; }
.tx-h .tx-required { border-color: #E64545 !important; box-shadow: 0 0 0 1px rgba(230,69,69,.22); }
.tx-nurse-hint { margin-top: 3px; color: #8A94A6; font-size: 11px; line-height: 1.45; }
.tx-h-wide { grid-column: span 2; }
.tx-edit-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.tx-edit-table th { background: var(--th); color: var(--sub); font-weight: 600; padding: 8px 6px; text-align: left; white-space: nowrap; }
.tx-edit-table td { padding: 6px; border-bottom: 1px solid var(--line-2); }
.tx-cell { height: 28px; width: 100%; min-width: 64px; font-size: 12px; }
/* 用户 2026-10-09 图 2：「这里显示不全」—— 明细表第 2 列是「项目」，里面的下拉装不下长项目名
   （如「手工龈下刮治」）。给这一列单独撑开最小宽度；整张表在弹窗里横向滚动，不挤压别的列。 */
/* ⚠️ 2026-10-12：明细表多了「材料」列之后整表更挤，「项目」列内的下拉被压到 159px
   （验收脚本卡在 <160 就红）。这里把「项目」列再放宽一档，保证下拉 ≥168px。 */
.tx-edit-table th:nth-child(2), .tx-edit-table td:nth-child(2) { min-width: 230px; }
/* ⚠️ 2026-10-16 用户图：「（牙位格）这个收窄一些 **让出位置给项目框**　项目框已经显示不全了」
   —— 第 1 列（牙位）原来放着"上下叠"的十字牙位图 + 输入框 → 被撑到 224px。
   十字保留（用户：「十字架要保留」）、但与输入框横排，列宽收到 170px，让出的宽度给「项目」列。 */
/* 2026-10-17：牙位格只剩十字（输入框撤了）→ 这一列再收到 116px，多出来的宽度归「项目」列 */
.tx-edit-table th:nth-child(1), .tx-edit-table td:nth-child(1) { min-width: 116px; }
/* 用户 2026-10-16 图 3：「**医生显示不全**」—— 明细行第 9 列是「医生」，原来只有通用的 64px，
   三个字的名字（黄明珠 / 林安然）会被挤到看不全。跟项目列一个打法：给它一个最小宽度，
   整表在弹窗里横向滚动（`.tx-items{overflow-x:auto}`），不挤压别的列。 */
.tx-edit-table th:nth-child(9), .tx-edit-table td:nth-child(9) { min-width: 104px; }
.tx-items { overflow-x: auto; }
/* 「项目说明」开关（处置弹窗右侧，项目树上方） */
.tx-note-toggle { display: flex; align-items: center; gap: 6px; margin: 8px 10px 0; font-size: 12px; color: var(--sub); cursor: pointer; user-select: none; }
.tx-note-toggle input { margin: 0; }
/* 「价格构成 / 计价说明」说明卡片（用户 2026-10-16 图 3：鼠标停 1 秒出个弹窗；
   随后又补一句：「**放到中间，直观一些**」→ 从"贴着鼠标的小气泡"改成**屏幕正中一张大卡片**）
   挂在 body 上、`position:fixed` —— 处置弹窗里那两块都是 `overflow:auto`，放里面会被裁掉。 */
.tx-note-pop { position: fixed; z-index: 3000; width: 620px; max-width: calc(100vw - 40px); max-height: 70vh; overflow: auto; padding: 16px 20px 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 44px rgba(0, 0, 0, 0.24); font-size: 13px; line-height: 1.85; color: #333; }
.tx-note-pop .tx-note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--line-2); }
.tx-note-pop .tx-note-t { flex: 1; font-weight: 700; font-size: 15px; color: #1d2129; }
.tx-note-pop .tx-note-x { color: var(--aux); cursor: pointer; font-size: 14px; line-height: 1; }
.tx-note-pop .tx-note-x:hover { color: #d4380d; }
.tx-note-pop .tx-note-sec { margin-top: 12px; }
.tx-note-pop .tx-note-sec:first-of-type { margin-top: 0; }
.tx-note-pop .tx-note-sec b { display: block; color: var(--g-dark); margin-bottom: 3px; font-size: 13px; }
.tx-note-pop .tx-note-sec span { display: block; color: #56636f; }
/* 报表中心：长文本单元格截断 + 悬停看全文（2026-10-16；起因是提成表「四级」那列塞了整段病历原文） */
.rc-tx { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; cursor: help; }
/* 处置项目树：箭头 / 分类名都要可点（原来只是文字，点了没反应） */
.tx-arrow { display: inline-block; width: 18px; cursor: pointer; color: var(--sub); user-select: none; }
.tx-arrow:hover { color: var(--g); }
.tx-cat { cursor: pointer; }
.tx-cat:hover { color: var(--g); text-decoration: underline; }
.tx-tooth { min-width: 0; flex: 1 1 auto; }
/* 处置明细的「牙位格」（照原系统那张图做的，2026-10-12）：十字（横线分上下颌、竖线分左右），
   四个格里**只写"序号"**（12 → 2、46 → 6，象限数字不写），多颗连着写；
   点十字弹牙位图选牙；下面那个输入框保留（能直接敲、也方便看完整牙号）。 */
/* 2026-10-16 用户图：「这个收窄一些 让出位置给项目框」+「十字架要保留」；
   2026-10-17 图 3：「**不要在这里显示牙位了呀**」（圈的是那个输入框）
   → 明细行里**只剩十字牙位图**（点它弹「选择牙位」弹窗），值走隐藏 input。
   输入框一撤，这一列又能再收一档（170 → 116px），宽度全让给「项目」列。 */
.tx-tooth-cross { display: flex; align-items: center; justify-content: center; }
.tx-tooth-cross .ttc-grid { flex: 0 0 auto; width: 76px; height: 30px; margin: 0; }
.ttc-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; width: 84px; height: 34px; cursor: pointer; flex: 0 0 auto; }
.ttc-grid::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #2b3a4a; }
.ttc-grid::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: #2b3a4a; }
.ttc-q { display: flex; align-items: center; justify-content: center; font-size: 11px; line-height: 1; letter-spacing: 1px; color: #c3c8cf; overflow: hidden; white-space: nowrap; }
.ttc-q.on { color: #137a3c; font-weight: 600; }
.ttc-grid:hover .ttc-q { background: #f2f7f4; }
/* 表格/详情里的"只读"十字四格：不可点，鼠标不用变手型（2026-10-14） */
.ttc-static { cursor: default; }
.ttc-static:hover .ttc-q { background: transparent; }
.ttc-sync { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; cursor: pointer; }
.ttc-sync input { margin: 0; }
.tx-num { min-width: 70px; text-align: right; }
.tx-unit { min-width: 56px; }
.tx-mat-cell { white-space: nowrap; }
.tx-mat-btn { white-space: nowrap; }
.tx-mat-btn.has { background: #e8f7ee; border-color: #b7e3c6; color: #137a3c; }
.tx-mat-list { margin-top: 10px; }
/* 材料弹窗：左边分类树 + 右边商品表（对齐原系统那个"耗材分类树"） */
.mt-wrap { display: flex; gap: 12px; margin-top: 10px; align-items: flex-start; }
.mt-tree { flex: 0 0 152px; width: 152px; max-height: 322px; overflow-y: auto; border-right: 1px solid var(--line-2); padding-right: 6px; }
.mt-cat { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; color: #4A5A6A; padding: 6px 8px; border-radius: 4px; cursor: pointer; }
.mt-cat:hover { background: var(--g-light); }
.mt-cat.on { background: var(--g-light); color: var(--g); font-weight: 600; }
.mt-cat .n { color: var(--aux); font-size: 11px; }
.mt-list { flex: 1; min-width: 0; }
.tx-mat-list .tx-mat-row { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 4px 0; border-bottom: 1px dashed var(--line-2); }
.tx-mat-list .tx-mat-row:last-child { border-bottom: 0; }
.tx-mat-qty { width: 74px; height: 26px; }
.tx-sub { font-weight: 600; }
.tx-add-row { margin: 10px 0 16px; }
.tx-summary { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 14px; margin-bottom: 14px; }
.tx-summary b { color: #1F2D3D; }
.tx-inline { width: 90px; height: 28px; display: inline-block; }
.tx-inline-wide { width: 240px; }
.tx-coupon { border-top: 1px dashed var(--line); padding-top: 10px; }
.tx-coupon-tabs { padding: 0; gap: 18px; border-bottom: 1px solid var(--line); }
.tx-coupon-tabs .tab { padding: 8px 0; font-size: 12px; }
/* 「现金类」页签那行会员卡状态（有卡/无卡 + 折扣是否已自动套用） */
.tx-card-row { font-size: 12px; color: var(--sub); padding: 8px 0 2px; }
.tx-card-row.on { color: #137a3c; font-weight: 600; }
.tx-coupon-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; font-size: 14px; flex-wrap: wrap; }
.modal-foot.tx-foot { justify-content: space-between; align-items: center; }
.tx-total { font-size: 14px; color: var(--sub); }
.tx-total b { font-size: 22px; color: #E64545; }
.tx-foot-btns { display: flex; gap: 10px; }

/* ⚠️ 用户 2026-10-16 图（"点到那里 什么也看不到"）的根因就在这两行：
   flex 默认 `align-items: stretch` → 左树多高、右栏就被拉到多高（195 条字典时实测 **3672px**），
   而左树**自己不滚** → 想点树里靠下的节点（正畸 ▸ 常用）只能把**整页**滚下去
   （实测 pageScroll=2965、右表被顶到 y=-2700）→ 右栏那一片就全是白的。
   修法：① 两栏各自 flex-start；② 左树吸在顶栏下面、自己滚 —— 右表永远在屏幕上。 */
.ci-layout { display: flex; min-height: 520px; align-items: flex-start; }
/* 190 → 240px：四级上来之后一行是「名字（n）✎ ＋ 🗑」，190/220 都会把名字挤成"根管治…"（2026-10-16） */
.ci-tree {
  width: 240px; flex: none; border-right: 1px solid var(--line);
  position: sticky; top: 66px; max-height: calc(100vh - 84px); overflow-y: auto; overscroll-behavior: contain;
}
.ci-tree-title { font-size: 14px; font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ci-tree-body { padding: 8px 0; }
.ci-type { font-size: 14px; color: var(--sub); padding: 8px 16px; cursor: pointer; }
/* 分类树每一行：名字在左、操作图标**左右并排**贴右边（用户 2026-10-14：「这里的排列以左右为好」
   —— 原来 ✎ / 🗑 挤在名字下面折行，现在强制一行、图标横排）。 */
.ci-type { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.ci-type .ci-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-type .ct-node-ops { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding-left: 6px; }
.ci-type:hover { background: #F7FAF9; }
.ci-type.on { background: var(--g-light); color: var(--g-dark); font-weight: 600; }
.ci-type.ci-unclassified { color: #b26a00; }
.ci-type.ci-unclassified.on { background: #fff3d9; color: #9a5c00; }
.ci-main { flex: 1; min-width: 0; padding: 12px 14px; }

.page-tabs { border-bottom: 1px solid var(--line); gap: 26px; }
.page-tabs .tab { padding: 12px 0; font-size: 14px; }
.bar { display: inline-block; width: 3px; height: 13px; background: var(--g); border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* 会员客户管理 · 统计卡 */
.mstat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.mstat { border-radius: 6px; padding: 14px 16px; display: flex; align-items: center; gap: 18px; }
.mstat.m-green { background: #E7F7EF; }
.mstat.m-orange { background: #FFF3E4; }
.mstat.m-pink { background: #FDE9F1; }
.mstat-main { min-width: 130px; }
.ms-label { font-size: 12px; color: #6B7A88; }
.ms-value { font-size: 26px; font-weight: 700; color: #1A2230; line-height: 1.25; }
.ms-unit { font-size: 12px; font-weight: 400; color: #6B7A88; margin-left: 3px; }
.mstat-sub { padding-left: 16px; border-left: 1px solid rgba(0,0,0,.08); text-align: left; }
.mss-v { font-size: 16px; font-weight: 600; color: #1A2230; }
.mss-l { font-size: 12px; color: #6B7A88; margin-top: 2px; }

/* 子列表 */
.sub-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sub-kw { width: 280px; height: 30px; }
.sub-tools .sub-add { margin-left: auto; }
.card-sub-tabs, .carditem-tabs { display: flex; align-items: center; gap: 10px; }
.ci-tab {
  display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 4px;
  font-size: 12px; color: var(--sub); cursor: pointer; background: #fff;
}
.ci-tab.on { background: var(--g); border-color: var(--g); color: #fff; }

/* 患者档案 · 会员信息 */
.member-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px; }
.acct-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.acct-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.acct-ico { width: 20px; height: 20px; border-radius: 5px; color: #fff; font-size: 12px; font-style: normal; display: inline-flex; align-items: center; justify-content: center; }
.acct-acts { display: flex; align-items: center; gap: 14px; }
.acct-act { font-size: 12px; color: var(--g); cursor: pointer; }
.acct-act:hover { text-decoration: underline; }
.acct-balance { display: flex; align-items: baseline; gap: 12px; padding: 14px 14px 4px; }
.ab-l { font-size: 14px; color: var(--sub); }
.ab-v { font-size: 24px; font-weight: 700; }
.acct-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 10px; padding: 10px 14px 16px; }
.acct-metric { text-align: left; }
.am-v { font-size: 16px; font-weight: 600; }
.am-l { font-size: 12px; color: var(--aux); margin-top: 3px; }
.card-layout { display: grid; grid-template-columns: 330px 1fr; gap: 16px; padding: 14px; }
.card-info { background: #FFF6E5; border-radius: 6px; padding: 14px 16px; }
.ci-row { font-size: 14px; margin-bottom: 9px; display: flex; }
.ci-row .k { color: #A96B00; width: 86px; flex: none; }
.ci-row .v { color: #1A2230; }
.ci-row .ci-edit { margin-left: auto; color: var(--g); font-size: 12px; cursor: pointer; }
.ci-row .ci-edit:hover { text-decoration: underline; }
.acct-act.danger-act { color: var(--red); }
.card-schemes { min-width: 0; }
.scheme-block { margin-bottom: 16px; }
.scheme-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.scheme-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.scheme-table th { background: var(--th); color: var(--sub); font-weight: 600; padding: 8px 10px; text-align: left; }
.scheme-table td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); }

/* 会员卡配置 / 积分规则 */
.cfg-row, .pr-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; font-size: 14px; }
.cfg-label, .pr-l { color: var(--sub); font-size: 14px; }
.cfg-opts { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cfg-opt { display: inline-flex; align-items: center; gap: 5px; color: var(--sub); font-size: 14px; cursor: pointer; }
.cfg-tip, .pr-desc { font-size: 12px; color: var(--aux); }
.pr-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.pr-in { width: 90px; height: 30px; text-align: center; }
.pr-in-wide { width: 220px; height: 30px; }
.switch {
  width: 38px; height: 20px; border-radius: 10px; background: #D7DEE6; position: relative; flex: none;
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
}
.switch.on { background: #37B77E; }
.switch.on::after { left: 20px; }

.tag-edit-list .tag-pill {
  display: inline-flex; align-items: center; gap: 6px; background: #EEF4FF; color: #3E6FD4;
  font-size: 12px; padding: 3px 8px; border-radius: 3px;
}
.tag-edit-list .tag-pill.vip { background: #FFF1DC; color: #C57C10; }
.tag-edit-list .tag-pill.debt { background: #FDECEC; color: var(--red); }
.tag-edit-list .tag-pill .x { cursor: pointer; color: inherit; opacity: .7; }
.tag-edit-list .tag-pill .x:hover { opacity: 1; }
.tag-add { display: flex; gap: 8px; margin-top: 12px; }
.tag-add .input { flex: 1; height: 32px; }
.act-btn:hover { background: var(--g-light); border-color: var(--g); }
.act-btn.danger { border-color: #F2C4C4; color: var(--red); }
.act-btn.danger:hover { background: #FDECEC; border-color: var(--red); }
.act-btn.wide { width: auto; padding: 0 12px; font-size: 13px; }
.goto-input { width: 56px; height: 28px; text-align: center; }
td.st { font-weight: 600; }
.st-green { background: var(--g-light); color: var(--g-dark); }
.st-red { background: #FDECEC; color: var(--red); }
.st-orange { background: #FFF3E4; color: var(--orange); }
.st-blue { background: #EAF1FE; color: var(--blue); }
.st-gray { background: #F1F5F9; color: var(--sub); }
.muted { color: var(--aux); }
.mono { font-family: inherit; font-variant-numeric: tabular-nums; font-size: 12px; }
.empty-row { text-align: center; color: var(--aux); padding: 46px 0 !important; }
.tagchip { display: inline-block; font-size: 12px; padding: 1px 6px; border-radius: 3px; background: #EEF4FF; color: #3E6FD4; margin-right: 4px; }
.tagchip.vip { background: #FFF1DC; color: #C57C10; }
.tagchip.debt { background: #FDECEC; color: var(--red); }
.tag-add-chip { background: #fff; border: 1px dashed var(--g); color: var(--g); cursor: pointer; }
.tag-add-chip:hover { background: var(--g-light); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 14px; color: var(--sub); font-size: 12px; }
.pager .page-no { color: var(--g); font-weight: 600; }

/* ---------------- 抽屉 ---------------- */
.drawer-mask { position: fixed; inset: 0; background: rgba(27,39,53,.45); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 26px; }
.drawer { width: 1180px; max-width: 96vw; background: #fff; height: auto; max-height: 88vh; border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 18px 56px rgba(15,26,38,.28); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 700; }
.drawer-extra { margin-left: auto; margin-right: 14px; font-size: 12px; font-weight: 400; }
.drawer-close { cursor: pointer; color: var(--aux); font-size: 16px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.drawer-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
/* 患者「新增 / 编辑」表单对齐原系统：字段改成四格一行（原来三格，字段多要往下滚） */
.form-grid.form-grid-4 { grid-template-columns: repeat(4, 1fr); gap: 0 16px; }
.form-grid.form-grid-4 .form-row.full { grid-column: span 2; }
.form-grid.form-grid-4 .form-row.full-wide { grid-column: 1 / -1; }
/* 四格布局下把行距和文本域压一点：整张患者表单刚好一屏，不用往下滚 */
/* 行距 / 多行框高度：原来 8px + 36px 太挤（用户 2026-10-14「看不顺眼」）→ 12px + 52px 更透气，
   整张表单依然一屏放得下（抽屉给了 95vh）。 */
.form-grid.form-grid-4 .form-row { margin-bottom: 12px; }
.form-grid.form-grid-4 textarea { min-height: 52px; }
/* 四列表单里带「0/50」计数器的输入框：右边留出计数位置，值不会和计数叠在一起
   （技加工 2026-10-17 图里「色号 A2」右边那一小块就是这么挤出来的） */
.form-grid.form-grid-4 .fr-ctl:has(.f-count) > input,
.form-grid.form-grid-4 .fr-ctl:has(.f-count) > textarea { padding-right: 46px; }
/* 技加工表单不显示字数计数（用户 2026-10-17 图：「这些字影响美观」） */
.drawer-mask.lab-drawer .f-count { display: none !important; }
.drawer-mask.lab-drawer .drawer { width: 1320px; max-height: 92vh; }
.drawer-mask.lab-drawer .drawer-body { padding: 20px 24px 24px; }
.drawer-mask.lab-drawer .form-grid.form-grid-4 .form-row { margin-bottom: 16px; }
.drawer-mask.lab-drawer .form-row > label { margin-bottom: 7px; }
.drawer-mask.lab-drawer .form-row input,
.drawer-mask.lab-drawer .form-row select { min-height: 38px; }
.drawer-mask.lab-drawer .form-grid.form-grid-4 textarea { min-height: 64px; }
.drawer-mask.lab-drawer .form-grid.form-grid-4 .fr-ctl:has(.f-count) > input,
.drawer-mask.lab-drawer .form-grid.form-grid-4 .fr-ctl:has(.f-count) > textarea { padding-right: 10px; }
.lab-design-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.lab-design-tools .lab-design-cap { flex: none; font-size: 12px; color: var(--sub); }
.lab-design-tools .lab-design-sel { flex: 0 1 480px; min-width: 240px; max-width: 60%; }
.lab-qr-row .lab-qr-ctl { display: flex; align-items: flex-start; gap: 12px; }
.lab-qr-box { width: 86px; height: 86px; flex: none; border: 1px dashed #c9d2dd; border-radius: 8px; background: #fafbfd; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
.lab-qr-box:hover { border-color: var(--g); background: #f5fbf8; }
.lab-qr-box img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.lab-qr-box #labQrEmpty { font-size: 12px; color: #9aa6b5; }
.lab-qr-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.lab-qr-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lab-qr-actions .muted { font-size: 12px; }
.lab-qr-linkline { display: flex; align-items: center; gap: 7px; }
.lab-qr-linkline .input { flex: 1; min-width: 0; }
.lab-dict-tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.lab-dict-table { width: 100%; border-collapse: collapse; }
.lab-dict-table th { background: #f5f7fb; color: var(--sub); font-size: 12px; font-weight: 600; text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
.lab-dict-table td { padding: 6px 8px; border-bottom: 1px solid #eef1f5; }
.lab-dict-table .input { width: 100%; }
.pb-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fu-today-table td { vertical-align: top; }
.fu-today-table .fu-actions { white-space: nowrap; }
.fu-today-table .fu-actions .btn-mini { margin-right: 3px; }
.fu-col-mode { display: flex; align-items: center; gap: 18px; padding: 6px 2px 14px; font-size: 13px; }
.fu-col-mode label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.fu-col-fixed { border: 1px dashed #c9d2dd; border-radius: 6px; padding: 10px 12px; margin-bottom: 16px; background: #fafbfd; display: flex; align-items: center; gap: 10px; }
.fu-col-fixed .muted { font-size: 12px; }
.fu-fixed-chip { margin-left: auto; padding: 3px 10px; border: 1px solid #d9e0e8; border-radius: 4px; background: #fff; font-size: 12px; color: #666; }
.fu-col-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px 12px; }
.fu-col-item { display: flex; align-items: center; gap: 6px; border: 1px solid #e1e6ed; border-radius: 4px; padding: 7px 8px; font-size: 12px; background: #fff; }
.fu-col-item input { margin: 0; }
.fu-col-item span { flex: 1; min-width: 0; }
.fu-col-item em { color: #b6c0cc; font-style: normal; font-size: 11px; }
.modal.fu-exec-modal { width: 1180px; max-width: 96vw; height: 86vh; }
.fu-exec-modal .modal-body { padding: 0; overflow: hidden; }
.fu-exec-layout { display: flex; height: calc(86vh - 112px); min-height: 420px; }
.fu-exec-history { width: 290px; flex: none; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: #f7fafc; }
.fu-exec-tabs { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 10px 8px; border-bottom: 1px solid var(--line); background: #16a6b6; }
.fu-exec-tablist { display: flex; align-items: center; gap: 4px; }
.fu-exec-tablist > span[data-fuehtab] { flex: 1; color: #eafcff; padding: 6px 7px; font-size: 12px; line-height: 18px; text-align: center; white-space: nowrap; cursor: pointer; border-radius: 3px; }
.fu-exec-tablist > span.on { background: #fff; color: #168c9c; }
.fu-exec-range { display: flex; gap: 5px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.22); }
.fu-exec-range .btn-mini { flex: 1; min-width: 0; padding: 4px 0; white-space: nowrap; background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.35); }
.fu-exec-range .btn-mini.on { background: #fff; color: #168c9c; }
.fu-exec-hlist { flex: 1; overflow: auto; padding: 8px; }
.fu-exec-hitem { background: #fff; border: 1px solid #e5ebf1; border-radius: 5px; padding: 8px; margin-bottom: 7px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.fu-exec-hitem b { color: #334155; }
.fu-exec-hitem span { color: #64748b; line-height: 1.5; }
.fu-exec-hitem em { color: #168c9c; font-style: normal; font-size: 11px; }
.fu-exec-form { flex: 1; min-width: 0; padding: 12px 18px; overflow: auto; }
.fu-exec-patient { display: flex; align-items: center; gap: 12px; border: 1px solid #dce6ef; border-radius: 5px; padding: 10px 12px; background: #f8fbfd; }
.fu-exec-patient > div:nth-child(2) { min-width: 150px; }
.fu-exec-contact { display: flex; flex-direction: column; gap: 3px; min-width: 84px; }
.fu-exec-contact span { color: #8b98a8; font-size: 11px; }
.fu-exec-contact b { color: #334155; font-weight: 500; font-size: 12px; }
.fu-exec-patient > .btn { margin-left: auto; }
.fu-exec-quick { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.fu-exec-quick .btn { padding: 5px 9px; }
.fu-exec-meta { display: flex; gap: 16px; flex-wrap: wrap; color: #64748b; font-size: 12px; padding: 9px 2px 6px; border-bottom: 1px solid #edf1f5; margin-bottom: 10px; }
.fu-exec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.fu-exec-field { display: flex; flex-direction: column; gap: 4px; }
.fu-exec-field > span { color: #64748b; font-size: 12px; }
.fu-exec-field.wide { grid-column: 1 / -1; }
.fu-exec-field .input, .fu-exec-field .select { width: 100%; box-sizing: border-box; }
.fu-exec-field textarea.input { min-height: 54px; resize: vertical; }
.fu-exec-texts { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fu-exec-text {
  padding: 8px 10px 10px;
  border: 1px solid #E5EAF0; border-radius: 8px; background: #FBFCFD;
}
.fu-exec-text-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.fu-exec-text-h > span { color: #64748b; font-size: 12px; }
.fu-exec-text-h .select { width: 180px; height: 28px; padding: 0 8px; font-size: 12px; }
.fu-exec-text textarea.input { width: 100%; min-height: 64px; border: 0; background: #fff; resize: vertical; }
.fu-exec-status { display: flex; gap: 6px; }
.fu-exec-status .btn.on { background: #168c9c; color: #fff; border-color: #168c9c; }
.fu-exec-foot-l { display: flex; gap: 6px; }
.fu-exec-foot-r { display: flex; gap: 6px; margin-left: auto; }
.fu-workbench { width: 100%; }
.fu-top-tabs { display: flex; align-items: flex-end; background: #eef3f8; border: 1px solid #dde5ee; border-bottom: 0; border-radius: 6px 6px 0 0; padding: 0 8px; margin-bottom: 0; }
.fu-top-tab { padding: 10px 22px; font-size: 14px; color: #5d6b7a; cursor: pointer; border: 1px solid transparent; border-bottom: 0; border-radius: 5px 5px 0 0; }
.fu-top-tab.on { background: #fff; color: #2b3644; font-weight: 600; border-color: #dde5ee; margin-bottom: -1px; }
.fu-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; background: #eef3f8; border: 1px solid #dde5ee; padding: 10px 12px; margin-bottom: 12px; }
.fu-kpi { background: #fff; border: 1px solid #e1e8f0; border-radius: 4px; min-height: 58px; padding: 9px 12px; display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; }
.fu-kpi-ico { width: 24px; height: 24px; line-height: 24px; border-radius: 50%; text-align: center; color: #fff; font-style: normal; font-size: 12px; grid-row: 1 / 3; }
.fu-kpi-ico.green { background: #2f9e70; }
.fu-kpi-ico.blue { background: #4f91e8; }
.fu-kpi-ico.pink { background: #df6c9a; }
.fu-kpi-ico.orange { background: #e6a23c; }
.fu-kpi span { color: #8b98a8; font-size: 12px; }
.fu-kpi b { color: #263244; font-size: 20px; font-weight: 500; }
.fu-body-layout { display: flex; align-items: flex-start; gap: 12px; }
.fu-side { width: 174px; flex: none; background: #f6f9fc; border: 1px solid #e1e8f0; border-radius: 4px; padding: 5px 0; }
.fu-side-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 13px; color: #536273; font-size: 13px; cursor: pointer; border-left: 3px solid transparent; }
.fu-side-item:hover { background: #fff; color: #2f8f62; }
.fu-side-item.on { background: #fff; color: #2f8f62; border-left-color: #2f8f62; }
.fu-side-item em { font-style: normal; min-width: 22px; height: 20px; line-height: 20px; text-align: center; border-radius: 10px; background: #f2a45c; color: #fff; font-size: 12px; }
.fu-main-col { flex: 1; min-width: 0; }
.dash-birth-actions { white-space: nowrap; }
.dash-birth-actions .btn-mini { margin-right: 2px; padding: 3px 5px; font-size: 11px; }
.dash-follow-actions { white-space: nowrap; }
.dash-follow-actions .btn-mini { margin-right: 2px; padding: 3px 5px; font-size: 11px; }
.dash-fu-method { white-space: nowrap; }
.dash-fu-method span { margin-right: 5px; }
.dash-fu-method .btn-mini { padding: 3px 6px; font-size: 11px; }
/* 患者抽屉多留点高度 + **加宽**（用户 2026-10-14 图：「这个对话框可以加宽」）——
   四格一行原来 1180px 太挤，手机号 / 病历号 / 出生日期的年月日都会显示不全。其余弹窗不受影响。 */
.drawer-mask.pf-drawer .drawer { width: 1460px; max-width: 97vw; max-height: 95vh; }
.drawer-mask.pf-drawer .drawer-body { padding: 12px 20px; }
.drawer-mask.pf-drawer .drawer-head { padding: 11px 20px; }
.drawer-mask.pf-drawer .drawer-foot { padding: 9px 20px; }
.form-row { margin-bottom: 14px; }
.form-row.full { grid-column: 1 / -1; }
/* 抽屉表单里的**分块标题**（用户 2026-10-13 图 1：原系统「添加处置项目」弹窗的
   「处置信息 / 医保信息」两条浅灰条 + 左侧绿条）。字段上写了 `grp` 的模块才会出现。 */
.form-sec { margin: 2px 0 12px; }
.form-sec > span { display: block; background: #F5F7FA; border-left: 3px solid var(--g); border-radius: 2px; padding: 8px 12px; font-size: 14px; font-weight: 600; color: #1d2129; }
.form-grid .form-sec:not(:first-child) { margin-top: 12px; }
/* 标签 12px → 13px（原系统那套观感），下边距 5 → 6 */
.form-row label { display: block; font-size: 13px; color: var(--sub); margin-bottom: 6px; }
.form-row .req { color: var(--red); margin-left: 3px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; font-size: 14px; background: #fff;
}
.form-row textarea { min-height: 76px; resize: vertical; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--g); }

/* ---------------- 详情 ---------------- */
.detail-head { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; align-items: flex-start; gap: 16px; }
.detail-avatar {
  width: 52px; height: 52px; border-radius: 50%; background: var(--g-light); color: var(--g-dark);
  font-size: 20px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none;
}
.detail-name { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.detail-sub { font-size: 12px; color: var(--aux); margin-top: 6px; line-height: 1.7; }
.detail-actions { margin-left: auto; display: flex; gap: 8px; }

/* 患者详情头部（对齐参考产品） */
.ph-head { gap: 18px; }
.ph-main { min-width: 240px; }
.ph-name { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ph-meta { font-size: 14px; color: var(--sub); margin-top: 10px; }
.ph-star {
  display: inline-block; margin-left: 12px; font-size: 12px; color: #C57C10;
  background: #FFF6E5; padding: 1px 7px; border-radius: 3px;
}
/* 「用两种星区分」（用户 2026-10-14 图 1）：时间维度一颗、消费金额维度一颗，颜色不同好分辨；
   两个都满足时两颗都在；悬停各自的说明写明是按哪个维度命中的。 */
.ph-star + .ph-star { margin-left: 6px; }
.ph-star-time { color: #2F6BFF; background: #EEF3FF; }
.ph-star-money { color: #C57C10; background: #FFF6E5; }
/* 没达档的那个维度：灰底空心星 + 悬停写"还差多少"（用户 2026-10-14：别让人以为星丢了） */
.ph-star-empty { color: #9AA6B2; background: #F3F5F7; }
/* 用户 2026-10-14 两次批注：「这里可往右移些」「这个框往右移」→
   整块（出生年月/初诊信息 那两列）再往右挪：左边距 18px、第二列起点到 340px */
/* 用户 2026-10-14 又提了一次「往右移」→ 再挪 22px（累计 40px） */
.ph-info { display: grid; grid-template-columns: repeat(2, 240px); gap: 8px 82px; font-size: 14px; margin-left: 40px; }
.ph-info .k { color: var(--aux); font-size: 12px; }

/* 患者详情：左侧患者列表（主目录）+ 右侧详情 */
.patient-layout { display: grid; grid-template-columns: 268px 1fr; gap: 12px; align-items: start; }
.patient-side { padding-bottom: 6px; }
.side-tabs { border-bottom: 1px solid var(--line); }
.side-tabs .tab { padding: 11px 0; font-size: 14px; }
.patient-list { max-height: calc(100vh - 210px); overflow-y: auto; }
.pl-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.pl-item:hover { background: #FAFDFC; }
.pl-item.on { background: var(--g-light); }
.pl-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; background: #E4EFF6; color: #3C6E8F;
  font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.pl-body { min-width: 0; flex: 1; }
.pl-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
/* 患者「高级筛选」：左侧竖排页签 + 右侧字段（对齐原系统那张六页签弹窗） */
.df-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.df-label { font-size: 14px; color: #1d2129; }
/* 列表页头部那个「就诊时间 / 日期」区间 —— 用户 2026-10-09 圈的就是这个，给宽一点 */
.df-date { width: 190px; }
.df-sep { color: var(--aux); margin: 0 2px; }
.df-quick { display: inline-flex; gap: 4px; margin-left: 8px; }
.df-quick .btn { padding: 4px 10px; }
/* 列表底部的金额合计行（收费管理应收/实收/欠费汇总…） */
.sum-row td { background: #f7f9fa; font-weight: 600; color: #1d2129; border-top: 1px solid var(--line); }
.pfa-wrap { display: flex; gap: 0; max-height: 62vh; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.pfa-tabs { width: 104px; flex: 0 0 104px; border-right: 1px solid var(--line); padding: 6px 0; background: #fafbfc; }
.pfa-tab { padding: 10px 8px; font-size: 14px; color: #4e5969; cursor: pointer; text-align: center; }
.pfa-tab:hover { color: var(--g); }
.pfa-tab.on { background: #e8fff4; color: #007457; font-weight: 600; box-shadow: inset 3px 0 0 #00b578; }
.pfa-body { flex: 1; min-width: 0; overflow-y: auto; padding: 6px 18px 14px; }
.pfa-row { display: flex; align-items: center; gap: 14px; padding: 8px 0; border-bottom: 1px dashed #f2f4f7; }
.pfa-label { width: 132px; flex: 0 0 132px; text-align: right; color: #1d2129; font-size: 14px; }
.pfa-ctrl { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 工作台各清单里的患者姓名可点（点了开患者档案） */
.dash-pname { color: var(--primary, #2f7d6e); font-weight: 600; cursor: pointer; border-bottom: 1px dashed currentColor; }
.dash-pname:hover { opacity: .75; }
.pl-meta { font-size: 12px; color: var(--aux); margin-top: 4px; }
.patient-main { min-width: 0; }

@media (max-width: 1200px) {
  .patient-layout { grid-template-columns: 1fr; }
  .patient-list { max-height: 260px; }
}
.detail-tabs { display: flex; gap: 22px; padding: 0 14px; background: #fff; border: 1px solid var(--line); border-top: none; border-radius: 0 0 var(--radius) var(--radius); overflow-x: auto; }
.detail-tabs::-webkit-scrollbar { height: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.section-head .st-title { font-size: 14px; font-weight: 700; }
.section-head .st-title::before {
  content: ""; display: inline-block; width: 3px; height: 13px; background: var(--g);
  border-radius: 2px; margin-right: 7px; vertical-align: -2px;
}
.kv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 26px; padding: 6px 14px 16px; }
.kv { display: flex; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.kv .k { width: 118px; flex: none; color: var(--aux); font-size: 12px; }
.kv .v { flex: 1; word-break: break-all; }

/* ---------------- 预览弹窗 ---------------- */
.modal-mask { position: fixed; inset: 0; background: rgba(27,39,53,.45); z-index: 70; display: flex; align-items: center; justify-content: center; }
/* 从抽屉里再开弹窗（如「引用患者资料」）时要盖在抽屉之上 */
.modal-mask.on-top { z-index: 120; }
/* 随访里再开「发送短信」小窗时，要盖在随访弹窗上面（两者都带 on-top） */
#billModal.on-top { z-index: 130; }
.app-confirm-mask { z-index: 140; }
.app-confirm-box { width: 520px; max-width: 92vw; }
.app-confirm-text { color: #374151; font-size: 14px; line-height: 1.8; padding: 4px 0; }
.modal { width: 420px; background: #fff; border-radius: 8px; overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.modal-body { padding: 18px; max-height: 70vh; overflow-y: auto; }
.phone { width: 300px; margin: 0 auto; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--bg); }
.phone-nav { background: linear-gradient(160deg, #12AE88, #0B8064); color: #fff; padding: 13px 15px; font-size: 14px; font-weight: 700; }
.phone-body { padding: 12px; }
.phone-block { background: #fff; border-radius: 8px; padding: 11px; margin-bottom: 9px; }
.phone-label { font-size: 12px; color: var(--aux); }
.phone-value { font-size: 14px; margin-top: 3px; word-break: break-all; }
.qr-box { margin-top: 10px; background: #fff; border-radius: 8px; padding: 12px; text-align: center; }
.qr-img {
  width: 110px; height: 110px; margin: 0 auto; border: 1px dashed var(--line); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; color: var(--aux); font-size: 12px;
  background: repeating-linear-gradient(45deg, #F7FAFC, #F7FAFC 6px, #fff 6px, #fff 12px);
}
.qr-tip { margin-top: 8px; font-size: 12px; color: var(--aux); line-height: 1.6; }

/* ---------------- 筛查报告预览（小程序效果预览 · 对齐家长报告样张） ---------------- */
.srpv { width: 340px; border-radius: 22px; }
.srpv-nav {
  position: relative;
  height: 44px;
  line-height: 44px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  background: #fff;
  border-bottom: 1px solid #eef1f5;
}
.srpv-nav::before {
  content: "‹";
  position: absolute;
  left: 14px;
  top: 0;
  font-size: 24px;
  font-weight: 400;
  color: #111;
}
.srpv-body { background: #f5f7fa; padding: 10px 0 0; }
.srpv-info {
  margin: 0 12px 9px;
  padding: 2px 12px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(117, 82, 28, .07);
}
.srpv-irow { display: flex; gap: 8px; padding: 6px 0; font-size: 10.5px; line-height: 1.55; }
.srpv-irow span { width: 58px; flex: none; color: #9b9286; }
.srpv-irow b { flex: 1; font-weight: 500; color: #333b48; }
.srpv-chart {
  margin: 0 12px 10px;
  padding: 4px 6px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(117, 82, 28, .07);
}
.srpv-chart svg { display: block; width: 100%; height: auto; }
.srpv-empty { padding: 60px 0; text-align: center; font-size: 12px; color: #9ca3af; }
.srpv-metrics {
  display: flex;
  margin: 0 12px 10px;
  padding: 9px 0 10px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(117, 82, 28, .07);
}
.srpv-m { flex: 1; position: relative; text-align: center; }
.srpv-m + .srpv-m::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: #f1ece2;
}
.srpv-m b { display: block; font-size: 14px; line-height: 1.1; color: #3b4351; }
.srpv-m b.warn { color: #e04f3f; }
.srpv-m b.accent { color: #dd8612; }
.srpv-m span { display: block; margin-top: 4px; font-size: 8px; color: #9a9184; white-space: nowrap; }
.srpv-card {
  margin: 10px 12px 0;
  padding: 2px 12px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(117, 82, 28, .07);
}
.srpv-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f6f2ea; font-size: 11px; }
.srpv-row:last-child { border-bottom: 0; }
.srpv-k { width: 64px; flex: none; color: #9b9286; }
.srpv-v { flex: 1; color: #333b48; font-weight: 500; line-height: 1.62; word-break: break-all; }
.srpv-v.warn { color: #e04f3f; }
.srpv-probs { margin: 0 12px; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 3px 12px rgba(117, 82, 28, .07); }
.srpv-prob-header { display: flex; padding: 7px 12px; background: #faf7f2; font-size: 10px; color: #9a9184; }
.srpv-prob-header span { width: 42%; }
.srpv-prob-header b { flex: 1; font-weight: 500; }
.srpv-prob { display: flex; padding: 7px 12px; border-top: 1px solid #f6f2ea; }
.srpv-prob-l { width: 42%; flex: none; }
.srpv-prob-name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 10.5px; color: #33404f; font-weight: 600; }
.srpv-prob-name i { width: 7px; height: 7px; border-radius: 50%; flex: none; background: #e04f3f; }
.srpv-prob-name i.blue { background: #3b82f6; }
.srpv-prob-name i.orange { background: #e8971a; }
.srpv-prob-name i.green { background: #16a34a; }
.srpv-prob-name i.gray { background: #9aa3af; }
.srpv-prob-name span {
  min-width: 20px;
  padding: 1px 4px;
  border-radius: 4px;
  background: #fdf0ee;
  color: #d9483a;
  font-size: 9px;
  font-weight: 600;
  text-align: center;
}
.srpv-prob-r { flex: 1; font-size: 10px; color: #5b6472; line-height: 1.6; }
.srpv-prob-empty { padding: 10px 12px; font-size: 10px; color: #9aa3af; }
.srpv-tip { margin: 14px 12px 0; }
.srpv-tip-t {
  width: 118px;
  margin: 0 auto -8px;
  padding: 5px 0 6px;
  text-align: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  background: #74a81c;
  clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%);
  position: relative;
  z-index: 1;
}
.srpv-tip-c { background: #e8f2d7; border-radius: 8px; padding: 16px 8px 8px; }
.srpv-tip-in { background: #fff; border-radius: 6px; padding: 10px; min-height: 54px; color: #5c6b4a; font-size: 10.5px; line-height: 1.8; }
.srpv-receipt { margin: 10px 12px 0; padding: 10px 12px; background: #fff; border-radius: 10px; box-shadow: 0 3px 12px rgba(117, 82, 28, .07); }
.srpv-receipt-t { font-size: 12px; font-weight: 700; color: #3f3324; }
.srpv-receipt-q { margin-top: 4px; font-size: 10.5px; color: #6b7280; }
.srpv-receipt-acts { display: flex; gap: 8px; margin-top: 7px; }
.srpv-receipt-acts span { flex: 1; height: 26px; line-height: 26px; text-align: center; border-radius: 13px; font-size: 10.5px; }
.srpv-receipt-acts .ok { background: #12ae88; color: #fff; }
.srpv-receipt-acts .no { border: 1px solid #d9dde3; color: #4b5563; }
.srpv-receipt-done { margin-top: 4px; font-size: 10.5px; color: #23895f; }

/* ===== 筛查报告 2.0：整页视觉升级（2026-10-19 用户「整个页面重新设计美观一些」） ===== */
.srpv-body { background: #f4f7f9; padding: 12px 0 14px; }
.srpv-student { display: flex; align-items: center; gap: 10px; margin: 0 12px; padding: 12px; background: #fff; border-radius: 14px; box-shadow: 0 4px 16px rgba(17, 24, 39, .05); }
.srpv-avatar { width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(135deg, #12ae88, #0b8064); color: #fff; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.srpv-stu-main { flex: 1; min-width: 0; }
.srpv-stu-name { font-size: 15px; font-weight: 700; color: #1f2937; }
.srpv-stu-name span { margin-left: 5px; font-size: 10px; font-weight: 500; color: #6b7280; }
.srpv-stu-sub { margin-top: 4px; font-size: 10px; color: #86909c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srpv-pill { flex: none; font-size: 9px; font-weight: 600; color: #c77800; background: #fff3e4; border-radius: 9px; padding: 3px 8px; }
.srpv-pill.ok { color: #0b8064; background: #e6f7f1; }
.srpv-info2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 8px 12px 0; padding: 11px 12px; background: #fff; border-radius: 14px; box-shadow: 0 4px 16px rgba(17, 24, 39, .05); }
.srpv-i2 { display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.srpv-i2.full { grid-column: 1 / -1; }
.srpv-i2 span { width: 40px; flex: none; display: block; font-size: 9px; color: #9aa3af; }
.srpv-i2 b { flex: 1; display: block; margin-top: 0; font-size: 10.5px; font-weight: 500; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srpv-sec-h { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 7px; }
.srpv-sec-h span { font-size: 12px; font-weight: 700; color: #1f2937; }
.srpv-sec-h em { font-style: normal; font-size: 9px; color: #9aa3af; }
.srpv-chart-card { margin: 10px 12px 0; padding: 10px 8px 4px; background: #fff; border-radius: 14px; box-shadow: 0 4px 16px rgba(17, 24, 39, .05); }
.srpv-chart { padding: 0 2px; }
.srpv-chart svg { display: block; width: 100%; height: auto; }
.srpv-summary { margin: 10px 12px 0; padding: 11px 10px 12px; background: #fff; border-radius: 14px; box-shadow: 0 4px 16px rgba(17, 24, 39, .05); }
.srpv-summary-t { font-size: 11px; font-weight: 700; color: #1f2937; margin-bottom: 8px; }
.srpv-summary-grid { display: flex; }
.srpv-sum-item { flex: 1; text-align: center; position: relative; }
.srpv-sum-item + .srpv-sum-item::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px; background: #f1f3f6; }
.srpv-sum-item b { display: block; font-size: 16px; line-height: 1.1; color: #1f2937; }
.srpv-sum-item b.red { color: #e04f3f; }
.srpv-sum-item b.blue { color: #3b82f6; }
.srpv-sum-item b.gray { color: #9aa3af; }
.srpv-sum-item b.orange { color: #e8971a; }
.srpv-sum-item b.teal { color: #0b8064; }
.srpv-sum-item span { display: block; margin-top: 4px; font-size: 9px; color: #86909c; white-space: nowrap; }
.srpv-problems { margin: 10px 12px 0; }
.srpv-table { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 16px rgba(17, 24, 39, .05); }
.srpv-thead { display: flex; padding: 8px 12px; background: #f8fafb; font-size: 9px; color: #9aa3af; }
.srpv-thead span { width: 42%; }
.srpv-thead b { flex: 1; font-weight: 500; }
.srpv-prob { display: flex; padding: 9px 12px; border-top: 1px solid #f2f5f7; }
.srpv-prob:nth-child(even) { background: #fcfdfd; }
.srpv-prob-l { width: 42%; flex: none; }
.srpv-prob-name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 10.5px; color: #1f2937; font-weight: 600; }
.srpv-prob-name i { width: 6px; height: 6px; border-radius: 50%; flex: none; background: #e04f3f; }
.srpv-prob-name i.blue { background: #3b82f6; }
.srpv-prob-name i.orange { background: #e8971a; }
.srpv-prob-name i.green { background: #16a34a; }
.srpv-prob-name i.gray { background: #9aa3af; }
.srpv-prob-name span { min-width: 20px; padding: 1px 4px; border-radius: 4px; background: #fdf0ee; color: #d9483a; font-size: 9px; font-weight: 600; text-align: center; }
.srpv-prob-r { flex: 1; font-size: 10px; color: #5b6472; line-height: 1.6; }
.srpv-tip2 { margin: 10px 12px 0; padding: 11px 12px; background: #f1f8e8; border: 1px solid #e3efd3; border-radius: 12px; }
.srpv-tip2-t { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: #4f7a12; }
.srpv-tip2-t::before { content: ""; width: 3px; height: 10px; border-radius: 2px; background: #74a81c; }
.srpv-tip2-x { margin-top: 5px; font-size: 10px; color: #5c6b4a; line-height: 1.7; }
.srpv-receipt2 { margin: 10px 12px 0; padding: 12px; background: #f2fbf7; border: 1px solid #d8f0e5; border-radius: 14px; }
.srpv-receipt2-h { display: flex; align-items: center; justify-content: space-between; }
.srpv-receipt2-h span { font-size: 12px; font-weight: 700; color: #1f2937; }
.srpv-receipt2-h em { font-style: normal; font-size: 9px; color: #0b8064; background: #e1f5ec; border-radius: 9px; padding: 2px 7px; }
.srpv-receipt2-q { margin-top: 6px; font-size: 10.5px; color: #4b5563; }
.srpv-receipt2-a { display: flex; gap: 8px; margin-top: 9px; }
.srpv-receipt2-a span { flex: 1; height: 30px; line-height: 30px; text-align: center; border-radius: 15px; font-size: 10.5px; font-weight: 600; }
.srpv-receipt2-a .ok { background: #12ae88; color: #fff; box-shadow: 0 4px 10px rgba(18, 174, 136, .25); }
.srpv-receipt2-a .no { background: #fff; border: 1px solid #d9dde3; color: #4b5563; }
.srpv-compliance { margin: 10px 16px 0; font-size: 9px; color: #a3abb8; line-height: 1.7; }
.srpv-admin-bar { margin-top: 12px; text-align: center; }

/* ---------------- 图表 ---------------- */
.bar-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.bar-name { width: 120px; font-size: 14px; color: var(--sub); flex: none; }
.bar-track { flex: 1; height: 9px; background: #EEF2F5; border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--g), #6FD3AC); border-radius: 5px; }
.bar-value { width: 160px; text-align: right; font-size: 14px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.metric-cell { background: #fff; padding: 16px 10px; text-align: center; }
.metric-cell .v { font-size: 20px; font-weight: 700; color: var(--g-dark); }
.metric-cell .l { font-size: 12px; color: var(--aux); margin-top: 6px; }

.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: #1F2D3D; color: #fff; padding: 9px 18px; border-radius: 4px; font-size: 14px; z-index: 200;
  opacity: 0; transition: opacity .2s;
  /* 提示条只是"看一眼"的东西：必须永远不吃点击 —— 不加这句时，淡出后的那条（opacity:0 但还在 DOM 里）
     会像一层隐形玻璃盖在它下面那块区域上，把下面的按钮点不动（本批做自由项联动时踩到的） */
  pointer-events: none;
}
.toast.on { opacity: 1; }

/* ---------------- 窄窗口适配（内置浏览器 / 小屏笔记本） ---------------- */
@media (max-width: 1440px) {
  .tb-search { width: 220px; flex: 0 1 220px; min-width: 130px; }
  .tb-item { padding: 0 6px; }
  .layout-2 { grid-template-columns: 232px 1fr; }
}
@media (max-width: 1200px) {
  .tb-item span:last-child { display: none; }
  .tb-item .hot { display: none; }
  .tb-search { width: 180px; flex: 0 1 180px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .layout-2 { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .kv-grid { grid-template-columns: 1fr; }
  .drawer { width: 92%; }
}

/* 账单卡「更多操作」下拉（对齐原系统：交易详情/减免/退款/作废/打印 收进下拉） */
.more-wrap { position: relative; display: inline-block; }
.more-wrap .more-caret { font-style: normal; font-size: 10px; margin-left: 2px; }
.more-wrap .more-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 116px;
  padding: 6px 4px;
  background: #fff;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  text-align: left;
}
.more-wrap.open .more-panel { display: block; }
.more-wrap .more-panel .bs-link { display: block; padding: 6px 10px; border-radius: 4px; }
.more-wrap .more-panel .bs-link:hover { background: #f2f7f4; }
/* 处置卡那个「更多」里的文案长（撤单（等于删除，费用同步减去）），单独放宽一点 */
.more-wrap .more-panel.wide { min-width: 214px; }
.more-wrap .more-panel .bs-link.danger { color: var(--red); }

/* 预约看板：时间 × 医生 网格（对齐原系统日视图） */
.ab-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ab-sum { color: #86909c; font-size: 12px; margin-bottom: 8px; }
.ab-wrap { max-height: 70vh; overflow: auto; }
.ab-table { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; }
.ab-table th,
.ab-table td { border-right: 1px solid #eef0f3; border-bottom: 1px solid #eef0f3; padding: 0; }
.ab-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f8fa;
  color: #1d2129;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 6px;
  text-align: center;
}
.ab-table thead th i { font-style: normal; color: #86909c; font-size: 12px; }
.ab-corner { width: 62px; left: 0; z-index: 3 !important; }
.ab-time {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fbfbfc;
  color: #86909c;
  font-size: 12px;
  text-align: center;
  width: 62px;
  height: 26px;
  font-family: inherit; font-variant-numeric: tabular-nums;
}
.ab-cell { height: 26px; vertical-align: top; }
.ab-cell.ab-hour { border-top: 1px solid #dcdfe6; }
.ab-cell.ab-has { padding: 2px; }
.ab-chip {
  height: 100%;
  min-height: 22px;
  padding: 3px 6px;
  border-radius: 4px;
  background: #e8f3ff;
  border-left: 3px solid #0c74ee;
  cursor: pointer;
  overflow: hidden;
}
.ab-chip:hover { filter: brightness(0.97); }
.ab-chip-t { font-size: 12px; font-weight: 600; color: #1d2129; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-chip-t i { font-style: normal; font-weight: 400; color: #86909c; font-size: 12px; }
.ab-chip-s { font-size: 12px; color: #4e5969; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-chip-tm { font-size: 12px; color: #86909c; font-family: inherit; font-variant-numeric: tabular-nums; }
.ab-chip.st-red { background: #ffece8; border-left-color: #f53f3f; }
.ab-chip.st-orange { background: #fff7e8; border-left-color: #ff7d00; }
.ab-chip.st-green { background: #e8ffea; border-left-color: #00b42a; }
.ab-chip.st-purple { background: #f5e8ff; border-left-color: #8f19e7; }
.ab-chip.st-blue { background: #e8f3ff; border-left-color: #0c74ee; }
.ab-chip.st-gray { background: #f2f3f5; border-left-color: #c9cdd4; }

/* 预约看板：日/周切换 + 状态多选 + 资源下拉 */
.ab-seg {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid #e5e6eb;
  border-radius: 4px;
  font-size: 14px;
  color: #4e5969;
  cursor: pointer;
  user-select: none;
}
.ab-seg.on { background: #007457; border-color: #007457; color: #fff; }
.ab-statuses { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ab-st {
  padding: 2px 10px;
  border-radius: 10px;
  border: 1px solid #e5e6eb;
  background: #f7f8fa;
  color: #86909c;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.ab-st.on { background: #e8fff4; border-color: #9fdfc4; color: #007457; }
.ab-st-all { margin-left: auto; color: #007457; font-size: 12px; cursor: pointer; }
.ab-table thead th em { font-style: normal; color: #86909c; font-size: 12px; font-weight: 400; }
/* 拖拽改期 */
.ab-chip[draggable="true"] { cursor: grab; }
.ab-chip[draggable="true"]:active { cursor: grabbing; }
.ab-chip.ab-dragging { opacity: 0.45; }
.ab-cell.ab-over { background: #e8fff4; outline: 1px dashed #00b42a; outline-offset: -1px; }

/* 患者档案 · 口腔检查 */
.mc-wrap { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; }
.mc-list { width: 176px; flex: 0 0 176px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.mc-date { padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.mc-date + .mc-date { margin-top: 4px; }
.mc-date:hover { background: #f5f7fa; }
.mc-date.on { background: #e8fff4; }
.mc-date-d { display: block; font-size: 14px; color: #1d2129; font-family: inherit; font-variant-numeric: tabular-nums; }
.mc-date-s { display: block; font-size: 12px; color: #86909c; margin-top: 2px; }
.mc-main { flex: 1; min-width: 0; }
.mc-detail { margin: 0; }
.mc-kv { color: #4e5969; font-size: 14px; margin: 8px 0 12px; }
.mc-assess { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 12px; background: #f7f9fb; border-radius: 8px; }
.mc-assess-t { font-weight: 600; color: #1d2129; }
.mc-ball { width: 78px; height: 78px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); }
.mc-ball-v { font-size: 20px; font-weight: 700; color: #1d2129; }
.mc-ball-l { font-size: 12px; color: #86909c; margin-top: 2px; }
.mc-ball.mc-wait { border-color: #ffcfcc; }
.mc-ball.mc-treating { border-color: #bedcff; }
.mc-ball.mc-done { border-color: #dafdc0; }
.mc-health { margin-left: auto; color: #4e5969; font-size: 14px; }
.mc-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.mc-sub { font-size: 14px; font-weight: 600; color: #1d2129; margin-bottom: 8px; }
.mc-group { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed #eef0f3; font-size: 14px; }
.mc-group-n { color: #1d2129; font-weight: 600; }
.mc-group-t { color: #0c74ee; font-family: inherit; font-variant-numeric: tabular-nums; }
.mc-group-s { color: #86909c; font-size: 12px; margin-left: auto; }
.mc-chart { padding: 8px 0; }
.mc-trow { display: flex; gap: 3px; justify-content: center; margin-bottom: 4px; }
.mc-trow.mc-lower { margin-bottom: 8px; }
.mc-tooth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 22px;
  border-radius: 4px;
  background: #f2f3f5;
  color: #4e5969;
  font-size: 10px;
  font-family: inherit; font-variant-numeric: tabular-nums;
}
.mc-tooth.mc-wait { background: #ffece8; color: #f53f3f; }
.mc-tooth.mc-treating { background: #e8f3ff; color: #0c74ee; }
.mc-tooth.mc-done { background: #e8ffea; color: #00b42a; }
.mc-legend { display: flex; align-items: center; gap: 6px; justify-content: center; color: #86909c; font-size: 12px; }
.mc-legend .mc-tooth { width: 14px; height: 14px; margin-left: 8px; }
.mc-form .mc-frow { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.mc-form .mc-label { color: #4e5969; font-size: 14px; }

/* 商机中心 */
.op-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.op-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.op-card-l { color: #86909c; font-size: 12px; }
.op-card-v { font-size: 22px; font-weight: 700; color: #1d2129; margin: 6px 0 4px; }
.op-card-s { color: #86909c; font-size: 12px; }
.op-funnels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.op-funnel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; }
.op-funnel-t { font-size: 14px; font-weight: 600; color: #1d2129; margin-bottom: 10px; }
.op-layer { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 6px; background: #f2f7ff; margin-bottom: 8px; }
.op-layer:nth-child(3) { background: #e8f3ff; }
.op-layer:nth-child(4) { background: #d6e9ff; }
.op-layer-v { font-size: 18px; font-weight: 700; color: #0c74ee; min-width: 48px; }
.op-layer-l { color: #1d2129; font-size: 14px; }
.op-layer-s { margin-left: auto; color: #86909c; font-size: 12px; }
.op-tabs { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; flex-wrap: wrap; }
.op-tab { padding: 4px 12px; border-radius: 14px; background: #f2f3f5; color: #4e5969; font-size: 12px; cursor: pointer; user-select: none; }
.op-tab.on { background: #007457; color: #fff; }
.op-sym { margin-left: auto; color: #86909c; font-size: 12px; }
.op-chart { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin-top: 12px; }
.op-chart-t { font-size: 14px; font-weight: 600; color: #1d2129; margin-bottom: 8px; }
.op-svg { width: 100%; height: 150px; }
.op-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 角色权限勾选弹窗 */
.rp-group { border-top: 1px dashed #eef0f3; padding: 8px 0; }
.rp-group-t { font-size: 14px; font-weight: 600; color: #1d2129; margin-bottom: 6px; }
.rp-group .dash-check { margin-right: 14px; }

/* 短信管理 */
.sms-preview { flex: 1; min-height: 46px; padding: 10px 12px; background: #f7f9fb; border: 1px solid var(--line); border-radius: 6px; color: #1d2129; font-size: 14px; line-height: 1.7; }

/* 医患沟通 · 沟通视频 */
.comm-wrap { display: flex; gap: 12px; align-items: flex-start; }
.comm-tree { width: 168px; flex: 0 0 168px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.comm-tree-t { font-size: 14px; font-weight: 600; color: #1d2129; padding: 6px 8px; }
.comm-cat { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; color: #4e5969; }
.comm-cat:hover { background: #f5f7fa; }
.comm-cat.on { background: #e8fff4; color: #007457; font-weight: 600; }
.comm-cat-n { color: #86909c; font-size: 12px; }
.comm-main { flex: 1; min-width: 0; }
.comm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; margin-top: 12px; }
.comm-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.comm-cover { position: relative; height: 118px; background: linear-gradient(135deg, #eef7f2, #dff0e8); display: flex; align-items: center; justify-content: center; }
.comm-cover img { width: 100%; height: 100%; object-fit: cover; }
.comm-cover-ph { color: #007457; font-size: 16px; font-weight: 600; letter-spacing: 2px; }
.comm-cover-link { font-size: 13px; letter-spacing: 1px; line-height: 1.8; text-align: center; }
.mc-link-box { background: #f2fbf7; border: 1px solid #d8f0e5; border-radius: 10px; padding: 14px; margin-bottom: 10px; }
.mc-link-t { font-size: 14px; font-weight: 700; color: #16232e; }
.mc-link-u { margin-top: 8px; font-size: 12px; color: #0b8064; word-break: break-all; }
.mc-link-note { margin: 8px 0 10px; font-size: 12px; color: #6b7280; line-height: 1.6; }
.comm-time { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 1px 6px; border-radius: 3px; }
.comm-meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.comm-title { font-size: 14px; font-weight: 600; color: #1d2129; line-height: 1.5; }
.comm-sub { font-size: 12px; color: #86909c; }
.comm-acts { margin-top: auto; padding-top: 8px; display: flex; gap: 4px; }
.comm-acts .btn-mini { white-space: nowrap; font-size: 12px; padding: 0 6px; margin-right: 0; }
.comm-player { background: #000; border-radius: 6px; overflow: hidden; }
.comm-novideo { height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; font-size: 14px; text-align: center; line-height: 2; }
.comm-detail { padding: 12px 2px 0; }

/* 企微SCRM */
.wc-sync-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px dashed #eef0f3; }
.wc-sync-t { font-size: 14px; font-weight: 600; color: #1d2129; }
.wc-entry { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; padding: 12px 14px; }
.wc-entry-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; cursor: pointer; transition: all .15s; }
.wc-entry-card:hover { border-color: #10A37F; box-shadow: 0 2px 10px rgba(16,163,127,.12); transform: translateY(-1px); }
.wc-entry-t { font-size: 14px; font-weight: 700; color: #1d2129; margin-bottom: 4px; }
.wc-entry-s { margin-top: 6px; font-size: 12px; color: #10A37F; }

/* 患者档案 · 业务页签（对齐原系统 patient-manager 的档案页签） */
.ptab-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ptab-f { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #4e5969; }
.ptab-f > label { color: #4e5969; white-space: nowrap; }
.ptab-f .select { width: 130px; }
.ptab-date { width: 148px; }
.ptab-spacer { flex: 1; }
.ptab-body { padding: 0; }
.ptab-foot { padding: 10px 14px; border-top: 1px solid var(--line); }
.ptab-empty { padding: 56px 20px; text-align: center; }
.ptab-empty-t { font-size: 14px; color: #1d2129; font-weight: 600; }
.ptab-empty-h { margin: 8px 0 18px; font-size: 12px; color: #86909c; }
.ptab-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; padding: 14px; }
.ptab-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.ptab-wide { grid-column: span 2; min-width: 320px; }
.ptab-thumb { height: 128px; background: linear-gradient(135deg, #eef7f2, #dff0e8); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ptab-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ptab-thumb-ph { color: #007457; font-size: 14px; font-weight: 600; letter-spacing: 2px; }
.ptab-card-b { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ptab-card-t { font-size: 14px; font-weight: 600; color: #1d2129; }
.ptab-card-a { margin-top: auto; padding-top: 8px; display: flex; gap: 6px; }
.ptab-record { border-bottom: 1px solid #f2f4f7; padding: 14px 16px; }
.ptab-record:last-child { border-bottom: 0; }
.ptab-rhead { font-size: 14px; color: #1d2129; margin-bottom: 10px; }
.ptab-rhead-a { float: right; }
.ptab-rrow { display: flex; gap: 12px; padding: 5px 0; font-size: 14px; align-items: flex-start; }
.ptab-rlabel { flex: 0 0 84px; color: #4e5969; }
.ptab-rval { flex: 1; color: #1d2129; line-height: 1.7; }
.ptab-rsign { margin-top: 8px; text-align: right; font-size: 12px; color: #86909c; }
.ptab-files { display: flex; gap: 14px; flex-wrap: wrap; }
.ptab-file { text-align: center; }
.ptab-file img { width: 148px; height: 190px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.ptab-file .muted { margin-top: 6px; font-size: 12px; }

/* 二级页签条（原侧栏子项收进这里，对齐原系统的页面内导航） */
.subnav { display: flex; align-items: center; gap: 4px; padding: 0 18px; height: 42px; background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; white-space: nowrap; }
.subnav.hidden { display: none; }
.subnav-root { font-size: 14px; font-weight: 700; color: #1d2129; padding-right: 12px; margin-right: 4px; border-right: 1px solid var(--line); flex: 0 0 auto; }
.subnav-item { flex: 0 0 auto; padding: 6px 12px; font-size: 14px; color: #4e5969; border-radius: 6px; cursor: pointer; }
.subnav-item:hover { background: #f2f5f3; color: #1d2129; }
.subnav-item.on { background: #e8fff4; color: #007457; font-weight: 600; }

/* 经典案例：引用患者资料 */
.cc-ref-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 12px; background: #f2f8f5; border: 1px dashed #9fd6bd; border-radius: 6px; }
.cc-ref-bar .muted { font-size: 12px; }
.cc-ref-pick { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }

/* 视频分类两级树 */
.comm-cat-l2 { padding-left: 26px; font-size: 12px; color: #6b7785; }
.cct-caret { font-style: normal; color: #86909c; font-size: 12px; }
.cct-l2 { padding-left: 22px; color: #4e5969; }
.cct-parent-row { background: #f7faf8; }

/* 患者就诊设置：大类行右侧的删除小叉 */
.ac-cat-x { margin-left: 6px; color: #c9cdd4; font-style: normal; font-size: 12px; cursor: pointer; }
.ac-cat-x:hover { color: #e64545; }
.ptab-rteeth { margin-top: 4px; }
.ptab-rteeth .tooth-chart.sm { padding: 2px 3px; }
.bill-card .tooth-chart.sm { padding: 2px 3px; }

/* 患者管理：左分组树 + 右侧列表（对齐原系统 patient-manager） */
.pc-wrap { display: flex; gap: 12px; align-items: flex-start; }
.pc-tree { width: 208px; flex: 0 0 208px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.pc-main { flex: 1; min-width: 0; }
.pc-tabs { display: flex; gap: 4px; padding: 4px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.pc-tab { flex: 1; text-align: center; padding: 6px 0; font-size: 14px; color: #4e5969; border-radius: 6px; cursor: pointer; }
.pc-tab:hover { background: #f5f7fa; }
.pc-tab.on { background: #e8fff4; color: #007457; font-weight: 600; }
.pc-ico { font-style: normal; display: inline-block; width: 16px; text-align: center; color: #86909c; font-size: 12px; }
.comm-cat.on .pc-ico { color: #007457; }
.pc-ck { width: 36px; text-align: center; }
.pc-ck input { cursor: pointer; }
.pc-name { font-weight: 600; color: #1d2129; }
.pc-tag { display: inline-block; min-width: 18px; height: 18px; line-height: 17px; text-align: center; padding: 0 4px; margin-right: 2px; border: 1px solid; border-radius: 4px; font-size: 12px; }
.pc-ops { white-space: nowrap; }

/* 系统设置：左侧二级菜单 + 右侧配置页（对齐原系统） */
.sys-wrap { display: flex; gap: 12px; align-items: flex-start; }
/* 系统设置左侧目录很长：不能让它把整页撑高后，点下面的「常用随访内容」时浏览器把
   右侧内容一起滚出视口（2026-10-18 用户截图：左栏滚到底、右栏只剩背景）。
   目录自己吸顶滚动，右边内容始终留在屏幕上；和 #412 的左树修法同一口径。 */
.sys-menu {
  width: 216px; flex: 0 0 216px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px;
  position: sticky; top: 66px; max-height: calc(100vh - 84px); overflow-y: auto; overscroll-behavior: contain;
}
.sys-group { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px; font-size: 14px; font-weight: 600; color: #1d2129; cursor: pointer; border-radius: 6px; }
.sys-group:hover { background: #f5f7fa; }
.sys-caret { color: #86909c; font-size: 12px; }
.sys-items { padding: 0 4px 6px; }
.sys-item { padding: 8px 12px; font-size: 14px; color: #4e5969; border-radius: 6px; cursor: pointer; }
.sys-item:hover { background: #f5f7fa; color: #1d2129; }
.sys-item.on { background: #e8fff4; color: #007457; font-weight: 600; }
.sys-main { flex: 1; min-width: 0; }

.rp-wrap { display: flex; gap: 14px; align-items: flex-start; }
.rp-left { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.rp-right { width: 268px; flex: 0 0 268px; }
.rp-sec { padding: 14px 16px; border-bottom: 1px solid #f2f4f7; }
.rp-sec:last-child { border-bottom: 0; }
.rp-t { font-size: 14px; font-weight: 700; color: #1d2129; margin-bottom: 12px; }
.rp-t .muted { font-weight: 400; font-size: 12px; margin-left: 6px; }
.rp-covers { display: flex; gap: 20px; }
.rp-cover { cursor: pointer; }
.rp-cover-img { width: 150px; height: 212px; border: 1px solid var(--line); border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: #fafbfc; overflow: hidden; }
.rp-cover.on .rp-cover-img { border-color: #10A37F; box-shadow: 0 0 0 2px rgba(16,163,127,.15); }
.rp-cover-img img { width: 100%; height: 100%; object-fit: cover; }
.rp-plus { font-size: 26px; color: #86909c; line-height: 1; }
.rp-cover-l { margin-top: 8px; font-size: 14px; color: #4e5969; }
.rp-note { margin-top: 10px; font-size: 12px; color: #86909c; line-height: 1.9; }
.rp-up { display: flex; align-items: center; gap: 12px; }
.rp-upload { width: 118px; height: 118px; border: 1px dashed #c9cdd4; border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; background: #fafbfc; overflow: hidden; }
.rp-upload img { width: 100%; height: 100%; object-fit: contain; }
.rp-qrs { display: flex; gap: 16px; flex-wrap: wrap; }
.rp-qr { text-align: center; position: relative; }
.rp-qr .rp-upload { width: 96px; height: 96px; }
.rp-del { position: absolute; top: 2px; right: -4px; font-size: 12px; color: #e64545; cursor: pointer; }
.rp-preview-t { font-size: 14px; color: #4e5969; margin-bottom: 8px; }
.rp-preview { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px 16px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.rp-pv-head { margin-bottom: 10px; }
.rp-pv-logo { max-width: 150px; max-height: 40px; object-fit: contain; }
.rp-pv-logo-ph { font-size: 12px; color: #c9cdd4; letter-spacing: 2px; }
.rp-pv-clinic { font-size: 16px; font-weight: 700; color: #0f6b4f; }
.rp-pv-badge { display: inline-block; margin: 8px 0 4px; padding: 1px 8px; background: #0f6b4f; color: #fff; font-size: 12px; border-radius: 3px; }
.rp-pv-title { font-size: 18px; font-weight: 700; color: #1d2129; }
.rp-pv-sub { font-size: 10px; color: #86909c; letter-spacing: 1px; margin-top: 2px; }
.rp-pv-date { margin-top: 14px; font-size: 12px; color: #4e5969; }
.rp-pv-foot { margin-top: 16px; }
.rp-pv-qr { width: 64px; height: 64px; object-fit: contain; }
.rp-pv-qr-ph { display: inline-block; width: 64px; height: 64px; line-height: 64px; font-size: 12px; color: #c9cdd4; border: 1px dashed var(--line); border-radius: 4px; }

/* 系统设置 · schema 驱动的配置表单 */
.cf-form { padding: 6px 16px 18px; }
.cf-row { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px dashed #f2f4f7; }
.cf-row:last-child { border-bottom: 0; }
.cf-label { flex: 0 0 168px; font-size: 14px; color: #4e5969; padding-top: 8px; }
.cf-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #1d2129; padding-top: 8px; }
.cf-row textarea.input { line-height: 1.8; font-family: inherit; }

/* ==================== 叫号（对齐原系统「基础设置 → 叫号设置」+ 工作台叫号） ==================== */
/* 收费方式 LOGO（收款弹窗里的那一排 + 设置页里的预览） */
.pay-logo { width: 16px; height: 16px; object-fit: contain; vertical-align: -3px; margin-right: 4px; }
.pay-logo-lg { width: 26px; height: 26px; object-fit: contain; vertical-align: middle; margin-right: 6px; border-radius: 4px; }
/* 自由项里"联动显示"的角标（患者表单里那个字段是跟着别的选项才出现的） */
.f-dep { margin-left: 6px; padding: 1px 6px; border-radius: 8px; background: #eef9f2; color: var(--g); font-size: 12px; font-weight: 400; }
/* 会员变动申请的筛选栏（对齐原系统那一长排：标签 + 控件横排、自动换行） */
.mc-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 2px 0 4px; }
.mc-f { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--sub); }
.mc-f .select, .mc-f .input { width: 130px; }
.mc-f .mc-date { width: 130px; }
/* 会员变动申请的「表格显示框」（用户 2026-10-13 批注：「这个对话框往下拉些 显示框感觉小小的」）
   —— 表格区**撑到窗口底部**（高度由 fitMemberChangeBox() 按窗口实测给，JS 拿不到时兜 min-height），
      表体在框里滚动、分页条钉在框底：换页也不会再在下面留出一大片空白。
      注意：只收在 .mc-change-box 里，**不给 #content 挂布局类**（换页只换 innerHTML、不摘类）。 */
.mc-change-box { display: flex; flex-direction: column; margin-top: 10px; min-height: 320px; }
.mc-change-box > .table-wrap { flex: 1; min-height: 0; overflow: auto; }
.mc-change-box > .pager { flex: none; }
.mc-change-box > .mc-change-sum { flex: none; padding: 4px 2px 0; }
/* 叫号预览的文案样式（设置页里那行「请张三到全科1诊室就诊」） */
.cs-preview { padding-top: 8px; font-size: 14px; color: #1d2129; }
/* 叫号屏显：左上角弹一条，6 秒后自己收（配合语音一起用） */
.call-overlay {
  position: fixed; left: 18px; top: 18px; z-index: 6000;
  display: none; align-items: center; gap: 10px;
  padding: 14px 20px; border-radius: 10px;
  background: #14532d; color: #fff; font-size: 18px; font-weight: 600;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .28);
}
.call-overlay.on { display: flex; animation: callIn .18s ease-out; }
.call-overlay .call-ico { font-size: 20px; }
@keyframes callIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* 系统设置 · 预约中心设置（页签 + 大类/项目主从） */
.ac-tabs { display: flex; gap: 24px; padding: 12px 16px 0; border-bottom: 1px solid var(--line); }
.ac-tab { padding: 8px 2px 10px; font-size: 14px; color: #4e5969; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ac-tab.on { color: #007457; font-weight: 700; border-bottom-color: #10A37F; }
.ac-wrap { display: flex; gap: 0; align-items: stretch; }
.ac-cats { width: 260px; flex: 0 0 260px; border-right: 1px solid var(--line); }
.ac-cats-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; color: #4e5969; }
.ac-cat { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #f7f8fa; cursor: pointer; }
.ac-cat:hover { background: #fafbfc; }
.ac-cat.on { background: #f2fbf6; }
.ac-cat-n { flex: 1; font-size: 14px; color: #1d2129; }
.ac-cat.on .ac-cat-n { color: #007457; font-weight: 600; }
.ac-n { font-size: 12px; color: #86909c; }
.ac-sw { margin-left: 4px; }
.ac-main { flex: 1; min-width: 0; padding: 14px 16px; }
.ac-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }

/* FDI 牙位图 */
.tooth-chart { display: inline-block; padding: 6px 8px; background: #fafbfc; border: 1px solid var(--line); border-radius: 6px; }
.tc-row { display: flex; gap: 2px; justify-content: center; }
.tc-row + .tc-row { margin-top: 2px; }
.tc-t { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 22px; font-size: 10px; color: #86909c; background: #fff; border: 1px solid #e5e6eb; border-radius: 3px; }
.tc-t.on { background: #e8fff4; border-color: #10A37F; color: #007457; font-weight: 700; }
.tooth-chart.sm { padding: 3px 4px; }
.tooth-chart.sm .tc-t { width: 16px; height: 14px; font-size: 10px; border-radius: 2px; }
.tooth-chart.sm .tc-row + .tc-row { margin-top: 1px; }

/* 患者列表 · 左侧分组树（对齐原系统「今日 / 分组 / 最近」） */
.pg-wrap { display: flex; gap: 12px; align-items: flex-start; }
.pg-tree { width: 232px; flex: 0 0 232px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.pg-right { flex: 1; min-width: 0; }
.pg-tabs { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.pg-tab { flex: 1; text-align: center; padding: 7px 0; font-size: 14px; color: #4e5969; cursor: pointer; background: #fff; }
.pg-tab + .pg-tab { border-left: 1px solid var(--line); }
.pg-tab.on { background: #e8fff4; color: #007457; font-weight: 600; }
.pg-group { padding: 12px 12px 6px; font-size: 12px; color: #86909c; }
.pg-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; font-size: 14px; color: #4e5969; border-radius: 6px; cursor: pointer; }
.pg-item:hover { background: #f5f7fa; }
.pg-item.on { background: #e8fff4; color: #007457; font-weight: 600; }
.pg-n { color: #86909c; font-size: 12px; }

/* 患者档案 · 病历页签的子页签栏 */
.ptab-subbar { display: flex; align-items: center; gap: 4px; padding: 8px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ptab-subbar .ac-tab { padding: 6px 2px 8px; }
.ptab-record.collapsed .ptab-rrow, .ptab-record.collapsed .ptab-rsign { display: none; }

/* 高级筛选（原系统六页签弹窗） */
.pf-wrap { display: flex; gap: 0; }
.pf-tabs { width: 150px; flex: 0 0 150px; border-right: 1px solid var(--line); padding: 6px; }
.pf-tab { padding: 10px 12px; font-size: 14px; color: #4e5969; border-radius: 6px; cursor: pointer; }
.pf-tab:hover { background: #f5f7fa; }
.pf-tab.on { background: #e8fff4; color: #007457; font-weight: 600; }
.pf-body { flex: 1; min-width: 0; padding: 12px 16px; max-height: 62vh; overflow-y: auto; }
.pf-row { display: flex; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px dashed #f2f4f7; }
.pf-label { flex: 0 0 92px; font-size: 14px; color: #4e5969; }
.pf-ctrl { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.pf-seg-i { padding: 6px 14px; font-size: 14px; color: #4e5969; cursor: pointer; background: #fff; }
.pf-seg-i + .pf-seg-i { border-left: 1px solid var(--line); }
.pf-seg-i.on { background: #e8fff4; color: #007457; font-weight: 600; }

/* 可排序表头 */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: #007457; }
.sort-ar { margin-left: 3px; font-size: 10px; color: #10A37F; }

/* 预约弹窗 · 预约项目大类折叠复选树 */
.drawer-tree { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; max-height: 260px; overflow-y: auto; background: #fff; }
.dt-group + .dt-group { border-top: 1px dashed #f2f4f7; }
.dt-head { display: flex; align-items: center; gap: 6px; padding: 7px 6px; font-size: 14px; font-weight: 600; color: #1d2129; cursor: pointer; }
.dt-head:hover { background: #fafbfc; }
.dt-caret { font-size: 10px; color: #86909c; width: 10px; }
.dt-items { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 2px 8px 8px 22px; }
.dt-item { font-size: 14px; color: #4e5969; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
/* ⚠️ 2026-10-12 修的排版 bug：这个复选树会被塞进**通用表单**里，而通用表单有
   `.form-row input, .form-row select, .form-row textarea { width: 100% }` ——
   勾选框被撑成一整行（还带 padding），项目名就被挤到**下一行**，看着像"勾选框浮在名字上面"（用户截图）。
   这里把树里的勾选框锁回小方块（`.an-item` 那套预约抽屉同理）。 */
.dt-item input, .an-item input { width: 14px; height: 14px; min-width: 0; flex: 0 0 auto; padding: 0; margin: 0; }
.dt-item { display: inline-flex; align-items: center; gap: 6px; }
.appt-sms-row { grid-column: 1 / -1; padding-top: 6px; border-top: 1px dashed #f2f4f7; }

/* 预约看板 · 月视图 */
.abm-wrap { padding: 4px 2px; }
.abm-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.abm-w { text-align: center; font-size: 12px; color: #86909c; padding: 4px 0; }
.abm-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.abm-cell { min-height: 84px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: #fff; cursor: pointer; }
.abm-cell:hover { border-color: #10A37F; background: #f7fffb; }
.abm-pad { background: #fafbfc; border-style: dashed; cursor: default; }
.abm-pad:hover { border-color: var(--line); background: #fafbfc; }
.abm-today { border-color: #10A37F; box-shadow: 0 0 0 2px rgba(16,163,127,.12); }
.abm-d { font-size: 14px; color: #1d2129; font-weight: 600; }
.abm-n { margin-top: 6px; font-size: 12px; color: #007457; background: #e8fff4; border-radius: 4px; padding: 2px 6px; display: inline-block; }
.abm-lunar { font-size: 12px; color: #86909c; margin-top: 2px; }

/* ============ 智能库存：左侧三级菜单 + 卡片/表格（对齐原系统 /storage-manager） ============ */
.sm-wrap { display: flex; gap: 12px; align-items: flex-start; }
.sm-tree { width: 160px; flex: 0 0 160px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 0; position: sticky; top: 12px; }
.sm-tree-head { padding: 10px 12px 8px; font-weight: 600; color: var(--sub); font-size: 14px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.sm-item { padding: 8px 12px; font-size: 14px; cursor: pointer; color: var(--txt); border-left: 3px solid transparent; }
.sm-item:hover { background: #f4f7fb; }
.sm-item.on { color: var(--g); font-weight: 600; background: #eef5ff; border-left-color: var(--g); }
.sm-sub { padding-left: 28px; font-size: 12px; }
/* 分类树的第三级（费用类型下面那一层小类） */
.sm-sub3 { padding-left: 44px; font-size: 12px; }
/* 分类树里的分组小标题（一级 / 二级 / 三级三段式，2026-10-14 定稿） */
.sm-tree-sec { padding: 8px 12px 4px; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--sub); background: #fafbfd; border-top: 1px solid var(--line); }
.sm-tree-sec i { font-style: normal; font-weight: 400; color: #a9b3bf; }
.sm-group { padding: 8px 14px; font-size: 14px; cursor: pointer; color: var(--sub); font-weight: 600; background: #fafbfd; display: flex; align-items: center; gap: 6px; }
.sm-group.open { color: var(--txt); }
.sm-arrow { font-size: 10px; width: 10px; display: inline-block; }
.sm-right { flex: 1; min-width: 0; }
/* 物品/药品左侧分类树的**第二级**（大类 ▾ → 小类）与折叠箭头（2026-10-14 三级分类） */
.sm-fold { display: inline-block; width: 13px; color: var(--sub); cursor: pointer; }
.sm-tree-tip { padding: 8px 12px; color: #b0751a; font-size: 12px; }
/* 分类树头右侧的「⊕ 新增目录」（照原系统物品管理左树那个按钮） */
.sm-tree-head-ctl { display: block; }
/* 标题 + ⊕ 同一行、「引用费用类型」另起一行（160px 宽里挤一行会折字，2026-10-14 踩到） */
.sm-tree-head-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sm-tree-add { color: #8b97a6; font-size: 15px; line-height: 1; padding: 0 2px; cursor: pointer; user-select: none; }
.sm-tree-add:hover { color: var(--g); }
/* 树标题旁那行小字：告诉人这棵树是「引用费用类型」（2026-10-14 定稿口径） */
.sm-tree-sub { display: block; font-size: 11px; font-weight: 400; color: #9aa5b1; margin-top: 2px; }
/* 「未归类」（档案上还留着老值的那些） */
.sm-legacy { color: #b0751a; }
.sm-legacy-sub { color: #b0751a; opacity: 0.9; }
/* 「库存设置 → 基础信息 → 物品分类 / 药品分类」那张两级树表格 */
.sc-idx { color: var(--sub); font-size: 12px; width: 64px; }
.sc-top > td { background: #fafbfd; font-weight: 600; }
.sc-count { margin-left: 10px; color: var(--sub); font-weight: 400; font-size: 12px; }
.sc-ops { white-space: nowrap; }
.sc-sub-name { padding-left: 12px !important; }
.sc-branch { color: #c3c9d2; margin-right: 6px; }
.sc-warn { margin: 8px 0; padding: 8px 12px; background: #fff8e6; border: 1px solid #f2dfae; border-radius: 6px; color: #8a6d1f; font-size: 12px; }
.sm-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sm-card { flex: 1; min-width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.sm-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--sub); }
.sm-card-b { padding: 12px 14px; }
.sm-kpi-line { display: flex; align-items: center; gap: 8px; padding: 7px 0; font-size: 14px; color: var(--sub); }
.sm-kpi-line > span:first-child { min-width: 96px; }
.sm-kpi { font-size: 20px; font-weight: 700; color: var(--txt); font-variant-numeric: tabular-nums; }
.sm-masked { letter-spacing: 2px; color: var(--sub); }
.sm-eye { border: 0; background: transparent; cursor: pointer; font-size: 14px; opacity: .6; }
.sm-eye:hover { opacity: 1; }
.sm-info { color: var(--g); cursor: help; font-size: 12px; }
.sm-note { font-size: 12px; padding-top: 4px; }
.sm-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.sm-range { font-size: 14px; color: var(--sub); display: inline-flex; align-items: center; gap: 6px; }
.sm-pend { margin-top: 4px; }
.sm-sum td { font-weight: 700; background: #f7f9fc; }
.sm-pur-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 2px 0; font-size: 14px; color: var(--sub); }
.sm-rule-list { padding: 4px 0; }
.sm-rule { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px dashed var(--line); font-size: 14px; }
.sm-rule:last-child { border-bottom: 0; }
.sm-rule-name { min-width: 180px; font-weight: 600; }
.input.input-sm, .input-sm { padding: 5px 8px; font-size: 12px; }

/* 库存总览：左侧分类树 + 顶部两个预警快捷标签（对齐原系统） */
.sm-ov-wrap { display: flex; gap: 12px; align-items: flex-start; }
.sm-ov-tree { width: 190px; flex: 0 0 190px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 0; max-height: 620px; overflow: auto; }
.sm-ov-tree-h { padding: 8px 14px 6px; font-size: 12px; color: var(--sub); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
/* 库存总览顶部「物品 / 药品」分段按钮（对齐原系统那段 radio-button，2026-10-14 批次④ D9） */
.sm-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-right: 8px; }
.sm-seg-i { padding: 6px 16px; font-size: 14px; color: var(--sub); cursor: pointer; background: #fff; }
.sm-seg-i + .sm-seg-i { border-left: 1px solid var(--line); }
.sm-seg-i:hover { color: var(--g); }
.sm-seg-i.on { background: var(--g-light, #eef5ff); color: var(--g-dark, var(--g)); font-weight: 600; }
/* 预警卡里"点得开"的数字 */
.sm-link { color: var(--g); cursor: pointer; text-decoration: underline dotted; }
.sm-link:hover { color: var(--g-dark, var(--g)); }
.sm-ov-main { flex: 1; min-width: 0; }
.sm-ov-warn { display: flex; gap: 8px; padding: 2px 0 10px; flex-wrap: wrap; }
.sm-pill { font-size: 12px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--sub); }
.sm-pill:hover { border-color: var(--g); color: var(--g); }
.sm-pill.on { background: #eef5ff; border-color: var(--g); color: var(--g); font-weight: 600; }

/* 盘点：盈亏数着色 */
.sm-diff-in { color: #1a9c5b; font-weight: 600; }
.sm-diff-out { color: #d64545; font-weight: 600; }

/* ============ 新增预约 · 「搜索患者」选择器（对齐原系统） ============ */
.pp-wrap { position: relative; }
.pp-dd { position: absolute; z-index: 80; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 28px rgba(15, 23, 42, .14); max-height: 320px; overflow: auto; }
.pp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; font-size: 12px; color: var(--sub); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fafbfd; }
.pp-new { border: 0; background: transparent; color: var(--g); cursor: pointer; font-size: 12px; font-weight: 600; }
.pp-new:hover { text-decoration: underline; }
.pp-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; cursor: pointer; font-size: 14px; border-bottom: 1px solid #f2f4f7; }
.pp-item:last-child { border-bottom: 0; }
.pp-item:hover { background: #eef5ff; }
.pp-name { font-weight: 600; color: var(--txt); }
.pp-meta { color: var(--sub); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-empty { padding: 12px 14px; font-size: 12px; color: var(--sub); line-height: 1.7; }
@keyframes ppHit { 0% { background: #d7f5e3; } 100% { background: #fff; } }
.pp-hit { animation: ppHit .8s ease; }

/* ============ 新增预约（整页 · 对齐原系统：左看板 + 中表单 + 右预约项目） ============ */
.an-page { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.an-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.an-title { font-size: 16px; font-weight: 700; }
.an-no { font-size: 12px; color: var(--sub); font-family: inherit; font-variant-numeric: tabular-nums; }
.an-body { display: flex; gap: 0; align-items: stretch; min-height: 620px; }
.an-board { flex: 1; min-width: 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.an-form { width: 360px; flex: 0 0 360px; border-right: 1px solid var(--line); padding: 0 0 12px; overflow: auto; max-height: 620px; }
/* ⚠️ 2026-10-12：原来是 `max-height: 620px` —— 抽屉高的时候「预约项目」这一栏只长到 620px，
   下面一大片空白（用户：「请把这两个对话框的高度做自适应高度」）。去掉上限，让它跟着抽屉高度走：
   面板本身就是 flex 列、`.an-tree` 自己有滚动，所以撑满不会溢出。 */
.an-items { width: 300px; flex: 0 0 300px; display: flex; flex-direction: column; max-height: none; }
.an-sec { font-size: 14px; font-weight: 700; padding: 12px 14px 8px; border-bottom: 1px solid var(--line); background: #fafbfd; }
#anPatient, .an-fields { padding: 12px 14px 0; }
.an-board-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.an-range { font-size: 14px; color: var(--sub); }
.an-board-tip { font-size: 12px; color: var(--sub); padding: 6px 12px; background: #f7f9fc; }
.an-grid-wrap { flex: 1; overflow: auto; max-height: 540px; }
.an-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.an-grid th { position: sticky; top: 0; background: #f5f7fb; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--sub); padding: 6px 4px; z-index: 2; }
.an-tcol { width: 58px; font-size: 12px; color: var(--sub); text-align: center; border-right: 1px solid var(--line); background: #fafbfd; position: sticky; left: 0; z-index: 1; }
.an-cell { border-right: 1px solid #f0f2f6; border-bottom: 1px solid #f6f7fa; height: 26px; vertical-align: top; padding: 0; cursor: pointer; }
.an-cell:hover { background: #f3f8ff; }
.an-chip { background: #e8f1ff; border-left: 3px solid #3b82f6; border-radius: 4px; padding: 2px 5px; margin: 1px; font-size: 12px; line-height: 1.35; cursor: pointer; }
.an-chip b { display: block; font-size: 12px; }
.an-chip span { display: block; color: var(--sub); font-size: 10.5px; }
.an-chip:hover { background: #d8e8ff; }
.an-pcard { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #f9fbfe; }
.an-avatar { width: 38px; height: 38px; border-radius: 50%; background: #e8f1ff; color: #2b6cb0; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.an-pinfo { flex: 1; min-width: 0; font-size: 12px; }
.an-pinfo b { font-size: 14px; }
.an-tip { font-size: 12px; padding: 8px 0; line-height: 1.7; }
.an-f { margin-bottom: 12px; }
.an-f label { display: block; font-size: 12px; color: var(--sub); margin-bottom: 5px; }
.an-f .req { color: var(--red); margin-right: 3px; }
.an-f input, .an-f select, .an-f textarea { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; background: #fff; }
.an-time { display: flex; gap: 8px; align-items: center; }
.an-time input, .an-time select { flex: 1; min-width: 0; }
.an-time .muted { white-space: nowrap; font-size: 12px; }
.an-remark { min-height: 64px; resize: vertical; }
.an-items-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; border-bottom: 1px solid var(--line); background: #fafbfd; font-size: 14px; font-weight: 700; }
.an-gear { border: 0; background: transparent; cursor: pointer; font-size: 16px; color: var(--sub); }
.an-gear:hover { color: var(--g); }
.an-items .pp-wrap { padding: 10px 12px 6px; }
.an-items-suffix { position: absolute; right: 20px; top: 18px; color: var(--sub); font-size: 12px; }
.an-tree { flex: 1; overflow: auto; padding: 4px 12px 8px; }
.an-group { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.an-group-h { padding: 8px 10px; font-size: 12px; font-weight: 600; cursor: pointer; background: #f7f9fc; display: flex; align-items: center; gap: 6px; }
.an-caret { font-size: 10px; width: 10px; }
.an-badge { background: var(--g); color: #fff; border-radius: 999px; font-size: 10px; padding: 0 6px; }
.an-group-b { display: none; padding: 8px 10px; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.an-group.open .an-group-b { display: grid; }
.an-item { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.an-item input { margin: 0; }
.an-items-foot { border-top: 1px solid var(--line); padding: 9px 14px; font-size: 12px; color: var(--sub); line-height: 1.6; }
.an-foot { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); background: #fbfcfe; }
.an-foot .btn { margin-left: 0; }
.an-foot .btn:first-of-type { margin-left: auto; }

/* 新增预约 · 看板表头与状态配色（对齐原系统：周一看板带日期与条数，色块按状态区分） */
.an-th-sub { color: var(--sub); font-weight: 500; font-size: 12px; }
.an-th-n { background: #e8eefb; color: #2b6cb0; border-radius: 999px; font-size: 10px; padding: 0 6px; }
.an-chip.an-s-未确认 { background: #eef1f6; border-left-color: #94a3b8; }
.an-chip.an-s-已确认 { background: #e8f1ff; border-left-color: #3b82f6; }
.an-chip.an-s-待接诊 { background: #fff4e5; border-left-color: #f59e0b; }
.an-chip.an-s-咨询中 { background: #f3e8ff; border-left-color: #a855f7; }
.an-chip.an-s-治疗中 { background: #ffe9e9; border-left-color: #ef4444; }
.an-chip.an-s-待缴费 { background: #fff7e0; border-left-color: #eab308; }
.an-chip.an-s-已完成 { background: #e6f7ee; border-left-color: #10b981; }
.an-chip.an-s-已离开 { background: #eef1f6; border-left-color: #94a3b8; }
.an-chip.an-s-已失约 { background: #f1f5f9; border-left-color: #64748b; }
.an-chip.an-s-已取消 { background: #f1f5f9; border-left-color: #94a3b8; }
.an-time input[type="date"] { flex: 1.5; }
.an-time input[type="time"] { flex: 1; }

/* ============ 预约看板（对齐原系统：左月历+预约状态+收起，右侧日/周看板） ============ */
.ab-actions { display: flex; gap: 8px; justify-content: flex-end; margin: -6px 0 10px; }
.ab-wrap { display: flex; gap: 0; align-items: flex-start; position: relative; }
.ab-wrap.collapsed .ab-left { display: none; }
.ab-left { width: 220px; flex: 0 0 220px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px 12px; margin-right: 10px; }
.ab-wrap.collapsed .ab-collapse { left: 0; }
.ab-collapse { position: absolute; left: 222px; top: 42%; width: 20px; padding: 12px 0; text-align: center; font-size: 12px; color: var(--sub); background: #f3f5f9; border: 1px solid var(--line); border-left: 0; border-radius: 0 8px 8px 0; cursor: pointer; writing-mode: vertical-rl; letter-spacing: 2px; z-index: 3; }
.ab-collapse:hover { color: var(--g); background: #eef5ff; }
.ab-right { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.ab-cal-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ab-cal-bar b { font-size: 14px; }
.ab-cal-nav { border: 0; background: transparent; cursor: pointer; color: var(--sub); font-size: 14px; padding: 2px 4px; }
.ab-cal-nav:hover { color: var(--g); }
.ab-cal-week, .ab-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.ab-cal-week span { text-align: center; font-size: 12px; color: var(--sub); padding: 2px 0; }
.ab-cd { text-align: center; font-size: 12px; padding: 5px 0; border-radius: 50%; cursor: pointer; }
.ab-cd:hover { background: #eef5ff; }
.ab-cd.on { background: var(--g); color: #fff; font-weight: 600; }
.ab-cd.today { box-shadow: inset 0 0 0 1px var(--g); color: var(--g); }
.ab-cd.today.on { color: #fff; }
.ab-checks { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); margin-bottom: 8px; font-size: 12px; }
.ab-st-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; padding-bottom: 6px; }
.ab-st-head .dash-check { font-size: 12px; }
.ab-st-item { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 0; cursor: pointer; color: var(--txt); }
.ab-dot { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.ab-dot-未确认 { background: #94a3b8; } .ab-dot-已确认 { background: #3b82f6; } .ab-dot-待接诊 { background: #f59e0b; }
.ab-dot-咨询中 { background: #a855f7; } .ab-dot-治疗中 { background: #ef4444; } .ab-dot-待缴费 { background: #eab308; }
.ab-dot-已完成 { background: #10b981; } .ab-dot-已离开 { background: #94a3b8; } .ab-dot-已失约 { background: #64748b; }
.ab-dot-已取消 { background: #cbd5e1; }
.ab-dtitle { font-size: 14px; margin-left: 6px; }
.ab-viewname { font-weight: 700; font-size: 14px; margin: 0 8px; }

/* ---- 预约看板（对齐原系统的日看板）：左栏日历带农历/预约数、网格左右双时间刻度 ---- */
/* 左栏日历格：上行日期、下行农历（或节气/节日），右上角小数字 = 当天几条 */
.ab-cd { position: relative; line-height: 1.2; min-height: 30px; padding: 3px 0 4px; border-radius: 8px; }
.ab-cd b { display: block; font-weight: 600; font-size: 12px; }
.ab-cd i { display: block; font-style: normal; font-size: 10px; color: #9aa7b4; }
.ab-cd u { font-size: 10px; color: #0c74ee; text-decoration: none; margin-left: 1px; vertical-align: super; }
.ab-cd.on i, .ab-cd.on u { color: #fff; opacity: .92; }
.ab-cd.today i { color: var(--g); }
/* 右侧那条时间刻度（原系统左右两边都有） */
.ab-corner-r, .ab-time-r { width: 52px; }
.ab-time-r { color: #b8c2cc; font-size: 12px; }
/* 空白格：鼠标移上去给个提示，说明"这里能点着加预约" */
.ab-cell.ab-free { cursor: pointer; }
.ab-cell.ab-free:hover { background: #f0f9f4; outline: 1px dashed #9fdfc4; outline-offset: -1px; }
/* 「设置」弹窗 */
.ab-set-grid { display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 10px; }
.ab-set-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #3c4a5a; }
.ab-set-row > span { width: 76px; text-align: right; flex: none; }
.ab-set-row .input, .ab-set-row .select { width: 200px; }

/* 筛查项目：紧凑双列表单（1180px 宽弹窗会把单列表单挤在左边，右侧全空） */
#billModal.scr-form-modal .modal { width: 780px; max-width: 94vw; }
#billModal.scr-entry-modal .modal {
  width: 1120px; max-width: 97vw; height: calc(100vh - 24px); max-height: calc(100vh - 24px);
  display: flex; flex-direction: column;
}
#billModal.scr-entry-modal .modal-body { flex: 1; min-height: 0; max-height: none; }
#billModal.scr-opt-modal .modal {
  width: 900px; max-width: 96vw; height: calc(100vh - 24px); max-height: calc(100vh - 24px);
  display: flex; flex-direction: column;
}
#billModal.scr-opt-modal .modal-body { flex: 1; min-height: 0; max-height: none; }
.scr-project-form { display: flex; flex-direction: column; gap: 14px; }
.scr-entry-form { display: flex; flex-direction: column; gap: 10px; }
.scr-entry-form .scr-form-sec { padding: 11px 14px 11px; }
.scr-entry-form .scr-form-sec-h { margin-bottom: 9px; }
.scr-entry-hero { display: flex; align-items: center; gap: 11px; padding: 4px 2px 0; }
.scr-entry-avatar { width: 38px; height: 38px; border-radius: 10px; background: var(--g-light); color: var(--g-dark); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; }
.scr-entry-hero-main { min-width: 0; }
.scr-entry-hero-main b { display: block; font-size: 17px; }
.scr-entry-hero-main span { display: block; margin-top: 3px; color: var(--sub); font-size: 12px; }
.scr-entry-hero .pill { margin-left: auto; }
.scr-form-grid.scr-entry-basic { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; gap: 10px 14px; }
.scr-form-grid.scr-entry-basic .scr-inline-field { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 8px; }
.scr-form-grid.scr-entry-basic .scr-inline-field > span { white-space: nowrap; }
.scr-sex-row { display: flex; gap: 8px; flex-wrap: wrap; min-height: 32px; align-items: center; }
.scr-entry-contact { margin-top: 9px; color: var(--sub); font-size: 12px; }
.scr-scope-hint { margin: 2px 0 7px; padding: 7px 9px; border-radius: 6px; background: #f7f9fa; color: var(--sub); font-size: 12px; line-height: 1.5; }
.scr-scope-hint b { color: #23745f; }
.sc-chart-legend { display: flex; align-items: center; justify-content: center; gap: 5px; height: 18px; color: #f1573d; font-size: 12px; }
.sc-chart-legend i { width: 7px; height: 7px; border-radius: 50%; background: #f1573d; }
.scr-entry-form #scrFillChart { border: 1px solid var(--line); border-radius: 8px; padding: 5px; background: #fff; }
.sc-arch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 6px; }
.sc-arch-cell { min-width: 0; padding: 2px; }
.sc-arch-cell .tc-arch-svg { display: block; width: 100%; height: auto; }
.sc-quick .btn.on { background: var(--g); border-color: var(--g); color: #fff; }
.scr-entry-form [data-scrtooth].scr-in-scope { filter: drop-shadow(0 0 3px rgba(43, 164, 113, .95)); }
.scr-caries-row { display: flex; align-items: flex-start; gap: 9px; margin-top: 9px; font-size: 13px; color: #3c4a5a; }
.scr-caries-row > span:first-child { flex: 0 0 76px; color: var(--sub); font-size: 12px; padding-top: 4px; }
.scr-caries-row .sc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.scr-entry-form .sc-right .ab-set-row { align-items: flex-start; }
.scr-entry-form .sc-right .ab-set-row > span:first-child { padding-top: 7px; }
.scr-entry-form .sc-right .sc-chips { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.scr-entry-mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
.scr-entry-mini-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 7px; }
.scr-entry-mini-grid.one { grid-template-columns: 1fr; margin-top: 7px; }
.scr-entry-form .sc-right .input, .scr-entry-form .sc-right .select { height: 28px; font-size: 12px; padding: 0 8px; }
.scr-entry-form .sc-right textarea.input { height: auto; min-height: 44px; padding: 7px 8px; }
.scr-entry-line {
  display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: start;
  gap: 6px; margin-top: 6px; color: var(--sub); font-size: 12px;
}
.scr-entry-line > span:first-child { padding-top: 5px; }
.scr-entry-line .sc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.scr-inline-check { display: inline-flex; align-items: center; gap: 5px; height: 28px; color: #334155; }
.scr-entry-tools { display: flex; align-items: center; gap: 8px; margin: 5px 0 2px 78px; }
.scr-entry-tools .muted { font-size: 11px; }
.scr-entry-form .sc-chip {
  border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 3px 8px;
  color: #334155; cursor: pointer; transition: .15s;
}
.scr-entry-form .sc-chip:has(input:checked) { border-color: var(--g); background: var(--g-light); color: var(--g-dark); }
.scr-status-editor { margin: 10px 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafcfb; }
.scr-status-h { margin-bottom: 8px; font-size: 13px; font-weight: 700; color: #334155; }
.scr-status-row { display: grid; grid-template-columns: 74px minmax(160px, 1fr) 76px; align-items: center; gap: 10px; margin-top: 6px; }
.scr-status-key { color: var(--sub); font-size: 12px; }
.scr-status-row .input { height: 28px; font-size: 12px; }
.scr-opt-form { display: flex; flex-direction: column; gap: 12px; }
.scr-opt-hint { padding: 9px 11px; border-radius: 6px; background: #f3faf7; color: #49665d; font-size: 12px; line-height: 1.6; }
.scr-opt-groups { display: flex; gap: 12px; align-items: flex-start; }
.scr-opt-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.scr-opt-sec { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.scr-opt-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: #f7f9fa; border-bottom: 1px solid var(--line); }
.scr-opt-sec-h > div { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.scr-opt-sec-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.scr-opt-sec-h b { font-size: 13px; color: #263840; white-space: nowrap; }
.scr-opt-sec-h span { color: var(--sub); font-size: 11px; }
.scr-opt-list { padding: 6px 10px 10px; }
#scrOptStatusList { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
#scrOptStatusList .scr-opt-row { grid-template-columns: 58px minmax(0, 1fr) 64px 116px; }
#scrOptStatusList .scr-opt-row + .scr-opt-row { border-top: 0; }
#scrOptStatusList .scr-opt-row:nth-child(n + 3) { border-top: 1px dashed #edf1f1; }
.scr-opt-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px 82px; align-items: center; gap: 8px; padding: 3px 0; }
.scr-opt-row[data-group-row] { grid-template-columns: 34px minmax(0, 1fr) 120px; }
.scr-opt-row + .scr-opt-row { border-top: 1px dashed #edf1f1; }
.scr-opt-row .input { width: 100%; height: 26px; font-size: 12px; }
.scr-opt-code, .scr-opt-index { color: var(--sub); font-size: 12px; }
.scr-opt-show { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #475569; white-space: nowrap; }
.scr-opt-acts { display: flex; align-items: center; gap: 3px; justify-content: flex-end; }
.scr-opt-acts .btn-mini { min-width: 24px; padding: 0 5px; }
.scr-opt-wisdom { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.scr-opt-wisdom span b { display: block; }
.scr-opt-wisdom span small { display: block; margin-top: 2px; color: var(--sub); font-size: 11px; }
.scr-problem-box { margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.scr-problem-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 11px; background: #f7f9fa; border-bottom: 1px solid var(--line); }
.scr-problem-title > div { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.scr-problem-title b { font-size: 13px; color: #263840; }
.scr-problem-title span { color: var(--sub); font-size: 11px; }
.scr-problem-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 9px; padding: 7px 9px; max-height: 165px; overflow: auto; }
.scr-problem-card { border: 1px solid #edf1f1; border-radius: 6px; padding: 5px 7px; background: #fff; }
.scr-problem-line { display: flex; align-items: baseline; gap: 7px; margin-bottom: 4px; min-width: 0; }
.scr-problem-name { font-size: 12px; color: #b73a2e; font-weight: 600; }
.scr-problem-teeth { font-size: 11px; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scr-problem-card .input { width: 100%; height: 26px; font-size: 12px; padding: 0 7px; }
.scr-problem-empty { padding: 12px; color: var(--sub); font-size: 12px; }
@media (max-width: 820px) { .scr-opt-groups { flex-direction: column; } .scr-opt-col { width: 100%; } }
@media (max-width: 1000px) { .scr-form-grid.scr-entry-basic { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.scr-form-hero {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px;
  background: #f2faf6; border: 1px solid #d9eee4; border-radius: 8px;
}
.scr-form-hero-i {
  width: 34px; height: 34px; border-radius: 8px; flex: none;
  background: var(--g); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.scr-form-hero b { display: block; font-size: 14px; color: #20372f; }
.scr-form-hero span { display: block; margin-top: 3px; font-size: 12px; color: var(--sub); }
.scr-form-sec { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px 16px; }
.scr-form-sec-h { position: relative; margin-bottom: 13px; padding-left: 10px; font-size: 14px; font-weight: 700; color: #263840; }
.scr-form-sec-h::before { content: ""; position: absolute; left: 0; top: 3px; width: 3px; height: 14px; border-radius: 2px; background: var(--g); }
.scr-form-sec-h.scr-form-sec-h-row { display: flex; align-items: center; justify-content: space-between; }
.scr-form-sec-h.scr-form-sec-h-row span { font-size: 11px; font-weight: 400; color: #9aa3af; }
.scr-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.scr-form-grid .span2 { grid-column: 1 / -1; }
.scr-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.scr-field > span { font-size: 12px; color: var(--sub); }
.scr-field > span i { color: var(--red); font-style: normal; }
.scr-field .input, .scr-field .select { width: 100%; }
.scr-form-tip { margin-top: 12px; padding: 9px 11px; background: #f7f9fa; border-radius: 6px; color: #687a80; font-size: 12px; line-height: 1.65; }
@media (max-width: 700px) {
  .scr-form-grid { grid-template-columns: 1fr; }
  .scr-form-grid .span2 { grid-column: auto; }
}
.ab-set-checks { display: flex; gap: 18px; padding-top: 6px; border-top: 1px dashed var(--line); }

/* ============ 新增预约 · 右侧滑出面板（覆盖在预约看板右边，看板仍可见） ============ */
.an-overlay { position: fixed; right: 0; top: 56px; bottom: 0; width: 800px; max-width: 82vw; z-index: 60; display: flex; justify-content: flex-end; pointer-events: none; }
.an-panel { width: 100%; background: #fff; display: flex; flex-direction: column; border-left: 1px solid var(--line); box-shadow: -8px 0 28px rgba(15, 23, 42, .16); animation: anSlide .18s ease; pointer-events: auto; }
@keyframes anSlide { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.an-panel .an-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.an-panel .an-title { font-size: 16px; font-weight: 700; }
.an-panel .an-no { font-size: 12px; color: var(--sub); font-family: inherit; font-variant-numeric: tabular-nums; }
.an-panel .drawer-close { margin-left: auto; cursor: pointer; color: var(--sub); font-size: 16px; }
.an-panel .an-body { flex: 1; min-height: 0; display: flex; }
.an-panel .an-form { width: 400px; flex: 0 0 400px; overflow: auto; border-right: 1px solid var(--line); padding-bottom: 12px; }
.an-panel .an-items { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* CBCT 工作台工具条：不要复用全局 `.bar`（它是 3px 宽的装饰条），否则按钮会被挤成竖排 */
.cbct-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.an-panel .an-foot { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); background: #fbfcfe; }
.an-foot-hint { margin-left: auto; font-size: 12px; color: var(--sub); }

/* —— 新增预约面板：窄一点、别把左边看板挤扁；时间行与项目列表重排（对齐原系统的整洁度） —— */
.an-overlay { width: 620px; max-width: 44vw; }
.an-panel .an-form { width: 340px; flex: 0 0 340px; }
.an-panel .an-items { min-width: 260px; }
.ab-right { min-width: 360px; }
.an-time { flex-wrap: wrap; }
.an-time input[type="date"] { flex: 0 0 128px; }
.an-time input[type="time"] { flex: 0 0 96px; }
.an-time select[data-ank="duration"] { flex: 0 0 96px; }
.an-time .muted { flex: 1 0 100%; font-size: 12px; }
.an-group-b { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.an-item { align-items: flex-start; line-height: 1.35; }
.an-item input { margin-top: 3px; flex: 0 0 auto; }
.an-tree { padding: 4px 10px 8px; }
.an-items-head { padding: 10px 12px 8px; }
.an-items .pp-wrap { padding: 8px 12px 4px; }
.an-items-suffix { right: 18px; }

/* —— 新增预约：更贴近原系统的整洁度（面板更窄、时间合成一个控件、收起标签不被遮） —— */
.an-overlay { width: 600px; max-width: 40vw; }
.an-panel .an-form { width: 330px; flex: 0 0 330px; }
.an-time { flex-wrap: nowrap; align-items: center; gap: 6px; }
.an-dt { display: flex; flex: 1 1 auto; min-width: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.an-dt input { border: 0; border-radius: 0; padding: 7px 8px; font-size: 14px; min-width: 0; }
.an-dt input[type="date"] { flex: 1 1 60%; }
.an-dt input[type="time"] { flex: 0 0 92px; border-left: 1px solid var(--line); }
.an-time select[data-ank="duration"] { flex: 0 0 92px; }
.an-time .muted { flex: 0 0 auto; font-size: 12px; white-space: nowrap; }
body.an-open .ab-collapse { display: none; }
.an-panel .an-f { margin-bottom: 10px; }
.an-panel .an-f label { margin-bottom: 4px; }

/* —— 面板打开时：左栏（月历+预约状态）不需要，让位给整周看板 —— */
body.an-open .ab-left { display: none; }
body.an-open .ab-right table { table-layout: fixed; width: 100%; }
body.an-open .ab-right th, body.an-open .ab-right td { min-width: 0; }
.an-overlay { width: 560px; max-width: 38vw; }
.an-time { flex-wrap: nowrap; align-items: center; gap: 6px; }
.an-time input[type="datetime-local"] { flex: 1 1 auto; min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
.an-time select[data-ank="duration"] { flex: 0 0 96px; }

/* 面板打开时：把看板压成刚好放得下 7 天（否则表格有最小宽度，第 5-7 天会被面板挡住） */
body.an-open #abBody { overflow-x: hidden; }
body.an-open #abBody table { table-layout: fixed !important; width: 100% !important; min-width: 0 !important; }
body.an-open #abBody th, body.an-open #abBody td { min-width: 0 !important; width: auto !important; }
body.an-open #abBody .ab-time { width: 52px; }

/* 面板是 fixed 浮在上面的，看板不知道自己被挡住 —— 给它留出右侧空间，7 天就能全露出来 */
body.an-open #content { padding-right: 572px; }

/* 左侧菜单：去掉小方块里的字，只留文字 */
.menu-item { justify-content: center; gap: 0; padding: 11px 6px; }
.menu-item .menu-label { font-size: 12px; line-height: 1.3; text-align: center; }

/* ============ 收费页签：卡片排满 6 张 + 账单卡片自适应高度（多显少显） ============ */
.bs-row { grid-template-columns: repeat(6, 1fr) auto; }
/* ============ 收费页签 · 8 张统计卡压成**一行**（用户 2026-10-09：「你现在也太大了吧 两行都搞不定 做小点」） ============
   原来 6 列 + 8 张卡 + 工具条 = 9 个格子 → 必然换行；现在按 8 列排，卡内边距/数字/说明同步收小，
   说明文字改成**单行省略号**（完整文案挂在 title 上，鼠标悬停能看全）。 */
/**
 * 用户 2026-10-09 图（收费页签）：「把上面的九个框平分到这里」——
 * 统计卡从 8 张变成 9 张（加了「返现余额」）之后，网格却还是 `repeat(8, …) auto`：
 * 第 9 张卡被塞进那个 `auto` 列（本来留给「字段设置」的），工具条被挤到第二行 —— 既不匀也不好看。
 * 现在按 **9 列等分 + 工具列** 排，九张卡平分整行、工具条留在行尾。
 */
.bs-row.bill { grid-template-columns: repeat(9, minmax(0, 1fr)) auto; gap: 8px; align-items: stretch; }
.bs-row.bill .bs-tools { align-self: center; }
.bs-row.bill .bs-card { padding: 8px 10px; border-radius: 6px; }
.bs-row.bill .bs-l { font-size: 12px; }
.bs-row.bill .bs-v {
  font-size: 18px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.bs-row.bill .bs-sub {
  font-size: 12px; min-height: 0; margin-top: 1px; color: #98A6B3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bs-row.bill .bs-tools { gap: 6px; }
/* 窄屏（笔记本一半屏 / 窗口拖小）才允许折成两行，免得挤成一条缝 */
@media (max-width: 1360px) { .bs-row.bill { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bill-card { overflow: visible; height: auto; max-height: none; }
.bill-card .table-wrap { max-height: none; }
/* 明细 17 列偏宽，字号和内距收一点，尽量一屏装下、少出横向滚动条 */
.bill-card table { font-size: 12px; }
.bill-card table th, .bill-card table td { padding: 6px 8px; white-space: nowrap; }
.bill-card .bill-h-row { line-height: 1.9; }
/* 处置表单里的牙位图 */
.tc-picker { margin-top: 8px; }
.tc-tip { font-size: 12px; color: var(--sub); margin-bottom: 6px; }

/* 处置弹窗的牙位浮层（点牙位格弹出 FDI 牙位图） */
.tc-pop { position: fixed; z-index: 120; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 28px rgba(15,23,42,.16); padding: 8px 10px; }
.tc-pop.hidden { display: none; }
.tc-pop-h { font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.tc-pop .tooth-chart.sm .tc-t { width: 22px; height: 20px; line-height: 20px; font-size: 10.5px; }

/* ============ 「选择牙位」弹窗（对齐原系统：整口快捷 + 上下颌牙齿图形 + 多生牙） ============ */
.tw-quick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-bottom: 10px; border-bottom: 1px dashed var(--line); margin-bottom: 12px; }
.tw-arch { padding: 4px 0 8px; }
.tw-row { display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.tw-row.low { align-items: flex-start; }
.tw-row.low .tw-t svg { transform: rotate(180deg); }
.tw-gap { width: 18px; }
.tw-t { display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; padding: 2px 1px; border-radius: 6px; }
.tw-t svg { fill: #fff; stroke: #c3d0de; stroke-width: 1.2; }
.tw-t i { font-style: normal; font-size: 12px; color: var(--sub); }
.tw-t:hover svg { stroke: var(--g); }
.tw-t.on svg { fill: #f6a8bb; stroke: #e2798f; }
.tw-t.on i { color: #d2546f; font-weight: 700; }
.tw-mid { display: flex; align-items: center; gap: 10px; color: var(--sub); font-size: 12px; padding: 6px 0; }
.tw-line { flex: 1; height: 1px; background: var(--line); }
.tw-extra { padding-top: 10px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--sub); display: flex; align-items: center; gap: 8px; }

/* 沟通视频：上传/粘贴链接 模式切换 + 卡片直接出画面 */
.comm-mode { display: flex; gap: 8px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.comm-mode-t { padding: 6px 12px; font-size: 14px; color: var(--sub); cursor: pointer; border-bottom: 2px solid transparent; }
.comm-mode-t.on { color: var(--g); font-weight: 600; border-bottom-color: var(--g); }
.comm-cover video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }

/* 初始密码提醒条 */
.pwd-hint { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 10px 14px; background: #fff7e6; border: 1px solid #f5d08a; border-radius: 8px; font-size: 14px; color: #8a6d3b; }
.pwd-hint-i { width: 18px; height: 18px; border-radius: 50%; background: #f0a020; color: #fff; font-weight: 700; text-align: center; line-height: 18px; font-size: 12px; flex: 0 0 auto; }
.pwd-hint .btn { margin-left: auto; }
.pwd-hint-x { cursor: pointer; color: #b08a4a; padding: 0 4px; }

/* ==================== 患者档案 · 影像（影像中心 / 治疗阶段，对齐原系统） ==================== */

/* ---- 工具条：影像中心 ｜ 治疗阶段 分段 + 右侧按钮 ---- */
.img-topbar { display: flex; align-items: center; gap: 8px; padding: 4px 0 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.img-seg { display: inline-flex; border: 1px solid var(--g); border-radius: 4px; overflow: hidden; }
.img-seg-i { padding: 7px 20px; font-size: 14px; cursor: pointer; color: var(--g); background: #fff; }
.img-seg-i.on { background: #1f8f5f; color: #fff; font-weight: 600; }
.ts-radio { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--sub); }
.img-batch-wrap { position: relative; display: inline-block; }
.img-caret { font-style: normal; margin-left: 2px; }
.img-batch-menu { position: absolute; right: 0; top: 30px; z-index: 40; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 18px rgba(20,30,45,.12); padding: 4px 0; min-width: 120px; }
.img-batch-menu > span { display: block; padding: 7px 14px; font-size: 14px; color: #3c4a5a; cursor: pointer; }
.img-batch-menu > span:hover { background: #f2faf6; color: var(--g); }
.img-capture { position: relative; padding-right: 30px; }
.img-capture-i { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12px; color: #cfe9dc; cursor: help; }

/* ---- 类别页签 + 排序 + 垃圾桶 ---- */
.img-chips { display: flex; align-items: center; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.img-chip { padding: 5px 12px; border-radius: 4px; font-size: 14px; color: var(--sub); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.img-chip:hover { color: var(--g); }
.img-chip.on { color: var(--g); font-weight: 600; border-bottom-color: var(--g); background: #f2faf6; }
.img-sort { font-size: 14px; color: var(--g); cursor: pointer; white-space: nowrap; }
.img-sort i { font-style: normal; }
.img-trash { font-size: 16px; color: var(--aux); cursor: pointer; margin-left: 14px; }
.img-trash:hover { color: #e5484d; }

/* ---- 图库：按就诊/治疗阶段分组，组头 + 大图 ---- */
.img-wrap { display: flex; align-items: flex-start; gap: 12px; margin-top: 12px; }
.img-main { flex: 1; min-width: 0; }
.img-drop { flex: 0 0 52px; align-self: stretch; min-height: 300px; border: 1px dashed #cfd8e3; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #9aa6b4; background: #fbfcfe; cursor: pointer; }
.img-drop .img-drop-t { writing-mode: vertical-rl; letter-spacing: 5px; font-size: 14px; }
.img-drop.on { border-color: var(--g); background: #eefaf4; color: var(--g); }
.img-group { margin-bottom: 16px; }
.img-group-h { display: flex; align-items: center; gap: 12px; padding: 9px 14px; background: #eef1f5; border-radius: 4px; font-size: 14px; color: #3c4a5a; }
.img-group-t { font-weight: 500; line-height: 1.5; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; padding: 14px 4px; }
.ptab-card { background: transparent; }
.ptab-thumb { position: relative; width: 100%; height: 132px; border-radius: 4px; overflow: hidden; background: #eef2f6; }
.ptab-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ptab-thumb-ph { display: flex; align-items: center; justify-content: center; height: 100%; color: #9aa6b4; font-size: 14px; }
.ptab-card-b { padding: 6px 0 0; text-align: center; }
.ptab-card-t { font-size: 14px; color: #2c3542; }
.ptab-card-b .muted { font-size: 12px; }
.ptab-card-a { margin-top: 4px; opacity: 0; transition: opacity .15s; }
.ptab-card:hover .ptab-card-a { opacity: 1; }
.ai-badge { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 9px; background: #d9f2e4; color: #2f8f62; font-size: 12px; }
.ai-badge::before { content: '◎'; font-size: 10px; }
.img-foot { margin-top: 8px; font-size: 12px; }

/* ---- 治疗阶段：每个阶段一整块 ---- */
.ts-blocks { margin-top: 12px; }
.ts-block { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 14px; overflow: hidden; }
.ts-block-h { display: flex; align-items: center; gap: 14px; padding: 9px 14px; background: #eef1f5; font-size: 14px; color: #3c4a5a; }
.ts-block-t i { font-style: normal; color: var(--aux); }
.ts-act { color: var(--g); cursor: pointer; font-size: 14px; }
.ts-act:hover { text-decoration: underline; }
.ts-block-b { padding: 10px 12px 14px; }
.ts-none { padding: 18px 0; text-align: center; }
/* 布局查看：22 格密集排（每格左上角是部位小标签，缺图显示线稿） */
.ts-slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.ts-slot { position: relative; height: 64px; border-radius: 3px; background: #f7f9fb; overflow: hidden; cursor: pointer; }
.ts-slot .ts-tag { position: absolute; left: 3px; top: 3px; z-index: 2; padding: 0 5px; border-radius: 3px; background: #e2f1e9; color: #2f8f62; font-size: 10px; line-height: 15px; white-space: nowrap; max-width: calc(100% - 6px); overflow: hidden; text-overflow: ellipsis; }
.ts-slot .ts-art { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.ts-slot .ts-art svg { width: 68%; height: 68%; opacity: .9; }
.ts-slot .ts-art img { width: 100%; height: 100%; object-fit: cover; }
.ts-slot.on { background: #fff; }
.ts-slot:hover { box-shadow: 0 0 0 2px rgba(31,143,95,.35); }
.ts-slot .ai-badge { bottom: 4px; left: 4px; }
/* 平铺查看：只列已有影像 */
.ts-flat { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }

/* ---- 新增治疗阶段弹窗 ---- */
#tsModal { align-items: stretch; justify-content: stretch; }
#tsModal .ts-page { width: 100%; height: 100vh; background: #fff; display: flex; flex-direction: column; }
.ts-head { display: flex; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.ts-title { font-size: 18px; font-weight: 600; }
.ts-head .drawer-close { margin-left: auto; cursor: pointer; color: var(--aux); }
.ts-form { display: flex; align-items: center; gap: 18px; padding: 12px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ts-f { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--sub); }
.ts-f label { color: #5b6674; }
.ts-f label i { color: #e5484d; font-style: normal; }
.ts-body { flex: 1; min-height: 0; display: flex; gap: 12px; padding: 14px 20px; overflow: auto; }
.ts-slots { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ts-group { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: #fbfcfe; }
.ts-group-t { font-size: 14px; color: #5b6674; margin-bottom: 8px; }
.ts-items { display: flex; flex-wrap: wrap; gap: 8px; }
#tsModal .ts-slot { width: 100px; height: 76px; }
#tsModal .ts-slot .ts-art svg { width: 76%; height: 76%; }
.ts-side { flex: 0 0 230px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: #fbfcfe; }
.ts-side-h { font-size: 14px; font-weight: 600; color: #2c3542; margin-bottom: 8px; }
.ts-badge { color: #b7c1cd; cursor: help; font-size: 12px; }
.ts-preview { min-height: 160px; border: 1px dashed #dbe3ec; border-radius: 6px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.ts-preview img { max-width: 100%; max-height: 260px; display: block; }
.ts-preview-cap { font-size: 12px; color: var(--sub); padding: 6px 0; }
.ts-preview-empty { text-align: center; color: var(--aux); font-size: 12px; padding: 18px 8px; }
.ts-preview-ico { font-size: 34px; opacity: .35; margin-bottom: 6px; }
.ts-side-tip { margin-top: 10px; font-size: 12px; line-height: 1.7; }

/* ---- 对比查看 ---- */
.cmp-pick { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cmp-box { display: flex; gap: 14px; }
.cmp-col { flex: 1; min-width: 0; }
.cmp-col-h { font-size: 14px; color: #2c3542; padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.cmp-img { position: relative; margin-bottom: 8px; }
.cmp-img img { width: 100%; border-radius: 4px; display: block; }
.cmp-img-t { display: block; text-align: center; font-size: 12px; color: var(--sub); padding-top: 3px; }

/* ==================== 系统设置 · 随访设置（对齐原系统 /app-settings 随访设置五页） ==================== */
.req { color: #e5484d; font-style: normal; margin-right: 2px; }
.fp-content { min-width: 220px; max-width: 560px; white-space: normal; }
.fp-ops { white-space: nowrap; }
.fp-ops .btn-mini { margin-right: 4px; }

/* 弹窗里的表单行 / 分区标题 */
.fp-dlg { padding: 2px 2px 6px; }
.fp-sec { background: #f2f5f8; border-radius: 4px; padding: 8px 12px; font-weight: 600; color: #2c3542; margin: 14px 0 12px; }
.fp-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.fp-label { flex: 0 0 110px; text-align: right; color: #5b6674; font-size: 14px; line-height: 32px; }
.fp-radio { margin-right: 18px; font-size: 14px; display: inline-flex; align-items: center; gap: 5px; line-height: 32px; color: #3c4a5a; cursor: pointer; }
.fp-tip { color: #b7c1cd; cursor: help; font-style: normal; }
.fp-link { color: var(--g); cursor: pointer; font-size: 14px; line-height: 32px; }
.fp-checks { display: flex; flex-direction: column; gap: 8px; padding-top: 7px; }
.fp-check { font-size: 14px; color: #3c4a5a; cursor: pointer; }
.fp-help { font-size: 14px; line-height: 2; padding: 6px 2px; }

/* 计划时间轴 + 计划卡片 */
.fp-plans { margin-top: 6px; }
.fp-timeline { position: relative; padding-left: 30px; }
/* 原系统的计划是挂在一根时间轴上的：左边一条虚线，时钟图标落在线上 */
.fp-timeline::before { content: ''; position: absolute; left: 10px; top: 12px; bottom: 16px; border-left: 2px dotted #cfe3d7; }
.fp-plan { position: relative; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 12px; overflow: hidden; background: #fff; }
.fp-plan-ico { position: absolute; left: -26px; top: 9px; background: #fff; line-height: 1; }
.fp-plan-h { display: flex; align-items: center; gap: 8px; background: #eef1f5; padding: 8px 12px; }
.fp-plan-ico { color: var(--g); font-size: 14px; }
.fp-plan-t { font-weight: 600; font-size: 14px; color: #2c3542; }
.fp-plan-del { margin-left: auto; color: #b7c1cd; cursor: pointer; padding: 0 4px; }
.fp-plan-del:hover { color: #e5484d; }
.fp-plan-b { padding: 10px 12px 4px; }
.fp-num { width: 90px; }
.fp-units { display: inline-flex; gap: 2px; margin: 0 8px; }
.fp-unit { padding: 3px 12px; border: 1px solid var(--line); border-radius: 3px; font-size: 12px; cursor: pointer; color: var(--sub); }
.fp-unit.on { background: #1f8f5f; color: #fff; border-color: #1f8f5f; }
.fp-after { font-size: 14px; color: var(--sub); line-height: 32px; }
.fp-content { flex: 1; min-height: 68px; }
.fp-insert { margin-left: 8px; align-self: flex-start; }

/* 规则说明条 */
.fp-rule-tip { margin: 10px 14px 0; padding: 12px 14px; font-size: 12px; line-height: 2; color: #8a6d3b; background: #fff7e6; border: 1px solid #f5d08a; border-radius: 6px; }

/* 插入常用语选择器 */
.fp-pick { max-height: 46vh; overflow: auto; }
.fp-pick-i { padding: 9px 10px; border-bottom: 1px dashed var(--line); cursor: pointer; font-size: 14px; }
.fp-pick-i:hover { background: #f2faf6; color: var(--g); }

/* 触发条件：类型 + 取值两层 */
.fp-checks { gap: 6px; }
.fp-check-row { display: flex; align-items: center; gap: 10px; }
.fp-pick-btn { display: inline-block; padding: 2px 10px; border: 1px solid var(--line); border-radius: 4px; font-size: 12px; color: var(--sub); cursor: pointer; }
.fp-pick-btn:hover { border-color: var(--g); color: var(--g); }
#fpPick { z-index: 130; }
.fpp-wrap { display: flex; gap: 14px; min-height: 340px; }
.fpp-left { flex: 0 0 150px; border-right: 1px solid var(--line); padding-right: 8px; }
.fpp-g { padding: 7px 10px; font-size: 14px; color: #3c4a5a; cursor: pointer; border-radius: 4px; }
.fpp-g:hover { background: #f2faf6; }
.fpp-g.on { background: #e7f3ec; color: var(--g); font-weight: 600; }
.fpp-right { flex: 1; min-width: 0; }
.fpp-search { display: flex; gap: 8px; margin-bottom: 10px; }
.fpp-search .input { flex: 1; }
.fpp-list { max-height: 42vh; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.fpp-i { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #f2f5f8; cursor: pointer; font-size: 14px; }
.fpp-i:hover { background: #f7fbf9; }
.fpp-n { flex: 1; }

/* 多店经营 · 顶部门店切换器 */
.store-switch { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.store-switch-ico { font-size: 14px; }
.store-switch-sel { width: 150px; border: none; background: transparent; font-size: 14px; color: #2c3542; outline: none; }
.store-switch-sel:disabled { color: var(--sub); cursor: default; }
/* 每店独立后台入口（P3）：本入口固定一家店 → 顶栏给个"已锁定"的观感 */
.store-switch.store-switch-locked { background: #f3f8ff; border-color: #bcd8ff; }
.store-switch.store-switch-locked::after { content: '本店入口'; margin-left: 6px; font-size: 12px; color: #3b82f6; border: 1px solid #bcd8ff; border-radius: 4px; padding: 0 4px; }

/* 拖拽排序手柄（对齐原系统模板列表里的 ⠿） */
.fp-drag { display: inline-block; margin-right: 6px; color: #b7c1cd; cursor: grab; user-select: none; }
.fp-drag:hover { color: var(--g); }
.fp-drag:active { cursor: grabbing; }
tr.fp-dragging { opacity: .45; background: #eef7f2; }

/* 随访微信提醒卡片 */
.fr-remind { margin: 10px 14px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfe; }
.fr-remind-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.fr-remind-h .muted { font-size: 12px; }
.fr-remind-b { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 14px; color: #3c4a5a; }
.fr-remind-b .fr-num2 { width: 70px; }
.fr-remind-b .fr-time { width: 86px; }
.fr-remind-b .fr-sel { width: 150px; }
.fr-remind-s { margin-top: 8px; font-size: 12px; }
.fr-remind-warn { margin-top: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.8; color: #8a6d3b; background: #fff7e6; border: 1px solid #f5d08a; border-radius: 4px; }
.fr-ok { color: var(--g); font-weight: 600; }

/* ==================== 患者「新增 / 编辑」表单：自定义填写项目（对齐原系统） ==================== */
/* 抽屉标题右侧的「自定义填写项目 ⚙」入口 */
.pf-entry { margin-left: 12px; font-size: 12px; font-weight: 400; color: var(--g); cursor: pointer; user-select: none; }
.pf-entry:hover { text-decoration: underline; }
/* 普通患者 / 临时患者 单选（原系统是两段式单选，放在表单最上面） */
/* 普通患者 / 临时患者：原系统是"两段式色块"，选中的那块绿底白字（原来是一对圆点单选） */
.pf-types { display: flex; align-items: center; gap: 8px; padding: 0 0 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.pf-types label { display: flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 4px; background: #f2f4f6; font-size: 14px; color: #56636f; cursor: pointer; }
.pf-types label.on { background: var(--g); color: #fff; }
.pf-types input { display: none; }
/* 分组标题（原系统「新增患者」弹窗里的「个人信息」绿条） */
.pf-sec { display: flex; align-items: center; gap: 8px; margin: 0 0 7px; padding: 3px 10px; background: #f4f7f6; border-radius: 4px; font-size: 14px; font-weight: 600; color: #2f3b4a; }
.pf-sec i { display: inline-block; width: 3px; height: 14px; background: var(--g); border-radius: 2px; }
/* 按钮式单选（性别「男/女/其他」· 是否添加微信「是/否」—— 对齐原系统，原来是下拉） */
.pf-radios { display: flex; align-items: center; gap: 16px; min-height: 34px; }
.pf-radios label { display: flex; align-items: center; gap: 5px; font-size: 14px; color: #3c4a5a; cursor: pointer; margin: 0; }
.pf-radios input { width: auto; accent-color: var(--g); }
/* 出生日期：年 / 月 / 日 三个下拉（对齐原系统；选完拼成 YYYY-MM-DD 写进隐藏域） */
.pf-date { display: flex; gap: 6px; }
.pf-date select { flex: 1; min-width: 0; padding: 8px 6px; }
.pf-date select:disabled { background: #f7f8f9; color: #a9b3bd; }
/* 病历号：新增时灰底只读 + 「↻」换一个（对齐原系统那条自动生成的只读框） */
.pf-no { display: flex; align-items: center; gap: 6px; position: relative; }
.pf-no input { flex: 1; min-width: 0; background: #f6f8f9; color: #5d6b7a; padding-right: 56px; }
.pf-no button { flex: none; padding: 8px 10px; }
/* 只读框里的「11 / 30」（对齐原系统），贴在输入框右侧、按钮左边 */
.pf-no-count { position: absolute; right: 52px; top: 50%; transform: translateY(-50%); font-size: 12px; color: #b6c0cc; pointer-events: none; }
/* 上传头像：输入框 + 上传按钮 + 缩略图 */
.pf-avatar { display: flex; align-items: center; gap: 8px; }
.pf-avatar input { flex: 1; }
.pf-avatar img { width: 32px; height: 32px; border-radius: 4px; object-fit: cover; border: 1px solid var(--line); }
/* 自定义设置弹窗（普通 / 临时 两套字段表） */
.pf-tabs { display: flex; gap: 8px; padding: 0 0 12px; }
.pf-tab { padding: 6px 18px; border: 1px solid var(--line); border-radius: 4px; font-size: 14px; color: #3c4a5a; cursor: pointer; background: #fff; }
/* ⚠️ 只在患者表单那个「自定义设置」弹窗里把页签行铺满整行（`＋ 新增项目` 要占右侧）。
   `.pf-tabs` 是**共用类**：标签管理弹窗的左侧 150px 分类栏也用它 —— 上面那条 150px 的规则别动，
   否则标签管理会整块歪掉（2026-10-14 踩到，verify-live 当场抓到）。 */
#pfModal .pf-tabs { display: flex; align-items: center; gap: 8px; width: auto; flex: 1; border-right: 0; }
#pfModal .pf-tab { flex: none; white-space: nowrap; }
.pf-tab.on { border-color: var(--g); color: var(--g); background: #eef9f2; font-weight: 600; }
.pf-wrap { max-height: 52vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; }
.pf-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pf-table th, .pf-table td { padding: 9px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.pf-table th { position: sticky; top: 0; background: #f7f9fb; font-weight: 600; color: var(--sub); z-index: 1; }
.pf-table td.pf-c { width: 120px; text-align: center; }
.pf-table tr:last-child td { border-bottom: none; }
.pf-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--g); }
.pf-table .pf-lock { display: inline-block; width: 16px; height: 16px; line-height: 16px; text-align: center; color: #fff; background: var(--g); border-radius: 3px; font-size: 12px; }
.pf-tip { margin-top: 10px; font-size: 12px; color: var(--sub); line-height: 1.8; }

/* 知情同意书模板（系统设置 → 模板设置）：富文本工具条 + 编辑区 + 预览纸面 + 空白签字位 */
.ct-wrap { display: flex; flex-direction: column; }
.ct-tool {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 8px;
  border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; background: #fafbfd;
}
.ct-tool select, .ct-tool input[type="color"] {
  height: 26px; border: 1px solid var(--line); border-radius: 4px; background: #fff; font-size: 12px; color: var(--sub);
}
.ct-tool select { padding: 0 4px; }
.ct-tool input[type="color"] { width: 32px; padding: 1px 2px; }
.ct-btn {
  min-width: 26px; height: 26px; padding: 0 7px; border: 1px solid var(--line); background: #fff;
  border-radius: 4px; cursor: pointer; font-size: 12px; color: #33455c;
}
.ct-btn:hover { border-color: var(--g); color: var(--g); }
.ct-sep { width: 1px; height: 18px; background: var(--line); margin: 0 3px; }
.ct-param-wrap { position: relative; display: inline-block; }
.ct-param-menu {
  position: absolute; z-index: 30; top: 30px; left: 0; width: 210px; max-height: 300px; overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 10px 28px rgba(15, 23, 42, .16); padding: 6px;
}
.ct-param-menu.hidden { display: none; }
.ct-param-g { font-size: 12px; color: var(--aux); padding: 4px 6px; }
.ct-param-menu button {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 5px 8px; border-radius: 4px; cursor: pointer; font-size: 12px; color: #33455c;
}
.ct-param-menu button:hover { background: var(--g-light); color: var(--g); }
.ct-body {
  min-height: 320px; max-height: 52vh; overflow: auto; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: 0 0 6px 6px; background: #fff;
  font-size: 14px; line-height: 1.8; outline: none;
}
.ct-body img, .ct-paper img { max-width: 100%; }
.ct-body h1, .ct-body h2, .ct-body h3 { margin: 10px 0; }
.ct-paper {
  background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 26px 30px;
  max-height: 56vh; overflow: auto; font-size: 14px; line-height: 1.9;
}
.ct-sig { display: inline-block; min-width: 110px; margin: 0 6px; border-bottom: 1px solid #4a5568; text-align: center; color: #4a5568; }
.ct-lead { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.ct-pick { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow: auto; }
.ct-pick-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; text-align: left;
}
.ct-pick-item:hover { border-color: var(--g); background: var(--g-light); }

/* ---------------- 营销 → 家庭号（手机预览 + 配置表单） ---------------- */
.fn-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); padding: 0 16px; }
.fn-tab { padding: 12px 2px; font-size: 14px; color: var(--sub); cursor: pointer; border-bottom: 2px solid transparent; }
.fn-tab.on { color: var(--g); font-weight: 700; border-bottom-color: var(--g); }
.fn-wrap { display: flex; gap: 20px; align-items: flex-start; padding: 16px; }
.fn-left { width: 300px; flex: none; }
.fn-main { flex: 1; min-width: 0; }
.fn-phone { width: 300px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 6px 18px rgba(20, 30, 45, .08); }
.fn-hero {
  height: 150px; display: flex; align-items: center; justify-content: center; position: relative;
  background: linear-gradient(150deg, #2BA471, #17a673); background-size: cover; background-position: center;
}
.fn-hero.has-img { background-color: #2BA471; }
.fn-hero b { color: #fff; font-size: 26px; letter-spacing: 3px; text-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.fn-rule {
  position: absolute; right: 10px; top: 12px; font-size: 12px; color: #fff; cursor: default;
  background: rgba(0, 0, 0, .22); border-radius: 10px; padding: 2px 9px;
}
.fn-body { padding: 0 12px 14px; }
.fn-name {
  display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 10px;
  padding: 12px; margin-top: -20px; position: relative; box-shadow: 0 4px 14px rgba(20, 30, 45, .08);
}
.fn-name b { display: block; font-size: 14px; color: #1d2129; }
.fn-name i { display: block; font-style: normal; font-size: 12px; color: var(--aux); margin-top: 2px; }
.fn-sec { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--sub); margin: 14px 0 8px; }
.fn-more { color: var(--aux); }
/* 一排放下 5 个（4 位成员 + 邀请家人）——和原系统那张图一样，不要换行 */
.fn-members { display: flex; flex-wrap: nowrap; justify-content: space-between; }
.fn-m { width: 48px; text-align: center; font-size: 12px; color: var(--sub); }
.fn-av {
  display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin: 0 auto 4px;
  border-radius: 50%; background: #eef1f5; color: #7b8794; font-size: 14px;
}
.fn-av.me { background: #e8f7f1; color: #0b8064; font-weight: 700; }
.fn-av.add { background: #eef7ff; color: #2f7fdc; border: 1px dashed #9fc8f2; }
.fn-day { font-size: 12px; color: var(--sub); background: #fafbfd; border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; }
.fn-day b { color: #1d2129; margin-right: 10px; }
.fn-day i { font-style: normal; color: var(--aux); }
.fn-form { padding: 4px 2px 0; }
.fn-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.fn-row > label { width: 92px; flex: none; text-align: right; font-size: 14px; color: #3c4a5a; padding-top: 8px; }
.fn-row .cf-switch { padding-top: 8px; }
.fn-bg { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.fn-bg img, .fn-bg-def { width: 180px; height: 108px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.fn-bg-def {
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; letter-spacing: 2px;
  background: linear-gradient(150deg, #2BA471, #17a673);
}
.fn-bg-ops { display: flex; flex-direction: column; gap: 6px; }
.fn-bg .bm-hint { flex: 1 1 100%; }
.fn-goods { flex: 1; min-width: 0; }
.fn-goods-tip { font-size: 12px; color: var(--aux); margin: 8px 0; line-height: 1.7; }
.fn-goods-table th, .fn-goods-table td { font-size: 12px; padding: 8px 10px; text-align: center; }
.fn-goods-table th:first-child, .fn-goods-table td:first-child { text-align: left; }
.fn-foot { text-align: center; padding: 6px 0 16px; }
/* 表格里的图片列（例：患者手写的电子签名） */
.ptab-thumb { width: 72px; height: 34px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 4px; cursor: zoom-in; }

/* ---------------- 商城 · 商品管理 ---------------- */
.sg-img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.ac-cat-tg { display: inline-block; width: 14px; font-size: 12px; color: var(--aux); font-style: normal; }
.ac-cat-tg.sp { width: 14px; }
/* 列表里的操作列：文字按钮（编辑 / 停用 / 删除），和全局列表同一套 btn-mini */
.ct-ops { white-space: nowrap; }
.ct-ops .btn-mini { margin-right: 6px; }
.ct-ops .btn-mini:last-child { margin-right: 0; }
.ct-search-go { font-size: 16px; color: var(--g); }
.ct-search-go:hover { color: #0b8064; }
/* 工具条里的三个下拉（字号 / 字体 / 行高）稍微宽一点，别把"默认字体"截断 */
.ct-tool #ctSize, .ct-tool #ctFont, .ct-tool #ctLine { min-width: 92px; }

/* ---------------- AI正畸 · 正畸分析工作台（对齐原系统 /ai-prosthesis 的「诊断」） ----------------
   注意：**不要**给 #content 加 display:flex 的布局类 —— 换页只换 innerHTML、不会摘类，
   会把下一个页面整块挤歪（.pg-wrap / .sm-wrap 都踩过）。这里全部收在 .oc-root 里。 */
.oc-root { margin-top: 12px; }
.oc-wrap { display: flex; gap: 12px; align-items: stretch; min-height: 560px; }
.oc-left { width: 240px; flex: 0 0 240px; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: flex; flex-direction: column; overflow: hidden; }
.oc-scope { display: flex; border-bottom: 1px solid var(--line); }
.oc-scope-b { flex: 1; padding: 9px 0; border: 0; background: #fff; cursor: pointer; font-size: 14px; color: #4e5969; }
.oc-scope-b.on { background: var(--g); color: #fff; font-weight: 600; }
.oc-search { padding: 8px; border-bottom: 1px solid var(--line); }
.oc-search .input { width: 100%; }
.oc-patlist { flex: 1; overflow: auto; max-height: 620px; }
.oc-pat { padding: 8px 10px; border-bottom: 1px solid #f2f3f5; cursor: pointer; }
.oc-pat:hover { background: #f7f8fa; }
.oc-pat.on { background: #e8fff4; box-shadow: inset 3px 0 0 var(--g); }
.oc-pat-l { display: flex; align-items: baseline; gap: 6px; }
.oc-pat-n { font-weight: 600; color: #1d2129; }
.oc-pat-r { font-size: 12px; }
.oc-pat-b { font-size: 12px; color: var(--aux); margin-top: 2px; }
.oc-main { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: flex; flex-direction: column; overflow: hidden; }
.oc-patient-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #fafbfc; flex-wrap: wrap; }
.oc-patient-bar .oc-spacer { flex: 1; }
.oc-body { display: flex; flex: 1; min-height: 0; }
.oc-images { width: 190px; flex: 0 0 190px; border-right: 1px solid var(--line); overflow: auto; max-height: 640px; padding-bottom: 8px; }
.oc-images-h { padding: 8px 10px; font-weight: 600; font-size: 14px; color: #1d2129; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.oc-grp { border-bottom: 1px solid #f2f3f5; }
.oc-grp-h { display: flex; justify-content: space-between; gap: 6px; padding: 6px 8px; font-size: 12px; background: #f7f8fa; }
.oc-grp-b { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; }
.oc-thumb { width: 78px; cursor: pointer; text-align: center; }
.oc-thumb img { width: 78px; height: 62px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; background: #f2f3f5; }
.oc-thumb-ph { display: flex; width: 78px; height: 62px; align-items: center; justify-content: center; border: 1px dashed var(--line); border-radius: 4px; color: var(--aux); font-size: 12px; }
.oc-thumb-l { font-size: 12px; color: #4e5969; margin-top: 2px; }
.oc-form { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.oc-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.oc-tab { padding: 5px 10px; border: 1px solid var(--line); background: #fff; border-radius: 14px; font-size: 12px; color: #4e5969; cursor: pointer; }
.oc-tab.on { background: var(--g); border-color: var(--g); color: #fff; font-weight: 600; }
.oc-tabbody { padding: 10px 12px 16px; overflow: auto; max-height: 620px; }
.oc-block { margin-bottom: 14px; }
.oc-block-t { font-weight: 600; font-size: 14px; color: #1d2129; border-left: 3px solid var(--g); padding-left: 8px; margin-bottom: 8px; }
.oc-fgrid { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.oc-f { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.oc-f-wide { flex: 1 1 100%; }
.oc-f label { font-size: 12px; color: var(--sub); }
.oc-f .input, .oc-f .select { width: 100%; }
.oc-f textarea.input { resize: vertical; }
.oc-imgpv { margin-top: 4px; min-height: 20px; font-size: 12px; }
.oc-imgpv img { max-width: 110px; max-height: 90px; border: 1px solid var(--line); border-radius: 4px; }
.oc-measure-g { font-size: 12px; font-weight: 600; color: #1d2129; margin: 10px 0 4px; }
.oc-mtable .oc-mv { width: 100px; }
.oc-judge.ok { color: var(--g); }
.oc-judge.high, .oc-judge.low { color: #e64545; font-weight: 600; }

/* ---------------- 标志点编辑器（P2：点图自动算） ---------------- */
.oc-edit { border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fafbfc; }
.oc-edit-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.oc-edit-bar .oc-spacer { flex: 1; }
.oc-edit-done { font-size: 12px; color: var(--aux); }
.oc-edit-ck { font-size: 12px; color: #4e5969; display: inline-flex; align-items: center; gap: 4px; }
.oc-stage { position: relative; width: 100%; background: #111827; border-radius: 6px; overflow: hidden; line-height: 0; }
.oc-stage img { width: 100%; height: auto; display: block; }
.oc-stage canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; cursor: crosshair; }
.oc-edit-hint, #ocEditHint { font-size: 12px; color: var(--sub); padding-top: 6px; line-height: 1.7; }

/* ---------------- 治疗前后对比（描迹重叠，P4） ---------------- */
.oc-cmp { border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fafbfc; }
.oc-cmp-wrap { display: flex; gap: 12px; align-items: flex-start; margin-top: 8px; }
.oc-cmp-tbl { flex: 1 1 44%; max-height: 520px; overflow: auto; }
.oc-cmp-overlay { flex: 1 1 56%; min-width: 0; }
.oc-cmp-lg { font-size: 12px; padding-top: 6px; }
.oc-lg-a { display: inline-block; width: 22px; height: 3px; background: #e11d48; vertical-align: middle; }
.oc-lg-b { display: inline-block; width: 22px; height: 0; border-top: 3px dashed #9aa7b4; vertical-align: middle; }
.oc-up { color: #e64545; font-weight: 600; }
.oc-dn { color: #1677ff; font-weight: 600; }

/* ================= 小程序装修 · 装修台（左真机预览 + 右配置） =================
   注意：整块包在 .mps-wrap 里，**不要**给 #content 挂 flex 布局类
   （换页只换 innerHTML、不摘类，会把下一个页面挤歪 —— 踩过两次）。 */
.mps-wrap { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; }
.mps-phone-wrap { flex: 0 0 330px; }
.mps-right { flex: 1; min-width: 0; }
.mps-phone { width: 330px; padding: 10px; background: #1f2530; border-radius: 26px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.mps-screen { background: #f5f7fa; border-radius: 18px; overflow: hidden; height: 600px; display: flex; flex-direction: column; }
.mps-statusbar { display: flex; justify-content: space-between; padding: 5px 12px 3px; font-size: 12px; color: #4e5969; background: #fff; }
.mps-navbar { color: #fff; text-align: center; font-size: 14px; padding: 8px 0; }
.mps-page { flex: 1; overflow: auto; padding: 8px; }
.mps-banner { margin: 0 0 8px; border-radius: 10px; padding: 16px 12px; color: #fff; }
.mps-banner-t { font-size: 16px; font-weight: 700; }
.mps-banner-s { font-size: 12px; opacity: .9; margin-top: 2px; }
.mps-card { background: #fff; border-radius: 10px; padding: 10px; margin-bottom: 8px; }
.mps-card-t { font-size: 14px; font-weight: 600; color: #1d2129; margin-bottom: 8px; }
.mps-grid4 { display: flex; flex-wrap: wrap; }
.mps-gitem { width: 25%; text-align: center; padding: 6px 0; font-size: 12px; color: #4e5969; }
.mps-gitem i { display: inline-flex; width: 34px; height: 34px; border-radius: 10px; align-items: center; justify-content: center; margin-bottom: 4px; }
.mps-gitem i img { width: 20px; height: 20px; border-radius: 6px; }
.mps-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.mps-avatar { width: 32px; height: 32px; border-radius: 50%; background: #dbe3ea; display: inline-block; }
.mps-avatar.big { width: 46px; height: 46px; background: rgba(255,255,255,.45); }
.mps-sub { font-size: 12px; color: #86909c; }
.mps-sub.on { color: rgba(255,255,255,.9); }
.mps-mine-head { border-radius: 10px 10px 0 0; padding: 12px; margin: -8px -8px 8px; color: #fff; }
.mps-mine-head.light { color: #1d2129; border-radius: 0 0 10px 10px; margin-bottom: 8px; }
.mps-mine-row { display: flex; align-items: center; gap: 10px; }
.mps-assets { display: flex; background: #fff; border-radius: 10px; padding: 10px 0; margin-bottom: 8px; }
.mps-assets > div { flex: 1; text-align: center; }
.mps-assets b { display: block; font-size: 14px; color: #1d2129; }
.mps-assets span { font-size: 12px; color: #86909c; }
.mps-appt .mps-sub { line-height: 1.6; }
.mps-tabs { display: flex; background: #fff; border-top: 1px solid #eef0f3; }
.mps-tab { flex: 1; text-align: center; padding: 6px 0 8px; font-size: 10px; color: #8a98a8; }
.mps-tab img { display: block; width: 22px; height: 22px; margin: 0 auto 2px; }
.mps-tab.on { font-weight: 600; }
/* 右栏 */
.mps-colors { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 14px 14px; }
.mps-color { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 2px solid #fff; box-shadow: 0 0 0 1px #dfe4ea; }
.mps-color.on { box-shadow: 0 0 0 3px rgba(16,163,127,.35); }
.mps-grip { cursor: grab; color: #b8c2cc; user-select: none; }
.mps-ico { display: inline-block; cursor: pointer; }
.mps-ico img { width: 30px; height: 30px; border-radius: 8px; background: #f2f4f7; padding: 3px; }
.mps-ck { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; margin-right: 16px; color: #1d2129; }
.mps-radio { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; margin-right: 18px; color: #1d2129; }
.mps-indent { padding-left: 22px; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.mps-iconbox { display: flex; flex-wrap: wrap; gap: 8px; }
.mps-ipick { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.mps-ipick.on { border-color: var(--g); box-shadow: 0 0 0 2px rgba(16,163,127,.25); }
.mps-ipick img { width: 26px; height: 26px; }
/* 添加功能弹窗 */
.mps-fcats { display: flex; gap: 6px; margin-bottom: 10px; }
.mps-fgrid { display: flex; flex-wrap: wrap; gap: 10px; max-height: 360px; overflow: auto; }
.mps-fcard { width: 168px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; background: #fff; }
.mps-fcard:hover { border-color: var(--g); box-shadow: 0 2px 10px rgba(16,163,127,.14); }
.mps-fico { display: inline-flex; width: 32px; height: 32px; border-radius: 9px; background: var(--g); align-items: center; justify-content: center; }
/* 「会员权益介绍」预览体（2026-10-09）：背景 + 欢迎语 + 会员卡 + 两张权益图 */
.mps-mb-bg { border-radius: 10px; padding: 14px 12px; color: #fff; margin: -8px -8px 8px; min-height: 96px; }
.mps-mb-title { font-size: 16px; font-weight: 700; color: #fff; }
.mps-mb-welcome { font-size: 12px; margin-top: 6px; line-height: 1.6; }
.mps-mb-card { border-radius: 12px; padding: 12px; color: #fff; margin-bottom: 8px; min-height: 96px; display: flex; flex-direction: column; justify-content: flex-end; }
.mps-mb-name { font-size: 16px; font-weight: 700; }
.mps-mb-sub { font-size: 12px; margin-top: 4px; opacity: .95; }
.mps-mb-id { font-size: 12px; margin-top: 8px; letter-spacing: 1px; }
.mps-mb-img { width: 100%; border-radius: 8px; display: block; }
/* 上传位（会员卡三张图 / 页面背景图） */
.mps-ups3 { display: flex; gap: 14px; flex-wrap: wrap; }
.mps-up { width: 190px; }
.mps-up-box {
  width: 100%; height: 104px; border: 1px dashed var(--line); border-radius: 8px; background: #FAFBFC;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.mps-up-box img { width: 100%; height: 100%; object-fit: cover; }
.mps-up-ph { font-size: 12px; color: var(--aux); }
.mps-up-acts { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.mps-up-acts .btn { padding: 2px 10px; }
.mps-thumb { width: 76px; height: 44px; object-fit: cover; border-radius: 6px; display: block; }
/* ================= 合伙人中心（2026-10-09 · 对齐领健「营销 → 合伙人」） =================
   顶部两个开关 + 五个子页签 + 装修（左真机预览 / 右 7 个分区）；预览体复用 mps-* 那套壳子 */
.pc-top { display: flex; align-items: center; gap: 16px; padding: 12px 0 6px; flex-wrap: wrap; }
.pc-sec { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.pc-sec:first-child { border-top: 0; }
.pc-sec-t { font-size: 14px; font-weight: 600; color: #1d2129; margin-bottom: 8px; }
.pc-sec-t:before { content: ''; display: inline-block; width: 3px; height: 12px; background: var(--g); border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.pc-head { padding: 12px; border-radius: 10px 10px 0 0; margin: -8px -8px 8px; color: #fff; background: linear-gradient(135deg, #10A37F, #10A37Fcc); }
.pc-head-row { display: flex; align-items: center; gap: 10px; }
.pc-btn-sm { display: inline-block; margin-top: 10px; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.25); font-size: 12px; }
.pc-btn { text-align: center; color: #fff; border-radius: 999px; padding: 8px 0; margin-top: 8px; font-size: 12px; }
.pc-team-row { display: flex; }
.pc-team-row > div { flex: 1; text-align: center; }
.pc-team-row b { display: block; font-size: 16px; color: #10A37F; }
.pc-team-row span { font-size: 10px; color: #86909c; }
.pc-invite { border-radius: 8px; padding: 14px 10px; background-size: cover; background-position: center; margin-bottom: 6px; }
.pc-invite-t { color: #fff; font-size: 12px; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.pc-goods { display: flex; flex-wrap: wrap; gap: 6px 18px; max-height: 160px; overflow: auto; padding: 4px 0; }
.pc-goods-item { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #1d2129; }
/* ================= 报表中心（2026-10-09：左树 + 右报表）=================
   注意：整块包在 .rc-wrap 里，**不给 #content 挂 flex 布局类**（换页只换 innerHTML，会把下一页挤歪） */
.rc-wrap { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; }
.rc-tree { flex: 0 0 180px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 6px; }
.rc-g { margin-bottom: 8px; }
.rc-g-t { font-size: 12px; color: var(--aux); padding: 6px 8px; }
.rc-item { font-size: 14px; color: #1d2129; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.rc-item:hover { background: #F2F7F5; }
.rc-item.on { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.rc-main { flex: 1; min-width: 0; }
.rc-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 0 14px 10px; }
.rc-f { display: inline-flex; align-items: center; gap: 6px; }
.rc-fl { font-size: 12px; color: var(--sub); }
.rc-tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.rc-tab { font-size: 12px; padding: 5px 14px; cursor: pointer; background: #fff; border-right: 1px solid var(--line); color: var(--sub); }
.rc-tab:last-child { border-right: 0; }
/* ⚠️ 原来写的是 `background: var(--primary)`，可**这个变量压根没定义** → 选中态等于没样，
   看着就是一排白盒子（用户 2026-10-12 批注「这个维度换个筛选按键」就是它）。
   改成品牌绿底白字 = 按钮观感，和顶部页签、主按钮一致。 */
.rc-tab.on { background: var(--g); color: #fff; font-weight: 600; }
.rc-tab:hover { background: var(--g-light); color: var(--g-dark); }
.rc-tab.on:hover { background: var(--g-dark); color: #fff; }
.rc-note { margin: 0 14px 10px; padding: 8px 12px; background: #F7FAF9; border-left: 3px solid var(--g); border-radius: 6px; font-size: 12px; color: var(--sub); line-height: 1.7; }
.dash-table tfoot td { background: #FAFBFC; font-weight: 600; border-top: 1px solid var(--line); }

/* ======================================================================================
 * 「原系统化」排版与布局层（2026-10-10 · 用户：「整个系统在字体与字体大小、页面布局全面参照原系统系统」）
 *
 * 依据 = **原系统前端 CSS 实测**（抓 `https://原系统域名/asset_*.css` 统计出来的，不是眼估）：
 *   · `html, body { font-size: 14px; font-family: PingFang SC, Microsoft YaHei, AlibabaPuHuiTi, Helvetica, Arial, sans-serif }`
 *   · 字号分布：14px×376 / 12px×198 / 16px×181 / 18px×53 / 20px×32（**13px 只有 25 处 → 基本不用 13px**）
 *   · 圆角三档：2px 标签 / 4px 控件 / 8px 卡片；控件高 32px（小号 24px）= Arco medium/small
 *   · 布局：左侧一级菜单是**图标 + 文字同一行**（宽约 184px，项高 40px），内容区留白 16px
 *
 * 我们原来基准 13px、大量 11px/10px、圆角统一 6px、侧栏是 92px 的"图标在上文字在下"窄条。
 * 这一层**放在文件最后**，靠层叠覆盖前面几千行老值（老值一律不动，方便对照和回退）。
 * ⚠️ 收费页签那 9 张统计卡（`.bs-*`）**故意不动**：用户明确要求"做小点、一行放下"。
 * ====================================================================================== */
html { font-size: 14px; }
body {
  font-size: 14px;
  font-family: "PingFang SC", "Microsoft YaHei", AlibabaPuHuiTi, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -moz-osx-font-smoothing: grayscale;
}
:root { --radius: 8px; --radius-sm: 4px; --radius-xs: 2px; }

/* 卡片 / 面板：原系统 8px 圆角 */
.panel, .card, .kpi, .bs-card, .bill-card, .login-box, .acct, .scheme-block, .modal-box { border-radius: 8px; }

/* 控件：统一 14px 字（高度沿用 32px，与 Arco medium 一致；小号 = 24px） */
/* ⚠️ 2026-10-16：这一块原来把 `.btn-sm` 压回 24px/12px，**和上面那条"全体按钮大一号"打架**
   （后写的赢）→ 用户点的那排小按钮（查询 / 重置 / 列设置 / 导出 Excel…）根本看不出变大。
   现在两处一个口径：`.btn-sm` = 30px / 13px。 */
.btn, .input, .select, textarea.input { font-size: 15px; }
.btn-sm { height: 30px; font-size: 13px; }

/* 表格：单元格留白与表头按原系统（表头 14px / 中等字重 / 浅底） */
.dash-table th, .dash-table td { padding: 9px 12px; font-size: 14px; }
.dash-table th { font-weight: 500; color: #4E5969; background: #F7F8FA; }
.table-wrap table th, .table-wrap table td { font-size: 14px; }

/* 左侧一级菜单：文字一行、40px 高、14px（原系统侧栏形态）
   2026-10-11 用户批注「（左侧栏）窄一点」→ 184 → 160 → 140 → **104**（"刚做的那个还要窄一点"）。
   104 不是拍脑袋：Chrome 里量过 16 个一级菜单，最长文字 = 「组织与员工 / 筛查与答题 / 小程序装修」
   70px，加上左内边距 12px + 右侧留白，硬下限 ≈ 97px；104px 实测**不折行、不溢出**（右侧仍留 19px）。 */
.sidebar { width: 104px; }

/* ===== 集团中心（2026-10-11）：跨店看板 / 门店对比 / 医生排名 ===== */
.gc-kpis { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px; }
.gc-kpi { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; }
.gc-kpi-l { font-size: 12px; color: var(--sub); white-space: nowrap; }
.gc-kpi-v { font-size: 20px; font-weight: 700; margin: 4px 0 2px; white-space: nowrap; }
.gc-kpi-s { font-size: 10px; color: var(--aux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-health { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gc-h-title { font-size: 13px; font-weight: 600; color: #3c4a5a; margin-bottom: 6px; }
.gc-mini th, .gc-mini td { font-size: 12px !important; padding: 6px 8px !important; }
.gc-mini td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
/* 门店多选标签（集团中心）：点一颗选中/取消，「全部门店」清空 */
.gc-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0 6px; }
.gc-chip { font-size: 12px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; color: var(--sub); }
.gc-chip:hover { border-color: var(--g); color: var(--g-dark); }
.gc-chip.on { background: var(--g-light); border-color: var(--g); color: var(--g-dark); font-weight: 600; }
/* 环比 / 同比小字 + 趋势图 */
.gc-kpi-d { font-size: 10px; color: var(--aux); margin-top: 4px; white-space: nowrap; }
.gc-kpi-d b { font-weight: 600; }
.gc-up { color: #D93026; }
.gc-down { color: #2BA471; }
.gc-flat { color: var(--aux); }
.gc-svg { display: block; }
.gc-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; font-size: 12px; color: var(--sub); }
.gc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
/* 跨店"疑似同一人"小标签（集团视角的患者列表） */
.dupe-tag { display: inline-block; margin-left: 6px; padding: 0 6px; font-size: 10px; line-height: 16px; border-radius: 8px; background: #FFF3E0; color: #C77800; border: 1px solid #FFE0AE; cursor: help; }
.menu-item { height: 40px; justify-content: flex-start; gap: 8px; padding: 0 12px; font-size: 14px; }
.menu-item .menu-label { font-size: 14px; text-align: left; line-height: 1.2; }
.menu-item.menu-child { height: 34px; padding-left: 34px; font-size: 14px; }
.menu-group-title { font-size: 12px; padding: 10px 12px 4px; }
.side-collapse { left: 104px; }
.app.collapsed .side-collapse { left: 56px; }

/* 页头 / 面板标题（原系统 18px 页头、16px 面板标题） */
.page-title span { font-size: 18px; }
.section-head .st-title { font-size: 16px; }

/* 内容区留白（原系统 content-wrapper 16px） */
.content { padding: 16px 16px 40px; }

/* 工作台顶部指标卡（2026-10-12 修：**标签被截断**，同时**不破"只占半行宽"那条硬要求**）
   —— 半行宽下每张卡只有 ~141px 可用，而「初诊/总就诊」标签要 89px、「应收/收款」的数字要 133px，
      "图标 + 标签 + 数值"挤在一行**物理上装不下**（实测标签被压成 42px 甚至 0px → 界面显示「初…」「现…」）。
      所以改成**图标 + （标签在上 / 数值在下）**两行：宽度只要 max(89, 133)=133px 就够，卡高约 38px 仍旧紧凑。
      （试过"占满整行"那条路 —— 会把用户 2026-10-09 定的"只占半行宽"破掉，`verify-live` 当场红，故不用。） */
.dash-head .kpis { flex: none; width: 50%; gap: 10px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dash-head .kpi-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dash-head .kpi-label { font-size: 11px; line-height: 1.2; }
.dash-head .kpi-value { font-size: 13px; white-space: nowrap; margin-left: 0; }

/* 例外：**收费页签那 9 张统计卡**（用户点名"做小点、一行放下"）——
   全局 14px 会把卡撑到 90px 破坏"一行 9 张"，这里单独锁回小一号（12px / 数字 22px） */
.bs-card { font-size: 12px; padding: 10px 12px; }
.bs-l, .bs-sub, .bs-link { font-size: 12px; }
.bs-sub { line-height: 1.35; }
.bs-v { font-size: 22px; }
/* 这排卡里的小字**永不换行**（多出来的省略号；完整口径在 title 悬停里）——防止一行 9 张被撑高 */
.bs-row.bill .bs-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 标签同理（「现金流（累计）」这种 7 个字在 140px 的卡里会折成两行 → 整行变高） */
.bs-row.bill .bs-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mps-fico img { width: 20px; height: 20px; }
.mps-fname { font-size: 14px; font-weight: 600; color: #1d2129; margin: 6px 0 2px; }
.mps-fdesc { font-size: 12px; color: #86909c; line-height: 1.5; }

/* ===== 角色与权限（2026-10-10）=====
   加了「+ 新增角色 / + 新增账号 / 删除」之后角色表整体变宽，「模块预览」最长的那列会把
   「数据范围 / 类型 / 操作」三列挤出视口（用户截图里正是这三列看不见）。
   做法：只给模块预览列限宽省略号，其余列照旧自适应。 */
#rcBody .modprev { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 内置角色的「删除」：灰掉但仍可点（点了会说明为什么不能删，比 disabled 的"点了没反应"清楚） */
.btn-mini.is-off { color: #a8b0ba; border-color: #e3e6ea; }
.btn-mini.is-off:hover { color: #a8b0ba; border-color: #e3e6ea; }

/* 「从系统设置打开出去的独立页」的回退按钮（用户 2026-10-10 图 5：「这个页面返回不了」） */
.sys-back { display: flex; align-items: center; gap: 10px; margin: 2px 0 10px; }
.sys-back .muted { font-size: 12px; }

/* ======================================================================================
 * 全站「时间区间」日历弹层（对齐原系统 · 用户 2026-10-10 图 2）
 * 形态：左一列快捷选择 + 右边两个月份，范围浅绿、起止实心绿点
 * ====================================================================================== */
.dr-input { cursor: pointer; background: #fff; }
/* 输入框设为只读（点它弹我们自己的日历）→ 把浏览器自带那个小日历图标藏掉，免得两个入口打架 */
.dr-input::-webkit-calendar-picker-indicator { display: none; }
.dr-pop {
  position: fixed; z-index: 3000; width: 560px; padding: 10px 12px 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .16);
}
.dr-pop.dr-single { width: 330px; }
.dr-pop.dr-single .dr-mons .dr-mon:nth-child(2) { display: none; }
.dr-main { display: flex; gap: 12px; align-items: flex-start; }
.dr-mons { flex: 1; min-width: 0; display: flex; gap: 14px; }
.dr-mon { flex: 1; min-width: 0; }
.dr-mon-h { display: flex; align-items: center; justify-content: center; gap: 10px; height: 26px; font-size: 14px; color: #1d2129; }
.dr-mon-t { font-weight: 600; }
.dr-nav { width: 20px; height: 20px; line-height: 18px; text-align: center; border-radius: 4px; color: var(--sub); cursor: pointer; user-select: none; }
.dr-nav:hover { background: #f2f3f5; color: var(--g); }
.dr-wk { display: grid; grid-template-columns: repeat(7, 1fr); color: var(--sub); font-size: 12px; text-align: center; height: 24px; line-height: 24px; }
.dr-days { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.dr-d {
  height: 30px; line-height: 30px; text-align: center; font-size: 13px; color: #1d2129;
  border-radius: 4px; cursor: pointer; user-select: none;
}
.dr-d:hover { background: var(--primary-light); color: var(--primary-dark); }
.dr-x { cursor: default; }
.dr-x:hover { background: transparent; }
.dr-in { background: #eaf7f1; color: var(--primary-dark); border-radius: 0; }
.dr-s, .dr-e { background: var(--g); color: #fff; font-weight: 600; }
.dr-s:hover, .dr-e:hover { background: var(--primary-dark); color: #fff; }
.dr-quick { flex: 0 0 76px; display: flex; flex-direction: column; gap: 3px; padding-top: 26px; }
.dr-q { height: 26px; line-height: 26px; text-align: center; font-size: 12px; color: #1d2129; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.dr-q:hover { background: var(--primary-light); color: var(--primary-dark); }
.dr-foot { display: flex; align-items: center; padding: 8px 2px 2px; border-top: 1px solid var(--line); margin-top: 8px; }
.dr-val { font-size: 12px; color: var(--sub); }
.dr-foot-btn { margin-left: auto; display: flex; gap: 8px; }

/* ======================================================================================
 * 表格规格按**原系统实测值**收口（用户 2026-10-10 图 1 / 图 3：「报表中心的字体与大小 都按这个去做」，
 * 确认口径是「按原系统做」）。下面每个数都是从原系统前端 CSS 里量出来的，不是眼估：
 *   · 表头：`.arco-table-th{font-size:12px;font-weight:600}` + `.arco-table-th-title{font-weight:500}`
 *           → **表头比正文小一号（12px）、字重 600**；底色 `var(--color-neutral-2)` = #f2f3f5；字色 #1d2129
 *   · 正文：`.arco-table .arco-table-td{font-size:14px}`（medium/small 都是 14px，只有 mini 才 12px）
 *   · 单元格：`.arco-table .arco-table-cell{padding:9px 10px}`；行高 line-height 1.5715 ≈ 22px
 * 我们原来是"表头 14px + 底色 #F7F8FA + 内边距 9×12"——这里按原系统改成 12px / #f2f3f5 / 9×10。
 * ⚠️ 选择器写成 `.table-wrap table th` 那一档：报表中心的表是 `.table-wrap > table.dash-table`，
 *    而 `.table-wrap table th` 的权重要比 `.dash-table th` 高，只写后者会被前面的老规则盖掉。
 * ====================================================================================== */
/* ⚠️ 只认 `.dash-table`（列表/报表那一套），**别写成 `.table-wrap table`** ——
   那会连"处置编辑表 / 权限弹窗左表"这类页面自己调过内边距的专用表格一起盖掉
   （踩过：`.tx-edit-table td{padding:6px}` 被盖成 9px 10px → 项目列变窄、下拉 151px < 160px，
   tools/verify-tx-dialog.js 当场红。所以选择器要带 `table.dash-table` 把权重压过老的 `.table-wrap table th`） */
.table-wrap table.dash-table th, .dash-table th {
  font-size: 12px;
  font-weight: 600;
  color: #1d2129;
  background: #f2f3f5;
  padding: 9px 10px;
}
.table-wrap table.dash-table td, .dash-table td { padding: 9px 10px; font-size: 14px; line-height: 22px; }
/* 金额 / 数字列（.mono）跟正文同号，别再单独放大 */
.dash-table td .mono { font-size: 14px; }

/* ======================================================================================
 * 学生筛查 · 牙位级体检表 + 报告二维码面板（对齐全ll健「场外筛查」，用户 2026-10-10）
 * ====================================================================================== */
.sc-wrap { display: flex; gap: 16px; align-items: flex-start; }
.sc-left { flex: 0 0 430px; }
.sc-right { flex: 1; min-width: 0; }
.sc-right .ab-set-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sc-right .ab-set-row > span:first-child { flex: 0 0 92px; color: var(--sub); font-size: 12px; }
/* 牙位图（真牙形）：SVG 撑满容器，热区叠在每颗牙的中心上（热区不画东西，只管点） */
.sc-chart { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; margin-top: 8px; }
.sc-chart svg { display: block; width: 100%; height: auto; }
.sc-hit { position: absolute; width: 5.6%; height: 4.4%; margin-left: -2.8%; margin-top: -2.2%; border-radius: 50%; cursor: pointer; }
.sc-hit:hover { background: rgba(0, 116, 87, .12); }
.sc-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.sc-counts { margin-top: 8px; font-size: 12px; color: var(--sub); text-align: center; }
.sc-counts b { color: #1d2129; }
.sc-menu {
  position: fixed; z-index: 3200; background: #fff; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,.16); padding: 4px; display: flex; flex-direction: column; min-width: 96px;
}
.sc-menu-h { padding: 4px 9px 6px; border-bottom: 1px solid var(--line); margin-bottom: 2px; color: var(--aux); font-size: 11px; white-space: nowrap; }
.sc-mi { padding: 5px 10px; font-size: 13px; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.sc-mi:hover { background: var(--primary-light); color: var(--primary-dark); }
.sc-mi.on { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.sc-mi-clear { color: var(--sub); border-top: 1px solid var(--line); margin-top: 2px; }
.sc-quick-pick { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0 2px; }
.sc-chips { display: inline-flex; flex-wrap: wrap; gap: 10px; }
.sc-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.sc-radio { display: inline-flex; align-items: center; gap: 4px; }
.sc-qr-link { margin-top: 12px; background: #f7f8fa; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.sc-qr-link-t { font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.sc-tut-i { padding: 10px 12px; border-left: 3px solid var(--g); background: #f7faf9; border-radius: 6px; margin-bottom: 8px; line-height: 1.9; font-size: 13px; }

/* 影像 · 外链型（3D 云报告 / 口扫模型）：缩略图上一个小角标（用户 2026-10-10） */
.ptab-link-badge {
  position: absolute; left: 6px; top: 6px; padding: 1px 6px; border-radius: 4px;
  background: rgba(0, 116, 87, .92); color: #fff; font-size: 12px; line-height: 18px;
}

/* 顶栏「搜索患者」结果面板（2026-10-10 对齐原系统那张红框截图）：
   头像 / 姓名+标签 / 病历号+手机号 / 性别|年龄(生日) / 诊所|上次就诊(医生) + 右侧「挂号」「预约」 */
.tb-search { position: relative; }
.gs-panel {
  position: absolute; left: 0; top: 40px; z-index: 80;
  width: 460px; max-height: 520px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
}
.gs-head { padding: 10px 14px; font-size: 12px; color: var(--sub); border-bottom: 1px solid #f2f3f5; }
.gs-empty { padding: 18px 14px; font-size: 13px; color: var(--sub); }
.gs-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px;
  border-bottom: 1px solid #f2f3f5; cursor: pointer;
}
.gs-row:last-child { border-bottom: none; }
.gs-row:hover { background: #f7f8fa; }
.gs-main { flex: 1; min-width: 0; }
.gs-l1 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gs-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.gs-l2 { margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; }
.gs-k { font-size: 12px; color: #4e5969; }
.gs-l3 { margin-top: 2px; font-size: 12px; color: var(--sub); }
.gs-acts { display: flex; flex-direction: column; gap: 6px; }
.gs-act {
  display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.15;
  min-width: 60px; padding: 4px 8px; font-size: 12px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 6px; cursor: pointer;
}
.gs-act:hover { color: var(--g); border-color: #9fe0c7; background: #f2fbf7; }
.gs-act i { font-style: normal; color: var(--g); font-size: 15px; }

/* 系统设置 · 流水号规则（2026-10-11，照用户给的参考样式：部件行 + 拖拽把手 + 添加菜单） */
.nr-tabs { display: flex; gap: 6px; padding: 8px 14px 0; }
.nr-tab {
  padding: 6px 14px; font-size: 13px; color: var(--sub); background: #f4f5f7;
  border-radius: 6px; cursor: pointer;
}
.nr-tab.on { color: #fff; background: var(--g); font-weight: 600; }
.nr-preview { padding: 10px 0 12px; font-size: 13px; color: var(--ink); }
.nr-preview b { font-size: 16px; color: var(--g); letter-spacing: .5px; }
.nr-list { display: flex; flex-direction: column; gap: 8px; }
.nr-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.nr-row[draggable='true'] { cursor: grab; }
.nr-handle { color: #b6bcc6; font-size: 14px; letter-spacing: -2px; cursor: grab; }
.nr-kind { min-width: 210px; font-size: 13px; color: var(--ink); }
.nr-ctrl { display: flex; align-items: center; gap: 6px; }
.nr-del { margin-left: auto; cursor: pointer; color: #c0c4cc; }
.nr-del:hover { color: var(--red); }
.nr-add-wrap { position: relative; margin-top: 12px; }
.nr-add-menu {
  position: absolute; left: 0; top: 34px; z-index: 20; min-width: 140px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12); padding: 6px 0;
}
.nr-add-menu div { padding: 7px 14px; font-size: 13px; cursor: pointer; }
.nr-add-menu div:hover { background: #f5f6f8; color: var(--g); }
.pf-name { width: 100%; max-width: 220px; }
/* 「自定义设置」弹窗：操作列（删除）+ 自定义项目的小标记（2026-10-14 用户要求增删） */
.pf-table td.pf-c .pf-del { font-size: 12px; color: var(--red); cursor: pointer; }
.pf-table td.pf-c .pf-del:hover { text-decoration: underline; }
.pf-table td.pf-ops { white-space: nowrap; }
.pf-mv { font-size: 12px; color: var(--g); cursor: pointer; margin-right: 8px; }
.pf-mv:hover { text-decoration: underline; }
.pf-table thead th:last-child, .pf-table td:last-child { width: 108px; text-align: center; }
.pf-table tr.pf-free-row td:first-child { display: flex; align-items: center; gap: 6px; }
.pf-free-tag { flex: none; font-size: 11px; color: var(--g-dark); background: var(--g-light); border-radius: 3px; padding: 1px 6px; }
/**
 * 「医生提成规则」弹窗顶部那个**显眼的**折扣点数输入框（用户 2026-10-17：
 *   「我已经问了 N 次折扣返现金的提成点数在哪里设置」→ 不能只藏在表格某一列里）。
 */
.cr-cashbox {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 10px 0 4px; padding: 10px 12px;
  background: #F4FAF6; border: 1px solid #BFE3CC; border-radius: 6px; font-size: 13px;
}
.cr-cashbox label { color: #137a3c; }
.cr-cashbox .muted { font-size: 12px; }
/* 短信模板管理（2026-10-19）：左分类 + 模板弹窗 */
.sms-content-cell {
  max-width: 430px;
  color: #4b5563;
  line-height: 1.55;
  white-space: normal !important;
  word-break: break-word;
}
.sms-tpl-table {
  table-layout: fixed;
  width: 100%;
}
.sms-tpl-table th,
.sms-tpl-table td {
  white-space: normal;
  word-break: break-word;
  vertical-align: middle;
}
.sms-tpl-table .ct-ops {
  white-space: nowrap;
}
.sms-tpl-table .ct-ops .btn-mini {
  padding: 0 8px;
  margin-right: 4px;
}
.sms-reason {
  max-width: 160px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

/* 短信模板页（2026-10-19 重排）：紧凑统计条 + 左侧类别 + 单行表格，先把"能一眼看清"做好 */
.sms-page { overflow: hidden; }
.sms-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.sms-toolbar .input, .sms-toolbar .select { height: 34px; }
.sms-toolbar .select { width: 118px; }
.sms-search { flex: 0 1 280px; min-width: 190px; }
.sms-toolbar-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sms-stats {
  display: flex; align-items: center; gap: 0; flex-wrap: wrap;
  padding: 0 14px; border-bottom: 1px solid var(--line); background: #FBFCFC;
}
.sms-stat { position: relative; display: flex; align-items: baseline; gap: 7px; padding: 10px 26px 10px 0; margin-right: 26px; }
.sms-stat + .sms-stat::before {
  content: ''; position: absolute; left: -13px; top: 9px; bottom: 9px; width: 1px; background: var(--line);
}
.sms-stat-n { font-size: 20px; line-height: 1; font-weight: 700; color: #1D2129; }
.sms-stat-n.ok { color: #0B7A4B; }
.sms-stat-n.warn { color: #C27A00; }
.sms-stat-n.danger { color: #C53030; }
.sms-stat-l { font-size: 12px; color: var(--aux); }
.sms-body { display: flex; align-items: stretch; min-height: 520px; }
.sms-cats { width: 212px; flex: 0 0 212px; border-right: 1px solid var(--line); background: #FBFCFC; }
.sms-cats-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 8px; border-bottom: 0; font-size: 13px; font-weight: 600; color: #4E5969; }
.sms-cat-add {
  width: 26px; height: 26px; padding: 0; line-height: 24px; text-align: center;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--g); font-size: 16px; cursor: pointer;
}
.sms-cat-add:hover { border-color: var(--g); background: #F2FBF6; }
.sms-cat-list { padding: 4px 8px 12px; max-height: 620px; overflow-y: auto; }
.sms-cat {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px;
  border-bottom: 0; border-radius: 6px; white-space: nowrap; color: #4E5969;
}
.sms-cat:hover { background: #F1F5F2; }
.sms-cat.on { background: #E8F6EF; color: #007457; font-weight: 600; }
.sms-cat-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.sms-cat-c {
  flex: none; min-width: 20px; padding: 0 6px; line-height: 18px; text-align: center;
  border: 1px solid #EDF0F3; border-radius: 9px; background: #fff; color: #9AA3AF; font-size: 11px; font-weight: 400;
}
.sms-cat.on .sms-cat-c { color: #007457; border-color: #C9E8D9; }
.sms-cat-x { flex: none; width: 14px; margin-left: 0; text-align: center; opacity: 0; }
.sms-cat:hover .sms-cat-x { opacity: 1; }
.sms-list { display: flex; flex-direction: column; padding: 0; }
.sms-list-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sms-list-h b { font-size: 14px; color: #1D2129; }
.sms-list-h .muted { margin-left: 8px; font-size: 12px; }
.sms-tpl-table { table-layout: fixed; width: 100%; }
.sms-tpl-table th,
.sms-tpl-table td { padding: 10px 12px; vertical-align: middle; white-space: nowrap; word-break: normal; }
.sms-tpl-table th { background: #FAFBFC; color: #6B7280; font-size: 12px; font-weight: 600; }
.sms-tpl-table td { height: 58px; border-bottom: 1px solid #F2F4F7; }
.sms-tpl-table tbody tr:hover { background: #F8FCFA; }
.sms-tpl-name { min-width: 0; }
.sms-name-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sms-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 600; color: #1D2129; }
.sms-tag {
  flex: none; padding: 0 6px; line-height: 18px; border-radius: 9px;
  background: #EEF4FF; color: #3B6FB6; font-size: 11px; font-weight: 400;
}
.sms-tag.mkt { background: #FFF3E8; color: #B45309; }
.sms-sub { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; color: #9AA3AF; font-size: 12px; }
td.sms-content-cell { overflow: hidden; color: #4B5563; }
.sms-content-text {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; white-space: normal; overflow-wrap: anywhere; line-height: 1.55; max-height: 44px;
}
.sms-badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 11px; font-size: 12px; line-height: 1;
}
.sms-badge.ok { background: #E8F7EE; color: #137A3C; }
.sms-badge.warn { background: #FFF7E6; color: #B45309; }
.sms-badge.danger { background: #FEECEC; color: #C53030; }
.sms-badge.muted { background: #F2F4F7; color: #6B7280; }
.sms-sign { overflow: hidden; text-overflow: ellipsis; color: #4E5969; }
.sms-state {
  height: 24px; padding: 0 9px; border: 1px solid transparent; border-radius: 12px;
  font-size: 12px; cursor: pointer;
}
.sms-state.on { background: #E8F7EE; color: #137A3C; }
.sms-state.off { background: #F2F4F7; color: #8A94A6; }
.sms-state:hover { border-color: #C9D3DF; }
.sms-tpl-table td.sms-time {
  overflow: hidden; text-overflow: ellipsis; color: #8A94A6; font-size: 11px;
  padding-left: 6px !important; padding-right: 6px !important;
  white-space: normal; line-height: 1.35; word-break: keep-all;
}
.sms-ops { overflow: hidden; padding-left: 8px !important; padding-right: 8px !important; }
.sms-op {
  margin-right: 8px; padding: 4px 0; border: 0; background: none;
  color: var(--g); font-size: 12px; cursor: pointer;
}
.sms-op:last-child { margin-right: 0; }
.sms-op:hover { text-decoration: underline; }
.sms-op.danger { color: #D14343; }
.sms-empty { padding: 64px 0 !important; text-align: center; color: #9AA3AF; }
.refund-snap {
  margin: 10px 0 12px; padding: 10px 12px; border: 1px solid #F0D08B;
  border-radius: 8px; background: #FFF9EC;
}
.refund-snap .rs-title { margin-bottom: 6px; color: #8A5A00; font-size: 13px; font-weight: 700; }
.refund-snap .rs-grid { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #6B4B00; font-size: 12px; }
.refund-snap .rs-grid b { color: #1D2129; }
.sms-tpl-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  min-height: 520px;
}
.sms-tpl-main {
  min-width: 0;
}
.sms-radio-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.sms-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
.sms-form-grid label,
.sms-desc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #374151;
}
.sms-form-grid .input,
.sms-form-grid .select {
  flex: 1;
  min-width: 0;
}
.sms-content-block { margin-top: 12px; }
.sms-content-h {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px; font-size: 13px; color: #374151;
}
.sms-content-h .muted { font-size: 12px; }
.sms-var-box {
  margin-top: 12px; padding: 10px 12px; border: 1px solid #E5EAF0;
  border-radius: 10px; background: #F8FAFC;
}
.sms-var-box-h { margin-bottom: 4px; font-size: 12px; font-weight: 600; color: #6B7280; }
.sms-filing {
  margin-top: 12px; border: 1px solid #E5EAF0; border-radius: 10px; background: #FBFCFD;
}
.sms-filing > summary {
  display: flex; align-items: center; gap: 6px; padding: 10px 12px;
  cursor: pointer; list-style: none; font-size: 13px; color: #374151;
}
.sms-filing > summary::-webkit-details-marker { display: none; }
.sms-filing > summary::before {
  content: '▸'; color: #9AA3AF; font-size: 12px; transition: transform .15s;
}
.sms-filing[open] > summary::before { transform: rotate(90deg); }
.sms-filing > summary .muted { font-size: 12px; }
.sms-filing-body { padding: 0 12px 12px; }
.sms-filing-hint { margin-top: 8px; font-size: 12px; line-height: 1.6; color: #8A94A6; }
.sms-filing input:disabled { background: #F3F4F6; color: #9AA3AF; }
/* 患者列表「新建短信群发」：合规提示 + 模板分类树（对齐原系统） */
.sms-batch-warn {
  margin: 0 0 12px; padding: 9px 12px; border: 1px solid #F5C2C7; border-radius: 8px;
  background: #FFF5F5; color: #B42318; font-size: 12px; line-height: 1.6;
}
.sms-pick { border: 1px solid #E5EAF0; border-radius: 10px; background: #fff; overflow: hidden; }
.sms-pick-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid #EEF1F4; background: #FAFBFC;
}
.sms-pick-h b { font-size: 13px; color: #1D2129; }
.sms-pick-h span { font-size: 12px; color: #8A94A6; }
.sms-pick-body { display: flex; min-height: 320px; }
.sms-pick-tree {
  width: 380px; flex: none; max-height: 340px; overflow-y: auto;
  padding: 4px 0; border-right: 1px solid #EEF1F4;
}
.sms-pick-preview {
  flex: 1; min-width: 0; max-height: 340px; overflow: auto;
  padding: 12px 14px; background: #FBFCFD;
}
.sms-pick-preview-h {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; font-size: 13px; color: #1D2129;
}
.sms-pick-preview-box {
  padding: 12px 14px; border: 1px solid #E5EAF0; border-radius: 10px; background: #fff;
}
.sms-pick-preview-sig { margin-bottom: 8px; color: #0B7A4B; font-size: 13px; font-weight: 600; }
.sms-pick-preview-body {
  min-height: 140px; padding: 10px 12px; border-radius: 8px; background: #EEF6F3;
  color: #1F2937; font-size: 13px; line-height: 1.75; white-space: pre-wrap; word-break: break-all;
}
.sms-pick-preview-tip { margin-top: 8px; color: #8A94A6; font-size: 12px; }
.sms-pick-cat {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
  cursor: pointer; color: #374151; font-size: 13px;
}
.sms-pick-cat:hover { background: #F7FAF8; }
.sms-pick-caret { width: 12px; flex: none; color: #9AA3AF; font-size: 11px; transition: transform .15s; }
.sms-pick-group.open .sms-pick-caret { transform: rotate(90deg); }
.sms-pick-folder {
  width: 14px; height: 11px; flex: none; border-radius: 2px;
  background: #F3C24B; position: relative;
}
.sms-pick-folder::before {
  content: ''; position: absolute; left: 0; top: -3px; width: 7px; height: 3px;
  background: #F3C24B; border-radius: 2px 2px 0 0;
}
.sms-pick-cat-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sms-pick-count {
  flex: none; min-width: 18px; padding: 0 6px; line-height: 17px; text-align: center;
  border-radius: 9px; background: #F2F4F7; color: #9AA3AF; font-size: 11px;
}
.sms-pick-items { border-top: 1px dashed #F0F2F5; }
.sms-pick-item {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 34px;
  cursor: pointer; color: #4E5969; font-size: 13px;
}
.sms-pick-item:hover { background: #F2FBF6; }
.sms-pick-item.on { background: #E8F6EF; color: #007457; font-weight: 600; }
.sms-pick-tick { width: 12px; flex: none; color: transparent; font-size: 12px; }
.sms-pick-item.on .sms-pick-tick { color: #007457; }
.sms-pick-item-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sms-pick-badge { flex: none; padding: 0 6px; line-height: 18px; border-radius: 9px; font-size: 11px; font-weight: 400; }
.sms-pick-badge.ok { background: #E8F7EE; color: #137A3C; }
.sms-pick-badge.warn { background: #FFF7E6; color: #B45309; }
.sms-pick-badge.danger { background: #FEECEC; color: #C53030; }
.sms-pick-badge.muted { background: #F2F4F7; color: #6B7280; }
.sms-pick-empty { padding: 8px 12px 8px 34px; color: #B0B6BF; font-size: 12px; }
.sms-pick-foot { padding: 8px 12px; border-top: 1px solid #EEF1F4; background: #FAFBFC; font-size: 12px; }
.sms-pick-foot a { color: #0B7A4B; text-decoration: none; }
.sms-pick-foot a:hover { text-decoration: underline; }
.sms-pick-picked {
  display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; padding: 8px 12px;
  border-radius: 8px; background: #F7FAF8; color: #4E5969; font-size: 12px;
}
.sms-pick-picked b { color: #1D2129; }
.sms-pick-warn { color: #C27A00; }
/* 随访里发短信：左边病史记录 + 右边模板/预览 */
.fu-sms-layout { display: flex; gap: 14px; align-items: flex-start; }
.fu-sms-history { width: 310px; flex: none; max-height: 420px; overflow-y: auto; }
.fu-sms-history .fu-exec-tabs { border-radius: 8px 8px 0 0; }
.fu-sms-history .fu-exec-tablist > span {
  flex: 1; padding: 6px 7px; color: #eafcff; font-size: 12px; line-height: 18px;
  text-align: center; white-space: nowrap; cursor: pointer; border-radius: 3px;
}
.fu-sms-history .fu-exec-tablist > span.on { background: #fff; color: #168c9c; }
.fu-sms-history .fu-exec-hlist { max-height: 320px; background: #F8FAFC; }
.fu-sms-main { flex: 1; min-width: 0; }
.sms-var-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 18px;
}
.sms-var-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 4px 0;
  border-bottom: 1px dashed #e5eaf0;
}
.sms-var-group > div:last-child { min-width: 0; }
.sms-var-group:last-child {
  border-bottom: 0;
}
.sms-var-title {
  flex: none;
  width: 76px;
  padding-top: 5px;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
}
.sms-var-btn {
  margin: 2px 4px 2px 0 !important;
  padding: 3px 9px !important;
  font-size: 12px !important;
}
.sms-content-row textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  line-height: 1.7;
}
.sms-content-row textarea.input {
  height: 150px;
  min-height: 150px;
  padding: 10px 12px;
}
#smsTplCount { margin-top: 6px; font-size: 12px; }
.sms-desc-row {
  align-items: flex-start;
  margin-top: 10px;
}
.sms-desc-row textarea {
  flex: 1;
  resize: vertical;
}
.sms-desc-row textarea.input {
  height: 58px;
  min-height: 58px;
  padding: 8px 10px;
}
.sms-preview-wrap {
  padding: 14px;
  border-radius: 12px;
  background: #f1f5f9;
}
.sms-preview-title {
  margin-bottom: 10px;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
}
.sms-preview-phone {
  min-height: 420px;
  padding: 18px 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}
.sms-preview-sig {
  margin-bottom: 10px;
  color: #10a37f;
  font-size: 13px;
  font-weight: 600;
}
.sms-preview-body {
  padding: 12px;
  border-radius: 10px;
  background: #eef6f3;
  color: #1f2937;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ---------------- 门店经营 / 分红看板 ---------------- */
.sf-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 12px; }
.sf-kpi { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.sf-kpi .l { font-size: 12px; color: var(--aux); }
.sf-kpi .v { margin-top: 6px; font-size: 22px; font-weight: 700; color: #1f2937; }
.sf-kpi .v.green { color: #0b8064; }
.sf-kpi .v.red { color: #e04f3f; }
.sf-kpi .v.blue { color: #2563eb; }
.sf-kpi .v.orange { color: #c77800; }
.sf-kpi-sub { margin-top: 6px; font-size: 10px; color: #9aa3af; line-height: 1.5; }
.dash-table td.num, .dash-table th.num { text-align: right; }
.dash-table td.red { color: #e04f3f; }
.dash-table td.green { color: #0b8064; }
.dash-table td.orange { color: #c77800; }
.sf-prow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sf-prow .input { flex: 1; }
.sf-drill { cursor: pointer; }
.sf-drill:hover { background: #f2fbf7; }
.sf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 1100px) { .sf-two { grid-template-columns: 1fr; } }

/* 网站备案信息：登录页和后台内都固定在底部，避免遮挡内容。 */
.site-filing-footer {
  position: fixed;
  left: 50%;
  bottom: 8px;
  z-index: 12000;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1px solid rgba(203, 213, 225, .72);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
  color: #64748b;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
}
.site-filing-footer a { color: #475569; text-decoration: none; }
.site-filing-footer a:hover { color: #0f766e; text-decoration: underline; }
.site-filing-sep { color: #cbd5e1; }
@media (max-width: 560px) {
  .site-filing-footer {
    bottom: 4px;
    max-width: calc(100vw - 20px);
    padding: 4px 9px;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
  }
}
