* {
  box-sizing: border-box;
}

html {
  height: 100%;
  background: #eef3f8; /* 与 body 同色，减轻整页跳转白闪 */
}

/* 跨文档 View Transition：顶栏/侧栏在切模块时保持连续 */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.14s;
}

.header-wrap,
.admin-header {
  view-transition-name: app-header;
}

.workspace-tabs {
  view-transition-name: app-workspace-tabs;
}

.sidebar,
.admin-sidebar {
  view-transition-name: app-sidebar;
}

html.nav-settling .menu-item,
html.nav-settling .admin-menu-item,
html.nav-leaving .menu-item,
html.nav-leaving .admin-menu-item {
  transition: none !important;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  background: #eef3f8;
  color: #1f2937;
  min-height: 100%;
}

body.has-workspace-tabs {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.has-workspace-tabs .header-wrap,
body.has-workspace-tabs .workspace-tabs {
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header-wrap {
  border-bottom: 1px solid #d5dce6;
}

.sys-strip {
  height: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 12px;
  font-size: 12px;
  color: #5b6470;
  background: #f8fafc;
}

.main-nav {
  display: flex;
  align-items: center;
  height: var(--header-height, 52px);
  background: #0a6ebd;
  color: #fff;
  padding: 0;
  gap: 0;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 192px;
  height: 100%;
  padding: 0 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.logo-mark {
  width: 28px;
  height: 28px;
  background: #ffffff;
  color: #005fae;
  font-weight: 700;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.logo-text {
  font-size: 12px;
  font-weight: 700;
}

.main-tabs {
  flex: 1;
  display: flex;
  height: 100%;
  min-width: 0;
}

.main-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.1;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.main-tabs a:hover {
  background: #127dc9;
  color: #fff;
}

.main-tabs a.active {
  background: #1c8fe0;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: none;
  border-left-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

.main-tabs a.active:hover {
  background: #1c8fe0;
  color: #fff;
}

.main-tabs > a.active + a,
.main-tabs > a.active + .main-tab-promoted > a {
  border-left-color: rgba(255, 255, 255, 0.22);
}

.main-right {
  display: flex;
  align-items: stretch;
  margin-left: auto;
  height: 100%;
}

.store-switch {
  min-width: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.survey-entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.survey-icon {
  width: 18px;
  height: 18px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.95);
  color: #0a73c3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.qr-box {
  width: 18px;
  height: 18px;
  background: #fff;
  border: 1px solid #d7e0eb;
  border-radius: 2px;
}

.layout {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-width, 188px);
  min-width: var(--sidebar-width, 188px);
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #d5dce6;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 6px 8px 2px;
  border-bottom: 1px solid #eef2f6;
}

.sidebar-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #5b6470;
  cursor: pointer;
}

.sidebar-collapse-btn:hover {
  background: #eef2f6;
  color: #055aa7;
}

.sidebar-group-label {
  padding: 8px 12px 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #8a95a5;
  text-transform: none;
}

.sidebar-recent {
  --sidebar-recent-row-h: 28px;
  --sidebar-recent-label-h: 20px;
  border-bottom: 1px dashed #e5eaf0;
  padding: 2px 0 6px;
  margin-bottom: 2px;
  background: #f8fafc;
  flex: 0 0 auto;
  flex-shrink: 0;
  /* 标题 + 固定 3 行，数量变化不撑布局，也不被侧栏 flex 压扁 */
  min-height: calc(var(--sidebar-recent-label-h) + var(--sidebar-recent-row-h) * 3 + 8px);
  overflow: hidden;
}

.sidebar-recent .sidebar-group-label {
  padding: 6px 12px 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #9aa3b2;
  min-height: var(--sidebar-recent-label-h);
  box-sizing: border-box;
  flex-shrink: 0;
  writing-mode: horizontal-tb;
  white-space: nowrap;
}

.sidebar-recent-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 0 0 auto;
  min-height: calc(var(--sidebar-recent-row-h) * 3);
  overflow: hidden;
}

.sidebar-recent-item.menu-item {
  flex: 0 0 var(--sidebar-recent-row-h);
  min-height: var(--sidebar-recent-row-h);
  height: var(--sidebar-recent-row-h);
  max-height: var(--sidebar-recent-row-h);
  gap: 6px;
  padding: 0 10px 0 12px;
  margin-right: 6px;
  border-left-width: 0;
  border-bottom: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #5b6573;
  box-sizing: border-box;
  overflow: hidden;
}

.sidebar-recent-item--placeholder {
  visibility: hidden;
  pointer-events: none;
  margin-right: 6px;
  border: 0;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.sidebar-recent-item .menu-label {
  font-size: 12px;
  font-weight: 500;
}

.sidebar-recent-item .menu-icon {
  width: 18px;
  height: 18px;
  background: none;
  border-radius: 0;
  color: #475569;
}

.sidebar-recent-item .menu-icon .icon {
  width: 14px;
  height: 14px;
  color: inherit;
  stroke: currentColor;
}

.sidebar-recent-item:hover {
  background: #eef2f7;
  transform: none;
}

.sidebar-recent-item:hover .menu-icon {
  color: #1e293b;
}

.main-tabs-more.hidden,
.main-tabs-more.is-empty:not(.is-open) {
  display: none;
}

.main-tabs-more.is-empty.is-open {
  display: inline-flex;
}

.main-tabs-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 72px;
  height: 100%;
  padding: 0 10px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}

.main-tabs-more-btn:hover,
.main-tabs-more.is-open .main-tabs-more-btn {
  background: #127dc9;
  color: #fff;
}

.main-tabs-more-menu {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  min-width: 148px;
  z-index: 40;
  padding: 6px 0;
  background: #fff;
  border: 1px solid #d5dce6;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.main-tabs-more-menu a {
  display: block;
  min-width: 0;
  padding: 10px 14px;
  border: 0;
  color: #283442;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.main-tabs-more-menu a:hover,
.main-tabs-more-menu a.active {
  background: #e9f4ff;
  color: #055aa7;
}

.main-tabs-more-row {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.main-tabs-more-row a {
  flex: 1;
}

.main-tabs-more-pin {
  flex-shrink: 0;
  min-width: 40px;
  border: 0;
  border-left: 1px solid #eef2f6;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.main-tabs-more-pin:hover,
.main-tabs-more-pin.is-pinned {
  background: #e9f4ff;
  color: #055aa7;
}

.main-tab-promoted {
  display: inline-flex;
  align-items: stretch;
  height: 100%;
  position: relative;
}

.main-tab-promoted > a {
  padding-right: 22px;
}

.main-tab-unpin {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.main-tab-promoted > a.active + .main-tab-unpin {
  color: rgba(255, 255, 255, 0.9);
}

.main-tab-unpin:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.main-tab-promoted > a.active + .main-tab-unpin:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

html.sidebar-collapsed .sidebar,
html.sidebar-collapsed .admin-sidebar {
  width: var(--sidebar-collapsed-width, 56px);
  min-width: var(--sidebar-collapsed-width, 56px);
}

html.sidebar-collapsed .menu-label,
html.sidebar-collapsed .admin-menu-label,
html.sidebar-collapsed .sidebar-group-label,
html.sidebar-collapsed .sidebar-recent,
html.sidebar-collapsed .sidebar .sidebar-recent {
  display: none !important;
}

html.sidebar-collapsed .menu-item,
html.sidebar-collapsed .admin-menu-item {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
  gap: 0;
}

html.sidebar-collapsed .sidebar-toolbar {
  justify-content: center;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: #1e293b;
  text-decoration: none;
  padding: 0 12px;
  border-left: 3px solid transparent;
  border-bottom: 0;
  font-size: 13px;
  font-weight: 600;
}

.menu-icon {
  width: 22px;
  text-align: center;
  font-size: 16px;
  line-height: 1;
  color: #334155;
}

.menu-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.menu-item:hover {
  background: #f3f7fc;
}

.menu-item.active {
  background: #e9f4ff;
  border-left-color: #005fae;
  color: #005fae;
}

.menu-item.active .menu-icon,
.menu-item.active .menu-label {
  color: #005fae;
}

.icon-register::before { content: none; }

.icon-customer::before { content: none; }

.icon-message::before { content: none; }

.icon-sale::before { content: none; }

.icon-vaccine::before { content: none; }

.icon-card::before { content: none; }

.icon-record::before { content: none; }

.icon-lab::before { content: none; }

.icon-hospital::before { content: none; }

.icon-points::before { content: none; }

.icon-workbench::before,
.icon-todo::before,
.icon-schedule::before,
.icon-refund::before,
.icon-daily::before,
.icon-send::before,
.icon-template::before,
.icon-result::before,
.icon-reference::before,
.icon-inventory::before,
.icon-inbound::before,
.icon-outbound::before,
.icon-analytics::before,
.icon-report::before,
.icon-staff::before,
.icon-role::before,
.icon-settings::before { content: none; }

.content {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: var(--content-pad-y, 6px) var(--content-pad-x, 8px) 0;
  background: #fff;
  overflow: auto;
  overscroll-behavior: contain;
}

.content-full {
  padding-left: 12px;
}

.placeholder-text {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.panel {
  background: #fff;
  border: 1px solid #d8e4ef;
  margin-bottom: 10px;
  padding: 8px 10px;
}

.medical-panel {
  border: 0;
  margin-bottom: 0;
  padding: 0;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

input,
select {
  height: 30px;
  padding: 4px 10px;
  border: 1px solid #ccd5e1;
  border-radius: 3px;
  background: #fff;
  font-size: 13px;
  box-sizing: border-box;
}

/* 按钮默认可随内容增高，避免双行文案/列表项被压扁重叠 */
button {
  min-height: 30px;
  height: auto;
  padding: 4px 10px;
  border: 1px solid #005fae;
  border-radius: 3px;
  background: #005fae;
  color: #fff;
  font-size: 13px;
  box-sizing: border-box;
  line-height: 1.25;
  cursor: pointer;
}

button:hover {
  opacity: 0.92;
}

.ghost-btn {
  background: #fff;
  color: #1f2937;
  border-color: #ccd5e1;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-toolbar .toolbar-left input {
  width: 170px;
}

.query-select {
  width: 74px;
}

.query-input {
  width: 190px;
}

.query-btn {
  background: #fff;
  color: #374151;
  border-color: #cfd9e5;
  font-weight: 600;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  border-bottom: 1px solid #e3e9f1;
  padding: 0 4px;
  height: 18px;
  font-size: 12px;
  line-height: 1.15;
  text-align: left;
}

.table th {
  background: #f7f9fc;
  color: #4b5563;
  font-weight: 600;
}

.table tbody tr:hover {
  background: #edf6ff;
}

.table tbody tr.selected {
  background: #cfe8fa;
}

.table-dashboard {
  min-height: 0;
}

.table-dashboard th {
  background: #fff;
  border-bottom: 1px solid #dce6f1;
  font-size: 12px;
  padding: 4px 8px;
}

.table-dashboard td {
  font-size: 12px;
  padding-top: 2px;
  padding-bottom: 2px;
  line-height: 1.3;
  height: 24px;
}

.table-foot,
.current-info {
  margin-top: 6px;
  font-size: 13px;
  color: #4b5563;
}

.table-foot {
  text-align: right;
}

.current-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  border-top: 1px solid #e4edf5;
  padding-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.2px;
}

.info-settings-btn {
  min-width: 58px;
  height: 26px;
  padding: 0 10px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  width: 820px;
  background: #fff;
  border: 1px solid #c9d2de;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.customer-table-modal-card {
  width: 840px;
}

.modal-header {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid #e8eef5;
  font-weight: 600;
  background: #fff;
}

.modal-title {
  font-size: 15px;
  color: #111827;
}

/* modal-close-btn 尺寸与 hover 见 tokens.css .icon-btn-close */
.modal-close-btn {
  border: 0;
  background: transparent;
  color: var(--text-secondary, #4b5563);
}

.modal-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 18px 16px 12px;
}

.customer-table-modal-card .modal-body {
  gap: 14px;
  padding: 16px 18px 18px;
}

.modal-column h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #1f2937;
}

.modal-column select {
  width: 300px;
  height: 290px;
  border: 1px solid #96a3b6;
  border-radius: 0;
  padding: 4px;
}

.customer-table-modal-card .modal-column select {
  height: 320px;
}

.modal-transfer,
.modal-order {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.arrow-btn {
  width: 52px;
  min-width: 52px;
  height: 38px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #d8e1ea;
  background: #fff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.arrow-btn-primary {
  color: #1d9ae8;
}

.arrow-btn-dark {
  color: #111827;
}

.modal-size-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px 14px;
}

.modal-size-row label {
  font-size: 14px;
  font-weight: 600;
}

.modal-size-row select {
  width: 180px;
}

.modal-footer {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 0 0 18px;
}

.modal-footer button {
  width: 118px;
  height: 36px;
}

.modal-footer #confirmInfoSettingsBtn {
  background: #0b84d8;
  border-color: #0b84d8;
}

.modal-confirm-btn {
  background: var(--color-primary, #0a73c3);
  border-color: var(--color-primary, #0a73c3);
  color: #fff;
}

.modal-cancel-btn {
  border-color: #d4dde8;
}

/* ===== 收款弹窗（EVETSOFT 风格） ===== */
.checkout-modal-card {
  width: min(420px, calc(100vw - 24px));
  border: 1px solid #9cc5dc;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.checkout-modal-header .modal-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.checkout-modal-body {
  padding: 0;
  background: #fff;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.checkout-member-bar {
  padding: 8px 14px;
  background: #eef5fa;
  border-bottom: 1px solid #d7e6f2;
  font-size: 12px;
  color: #334155;
  line-height: 1.7;
}

.checkout-member-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.checkout-member-line strong {
  font-weight: 600;
  color: #1e293b;
}

.checkout-member-sub {
  color: #64748b;
  font-weight: 400;
}

.checkout-view-link {
  color: #0b84d8;
  margin-left: 4px;
  text-decoration: none;
}

.checkout-view-link:hover {
  text-decoration: underline;
}

.checkout-section-bar {
  background: #4a90c8;
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 0;
  letter-spacing: 2px;
}

.checkout-amount-panel {
  padding: 10px 14px 8px;
}

.checkout-amount-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
  color: #334155;
}

.checkout-money {
  font-weight: 600;
  color: #1e293b;
  font-size: 14px;
}

.checkout-actual-money {
  color: #0b84d8;
  font-size: 16px;
}

.checkout-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 8px 0;
}

.checkout-discount-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #475569;
}

.checkout-discount-label {
  min-width: 72px;
}

.checkout-inline-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.checkout-inline-field input {
  width: 72px;
  height: 26px;
  border: 1px solid #ccd5e1;
  border-radius: 2px;
  padding: 0 6px;
  font-size: 13px;
  box-sizing: border-box;
}

.checkout-remark-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
}

.checkout-remark-label {
  flex-shrink: 0;
  font-size: 13px;
  color: #334155;
  line-height: 28px;
}

.checkout-remark-row textarea {
  flex: 1;
  min-height: 56px;
  border: 1px solid #ccd5e1;
  border-radius: 2px;
  padding: 6px 8px;
  font-size: 13px;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
}

.checkout-pay-settle {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0;
  border-top: 1px solid #d7e6f2;
  min-height: 168px;
}

.checkout-pay-col,
.checkout-settle-col {
  display: flex;
  flex-direction: column;
  position: relative;
}

.checkout-pay-col {
  border-right: 1px solid #d7e6f2;
}

.checkout-col-head {
  background: #d6ebf7;
  color: #1e4a6e;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 0;
  border-bottom: 1px solid #c5dced;
}

.checkout-payments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px 28px;
  flex: 1;
}

.checkout-payment-row {
  display: grid;
  grid-template-columns: 1fr 88px 28px;
  gap: 6px;
  align-items: center;
}

.checkout-payment-row select,
.checkout-payment-row input {
  width: 100%;
  height: 28px;
  border: 1px solid #ccd5e1;
  border-radius: 2px;
  padding: 0 6px;
  font-size: 13px;
  box-sizing: border-box;
  background: #fff;
}

.checkout-fill-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ccd5e1;
  border-radius: 2px;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
}

.checkout-fill-btn:hover {
  background: #e0f2fe;
  color: #0b84d8;
  border-color: #93c5fd;
}

.checkout-pay-settings-btn {
  position: absolute;
  left: 8px;
  bottom: 6px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.checkout-pay-settings-btn:hover {
  color: #0b84d8;
}

.checkout-settlement-box {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.checkout-settle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #334155;
}

.checkout-settle-row strong {
  font-weight: 600;
  color: #1e293b;
}

.checkout-hint {
  color: #c0392b;
  font-size: 11px;
  margin: 0 10px 8px;
  line-height: 1.4;
}

.checkout-earn-points {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 14px 8px;
  font-size: 12px;
}

.checkout-modal-footer {
  justify-content: center;
  gap: 12px;
}

.checkout-summary {
  display: none;
}

.checkout-balance-row {
  display: none;
}

.new-record-modal-card {
  width: 1280px;
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.new-record-body {
  padding: 6px 10px 4px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
}

.new-record-top {
  display: block;
  margin-bottom: 0;
  flex-shrink: 0;
}

.new-record-basic-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.42fr) minmax(360px, 1.12fr) 96px 108px;
  gap: 0;
  min-height: 151px;
  border: 1px solid #9ecae3;
  background: #eef7fc;
  padding: 0;
  overflow: hidden;
}

.info-panel {
  border: 0;
  border-right: 1px solid #c5dff0;
  background: #eef7fc;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.info-panel .panel-head {
  height: 22px;
  background: #5aaece;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #4a9fbf;
  flex-shrink: 0;
}

.info-panel .panel-body {
  display: grid;
  gap: 0;
  padding: 5px 8px 6px;
  flex: 1;
  align-content: start;
  background: #eef7fc;
}

.pet-panel-body {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.customer-panel-body {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-panel .kv {
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 1px 0;
}

.info-panel .kv.kv-empty {
  visibility: hidden;
  min-height: 24px;
}

.info-panel .kv span {
  color: #5b6b7c;
  font-size: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.info-panel .kv b {
  color: #111827;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.new-record-photo {
  border: 0;
  border-right: 1px solid #c5dff0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.new-record-photo span {
  font-size: 11px;
  color: #94a3b8;
  writing-mode: horizontal-tb;
}

.new-record-ops {
  border: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  min-height: 0;
}

.new-record-ops-btn {
  height: 24px;
  padding: 0 6px;
  font-size: 11px;
  white-space: nowrap;
  width: 100%;
  border: 1px solid #7eb8d4;
  background: #fff;
  color: #1f2937;
  border-radius: 2px;
  cursor: pointer;
}

.new-record-ops-btn:hover {
  background: #f0f9ff;
}

.new-record-ops-dropdown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.new-record-ops-dropdown .ops-caret {
  font-size: 10px;
  color: #64748b;
  line-height: 1;
}

.new-record-ops .switch-lite {
  align-self: center;
  margin-bottom: 2px;
}

.switch-lite {
  display: inline-flex;
  align-items: center;
}

.switch-lite input {
  display: none;
}

.switch-lite span {
  width: 34px;
  height: 16px;
  background: #d7e6f3;
  border-radius: 999px;
  display: inline-block;
  position: relative;
}

.switch-lite span::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #9fc0da;
  position: absolute;
  top: 1px;
  left: 1px;
}

.new-record-tabs {
  margin-top: 4px;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid #d7dde5;
  border-bottom: 0;
  background: #efefef;
  padding: 0 4px;
  flex-shrink: 0;
}

.new-record-tabs span {
  min-width: 44px;
  height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #1f2937;
  white-space: nowrap;
}

.new-record-tabs span[data-tab] {
  cursor: pointer;
}

.new-record-tabs span.active {
  background: #4eaeca;
  color: #fff;
  font-weight: 700;
}

.new-record-tabs span.muted {
  color: #a3a3a3;
}

.new-record-tab-panel.hidden {
  display: none;
}

.new-record-placeholder {
  margin-top: 6px;
  border: 1px solid #b9d8ec;
  padding: 6px;
  background: #fbfeff;
}

.new-record-placeholder .placeholder-body {
  margin-top: 6px;
  border: 1px solid #dbe6f2;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 12px;
}

.new-record-lab-sheet {
  margin-top: 6px;
  border: 1px solid #b9d8ec;
  padding: 6px;
  background: #fbfeff;
}

.lab-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.lab-toolbar .toolbar-right-btn {
  margin-left: auto;
}

.lab-toolbar button {
  height: 24px;
  font-size: 11px;
  padding: 0 10px;
}

.lab-main {
  display: grid;
  grid-template-columns: 1fr 1.9fr;
  gap: 10px;
}

.lab-main.imaging-main {
  grid-template-columns: 1fr 1.75fr;
}

.lab-left,
.lab-right {
  border: 1px solid #dbe6f2;
  background: #fff;
  min-height: 230px;
}

.lab-table-head {
  display: grid;
  background: #f3f5f7;
  border-bottom: 1px solid #e2e7ee;
}

.lab-table-head span {
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #374151;
  font-weight: 700;
  border-right: 1px solid #e2e7ee;
}

.lab-table-head span:last-child {
  border-right: 0;
}

.lab-table-head.three {
  grid-template-columns: 1fr 1fr 0.8fr;
}

.lab-table-head.seven {
  grid-template-columns: 0.7fr 1.2fr 0.7fr 1fr 1fr 0.8fr 0.5fr;
}

.lab-empty {
  min-height: 198px;
}

.imaging-right {
  padding: 0;
}

.imaging-preview {
  min-height: 226px;
  border: 1px solid #c8d4e1;
  margin: 0;
  background: #fff;
}

.lab-analysis {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px;
  align-items: start;
}

.lab-analysis-title {
  font-size: 22px;
  color: #1f2937;
  font-weight: 700;
  line-height: 1;
  padding-top: 4px;
}

.lab-analysis textarea {
  width: 100%;
  min-height: 84px;
  border: 1px solid #d8e3ef;
  resize: vertical;
  font-size: 11px;
  padding: 6px 8px;
}

.new-record-sheet {
  margin-top: 0;
  border: 1px solid #b9d8ec;
  border-top: 0;
  padding: 0;
  background: #fbfeff;
  flex: 1;
  min-height: 0;
}

.new-record-tab-panel:not(.hidden) {
  display: flex;
  flex-direction: column;
}

.new-record-exam-sheet,
.new-record-lab-sheet,
.new-record-placeholder {
  margin-top: 0;
  border-top: 0;
}

/* 基础信息 - 左侧蓝标 + 右侧内容 */
.sheet-section {
  display: grid;
  grid-template-columns: 132px 1fr;
  border-bottom: 1px solid #dceaf4;
  min-height: 44px;
}

.sheet-section:last-child {
  border-bottom: 0;
}

.sheet-section-title {
  background: #2ea7d8;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px 6px;
  line-height: 1.3;
  border-right: 1px solid #2596c5;
}

.sheet-section-body {
  padding: 5px 8px 6px;
  background: #fff;
  min-width: 0;
}

.sheet-section-compact .sheet-section-body {
  display: flex;
  align-items: center;
  padding: 4px 8px;
}

.sheet-section-tall .sheet-section-title {
  align-items: flex-start;
  padding-top: 8px;
}

.sheet-feeding-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 4px;
}

.sheet-feeding-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #334155;
  white-space: nowrap;
}

.sheet-feeding-item input[type="checkbox"] {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.sheet-immune-row {
  display: grid;
  grid-template-columns: 100px 1fr 1fr;
  gap: 8px;
  align-items: center;
  font-size: 10px;
  color: #334155;
}

.sheet-immune-row label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.sheet-immune-row input[type="checkbox"] {
  width: 12px;
  height: 12px;
}

.sheet-area-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d8e3ef;
  resize: vertical;
  font-size: 10px;
  padding: 5px 7px;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  color: #1f2937;
  background: #fff;
}

.blue-row-title {
  background: #2ea7d8;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  height: 20px;
  font-size: 11px;
  font-weight: 700;
  width: 132px;
  white-space: nowrap;
}

.blue-row-title-ghost {
  visibility: hidden;
}

.sheet-double-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e8f0f6;
}

