/* ===================================================================
   影像科信息管理系统 — 浅色医疗主题
   =================================================================== */
:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #17263c;
  --ink-2: #3a4d67;
  --muted: #7b8ca4;
  --line: #e2eaf3;
  --line-strong: #cfdbea;
  --brand: #1668b3;
  --brand-dark: #0f4f8a;
  --brand-soft: #e8f1fb;
  --teal: #0f9b8e;
  --ok: #1f9d55;
  --warn: #d98324;
  --danger: #d64545;
  --shadow-sm: 0 1px 2px rgba(23, 38, 60, .06), 0 1px 3px rgba(23, 38, 60, .05);
  --shadow-md: 0 8px 24px rgba(23, 38, 60, .08);
  --radius: 10px;
  --sidebar-w: 232px;
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

/* ---------------- 登录 ---------------- */
.login {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  min-height: 100vh;
}

.login-brand {
  position: relative;
  padding: 64px 56px;
  color: #eaf3ff;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(15, 155, 142, .35), transparent 60%),
    linear-gradient(150deg, #0c2138 0%, #123a5e 55%, #0f4f8a 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.login-brand::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 0 0 60px rgba(255, 255, 255, .04), 0 0 0 120px rgba(255, 255, 255, .03);
}

.brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 18px;
  margin-bottom: 28px;
  backdrop-filter: blur(4px);
}
.brand-mark.small {
  width: 38px; height: 38px; border-radius: 10px; font-size: 12px; margin: 0;
  background: rgba(255, 255, 255, .14);
}

