/* ============================================================
 * 普华诊所 · 总控后台
 * admin.css — 全局样式
 * ------------------------------------------------------------
 * 🚨 设计令牌与小程序端（miniprogram/app.wxss）严格一致，
 *    确保后台与小程序视觉统一：深海蓝主色 / 暖金辅助 / 温润米白底色。
 * ============================================================ */

:root {
  /* 色彩令牌 —— 与小程序端同名同值 */
  --c-bg:          #FAF9F7;
  --c-bg-warm:     #F5F2ED;
  --c-surface:     #FFFFFF;
  --c-primary:     #1B3A5C;
  --c-primary-80:  rgba(27, 58, 92, 0.80);
  --c-primary-60:  rgba(27, 58, 92, 0.60);
  --c-primary-12:  rgba(27, 58, 92, 0.12);
  --c-gold:        #C9A96E;
  --c-gold-soft:   #E3D0AC;
  --c-gold-deep:   #9A7B3F;
  --c-gold-12:     rgba(201, 169, 110, 0.12);
  --c-green:       #2F9E6E;
  --c-amber:       #E08A2B;
  --c-red:         #C0392B;

  --c-text:        #1A1F2E;
  --c-text-2:      #6B7280;
  --c-text-3:      #9C9A94;
  --c-border:      #E8E5E0;
  --c-row-alt:     #FBFAF8;

  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 1px 3px rgba(27, 58, 92, 0.06);
  --shadow-lg:     0 8px 24px rgba(27, 58, 92, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- 布局 ---------- */
/* 🚨 2026-12-02 修正：原为 min-height:100vh，导致 .app 被内容撑高 2198px，
   底部备案页脚被顶到首屏之外（必须滚到底才看得见，实测 bottom=2198 / 视口 1000）。
   改为定高 100vh：.main 内部再由 .content(flex:1;overflow:auto) 承担滚动，
   页脚 flex-shrink:0 才真正"钉"在可视底部。不改 sidebar / content 任何规则。 */
.app { display: flex; overflow: hidden; }
/* 🚨 2026-12-02：原顶部红色「当前系统版本」横幅已删除（见 index.html）。
   --puhua-top-offset 保留 0px 兜底，兼容医生端 / 本机调试等环境，
   以及未来若临时加回顶部条时由 app.js 写入实际高度，无需改这条规则。 */
.app { height: calc(100vh - var(--puhua-top-offset, 0px)); }

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--c-primary);
  color: #fff;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.sidebar-brand .sb-name { font-size: 17px; font-weight: 600; letter-spacing: 0.5px; }
.sidebar-brand .sb-sub { font-size: 11px; color: var(--c-gold-soft); margin-top: 4px; letter-spacing: 1px; }

.nav { padding: 12px 0; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-item.on {
  background: rgba(201, 169, 110, 0.14);
  color: #fff;
  border-left-color: var(--c-gold);
  font-weight: 500;
}

.sidebar-foot {
  padding: 14px 20px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  line-height: 1.7;
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
/* 🚨 2026-12-02：.main 必须在定高 .app 内收缩，否则子项最小内容高度会把它撑破，
   导致 .content 不产生内部滚动、底部页脚再次被挤出视口。 */
.main { min-height: 0; }

.topbar {
  height: 56px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}
.tb-title { font-size: 16px; font-weight: 600; color: var(--c-primary); }
.tb-right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--c-text-2); }
.tb-user { display: flex; align-items: center; gap: 8px; }
.tb-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--c-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.role-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: var(--c-gold-12); color: var(--c-gold-deep); font-weight: 500;
}
.role-tag.viewer { background: var(--c-primary-12); color: var(--c-primary-80); }

.content { flex: 1; padding: 24px; overflow: auto; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.card-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title {
  font-size: 15px; font-weight: 600; color: var(--c-primary);
  display: flex; align-items: center; gap: 9px;
}
.card-title::before {
  content: ''; width: 3px; height: 15px; border-radius: 2px;
  background: var(--c-gold);
}
.card-body { padding: 20px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 18px; }
.field-label {
  display: block; font-size: 13px; color: var(--c-text-2);
  margin-bottom: 7px; font-weight: 500;
}
.field-label .req { color: var(--c-red); margin-left: 3px; }
.input, .textarea, .select {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 14px; color: var(--c-text);
  background: #fff; font-family: inherit;
  transition: border-color .15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--c-primary);
}
.textarea { min-height: 84px; resize: vertical; line-height: 1.6; }
.field-hint { font-size: 12px; color: var(--c-text-3); margin-top: 5px; }

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

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; cursor: pointer;
  border: 1px solid transparent; font-family: inherit;
  transition: all .15s;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: #16304c; }
