/* 移动端 iOS 底部安全区适配 */
:root {
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: var(--safe-bottom);
}

/* 自定义纤细滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}

/* 移动端底部固定导航留白缓冲 */
.mobile-nav-spacer {
  padding-bottom: calc(4.5rem + var(--safe-bottom));
}

/* 卡片轻微悬浮动画 */
.card-hover-effect {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card-hover-effect:active {
  transform: scale(0.985);
}

/* 化验指标异常呼吸灯效果 */
@keyframes critical-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.05); }
}
.pulse-critical {
  animation: critical-pulse 2s infinite ease-in-out;
}

/* 打印时隐藏导航栏 */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    background: white !important;
    color: black !important;
  }
}
