/* ==========================================================================
   sop.css —— SOP 正文页版式（文档卡片）
   适用：sop/*-sop.html 全部 12 个岗位 / 专项 SOP 页面
   依赖：必须先引入 base.css（提供变量、重置、body 基础、footer）
   ========================================================================== */

/* SOP 正文段落长，行距比索引页放宽；2026-10-20 放宽到 1080px——checklist 表列多，
   880px 时"编号/备份层"等短列被挤到逐字折行，观感差 */
body { padding: 40px 16px; line-height: 1.8; }
.container { max-width: 1080px; }

/* --- 文档卡片 ------------------------------------------------------------ */
.doc {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: 10px;
  padding: 40px 48px;
  box-shadow: var(--shadow-card);
}

h1 {
  font-size: 26px;
  color: var(--c-primary);
  text-align: center;
  margin-bottom: 6px;
}

.subtitle {
  text-align: center;
  color: #8a97a5;
  font-size: 14px;
  margin-bottom: 24px;
}

/* --- 版本 / 发布日期 / 适用岗位 元信息条 --------------------------------- */
.doc-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--c-muted);
  border-top: 1px solid #eef2f6;
  border-bottom: 1px solid #eef2f6;
  padding: 10px 0;
  margin-bottom: 28px;
}
.doc-meta span b { color: var(--c-primary-3); }

/* --- 章节标题与正文 ------------------------------------------------------ */
h2 {
  font-size: 19px;
  color: var(--c-primary);
  margin: 28px 0 12px;
  padding-left: 10px;
  border-left: 4px solid var(--c-primary);
}

p { margin-bottom: 10px; }

h3 {
  font-size: 16px;
  color: var(--c-primary-2);
  margin: 22px 0 8px;
}

/* --- 一句话规则横幅（流程制度页顶部） ------------------------------------ */
.banner {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-2) 100%);
  color: var(--c-white);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  margin: 16px 0 20px;
  font-size: 15px;
  line-height: 1.9;
  box-shadow: var(--shadow-card);
}
.banner strong, .banner b { color: #ffd98a; }
.banner .sub { display: block; font-size: 13px; color: #cfdcec; margin-top: 6px; }

/* --- 行内高亮：时间点 / 硬指标 / 判定结果 -------------------------------- */
.hl {
  background: #fdf0c8;
  color: #8a5b00;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
}
.hl-red   { background: #fde2e2; color: #9c0006; font-weight: 600; padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.hl-green { background: #e2efda; color: #1e6b34; font-weight: 600; padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.hl-blue  { background: #e3eefb; color: var(--c-primary); font-weight: 600; padding: 1px 6px; border-radius: 3px; white-space: nowrap; }

/* 小徽标：通过/不通过、涉及/不涉及、责任归属 */
.badge {
  display: inline-block;
  font-size: 12px;
  padding: 1px 9px;
  border-radius: 10px;
  white-space: nowrap;
  font-weight: 600;
}
.badge.green { background: #e2efda; color: #1e6b34; border: 1px solid #c6e3d0; }
.badge.red   { background: #fde2e2; color: #9c0006; border: 1px solid #f3d0d0; }
.badge.amber { background: #fdf0c8; color: #8a5b00; border: 1px solid #f0dfb0; }
.badge.grey  { background: #f2f4f6; color: #6b7a88; border: 1px solid #dde3e9; }

/* --- 时间轴（横向节点，时间点规则页用） ---------------------------------- */
.timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 20px;
}
.tl-item {
  flex: 1 1 180px;
  background: #fbfcfe;
  border: 1px solid var(--c-line);
  border-top: 3px solid var(--c-primary-4);
  border-radius: var(--radius-sm);
  padding: 10px 14px 12px;
}
.tl-item.key   { border-top-color: var(--c-primary); background: var(--c-tint); }
.tl-item.warn  { border-top-color: #e6a23c; }
.tl-item.ok    { border-top-color: #2f7d4f; }
.tl-time { font-size: 13px; font-weight: 700; color: var(--c-primary); }
.tl-text { font-size: 13px; color: var(--c-ink); margin-top: 4px; line-height: 1.7; }

/* --- 建议模板（等宽文本块，与 .flow 区分：实线边框） --------------------- */
.template {
  background: #fafbfc;
  border: 1px solid var(--c-line-2);
  border-left: 4px solid var(--c-primary-4);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #34495e;
  line-height: 1.9;
  margin: 12px 0 16px;
  white-space: pre-wrap;
}

/* --- 步骤与列表 ---------------------------------------------------------- */
ol.steps { margin: 0 0 10px 24px; }
ol.steps > li { margin-bottom: 10px; }
ul { margin: 0 0 10px 24px; }
ul li { margin-bottom: 4px; }

/* --- 提示块 -------------------------------------------------------------- */
.note {
  background: #f7fafd;
  border-left: 4px solid #4a90d9;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--c-primary-3);
  margin: 12px 0;
}

.warn {
  background: #fdf6ec;
  border-left: 4px solid #e6a23c;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: #a0742a;
  margin: 12px 0;
}

/* --- checklist 表格 ------------------------------------------------------ */
table.checklist {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
}
table.checklist th,
table.checklist td {
  border: 1px solid var(--c-line);
  padding: 10px 14px;
  font-size: 14px;
  text-align: left;
}
table.checklist th {
  background: var(--c-tint);
  color: var(--c-primary);
  font-weight: 600;
  white-space: nowrap; /* 表头都是短语（备份层 / 编号 / 关卡），禁止逐字竖排折行 */
}

/* --- 流程示意（等宽字体文本框） ------------------------------------------ */
.flow {
  background: #f7fafd;
  border: 1px dashed #b9cde3;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: #34495e;
  margin: 14px 0 18px;
  line-height: 2;
  white-space: pre-wrap;
}

/* --- 行内小标签（可选，正文中标注环节用） -------------------------------- */
.phase-tag {
  display: inline-block;
  font-size: 12px;
  background: var(--c-tint);
  color: var(--c-primary);
  padding: 1px 10px;
  border-radius: 10px;
  margin-right: 6px;
  vertical-align: middle;
}

/* --- 底部返回按钮 -------------------------------------------------------- */
.back { text-align: center; margin-top: 24px; }

.back a {
  display: inline-block;
  color: var(--c-primary);
  text-decoration: none;
  border: 1px solid #b9cde3;
  border-radius: 20px;
  padding: 6px 24px;
  font-size: 14px;
}
.back a:hover { background: var(--c-tint); }