.btn-gold { background: var(--c-gold); color: #fff; }
.btn-gold:hover { background: #b9985c; }
.btn-ghost { background: #fff; color: var(--c-primary); border-color: var(--c-border); }
.btn-ghost:hover { border-color: var(--c-primary); }
.btn-danger { background: #fff; color: var(--c-red); border-color: #E8C4C0; }
.btn-danger:hover { background: #FDF3F2; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table thead th {
  background: var(--c-primary);
  color: #fff;
  text-align: left;
  padding: 11px 14px;
  font-weight: 500;
  white-space: nowrap;
}
.table thead th:first-child { border-top-left-radius: var(--radius-sm); }
.table thead th:last-child { border-top-right-radius: var(--radius-sm); }
.table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
}
.table tbody tr:nth-child(even) { background: var(--c-row-alt); }
.table tbody tr:hover { background: var(--c-gold-12); }
.table .actions { display: flex; gap: 8px; white-space: nowrap; flex-wrap: nowrap; align-items: center; }
/* 🚨 2026-11-24：操作列按钮不换行、不压缩，避免多按钮时行高被撑到 74px */
.table .actions .btn { flex: 0 0 auto; white-space: nowrap; }

/* ============================================================
 * 🚨 长文本列省略（2026-11-17 修复"擅长"列撑爆表格）
 * ------------------------------------------------------------
 * 「擅长」是自由文本，有人写了 4-5 个标签、几十个字，
 * 不加限制会把整张表横向撑开，其他列全被挤成一条线。
 *
 * 🚨 纯 CSS 省略的前提（三者缺一不可）：
 *   ① 元素必须有**确定宽度**（max-width 或 width，不能是 auto）
 *   ② white-space: nowrap（不许换行）
 *   ③ overflow: hidden + text-overflow: ellipsis
 *   td 本身设 max-width 在 table-layout:auto 下**不生效**，
 *   必须在 td 里再包一层 span/div 才能可靠省略。
 * ============================================================ */
.table .cell-ellipsis {
  display: block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 更窄的场景（如表头列多时） */
.table .cell-ellipsis-sm { max-width: 130px; }
/* 鼠标悬停显示完整内容由 title 属性负责 */
.table td.col-narrow { max-width: 220px; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-block; padding: 2px 9px; border-radius: 10px;
  font-size: 11px; font-weight: 500; line-height: 1.7;
}
.tag-green { background: rgba(47, 158, 110, 0.12); color: var(--c-green); }
.tag-gray  { background: #F0F0F0; color: var(--c-text-3); }
.tag-gold  { background: var(--c-gold-12); color: var(--c-gold-deep); }
.tag-amber { background: rgba(224, 138, 43, 0.12); color: var(--c-amber); }
.tag-blue  { background: var(--c-primary-12); color: var(--c-primary-80); }
.tag-red   { background: #FDF3F2; color: var(--c-red); }

/* ---------- 工具栏 ---------- */
.toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: var(--c-bg-warm);
  border-bottom: 1px solid var(--c-border);
  flex-wrap: wrap;
}
.toolbar .spacer { flex: 1; }
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; padding: 7px 11px; font-size: 13px; }

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1B3A5C 0%, #2A5580 55%, #1B3A5C 100%);
}
.login-card {
  width: 380px; background: #fff;
  border-radius: 16px; padding: 38px 34px;
  box-shadow: var(--shadow-lg);
}
.login-logo { text-align: center; margin-bottom: 26px; }
.login-logo .ll-name { font-size: 22px; font-weight: 600; color: var(--c-primary); letter-spacing: 1px; }
.login-logo .ll-sub { font-size: 11px; color: var(--c-gold-deep); margin-top: 6px; letter-spacing: 2.2px; }
.login-title { font-size: 15px; color: var(--c-text-2); text-align: center; margin-bottom: 24px; }
.login-tip {
  margin-top: 18px; padding: 11px 13px;
  background: var(--c-bg-warm); border-radius: var(--radius-sm);
  font-size: 12px; color: var(--c-text-3); line-height: 1.75;
}

/* ---------- Toast / Modal ---------- */
.toast-wrap {
  position: fixed; top: 22px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 10px;
}
.toast {
  padding: 11px 20px; border-radius: var(--radius-sm);
  background: rgba(27, 58, 92, 0.94); color: #fff;
  font-size: 13px; box-shadow: var(--shadow-lg);
  animation: toastIn .2s ease;
  max-width: 420px;
}
.toast.ok { background: rgba(47, 158, 110, 0.95); }
.toast.err { background: rgba(192, 57, 43, 0.95); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.modal-mask {
  position: fixed; inset: 0; background: rgba(26, 31, 46, 0.45);
  display: flex; align-items: center; justify-content: center; z-index: 9998;
}
.modal {
  width: 480px; max-width: 92vw; max-height: 88vh; overflow: auto;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  animation: modalIn .18s ease;
}
.modal.wide { width: 680px; }
@keyframes modalIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.modal-head {
  padding: 17px 22px; border-bottom: 1px solid var(--c-border);
  font-size: 15px; font-weight: 600; color: var(--c-primary);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head .close { cursor: pointer; color: var(--c-text-3); font-size: 20px; line-height: 1; }
.modal-body { padding: 22px; }
.modal-foot {
  padding: 15px 22px; border-top: 1px solid var(--c-border);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* ---------- 空状态 ---------- */
.empty { padding: 56px 20px; text-align: center; color: var(--c-text-3); font-size: 13px; }
.empty .em-icon { font-size: 34px; opacity: 0.35; margin-bottom: 10px; }

/* ---------- 分页 ---------- */
.pager {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; font-size: 13px; color: var(--c-text-2);
}
.pager-btns { display: flex; gap: 6px; align-items: center; }

/* ---------- 服务标签编辑 ---------- */
.hl-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.hl-row .select { width: 130px; flex-shrink: 0; }
.hl-row .input { flex: 1; }

/* ---------- 只读提示条 ---------- */
.readonly-bar {
  padding: 10px 20px; background: var(--c-gold-12);
  color: var(--c-gold-deep); font-size: 13px;
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; gap: 8px;
}

/* ---------- 加载 ---------- */
.loading { padding: 48px; text-align: center; color: var(--c-text-3); font-size: 13px; }

/* ---------- 数据看板 ---------- */
.dash-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.dash-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 14px;
  position: relative;
  overflow: hidden;
}
.dash-card::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--c-gold);
  opacity: .55;
}
.dc-label { font-size: 12px; color: var(--c-text-2); margin-bottom: 10px; }
.dc-value {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.dc-unit { font-size: 12px; font-weight: 400; color: var(--c-text-3); margin-left: 4px; }
.dc-sub { font-size: 11px; color: var(--c-text-3); margin-top: 7px; min-height: 15px; }

@media (max-width: 1280px) {
  .dash-cards { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
 * v1.4 新增：侧边栏分组 / 患者 / 药品库 / 通知中心 / 数据导出
 * ============================================================ */

/* ---------- 侧边栏分组 ---------- */
.nav-group-label {
  font-size: 11px;
  color: rgba(255, 255, 255, .38);
  letter-spacing: .08em;
  padding: 14px 18px 6px;
  font-weight: 500;
}
.nav-ico { width: 18px; display: inline-block; text-align: center; }
.nav-badge {
  margin-left: auto;
  display: none;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #C0392B;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-weight: 600;
}

/* ---------- 通用 ---------- */
.stat-line {
  font-size: 13px;
  color: var(--c-text-2);
  padding: 12px 16px 4px;
}
.stat-line b { color: var(--c-text); }
.row-warn { background: #FFF8F0 !important; }
.check-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--c-text-2);
  cursor: pointer;
  user-select: none;
}
.check-line input { width: 15px; height: 15px; cursor: pointer; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.tip-list {
  margin: 0;
  padding-left: 20px;
  font-size: 12.5px;
  color: var(--c-text-2);
  line-height: 2;
}
.tip-list code {
  background: #F1EFEA;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
}

/* 键值网格（患者详情） */
.kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
}
.kv { display: flex; gap: 10px; font-size: 13px; }
.kv-k { color: var(--c-text-3); min-width: 68px; flex-shrink: 0; }
.kv-v { color: var(--c-text); }

/* ---------- 通知中心 ---------- */
.notif-list { padding: 0; overflow: hidden; }
.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
  align-items: flex-start;
  transition: background .15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: #FBFAF8; }
.notif-item.unread { background: #FDFCF9; }
.notif-item.unread:hover { background: #FAF7F1; }
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  margin-top: 7px; flex-shrink: 0;
}
.dot-info { background: #3E7CB1; }
.dot-warn { background: #D68910; }
.dot-danger { background: #C0392B; }
.notif-main { flex: 1; min-width: 0; }
.notif-title {
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.notif-body {
  font-size: 12.5px;
  color: var(--c-text-2);
  line-height: 1.7;
  margin-bottom: 5px;
}
.notif-meta { font-size: 11.5px; color: var(--c-text-3); }
.notif-meta a { color: var(--c-navy); text-decoration: none; }
.notif-meta a:hover { text-decoration: underline; }
.notif-ops { display: flex; gap: 6px; flex-shrink: 0; }

/* ---------- 数据导出 ---------- */
.export-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.export-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.ec-icon { font-size: 26px; margin-bottom: 8px; }
.ec-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.ec-desc { font-size: 12.5px; color: var(--c-text-2); line-height: 1.7; margin-bottom: 12px; }
.ec-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 16px;
  flex: 1;
}
.ec-f {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 3px;
  background: #F3F1EC;
  color: var(--c-text-2);
}
.export-card .btn { align-self: flex-start; }

@media (max-width: 1180px) {
  .export-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: 1fr; }
}

/* ============================================================
 * v2.0 数据看板升级（2026-11-09）
 * ------------------------------------------------------------
 * 🚨 命名规范：本区块所有类名统一加 `dash-` / `hb-` / `doc-` / `lg-` 前缀，
 *    避免与既有 .dash-card 等样式撞车。
 *    项目历史踩过坑：首页 .qi-icon 与旧 quick-card 的 .qi-icon 同名，
 *    导致图标尺寸错乱，排查很久。
 * ============================================================ */

/* ---------- 区块标题 ---------- */
.dash-section {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 26px 0 12px;
  padding-left: 10px;
  border-left: 3px solid var(--c-gold);
}
.dash-section .ds-title { font-size: 14px; font-weight: 600; color: var(--c-text); }
.dash-section .ds-sub { font-size: 11px; color: var(--c-text-3); }

/* ---------- 指标卡网格变体 ---------- */
/**
 * 🚨 断点以「每张卡最小可用宽度」为准，不拍脑袋定：
 *    6 列时每张卡要容纳「标签 8 字 + 数字 30px + 副标题」，
 *    实测最小 240px（含 gap 16px）才不换行挤压，
 *    因此 6 列需 ≥ 6×240 + 5×16 = 1520px。
 *    1520 以内降为 3 列（每卡约 480px，仍舒适）。
 */
.dash-cards-6 { grid-template-columns: repeat(6, 1fr); }
.dash-cards-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1519px) { .dash-cards-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1279px) {
  .dash-cards-6, .dash-cards-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 759px) {
  .dash-cards-6, .dash-cards-4 { grid-template-columns: 1fr; }
}

/* ---------- 两栏 / 三栏布局 ---------- */
.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 1400px) { .dash-grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1100px) {
  .dash-grid-2, .dash-grid-3 { grid-template-columns: 1fr; }
}

/* ---------- 图表容器 ---------- */
.dash-svg { width: 100%; height: auto; display: block; }

.dash-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--c-text-3);
  font-size: 12px;
}

.dash-note {
  margin-top: 12px;
  padding: 9px 11px;
  background: var(--c-bg-warm);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--c-text-2);
  line-height: 1.7;
}

.dash-footer {
  margin-top: 26px;
  padding: 14px 16px;
  background: var(--c-bg-warm);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--c-text-3);
  line-height: 1.9;
}

/* ---------- 比率条 ---------- */
.rate-row { display: flex; flex-direction: column; gap: 14px; }
.rate-item { width: 100%; }
.rate-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--c-text-2);
  margin-bottom: 6px;
}
.rate-track {
  height: 8px;
  background: #F0EEE9;
  border-radius: 4px;
  overflow: hidden;
}
.rate-fill { height: 100%; border-radius: 4px; transition: width .5s ease; }

