/* chadan-track.css — 查单结果 + 轨迹时间线样式（消息快捷操作 / 扫码入口共用）。
   两个页面共用同一套面板 + 时间线视觉，改这里两处一起生效。 */
:root { color-scheme: light dark; }
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #f4f6fb; color: #1e293b;
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 16px;
}
@media (prefers-color-scheme: dark) {
  body { background: #0f172a; color: #e2e8f0; }
  .panel { background: #1e293b !important; }
  .code-box { background: #0b1220 !important; color: #7dd3fc !important; }
  details { color: #94a3b8; }
  pre { background: #0b1220 !important; color: #94a3b8 !important; }
}
.panel {
  background: #fff; border-radius: 18px; padding: 30px 24px;
  box-shadow: 0 8px 30px rgba(30,41,59,.08);
  width: 100%; max-width: 420px; text-align: center;
}
.spinner {
  width: 34px; height: 34px; margin: 6px auto 16px;
  border: 3px solid #c7d2fe; border-top-color: #4f46e5;
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.status { font-size: 15px; color: #64748b; }
.label { font-size: 13px; color: #94a3b8; margin-bottom: 6px; }
.code-box {
  background: #f1f5f9; border-radius: 12px; padding: 16px 12px;
  font-size: 22px; font-weight: 700; letter-spacing: .5px;
  color: #4f46e5; word-break: break-all; margin-top: 4px;
}
.kind {
  display: inline-block; margin-top: 12px; padding: 4px 12px;
  border-radius: 999px; font-size: 12px; font-weight: 600;
  background: #eef2ff; color: #4f46e5;
}
.kind.usps { background: #fef3c7; color: #b45309; }
.kind.third { background: #dcfce7; color: #15803d; }
.fail { color: #ef4444; font-size: 15px; }
.emoji { font-size: 40px; }
/* ---- 查单结果 / 轨迹时间线（仿 DMS 官方）---- */
#track { width: 100%; max-width: 420px; margin-top: 16px; }
.wb-card, .tl-card {
  background: #fff; border-radius: 14px; padding: 16px 16px; margin-bottom: 14px;
  box-shadow: 0 6px 22px rgba(30,41,59,.06);
}
@media (prefers-color-scheme: dark) { .wb-card, .tl-card { background: #1e293b; } }
.wb-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 3px 0; }
.wb-row .k { color: #94a3b8; white-space: nowrap; }
.wb-row .v { color: #1e293b; text-align: right; word-break: break-all; }
@media (prefers-color-scheme: dark) { .wb-row .v { color: #e2e8f0; } }
.wb-no { font-size: 16px; font-weight: 700; color: #4f46e5; word-break: break-all; }
.tl-head { display: flex; justify-content: space-between; align-items: center;
           font-size: 15px; font-weight: 700; padding-bottom: 12px;
           border-bottom: 1px solid #eef2f6; margin-bottom: 4px; }
@media (prefers-color-scheme: dark) { .tl-head { border-color: #334155; } }
.ext { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 400; color: #94a3b8; }
.switch { position: relative; width: 40px; height: 22px; border-radius: 11px; background: #cbd5e1;
          cursor: pointer; transition: background .2s; flex: none; }
.switch.on { background: #ff4d1a; }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
                background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on .knob { left: 20px; }
.tl-item { position: relative; padding: 14px 0 14px 24px; }
.tl-item::before { content: ""; position: absolute; left: 4px; top: 18px; bottom: -14px; width: 2px; background: #e5e9f0; }
.tl-item:last-child::before { display: none; }
.tl-dot { position: absolute; left: 0; top: 17px; width: 11px; height: 11px; border-radius: 50%;
          background: #ff4d1a; box-shadow: 0 0 0 3px rgba(255,77,26,.15); }
@media (prefers-color-scheme: dark) { .tl-item::before { background: #334155; } }
.tl-body { display: flex; justify-content: space-between; gap: 10px; }
.tl-left { flex: 1; min-width: 0; }
.tl-desc { font-size: 14px; color: #1e293b; line-height: 1.4; }
@media (prefers-color-scheme: dark) { .tl-desc { color: #e2e8f0; } }
.tl-time { font-size: 12px; color: #94a3b8; margin-top: 5px; }
.tl-right { text-align: right; font-size: 12px; color: #94a3b8; max-width: 40%; }
.tl-loc { color: #64748b; }
@media (prefers-color-scheme: dark) { .tl-loc { color: #cbd5e1; } }
.pod-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pod-imgs a { display: block; }
.pod-imgs img { width: 68px; height: 68px; object-fit: cover; border-radius: 8px; border: 1px solid #eef2f6; }
.tl-hint { font-size: 12px; color: #94a3b8; padding: 10px 0; }
details { margin-top: 22px; width: 100%; max-width: 420px; font-size: 12px; color: #64748b; }
summary { cursor: pointer; user-select: none; }
pre {
  text-align: left; background: #f1f5f9; border-radius: 8px;
  padding: 10px; overflow-x: auto; white-space: pre-wrap;
  word-break: break-all; font-size: 11px; line-height: 1.5; max-height: 40vh;
}
/* ---- 扫码入口专用 ---- */
.scan-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 6px; padding: 14px 26px; border: none; border-radius: 999px;
  background: #4f46e5; color: #fff; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: opacity .15s, transform .05s;
  box-shadow: 0 6px 18px rgba(79,70,229,.35);
}
.scan-btn:active { transform: scale(.97); }
.scan-btn[disabled] { opacity: .5; cursor: default; box-shadow: none; }
.scan-btn.secondary { background: #eef2ff; color: #4f46e5; box-shadow: none; font-size: 14px; padding: 10px 20px; }
@media (prefers-color-scheme: dark) { .scan-btn.secondary { background: #312e81; color: #c7d2fe; } }
.scan-hint { font-size: 13px; color: #94a3b8; margin: 14px 0 4px; }
/* ---- 多单号翻页 ---- */
.pager { position: sticky; top: 0; z-index: 5; background: #f4f6fb; padding: 6px 0 10px; }
@media (prefers-color-scheme: dark) { .pager { background: #0f172a; } }
.pager.single { padding: 0 0 8px; text-align: center; }
.pg-nav { display: flex; align-items: center; justify-content: center; gap: 14px; }
.pg-btn { width: 36px; height: 36px; border-radius: 50%; border: none; font-size: 22px; line-height: 1;
          background: #fff; color: #4f46e5; box-shadow: 0 2px 8px rgba(30,41,59,.1); cursor: pointer; }
.pg-btn[disabled] { opacity: .35; cursor: default; }
@media (prefers-color-scheme: dark) { .pg-btn { background: #1e293b; color: #a5b4fc; } }
.pg-no { font-size: 15px; font-weight: 700; min-width: 56px; text-align: center; }
.pg-more { font-size: 12px; color: #94a3b8; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 2px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px;
        border-radius: 999px; border: 1px solid #e2e8f0; background: #fff; color: #475569;
        font-size: 12px; font-family: ui-monospace, Menlo, monospace; cursor: pointer; }
.chip.cur { border-color: #4f46e5; color: #4f46e5; font-weight: 700; }
@media (prefers-color-scheme: dark) { .chip { background: #1e293b; border-color: #334155; color: #cbd5e1; }
                                      .chip.cur { border-color: #a5b4fc; color: #a5b4fc; } }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; }
.chip .dot.ok { background: #22c55e; }
.chip .dot.bad { background: #ef4444; }
.chip .dot.wait { background: #f59e0b; }
.code-head { background: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; text-align: center;
             box-shadow: 0 6px 22px rgba(30,41,59,.06); }
@media (prefers-color-scheme: dark) { .code-head { background: #1e293b; } }
.code-head .code-box { font-size: 18px; padding: 10px 12px; }
.code-head .kind { margin-top: 8px; }
