/* 信源引擎 v2.1 · 流程配置 / 消息中心 / 模型库 / 流转轨迹 */

/* 流程链路图 */
.flow-chain { display: flex; align-items: stretch; flex-wrap: wrap; gap: 0; padding: 6px 0 2px; }
.flow-node {
  min-width: 112px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; text-align: center;
}
.flow-node.manual { border-color: #bcd0ee; background: #f4f8ff; }
.flow-node.auto { border-color: #c9e6d9; background: #f3fbf7; }
.flow-node-name { font-size: 13px; font-weight: 600; color: var(--text); }
.flow-node-mode { margin-top: 4px; font-size: 12px; color: var(--text-3); }
.flow-node.manual .flow-node-mode { color: var(--blue); }
.flow-node.auto .flow-node-mode { color: var(--green); }
.flow-arrow {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 58px; font-size: 11px; color: var(--text-3); line-height: 1.4;
}
.flow-arrow span { font-size: 13px; color: var(--text-3); }
.flow-arrow.manual { color: var(--blue); }
.flow-arrow.auto { color: var(--green); }
.flow-arrow.manual span, .flow-arrow.auto span { color: inherit; }
.flow-legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.flow-legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-left: 8px; }
.flow-legend .dot.manual { background: var(--blue); }
.flow-legend .dot.auto { background: var(--green); }

.flow-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px 110px;
  gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-2);
}
.flow-row:last-child { border-bottom: 0; }
.flow-row-main .small { margin-top: 3px; }
.switch-group { display: flex; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.switch-opt {
  flex: 1; height: 30px; border: 0; background: #fff; font-size: 12px;
  color: var(--text-2); cursor: pointer; font-family: inherit;
}
.switch-opt + .switch-opt { border-left: 1px solid var(--line); }
.switch-opt.on { background: var(--blue); color: #fff; }
.switch-opt:disabled { cursor: not-allowed; color: var(--text-3); background: #f7f8fa; }
.switch-opt.on:disabled { background: #8aa4cc; color: #fff; }
.flow-row-state { text-align: right; }

/* 消息中心 */
.msg-list { display: flex; flex-direction: column; }
.msg-item {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) 110px;
  gap: 12px; align-items: start; padding: 14px 16px; border-bottom: 1px solid var(--line-2);
  cursor: pointer; background: #fff;
}
.msg-item:last-child { border-bottom: 0; }
.msg-item:hover { background: #f8fafd; }
.msg-item.unread { background: #f6f9ff; }
.msg-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--line); }
.msg-dot.red { background: var(--red); }
.msg-dot.amber { background: var(--amber); }
.msg-dot.blue { background: var(--blue); }
.msg-title { font-size: 13px; font-weight: 600; color: var(--text); }
.msg-meta { margin-top: 5px; font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-text { margin-top: 6px; font-size: 12px; color: var(--text-2); line-height: 1.7; }
.msg-side { text-align: right; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

/* 流转轨迹 */
.timeline { padding: 4px 0 4px 6px; }
.tl-item { position: relative; padding: 0 0 20px 24px; border-left: 1px solid var(--line); }
.tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -5px; top: 3px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--blue); border: 2px solid #fff;
}
.tl-dot.auto { background: var(--green); }
.tl-dot.cron { background: var(--amber); }
.tl-body { min-width: 0; }
.tl-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tl-head .badge { font-weight: 400; }
.tl-result { margin-top: 5px; font-size: 13px; color: var(--text-2); }
.tl-item:hover .tl-head b { color: var(--blue); cursor: pointer; }

/* 版本对比 */
.diff-box { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.diff-cols { display: grid; grid-template-columns: 1fr 1fr; }
.diff-col + .diff-col { border-left: 1px solid var(--line); }
.diff-head {
  padding: 9px 12px; background: #f8fafc; border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--text-3); font-weight: 600;
}
.diff-line {
  padding: 9px 12px; font-size: 13px; line-height: 1.75; border-bottom: 1px solid var(--line-2);
  white-space: pre-wrap; word-break: break-word; color: var(--text);
}
.diff-line.same { color: var(--text-2); }
.diff-line.add { background: var(--green-bg); border-left: 3px solid var(--green); }
.diff-line.del { background: var(--red-bg); border-left: 3px solid var(--red); text-decoration: line-through; color: #8a4a4a; }
.diff-line:last-child { border-bottom: 0; }

/* 修改要求 */
.req-list { display: flex; flex-direction: column; gap: 10px; }
.req-item { border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 5px; padding: 12px 14px; background: #fffdf8; }
.req-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.req-head .code { font-family: Consolas, monospace; font-size: 12px; color: var(--text-3); }
.req-desc { margin-top: 7px; font-size: 13px; color: var(--text); line-height: 1.7; }
.req-kv { margin-top: 7px; display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }

/* 文章详情 */
.article-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.article-head > div:first-child { min-width: 0; }

/* 复选框 */
.checkbox { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); cursor: pointer; }

/* 待人工登记 */
.card-warn { border-color: #f0dcb4; }
.card-sub { font-size: 12px; color: var(--text-3); font-weight: 400; }
.card-note { padding: 10px 16px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--text-3); background: #fcfdff; border-radius: 0 0 var(--radius) var(--radius); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 11px; line-height: 18px; }
.tag-manual { background: #eef4ff; color: var(--blue); }
.url-cell { display: inline-block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: top; }

/* 模型卡片/表单内的小标记 */
.model-default { color: var(--blue); }

@media (max-width: 1080px) {
  .flow-row { grid-template-columns: minmax(0, 1fr); }
  .flow-row-state { text-align: left; }
  .msg-item { grid-template-columns: 10px minmax(0, 1fr); }
  .msg-side { flex-direction: row; align-items: center; grid-column: 2; }
  .diff-cols { grid-template-columns: 1fr; }
  .diff-col + .diff-col { border-left: 0; border-top: 1px solid var(--line); }
}