/* ---------- 小号 KPI 列表 ---------- */
.mini-stats { margin-top: 16px; border-top: 1px solid var(--c-border); padding-top: 10px; }
.mst-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 12px;
}
.mst-k { color: var(--c-text-2); }
.mst-v { font-weight: 600; }

/* ---------- 医疗安全大数字 ---------- */
.safety-big {
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1px;
}
.safety-big .sb-unit {
  font-size: 13px;
  font-weight: 400;
  color: var(--c-text-3);
  margin-left: 6px;
}
.safety-label {
  margin-top: 8px;
  font-size: 12px;
  color: var(--c-text-2);
}

/* ---------- 横向条形（药品 / 权益类型） ---------- */
.hbar-wrap { display: flex; flex-direction: column; gap: 13px; }
.hbar-item { width: 100%; }
.hb-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  margin-bottom: 5px;
  gap: 8px;
}
.hb-name {
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(192, 57, 43, .10);
  color: var(--c-red);
  font-size: 10px;
  vertical-align: middle;
}
.hb-val { color: var(--c-text-2); font-weight: 600; white-space: nowrap; }
.hb-track { height: 7px; background: #F0EEE9; border-radius: 4px; overflow: hidden; }
.hb-fill { height: 100%; border-radius: 4px; transition: width .5s ease; }

/* ---------- 环形图 ---------- */
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut-svg { flex: 0 0 156px; width: 156px; }
.donut-legend { flex: 1; min-width: 0; }
.lg-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 12px;
}
.lg-dot {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.lg-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-text);
}
.lg-val { color: var(--c-text-2); font-weight: 600; white-space: nowrap; }