.sheet-col {
  border: 0;
  padding: 2px;
  min-height: 66px;
}

.sheet-mini-row .sheet-col {
  min-height: 36px;
}

.sheet-vaccine .sheet-col {
  min-height: 112px;
}

.sheet-single-row {
  border: 0;
  border-bottom: 1px solid #e8f0f6;
  padding: 2px 2px 4px;
  margin-bottom: 4px;
}

.sheet-line-input {
  width: 100%;
  height: 23px;
  border: 1px solid #d8e3ef;
  font-size: 10px;
  padding: 0 6px;
  background: #fff;
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  color: #334155;
  margin-top: 4px;
  flex-wrap: wrap;
}

.vaccine-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 6px;
  margin-top: 3px;
  align-items: center;
}

.vaccine-grid.four {
  grid-template-columns: 1.2fr 1fr 0.8fr 1fr;
}

.vaccine-grid.header span {
  height: 19px;
  background: #ebf6fb;
  border: 1px solid #d4e4ef;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #334155;
  font-weight: 600;
}

.vaccine-grid input,
.vaccine-grid select {
  width: 100%;
  height: 21px;
  border: 1px solid #d8e3ef;
  font-size: 10px;
  background: #fff;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 3px;
  font-size: 10px;
  color: #334155;
}

.checkbox-row.tight {
  gap: 6px;
}

.checkbox-row.dense {
  margin-top: 3px;
}

.checkbox-row input,
.radio-row input,
.vaccine-grid input[type="checkbox"] {
  width: 12px;
  height: 12px;
}

.checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.sheet-inline-input {
  flex: 1;
  min-width: 48px;
  height: 21px;
  border: 1px solid #d8e3ef;
  font-size: 10px;
  padding: 0 6px;
  background: #fff;
}

.chief-field-wrap {
  position: relative;
}

.chief-field-wrap textarea {
  width: 100%;
  min-height: 56px;
  border: 1px solid #d8e3ef;
  resize: vertical;
  font-size: 10px;
  padding: 5px 7px 30px;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  color: #1f2937;
  background: #fff;
}

.chief-actions {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: flex;
  gap: 6px;
}

.chief-action-btn {
  height: 22px;
  padding: 0 10px;
  font-size: 10px;
  white-space: nowrap;
  background: #fff;
  border: 1px solid #c5d9e8;
  color: #1f2937;
  cursor: pointer;
}

.chief-action-btn:hover {
  background: #f0f9ff;
}

.new-record-exam-sheet {
  margin-top: 6px;
  border: 1px solid #b9d8ec;
  padding: 6px;
  background: #fbfeff;
}

.exam-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
  border-bottom: 1px solid #e8f0f6;
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.exam-left,
.exam-right-chart,
.exam-card,
.exam-col,
.exam-water-eval,
.exam-textarea-col {
  border: 1px solid #dbe6f2;
  padding: 4px;
  background: #fff;
}

.exam-vitals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 4px;
}

.exam-vitals-grid.header span {
  height: 20px;
  background: #ebf6fb;
  border: 1px solid #d4e4ef;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.exam-vitals-grid input {
  height: 22px;
  border: 1px solid #d8e3ef;
  font-size: 10px;
  padding: 0 6px;
}

.chart-placeholder,
.card-placeholder {
  height: 110px;
  border: 1px dashed #cddbe8;
  color: #7a8a9b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.exam-mid-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}

.exam-bottom {
  border-top: 1px solid #e8f0f6;
  padding-top: 6px;
}

.exam-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 6px;
}

.exam-water-eval {
  margin-bottom: 6px;
}

.exam-textarea-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 8px;
}

.exam-textarea-col textarea {
  width: 100%;
  min-height: 110px;
  border: 1px solid #d8e3ef;
  resize: vertical;
  font-size: 10px;
  padding: 5px 7px;
}

.exam-action-row {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.exam-action-row button {
  height: 22px;
  font-size: 10px;
  padding: 0 8px;
}

.new-record-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 4px 0 10px;
}

.new-record-footer button {
  width: 104px;
  height: 30px;
}

.dashboard-top-panel {
  min-height: 500px;
}

.dashboard-bottom-panel {
  min-height: 260px;
}

.customer-stage {
  display: flex;
  flex-direction: column;
  min-height: 430px;
}

.customer-stage-spacer {
  flex: 1;
}

.split {
  display: flex;
  gap: 12px;
}

.split-left {
  width: 240px;
}

.split-right {
  flex: 1;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #e5ecf5;
}

.list li {
  padding: 10px;
  border-bottom: 1px solid #eef3f9;
  cursor: pointer;
}

.list li:hover,
.list li.selected {
  background: #e7f2ff;
}

.medical-page {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: calc(100vh - 76px);
  border: 1px solid #d5e3f0;
  padding: 2px;
  background: #fff;
}

.medical-hidden-controls {
  display: none;
}

.medical-topline {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.medical-stage-header {
  height: 24px;
  border-bottom: 1px solid #d8e5f2;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.history-topline {
  width: 296px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 20px;
}

.history-topline .icon-refresh--compact {
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  flex-shrink: 0;
  margin-top: -3px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.history-topline .icon-refresh--compact .icon {
  width: 12px;
  height: 12px;
}

.stage-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: #4b5563;
  border: 0;
  background: transparent;
}

.stage-tabs .active {
  color: #0f82cf;
  border: 1px solid #94c8ef;
  background: #f3fbff;
  height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 2px;
  font-weight: 700;
}

.stage-tabs span {
  height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 0;
  color: #4b5563;
  font-weight: 600;
}

.stage-tabs span:last-child {
  border: 0;
}

.stage-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stage-actions button {
  height: 20px;
  min-width: 56px;
  padding: 0 6px;
  font-size: 10px;
  border-color: #d5e1ed;
  color: #3f4d5f;
  background: #fff;
  border-radius: 2px;
}

.stage-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 600;
}

