/* ================= LIMS 使用说明书 V2.0 ================= */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --ink: #1f2937;
  --ink-2: #4b5563;
  --ink-3: #9ca3af;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --card: #ffffff;
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --radius: 10px;
  --sidebar-w: 268px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 15px;
}

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: #0f172a;
  color: #cbd5e1;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  overflow-y: auto;
  padding: 20px 0 40px;
  z-index: 50;
}
.sidebar .brand {
  padding: 0 22px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 12px;
}
.sidebar .brand .name { font-size: 18px; font-weight: 700; color: #fff; }
.sidebar .brand .sub { font-size: 12px; color: #64748b; margin-top: 2px; }
.sidebar a {
  display: block;
  color: #cbd5e1;
  text-decoration: none;
  padding: 8px 22px;
  font-size: 14px;
  border-left: 3px solid transparent;
}
.sidebar a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar a.active { background: rgba(37,99,235,.18); color: #fff; border-left-color: var(--primary); }
.sidebar .group-title {
  padding: 14px 22px 6px;
  font-size: 12px;
  color: #64748b;
  letter-spacing: 1px;
}
.sidebar .back-pad a { color: #7dd3fc; }

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 36px 48px 80px;
  max-width: 1080px;
}

/* ---------- 标题 ---------- */
h1 { font-size: 28px; margin: 0 0 6px; }
h2 {
  font-size: 21px;
  margin: 48px 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
  line-height: 1.4;
}
h3 { font-size: 17px; margin: 30px 0 10px; }
h4 { font-size: 15px; margin: 20px 0 8px; }
.page-desc { color: var(--ink-2); margin: 4px 0 24px; font-size: 15px; }

/* ---------- 组件 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 14px 0;
}
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.role-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s, transform .15s;
  display: block;
}
.role-card:hover { box-shadow: 0 6px 18px rgba(15,23,42,.08); transform: translateY(-2px); border-color: var(--primary); }
.role-card .rc-icon { font-size: 26px; }
.role-card .rc-name { font-weight: 700; font-size: 16px; margin: 6px 0 4px; }
.role-card .rc-desc { font-size: 13px; color: var(--ink-2); line-height: 1.6; }

.tag {
  display: inline-block;
  font-size: 12px;
  padding: 1px 10px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}
.tag-pc { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #bfdbfe; }
.tag-pad { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.tag-warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.tag-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.notice {
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 14px 0;
  font-size: 14px;
}
.notice.warn { background: #fffbeb; border-color: #fde68a; }
.notice.danger { background: #fef2f2; border-color: #fecaca; }
.notice .notice-title { font-weight: 700; margin-right: 6px; }

/* 步骤 */
.steps { counter-reset: step; margin: 14px 0; padding: 0; }
.steps li {
  list-style: none;
  position: relative;
  padding: 0 0 18px 46px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 2px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.steps li::after {
  content: "";
  position: absolute;
  left: 12.5px; top: 32px; bottom: 0;
  width: 1px;
  background: var(--line);
}
.steps li:last-child::after { display: none; }

/* 截图 */
.shot {
  margin: 18px 0;
  text-align: center;
}
.shot img {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(15,23,42,.08);
}
.shot.pad-shot img { max-width: 340px; }
.shot .shot-title {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 6px;
}
.shot .shot-title::before { content: "▲ "; }

/* 表格 */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  background: var(--card);
  font-size: 14px;
}
th, td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
th { background: #f1f5f9; font-weight: 600; white-space: nowrap; }
tr:nth-child(even) td { background: #fafafa; }

kbd {
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 7px;
  font-size: 13px;
  font-family: inherit;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.flow-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.flow-links a {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13px;
}

/* 流程图 */
.flowchart { margin: 18px 0; overflow-x: auto; }
.flowchart svg { max-width: 100%; height: auto; }

.footer {
  margin-top: 60px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
}

@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; flex-basis: 100%; height: auto; }
  .layout { flex-direction: column; }
  .main { margin-left: 0; padding: 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

@media print {
  .sidebar { display: none; }
  .main { margin-left: 0; max-width: none; }
  body { background: #fff; }
}