@media (max-width: 900px) {
  .donut-wrap { flex-direction: column; align-items: stretch; }
  .donut-svg { flex: none; width: 100%; max-width: 200px; margin: 0 auto; }
}

/* ---------- 医生排行表 ---------- */
.doc-table { display: flex; flex-direction: column; }
.doc-row {
  display: grid;
  grid-template-columns: 36px 1fr 80px 80px 110px;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid #F3F1ED;
}
.doc-row:last-child { border-bottom: none; }
.doc-row:not(.doc-head):hover { background: var(--c-row-alt); }
.doc-head {
  font-size: 11px;
  color: var(--c-text-3);
  background: var(--c-bg-warm);
  padding-top: 9px;
  padding-bottom: 9px;
  font-weight: 600;
}
.doc-rank {
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.doc-main { min-width: 0; }
.doc-line1 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.doc-name { font-size: 13px; font-weight: 600; color: var(--c-text); }
.doc-dept { font-size: 11px; color: var(--c-text-3); }
.doc-bar { height: 6px; background: #F0EEE9; border-radius: 3px; overflow: hidden; }
.doc-bar-fill { height: 100%; border-radius: 3px; transition: width .5s ease; }
.doc-num {
  text-align: right;
  font-size: 11px;
  color: var(--c-text-3);
  white-space: nowrap;
}
.doc-num b { display: block; font-size: 15px; color: var(--c-text); font-weight: 600; }
.doc-num span { font-size: 10px; }
.doc-amount b { color: var(--c-gold-deep); font-size: 14px; }

@media (max-width: 900px) {
  .doc-row { grid-template-columns: 30px 1fr 62px 62px; padding: 10px 12px; }
  .doc-amount { display: none; }
}

/* ---------- 时间范围按钮组 ---------- */
.range-group {
  display: inline-flex;
  background: var(--c-bg-warm);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}
.range-btn {
  border: none;
  background: transparent;
  padding: 6px 13px;
  font-size: 12px;
  color: var(--c-text-2);
  border-radius: 6px;
  cursor: pointer;
  transition: all .18s;
  font-family: inherit;
}
.range-btn:hover { color: var(--c-text); }
.range-btn.active {
  background: var(--c-surface);
  color: var(--c-primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(27, 58, 92, .10);
}

/* ============================================================
 * v2.0 导出中心扩展（2026-11-09）
 * ============================================================ */

/* 权限徽标 */
.export-badge {
  align-self: flex-start;
  padding: 6px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(47, 158, 110, .10);
  color: var(--c-green);
  border: 1px solid rgba(47, 158, 110, .22);
  white-space: nowrap;
}
.export-badge.warn {
  background: rgba(224, 138, 43, .10);
  color: var(--c-amber);
  border-color: rgba(224, 138, 43, .24);
}

/* 时间范围行 */
.ex-range-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.ex-range-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap;
}
.ex-custom-range {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--c-border);
  flex-wrap: wrap;
}
.ex-date {
  padding: 7px 11px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-family: inherit;
  color: var(--c-text);
  background: var(--c-surface);
}
.ex-date:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-12);
}
.ex-tilde { font-size: 12px; color: var(--c-text-3); }
.ex-range-hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--c-text-2);
}
.ex-range-hint b { color: var(--c-primary); }