.stage-icon-btn::before,
.stage-icon-btn[class*="icon-"]::before {
  content: none;
}

.stage-actions .icon-btn {
  width: 20px;
  min-width: 20px;
  padding: 0;
}

.medical-stage-body {
  display: flex;
  gap: 4px;
  min-height: 0;
  flex: 1;
}

.record-history {
  width: 296px;
  border: 1px solid #d2e1ee;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.record-history-header {
  height: 20px;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid #ffffff;
  border-radius: 4px;
  color: #1a7dc8;
  font-size: 12px;
  font-weight: 700;
  background: #fff;
}

.record-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 0 0 175px;
  overflow-y: auto;
  border-top: 1px solid #e6eef6;
  border-bottom: 1px solid #e6eef6;
}

.record-history-list li {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 8px;
  border-bottom: 1px solid #eef4fb;
  font-size: 10px;
  cursor: pointer;
}

.record-history-list li .dot {
  color: #1c80ca;
  font-size: 8px;
}

.record-history-list li .time {
  color: #0f172a;
  white-space: nowrap;
  font-weight: 600;
}

.record-history-list li .record-status-tag {
  color: #1c80ca;
  white-space: nowrap;
  font-weight: 700;
  flex-shrink: 0;
}

.record-history-list li .doctor {
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.record-history-list li .title {
  color: #4b5563;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-history-list li.selected,
.record-history-list li:hover {
  background: #dbeffd;
}

.record-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding: 6px;
  border-bottom: 1px solid #eaf1f8;
}

.record-actions button {
  height: 20px;
  padding: 0 4px;
  font-size: 10px;
  color: #3f4d5f;
  border-color: #d8e2ec;
  background: #fff;
  border-radius: 2px;
}

.record-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 600;
}

.record-icon-btn::before,
.record-icon-btn[class*="icon-"]::before {
  content: none;
}

.record-actions .icon-btn {
  width: 20px;
  min-width: 20px;
  padding: 0;
}

.record-actions-more {
  position: relative;
  display: flex;
  justify-content: center;
}

.prescription-list-menu {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  z-index: 30;
  min-width: 132px;
  padding: 4px 0;
  border: 1px solid #c9d2de;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.prescription-list-menu.hidden {
  display: none;
}

.prescription-list-menu-item {
  width: 100%;
  height: 28px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #1f2937;
  cursor: pointer;
  text-align: left;
}

.prescription-list-menu-item:hover {
  background: #edf5ff;
}

.prescription-list-menu-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #6b7280;
}

.prescription-list-menu-icon .icon {
  display: block;
}

.record-actions.secondary {
  border-bottom: 0;
  padding: 0;
}

.record-subtable {
  margin: 0 6px 6px;
  border: 1px solid #d8e2ec;
  background: #fff;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 120px;
}

.record-subtable-head {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  border-bottom: 1px solid #e2e7ee;
}

.record-subtable-head span {
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3f5f7;
  border-right: 1px solid #e2e7ee;
  color: #374151;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.record-subtable-head span:last-child {
  border-right: 0;
}

.record-subtable-body {
  flex: 1;
  background: #fff;
  overflow-y: auto;
}

.record-subtable-empty {
  padding: 16px 8px;
  text-align: center;
  color: #94a3b8;
  font-size: 10px;
}

.record-subtable-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  min-height: 22px;
  border-bottom: 1px solid #eef4fb;
  font-size: 10px;
  color: #1f2937;
  cursor: pointer;
}

.record-subtable-row span {
  padding: 2px 4px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-right: 1px solid #eef4fb;
}

.record-subtable-row span:last-child {
  border-right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.record-subtable-row.selected,
.record-subtable-row:hover {
  background: #dbeffd;
}

.record-subtable-settled {
  width: 12px;
  height: 12px;
  margin: 0;
  flex-shrink: 0;
  pointer-events: none;
}

.record-tab-panel .record-detail-text.has-prescription-preview {
  flex: 0 0 42%;
  min-height: 80px;
}

.record-prescription-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #d8e5f2;
  border-top: 0;
  background: #fff;
}

.record-prescription-preview.hidden {
  display: none;
}

.record-prescription-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.record-prescription-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 10px;
}

.record-prescription-table th,
.record-prescription-table td {
  border: 1px solid #e2e7ee;
  padding: 4px 5px;
  text-align: center;
  vertical-align: top;
  line-height: 1.35;
  overflow: hidden;
  word-break: break-word;
  white-space: normal;
}

.record-prescription-table th:nth-child(1),
.record-prescription-table td:nth-child(1) {
  width: 8%;
  min-width: 72px;
}

.record-prescription-table th:nth-child(2),
.record-prescription-table td:nth-child(2) {
  width: 16%;
  min-width: 130px;
  text-align: left;
}

.record-prescription-table th:nth-child(3),
.record-prescription-table td:nth-child(3) {
  width: 9%;
  min-width: 72px;
}

.record-prescription-table th:nth-child(4),
.record-prescription-table td:nth-child(4),
.record-prescription-table th:nth-child(5),
.record-prescription-table td:nth-child(5),
.record-prescription-table th:nth-child(6),
.record-prescription-table td:nth-child(6),
.record-prescription-table th:nth-child(7),
.record-prescription-table td:nth-child(7),
.record-prescription-table th:nth-child(8),
.record-prescription-table td:nth-child(8),
.record-prescription-table th:nth-child(9),
.record-prescription-table td:nth-child(9),
.record-prescription-table th:nth-child(10),
.record-prescription-table td:nth-child(10) {
  white-space: nowrap;
}

.record-prescription-table th:nth-child(11),
.record-prescription-table td:nth-child(11) {
  width: 9%;
  min-width: 72px;
}

.record-prescription-table th:nth-child(12),
.record-prescription-table td:nth-child(12) {
  width: 10%;
  min-width: 64px;
}

.record-prescription-table th {
  background: #f3f5f7;
  color: #374151;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: 0 1px 0 #e2e7ee;
}

.record-prescription-table tbody tr:nth-child(even) {
  background: #fafbfd;
}

/* 抄写处方弹窗 */
.copy-prescription-modal-card {
  width: 760px;
  max-width: calc(100vw - 40px);
  display: flex;
  flex-direction: column;
}

.copy-prescription-titlebar {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border-bottom: 1px solid #e8eef5;
  background: #fff;
}

.copy-prescription-title-text {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.copy-prescription-close-btn {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #4b5563;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.copy-prescription-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid #eef4fb;
  font-size: 11px;
  color: #1f2937;
}

.copy-prescription-meta-left {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  min-width: 0;
}

.copy-prescription-link-btn {
  height: 24px;
  padding: 0 10px;
  font-size: 11px;
  white-space: nowrap;
}

.copy-prescription-table-wrap {
  max-height: 360px;
  overflow: auto;
  padding: 0 12px;
}

.copy-prescription-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.copy-prescription-table th,
.copy-prescription-table td {
  border: 1px solid #e2e7ee;
  padding: 6px 8px;
  text-align: center;
}

.copy-prescription-table th {
  background: #f3f5f7;
  color: #374151;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

.copy-prescription-table .copy-prescription-name {
  text-align: left;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-prescription-row-disabled {
  color: #94a3b8;
  background: #f8fafc;
}

.copy-prescription-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 14px;
  border-top: 1px solid #eef4fb;
}

.copy-prescription-footer-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.copy-prescription-notice {
  font-size: 11px;
  color: #64748b;
}

.copy-prescription-assistant-toggle {
  font-size: 11px;
  color: #374151;
}

.copy-prescription-footer-center {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  color: #374151;
  white-space: nowrap;
}

.copy-prescription-price-option {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.copy-prescription-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.copy-prescription-footer-actions button {
  min-width: 72px;
  height: 30px;
}

/* 抄写其他处方弹窗 */
.copy-other-prescription-modal-card {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

.copy-other-prescription-titlebar {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 10px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.copy-other-prescription-title-text {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.copy-other-prescription-winbtns {
  display: inline-flex;
  gap: 2px;
}

.copy-other-prescription-winbtn {
  width: 28px;
  height: 22px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.copy-other-prescription-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid #eef4fb;
  background: #fff;
}

.copy-other-prescription-toolbtn {
  width: 22px;
  height: 22px;
  border: 1px solid #d8e2ec;
  background: #fff;
  color: #374151;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.copy-other-prescription-date-label {
  font-size: 11px;
  color: #374151;
  margin-left: 4px;
}

.copy-other-prescription-date-input {
  width: var(--date-input-width, 132px);
  min-width: var(--date-input-width, 132px);
  height: 24px;
  border: 1px solid #d1d5db;
  border-radius: 2px;
  font-size: 11px;
  padding: 0 6px;
  box-sizing: border-box;
}

.copy-other-prescription-date-sep {
  font-size: 11px;
  color: #6b7280;
}

.copy-other-prescription-search-btn {
  width: 24px;
  height: 24px;
  border: 1px solid #d8e2ec;
  background: #fff;
  cursor: pointer;
}

.copy-other-prescription-orders-wrap {
  flex: 0 0 220px;
  min-height: 160px;
  max-height: 240px;
  overflow: auto;
  border-bottom: 1px solid #eef4fb;
}

.copy-other-prescription-items-wrap {
  flex: 1;
  min-height: 180px;
  overflow: auto;
}

.copy-other-prescription-orders-table,
.copy-other-prescription-items-table {
  width: 100%;
  font-size: 11px;
}

.copy-other-prescription-orders-table th,
.copy-other-prescription-items-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f4f6;
  white-space: nowrap;
}

.copy-other-prescription-orders-table tbody tr {
  cursor: pointer;
}

.copy-other-prescription-orders-table tbody tr.selected {
  background: #dbeffd;
}

.copy-other-prescription-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid #eef4fb;
  background: #fff;
}

.copy-other-prescription-footer-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.copy-other-prescription-notice {
  font-size: 11px;
  color: #6b7280;
}

.copy-other-prescription-assistant-toggle {
  font-size: 11px;
  color: #374151;
  white-space: nowrap;
}

.copy-other-prescription-footer-center {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: #374151;
}

.copy-other-prescription-price-option {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.copy-other-prescription-footer-actions {
  display: flex;
  gap: 8px;
}

.copy-other-prescription-footer-actions button {
  min-width: 72px;
  height: 30px;
}

/* 打印宠物标签弹窗 */
.pet-label-print-modal-card {
  width: 360px;
  max-width: calc(100vw - 24px);
  overflow: hidden;
}

.pet-label-print-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 0;
}

.pet-label-print-title-icon {
  font-size: 18px;
  line-height: 1;
}

.pet-label-print-close-btn {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #4b5563;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.pet-label-print-body {
  position: relative;
  padding: 18px 24px 8px;
}

.pet-label-print-settings-btn {
  position: absolute;
  top: 8px;
  right: 16px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 16px;
  cursor: pointer;
}

.pet-label-print-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.pet-label-print-label {
  font-size: 12px;
  color: #374151;
  text-align: right;
}

.pet-label-print-select {
  height: 30px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 12px;
  padding: 0 8px;
  background: #fff;
}

.pet-label-print-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px 18px;
}

.pet-label-print-footer button {
  min-width: 88px;
  height: 32px;
}

.record-detail {
  flex: 1;
  border: 1px solid #d2e1ee;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.stage-followup-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid #dce7f2;
  background: #f8fbfd;
}

.stage-followup-form {
  flex: 1;
  overflow: auto;
  padding: 8px 10px 12px;
}

.stage-fu-invalid-reasons:not(.is-active) {
  opacity: 0.45;
}

.record-followup-detail.hidden {
  display: none;
}

.detail-head-title {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2ea7d8;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-bottom: 1px solid #2396c5;
}

.record-meta-bar {
  min-height: 28px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 6px 0;
  padding: 5px 8px 4px;
  border: 1px solid #dce7f2;
  border-bottom: 1px solid #dce7f2;
  background: #fff;
  font-size: 10px;
  color: #2f3d4f;
}

.record-tabs {
  height: 24px;
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid #dfeaf4;
  border-top: 0;
  margin: 0 6px;
  background: #fff;
}

.record-tabs span {
  min-width: 44px;
  height: 100%;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #4b5563;
  border-right: 1px solid #e8eef5;
  cursor: pointer;
}

.record-tabs span.active {
  background: #eff7ff;
  color: #0b6fb6;
  font-weight: 700;
}

.record-tab-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0 6px 6px;
  overflow: hidden;
}

.record-tab-panel.hidden {
  display: none;
}

.record-tab-panel .record-detail-text {
  flex: 1;
  margin: 0;
  min-height: 0;
}

.record-detail-text {
  flex: 1;
  resize: none;
  border: 1px solid #d8e5f2;
  border-top: 0;
  border-radius: 0;
  margin: 0 6px 6px;
  padding: 6px 8px;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.6;
  color: #1f2937;
  white-space: pre-wrap;
}

/* 病历详情 - 化验分栏 */
.record-lab-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 210px 1fr;
  border: 1px solid #d8e5f2;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.record-lab-sessions {
  border-right: 1px solid #dce7f2;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.record-lab-session-head {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  background: #f3f5f7;
  border-bottom: 1px solid #e2e7ee;
  font-size: 10px;
  font-weight: 700;
  color: #374151;
}

.record-lab-session-head span {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #e2e7ee;
}

.record-lab-session-head span:last-child {
  border-right: 0;
}

.record-lab-session-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.record-lab-session-item {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  border-bottom: 1px solid #e8eef5;
  font-size: 10px;
  color: #1f2937;
  cursor: pointer;
}

.record-lab-session-item span {
  padding: 5px 3px;
  border-right: 1px solid #e8eef5;
  text-align: center;
  line-height: 1.3;
}

.record-lab-session-item span:last-child {
  border-right: 0;
}

.record-lab-session-item:hover {
  background: #f0f7ff;
}

.record-lab-session-item.active {
  background: #d9ecff;
}

.record-lab-results {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.record-lab-toolbar {
  display: flex;
  gap: 8px;
  padding: 4px 6px;
  border-bottom: 1px solid #e8eef5;
  flex-shrink: 0;
}

.record-lab-btn {
  height: 22px;
  font-size: 10px;
  padding: 0 10px;
}

.record-lab-table-wrap {
  flex: 1;
  overflow: auto;
  min-height: 0;
}

.record-lab-table {
  width: 100%;
  font-size: 10px;
  border-collapse: collapse;
  table-layout: fixed;
}

.record-lab-table th,
.record-lab-table td {
  border: 1px solid #e2e7ee;
  padding: 3px 4px;
  text-align: center;
  word-break: break-all;
}

.record-lab-table thead th {
  background: #f3f5f7;
  font-weight: 700;
  color: #374151;
  position: sticky;
  top: 0;
  z-index: 1;
}

.record-lab-table tbody tr:nth-child(even) {
  background: #f8fbff;
}

.record-lab-table th:nth-child(1),
.record-lab-table td:nth-child(1) {
  width: 36px;
}

.record-lab-table th:nth-child(2),
.record-lab-table td:nth-child(2) {
  text-align: left;
}

.record-lab-analysis {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 6px;
  padding: 4px 6px 6px;
  border-top: 1px solid #e8eef5;
  align-items: start;
  flex-shrink: 0;
  height: 80px;
}

.record-lab-analysis-label {
  font-size: 11px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.4;
}

.record-lab-analysis-input {
  width: 100%;
  min-height: 70px;
  height: 70px;
  resize: none;
  border: 1px solid #d8e3ef;
  font-size: 10px;
  padding: 4px 6px;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  color: #1f2937;
}

/* 病历详情 - 影像分栏 */
.record-imaging-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 210px 1fr;
  border: 1px solid #d8e5f2;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.record-imaging-sessions {
  border-right: 1px solid #dce7f2;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #f8fafc;
}

.record-imaging-session-head {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  background: #f3f5f7;
  border-bottom: 1px solid #e2e7ee;
  font-size: 10px;
  font-weight: 700;
  color: #374151;
}

.record-imaging-session-head span {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #e2e7ee;
}

.record-imaging-session-head span:last-child {
  border-right: 0;
}

.record-imaging-session-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  background: #f8fafc;
}

