/* ============================================================
   rfq.模具设计.中国 — 询价表单与路由预览样式
   ============================================================ */

.page-intro { max-width: 820px; }
.page-intro h1 { margin-bottom: 12px; }
.page-intro p { font-size: 16px; color: var(--ink-2); line-height: 1.85; margin: 0; }
.req-inline { color: #d13b3b; font-weight: 700; }

.rfq-layout {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px; align-items: start;
}
.rfq-main { min-width: 0; }
.rfq-side { position: sticky; top: calc(var(--nav-h) + 20px); display: grid; gap: 18px; }

.form-block {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px 8px; margin-bottom: 22px; background: #fff;
}
.form-block > h2, .form-block > h3 {
  font-size: 18px; margin: 0 0 6px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.form-block .fb-no {
  font-size: 12.5px; font-weight: 700; letter-spacing: .6px; color: #fff;
  background: var(--brand); border-radius: 6px; padding: 2px 8px;
}
.form-block .fb-hint { font-size: 13.5px; color: var(--ink-3); margin: 0 0 18px; }

.f-row {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px;
  margin-bottom: 18px;
}
.f-row.one { grid-template-columns: minmax(0, 1fr); }
.f-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f-field label, .f-legend {
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 6px;
}
.req::after { content: "*"; color: #d13b3b; font-weight: 700; }
.f-field input[type="text"], .f-field input[type="tel"],
.f-field input[type="email"], .f-field input[type="number"],
.f-field select, .f-field textarea {
  width: 100%; font: inherit; font-size: 14.5px; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-s);
  background: #fff; transition: border-color .18s, box-shadow .18s;
}
.f-field input:focus, .f-field select:focus, .f-field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 98, 214, .12);
}
.f-field textarea { min-height: 92px; resize: vertical; line-height: 1.7; }
.f-field input::placeholder, .f-field textarea::placeholder { color: #a9b8c9; }

fieldset { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
.f-legend { padding: 0; margin-bottom: 10px; }

.chk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.chk-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chk {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 8px;
  font-size: 14px; color: var(--ink-2); cursor: pointer; background: #fff;
  transition: border-color .18s, background .18s; min-width: 0;
}
.chk:hover { border-color: var(--brand); }
.chk input { accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.chk input:checked + span { color: var(--brand); font-weight: 600; }

.file-drop {
  border: 1.5px dashed var(--line-2); border-radius: var(--radius-s);
  padding: 20px; text-align: center; background: var(--bg-soft); cursor: pointer;
  transition: border-color .18s, background .18s;
}
.file-drop:hover { border-color: var(--brand); background: var(--brand-soft); }
.file-drop input { display: none; }
.file-drop .fd-t { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.file-drop .fd-s { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
#file-list { margin-top: 12px; font-size: 13.5px; }
#file-list .file-empty { color: var(--ink-3); }
#file-list ul { list-style: none; margin: 0; padding: 0; }
#file-list li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  margin-bottom: 6px; background: #fff; color: var(--ink-2);
}
#file-list .file-size { color: var(--ink-3); font-size: 12.5px; flex: none; }

.check-line {
  display: flex; align-items: flex-start; gap: 9px; font-size: 14px;
  color: var(--ink-2); margin-bottom: 18px; cursor: pointer;
}
.check-line input { accent-color: var(--brand); margin-top: 4px; flex: none; }

.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 4px 0 8px; }

.form-status {
  display: none; font-size: 13.8px; line-height: 1.75; color: var(--ink-2);
  background: var(--amber-soft); border: 1px solid #f0dcb4;
  border-radius: var(--radius-s); padding: 14px 16px; margin-top: 14px;
}
.form-status.show { display: block; }

.summary-box-out {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-top: 20px; background: var(--bg-soft);
}
.summary-box-out h3 { font-size: 16px; margin: 0 0 12px; }
.summary-pre {
  white-space: pre-wrap; word-break: break-word;
  font-family: "SFMono-Regular", Consolas, "Microsoft YaHei", monospace;
  font-size: 12.8px; line-height: 1.75; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 14px 16px; margin: 0; max-height: 380px; overflow: auto;
}

/* 分流结果 */
.route-box {
  border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 20px; background: linear-gradient(160deg, #fff 0%, var(--bg-soft) 100%);
}
.route-box h3 { font-size: 16px; margin: 0 0 10px; }
.route-lead { font-size: 13.8px; color: var(--ink-2); margin: 0 0 12px; }
.route-empty { font-size: 13.8px; color: var(--ink-3); margin: 0; }
.route-list { list-style: none; margin: 0; padding: 0; }
.route-list li {
  display: grid; grid-template-columns: auto auto; gap: 2px 10px;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.route-list li:last-child { border-bottom: 0; }
.rt-name { font-size: 14.2px; font-weight: 600; color: var(--ink); }
.rt-tag {
  font-size: 11.5px; color: var(--brand); background: var(--brand-soft);
  padding: 1px 7px; border-radius: 5px; justify-self: end; font-family: Consolas, monospace;
}
.rt-why { grid-column: 1 / -1; font-size: 12.8px; color: var(--ink-3); line-height: 1.6; }
.route-note {
  font-size: 12.8px; color: var(--brand-dark); background: var(--brand-soft);
  border-radius: 8px; padding: 10px 12px; margin: 12px 0 0; line-height: 1.65;
}

.side-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff;
}
.side-card h3 { font-size: 15.5px; margin: 0 0 12px; }
.side-card ul { margin: 0; padding-left: 18px; font-size: 13.8px; color: var(--ink-2); }
.side-card li { margin-bottom: 7px; }
.side-card li:last-child { margin-bottom: 0; }
.side-card .sc-flow { list-style: none; padding: 0; counter-reset: sfc; }
.side-card .sc-flow li { counter-increment: sfc; position: relative; padding-left: 26px; margin-bottom: 10px; }
.side-card .sc-flow li::before {
  content: counter(sfc); position: absolute; left: 0; top: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* 分流引擎流程图 */
.flowmap { display: grid; gap: 0; margin: 30px 0; }
.flowmap-row {
  display: grid; grid-template-columns: 200px minmax(0, 1fr);
  gap: 20px; padding: 18px 20px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff; align-items: start;
}
.flowmap-row + .flowmap-row { margin-top: 12px; }
.flowmap-key {
  font-size: 14.5px; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.flowmap-key code {
  font-size: 11.5px; background: var(--brand); color: #fff;
  padding: 1px 7px; border-radius: 5px; font-family: Consolas, monospace;
}
.flowmap-val { font-size: 14.2px; color: var(--ink-2); margin: 0; }
.flowmap-val b { color: var(--ink); }

@media (max-width: 1080px) {
  .rfq-layout { grid-template-columns: minmax(0, 1fr); }
  .rfq-side { position: static; }
  .chk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flowmap-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

@media (max-width: 640px) {
  .rfq-layout { padding: 0 18px; }
  .form-block { padding: 20px 16px 6px; }
  .f-row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .chk-grid, .chk-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-pre { font-size: 12px; }
}