/* 报表卡顶部色条 */
.ec-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 3px solid var(--c-gold);
  margin: -20px -20px 14px;
  padding-left: 20px;
  padding-right: 20px;
}
.ec-top .ec-icon { font-size: 22px; margin-bottom: 0; }
.ec-top .ec-title { margin-bottom: 0; }

/* 操作按钮组 */
.ec-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}
.export-card .btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* 基础数据区：三列紧凑 */
.export-grid-sm { grid-template-columns: repeat(4, 1fr); }
.export-grid-sm .export-card { padding: 16px; }
.export-grid-sm .ec-icon { font-size: 20px; }
.export-grid-sm .ec-title { font-size: 13.5px; }
.export-grid-sm .ec-desc { font-size: 11.5px; margin-bottom: 14px; }

@media (max-width: 1400px) {
  .export-grid-sm { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1180px) {
  .export-grid-sm { grid-template-columns: 1fr; }
}

/* ============================================================
   医生管理 · 批量操作条（2026-11-17）
   🚨 无勾选时按钮 disabled，视觉上也要弱化
   ============================================================ */
.bulk-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; margin: 0 0 12px;
  background: #FAF9F7; border: 1px solid #E8E5E0; border-radius: 10px;
}
.bulk-bar .bulk-info { font-size: 13px; color: #5b6b7c; }
.bulk-bar .bulk-info b { color: #1B3A5C; font-size: 14px; }
.bulk-bar .bulk-hint {
  margin-left: auto; font-size: 12px; color: #9C9A94;
}
.bulk-bar .btn[disabled] { opacity: .45; cursor: not-allowed; }
.table input[type="checkbox"] {
  width: 15px; height: 15px; cursor: pointer; accent-color: #1B3A5C;
}
.table input[type="checkbox"][disabled] { cursor: not-allowed; }

/* ============================================================
 * 🚨 2026-11-24 医生列表「收费」列
 * ------------------------------------------------------------
 * 原先三个价格挤在姓名下方，姓名格又宽又高、整表一片字。
 * 现改为独立列 + 标签/金额两栏网格，三行紧凑对齐：
 *     挂号   50
 *     图文  380
 *     视频    —
 * 未配置显示灰色「—」，整列都未配时只显示一行「未定价」。
 * ============================================================ */
.table .col-fee {
  padding-top: 4px;
  padding-bottom: 4px;
  white-space: nowrap;
  vertical-align: middle;
}
.table .fee-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  line-height: 1.25;
  gap: 8px;
}
.table .fee-lb {
  font-size: 11px;
  color: #9AA6B2;
  flex-shrink: 0;
}
.table .fee-amt {
  font-size: 12px;
  font-weight: 600;
  color: #A8834A;
  font-variant-numeric: tabular-nums;
}
.table .fee-amt-na {
  color: #C7CDD4;
  font-weight: 400;
}
.table .fee-none {
  display: inline-block;
  font-size: 11px;
  color: #E08A2B;
  background: rgba(224, 138, 43, 0.10);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ============================================================
 * 🚨 2026-11-25 新增：后台底部 ICP 备案号
 * ------------------------------------------------------------
 * 放在 .main 内部、.content 之外：
 *   · .main 是纵向 flex，.content flex:1 占满剩余空间
 *   · 页脚 flex-shrink:0 → 固定在可视底部，内容滚动时不跟着滚走
 * 只新增样式，不修改任何已有选择器。
 * ============================================================ */
.app-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  font-size: 12px;
  color: var(--c-text-2);
  line-height: 1.6;
  letter-spacing: 0.2px;
}
.app-footer-sep {
  color: var(--c-border);
}
.app-footer-icp {
  color: var(--c-text-2);
  text-decoration: none;
  transition: color .15s ease;
}
.app-footer-icp:hover {
  color: var(--c-primary);
  text-decoration: underline;
}

/* ============================================================
 * 🚨 2026-12-02 新增：底部「公安联网备案」标识
 * ------------------------------------------------------------
 * 依据《计算机信息网络国际联网安全保护管理办法》及公安备案要求，
 * 已备案网站在 ICP 号后方须展示「京公网安备xxxxxxxxxxxxxx号」，
 * 并把徽标（盾牌）放在文字前方，点击跳转全国互联网安全管理服务平台。
 *
 * 只新增选择器，不改动 .app-footer / .app-footer-icp 任何已有规则。
 * ============================================================ */
.app-footer-gongan {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--c-text-2);
  text-decoration: none;
  transition: color .15s ease;
  /* 🚨 图标固定 20×22，禁止 flex 压缩变形 */
  flex-shrink: 0;
}
.app-footer-gongan:hover {
  color: var(--c-primary);
  text-decoration: underline;
}
.app-footer-gongan-icon {
  display: block;
  width: 20px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  /* 深色底/浅色底都能贴合，不做任何滤镜处理，保持官方徽标原色 */
}