.record-imaging-session-item {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  border-bottom: 1px solid #e8eef5;
  font-size: 10px;
  color: #1f2937;
  cursor: pointer;
  background: #fff;
}

.record-imaging-session-item span {
  padding: 5px 3px;
  border-right: 1px solid #e8eef5;
  text-align: center;
  line-height: 1.3;
}

.record-imaging-session-item span:last-child {
  border-right: 0;
}

.record-imaging-session-item:hover {
  background: #f0f7ff;
}

.record-imaging-session-item.active {
  background: #d9ecff;
}

.record-imaging-detail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.record-imaging-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px;
  border-bottom: 1px solid #e8eef5;
  flex-shrink: 0;
}

.record-imaging-toolbar-left,
.record-imaging-toolbar-right {
  display: flex;
  gap: 8px;
}

.record-imaging-btn {
  height: 22px;
  font-size: 10px;
  padding: 0 10px;
}

.record-imaging-preview {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #fff;
  border-bottom: 1px solid #e8eef5;
}

.record-imaging-thumb {
  display: block;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
}

.record-imaging-field {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 6px;
  padding: 4px 6px;
  border-top: 1px solid #e8eef5;
  align-items: start;
  flex-shrink: 0;
}

.record-imaging-field-label {
  font-size: 11px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.4;
}

.record-imaging-field-input {
  width: 100%;
  min-height: 40px;
  resize: vertical;
  border: 1px solid #d8e3ef;
  font-size: 10px;
  padding: 4px 6px;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  color: #1f2937;
  background: #fff;
}

/* 病历详情 - 图片标签 */
.record-image-sheet {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid #d8e5f2;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.record-image-block {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.record-image-preview-block {
  flex: 2.2;
}

.record-image-desc-block {
  flex: 1;
  border-top: 1px solid #dce7f2;
}

.record-image-block-head {
  height: 20px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  background: #f3f5f7;
  border-bottom: 1px solid #e2e7ee;
  font-size: 10px;
  font-weight: 700;
  color: #374151;
  flex-shrink: 0;
}

.record-image-preview {
  flex: 1;
  background: #f8fafc;
  min-height: 0;
  overflow: auto;
  padding: 6px;
}

.record-image-thumb {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 1px solid #dce7f2;
  background: #fff;
}

.record-image-desc-input {
  flex: 1;
  width: 100%;
  resize: none;
  border: 0;
  margin: 0;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.5;
  min-height: 0;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  color: #1f2937;
  background: #fff;
}

.medical-footer-strip {
  height: 18px;
  border-top: 1px solid #d8e5f2;
  border-left: 1px solid #d8e5f2;
  border-right: 1px solid #d8e5f2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 5px;
  background: #f8fafc;
  font-size: 10px;
  color: #3f4d5f;
  white-space: nowrap;
  overflow: hidden;
}

.medical-footer-strip span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.medical-footer-strip b {
  font-weight: 600;
  color: #1f2937;
}

.result {
  background: #0f172a;
  color: #cde5ff;
  padding: 12px;
  border-radius: 6px;
  overflow: auto;
}

.empty-cell {
  text-align: center;
  color: #6b7280;
  padding: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
}

.stat-card {
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px;
}

.stat-title {
  color: #4b5563;
  font-size: 13px;
  margin-bottom: 6px;
}

.stat-value {
  color: #0b67b5;
  font-size: 24px;
  font-weight: 700;
}

.customer-detail-panel {
  min-height: 0;
  padding: 4px 6px 6px;
  background: #f8fbfd;
}

.customer-detail-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  border-bottom: 1px solid #cfdbe8;
  margin-bottom: 4px;
  padding: 0;
  background: linear-gradient(180deg, #f7fbff 0%, #f0f7fc 100%);
  overflow-x: auto;
}

.customer-detail-tabs span,
.customer-detail-tabs .detail-tab {
  min-width: 74px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #5a6675;
  border-right: 1px solid #dbe5ef;
  cursor: pointer;
  font-weight: 600;
  padding: 0 8px;
}

.customer-detail-tabs .detail-tab {
  border: none;
  border-right: 1px solid #dbe5ef;
  background: transparent;
  font-family: inherit;
  line-height: 1;
}

.customer-detail-tabs .detail-tab:focus-visible {
  outline: 2px solid #0a73c3;
  outline-offset: -2px;
}

.customer-detail-tabs span.active,
.customer-detail-tabs .detail-tab.active {
  color: #0c7fc6;
  background: #eef8ff;
  border-bottom: 2px solid #0c7fc6;
  font-weight: 700;
}

.customer-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: nowrap;
}

.customer-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 0;
  flex-wrap: nowrap;
  align-items: center;
  overflow: visible;
  flex: 1;
}

.customer-detail-actions .ghost-btn {
  height: 26px;
  font-size: 12px;
  border-color: #d9dfe6;
  background: #fff;
  color: #3b4552;
  min-width: 0;
  font-weight: 600;
}

.detail-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  border-radius: 3px;
}

.detail-action-btn::before,
.detail-action-btn[class*="icon-"]::before {
  content: none;
}

.detail-action-btn.icon-more-action {
  min-width: 34px;
  width: 34px;
  padding: 0;
}

.customer-detail-query {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  padding: 0;
  min-width: 290px;
}

.customer-detail-query input {
  width: 210px;
  height: 26px;
}

.customer-detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 10px;
  border: 1px solid #d3dee9;
  background: #f4f7fa;
  padding: 6px 8px;
  margin-bottom: 4px;
  border-radius: 0;
  flex: 0 0 auto;
  max-height: none;
  min-height: 0;
  overflow: visible;
  align-items: start;
}

.customer-detail-form {
  min-width: 0;
  width: 100%;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px 10px;
  justify-content: stretch;
  width: 100%;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-item label {
  width: 68px;
  flex-shrink: 0;
  color: #2f3c4c;
  font-size: 12px;
  font-weight: 600;
}

.detail-item span {
  flex: 1;
  min-height: 30px;
  border: 1px solid #d1dbe6;
  background: #fefefe;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  font-size: 12px;
  color: #1e293b;
}

.detail-item-wide {
  grid-column: 1 / 3;
}

.detail-gender-item span {
  display: none;
}

.detail-gender-group {
  flex: 1;
  min-height: 30px;
  border: 1px solid #d1dbe6;
  background: #fefefe;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 0 8px;
  font-size: 12px;
  color: #1f2937;
}

.detail-gender-group label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.detail-gender-group input {
  width: 12px;
  height: 12px;
}

.detail-remind-item {
  align-items: flex-start;
}

.detail-remind-group {
  flex: 1;
  min-height: 30px;
  border: 1px solid #d1dbe6;
  background: #fefefe;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 4px 8px;
  font-size: 12px;
}

.detail-remind-group label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.detail-remind-group input {
  width: 12px;
  height: 12px;
}

.detail-remark-box {
  align-items: flex-start;
}

.detail-remark-box textarea {
  flex: 1;
  min-height: 32px;
  height: 32px;
  border: 1px solid #d1dbe6;
  background: #fefefe;
  font-size: 12px;
  color: #1f2937;
  padding: 3px 6px;
  resize: vertical;
}

.customer-avatar-box {
  border: 1px solid #d1dbe6;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  height: 180px;
  min-height: 180px;
  max-height: 180px;
  overflow: hidden;
  flex-shrink: 0;
}

.customer-avatar-placeholder {
  width: 180px;
  height: 180px;
  min-height: 180px;
  max-height: 180px;
  border: 1px dashed #ccd7e4;
  color: #93a2b3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  overflow: hidden;
  padding: 0;
}

.customer-list-panel,
.pet-list-panel {
  border: 1px solid #d3dee9;
  margin-bottom: 6px;
  background: #fff;
}

.customer-detail-panel .table th {
  background: #f0f5fa;
  border-bottom: 1px solid #dbe6f0;
  color: #354255;
  font-size: 12px;
}

.customer-detail-panel .table td {
  height: 24px;
  padding-top: 2px;
  padding-bottom: 2px;
  font-size: 12px;
}

.customer-detail-panel .table tbody tr.selected {
  background: #c7e9fb;
}

.customer-detail-panel .table tbody tr:hover {
  background: #e9f6ff;
}

#customerPetsTable .pet-action-btn {
  height: 18px;
  min-width: 40px;
  padding: 0 6px;
  font-size: 11px;
  margin-right: 4px;
}

.customer-action-modal-card {
  width: 460px;
}

.customer-action-modal-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 14px 16px 10px;
}

.customer-action-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 8px;
}

.customer-action-row label {
  font-size: 13px;
  color: #334155;
  font-weight: 600;
}

.customer-action-row input,
.customer-action-row select {
  width: 100%;
  height: 30px;
}

.customer-action-row textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  padding: 6px 8px;
  font: inherit;
}

.discount-card-modal-card {
  width: 420px;
}

.discount-card-recharge-tip {
  margin: 0 0 10px;
  font-size: 13px;
  color: #475569;
}

/* ── 工作台通用样式 ── */

.wb-panel {
  background: #fff;
  border: 0;
  margin: 0;
  padding: 0;
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
}

.wb-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid #dce6f1;
  min-height: 36px;
  flex-shrink: 0;
}

.wb-toolbar-left,
.wb-toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.wb-icon-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #374151;
  border: 1px solid #cfd9e5;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.wb-label {
  font-size: 13px;
  color: #374151;
  white-space: nowrap;
}

.wb-date-input {
  width: var(--date-input-width, 132px);
  min-width: var(--date-input-width, 132px);
  height: 28px;
  padding: 2px 6px;
  font-size: 12px;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}

.wb-date-sep {
  color: #64748b;
  font-size: 13px;
}

.wb-search-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  background: #fff;
  color: #374151;
  border: 1px solid #cfd9e5;
  border-radius: 6px;
  font-size: 14px;
}

.wb-search-text-btn {
  height: 28px;
  padding: 0 10px;
  background: #fff;
  color: #374151;
  border: 1px solid #cfd9e5;
  font-size: 12px;
  font-weight: 600;
}

.wb-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  user-select: none;
}

.wb-toggle input {
  display: none;
}

.wb-toggle-track {
  width: 36px;
  height: 18px;
  background: #cbd5e1;
  border-radius: 9px;
  position: relative;
  transition: background 0.2s;
}

.wb-toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.2s;
}

.wb-toggle input:checked + .wb-toggle-track {
  background: #0a73c3;
}

.wb-toggle input:checked + .wb-toggle-track::after {
  left: 20px;
}

.wb-action-btn {
  height: 28px;
  padding: 0 10px;
  background: #fff;
  color: #374151;
  border: 1px solid #cfd9e5;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.wb-action-btn:hover {
  background: #f0f7ff;
  border-color: #0a73c3;
  color: #0a73c3;
}

.wb-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  position: relative;
}

.wb-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
}

.wb-table th,
.wb-table td {
  border-bottom: 1px solid #e3e9f1;
  padding: 0 4px;
  height: 18px;
  font-size: 12px;
  line-height: 1.15;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-table th {
  background: #f7f9fc;
  color: #4b5563;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

.wb-table tbody tr:nth-child(even) {
  background: #f5faff;
}

.wb-table tbody tr:hover {
  background: #e9f4ff;
}

.wb-table tbody tr.selected {
  background: #cfe8fa;
}


.wb-status-done {
  display: inline-block;
  padding: 2px 10px;
  background: #dcfce7;
  color: #15803d;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
}

.wb-status-pending {
  display: inline-block;
  padding: 2px 10px;
  background: #fef3c7;
  color: #b45309;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
}

.wb-status-overdue {
  display: inline-block;
  padding: 2px 10px;
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
}

.fu-row-actions {
  white-space: nowrap;
  display: flex;
  gap: 4px;
  align-items: center;
}

.fu-row-act {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 12px;
  line-height: 1.2;
  padding: 2px 6px;
  border-radius: 2px;
  cursor: pointer;
}

.fu-row-act:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #eff6ff;
}

.fu-row-act:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.fu-row-muted {
  color: #94a3b8;
  font-size: 12px;
}

.fu-row-overdue td:first-child {
  box-shadow: inset 3px 0 0 #ef4444;
}

.wb-sub-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-bottom: 1px solid #dce6f1;
  padding: 0 8px;
  flex-shrink: 0;
}

.wb-sub-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  height: auto;
}

.wb-sub-tab.active {
  color: #0a73c3;
  border-bottom-color: #0a73c3;
}

.wb-sub-tab:hover {
  color: #0a73c3;
}

.wb-footer-summary {
  padding: 6px 10px;
  font-size: 13px;
  color: #374151;
  border-top: 1px solid #dce6f1;
  flex-shrink: 0;
}

.wb-footer-note {
  padding: 4px 10px 8px;
  font-size: 12px;
  color: #94a3b8;
}

.wb-filter-select {
  height: 28px;
  font-size: 12px;
  min-width: 90px;
}

.wb-quick-date-btn {
  height: 28px;
  padding: 0 10px;
  background: #fff;
  color: #374151;
  border: 1px solid #cfd9e5;
  font-size: 12px;
}

.wb-quick-date-btn.active {
  background: #0a73c3;
  color: #fff;
  border-color: #0a73c3;
}

.wb-refresh-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  background: #fff;
  color: #0a73c3;
  border: 1px solid #cfd9e5;
  font-size: 16px;
}

/* 住院列表卡片 */

.wb-inpatient-wrap {
  flex: 1;
  overflow: auto;
  padding: 8px;
}

.wb-ward-section {
  margin-bottom: 16px;
}

.wb-ward-title {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 4px;
}

.wb-ward-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wb-pet-card {
  width: 320px;
  border: 1px solid #d5dce6;
  border-radius: 2px;
  overflow: hidden;
  background: #fff;
}

.wb-pet-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: #e9f4ff;
  font-size: 12px;
  color: #374151;
}

.wb-pet-card-body {
  display: flex;
  align-items: flex-start;
  padding: 8px;
  gap: 8px;
}

.wb-pet-avatar {
  width: 48px;
  height: 48px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.wb-pet-info {
  flex: 1;
  min-width: 0;
}

.wb-pet-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
}

