/* ==========================================================================
   医院版 · 新增功能模块样式（作用域 .hp）
   令牌全部取自平台主题层，不引入新色；表格用 .hp-tw/.hp-tb（需覆盖平台全局 td 单行省略）
   ========================================================================== */

/* ---------- 平台主题层里 .bc 是「块卡片」组件，与院内文案类名同名 ----------
   在 .hp 作用域内还原为普通文案块，避免 .hp-box/.hp-gap/.hp-ok 里的说明文字被套上白卡片+flex */
.hp .bc { display: block; background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
.hp .bc b { display: inline; font-weight: 700; }

/* ---------- 核心指标（b 不再被 flex 块级化，可正常内联强调） ---------- */

/* ---------- 通用原子 ---------- */
.hp-sec { margin-bottom: 18px; }
.hp-sec:last-child { margin-bottom: 0; }
.hp-h4 { font-size: 13.5px; font-weight: 700; color: var(--ink, #0B1220); margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.hp-h4::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--primary, #085BFF); flex: none; }
.hp-h5 { font-size: 13px; font-weight: 700; color: var(--ink, #0B1220); margin: 14px 0 8px; }
.hp-p { font-size: 13.4px; color: var(--ink-2, #3A4457); line-height: 1.8; margin-bottom: 8px; text-align: justify; }
.hp-p:last-child { margin-bottom: 0; }
.hp-muted { color: var(--ink-3, #8A93A6); }

.hp-list { list-style: none; }
.hp-list li { font-size: 13.3px; color: var(--ink-2, #3A4457); line-height: 1.75; padding: 7px 0 7px 18px; position: relative; border-bottom: 1px dashed var(--line-2, #EFF2F8); }
.hp-list li:last-child { border-bottom: none; }
.hp-list li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 5px; height: 5px; border-radius: 50%; background: var(--primary, #085BFF); opacity: .5; }

.hp-steps { list-style: none; counter-reset: hp; }
.hp-steps li { counter-increment: hp; position: relative; padding: 9px 0 9px 36px; border-bottom: 1px dashed var(--line-2, #EFF2F8); }
.hp-steps li:last-child { border-bottom: none; }
.hp-steps li::before {
    content: counter(hp); position: absolute; left: 0; top: 10px;
    width: 23px; height: 23px; border-radius: 50%;
    background: var(--primary-light, #EDF3FF); color: var(--primary, #085BFF);
    font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.hp-steps li b { display: block; font-size: 13.4px; font-weight: 700; color: var(--ink, #0B1220); }
.hp-steps li span { font-size: 13px; color: var(--ink-2, #3A4457); line-height: 1.7; }

.hp-box { background: #FAFBFC; border: 1px solid var(--line-2, #EFF2F8); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.hp-box:last-child { margin-bottom: 0; }
.hp-box .bt { font-size: 13px; font-weight: 700; color: var(--ink, #0B1220); margin-bottom: 5px; }
.hp-box .bc { font-size: 13px; color: var(--ink-2, #3A4457); line-height: 1.78; text-align: justify; }
.hp-box.warn { background: #FFFAF3; border-color: #F5E3C8; }
.hp-box.info { background: #F3F7FF; border-color: #D8E5FB; }
.hp-box.ok { background: #F2FBF6; border-color: #CFEEDD; }

.hp-note {
    font-size: 12.4px; color: var(--ink-2, #3A4457); line-height: 1.75;
    background: #F8FAFC; border: 1px solid var(--line-2, #EFF2F8);
    border-left: 3px solid var(--primary, #085BFF);
    padding: 9px 12px; border-radius: 0 8px 8px 0; margin-top: 10px;
}

/* ---------- 内容表（长文本，必须覆盖平台全局 td 的单行省略） ---------- */
.hp-tw { overflow: auto; max-height: 560px; border: 1px solid var(--line, #E6EAF2); border-radius: 10px; }
.hp-tb { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.hp-tb th {
    position: sticky; top: 0; z-index: 1;
    background: var(--c-tile, #F7F6F2); text-align: left; padding: 9px 12px;
    font-weight: 700; color: var(--ink, #0B1220);
    border-bottom: 1px solid var(--line, #E6EAF2); white-space: nowrap;
}
.hp-tb td {
    padding: 9px 12px; border-bottom: 1px solid var(--line-2, #EFF2F8);
    color: var(--ink-2, #3A4457); vertical-align: top; line-height: 1.7;
    white-space: normal; overflow: visible; text-overflow: clip; max-width: none;
}
.hp-tb tbody tr:last-child td { border-bottom: none; }
.hp-tb tbody tr:hover td { background: #FAFBFC; }
.hp-tb td.strong { font-weight: 600; color: var(--ink, #0B1220); white-space: nowrap; }
.hp-tb .num { font-variant-numeric: tabular-nums; }

/* ---------- 评分条 ---------- */
.hp-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hp-bar .lb { flex: 0 0 96px; font-size: 12.8px; color: var(--ink-2, #3A4457); }
.hp-bar .tk { flex: 1; height: 8px; border-radius: 5px; background: #EEF1F5; overflow: hidden; }
.hp-bar .tk i { display: block; height: 100%; border-radius: 5px; transition: width .3s ease; }
.hp-bar .vl { flex: 0 0 40px; text-align: right; font-size: 12.8px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- 科室卡片 ---------- */
.hp-depts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hp-dept {
    position: relative; overflow: hidden; padding: 14px 16px 14px 20px; cursor: pointer;
    background: var(--card, #fff); border: 1px solid var(--line, #E6EAF2); border-radius: 10px;
    transition: transform .18s cubic-bezier(.22,1,.36,1), box-shadow .18s ease;
}
@media (hover: hover) and (pointer: fine) { .hp-dept:hover { transform: translateY(-2px); box-shadow: var(--sh-md); } }
.hp-dept.on { border-color: var(--primary, #085BFF); box-shadow: 0 0 0 3px rgba(8,91,255,.10); }
.hp-dept .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.hp-dept h4 { font-size: 14.5px; font-weight: 700; color: var(--ink, #0B1220); }
.hp-dept .meta { font-size: 11.5px; color: var(--ink-3, #8A93A6); margin: 2px 0 8px; }
.hp-dept .sc { font-size: 12px; color: var(--ink-2, #3A4457); }

/* ---------- 流程管道 ---------- */
.hp-pipe { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.hp-pipe .st { position: relative; padding: 12px 12px 12px 14px; background: #FAFBFC; border: 1px solid var(--line, #E6EAF2); border-radius: 10px; }
.hp-pipe .st .no { font-size: 11px; font-weight: 700; color: var(--primary, #085BFF); letter-spacing: .5px; }
.hp-pipe .st .nm { font-size: 13px; font-weight: 700; color: var(--ink, #0B1220); margin: 4px 0 6px; line-height: 1.4; }
.hp-pipe .st .ow { font-size: 11.5px; color: var(--ink-3, #8A93A6); line-height: 1.5; }
.hp-pipe .st::after { content: "›"; position: absolute; right: -9px; top: 50%; transform: translateY(-50%); color: var(--line-2, #EFF2F8); font-size: 16px; font-weight: 700; }
.hp-pipe .st:last-child::after { display: none; }

/* ---------- Agent 卡片 ---------- */
.hp-agent { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hp-agent .ag { padding: 16px; background: var(--card, #fff); border: 1px solid var(--line, #E6EAF2); border-radius: 12px; }
.hp-agent .ag .hd { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.hp-agent .ag .ic { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.hp-agent .ag .nm { font-size: 13.5px; font-weight: 700; color: var(--ink, #0B1220); }
.hp-agent .ag .sb { font-size: 11.5px; color: var(--ink-3, #8A93A6); margin-top: 1px; }

/* ---------- 五级课题 ---------- */
.hp-topic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hp-topic .tp { padding: 14px 16px; border: 1px solid var(--line, #E6EAF2); border-radius: 10px; background: var(--card, #fff); }
.hp-topic .tp .hd { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.hp-topic .tp .nm { font-size: 13.5px; font-weight: 700; color: var(--ink, #0B1220); }
.hp-topic .tp .cy { margin-left: auto; font-size: 11.5px; color: var(--ink-3, #8A93A6); }
.hp-topic .tp .it { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hp-topic .tp .it span { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: #F3F5F8; color: var(--ink-2, #3A4457); }

/* ---------- 指标格 ---------- */
.hp-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hp-kpi .k { padding: 12px 14px; background: #FAFBFC; border: 1px solid var(--line-2, #EFF2F8); border-radius: 10px; }
.hp-kpi .k .t { font-size: 11.5px; color: var(--ink-3, #8A93A6); }
.hp-kpi .k .v { font-size: 20px; font-weight: 800; color: var(--ink, #0B1220); font-variant-numeric: tabular-nums; margin-top: 2px; }

/* ==========================================================================
   功能化工作台（科室能力评估 / 临床发展方向图谱）
   —— 三栏：选择器 / 操作台 / 诊断；配滑杆、结果条、打卡矩阵
   ========================================================================== */

/* ---------- 三栏骨架 ---------- */
.hp-wb { display: grid; grid-template-columns: 250px minmax(0, 1fr) 330px; gap: 14px; align-items: start; }
@media (max-width: 1420px) { .hp-wb { grid-template-columns: 226px minmax(0, 1fr); } .hp-wb .hp-wb-r { grid-column: 1 / -1; } }
.hp-wb .hp-wb-m > .card + .card { margin-top: 14px; }

/* ---------- 选择器：搜索 + 过滤 + 列表 ---------- */
.hp-input {
    width: 100%; height: 34px; padding: 0 12px; font-size: 13px;
    color: var(--ink, #0B1220); background: #fff;
    border: 1px solid var(--line, #E6EAF2); border-radius: 9px; outline: none;
}
.hp-input:focus { border-color: var(--primary, #085BFF); box-shadow: 0 0 0 3px rgba(8,91,255,.1); }
.hp-input + .hp-fbar { margin-top: 10px; }
.hp-fbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.hp-chip {
    font-size: 12px; padding: 3px 10px; border-radius: 999px; cursor: pointer;
    background: #F3F5F8; color: var(--ink-2, #3A4457); border: 1px solid transparent; transition: all .15s;
}
.hp-chip:hover { background: #E9EEF8; color: var(--primary, #085BFF); }
.hp-chip.on { background: var(--primary-light, #EFF4FF); color: var(--primary, #085BFF); border-color: #D6E4FD; font-weight: 600; }

.hp-slist { max-height: 430px; overflow: auto; border: 1px solid var(--line, #E6EAF2); border-radius: 10px; }
.hp-srow { display: flex; align-items: center; gap: 8px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line-2, #EFF2F8); }
.hp-srow:last-child { border-bottom: none; }
.hp-srow:hover { background: #FAFBFC; }
.hp-srow.on { background: var(--primary-light, #EFF4FF); box-shadow: inset 3px 0 0 var(--primary, #085BFF); }
.hp-srow .nm { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--ink, #0B1220); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-srow .ty { flex: none; font-size: 11px; color: var(--ink-3, #8A93A6); }
.hp-srow .sc { flex: none; font-variant-numeric: tabular-nums; font-size: 12.6px; font-weight: 700; color: var(--ink-2, #3A4457); width: 26px; text-align: right; }

/* ---------- 操作台：滑杆 / 结果条 ---------- */
.hp-slider { display: grid; grid-template-columns: 92px minmax(0, 1fr) 44px; align-items: center; gap: 10px; margin-bottom: 9px; }
.hp-slider .lb { font-size: 12.6px; color: var(--ink-2, #3A4457); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-slider .lb em { font-style: normal; color: var(--ink-3, #8A93A6); font-size: 11px; margin-left: 3px; }
.hp-slider input[type=range] { width: 100%; height: 4px; accent-color: var(--primary, #085BFF); cursor: pointer; }
.hp-slider .vl { text-align: right; font-size: 12.8px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink, #0B1220); }
.hp-slider .vl i { font-style: normal; font-size: 11px; font-weight: 600; margin-left: 2px; }
.hp-slider .vl i.up { color: #0B7A57; }
.hp-slider .vl i.down { color: #C43A3E; }

.hp-scorebar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.hp-score { padding: 10px 12px; border: 1px solid var(--line, #E6EAF2); border-radius: 10px; background: #FAFBFC; }
.hp-score .t { font-size: 11.5px; color: var(--ink-3, #8A93A6); }
.hp-score .v { font-size: 22px; font-weight: 800; line-height: 1.25; color: var(--ink, #0B1220); font-variant-numeric: tabular-nums; }
.hp-score .v small { font-size: 11.5px; font-weight: 500; color: var(--ink-3, #8A93A6); margin-left: 3px; }
.hp-score .d { font-size: 11px; color: var(--ink-3, #8A93A6); }
.hp-score .d.up { color: #0B7A57; }
.hp-score .d.down { color: #C43A3E; }

/* ---------- 短板卡 ---------- */
.hp-gap { border: 1px solid #F5E3C8; background: #FFFAF3; border-radius: 9px; padding: 10px 12px; margin-bottom: 9px; }
.hp-gap .bt { display: flex; align-items: center; gap: 7px; font-size: 12.8px; font-weight: 700; color: #8A5A10; margin-bottom: 5px; }
.hp-gap .bc { font-size: 12.4px; color: var(--ink-2, #3A4457); line-height: 1.72; }
.hp-gap .bc b { color: var(--ink, #0B1220); }
.hp-ok { border: 1px solid #CFEEDD; background: #F2FBF6; border-radius: 9px; padding: 10px 12px; margin-bottom: 9px; }
.hp-ok .bt { font-size: 12.8px; font-weight: 700; color: #0B7A57; margin-bottom: 5px; }
.hp-ok .bc { font-size: 12.4px; color: var(--ink-2, #3A4457); line-height: 1.72; }

/* ---------- 推演器 ---------- */
.hp-calc { display: grid; grid-template-columns: 1fr 1fr 1.05fr; gap: 14px; }
@media (max-width: 1280px) { .hp-calc { grid-template-columns: 1fr 1fr; } .hp-calc .hp-calc-r { grid-column: 1 / -1; } }
.hp-field { margin-bottom: 12px; }
.hp-field:last-child { margin-bottom: 0; }
.hp-field > label { display: block; font-size: 12px; color: var(--ink-3, #8A93A6); margin-bottom: 6px; }
.hp-num {
    width: 100%; height: 34px; padding: 0 12px; font-size: 13.5px; font-weight: 700;
    font-variant-numeric: tabular-nums; color: var(--ink, #0B1220);
    background: #fff; border: 1px solid var(--line, #E6EAF2); border-radius: 9px; outline: none;
}
.hp-num:focus { border-color: var(--primary, #085BFF); box-shadow: 0 0 0 3px rgba(8,91,255,.1); }

.hp-verdict { border-radius: 10px; padding: 14px; border: 1px solid var(--line, #E6EAF2); background: #FAFBFC; }
.hp-verdict.hi { background: #F2FBF6; border-color: #CFEEDD; }
.hp-verdict.mid { background: #FFFAF3; border-color: #F5E3C8; }
.hp-verdict.lo { background: #F5F7FA; }
.hp-verdict .vd { font-size: 15px; font-weight: 800; color: var(--ink, #0B1220); margin-bottom: 6px; }
.hp-verdict .vr { font-size: 12.4px; color: var(--ink-2, #3A4457); line-height: 1.75; }
.hp-verdict .vr b { color: var(--ink, #0B1220); }
.hp-rule { list-style: none; margin-top: 10px; }
.hp-rule li { font-size: 12.2px; color: var(--ink-2, #3A4457); line-height: 1.9; display: flex; gap: 7px; align-items: flex-start; }
.hp-rule li i { flex: none; width: 15px; height: 15px; margin-top: 3px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-style: normal; font-weight: 700; }
.hp-rule li i.y { background: #CFEEDD; color: #0B7A57; }
.hp-rule li i.n { background: #EEF1F5; color: #8A93A6; }

/* ---------- 孵化清单：五步打卡矩阵 ---------- */
.hp-planlist { display: flex; flex-direction: column; gap: 12px; }
.hp-plan { border: 1px solid var(--line, #E6EAF2); border-radius: 11px; padding: 13px 14px; background: var(--card, #fff); }
.hp-plan .hd { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.hp-plan .hd .nm { font-size: 13.8px; font-weight: 700; color: var(--ink, #0B1220); }
.hp-plan .hd .mt { font-size: 11.5px; color: var(--ink-3, #8A93A6); }
.hp-plan .hd .rm { margin-left: auto; font-size: 12px; color: var(--ink-3, #8A93A6); cursor: pointer; }
.hp-plan .hd .rm:hover { color: #C43A3E; }
.hp-plan .pg { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.hp-plan .pg .tk { flex: 1; height: 7px; border-radius: 5px; background: #EEF1F5; overflow: hidden; }
.hp-plan .pg .tk i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--primary, #085BFF), #6FA0F7); transition: width .3s ease; }
.hp-plan .pg em { font-style: normal; font-size: 12.4px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2, #3A4457); }

.hp-track { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1100px) { .hp-track { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hp-chk {
    border: 1px solid var(--line, #E6EAF2); border-radius: 9px; padding: 9px 10px; cursor: pointer;
    background: #FAFBFC; transition: all .16s;
}
.hp-chk:hover { border-color: #C7D9F8; }
.hp-chk .no { font-size: 10.5px; font-weight: 700; color: var(--ink-3, #8A93A6); }
.hp-chk .tt { font-size: 12.2px; font-weight: 600; color: var(--ink-2, #3A4457); line-height: 1.45; margin-top: 3px; }
.hp-chk.done { background: #F2FBF6; border-color: #CFEEDD; }
.hp-chk.done .no, .hp-chk.done .tt { color: #0B7A57; }
.hp-chk.done .no::after { content: " ✓"; }

/* ---------- 图例 ---------- */
.hp-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.hp-legend span { font-size: 11.8px; color: var(--ink-2, #3A4457); display: inline-flex; align-items: center; gap: 6px; }
.hp-legend span i { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
    .hp-pipe { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hp-pipe .st::after { display: none; }
}
@media (max-width: 1100px) {
    .hp-depts, .hp-agent, .hp-topic, .hp-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hp-scorebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .hp-depts, .hp-agent, .hp-topic, .hp-kpi, .hp-pipe, .hp-calc { grid-template-columns: 1fr; }
}