/* 🚨 2026-11-25 登录页 ICP 备案号：绝对定位贴底，不干扰 login-card 居中 */
.login-footer {
  /* 🚨 .login-wrap 无 position 上下文，用绝对定位会跑到视口外。
     改为固定贴底：纯 fixed 定位，不依赖父级，也绝不改动 .login-wrap。 */
  position: fixed;
  left: 0;
  right: 0;
  bottom: 14px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  z-index: 5;
  pointer-events: auto;
}
.login-footer .app-footer-icp {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}
.login-footer .app-footer-icp:hover {
  color: #FFFFFF;
  text-decoration: underline;
}
/* 🚨 2026-12-02：登录页（深色底）上的公安备案号与徽标 */
.login-footer .app-footer-gongan {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}
.login-footer .app-footer-gongan:hover {
  color: #FFFFFF;
  text-decoration: underline;
}
.login-footer-sep {
  margin: 0 6px;
  color: rgba(255, 255, 255, 0.32);
}

/* ============================================================
 * 🚨 2026-12-02：顶部静态版本横幅已删除，健康 / 版本指示移到页脚
 * ------------------------------------------------------------
 * 文案由 app.js 的 pingHealth() 从 /api/health 实时写入
 * （appVersion / buildDate / codeBuiltAt 全部服务端动态派生），
 * 不再是写死的「当前系统版本 v1.6.0-MDT-FEE · 构建 212 · 2026-11-23」。
 * 只新增选择器，不改动 .app-footer / .login-footer 任何已有规则。
 * ============================================================ */