.wb-pet-gender-m {
  color: #0a73c3;
  font-size: 14px;
}

.wb-pet-gender-f {
  color: #ec4899;
  font-size: 14px;
}

.wb-pet-owner {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.wb-reception-btn {
  height: 32px;
  padding: 0 14px;
  background: #fbbf24;
  color: #1f2937;
  border: 1px solid #f59e0b;
  font-size: 13px;
  font-weight: 700;
  border-radius: 2px;
  flex-shrink: 0;
}

.wb-pet-note {
  margin: 0 8px 8px;
  padding: 4px 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  color: #94a3b8;
  min-height: 28px;
}

.wb-pet-card-foot {
  padding: 4px 8px 8px;
  font-size: 12px;
  color: #64748b;
}

.wb-pet-card-actions {
  display: flex;
  gap: 4px;
  padding: 0 8px 8px;
}

.wb-pet-card-actions button {
  flex: 1;
  height: 26px;
  padding: 0 4px;
  background: #fff;
  color: #374151;
  border: 1px solid #cfd9e5;
  font-size: 12px;
}

/* 本院预约时间表 */

.wb-schedule-wrap {
  flex: 1;
  overflow: auto;
  display: flex;
  border-top: 1px solid #dce6f1;
}

.wb-time-col {
  width: 60px;
  flex-shrink: 0;
  border-right: 1px solid #dce6f1;
}

.wb-time-slot {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #64748b;
  border-bottom: 1px solid #eef2f6;
}

.wb-schedule-grid {
  flex: 1;
  position: relative;
  min-height: 400px;
}

.wb-schedule-grid-cols {
  display: flex;
  gap: 0;
  overflow-x: auto;
  align-items: stretch;
}

.wb-appt-col {
  border-right: 1px solid #dce6f1;
  flex-shrink: 0;
}

.wb-appt-col-title {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 4px;
  background: #f8fafc;
  border-bottom: 1px solid #dce6f1;
  color: #334155;
}

.wb-appt-col-body {
  position: relative;
  min-height: 400px;
}

.menu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
}

.menu-badge.hidden {
  display: none;
}

.wb-appt-block {
  position: absolute;
  left: 8px;
  right: 8px;
  background: #dbeafe;
  border: 1px solid #93c5fd;
  border-radius: 2px;
  padding: 4px 8px;
  font-size: 12px;
  color: #1e40af;
  overflow: hidden;
  cursor: pointer;
}

.wb-appt-block.selected {
  outline: 2px solid #2563eb;
}

.wb-appt-block.wb-appt-pending {
  background: #fef9c3;
  border-color: #facc15;
  color: #854d0e;
}

.wb-appt-block.wb-appt-handled {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.wb-appt-block.wb-appt-arrived {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #075985;
}

.wb-appt-block.wb-appt-no-show {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
  text-decoration: line-through;
  opacity: 0.85;
}

.wb-appt-status {
  display: inline-block;
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 2px;
}

.wb-appt-status.wb-appt-pending {
  background: #fef9c3;
  color: #854d0e;
}

.wb-appt-status.wb-appt-arrived {
  background: #e0f2fe;
  color: #075985;
}

.wb-appt-status.wb-appt-handled {
  background: #dcfce7;
  color: #166534;
}

.wb-appt-status.wb-appt-no-show {
  background: #f1f5f9;
  color: #64748b;
}

.wb-schedule-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-top: 1px solid #dce6f1;
  font-size: 12px;
  color: #64748b;
}

.wb-col-width {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wb-col-width input[type="range"] {
  width: 120px;
  height: auto;
  padding: 0;
  border: 0;
}

/* 侧边栏图标 */

.icon-wb-register::before { content: none; }
.icon-wb-reception::before { content: none; }
.icon-wb-record::before { content: none; }
.icon-wb-followup::before { content: none; }
.icon-wb-inpatient::before { content: none; }
.icon-wb-business::before { content: none; }
.icon-wb-appointment::before { content: none; }
.icon-wb-online::before { content: none; }
.icon-wb-consult::before { content: none; }

/* 填写回访弹窗 */

.fu-fill-modal-card {
  width: 780px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  border: 1px solid #9cc5dc;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
}

.fu-fill-modal-card .modal-header {
  background: #fff;
  border-bottom: 1px solid #d8e5f2;
  padding: 8px 12px;
}

.fu-fill-modal-card .modal-title {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
}

.fu-fill-body {
  padding: 8px 10px 10px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f3f8fc;
}

.fu-fill-section {
  border: 1px solid #b8d4e8;
  background: #fff;
}

.fu-section-head {
  height: 26px;
  background: linear-gradient(180deg, #6eb8d4 0%, #5aaece 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #4a9fbf;
}

.fu-customer-body {
  padding: 8px 10px 10px;
  background: #fff;
}

.fu-customer-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  margin-bottom: 6px;
  font-size: 12px;
  color: #1f2937;
}

.fu-inline-field {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.fu-inline-field label,
.fu-remark-label {
  color: #374151;
  font-weight: 600;
}

.fu-inline-field b {
  font-weight: 600;
  color: #111827;
}

.fu-customer-record-line {
  gap: 8px;
}

.fu-customer-remark-line {
  align-items: flex-start;
  gap: 6px;
}

.fu-customer-remark-line .fu-textarea-sm {
  flex: 1;
  min-height: 48px;
  background: #f3f4f6;
  border-color: #d1d5db;
}

.fu-link {
  color: #0a73c3;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.fu-link:hover {
  text-decoration: underline;
}

.fu-textarea,
.fu-textarea-sm {
  width: 100%;
  height: auto;
  min-height: 52px;
  padding: 4px 6px;
  border: 1px solid #ccd5e1;
  border-radius: 2px;
  font-size: 12px;
  resize: vertical;
  background: #fff;
}

.fu-textarea-sm {
  min-height: 44px;
}

.fu-form-body,
.fu-review-body {
  padding: 8px 10px 10px;
  background: #fff;
}

.fu-form-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.fu-form-row-top {
  align-items: flex-start;
}

.fu-form-label {
  font-size: 12px;
  color: #374151;
  font-weight: 600;
  white-space: nowrap;
}

.fu-required {
  color: #ef4444;
  margin-right: 2px;
}

.fu-radio-group,
.fu-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 12px;
  color: #374151;
}

.fu-radio-group label,
.fu-checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.fu-radio-group input,
.fu-checkbox-group input {
  width: auto;
  height: auto;
  margin: 0;
}

.fu-invalid-reasons label {
  color: #94a3b8;
}

.fu-invalid-reasons.is-active label {
  color: #374151;
}

.fu-duration {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.fu-duration-input {
  width: 64px;
  height: 28px;
  padding: 2px 6px;
  text-align: center;
}

.fu-upload-area {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 108px;
  grid-template-rows: auto auto;
  gap: 6px 10px;
  align-items: start;
}

.fu-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.fu-image-preview {
  grid-row: 1 / 3;
  min-height: 78px;
  border: 1px solid #dce6f1;
  background: #f8fafc;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  align-content: flex-start;
}

.fu-image-preview img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  cursor: pointer;
  background: #fff;
}

.fu-image-preview img.is-selected {
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
}

.fu-upload-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fu-outline-btn {
  height: 28px;
  padding: 0 10px;
  background: linear-gradient(180deg, #fbfbfc 0%, #f1f3f5 100%);
  color: #374151;
  border: 1px solid #cfd9e5;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.fu-outline-btn:hover {
  background: #eef2f7;
}

.fu-upload-tip {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 11px;
  color: #94a3b8;
}

/* 病历列表：上传发票弹窗 */

.rec-invoice-modal-card {
  width: 560px;
  max-width: calc(100vw - 40px);
  display: flex;
  flex-direction: column;
  border: 1px solid #9cc5dc;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
}

.rec-invoice-modal-card .modal-header {
  background: #fff;
  border-bottom: 1px solid #d8e5f2;
  padding: 8px 12px;
}

.rec-invoice-modal-card .modal-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
}

.rec-invoice-body {
  padding: 16px 18px 12px;
  background: #f3f8fc;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rec-invoice-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #334155;
}

.rec-invoice-meta label {
  color: #64748b;
  white-space: nowrap;
}

.rec-invoice-meta span {
  font-weight: 600;
  color: #0f172a;
}

.rec-invoice-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: start;
}

.rec-invoice-label {
  padding-top: 8px;
  font-size: 13px;
  color: #64748b;
}

.rec-invoice-upload {
  grid-template-columns: 1fr 112px;
}

.rec-invoice-upload .fu-image-preview {
  min-height: 160px;
  background: #fff;
}

.rec-invoice-empty {
  width: 100%;
  min-height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 12px;
}

.rec-invoice-upload .fu-image-preview img {
  width: 88px;
  height: 88px;
  cursor: pointer;
  border-radius: 2px;
}

.rec-invoice-upload .fu-image-preview img.is-selected {
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
}

.rec-invoice-footer {
  justify-content: center;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border-top: 1px solid #d8e5f2;
}

.fu-review-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.fu-fill-footer {
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid #e8eef5;
  background: #fff;
}

.fu-fill-footer .modal-confirm-btn {
  min-width: 72px;
}

.fu-fill-footer .modal-cancel-btn {
  min-width: 72px;
}

.medical-context-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  margin-bottom: 6px;
  background: #f7fbff;
  border: 1px solid #dce6f1;
  font-size: 13px;
}

.medical-context-label {
  color: #64748b;
}

.medical-pet-select {
  min-width: 180px;
  height: 28px;
  font-size: 13px;
}

.medical-pet-hint {
  margin-left: auto;
  color: #94a3b8;
  font-size: 12px;
}

.modal-overlay.modal-stack-top {
  z-index: 1001;
}

.modal-overlay.modal-stack-nested {
  z-index: 10050;
}

#globalSearchModal,
#followUpPlanModal,
#dcFollowUpPlanModal {
  z-index: 10050;
}

.modal-overlay.modal-stack-topmost {
  z-index: 10060;
}

/* 新增回访计划弹窗 */
.follow-up-plan-modal-card {
  width: 560px;
  max-width: calc(100vw - 40px);
  display: flex;
  flex-direction: column;
}

.follow-up-plan-titlebar {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border-bottom: 1px solid #e8eef5;
  background: #fff;
}

.follow-up-plan-title-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.follow-up-plan-title-icon {
  font-size: 14px;
  line-height: 1;
}

.follow-up-plan-title-text {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.follow-up-plan-close-btn {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #4b5563;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.follow-up-plan-body {
  padding: 14px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.follow-up-plan-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 8px;
  align-items: center;
}

.follow-up-plan-row-top {
  grid-template-columns: 56px 120px 88px 130px auto;
  align-items: center;
}

.follow-up-plan-label {
  font-size: 12px;
  color: #374151;
  text-align: right;
  white-space: nowrap;
}

.follow-up-plan-label-top {
  align-self: start;
  padding-top: 6px;
}

.follow-up-plan-ai-extras {
  grid-template-columns: 1fr;
  gap: 4px;
}

.follow-up-plan-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #374151;
}

.follow-up-plan-method-hint {
  font-size: 12px;
  color: #0f766e;
  min-height: 1em;
}

.follow-up-plan-select,
.follow-up-plan-date,
.follow-up-plan-days-input {
  height: 28px;
  border: 1px solid #cfd9e5;
  border-radius: 2px;
  font-size: 12px;
  padding: 0 6px;
  color: #1f2937;
  background: #fff;
}

.follow-up-plan-date {
  width: var(--date-input-width, 132px);
  min-width: var(--date-input-width, 132px);
}

.follow-up-plan-days {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.follow-up-plan-days-input {
  width: 52px;
  text-align: center;
}

.follow-up-plan-days > span {
  font-size: 12px;
  color: #374151;
}

.follow-up-plan-textarea {
  width: 100%;
  min-height: 72px;
  border: 1px solid #cfd9e5;
  border-radius: 2px;
  font-size: 12px;
  padding: 6px 8px;
  resize: vertical;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  color: #1f2937;
}

.follow-up-plan-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 16px 14px;
}

.follow-up-plan-footer button {
  min-width: 88px;
  height: 32px;
}

/* 病历打印预览弹窗 */
.record-print-preview-card {
  width: 620px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

.record-print-titlebar {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border-bottom: 1px solid #e8eef5;
  background: #fff;
}

.record-print-title-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.record-print-title-icon {
  font-size: 14px;
  line-height: 1;
}

.record-print-title-text {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.record-print-close-btn {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #4b5563;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.record-print-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid #e8eef5;
  background: #fff;
  min-height: 34px;
}

.record-print-tabs {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.record-print-tab {
  height: 32px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.record-print-tab.active {
  color: #0a73c3;
  font-weight: 700;
  border-bottom-color: #0a73c3;
}

.record-print-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.record-print-action-btn {
  height: 26px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  color: #374151;
  border: 1px solid #cfd9e5;
  border-radius: 13px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.record-print-action-btn:hover {
  background: #f3f7fc;
  border-color: #94c8ef;
}

.record-print-action-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.record-print-action-icon.icon-preview {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230a73c3'%3E%3Cpath d='M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z'/%3E%3C/svg%3E");
}

.record-print-action-icon.icon-print {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230a73c3'%3E%3Cpath d='M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z'/%3E%3C/svg%3E");
}

.record-print-action-icon.icon-pdf {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230a73c3'%3E%3Cpath d='M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 2l5 5h-5V4zM8 13h2v5H8v-5zm3 0h2c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2h-2v-5zm2 4v-1h-1v1h1zm3-4h2v5h-2v-5z'/%3E%3C/svg%3E");
}

.record-print-settings-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #cfd9e5;
  border-radius: 50%;
  background: #fff;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
}

.record-print-body {
  padding: 10px 14px 14px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.record-print-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  align-items: center;
}

.record-print-row-top {
  align-items: start;
}

.record-print-label {
  font-size: 12px;
  color: #374151;
  text-align: right;
  white-space: nowrap;
}

.record-print-select,
.record-print-input {
  width: 100%;
  max-width: 420px;
  height: 28px;
  border: 1px solid #cfd9e5;
  border-radius: 2px;
  font-size: 12px;
  padding: 0 8px;
  color: #1f2937;
  background: #fff;
}

.record-print-radio-group,
.record-print-check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.record-print-radio-group label,
.record-print-check-group label,
.record-print-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #374151;
  white-space: nowrap;
}

.record-print-switch-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #374151;
}

.record-print-inline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 12px;
  color: #374151;
}

.record-print-link-btn {
  border: 0;
  background: transparent;
  color: #0a73c3;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.record-print-link-btn:hover {
  text-decoration: underline;
}

/* 病历打印文档预览弹窗 */
#recordPrintViewerModal {
  z-index: 10050;
}