.login-brand h1 { font-size: 30px; letter-spacing: .5px; }
.brand-sub { margin-top: 12px; color: #a9c6e4; font-size: 15px; }
.brand-points { margin-top: 34px; display: grid; gap: 12px; }
.brand-points li {
  position: relative;
  padding-left: 22px;
  color: #cfe2f7;
  font-size: 14px;
}
.brand-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 155, 142, .18);
}
.brand-foot { margin-top: 46px; color: #7fa2c6; font-size: 12px; }

.login-panel {
  display: grid;
  place-items: center;
  padding: 40px;
  background: var(--bg);
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px 32px 26px;
  box-shadow: var(--shadow-md);
}
.login-card h2 { font-size: 22px; }
.login-card .muted { margin-top: 6px; margin-bottom: 22px; color: var(--muted); }
.login-hint {
  margin-top: 18px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
  text-align: center;
}
.login-actions { margin-top: 14px; display: flex; justify-content: center; }

/* ---------------- 表单元素 ---------------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 6px; color: var(--ink-2); font-size: 13px; }
.field > span .req { color: var(--danger); margin-left: 2px; }

input[type="text"], input[type="password"], input[type="date"],
input[type="datetime-local"], input[type="number"], input[type="search"],
select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 104, 179, .12);
}
input:disabled, select:disabled, textarea:disabled {
  background: #f6f9fc; color: var(--muted);
}
textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
.form-error { color: var(--danger); font-size: 13px; margin: 4px 0 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 500;
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-danger { color: var(--danger); border-color: #f0c9c9; }
.btn-danger:hover { background: #fdf1f1; border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 6px; }
.btn-block { width: 100%; padding: 11px; }
.link-btn {
  border: 0; background: none; color: var(--brand);
  cursor: pointer; padding: 4px 6px; font-size: 13px;
}
.link-btn:hover { text-decoration: underline; }

.muted { color: var(--muted); }
.req { color: var(--danger); }

/* ---------------- 应用骨架 ---------------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  background: linear-gradient(180deg, #0e2740 0%, #10314f 100%);
  color: #cfdfef;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand { display: flex; gap: 10px; align-items: center; padding: 4px 6px 20px; }
.sidebar-title { color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .3px; }
.sidebar-tenant { color: #8fb0ce; font-size: 12px; margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-group { margin-top: 14px; padding: 0 10px 6px; color: #6f94b6; font-size: 11px; letter-spacing: 1px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #c6d9ea;
  text-decoration: none;
  font-size: 13.5px;
  transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a.active { background: rgba(22, 104, 179, .55); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.nav .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .45; }

.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 12px; display: grid; gap: 8px; }
.pwd-trigger { color: #8fb0ce; font-size: 12px; cursor: pointer; padding: 0 12px; }
.pwd-trigger:hover { color: #fff; }
.logout {
  border: 1px solid rgba(255, 255, 255, .16);
  background: transparent;
  color: #c6d9ea;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  font-size: 13px;
}
.logout:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar h1 { font-size: 18px; }
.topbar-sub { margin-top: 3px; color: var(--muted); font-size: 12px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.today { color: var(--muted); font-size: 12.5px; }
.user-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12.5px;
}

.view { padding: 22px 26px 40px; display: flex; flex-direction: column; gap: 18px; }

/* ---------------- 卡片 / 面板 ---------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 14px; }
.card-head .hint { color: var(--muted); font-size: 12px; }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }

/* ---------------- 指标卡 ---------------- */
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  right: -18px; top: -18px;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--brand-soft);
}
.stat .label { color: var(--muted); font-size: 12.5px; }
.stat .value { margin-top: 8px; font-size: 26px; font-weight: 600; letter-spacing: -.5px; }
.stat .value small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.stat.teal::after { background: #e3f5f2; }
.stat.warn::after { background: #fdf3e5; }
.stat.danger::after { background: #fdeeee; }
.stat.ok::after { background: #e8f6ee; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow: auto; max-width: 100%; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}
table.data thead th {
  position: sticky;
  top: 0;
  background: #f7fafd;
  color: var(--ink-2);
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  z-index: 1;
}
table.data tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid #eef3f9;
  color: var(--ink-2);
}
table.data tbody tr:hover { background: #f7fbff; }
table.data tbody tr.selected { background: var(--brand-soft); }
table.data tbody tr.clickable { cursor: pointer; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tfoot td {
  padding: 10px 12px;
  border-top: 2px solid var(--line);
  font-weight: 600;
  background: #fbfdff;
}
.empty {
  padding: 40px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}
.badge.gray { background: #eef2f7; color: #61728a; }
.badge.blue { background: #e6f1fc; color: #1668b3; }
.badge.teal { background: #e2f5f2; color: #0b7c72; }
.badge.green { background: #e8f6ee; color: #1f7a46; }
.badge.orange { background: #fdf1e2; color: #b26a15; }
.badge.red { background: #fdecec; color: #b53a3a; }

/* ---------------- 工具条 / 分页 ---------------- */
.toolbar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}
.toolbar .field { margin: 0; }
.toolbar .field > span { font-size: 12px; color: var(--muted); }
.toolbar input, .toolbar select { min-width: 132px; }
.toolbar input[type="search"] { min-width: 210px; }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}
.pager .btns { display: flex; gap: 6px; }

/* ---------------- 标签页 ---------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 12px; }
.tabs button {
  border: 0;
  background: none;
  padding: 12px 14px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-size: 13.5px;
}
.tabs button:hover { color: var(--brand); }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* ---------------- 登记页 ---------------- */
.register-layout { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid .span-2 { grid-column: span 2; }
.section-title {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
  margin: 4px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line);
}

.item-search { position: relative; }
.suggest {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  max-height: 260px;
  overflow: auto;
}
.suggest div {
  padding: 9px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.suggest div:hover, .suggest div.active { background: var(--brand-soft); }
.suggest small { color: var(--muted); }

.total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #fbfdff;
  border-top: 1px solid var(--line);
}
.total-bar .amount { color: var(--danger); font-size: 20px; font-weight: 600; }
.qty-btn {
  width: 24px; height: 24px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: #fff;
  cursor: pointer;
  line-height: 1;
  color: var(--ink-2);
}
.qty-btn:hover { border-color: var(--brand); color: var(--brand); }

/* ---------------- 报告页 ---------------- */
.report-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.tpl-tree { max-height: 520px; overflow: auto; }
.tpl-group { border-bottom: 1px solid var(--line); }
.tpl-group > .tpl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-2);
  background: #fbfdff;
}
.tpl-group > .tpl-head:hover { background: var(--brand-soft); }
.tpl-list { display: none; padding: 4px 0 8px; }
.tpl-group.open .tpl-list { display: block; }
.tpl-list button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 8px 14px 8px 26px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  position: relative;
}
.tpl-list button::before {
  content: "";
  position: absolute;
  left: 14px; top: 14px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
}
.tpl-list button:hover { background: var(--brand-soft); color: var(--brand-dark); }

.report-editor { display: grid; gap: 14px; }
.report-editor textarea { min-height: 150px; font-size: 14px; }
.patient-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px 16px;
  padding: 14px 18px;
  background: #fbfdff;
  border-bottom: 1px solid var(--line);
}
.patient-strip div span { display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 3px; }
.patient-strip div strong { font-weight: 600; font-size: 13.5px; }

.locked-banner {
  padding: 10px 16px;
  background: #e8f6ee;
  border-bottom: 1px solid #cbe9d7;
  color: #1f7a46;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------------- 图表 ---------------- */
.bars { display: flex; align-items: flex-end; gap: 14px; height: 170px; padding: 8px 4px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; height: 100%; }
.bar {
  width: 100%;
  max-width: 46px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #4a9bd8, var(--brand));
  min-height: 4px;
  transition: height .3s;
}
.bar.alt { background: linear-gradient(180deg, #35b8a8, var(--teal)); }
.bar-label { color: var(--muted); font-size: 11.5px; }
.bar-value { color: var(--ink-2); font-size: 12px; font-weight: 600; }

/* ---------------- 模态框 ---------------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 33, 52, .45);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 20px;
  animation: fade .15s ease;
}
.modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(9, 25, 43, .28);
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  animation: pop .18s ease;
}
.modal.wide { max-width: 760px; }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 15px; }
.modal-close { border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; line-height: 1; }
.modal-body { padding: 18px 20px; overflow: auto; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- Toast ---------------- */
.toast-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
}
.toast {
  min-width: 220px;
  max-width: 380px;
  padding: 11px 14px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  animation: slide .18s ease;
  border-left: 3px solid var(--brand);
}
.toast.success { border-left-color: var(--ok); }
.toast.error { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
@keyframes slide { from { transform: translateX(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- 打印 ---------------- */
#print-root { display: none; }
.report-paper {
  padding: 10mm 12mm;
  color: #000;
  font-family: "SimSun", "宋体", serif;
}
.report-paper h2 { text-align: center; font-size: 20px; letter-spacing: 4px; margin-bottom: 4px; }
.report-paper .paper-sub { text-align: center; font-size: 13px; margin-bottom: 14px; }
.report-paper .paper-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px 10px;
  font-size: 13px;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  padding: 8px 0;
}
.report-paper .paper-section { margin-top: 14px; font-size: 14px; line-height: 1.9; }
.report-paper .paper-section strong { display: block; margin-bottom: 2px; font-size: 14px; }
.report-paper .paper-text { white-space: pre-wrap; min-height: 70px; }
.report-paper .paper-sign {
  display: flex;
  justify-content: flex-end;
  gap: 40px;
  margin-top: 26px;
  font-size: 13px;
}

@media print {
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  .report-paper { padding: 0; }
  @page { size: A4; margin: 16mm 18mm; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .grid.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .register-layout { grid-template-columns: 1fr; }
  .report-layout { grid-template-columns: 260px 1fr; }
}
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .app { grid-template-columns: 64px 1fr; }
  .sidebar { padding: 12px 8px; }
  .sidebar-brand div:not(.brand-mark), .nav a span, .nav-group, .pwd-trigger { display: none; }
  .nav a { justify-content: center; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .grid.cols-5 { grid-template-columns: 1fr; }
  .report-layout { grid-template-columns: 1fr; }
  .patient-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .view, .topbar { padding-left: 14px; padding-right: 14px; }
}

/* ---------- 机构缴费：到期提醒条 ---------- */
.billing-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 18px 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
}
.billing-banner.warn {
  background: #fff7e6;
  border: 1px solid #ffd591;
  color: #ad6800;
}
.billing-banner.danger {
  background: #fff1f0;
  border: 1px solid #ffa39e;
  color: #a8071a;
}

/* ---------- 病人档案（检查清单 / 书写报告 / 报告审核 / 报告查询统一调阅） ---------- */
.modal.xwide { max-width: 1040px; }

/* 表格里的病人姓名：看起来像链接，但仍是按钮，键盘可达 */
.pf-link {
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--brand);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  cursor: pointer;
}
.pf-link:hover { color: var(--brand-dark); text-decoration-style: solid; }

.pf { display: flex; flex-direction: column; gap: 16px; }

.pf-hero {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #f7fbff, #ffffff);
}
.pf-hero-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-hero-name { font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.pf-hero-sub { color: var(--ink-2); font-size: 13.5px; }
.pf-chip {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
}
.pf-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12.5px;
}
.pf-merge-note {
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #fff7e6;
  color: #ad6800;
  font-size: 12px;
}

.pf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pf-stat {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}
.pf-stat-value { font-size: 17px; font-weight: 700; color: var(--brand-dark); }
.pf-stat-label { margin-top: 3px; color: var(--ink-2); font-size: 12.5px; }
.pf-stat-hint { margin-top: 2px; color: var(--muted); font-size: 11.5px; }

.pf-section { border-top: 1px dashed var(--line); padding-top: 12px; }
.pf-section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.pf-section-head h4 { font-size: 13px; color: var(--ink); letter-spacing: .5px; }
.pf-section-head h4::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 12px;
  margin-right: 7px;
  border-radius: 2px;
  background: var(--brand);
  vertical-align: -1px;
}

.pf-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 18px;
}
.pf-item { min-width: 0; }
.pf-label { display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 3px; }
.pf-item > .pf-value,
.pf-item > strong { display: block; font-size: 13.5px; word-break: break-all; }

.pf-status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
}

.pf-excerpt { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.table-wrap table.data tr.pf-row-focus td { background: #eef6ff; }

/* 报告详情弹窗正文 */
.rf-text { white-space: pre-wrap; line-height: 1.9; font-size: 13.5px; }
.rf-section + .rf-section { margin-top: 14px; }

@media (max-width: 1100px) {
  .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 病人主诉（登记页 / 报告详情 / 档案共用） ---------- */
.rf-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--brand);
  border-radius: 0 8px 8px 0;
  background: #f5f9fe;
  font-size: 13.5px;
}
.rf-summary-label { flex: none; color: var(--brand-dark); font-weight: 600; font-size: 12.5px; }
.rf-summary-text { color: var(--ink-2); line-height: 1.7; word-break: break-word; }