.app-footer-health {
  font-size: 11px;
  color: var(--c-text-2);
  letter-spacing: .2px;
  white-space: nowrap;
  cursor: help;
}
.login-footer .app-footer-health {
  color: rgba(255, 255, 255, 0.72);
}

/* ============================================================
 * 🚨 2026-11-25 后台「问诊费设置」页：护理服务价目表
 * ============================================================ */
.cf-sec-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 28px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--c-border);
}
.cf-sec-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
}
.nf-wrap {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 4px 16px 16px;
}
.nf-head,
.nf-row {
  display: grid;
  grid-template-columns: 1fr 110px 140px 90px;
  gap: 12px;
  align-items: center;
}
.nf-head {
  padding: 12px 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-2);
  border-bottom: 1px solid var(--c-border);
}
.nf-row {
  padding: 9px 0;
  border-bottom: 1px solid #F4F1EC;
}
.nf-row:last-of-type {
  border-bottom: none;
}
.nf-name-input,
.nf-fee-input {
  width: 100%;
  padding: 6px 9px;
  font-size: 13px;
}
.nf-code {
  font-family: monospace;
  font-size: 12px;
  color: var(--c-text-3);
}
.nf-fee {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #A8834A;
  font-weight: 600;
}
.nf-fee .nf-fee-input {
  color: #A8834A;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.nf-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--c-text-2);
  cursor: pointer;
}
.nf-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--c-border);
}

/* ============================================================
 * 🚨 2026-11-25 后台「体检套餐」管理页
 * ============================================================ */
.ex-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--c-border);
}
.ex-tab {
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  cursor: pointer;
}
.ex-tab.on {
  color: var(--c-text);
  border-bottom-color: var(--c-gold);
}

/* 套餐卡列表 */
.ex-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ex-card {
  padding: 16px 18px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 8px;
}
.ex-card.off {
  opacity: .62;
  background: #FAFAF8;
}
.ex-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ex-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
}
.ex-tag {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.ex-tag.green { background: rgba(47,158,110,.12); color: #2F9E6E; }
.ex-tag.gray { background: rgba(156,154,148,.14); color: #8A8882; }
.ex-price {
  font-size: 17px;
  font-weight: 700;
  color: #A8834A;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ex-org {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 400;
  color: #B8B4AC;
  text-decoration: line-through;
}
.ex-meta {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--c-text-3);
}
.ex-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--c-text-2);
}
.ex-ops {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #F4F1EC;
}

/* 编辑器弹层 */
.ex-mask {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20,28,38,.52);
  padding: 24px;
}
.ex-modal {
  display: flex;
  flex-direction: column;
  width: 940px;
  max-width: 96vw;
  max-height: 92vh;
  background: var(--c-surface);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.24);
}
.ex-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--c-border);
}
.ex-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
}
.ex-close {
  width: 28px; height: 28px;
  border: none; background: none;
  font-size: 20px; line-height: 1;
  color: var(--c-text-3);
  cursor: pointer;
  border-radius: 4px;
}
.ex-close:hover { background: var(--c-bg-warm); }

.ex-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
}
.ex-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--c-border);
}

.ex-sec {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text);
}
.ex-sec:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.ex-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ex-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.ex-f {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.ex-f > span {
  font-size: 12px;
  color: var(--c-text-2);
  font-weight: 600;
}
.ex-f > span i { color: #D9534F; font-style: normal; }
.ex-f textarea.input { resize: vertical; font-family: inherit; }
.ex-inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.ex-inline > span { font-size: 13px; font-weight: 400; }
.ex-hint {
  font-size: 12px;
  color: var(--c-text-3);
  margin-bottom: 10px;
  line-height: 1.6;
}

/* 检查组 */
.ex-group {
  margin-bottom: 12px;
  padding: 12px;
  background: #FAFAF8;
  border: 1px solid var(--c-border);
  border-radius: 6px;
}
.ex-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.ex-gname { flex: 1; font-weight: 600; }
.ex-gcount {
  font-size: 11px;
  color: var(--c-text-3);
  white-space: nowrap;
}
.ex-items { display: flex; flex-direction: column; gap: 6px; }
.ex-item-row {
  display: grid;
  grid-template-columns: 1fr 1fr 28px;
  gap: 8px;
  align-items: center;
}
.ex-x {
  width: 26px; height: 26px;
  border: 1px solid #EAD7D5;
  background: #FFF;
  color: #C0504D;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.ex-x:hover { background: #FDF2F1; }
.ex-empty {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--c-text-3);
  background: #FAFAF8;
  border-radius: 6px;
}
.ex-empty.sm { padding: 8px; font-size: 11px; }

/* 日期名额 */
.ex-slot-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
}
.ex-slot-row {
  display: grid;
  grid-template-columns: 160px 40px 90px 80px 28px;
  gap: 8px;
  align-items: center;
}
.ex-slot-label { font-size: 12px; color: var(--c-text-2); }
.ex-slot-booked { font-size: 11px; color: var(--c-text-3); }

/* 预约单筛选 */
.ex-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.ex-filter .input { width: auto; }
.ex-filter #bk-kw { flex: 1; max-width: 320px; }
.ex-table-wrap { overflow-x: auto; }
.ex-bk-ops { display: flex; gap: 6px; white-space: nowrap; }

/* ============================================================
 * 🚨 2026-11-30 支付配置页
 * ============================================================ */
.pay-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
}
.pay-banner.ok { background: rgba(47,158,110,.08); border: 1px solid rgba(47,158,110,.28); color: #1F6E4C; }
.pay-banner.warn { background: #FFF8ED; border: 1px solid #FBE3C0; color: #A8671C; }
.pay-banner b { font-size: 14px; }

.pay-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.pc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--c-border);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--c-text);
}
.pc-req { font-size: 11px; font-weight: 400; color: var(--c-red); }
.pc-opt { font-size: 11px; font-weight: 400; color: var(--c-text-3); }
.pc-hint { padding: 12px 18px; font-size: 12px; color: var(--c-text-2); line-height: 1.7; }

