﻿/* ============================================================
   订单全流程跟踪  /digital-platform/order-tracking
   复用 quality-trace 的基础 UI（shell / hero / 查询卡 / 结果卡）
   本文件只负责工序时间线与客服入口
   ============================================================ */

/* ---------- 订单概览：进度条 ---------- */
.ot-progress { margin: 0 0 4px; }
.ot-progress__top {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px;
  font-size: 13px; color: var(--qt-ink-2);
}
.ot-progress__top b { font-size: 22px; font-weight: 700; color: var(--qt-ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ot-progress__top b i { font-style: normal; font-size: 13px; font-weight: 500; color: var(--qt-muted); margin-left: 2px; }
.ot-progress__top .ot-progress__now { margin-left: auto; font-size: 12.5px; color: var(--qt-muted); }
.ot-progress__top .ot-progress__now b { font-size: 12.5px; font-weight: 600; color: var(--qt-accent-600); letter-spacing: 0; }
.ot-progress__bar {
  position: relative; margin-top: 10px; height: 6px; border-radius: 999px;
  background: #eef2f9; overflow: hidden;
}
.ot-progress__bar i {
  display: block; height: 100%; border-radius: 999px; width: 100%;
  background: linear-gradient(90deg, #2f52bf, #4b6fd8 60%, #ff9117);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 1.1s cubic-bezier(.22,.75,.3,1) .1s;
}
.qt-block.is-in .ot-progress__bar i { transform: scaleX(var(--p, .5)); }

/* ---------- 工序时间线 ---------- */
.ot-steps { position: relative; margin: 18px 0 0; padding: 0; list-style: none; }

.ot-step { position: relative; padding: 0 0 6px 44px; }
.ot-step:last-child { padding-bottom: 0; }

/* 竖向轨道 */
.ot-step::before {
  content: ""; position: absolute; left: 15px; top: 22px; bottom: -6px; width: 2px;
  background: #e3eaf6;
}
.ot-step:last-child::before { display: none; }
.ot-step.is-done::before { background: linear-gradient(180deg, #2744a8, #7f9ada); }
.ot-step.is-doing::before,
.ot-step.is-todo::before {
  background: repeating-linear-gradient(180deg, #dbe4f4 0 5px, transparent 5px 10px);
}

/* 节点圆点 */
.ot-step__dot {
  position: absolute; left: 7px; top: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 2px solid #cbd8ee; color: #fff; z-index: 1;
}
.ot-step__dot svg { width: 11px; height: 11px; }
.ot-step.is-done .ot-step__dot { background: #2744a8; border-color: #2744a8; }
.ot-step.is-doing .ot-step__dot {
  width: 20px; height: 20px; left: 6px; top: 2px;
  background: #ff9117; border-color: #ff9117;
  box-shadow: 0 0 0 5px rgba(255, 145, 23, .16);
  animation: qt-pulse 2.6s ease-out infinite;
}
.ot-step__dot i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.ot-step.is-todo .ot-step__dot { background: #fff; border-color: #cfd9ea; }

/* 节点内容 */
.ot-step__body { padding: 0 0 18px; }
.ot-step.is-doing .ot-step__body {
  margin: -6px 0 14px -12px;
  padding: 12px 14px 14px;
  border: 1px solid #ffe0bd;
  border-radius: 10px;
  background: linear-gradient(120deg, #fffaf3, #fff);
  box-shadow: 0 12px 26px -22px rgba(180, 90, 10, .6);
}

.ot-step__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ot-step__name { font-size: 14.5px; font-weight: 600; color: var(--qt-ink); letter-spacing: .01em; }
.ot-step__time {
  margin-left: auto; font-size: 12px; color: var(--qt-muted);
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.ot-step__desc { margin: 6px 0 0; font-size: 13px; line-height: 1.72; color: var(--qt-ink-2); }
.ot-step.is-todo .ot-step__name { color: #8d9bb0; font-weight: 500; }
.ot-step.is-todo .ot-step__desc { color: #a3aec0; }

/* 状态标签 */
.ot-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  border: 1px solid transparent; white-space: nowrap;
}
.ot-pill--done { background: #eef8f3; color: #12805c; border-color: #cfe9dd; }
.ot-pill--doing { background: #fff4e6; color: #b45309; border-color: #ffd9a8; }
.ot-pill--todo { background: #f4f6fa; color: #8593a8; border-color: #e6ecf5; }
.ot-pill--ship { background: #eef2fe; color: #2f4fa8; border-color: #d8e2fa; }

/* 最新节点标注 */
.ot-step__latest {
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  color: #c46a02; background: #fff1de; border: 1px solid #ffd9a8;
  padding: 1px 6px; border-radius: 4px;
}

/* ---------- 客服入口 ---------- */
.ot-support { padding: 0 0 48px; background: #f5f7fb; }
.ot-support__card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
  padding: 20px 22px; border-radius: 14px;
  border: 1px solid #e2e9f5;
  background: linear-gradient(120deg, #fff, #f7faff);
  box-shadow: 0 14px 34px -30px rgba(15, 32, 78, .5);
}
.ot-support__ico {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2f52bf, #1f3687); color: #fff;
}
.ot-support__ico svg { width: 20px; height: 20px; }
.ot-support__txt { flex: 1 1 260px; min-width: 0; }
.ot-support__txt b { display: block; font-size: 15px; color: var(--qt-ink); }
.ot-support__txt span { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.7; color: var(--qt-muted); }
.ot-support__acts { display: flex; flex-wrap: wrap; gap: 10px; }
.ot-support__acts a {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  border: 1px solid #dbe3f0; background: #fff; color: var(--qt-ink-2);
  transition: border-color .2s ease, color .2s ease, background .2s ease, transform .15s ease;
}
.ot-support__acts a:hover { transform: translateY(-1px); border-color: var(--qt-primary); color: var(--qt-primary); background: #f8faff; }
.ot-support__acts a.is-primary {
  border-color: transparent; color: #fff;
  background: linear-gradient(135deg, #2f52bf, #1f3687);
  box-shadow: 0 10px 22px -14px rgba(39, 68, 168, .8);
}
.ot-support__acts a.is-primary:hover { color: #fff; }
.ot-support__acts svg { width: 15px; height: 15px; }

/* ---------- 打印：凭证 ---------- */
.ot-voucher { display: none; }

@media print {
  .ot-step { padding-left: 34px; padding-bottom: 2px; }
  .ot-step__body { padding-bottom: 8px; }
  .ot-step.is-doing .ot-step__body {
    margin: 0 0 6px 0; padding: 7px 10px; box-shadow: none;
    border-color: #d3dae8; background: #f7f9fd;
  }
  .ot-step__name { font-size: 12px; }
  .ot-step__desc { font-size: 11px; margin-top: 3px; }
  .ot-step__time { font-size: 10.5px; }
  .ot-step::before { top: 18px; }
  .ot-pill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ot-progress__bar i { transform: scaleX(var(--p, .5)) !important; }
  .ot-support { display: none !important; }
  .ot-voucher {
    display: block; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid #0b1436;
  }
  .ot-voucher__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
  .ot-voucher__brand { font-size: 15px; font-weight: 700; color: #0b1436; letter-spacing: .02em; }
  .ot-voucher__brand span { display: block; margin-top: 3px; font-size: 10.5px; font-weight: 400; color: #64748b; letter-spacing: .06em; }
  .ot-voucher__title { font-size: 19px; font-weight: 700; letter-spacing: .06em; color: #0b1436; text-align: right; }
  .ot-voucher__code { margin-top: 2px; font-size: 10.5px; color: #64748b; text-align: right; }
}

@media (max-width: 639px) {
  .ot-step { padding-left: 38px; }
  .ot-step__time { width: 100%; margin-left: 0; order: 3; }
  .ot-step__body { padding-bottom: 16px; }
  .ot-support { padding-bottom: 36px; }
  .ot-support__card { padding: 16px; gap: 12px; }
  .ot-support__acts { width: 100%; }
  .ot-support__acts a { flex: 1 1 auto; justify-content: center; }
  .ot-progress__top .ot-progress__now { margin-left: 0; }
}

/* 示例订单号按钮（与追溯页示例样式一致） */
.ot-demo {
  border: 0; background: var(--qt-primary-50); color: var(--qt-primary);
  padding: 4px 9px; border-radius: 6px; cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; letter-spacing: .02em;
}
.ot-demo:hover { background: #e2e9ff; }

/* ---------- 工序明细（每道工序的关键数据） ---------- */
.ot-step__meta {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; margin: 10px 0 0;
  background: #eaeff8; border: 1px solid #eaeff8; border-radius: 9px; overflow: hidden;
}
.ot-step__meta > div { background: #fff; padding: 8px 11px; min-width: 0; }
.ot-step__meta dt { margin: 0 0 3px; font-size: 11px; color: #8b98ac; letter-spacing: .01em; }
.ot-step__meta dd { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--qt-ink); font-weight: 500; word-break: break-word; }
.ot-step.is-doing .ot-step__meta { background: #f3e7d7; border-color: #f3e7d7; }
.ot-step.is-doing .ot-step__meta > div { background: #fffdf9; }
.ot-step.is-todo .ot-step__meta { background: #eef2f8; border-color: #eef2f8; }
.ot-step.is-todo .ot-step__meta dd { color: #93a0b3; font-weight: 400; }

/* 进度汇总小标签 */
.ot-progress__sum { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ot-progress__sum em {
  font-style: normal; font-size: 11.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; border: 1px solid transparent;
}
.ot-progress__sum .is-done { color: #12805c; background: #eef8f3; border-color: #cfe9dd; }
.ot-progress__sum .is-doing { color: #b45309; background: #fff4e6; border-color: #ffd9a8; }
.ot-progress__sum .is-todo { color: #8593a8; background: #f4f6fa; border-color: #e6ecf5; }

@media (max-width: 639px) {
  .ot-progress__sum { width: 100%; order: 4; }
  .ot-step__meta { grid-template-columns: 1fr; }
  .ot-step__meta > div { padding: 7px 10px; }
}

@media print {
  .ot-step__meta { margin-top: 5px; border-radius: 5px; }
  .ot-step__meta > div { padding: 4px 7px; }
  .ot-step__meta dt { font-size: 9px; margin-bottom: 1px; }
  .ot-step__meta dd { font-size: 10px; line-height: 1.4; }
  .ot-progress__sum { display: none !important; }
}

/* 明细网格：单行单列时铺满，空槽不再露出底色 */
.ot-step__meta { gap: 0; background: #fff; border-color: #e9eff8; }
.ot-step__meta > div { background: #fff; box-shadow: inset -1px 0 0 #e9eff8, inset 0 -1px 0 #e9eff8; }
.ot-step__meta > div:only-child { grid-column: 1 / -1; }
.ot-step.is-doing .ot-step__meta { background: #fffdf9; border-color: #f0e3d2; }
.ot-step.is-doing .ot-step__meta > div { background: #fffdf9; box-shadow: inset -1px 0 0 #f0e3d2, inset 0 -1px 0 #f0e3d2; }
.ot-step.is-todo .ot-step__meta { background: #fbfcfe; border-color: #ecf1f8; }
.ot-step.is-todo .ot-step__meta > div { background: #fbfcfe; box-shadow: inset -1px 0 0 #ecf1f8, inset 0 -1px 0 #ecf1f8; }

/* 工序之间留出呼吸 */
.ot-step__body { padding-bottom: 24px; }
.ot-step { padding-bottom: 8px; }
.ot-step.is-doing .ot-step__body { padding-bottom: 22px; }

@media (max-width: 639px) {
  .ot-step__body { padding-bottom: 20px; }
}

/* ============================================================
   工序流转轨迹（横向曲线，全宽大气版）
   ============================================================ */
.ot-fl { margin: 6px 0 0; }

.ot-fl__scroll {
  position: relative;
  margin: 0;
  padding: 2px 0 6px;
  overflow-x: hidden; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.ot-fl__scroll { scrollbar-width: none; -ms-overflow-style: none; }
.ot-fl__scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* 舞台：承载左右翻页按钮 */
.ot-fl__stage { position: relative; }

/* 特效裁剪层：光晕 / 扫描光在里面画，不撑大滚动宽度 */
.ot-fl__fx {
  position: absolute; inset: 0; overflow: hidden;
  border-radius: 16px; pointer-events: none;
}

/* 窄屏翻页按钮 */
.ot-fl__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; padding: 0;
  display: none; align-items: center; justify-content: center;
  border: 1px solid #dbe5f4; border-radius: 50%;
  background: rgba(255, 255, 255, .96); color: #2b47a2;
  box-shadow: 0 8px 20px -10px rgba(17, 34, 89, .5);
  cursor: pointer; z-index: 4;
  transition: opacity .18s ease, border-color .18s ease;
}
.ot-fl__nav svg { width: 15px; height: 15px; }
.ot-fl__nav.is-prev { left: -4px; }
.ot-fl__nav.is-next { right: -4px; }
.ot-fl__nav:hover { border-color: #b9ccec; }
.ot-fl__nav.is-off { opacity: 0; pointer-events: none; }
@media (max-width: 1023px) {
  .ot-fl__scroll { overflow-x: auto; }
  .ot-fl.is-scrollable .ot-fl__nav { display: flex; }
}

.ot-fl__inner {
  position: relative;
  min-width: 920px;
  aspect-ratio: 1200 / 300;
  margin: 0 auto;
  border-radius: 16px;
  background:
    radial-gradient(120% 140% at 8% 0%, rgba(63, 100, 200, .07), transparent 55%),
    linear-gradient(180deg, #f9fbff, #fdfefe 46%, #f8fbff);
  box-shadow: inset 0 0 0 1px #eef3fb, inset 0 26px 46px -40px rgba(20, 40, 100, .5);
}

/* 节点背后的大号虚影序号 */
.ot-fl__ghost {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 58px; font-weight: 800; line-height: 1; letter-spacing: -.04em;
  color: rgba(39, 68, 168, .055); pointer-events: none; user-select: none;
  font-variant-numeric: tabular-nums;
}
.ot-fl__node.is-doing .ot-fl__ghost { color: rgba(240, 125, 12, .08); }
.ot-fl__node.is-todo .ot-fl__ghost { color: rgba(39, 68, 168, .035); }

/* 底色轨道 */
.ot-fl__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ot-fl__base {
  fill: none; stroke: #e2eaf6; stroke-width: 2;
  stroke-dasharray: 3 9; stroke-linecap: round;
}
.ot-fl__halo { fill: none; stroke: #3358c8; stroke-width: 22; stroke-opacity: .07; stroke-linecap: round; }
.ot-fl__seg { fill: none; stroke-linecap: round; }
.ot-fl__seg.is-done { stroke: url(#otFlGrad); stroke-width: 5; filter: drop-shadow(0 4px 8px rgba(39, 68, 168, .26)); }
.ot-fl__seg.is-doing { stroke: url(#otFlDoing); stroke-width: 5; filter: drop-shadow(0 4px 8px rgba(240, 125, 12, .22)); }

/* 节点层 */
.ot-fl__nodes { position: absolute; inset: 0; }
.ot-fl__node {
  position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px;
  opacity: 0; transform: scale(.7);
  transition: opacity .5s ease, transform .5s cubic-bezier(.22,.9,.3,1.2);
  cursor: pointer;
}
.ot-fl.is-in .ot-fl__node { opacity: 1; transform: scale(1); }
.ot-fl__node:hover .ot-fl__dot { transform: translate(-50%, -50%) scale(1.16); }
.ot-fl__node:focus-visible { outline: none; }
.ot-fl__node:focus-visible .ot-fl__dot { box-shadow: 0 0 0 4px rgba(51, 88, 200, .28); }

.ot-fl__dot {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 2px solid #d5e0f0; color: #93a4bd;
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease, border-color .22s ease, color .22s ease;
  box-sizing: border-box;
}
.ot-fl__dot svg { width: 17px; height: 17px; }

.ot-fl__node.is-done .ot-fl__dot {
  background: linear-gradient(150deg, #2b47a2, #16296b);
  border-color: #16296b; color: #fff;
  box-shadow: 0 6px 16px -8px rgba(22, 41, 107, .85);
}
.ot-fl__node.is-doing .ot-fl__dot {
  width: 46px; height: 46px;
  background: linear-gradient(150deg, #ffa53c, #f07d0c);
  border-color: #fff; color: #fff;
  box-shadow: 0 0 0 5px rgba(240, 125, 12, .16), 0 10px 22px -10px rgba(240, 125, 12, .9);
}
.ot-fl__node.is-doing .ot-fl__dot::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid rgba(240, 125, 12, .45);
  animation: ot-fl-ring 2.6s ease-out infinite;
}
@keyframes ot-fl-ring {
  0% { transform: scale(.9); opacity: .8; }
  70% { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}
.ot-fl__node.is-doing .ot-fl__dot b { font-size: 13px; }
.ot-fl__node.is-todo .ot-fl__dot { border-style: dashed; background: #fbfcfe; }

/* 选中态 */
.ot-fl__node.is-sel .ot-fl__dot { box-shadow: 0 0 0 4px rgba(51, 88, 200, .16), 0 8px 18px -9px rgba(22, 41, 107, .7); }
.ot-fl__node.is-sel.is-doing .ot-fl__dot { box-shadow: 0 0 0 5px rgba(240, 125, 12, .22), 0 10px 22px -10px rgba(240, 125, 12, .9); }

/* 节点标签 */
.ot-fl__lbl {
  position: absolute; left: 50%;
  transform: translateX(-50%);
  text-align: center; pointer-events: none;
  padding: 6px 11px 7px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e8eef8;
  box-shadow: 0 10px 22px -18px rgba(17, 34, 89, .55), 0 1px 2px rgba(17, 34, 89, .03);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  white-space: nowrap;
}
.ot-fl__node.is-above .ot-fl__lbl { bottom: calc(50% + 26px); }
.ot-fl__node.is-below .ot-fl__lbl { top: calc(50% + 26px); }
.ot-fl__node:hover .ot-fl__lbl { border-color: #cbd9f0; box-shadow: 0 12px 26px -16px rgba(17, 34, 89, .6); }
.ot-fl__lbl b {
  display: block; font-size: 12.5px; font-weight: 600; color: #1e293b;
  letter-spacing: .01em; line-height: 1.3;
}
.ot-fl__lbl b em {
  font-style: normal; font-size: 9.5px; font-weight: 700; color: #b3c0d4;
  margin-right: 4px; font-variant-numeric: tabular-nums; letter-spacing: .04em;
}
.ot-fl__lbl i {
  display: block; margin-top: 2px; font-style: normal;
  font-size: 11px; color: #8c9ab1; line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.ot-fl__node.is-doing .ot-fl__lbl b { color: #c2690a; }
.ot-fl__node.is-todo .ot-fl__lbl b { color: #93a2b8; }
.ot-fl__node.is-todo .ot-fl__lbl i { color: #aebbcc; }

/* 图例 + 提示 */
.ot-fl__foot {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e7eef8;
  font-size: 11.5px; color: var(--qt-muted);
}
.ot-fl__legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ot-fl__legend span { display: inline-flex; align-items: center; gap: 6px; }
.ot-fl__legend span::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: #d5e0f0;
}
.ot-fl__legend .is-done::before { background: #16296b; }
.ot-fl__legend .is-doing::before { background: #f07d0c; box-shadow: 0 0 0 3px rgba(240, 125, 12, .16); }
.ot-fl__legend .is-todo::before { background: #fff; border: 1.5px dashed #c3d0e4; }
.ot-fl__hint { margin-left: auto; display: none; }

/* 选中工序详情 */
.ot-fl__detail {
  margin-top: 14px; padding: 15px 17px 16px;
  border: 1px solid #e4ebf7; border-radius: 13px;
  background: linear-gradient(180deg, #fbfdff, #f6f9ff);
}
.ot-fl__detail.is-doing {
  border-color: #f4ddc2;
  background: linear-gradient(180deg, #fffcf7, #fff8ef);
}
.ot-fl__dhead {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid #e9eff8;
}
.ot-fl__detail.is-doing .ot-fl__dhead { border-bottom-color: #f2e3cf; }
.ot-fl__dno {
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: #e8eefb; color: #2b47a2;
}
.ot-fl__detail.is-doing .ot-fl__dno { background: #fdeeda; color: #c2690a; }
.ot-fl__dhead b { font-size: 14px; font-weight: 700; color: #0f172a; letter-spacing: .01em; }
.ot-fl__dtime { margin-left: auto; font-size: 12px; color: #7b8aa1; font-variant-numeric: tabular-nums; }
.ot-fl__detail p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.75; color: #64748b; }
.ot-fl__detail .ot-step__meta { margin: 0; }

/* 完整记录折叠 */
.ot-fl__toggle {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 7px 13px;
  border: 1px solid #dfe8f6; border-radius: 9px; background: #fff;
  font-size: 12.5px; color: #40506b; cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.ot-fl__toggle:hover { border-color: #b9ccec; color: #2744a8; background: #f7faff; }
.ot-fl__toggle svg { width: 13px; height: 13px; transition: transform .25s ease; }
.ot-fl__toggle.is-open svg { transform: rotate(180deg); }

.ot-fl .ot-steps { display: none; margin-top: 16px; }
.ot-fl .ot-steps.is-open { display: block; }
.ot-fl .ot-steps.is-open .ot-step { animation: ot-step-in .38s ease both; }
@keyframes ot-step-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 1023px) {
  .ot-fl__hint { display: inline-flex; align-items: center; gap: 5px; }
  .ot-fl__lbl { width: 96px; }
  .ot-fl__lbl b { font-size: 11.5px; }
  .ot-fl__lbl i { font-size: 10px; }
}
@media (max-width: 639px) {
  .ot-fl__detail { padding: 12px 13px 13px; }
  .ot-fl__dtime { margin-left: 0; flex: 1 1 100%; }
}

@media print {
  .ot-fl__scroll { overflow: visible; }
  .ot-fl__inner { min-width: 0; }
  .ot-fl__toggle { display: none !important; }
  .ot-fl .ot-steps { display: block !important; margin-top: 10px; }
  .ot-fl__detail { background: #fff; }
}

/* ---------- 科技感增强：网格底、流光、光晕 ---------- */
.ot-fl__inner::before {
  content: ""; position: absolute; inset: -6px -2px;
  background-image: radial-gradient(#dde6f4 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  opacity: .5; pointer-events: none;
}

/* 已完成轨迹上的流动光点 */
.ot-fl__shine {
  fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round;
  stroke-dasharray: 22 168; stroke-opacity: .9;
  animation: ot-fl-shine 2.6s linear infinite;
}
.ot-fl__shine.is-orange { stroke: #fff5e6; animation-duration: 1.5s; }
@keyframes ot-fl-shine {
  from { stroke-dashoffset: 190; }
  to { stroke-dashoffset: 0; }
}

/* 已完成节点：入场闪光脉冲 */
.ot-fl__node.is-done .ot-fl__dot::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid rgba(43, 71, 162, .55); opacity: 0;
}
.ot-fl.is-in .ot-fl__node.is-done .ot-fl__dot::after {
  animation: ot-fl-burst 1s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes ot-fl-burst {
  0% { transform: scale(.55); opacity: .85; }
  100% { transform: scale(2); opacity: 0; }
}

/* 进行中节点：呼吸光晕 */
.ot-fl__node.is-doing .ot-fl__dot { animation: ot-fl-breathe 2.4s ease-in-out infinite; }
@keyframes ot-fl-breathe {
  0%, 100% { box-shadow: 0 0 0 5px rgba(240, 125, 12, .16), 0 10px 22px -10px rgba(240, 125, 12, .9); }
  50% { box-shadow: 0 0 0 10px rgba(240, 125, 12, .09), 0 12px 26px -10px rgba(240, 125, 12, .95); }
}

/* 图例右侧：实时同步指示灯 */
.ot-fl__live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: #6b7a91;
}
.ot-fl__live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: #1fa97c;
  animation: ot-fl-live 2.2s ease-out infinite;
}
@keyframes ot-fl-live {
  0% { box-shadow: 0 0 0 0 rgba(31, 169, 124, .5); }
  70% { box-shadow: 0 0 0 7px rgba(31, 169, 124, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 169, 124, 0); }
}

/* 选中节点的标签加重 */
.ot-fl__node.is-sel .ot-fl__lbl b { color: #0f172a; font-weight: 700; }
.ot-fl__node.is-sel.is-doing .ot-fl__lbl b { color: #b45f05; }

@media (prefers-reduced-motion: reduce) {
  .ot-fl__shine, .ot-fl__node.is-doing .ot-fl__dot, .ot-fl__live::before,
  .ot-fl.is-in .ot-fl__node.is-done .ot-fl__dot::after { animation: none !important; }
}

@media print {
  .ot-fl__shine, .ot-fl__live { display: none !important; }
  .ot-fl__inner::before { display: none; }
}

/* ---------- 扫描光：整条轨迹的“巡检”扫过 ---------- */
.ot-fl__fx::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0;
  width: 34%;
  background: linear-gradient(100deg, transparent, rgba(64, 108, 214, .16) 45%, rgba(64, 108, 214, .05) 60%, transparent);
  pointer-events: none; opacity: 0;
  animation: ot-fl-scan 5.4s cubic-bezier(.4,0,.6,1) 1.2s infinite;
}
@keyframes ot-fl-scan {
  0% { transform: translateX(-110%); opacity: 0; }
  12% { opacity: 1; }
  70% { opacity: .9; }
  100% { transform: translateX(330%); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ot-fl__fx::after { display: none; }
}
@media print {
  .ot-fl__fx::after { display: none !important; }
}

/* 进行中节点标签：橙色描边强调 */
.ot-fl__node.is-doing .ot-fl__lbl {
  border-color: #f6d8b4;
  box-shadow: 0 12px 24px -16px rgba(200, 110, 20, .75), 0 0 0 3px rgba(255, 176, 84, .12);
}
.ot-fl__node.is-sel .ot-fl__lbl { border-color: #b9ccec; }

/* 待开始节点标签：更轻 */
.ot-fl__node.is-todo .ot-fl__lbl {
  background: #fdfefe; border-style: dashed; border-color: #e3eaf6; box-shadow: none;
}

/* 面板描边加实 */
.ot-fl__inner { border: 1px solid #e9eff8; }

/* 进行中节点的环境光晕 */
.ot-fl__glow {
  position: absolute; width: 210px; height: 210px; margin: -105px 0 0 -105px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(240, 125, 12, .17), rgba(240, 125, 12, .06) 46%, transparent 72%);
  animation: ot-fl-glowbreathe 3.6s ease-in-out infinite;
}
@keyframes ot-fl-glowbreathe {
  0%, 100% { transform: scale(.92); opacity: .85; }
  50% { transform: scale(1.1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .ot-fl__glow { animation: none; } }
@media print { .ot-fl__glow { display: none; } }

/* 已完成订单：末端节点冷色光晕 */
.ot-fl__glow.is-cool {
  background: radial-gradient(circle, rgba(51, 88, 200, .14), rgba(51, 88, 200, .05) 46%, transparent 72%);
}

@media (max-width: 1023px) {
  .ot-fl__hint { flex: 1 1 100%; justify-content: center; margin-left: 0; order: 3; }
}

/* 打印：只保留竖向工序记录，轨迹留给屏幕 */
@media print {
  .ot-fl__scroll, .ot-fl__foot, .ot-fl__detail { display: none !important; }
  .ot-fl .ot-steps { display: block !important; margin-top: 4px; }
}

@media print {
  .ot-fl__nav, .ot-fl__fx { display: none !important; }
}

/* ============================================================
   Hero 右侧「生产工单」装饰卡（与追溯页条形码卡同族但形态不同）
   ============================================================ */
.ot-viz {
  display: none;
  position: absolute;
  right: 24px; bottom: 28px;
  width: 268px; z-index: 2;
  animation: qt-up .9s .34s cubic-bezier(.22, .75, .3, 1) both;
}
@media (min-width: 1180px) { .ot-viz { display: block; } }

.ot-viz__card {
  position: relative;
  padding: 13px 16px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: linear-gradient(160deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .05));
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transform: rotate(1.4deg);
  transition: transform .5s cubic-bezier(.22, .75, .3, 1);
}
.ot-viz:hover .ot-viz__card { transform: rotate(0deg) translateY(-2px); }

.ot-viz__top {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 9.5px; letter-spacing: .2em; color: rgba(255, 255, 255, .58);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.ot-viz__dot {
  width: 6px; height: 6px; border-radius: 50%; background: #38c891;
  animation: qt-pulse 2.2s ease-out infinite;
}
.ot-viz__no {
  margin-top: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; font-weight: 600; letter-spacing: .1em; color: #fff;
}
.ot-viz__bar { display: flex; gap: 3px; margin-top: 11px; }
.ot-viz__bar i {
  flex: 1 1 0; height: 5px; border-radius: 2px;
  background: rgba(255, 255, 255, .16);
}
.ot-viz__bar i.is-done {
  background: linear-gradient(90deg, #7fa4ff, #4b6fd8);
  box-shadow: 0 0 8px rgba(127, 164, 255, .35);
}
.ot-viz__bar i.is-doing {
  background: #ff9117;
  box-shadow: 0 0 10px rgba(255, 145, 23, .75);
  animation: ot-viz-pulse 1.9s ease-in-out infinite;
}
@keyframes ot-viz-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
.ot-viz__meta {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin-top: 9px; font-size: 10px; color: rgba(255, 255, 255, .58);
  letter-spacing: .02em;
}
.ot-viz__meta b { color: #fff; font-weight: 700; font-size: 11px; }
.ot-viz__now { color: #ffc383; font-weight: 600; }
.ot-viz__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 9px; padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 9.5px; color: rgba(255, 255, 255, .45);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .04em;
}

@media (prefers-reduced-motion: reduce) {
  .ot-viz__bar i.is-doing, .ot-viz__dot { animation: none; }
}
@media print { .ot-viz { display: none !important; } }

/* ============================================================
   异常 / 风险标识
   ============================================================ */
/* 顶部汇总条 */
.ot-alert {
  display: flex; align-items: flex-start; gap: 11px;
  margin-bottom: 14px; padding: 13px 16px;
  border: 1px solid #f3cfc9; border-radius: 12px;
  background: linear-gradient(180deg, #fff9f8, #fdeeec);
  break-inside: avoid;
}
.ot-alert > svg { width: 19px; height: 19px; flex: 0 0 auto; margin-top: 1px; color: #d94a3d; }
.ot-alert.is-warn { border-color: #f2dfc0; background: linear-gradient(180deg, #fffdf8, #fdf5e7); }
.ot-alert.is-warn > svg { color: #c07a12; }
.ot-alert.is-ok { border-color: #cfe9dd; background: linear-gradient(180deg, #f9fdfb, #eff9f4); }
.ot-alert.is-ok > svg { color: #12805c; }
.ot-alert.is-closed { border-color: #dfe7f2; background: #f8fafd; }
.ot-alert.is-closed > svg { color: #64748b; }

.ot-alert__body { min-width: 0; flex: 1 1 auto; }
.ot-alert__body > b {
  display: block; font-size: 13px; font-weight: 700; color: #1e293b; letter-spacing: .01em;
}
.ot-alert.is-risk .ot-alert__body > b { color: #b3362a; }
.ot-alert.is-warn .ot-alert__body > b { color: #a26a10; }
.ot-alert.is-ok .ot-alert__body > b { color: #0f6b4c; }
.ot-alert__body > span {
  display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.7; color: #7b8aa1;
}

.ot-alert__list { margin: 9px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ot-alert__list li {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 12px; line-height: 1.65; color: #5b6a82;
}
.ot-alert__list li b { font-weight: 600; color: #1e293b; flex: 0 0 auto; }
.ot-alert__list li.is-muted { opacity: .78; }
.ot-alert__lv {
  flex: 0 0 auto; padding: 1px 6px; border-radius: 4px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
  background: #fdecea; color: #c53a2d; border: 1px solid #f6d2cd;
}
.ot-alert__lv.is-warn { background: #fdf5e7; color: #a26a10; border-color: #f2dfc0; }
.ot-alert__lv.is-closed { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.ot-alert__txt { flex: 1 1 220px; min-width: 0; color: #64748b; }

/* 工序内的异常说明块 */
.ot-warn {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 10px 0 9px; padding: 10px 12px;
  border: 1px solid #f6d2cd; border-radius: 10px; background: #fff9f8;
}
.ot-warn svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; color: #d94a3d; }
.ot-warn > div { min-width: 0; }
.ot-warn b { display: block; font-size: 12px; font-weight: 700; color: #b3362a; }
.ot-warn span { display: block; margin-top: 2px; font-size: 12px; line-height: 1.7; color: #6b7280; }
.ot-warn.is-warn { border-color: #f2dfc0; background: #fffdf8; }
.ot-warn.is-warn svg { color: #c07a12; }
.ot-warn.is-warn b { color: #a26a10; }
.ot-warn.is-closed { border-color: #e2e8f0; background: #f8fafd; }
.ot-warn.is-closed svg { color: #94a3b8; }
.ot-warn.is-closed b { color: #64748b; }

/* 轨迹节点异常 */
.ot-fl__flag {
  position: absolute; right: -4px; top: -4px;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #d94a3d; color: #fff; border: 2px solid #fff;
  font-size: 10px; font-weight: 800; line-height: 1;
  box-shadow: 0 3px 8px -3px rgba(217, 74, 61, .8);
}
.ot-fl__node.is-warn .ot-fl__flag { background: #d98a1a; box-shadow: 0 3px 8px -3px rgba(217, 138, 26, .8); }
.ot-fl__node.is-closed .ot-fl__flag { background: #94a3b8; box-shadow: none; }

.ot-fl__node.is-risk .ot-fl__dot { box-shadow: 0 0 0 4px rgba(217, 74, 61, .2), 0 8px 18px -9px rgba(217, 74, 61, .7); }
.ot-fl__node.is-warn .ot-fl__dot { box-shadow: 0 0 0 4px rgba(217, 138, 26, .18), 0 8px 18px -9px rgba(22, 41, 107, .8); }
.ot-fl__node.is-closed .ot-fl__dot { box-shadow: 0 0 0 3px rgba(148, 163, 184, .22); }
.ot-fl__node.is-risk.is-doing .ot-fl__dot {
  box-shadow: 0 0 0 5px rgba(217, 74, 61, .24), 0 10px 22px -10px rgba(240, 125, 12, .9);
  animation: ot-fl-breathe-risk 2.4s ease-in-out infinite;
}
@keyframes ot-fl-breathe-risk {
  0%, 100% { box-shadow: 0 0 0 5px rgba(217, 74, 61, .24), 0 10px 22px -10px rgba(240, 125, 12, .9); }
  50% { box-shadow: 0 0 0 10px rgba(217, 74, 61, .12), 0 12px 26px -10px rgba(240, 125, 12, .95); }
}

/* 标签卡上的异常徽标 */
.ot-fl__badge {
  display: inline-block; margin-left: 5px;
  padding: 1px 5px; border-radius: 4px;
  font-style: normal; font-size: 9.5px; font-weight: 700; letter-spacing: .02em;
  vertical-align: 1px;
  background: #fdecea; color: #c53a2d; border: 1px solid #f6d2cd;
}
.ot-fl__badge.is-warn { background: #fdf5e7; color: #a26a10; border-color: #f2dfc0; }
.ot-fl__badge.is-closed { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.ot-fl__node.is-risk .ot-fl__lbl { border-color: #f0c4bd; box-shadow: 0 12px 24px -16px rgba(217, 74, 61, .7), 0 0 0 3px rgba(217, 74, 61, .08); }
.ot-fl__node.is-warn .ot-fl__lbl { border-color: #f0dcb9; }

/* 图例：异常 */
.ot-fl__legend .is-alert::before { background: #d94a3d; box-shadow: 0 0 0 3px rgba(217, 74, 61, .14); }

/* 竖向列表：异常徽标 */
.ot-step__wpill {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
  background: #fdecea; color: #c53a2d; border: 1px solid #f6d2cd;
}
.ot-step__wpill.is-warn { background: #fdf5e7; color: #a26a10; border-color: #f2dfc0; }
.ot-step__wpill.is-closed { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.ot-step.is-risk .ot-step__dot { box-shadow: 0 0 0 4px rgba(217, 74, 61, .16); }
.ot-step.is-warn .ot-step__dot { box-shadow: 0 0 0 4px rgba(217, 138, 26, .16); }

@media (max-width: 639px) {
  .ot-alert { padding: 11px 13px; }
  .ot-alert__list li { font-size: 11.5px; }
  .ot-alert__txt { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ot-fl__node.is-risk.is-doing .ot-fl__dot { animation: none; }
}

@media print {
  .ot-alert { break-inside: avoid; }
  .ot-fl__flag { display: none; }
}

/* Hero 文案区收窄，避免与右侧工单卡重叠 */
@media (min-width: 1180px) {
  .ot-page .qt-hero h1,
  .ot-page .qt-hero__sub,
  .ot-page .qt-hero__badges { max-width: 780px; }
}

