/* ==========================================================================
   AI 获客内容工作流 —— 本页独有样式
   沿用 ../assets/site-theme.css 的设计变量，只加工作流面板与质检报告组件
   ========================================================================== */

.wf-panel,
.wf-report,
.wf-rules-wrap {
  --wf-severe: #d94a3d;
  --wf-normal: #d98a1e;
  --wf-minor: #8896a6;
  --wf-ok: var(--site-teal, #159b9d);
  --wf-radius: 10px;
}

/* ---------------------------------------------------------------- 面板外框 */
.wf-panel {
  background: var(--site-paper, #fff);
  border: 1px solid var(--site-line, #dfe5ec);
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(10, 22, 40, 0.1);
  overflow: hidden;
}

.wf-panel-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: linear-gradient(90deg, #0a1628, #12243a);
  color: #fff;
}

.wf-panel-dots {
  display: flex;
  gap: 6px;
}

.wf-panel-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.wf-panel-dots span:first-child { background: #f67219; }

.wf-panel-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.wf-panel-badge {
  margin-left: auto;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.wf-panel-body {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 0;
}

.wf-step {
  padding: 20px 22px;
  min-width: 0;
}

.wf-step-form {
  border-right: 1px solid var(--site-line, #dfe5ec);
  background: #fbfcfe;
}

.wf-step-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.wf-step-no {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--site-accent, #f67219);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wf-step-head strong {
  display: block;
  font-size: 15px;
  color: var(--site-ink, #0a1628);
}

.wf-step-head span {
  font-size: 12px;
  color: var(--site-muted, #526174);
}

/* ---------------------------------------------------------------- 表单 */
.wf-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.wf-field {
  display: block;
  min-width: 0;
}

.wf-field > span {
  display: block;
  font-size: 12px;
  color: var(--site-muted, #526174);
  margin-bottom: 4px;
}

.wf-field-full {
  grid-column: 1 / -1;
}

.wf-field input,
.wf-field select,
.wf-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1px solid var(--site-line-strong, #c7d1dc);
  border-radius: 8px;
  background: #fff;
  color: var(--site-ink, #0a1628);
  font: inherit;
  font-size: 14px;
}

.wf-field input:focus,
.wf-field select:focus,
.wf-input:focus {
  outline: none;
  border-color: var(--site-accent, #f67219);
  box-shadow: 0 0 0 3px rgba(246, 114, 25, 0.14);
}

.wf-input {
  resize: vertical;
  min-height: 104px;
  line-height: 1.7;
}

.wf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.wf-btn {
  appearance: none;
  border: 1px solid var(--site-line-strong, #c7d1dc);
  background: #fff;
  color: var(--site-ink, #0a1628);
  border-radius: 8px;
  padding: 9px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.wf-btn:hover { border-color: var(--site-accent, #f67219); color: var(--site-accent-dark, #cf4f0b); }

.wf-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.wf-btn-primary {
  background: var(--site-accent, #f67219);
  border-color: var(--site-accent, #f67219);
  color: #fff;
}

.wf-btn-primary:hover {
  background: var(--site-accent-dark, #cf4f0b);
  border-color: var(--site-accent-dark, #cf4f0b);
  color: #fff;
}

.wf-btn-block { width: 100%; }

.wf-tip {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--site-subtle, #8793a3);
  line-height: 1.7;
}

/* ---------------------------------------------------------------- 生成结果 */
.wf-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.wf-tab {
  appearance: none;
  border: 1px solid var(--site-line, #dfe5ec);
  background: #fff;
  color: var(--site-muted, #526174);
  border-radius: 999px;
  padding: 5px 13px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.wf-tab.is-active {
  background: var(--site-accent-tint, #fff1e8);
  border-color: var(--site-accent, #f67219);
  color: var(--site-accent-dark, #cf4f0b);
  font-weight: 700;
}

.wf-out {
  margin: 0;
  padding: 14px 15px;
  background: #f7f9fc;
  border: 1px dashed var(--site-line-strong, #c7d1dc);
  border-radius: var(--wf-radius);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", monospace;
  font-size: 13px;
  line-height: 1.85;
  color: #22303f;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 340px;
  overflow: auto;
}

/* ---------------------------------------------------------------- 质检区 */
.wf-step-review {
  border-top: 1px solid var(--site-line, #dfe5ec);
  background: #fbfcfe;
}

.wf-sample-btns {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wf-sample-btn {
  appearance: none;
  border: 1px solid var(--site-line, #dfe5ec);
  background: #fff;
  color: var(--site-muted, #526174);
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.wf-sample-btn:hover {
  border-color: var(--site-accent, #f67219);
  color: var(--site-accent-dark, #cf4f0b);
}

.wf-report {
  margin-top: 16px;
}

.wf-report-empty {
  margin: 0;
  padding: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--site-subtle, #8793a3);
  border: 1px dashed var(--site-line-strong, #c7d1dc);
  border-radius: var(--wf-radius);
  background: #fff;
}

/* 报告头部 */
.wf-report-card {
  background: #fff;
  border: 1px solid var(--site-line, #dfe5ec);
  border-radius: var(--wf-radius);
  padding: 18px;
}

.wf-report-card + .wf-report-card { margin-top: 14px; }

.wf-report-head {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--site-line, #dfe5ec);
  margin-bottom: 16px;
}

.wf-ring {
  --p: 0;
  --c: var(--wf-normal);
  position: relative;
  flex: 0 0 auto;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), #eef2f6 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.wf-ring::after {
  content: "";
  position: absolute;
  inset: 9px;
  background: #fff;
  border-radius: 50%;
  z-index: 0;
}

.wf-ring b {
  position: relative;
  z-index: 1;
  font-size: 28px;
  line-height: 1;
  color: var(--site-ink, #0a1628);
}

.wf-ring small {
  position: relative;
  z-index: 1;
  margin-top: 3px;
  font-size: 11px;
  color: var(--site-muted, #526174);
}

.wf-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.wf-kpi b {
  display: block;
  font-size: 19px;
  color: var(--site-ink, #0a1628);
}

.wf-kpi span {
  font-size: 11px;
  color: var(--site-muted, #526174);
}

.wf-after {
  margin-left: auto;
  text-align: right;
}

.wf-after span {
  display: block;
  font-size: 12px;
  color: var(--site-muted, #526174);
}

.wf-after b {
  font-size: 26px;
  color: var(--wf-ok);
}

.wf-up {
  font-size: 14px;
  color: var(--wf-ok);
  font-weight: 700;
}

/* 维度条 */
.wf-dim {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
  font-size: 13px;
}

.wf-dim-name {
  flex: 0 0 76px;
  color: var(--site-muted, #526174);
}

.wf-dim-bar {
  flex: 1;
  height: 8px;
  border-radius: 5px;
  background: #eef2f6;
  overflow: hidden;
}

.wf-dim-bar i {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: var(--site-accent, #f67219);
}

.wf-dim-val {
  flex: 0 0 66px;
  text-align: right;
  color: var(--site-muted, #526174);
}

/* 原文标注 */
.wf-marked {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f7f9fc;
  border: 1px solid var(--site-line, #dfe5ec);
  border-radius: var(--wf-radius);
  padding: 14px;
  font-size: 13px;
  line-height: 1.9;
  color: #22303f;
}

.wf-marked mark {
  background: #ffe3df;
  color: #a63328;
  border-radius: 3px;
  padding: 0 2px;
}

.wf-marked mark.is-minor {
  background: #eef3f7;
  color: #4c6b7d;
}

/* 问题清单 */
.wf-issue {
  border: 1px solid var(--site-line, #dfe5ec);
  border-left: 4px solid var(--wf-minor);
  border-radius: 8px;
  padding: 11px 14px;
  margin-bottom: 9px;
  background: #fff;
}

.wf-issue.is-severe { border-left-color: var(--wf-severe); }
.wf-issue.is-normal { border-left-color: var(--wf-normal); }

.wf-issue-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.wf-issue-head strong {
  font-size: 14px;
  color: var(--site-ink, #0a1628);
}

.wf-level {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #eef3f7;
  color: #4c6b7d;
}

.wf-level.is-severe { background: #fdeceb; color: var(--wf-severe); }
.wf-level.is-normal { background: #fdf4e6; color: #a96b0c; }

.wf-rid {
  font-size: 11px;
  color: #a9bcc4;
  font-family: Consolas, Menlo, monospace;
}

.wf-tag {
  font-size: 11px;
  color: var(--site-subtle, #8793a3);
  border: 1px solid var(--site-line, #dfe5ec);
  border-radius: 999px;
  padding: 1px 8px;
}

.wf-issue p {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.75;
  color: #3d4b5c;
}

.wf-issue .wf-ev {
  background: #f7f9fc;
  border: 1px dashed var(--site-line, #dfe5ec);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12.5px;
  color: #2f4252;
}

.wf-issue .wf-hint { color: var(--site-accent-dark, #cf4f0b); }
.wf-issue .wf-basis { color: var(--site-subtle, #8793a3); }

/* 优化稿 */
.wf-opt {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f4fbfa;
  border: 1px solid #cfe9e6;
  border-radius: var(--wf-radius);
  padding: 14px;
  font-size: 13px;
  line-height: 1.9;
  color: #22303f;
  max-height: 300px;
  overflow: auto;
}

.wf-edits {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: #3d4b5c;
  max-height: 190px;
  overflow: auto;
}

.wf-edits li {
  padding: 3px 0 3px 14px;
  position: relative;
  line-height: 1.7;
}

.wf-edits li::before {
  content: "·";
  position: absolute;
  left: 2px;
  color: var(--site-accent, #f67219);
  font-weight: 700;
}

.wf-sub-title {
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--site-ink, #0a1628);
}

/* ---------------------------------------------------------------- 规则表 */
.wf-rules-wrap {
  background: #fff;
  border: 1px solid var(--site-line, #dfe5ec);
  border-radius: 12px;
  overflow: auto;
  box-shadow: var(--site-shadow, 0 16px 40px rgba(10, 22, 40, 0.08));
}

.wf-rules {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 720px;
}

.wf-rules th,
.wf-rules td {
  text-align: left;
  padding: 10px 13px;
  border-bottom: 1px solid var(--site-line, #dfe5ec);
  vertical-align: top;
}

.wf-rules th {
  background: #f7f9fc;
  color: var(--site-ink, #0a1628);
  font-size: 12.5px;
  white-space: nowrap;
}

.wf-rules tbody tr:last-child td { border-bottom: none; }

.wf-rules tr.is-severe td:nth-child(4) { color: var(--wf-severe); font-weight: 700; }
.wf-rules tr.is-normal td:nth-child(4) { color: #a96b0c; font-weight: 700; }

.wf-rules-loading {
  text-align: center;
  color: var(--site-subtle, #8793a3);
  padding: 22px !important;
}

.wf-rule-id {
  font-family: Consolas, Menlo, monospace;
  font-size: 12px;
  color: #7a8b99;
  white-space: nowrap;
}

.wf-rule-name { font-weight: 700; white-space: nowrap; }

/* ---------------------------------------------------------------- 留资表单 */
.wf-lead-form h3 {
  margin: 0 0 12px;
  font-size: 17px;
  color: var(--site-ink, #0a1628);
}

.wf-lead-form .wf-field { margin-bottom: 10px; }

.wf-lead-form .wf-btn { margin-top: 4px; }

.wf-lead-msg {
  margin: 10px 0 0;
  font-size: 13px;
  min-height: 18px;
  color: var(--wf-ok);
}

.wf-lead-msg.is-error { color: var(--wf-severe); }

.wf-lead-note {
  margin: 8px 0 0;
  font-size: 11.5px;
  color: var(--site-subtle, #8793a3);
  line-height: 1.7;
}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1000px) {
  .wf-panel-body { grid-template-columns: minmax(0, 1fr); }

  .wf-step-form {
    border-right: none;
    border-bottom: 1px solid var(--site-line, #dfe5ec);
  }
}

@media (max-width: 640px) {
  .wf-step { padding: 16px; }

  .wf-fields { grid-template-columns: 1fr; }

  .wf-sample-btns {
    margin-left: 0;
    width: 100%;
    margin-top: 8px;
  }

  .wf-after {
    margin-left: 0;
    text-align: left;
    width: 100%;
  }

  .wf-ring {
    width: 84px;
    height: 84px;
  }

  .wf-ring b { font-size: 23px; }
}
