/* ==========================================================================
   LIMS 基础样式 · Base
   重置 + 全局排版 + 通用工具类（依赖 tokens.css）
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  color: var(--text-regular);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  line-height: var(--lh-tight);
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a {
  color: var(--info);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--info-hover); }

img { max-width: 100%; display: block; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

table { border-collapse: collapse; border-spacing: 0; }

/* ===== 数字等宽：金额 / 浓度 / 编号纵向对齐 ===== */
.nui-num, .nui-mono, [data-num] {
  font-variant-numeric: tabular-nums lining-nums;
}
.nui-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ===== 文本工具 ===== */
.nui-t-ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.nui-t-secondary { color: var(--text-secondary); }
.nui-t-muted { color: var(--text-muted); }
.nui-t-strong { font-weight: var(--fw-semibold); color: var(--text-primary); }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c6d2d5; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #aebdc1; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 焦点可见性（无障碍，不只用颜色） ===== */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ===== 通用焦点环（用于按钮/输入等交互元素） ===== */
.nui-btn:focus-visible, .nui-input:focus-visible, .nui-select:focus-visible, .nui-textarea:focus-visible,
.nui-icon-btn:focus-visible, .nui-chip:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ===== 图标（线性 SVG） ===== */
.nui-icon {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