.pay-field { padding: 14px 18px; border-bottom: 1px solid #F4F1EC; }
.pay-field:last-child { border-bottom: none; }
.pay-field > label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-text-2);
  margin-bottom: 7px;
}
.pay-field .input { width: 100%; }
.pay-field textarea.input { resize: vertical; font-family: ui-monospace, monospace; font-size: 11.5px; }
.pay-guide { margin-top: 6px; font-size: 11px; color: var(--c-text-3); line-height: 1.6; }
.pay-set { background: rgba(47,158,110,.12); color: var(--c-green); padding: 1px 7px; border-radius: 4px; font-size: 10px; font-weight: 600; }
.pay-unset { background: rgba(224,138,43,.12); color: var(--c-amber); padding: 1px 7px; border-radius: 4px; font-size: 10px; font-weight: 600; }

.pay-actions { display: flex; gap: 10px; margin-bottom: 14px; }
.pay-note {
  padding: 14px 18px;
  border-radius: 8px;
  background: var(--c-bg-warm);
  font-size: 12px;
  color: var(--c-text-2);
  line-height: 1.8;
}

/* 开关 */
.pay-switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.pay-switch input { opacity: 0; width: 0; height: 0; }
.ps-slider {
  position: absolute; inset: 0;
  background: #C7CDD4;
  border-radius: 13px;
  transition: .2s;
  cursor: pointer;
}
.ps-slider::before {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}
.pay-switch input:checked + .ps-slider { background: var(--c-green); }
.pay-switch input:checked + .ps-slider::before { transform: translateX(22px); }

/* ============================================================
 * 🚨 2026-12-02 处方履约管理
 * ============================================================ */
.rx-stats {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
}
.rs-item {
  flex: 1;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.rs-item.warn { border-color: #FBE3C0; background: #FFF8ED; }
.rs-item.ok { border-color: rgba(47,158,110,.28); background: rgba(47,158,110,.06); }
.rs-item.amber { border-color: #FBE3C0; background: #FFF8ED; }
.rs-num {
  font-size: 26px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.2;
}
.rs-lb { margin-top: 4px; font-size: 12px; color: var(--c-text-3); }

.rx-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.rx-sel-tip {
  margin-left: auto;
  font-size: 12px;
  color: var(--c-text-3);
}

.rx-table-wrap { overflow-x: auto; }
.rx-table { width: 100%; min-width: 1180px; }
.rx-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-3);
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
.rx-table td {
  font-size: 12.5px;
  color: var(--c-text);
  padding: 12px 10px;
  border-bottom: 1px solid #F6F4F0;
  vertical-align: top;
}
.rx-sub {
  margin-top: 3px;
  font-size: 11px;
  color: var(--c-text-3);
  line-height: 1.4;
}
.rx-muted { color: var(--c-text-3); }
.rx-addr { max-width: 190px; }
.rx-addr-mask { color: var(--c-text-2); }
.rx-addr-full { color: var(--c-text); }
.rx-ops { white-space: nowrap; }
.btn-link {
  background: none;
  border: none;
  color: var(--c-primary, #1B3A5C);
  font-size: 12.5px;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: underline;
}
.btn-link:hover { opacity: .75; }
.rx-pager {
  margin-top: 14px;
  font-size: 12px;
  color: var(--c-text-3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-xs { padding: 3px 10px !important; font-size: 12px !important; }

/* 单元格省略（项目铁律：td 直接设 max-width 在 table-layout:auto 下无效，必须套 span） */
.cell-ellipsis { max-width: 240px; }
.cell-ellipsis-inner {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