.record-print-viewer-card {
  width: 920px;
  max-width: calc(100vw - 24px);
  height: calc(100vh - 48px);
  max-height: 860px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.record-print-viewer-titlebar {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 10px;
  border-bottom: 1px solid #d1d5db;
  background: #f3f4f6;
  font-size: 12px;
  font-weight: 600;
  color: #111827;
}

.record-print-viewer-title-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.record-print-viewer-winbtns {
  display: flex;
  align-items: center;
  gap: 2px;
}

.record-print-viewer-winbtn {
  width: 28px;
  height: 22px;
  border: 0;
  background: transparent;
  color: #374151;
  font-size: 14px;
  cursor: pointer;
}

.record-print-viewer-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  flex-shrink: 0;
}

.record-print-viewer-toolbtn {
  width: 28px;
  height: 24px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 2px;
  font-size: 12px;
  cursor: pointer;
}

.record-print-viewer-toolbtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.record-print-viewer-zoom,
.record-print-viewer-page {
  font-size: 11px;
  color: #64748b;
  margin-left: 4px;
}

.record-print-viewer-body {
  flex: 1;
  overflow: auto;
  background: #9ca3af;
  padding: 16px;
}

.record-print-document {
  width: 794px;
  min-height: 1123px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #111827;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  padding: 18px 20px 24px;
  font-size: 11px;
  line-height: 1.45;
  color: #111827;
  font-family: "Microsoft YaHei", SimSun, Arial, sans-serif;
}

.rp-doc-head {
  display: grid;
  grid-template-columns: 120px 1fr 160px;
  align-items: start;
  gap: 8px;
  margin-bottom: 10px;
}

.rp-doc-logo {
  font-size: 10px;
  font-weight: 700;
  color: #0a73c3;
  line-height: 1.3;
}

.rp-doc-logo small {
  display: block;
  font-size: 9px;
  color: #64748b;
  font-weight: 400;
}

.rp-doc-title {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  padding-top: 4px;
}

.rp-doc-ref {
  text-align: right;
  font-size: 10px;
  color: #374151;
  word-break: break-all;
}

.rp-info-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-bottom: 10px;
}

.rp-info-table td {
  border: 1px solid #111827;
  padding: 3px 5px;
  vertical-align: middle;
  font-size: 10px;
}

.rp-info-table .rp-info-label {
  width: 88px;
  background: #f8fafc;
  white-space: nowrap;
}

.rp-info-pet-wrap {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 6px;
  align-items: stretch;
}

.rp-pet-illus {
  border: 1px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  min-height: 72px;
  background: #fff;
}

.rp-section-head {
  background: #5b9bd5;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  padding: 3px 8px;
  margin: 8px 0 6px;
}

.rp-exam-scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.rp-exam-score-box {
  border: 1px solid #d1d5db;
  padding: 6px;
  min-height: 88px;
  font-size: 10px;
}

.rp-exam-score-box b {
  display: block;
  margin-bottom: 4px;
}

.rp-exam-score-illus {
  text-align: center;
  font-size: 28px;
  line-height: 1.1;
  color: #64748b;
}

.rp-lab-block {
  margin-bottom: 10px;
}

.rp-lab-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #5b9bd5;
  color: #fff;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}

.rp-lab-block-meta {
  font-weight: 400;
  font-size: 10px;
}

.rp-lab-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.rp-lab-table th,
.rp-lab-table td {
  border: 1px solid #d1d5db;
  padding: 2px 4px;
  font-size: 9px;
  text-align: center;
  vertical-align: middle;
}

.rp-lab-table th {
  background: #f3f4f6;
  font-weight: 600;
}

.rp-lab-table td.rp-lab-item {
  text-align: left;
}

.rp-lab-table td.is-low {
  background: #cfe8fc;
  color: #1d4ed8;
}

.rp-lab-table td.is-high {
  background: #f8d0d0;
  color: #b91c1c;
}

.rp-lab-bar-wrap {
  width: 100%;
  min-width: 48px;
}

.rp-lab-bar {
  position: relative;
  height: 8px;
  background: linear-gradient(90deg, #fde68a 0%, #86efac 35%, #86efac 65%, #fde68a 100%);
  border: 1px solid #cbd5e1;
  border-radius: 1px;
}

.rp-lab-bar i {
  position: absolute;
  top: -2px;
  width: 2px;
  height: 12px;
  background: #111827;
  transform: translateX(-50%);
}

.rp-lab-note {
  font-size: 9px;
  color: #64748b;
  margin-top: 2px;
}

.rp-lab-analysis,
.rp-imaging-analysis,
.rp-imaging-diagnosis {
  font-size: 10px;
  padding: 4px 2px;
  line-height: 1.5;
}

.rp-attach-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.record-print-pick-card {
  width: min(480px, 92vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.record-print-pick-card.is-images {
  width: min(560px, 92vw);
}

.record-print-pick-body {
  flex: 1;
  overflow: auto;
  padding: 12px 16px;
  max-height: 50vh;
}

.record-print-pick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  cursor: pointer;
}

.record-print-pick-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  flex-shrink: 0;
}

.record-print-pick-body {
  flex: 1;
  overflow: auto;
  padding: 12px 16px;
  max-height: 50vh;
}

.record-print-pick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  cursor: pointer;
}

.record-print-pick-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
}

.rp-doc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-size: 9px;
  color: #64748b;
}

.rp-doc-page {
  flex: 1;
  text-align: center;
  font-size: 10px;
  color: #374151;
}

/* 经典格式（迅德门急诊病历一比一） */
.record-print-document:has(.rp-classic) {
  padding: 4px 10px 8px;
  font-family: "Microsoft YaHei", SimSun, sans-serif;
  font-size: 10.5pt;
  line-height: 1.35;
  color: #222;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.rp-classic-sheet {
  width: 100%;
  border-collapse: collapse;
}

.rp-classic-sheet > thead > tr > td,
.rp-classic-sheet > tbody > tr > td,
.rp-classic-sheet > tfoot > tr > td {
  padding: 0;
  border: 0;
  vertical-align: top;
}

.rp-classic-logo {
  display: block;
  width: 108px;
  height: auto;
  margin: 0 0 2px;
}

.rp-classic-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 4px;
  margin: 0 0 6px;
}

.rp-classic-title-text {
  flex: 1;
  text-align: center;
  font-size: 20pt;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.15;
  color: #111;
}

.rp-classic-title-no {
  font-size: 9pt;
  font-weight: 400;
  white-space: nowrap;
  padding-bottom: 2px;
}

.rp-classic-info-wrap {
  display: grid;
  grid-template-columns: 1fr 124px;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 8px;
}

.rp-classic-info {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.rp-classic-info th,
.rp-classic-info td {
  border: 1px solid #d7dee5;
  padding: 4px 6px;
  font-size: 9pt;
  font-weight: 400;
  vertical-align: middle;
}

.rp-classic-info .rp-classic-k {
  width: 120px;
  background: #deeef6;
  color: #334155;
  white-space: nowrap;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.rp-classic-info .rp-classic-v {
  background: #fff;
  word-break: break-all;
  min-height: 18px;
}

.rp-classic-info .rp-classic-v-phones {
  white-space: pre-line;
  line-height: 1.3;
}

.rp-classic-pet {
  border: 1px solid #d7dee5;
  background: #f7f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 124px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.rp-classic-pet img {
  width: 108px;
  height: auto;
  display: block;
}

.rp-classic-sec {
  background: #3795ca;
  color: #fff;
  font-weight: 700;
  font-size: 12pt;
  padding: 3px 12px;
  margin: 8px 0 8px;
  letter-spacing: 1px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.rp-classic-item {
  margin: 0 0 7px;
}

.rp-classic-label {
  font-size: 10pt;
  font-weight: 700;
  color: #111;
  margin-bottom: 3px;
}

.rp-classic-label::before {
  content: "· ";
}

.rp-classic-inline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: 0 0 7px;
}

.rp-classic-inline-row .rp-classic-label {
  margin: 0;
  flex: 0 0 auto;
}

.rp-classic-box {
  background: #f7f8f8;
  border-radius: 2px;
  min-height: 22px;
  padding: 5px 8px;
  font-size: 9pt;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.rp-classic-box-sm {
  min-height: 22px;
  padding: 3px 8px;
  min-width: 72px;
}

.rp-classic-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
  margin: 0 0 7px;
}

.rp-classic-kv {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 6px;
  align-items: center;
}

.rp-classic-kv .rp-classic-label {
  margin: 0;
}

.rp-classic-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  padding: 2px 2px 2px 8px;
}

.rp-classic-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-size: 10pt;
}

.rp-classic-check-extra {
  border-bottom: 1px solid #cbd5e1;
  min-width: 96px;
  min-height: 16px;
  padding: 0 4px;
  font-weight: 400;
}

.rp-cbox {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1px solid #9aa3ab;
  border-radius: 2px;
  background: #fff;
  position: relative;
  flex-shrink: 0;
  box-sizing: border-box;
}

.rp-cbox.on {
  border: 0;
  background: url("/static/images/print/check-on.png") center / contain no-repeat;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.rp-classic-vac {
  display: grid;
  grid-template-columns: 108px 1fr 1fr;
  gap: 6px 10px;
  align-items: center;
  padding: 2px 8px 4px;
}

.rp-classic-score-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 4px 0 10px;
}

.rp-classic-score-card {
  border: 1px solid #d7dee5;
  min-height: 118px;
  display: flex;
  flex-direction: column;
}

.rp-classic-score-head {
  background: #deeef6;
  color: #1e3a5f;
  font-size: 10pt;
  font-weight: 700;
  padding: 4px 8px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.rp-classic-score-card img {
  display: block;
  max-width: 100%;
  max-height: 96px;
  margin: 6px auto;
  object-fit: contain;
}

.rp-classic-diagnosis {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fff8f9;
  border-left: 4px solid #c0392b;
  padding: 6px 10px;
  margin: 8px 0;
  min-height: 28px;
  font-size: 9pt;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.rp-classic-diagnosis-k {
  font-size: 12pt;
  font-weight: 700;
  color: #111;
  white-space: nowrap;
}

.rp-classic-orders {
  margin-top: 2px;
}

.rp-classic-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-top: 8px;
  font-size: 9pt;
}

.rp-classic-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 6px;
  font-size: 7.5pt;
  color: #666;
}

.rp-classic-foot-page {
  flex: 1;
  text-align: center;
  font-size: 9pt;
  color: #222;
}

.rp-classic-append {
  margin-top: 10px;
}

@media print {
  .rp-classic-foot {
    display: none !important;
  }

  .rp-classic-item,
  .rp-classic-pair,
  .rp-classic-score-row,
  .rp-classic-info-wrap {
    break-inside: avoid;
  }
}

/* 标准格式（云德风格） */
.rp-standard {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.rp-std-header {
  text-align: center;
  margin-bottom: 8px;
}

.rp-std-hospital {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.rp-std-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
}

.rp-std-type-checks {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 400;
}

.rp-std-type-checks label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.rp-std-check {
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 1px solid #374151;
  background: #fff;
  position: relative;
  vertical-align: middle;
}

.rp-std-check.checked::after {
  content: "✓";
  position: absolute;
  inset: -2px 0 0 0;
  font-size: 11px;
  line-height: 11px;
  text-align: center;
  color: #2563eb;
  font-weight: 700;
}

.rp-std-block {
  display: grid;
  grid-template-columns: 28px 1fr;
  border: 1px solid #111827;
  margin-bottom: 0;
}

.rp-std-block + .rp-std-block {
  border-top: none;
}

.rp-std-block-main {
  flex: 1;
}

.rp-std-sidebar {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-right: 1px solid #111827;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2px;
  padding: 8px 4px;
}

.rp-std-content {
  padding: 6px 8px 8px;
  min-width: 0;
}

.rp-std-content .rp-section-head {
  margin: 4px 0 4px;
}

.rp-std-field-row {
  display: grid;
  gap: 4px 8px;
  align-items: end;
  margin-bottom: 4px;
  font-size: 10px;
}

.rp-std-field-label {
  white-space: nowrap;
  color: #374151;
}

.rp-std-field-value {
  border-bottom: 1px solid #9ca3af;
  min-height: 14px;
  padding: 0 2px 1px;
  word-break: break-all;
}

.rp-std-visit-time {
  font-size: 10px;
  margin-top: 4px;
  color: #111827;
}

.rp-std-section {
  margin-bottom: 6px;
}

.rp-std-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.rp-std-text {
  font-size: 10px;
  line-height: 1.55;
  padding: 2px 4px 4px;
  white-space: pre-wrap;
  word-break: break-word;
}

.rp-std-pre {
  white-space: pre-wrap;
}

.rp-std-vitals {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 4px 0 6px;
}

.rp-std-vitals td {
  border: 1px solid #d1d5db;
  padding: 3px 6px;
  font-size: 10px;
  vertical-align: middle;
}

.rp-std-visual-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 4px 0 6px;
}

.rp-std-visual-box {
  border: 1px solid #d1d5db;
  padding: 4px;
  min-height: 96px;
  display: flex;
  flex-direction: column;
}

.rp-std-visual-title {
  font-size: 9px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rp-std-visual-img {
  display: block;
  max-width: 100%;
  max-height: 72px;
  margin: 0 auto;
  object-fit: contain;
}

.rp-std-weight-chart {
  position: relative;
  flex: 1;
  min-height: 72px;
  border-top: 1px solid #e5e7eb;
  margin-top: 2px;
}

.rp-std-weight-plot {
  position: absolute;
  inset: 8px 4px 18px;
}

.rp-std-weight-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.rp-std-weight-line polyline {
  fill: none;
  stroke: #2563eb;
  stroke-width: 1.5;
}

.rp-std-weight-point {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 8px;
  color: #2563eb;
  font-weight: 600;
  white-space: nowrap;
}

.rp-std-weight-dates {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  font-size: 7px;
  color: #64748b;
  padding: 0 2px;
}

.rp-std-weight-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #94a3b8;
}

.rp-std-symptoms {
  font-size: 10px;
  line-height: 1.55;
  padding: 2px 4px 6px;
}

.rp-std-foot {
  margin-top: auto;
  border-top: 1px solid #e5e7eb;
}

.rp-standard .rp-lab-block {
  margin-top: 4px;
}

.rp-standard .rp-lab-block-head {
  margin: 0;
}

/* 仅在病历预览页内直接 window.print 时隐藏壳层；独立打印窗用 html.record-print-standalone 覆盖 */
@media print {
  body.record-printing-from-viewer * {
    visibility: hidden;
  }

  body.record-printing-from-viewer #recordPrintDocument,
  body.record-printing-from-viewer #recordPrintDocument * {
    visibility: visible;
  }

  body.record-printing-from-viewer #recordPrintDocument {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: 0;
    box-shadow: none;
    margin: 0;
  }

  html.record-print-standalone body,
  html.record-print-standalone body * {
    visibility: visible;
  }

  html.record-print-standalone #recordPrintDocument {
    position: static;
    width: 100%;
    border: 0;
    box-shadow: none;
    margin: 0;
  }
}

/* 登记住院弹窗（须压过病历 1001） */
#registerInpatientModal {
  z-index: 10050;
}

