/* 同步中台在 kp.css 之上的补充样式 */
.hd-label { color: var(--text-2); }
.hd-rel { width: 220px; height: 30px; }
.hd-bell { position: relative; display: inline-flex; cursor: pointer; color: var(--text-2); padding: 4px; }
.hd-bell:hover { color: var(--primary); }
.hd-bell svg { width: 18px; height: 18px; }
.hd-bell .dot { display: none; position: absolute; right: 3px; top: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.hd-bell.has .dot { display: block; }

/* 主页 */
.dash { display: flex; flex-direction: column; gap: 15px; }
.dash-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.dash-stat { background: var(--panel); border-radius: 6px; padding: 16px 18px; cursor: default; }
.dash-stat.link { cursor: pointer; }
.dash-stat.link:hover { box-shadow: 0 2px 10px rgba(46, 81, 255, .12); }
.dash-stat .t { color: var(--text-2); display: flex; justify-content: space-between; }
.dash-stat .n { font-size: 28px; font-weight: 600; margin: 8px 0 4px; font-family: Arial, sans-serif; }
.dash-stat .n small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.dash-stat .s { font-size: 12px; color: var(--muted); }
.dash-stat.ok .n { color: #00a121; }
.dash-stat.danger .n { color: var(--danger); }
.dash-stat.warn .n { color: #e07000; }
.dash-row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 15px; }
.dash-row .panel { margin: 0; }
.flow { display: flex; align-items: stretch; gap: 10px; }
.flow-node { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 6px; padding: 12px 14px; background: #fcfdff; }
.flow-node .hd { display: flex; align-items: center; justify-content: space-between; color: var(--primary); margin-bottom: 8px; }
.flow-node .hd svg { width: 22px; height: 22px; }
.flow-node b { display: block; margin-bottom: 6px; }
.flow-node div.l { color: var(--text-2); font-size: 12px; line-height: 1.8; word-break: break-all; }
.flow-arrow { display: flex; flex-direction: column; justify-content: center; align-items: center; color: #8796bf; font-size: 12px; min-width: 64px; }
.flow-arrow svg { width: 40px; height: 18px; }
.todo-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #f0f1f5; }
.todo-item:last-child { border-bottom: 0; }
.todo-item .tx { flex: 1; }
.todo-item .tx b { display: block; margin-bottom: 4px; }
.todo-item .tx span { color: var(--muted); font-size: 12px; line-height: 1.7; }

/* 提示条 */
.note { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: 4px; background: var(--primary-light); color: #4f63b8; line-height: 1.7; font-size: 12px; }
.note.warn { background: #fff7e8; color: #a8701a; }
.note.danger { background: #ffece8; color: #c03b36; }

/* 配置卡片 */
.cfg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 15px; }
.cfg-card { background: var(--panel); border-radius: 6px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.cfg-card .hd { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.cfg-card .hd .spacer { flex: 1; }
.cfg-card .hd svg { width: 20px; height: 20px; color: var(--primary); }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.cfg-card .ft { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; color: var(--muted); font-size: 12px; }
.cfg-card .ft .spacer { flex: 1; }
.mono { font-family: Consolas, Menlo, monospace; font-size: 12px; }

/* 表单弹窗 */
.fm { display: grid; grid-template-columns: 110px 1fr; gap: 12px 12px; align-items: center; min-width: 460px; }
.fm > label { text-align: right; color: var(--text); }
.fm > label.req::before { content: "*"; color: var(--danger); margin-right: 2px; }
.fm .input, .fm .select { width: 100%; height: 32px; }
.fm .hint { grid-column: 2; color: var(--muted); font-size: 12px; margin-top: -6px; line-height: 1.6; }
.fm .full { grid-column: 1 / -1; }

/* 测试结果 */
.steps { display: flex; flex-direction: column; gap: 10px; min-width: 520px; }
.step { display: flex; gap: 10px; align-items: flex-start; }
.step i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; color: #fff; background: #c9cdd4; }
.step.ok i { background: #00b42a; }
.step.fail i { background: var(--danger); }
.step .tx b { display: block; }
.step .tx span { color: var(--text-2); font-size: 12px; word-break: break-all; }

/* 同步弹窗、任务进度 */
.sync-sum { display: flex; gap: 24px; padding: 12px 16px; background: #f6f8ff; border-radius: 6px; margin-bottom: 12px; }
.sync-sum b { font-size: 22px; margin-right: 4px; font-family: Arial, sans-serif; }
.mode-card { display: flex; gap: 8px; border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.mode-card:has(input:checked) { border-color: #a6b4ff; background: #f7f9ff; }
.mode-card.disabled { opacity: .5; cursor: not-allowed; }
.mode-card p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.progress { height: 6px; background: #e9edff; border-radius: 3px; overflow: hidden; margin: 8px 0 12px; }
.progress i { display: block; height: 100%; background: var(--primary); transition: width .3s; }
.wrap-cell { white-space: normal !important; line-height: 1.6; padding-top: 6px !important; padding-bottom: 6px !important; }

/* 策略 */
.pol-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 4px; border-bottom: 1px solid #f0f1f5; }
.pol-row:last-child { border-bottom: 0; }
.pol-row h4 { margin: 0 0 6px; font-size: 14px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.pol-row p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.pol-row .ctl { flex: none; display: flex; gap: 12px; }

/* 模板编辑 */
.tpl-editor { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.tpl-editor textarea { flex: 1; min-height: 220px; font-family: Consolas, Menlo, monospace; font-size: 12px; line-height: 1.6; white-space: pre; }
.tpl-result { max-height: 280px; display: flex; flex-direction: column; }

@media (max-width: 1100px) {
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-row { grid-template-columns: 1fr; }
  .hd-rel { width: 150px; }
}