.register-inpatient-modal-card {
  width: 760px;
  max-width: calc(100vw - 32px);
  height: calc(100vh - 48px);
  max-height: 720px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.register-inpatient-titlebar {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 10px;
  border-bottom: 1px solid #d1d5db;
  background: #f3f4f6;
  font-size: 12px;
  font-weight: 700;
  color: #111827;
  flex-shrink: 0;
}

.register-inpatient-title-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.register-inpatient-winbtns {
  display: flex;
  gap: 2px;
}

.register-inpatient-winbtn {
  width: 28px;
  height: 22px;
  border: 0;
  background: transparent;
  color: #374151;
  font-size: 14px;
  cursor: pointer;
}

.register-inpatient-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border-bottom: 1px solid #e8eef5;
  background: #fff;
  flex-shrink: 0;
}

.register-inpatient-refresh-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0a73c3;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
}

.register-inpatient-vacant-toggle {
  font-size: 12px;
  color: #374151;
}

.register-inpatient-body {
  flex: 1;
  overflow: auto;
  padding: 16px 16px 18px;
  background: #f8fafc;
}

.register-inpatient-section {
  margin-bottom: 18px;
}

.register-inpatient-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 10px;
}

.register-inpatient-cage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}

.register-inpatient-cage-card {
  border: 1px solid #d5e3ef;
  border-radius: 8px;
  background: #fff;
  min-height: 88px;
  min-width: 0;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.register-inpatient-cage-card.occupied {
  background: #eceff3;
  cursor: default;
}

.register-inpatient-cage-card.selected {
  border-color: #0a73c3;
  box-shadow: 0 0 0 2px rgba(10, 115, 195, 0.25);
}

.register-inpatient-cage-card.hidden-by-filter {
  display: none;
}

.register-inpatient-cage-badge {
  display: inline-block;
  margin: 6px 6px 0;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  max-width: calc(100% - 12px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.register-inpatient-cage-card.vacant .register-inpatient-cage-badge {
  background: #f5a623;
  color: #fff;
}

.register-inpatient-cage-card.occupied .register-inpatient-cage-badge {
  background: #9ca3af;
  color: #fff;
}

.register-inpatient-cage-icon {
  position: absolute;
  top: 4px;
  right: 6px;
  line-height: 1;
  color: #6b7280;
}

.register-inpatient-cage-icon .icon {
  display: block;
}

.register-inpatient-cage-body {
  padding: 8px 10px 10px;
  font-size: 12px;
  color: #374151;
  line-height: 1.5;
}

.register-inpatient-footer {
  flex-shrink: 0;
  padding: 14px 16px 16px;
  border-top: 1px solid #b8d9f0;
  background: #e8f4fc;
}

.register-inpatient-form-row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.9fr 1fr;
  gap: 10px;
  align-items: end;
}

.register-inpatient-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.register-inpatient-field > span {
  font-size: 11px;
  color: #4b5563;
}

.register-inpatient-field input,
.register-inpatient-field select,
.register-inpatient-field textarea {
  height: 28px;
  border: 1px solid #cfd9e5;
  border-radius: 2px;
  font-size: 12px;
  padding: 0 8px;
  background: #fff;
  color: #1f2937;
}

.register-inpatient-type-field .register-inpatient-radio-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 28px;
  font-size: 12px;
  color: #374151;
}

.register-inpatient-type-field label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.register-inpatient-remark-row {
  grid-template-columns: 1fr auto;
  margin-top: 8px;
  align-items: stretch;
}

.register-inpatient-remark-field {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: start;
}

.register-inpatient-remark-field > span {
  text-align: center;
  line-height: 1.3;
  padding-top: 4px;
}

.register-inpatient-remark-field textarea {
  height: 52px;
  resize: none;
  padding: 6px 8px;
}

.register-inpatient-remark-row .modal-confirm-btn {
  align-self: end;
  min-width: 72px;
  height: 52px;
}

.new-record-modal-card.view-mode input,
.new-record-modal-card.view-mode textarea,
.new-record-modal-card.view-mode select {
  pointer-events: none;
  background: #f8fafc;
}

.new-record-modal-card.view-mode .new-record-ops,
.new-record-modal-card.view-mode .chief-actions,
.new-record-modal-card.view-mode .lab-toolbar,
.new-record-modal-card.view-mode .exam-action-row {
  opacity: 0.55;
  pointer-events: none;
}

/* 医疗文书打印预览弹窗 */
.medical-doc-modal-card {
  width: min(1080px, calc(100vw - 32px));
  height: min(720px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.medical-doc-titlebar {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border-bottom: 1px solid #e8eef5;
  background: #fff;
  flex-shrink: 0;
}

.medical-doc-title-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.medical-doc-title-text {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.medical-doc-close-btn {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #4b5563;
  font-size: 20px;
  cursor: pointer;
}

.medical-doc-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px 6px;
  border-bottom: 1px solid #e8eef5;
  background: #fff;
  flex-shrink: 0;
  min-height: 58px;
}

.medical-doc-toolbar-left,
.medical-doc-toolbar-right {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.medical-doc-tool-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.medical-doc-tool-label {
  font-size: 11px;
  line-height: 1.1;
  color: #64748b;
  white-space: nowrap;
}

.medical-doc-search {
  display: flex;
  align-items: center;
  gap: 4px;
}

.medical-doc-search-input {
  width: 140px;
  height: 28px;
  border: 1px solid #cfd9e5;
  padding: 0 8px;
  font-size: 12px;
}

.medical-doc-search-btn {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid #cfd9e5;
  background: #fff;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  box-sizing: border-box;
  cursor: pointer;
}

.medical-doc-printer-select {
  height: 28px;
  min-width: 160px;
  border: 1px solid #cfd9e5;
  font-size: 12px;
  padding: 0 6px;
}

.medical-doc-action-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 44px;
  height: auto;
  padding: 3px 8px 2px;
  border: 1px solid #cfd9e5;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}

.medical-doc-action-btn .medical-doc-tool-label,
.medical-doc-search-btn .medical-doc-tool-label {
  color: #374151;
  font-size: 12px;
  line-height: 1;
  text-align: center;
}

/* legacy fill-SVG icon spans — superseded by Lucide inline SVG (see components.css) */
.medical-doc-action-icon,
.medical-doc-format-icon {
  display: none;
}

.medical-doc-body {
  flex: 1;
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 0;
  overflow: hidden;
}

.medical-doc-sidebar {
  border-right: 1px solid #e8eef5;
  background: #f8fafc;
  overflow: auto;
}

.medical-doc-list {
  display: flex;
  flex-direction: column;
}

.medical-doc-item {
  padding: 8px 10px;
  font-size: 12px;
  color: #1f2937;
  border-bottom: 1px solid #edf2f7;
  cursor: pointer;
  background: #fff;
}

.medical-doc-item:hover,
.medical-doc-item.active {
  background: #e8f4fc;
}

.medical-doc-editor-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.medical-doc-format-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 8px 4px;
  border-bottom: 1px solid #e8eef5;
  background: #fff;
  flex-shrink: 0;
  min-height: 52px;
}

.medical-doc-format-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 48px;
  height: auto;
  padding: 3px 6px 2px;
  border: 1px solid #d8e3ef;
  background: #fff;
  cursor: pointer;
}

.medical-doc-format-btn .medical-doc-tool-label {
  color: #374151;
}

.medical-doc-editor {
  flex: 1;
  overflow: auto;
  padding: 16px 20px;
  background: #fff;
  font-size: 13px;
  line-height: 1.6;
  color: #1f2937;
  outline: none;
}

.medical-doc-editor .med-doc-title {
  text-align: center;
  font-size: 20px;
  margin: 0 0 16px;
}

.medical-doc-editor .med-doc-info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  font-size: 12px;
}

.medical-doc-editor .med-doc-info-table td {
  border: 1px solid #94a3b8;
  padding: 4px 6px;
}

.medical-doc-editor .med-doc-info-table td:nth-child(odd) {
  background: #f1f5f9;
  width: 72px;
  white-space: nowrap;
}

.medical-doc-editor .med-doc-line {
  border-bottom: 1px solid #94a3b8;
  min-height: 24px;
  margin: 8px 0 12px;
}

.medical-doc-editor .med-doc-terms {
  padding-left: 20px;
  margin: 8px 0;
}

.medical-doc-editor .med-doc-terms li {
  margin-bottom: 8px;
}

.medical-doc-editor .med-doc-terms label {
  margin-right: 10px;
}

.medical-doc-editor .med-doc-sign {
  margin-top: 16px;
  font-size: 12px;
}

.medical-doc-editor .med-doc-field {
  margin: 8px 0;
}

.medical-doc-editor .med-doc-section-title {
  margin: 16px 0 8px;
}

.medical-doc-editor .med-doc-notice-emphasis {
  margin: 16px 0;
  text-align: center;
  line-height: 1.8;
}

.medical-doc-editor .med-doc-salutation {
  margin: 12px 0 8px;
}

.medical-doc-editor .med-doc-diagnosis-line {
  text-align: center;
  border-bottom: 1px solid #334155;
  min-height: 24px;
  margin: 8px 0 16px;
  padding-bottom: 4px;
}

.medical-doc-editor .med-doc-paragraph {
  margin: 8px 0;
  text-indent: 2em;
  line-height: 1.8;
}

.medical-doc-editor .med-doc-subsection {
  margin: 8px 0 4px;
  text-indent: 2em;
}

.medical-doc-editor .med-doc-sub-terms {
  list-style: none;
  padding-left: 0;
  margin: 8px 0 12px;
  counter-reset: med-doc-paren;
}

.medical-doc-editor .med-doc-sub-terms > li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 6px;
  counter-increment: med-doc-paren;
}

.medical-doc-editor .med-doc-sub-terms:not(.med-doc-sub-terms-manual) > li::before {
  content: "(" counter(med-doc-paren) ")";
  position: absolute;
  left: 0;
}

.medical-doc-editor .med-doc-sub-terms-manual > li {
  counter-increment: none;
}

.medical-doc-editor .med-doc-paren-num {
  position: absolute;
  left: 0;
}

.medical-doc-editor .med-doc-bullet-terms {
  padding-left: 20px;
  margin: 8px 0 16px;
}

.medical-doc-editor .med-doc-bullet-terms li {
  margin-bottom: 8px;
  line-height: 1.8;
}

.medical-doc-editor .med-doc-fill-block {
  border-bottom: 1px solid #334155;
  min-height: 80px;
  margin: 8px 0 16px;
}

.medical-doc-editor .med-doc-page-break {
  page-break-before: always;
  break-before: page;
  margin: 32px 0;
  padding-top: 24px;
  border-top: 1px dashed #cbd5e1;
}

.medical-doc-editor .med-doc-field-split {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.medical-doc-editor .med-doc-fill-block-lg {
  min-height: 160px;
}

.medical-doc-editor .med-doc-form-panel {
  border: 1px solid #334155;
  margin-top: 12px;
}

.medical-doc-editor .med-doc-form-section {
  border-bottom: 1px solid #334155;
  padding: 12px 14px;
}

.medical-doc-editor .med-doc-form-section:last-child {
  border-bottom: none;
}

.medical-doc-editor .med-doc-form-section .med-doc-sign-right {
  margin-top: 24px;
}

.medical-doc-editor .med-doc-form-section .med-doc-paragraph {
  text-indent: 0;
}

.medical-doc-editor .med-doc-wishes {
  margin: 12px 0;
  text-align: center;
  line-height: 1.8;
}

.medical-doc-editor .med-doc-sign-note {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.medical-doc-editor .med-doc-check-list {
  list-style: none;
  padding-left: 0;
  margin: 8px 0 12px;
}

.medical-doc-editor .med-doc-check-list li {
  margin-bottom: 6px;
}

.medical-doc-editor .med-doc-check-list label {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.7;
  font-weight: normal;
  cursor: pointer;
}

.medical-doc-editor .med-doc-check-list input[type="checkbox"] {
  margin: 3px 0 0;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.medical-doc-editor .med-doc-tip {
  margin-top: 24px;
  line-height: 1.8;
}

.medical-doc-editor .med-doc-party {
  margin: 4px 0;
  line-height: 1.8;
}

.medical-doc-editor .med-doc-clauses {
  list-style: none;
  padding-left: 0;
  margin: 12px 0 16px;
  counter-reset: med-doc-clause;
}

.medical-doc-editor .med-doc-clauses > li {
  counter-increment: med-doc-clause;
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
  line-height: 1.8;
  text-indent: 2em;
}

.medical-doc-editor .med-doc-clauses > li::before {
  content: counter(med-doc-clause, cjk-ideographic) "、";
  position: absolute;
  left: 0;
  text-indent: 0;
}

.medical-doc-editor .med-doc-sub-clauses {
  list-style: none;
  padding-left: 0;
  margin: 8px 0 0;
  counter-reset: med-doc-sub-clause;
}

.medical-doc-editor .med-doc-sub-clauses > li {
  counter-increment: med-doc-sub-clause;
  position: relative;
  padding-left: 28px;
  margin-bottom: 6px;
  text-indent: 0;
}

.medical-doc-editor .med-doc-sub-clauses > li::before {
  content: "(" counter(med-doc-sub-clause) ")";
  position: absolute;
  left: 0;
}

.medical-doc-editor .med-doc-settlement-sign {
  margin-top: 32px;
}

.medical-doc-editor .med-doc-settlement-date {
  text-align: right;
}

.medical-doc-editor .med-doc-terms-circled {
  list-style: none;
  padding-left: 0;
}

.medical-doc-editor .med-doc-terms-circled > li {
  position: relative;
  padding-left: 24px;
}

.medical-doc-editor .med-doc-circled-num {
  position: absolute;
  left: 0;
}

.medical-doc-editor .med-doc-check-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  vertical-align: top;
  margin-top: 2px;
}

.medical-doc-editor .med-doc-check-group label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  white-space: nowrap;
  line-height: 1.4;
  font-weight: normal;
  cursor: pointer;
}

.medical-doc-editor .med-doc-check-group input[type="checkbox"] {
  margin: 0;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  vertical-align: middle;
}

.medical-doc-editor .med-doc-check-other .med-doc-inline-fill {
  margin-left: 2px;
}

.medical-doc-editor .med-doc-risk-list {
  padding-left: 20px;
}

.medical-doc-editor .med-doc-highlight,
.medical-doc-editor .med-doc-highlight .med-doc-declaration {
  color: #1b5e20;
}

.medical-doc-editor .med-doc-declaration-title {
  margin: 16px 0 8px;
}

.medical-doc-editor .med-doc-declaration {
  text-indent: 2em;
  margin: 0 0 24px;
}

.medical-doc-editor .med-doc-sign-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  font-size: 12px;
}

.medical-doc-editor .med-doc-sign-right {
  margin-top: 48px;
  text-align: right;
}

.medical-doc-editor .med-doc-sign-right .med-doc-sign {
  margin-top: 8px;
}

.medical-doc-editor .med-doc-checklist-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 16px;
  font-size: 11px;
  table-layout: fixed;
}

.medical-doc-editor .med-doc-checklist-table th,
.medical-doc-editor .med-doc-checklist-table td {
  border: 1px solid #334155;
  padding: 4px 6px;
  vertical-align: top;
  line-height: 1.6;
}

.medical-doc-editor .med-doc-checklist-table thead th {
  text-align: center;
  background: #f1f5f9;
  font-weight: 600;
}

.medical-doc-editor .med-doc-checklist-step-col {
  width: 52px;
}

.medical-doc-editor .med-doc-checklist-no-col {
  width: 36px;
}

.medical-doc-editor .med-doc-checklist-item-col {
  width: 88px;
}

.medical-doc-editor .med-doc-checklist-check-col {
  width: 40px;
}

.medical-doc-editor .med-doc-checklist-step {
  text-align: center;
  vertical-align: middle;
  padding: 6px 4px;
}

.medical-doc-editor .med-doc-checklist-step span {
  display: block;
  line-height: 1.4;
}

.medical-doc-editor .med-doc-checklist-no,
.medical-doc-editor .med-doc-checklist-check {
  text-align: center;
  vertical-align: middle;
}

.medical-doc-editor .med-doc-checklist-note {
  display: block;
  font-size: 10px;
  color: #475569;
  margin-top: 4px;
  font-weight: normal;
}

.medical-doc-editor .med-doc-checklist-ps {
  font-size: 11px;
  line-height: 1.7;
}

.medical-doc-editor .med-doc-checklist-sign {
  text-align: right;
  padding: 8px 12px;
}

.medical-doc-editor .med-doc-subtitle {
  text-align: center;
  font-size: 16px;
  margin: 24px 0 12px;
  font-weight: 600;
}

.medical-doc-editor .med-doc-table-caption {
  text-align: center;
  margin: 16px 0 8px;
  font-size: 12px;
}

.medical-doc-editor .med-doc-asa-table .med-doc-asa-grade-col {
  width: 36px;
}

.medical-doc-editor .med-doc-asa-table .med-doc-asa-condition-col {
  width: 88px;
}

.medical-doc-editor .med-doc-fasting-table {
  font-size: 10px;
}

.medical-doc-editor .med-doc-fasting-table th,
.medical-doc-editor .med-doc-fasting-table td {
  padding: 3px 4px;
  text-align: center;
  vertical-align: middle;
}

.medical-doc-editor .med-doc-fasting-table td:first-child,
.medical-doc-editor .med-doc-fasting-table .med-doc-fasting-feed-col,
.medical-doc-editor .med-doc-fasting-table .med-doc-fasting-other-col {
  text-align: left;
}

.medical-doc-editor .med-doc-fasting-status-col {
  width: 72px;
}

.medical-doc-editor .med-doc-footnotes {
  list-style: none;
  padding-left: 0;
  margin: 8px 0 16px;
  font-size: 10px;
  color: #475569;
  counter-reset: med-doc-footnote;
}

.medical-doc-editor .med-doc-footnotes > li {
  counter-increment: med-doc-footnote;
  position: relative;
  padding-left: 20px;
  margin-bottom: 4px;
  line-height: 1.6;
}

.medical-doc-editor .med-doc-footnotes > li::before {
  content: counter(med-doc-footnote, lower-alpha) ".";
  position: absolute;
  left: 0;
}

.medical-doc-editor .med-doc-exam-consent-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 16px;
  font-size: 11px;
  table-layout: fixed;
}

.medical-doc-editor .med-doc-exam-consent-table th,
.medical-doc-editor .med-doc-exam-consent-table td {
  border: 1px solid #334155;
  padding: 4px 6px;
  vertical-align: middle;
  line-height: 1.5;
}

.medical-doc-editor .med-doc-exam-consent-table thead th {
  text-align: center;
  background: #f1f5f9;
  font-weight: 600;
}

.medical-doc-editor .med-doc-exam-price-col {
  width: 56px;
}

.medical-doc-editor .med-doc-exam-agree-col {
  width: 72px;
}

.medical-doc-editor .med-doc-exam-agree-cell {
  text-align: center;
}

.medical-doc-editor .med-doc-exam-agree-cell .med-doc-check-group {
  justify-content: center;
  gap: 4px 8px;
}

.medical-doc-editor .med-doc-asa-table-simple .med-doc-asa-condition-col {
  width: 120px;
}

.medical-doc-editor .med-doc-confirm-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 16px;
  font-size: 11px;
  table-layout: fixed;
}

.medical-doc-editor .med-doc-confirm-table th,
.medical-doc-editor .med-doc-confirm-table td {
  border: 1px solid #334155;
  padding: 4px 6px;
  vertical-align: top;
  line-height: 1.6;
}

.medical-doc-editor .med-doc-confirm-table thead th {
  text-align: center;
  background: #f1f5f9;
  font-weight: 600;
}

.medical-doc-editor .med-doc-confirm-col-doctor,
.medical-doc-editor .med-doc-confirm-col-or,
.medical-doc-editor .med-doc-confirm-col-surgery {
  width: 28%;
}

.medical-doc-editor .med-doc-confirm-col-remark {
  width: 16%;
}

.medical-doc-editor .med-doc-confirm-table label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: normal;
  cursor: pointer;
}

.medical-doc-editor .med-doc-confirm-table input[type="checkbox"] {
  margin: 0;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.medical-doc-editor .med-doc-confirm-remark {
  min-height: 320px;
}

.medical-doc-editor .med-doc-anesthesia-vitals-table,
.medical-doc-editor .med-doc-anesthesia-med-table,
.medical-doc-editor .med-doc-anesthesia-monitor {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 16px;
  font-size: 10px;
  table-layout: fixed;
}

.medical-doc-editor .med-doc-anesthesia-vitals-table th,
.medical-doc-editor .med-doc-anesthesia-vitals-table td,
.medical-doc-editor .med-doc-anesthesia-med-table th,
.medical-doc-editor .med-doc-anesthesia-med-table td,
.medical-doc-editor .med-doc-anesthesia-monitor th,
.medical-doc-editor .med-doc-anesthesia-monitor td {
  border: 1px solid #334155;
  padding: 3px 4px;
  vertical-align: middle;
  line-height: 1.4;
}

.medical-doc-editor .med-doc-anesthesia-vitals-table thead th,
.medical-doc-editor .med-doc-anesthesia-med-table thead th {
  text-align: center;
  background: #f1f5f9;
  font-weight: 600;
}

.medical-doc-editor .med-doc-anesthesia-med-table-wrap {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 16px;
}

.medical-doc-editor .med-doc-anesthesia-med-half {
  width: 50%;
  vertical-align: top;
  padding: 0 6px 0 0;
}

.medical-doc-editor .med-doc-anesthesia-med-half + .med-doc-anesthesia-med-half {
  padding: 0 0 0 6px;
}

.medical-doc-editor .med-doc-anesthesia-med-half .med-doc-anesthesia-med-table {
  margin: 4px 0 0;
}

.medical-doc-editor .med-doc-monitor-timebar,
.medical-doc-editor .med-doc-monitor-fluid-row {
  text-align: center;
  font-size: 11px;
  padding: 4px 6px;
}

.medical-doc-editor .med-doc-monitor-sidebar {
  width: 108px;
  font-size: 10px;
  vertical-align: top;
  padding: 6px;
}

.medical-doc-editor .med-doc-monitor-label {
  margin: 0 0 6px;
  line-height: 1.5;
}

.medical-doc-editor .med-doc-monitor-legend {
  list-style: none;
  padding-left: 0;
  margin: 0 0 8px;
  font-size: 10px;
}

.medical-doc-editor .med-doc-monitor-legend li {
  margin-bottom: 2px;
}

.medical-doc-editor .med-doc-monitor-timepoint {
  margin: 0 0 4px;
  font-size: 10px;
}

.medical-doc-editor .med-doc-monitor-scale {
  width: 28px;
  text-align: center;
  font-size: 9px;
  padding: 2px;
}

.medical-doc-editor .med-doc-monitor-cell {
  height: 14px;
  padding: 0;
}

.medical-doc-editor .med-doc-monitor-vital-label,
.medical-doc-editor .med-doc-monitor-vital-sub {
  font-size: 10px;
  white-space: nowrap;
}

.medical-doc-editor .med-doc-check-group-compact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

/* 麻醉记录表：按 PDF 一比一复刻，A4 单页 */
.medical-doc-editor:has(.med-doc-anesthesia-record) {
  background: #dbe3ea;
  padding: 10px;
}

.medical-doc-editor .med-doc-anesthesia-record {
  width: 210mm;
  min-width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 7mm 8mm 5mm;
  background: #fff;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.14);
  box-sizing: border-box;
  font-family: "SimSun", "NSimSun", "Songti SC", "Noto Serif SC", serif;
  font-size: 10.5pt;
  line-height: 1.25;
  color: #000;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.medical-doc-editor .med-doc-anesthesia-record,
.medical-doc-editor .med-doc-anesthesia-record * {
  font-family: "SimSun", "NSimSun", "Songti SC", "Noto Serif SC", serif;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-title {
  font-size: 16pt;
  font-weight: 700;
  margin: 0 0 1.5mm;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-align: center;
}

.medical-doc-editor .med-doc-anesthesia-record table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-info-table {
  margin: 0;
  font-size: 10.5pt;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-info-table + .med-doc-anesthesia-info-table,
.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-info-table + .med-doc-anesthesia-vitals-table,
.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-vitals-table + .med-doc-anesthesia-med-table-wrap,
.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-med-table-wrap + .med-doc-anesthesia-monitor,
.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-monitor + .med-doc-anesthesia-foot-table {
  margin-top: -1px;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-info-table td {
  border: 1px solid #000;
  padding: 0.8mm 1.6mm;
  background: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  vertical-align: middle;
  height: 6.6mm;
}

.medical-doc-editor .med-doc-anesthesia-record > table:first-of-type tr:first-child td:nth-child(2) {
  padding-left: 0.5mm;
  padding-right: 0.4mm;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-info-table td:nth-child(odd) {
  width: auto;
  background: #fff;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-staff-table td { width: 33.33%; }
.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-time-table td { width: 25%; }

.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-vitals-table {
  margin: 0;
  font-size: 8pt;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-vitals-table th,
.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-vitals-table td {
  border: 1px solid #000;
  padding: 2px 2px;
  text-align: center;
  vertical-align: middle;
  line-height: 1.15;
  background: #fff;
  font-weight: 400;
  white-space: normal;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-vitals-table tbody td {
  height: 5mm;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-unit-left {
  text-align: left;
  padding-left: 4px;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-unit-right {
  text-align: right;
  padding-right: 4px;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-med-table-wrap {
  margin: 0;
  border-collapse: collapse;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-med-half {
  width: 50%;
  padding: 0;
  vertical-align: top;
  border: 1px solid #000;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-table-caption {
  margin: 0;
  padding: 1px 4px;
  font-size: 9pt;
  text-align: left;
  font-weight: 700;
  border: 0;
  background: #fff;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-med-table {
  margin: 0;
  font-size: 8pt;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-med-table th,
.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-med-table td {
  border: 1px solid #000;
  padding: 1px 2px;
  text-align: center;
  height: 4.4mm;
  background: #fff;
  font-weight: 400;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-monitor {
  margin: 0;
  font-size: 8pt;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-monitor td {
  border: 1px solid #000;
  padding: 0 1px;
  vertical-align: middle;
  line-height: 1.1;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-col-vent { width: 8mm; }
.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-col-side { width: 36mm; }
.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-col-scale { width: 7mm; }
.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-col-grid { width: auto; }

.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-timebar,
.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-fluid-row {
  text-align: left;
  font-size: 8.5pt;
  padding: 0 3px;
  height: 4.2mm;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-fluid-unit,
.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-hour,
.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-colon {
  text-align: center;
  font-size: 8pt;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-sidebar {
  font-size: 7.5pt;
  line-height: 1.15;
  padding: 1mm 1.2mm 0.4mm;
  vertical-align: top;
  text-align: left;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-label { margin: 0 0 0.4mm; line-height: 1.15; }
.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-legend-title { margin: 0; }
.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-legend { list-style: none; margin: 0 0 0.6mm; padding: 0; }
.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-legend li { margin: 0; }
.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-timepoint { margin: 0; }
.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-asa {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0 2px;
  margin: 0 0 0.4mm;
  white-space: nowrap;
}
.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-scale { text-align: center; font-size: 6.5pt; padding: 0; line-height: 1; }
.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-plot-row { height: 4.05mm; }
.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-plot-row td {
  line-height: 1;
  overflow: hidden;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-cell {
  height: 4.05mm;
  padding: 0;
  border-left: 1px dashed #444;
  border-right: 0;
  background: #fff;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-cell-major { border-left: 1px solid #000; }

.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-num-row .med-doc-monitor-cell {
  border-bottom-style: dashed;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-thick .med-doc-monitor-cell,
.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-thick .med-doc-monitor-scale {
  border-bottom: 2px solid #000;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-vital-label,
.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-vital-sub,
.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-vent-label {
  font-size: 8pt;
  white-space: nowrap;
  padding: 0 3px;
  height: 4.2mm;
  text-align: left;
  overflow: hidden;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-monitor-vent-label {
  text-align: center;
  vertical-align: middle;
  width: 8mm;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-pdf-check {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  margin: 0 3px 0 0;
  white-space: nowrap;
  font-weight: 400;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-pdf-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 8px;
  height: 8px;
  margin: 0 0 0 1px;
  flex-shrink: 0;
  border: 1px solid #000;
  background: #fff;
  border-radius: 0;
  vertical-align: middle;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-pdf-check input[type="checkbox"]:checked {
  background: #000;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-check-group { display: inline; gap: 0; margin: 0; }
.medical-doc-editor .med-doc-anesthesia-record .med-doc-check-group-stack,
.medical-doc-editor .med-doc-anesthesia-record .med-doc-check-group-compact {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 0 4px;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-foot-table { margin: 0; font-size: 8.5pt; }
.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-foot-table > tbody > tr > td {
  border: 1px solid #000;
  padding: 1px 4px;
  vertical-align: middle;
}

.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-complications { padding: 1px 3px 2px; }
.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-complications-grid {
  width: 100%;
  border: 0;
  margin: 0;
  table-layout: fixed;
}
.medical-doc-editor .med-doc-anesthesia-record .med-doc-anesthesia-complications-grid td {
  border: 0;
  padding: 0 2px 0 0;
  font-size: 7pt;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
}

.medical-doc-footer {
  padding: 6px 12px;
  font-size: 12px;
  color: #64748b;
  border-top: 1px solid #e8eef5;
  background: #f8fafc;
  flex-shrink: 0;
}

.medical-doc-print-frame {
  display: none;
}

/* 顶部导航切换时的加载反馈 */
body.nav-loading::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 35%;
  height: 3px;
  z-index: 10000;
  background: linear-gradient(90deg, transparent, #38bdf8, #0a73c3, transparent);
  animation: nav-loading-bar 0.9s ease-in-out infinite;
  pointer-events: none;
}

/* 离开页时保持侧栏底色，减轻卸载瞬间发白 */
html.nav-leaving .sidebar,
html.nav-leaving .admin-sidebar {
  background: #f8fafc;
}

html.nav-leaving {
  cursor: progress;
}

@keyframes nav-loading-bar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
