/* 订单详情 / 进度页与新增订单状态 */
.status-processing { background: #E9F6FD; color: #0B7DB0; }
.status-done { background: #E8EEFF; color: var(--royal); }
.status-cancelled { background: #F1F3F8; color: var(--muted); }
.status-refunded { background: var(--danger-bg); color: var(--danger); }
.status-failed { background: var(--warn-bg); color: var(--warn); }

a.order-row.order-link {
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
a.order-row.order-link:hover { border-color: var(--line-2); background: #FAFBFF; }
.order-time { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.order-go { font-size: 18px; color: var(--line-2); line-height: 1; }

.od-loading { padding: 64px 0; text-align: center; color: var(--muted); }
.od-back {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--muted); text-decoration: none; margin-bottom: 12px;
}
.od-back:hover { color: var(--royal); }
.od-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.od-head .page-desc { word-break: break-all; }
.od-status { font-size: 13px; padding: 6px 12px; margin-top: 4px; }
.od-hint {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: #F3F7FF;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
}
.od-hint.refund { background: var(--danger-bg); color: var(--danger); }

.od-timeline {
  list-style: none;
  margin: 24px 0 8px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
}
.od-timeline.has-refund { grid-template-columns: repeat(5, 1fr); }
.od-timeline.is-cancelled { grid-template-columns: repeat(2, 1fr); max-width: 420px; margin-left: auto; margin-right: auto; }
.od-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.od-step::before {
  content: "";
  position: absolute;
  top: 15px;
  left: calc(-50% + 18px);
  right: calc(50% + 18px);
  height: 2px;
  background: var(--line);
}
.od-step:first-child::before { display: none; }
.od-step.done::before, .od-step.current::before { background: var(--royal); }
.od-step.refund::before { background: var(--danger); }
.od-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #F1F3F8;
  color: var(--muted);
  font-size: 13px;
  border: 2px solid transparent;
  position: relative;
  z-index: 1;
}
.od-step.done .od-dot { background: var(--royal); color: #fff; }
.od-step.current .od-dot { background: #fff; color: var(--royal); border-color: var(--royal); box-shadow: 0 0 0 4px rgba(47, 91, 234, .12); }
.od-step.refund .od-dot { color: var(--danger); border-color: var(--danger); box-shadow: 0 0 0 4px rgba(210, 28, 74, .1); }
.od-step.done .od-step-label, .od-step.current .od-step-label { color: var(--navy); }
.od-step.refund .od-step-label { color: var(--danger); }
.od-step-time { font-size: 11px; color: var(--muted); min-height: 14px; }

.od-summary { margin-top: 20px; }
.od-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.od-log { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; }
.od-log li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.od-log li:last-child { border-bottom: 0; }
.od-log-time { color: var(--muted); font-size: 12px; }
.od-log-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.od-log-note { color: var(--text-2); }
.od-foot { margin-top: 20px; display: flex; justify-content: center; }

@media (max-width: 720px) {
  .od-head { flex-direction: column; gap: 8px; }
  .od-timeline, .od-timeline.has-refund, .od-timeline.is-cancelled {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 20px;
  }
  .od-step {
    flex-direction: row;
    text-align: left;
    gap: 12px;
    padding: 6px 0;
    min-height: 48px;
  }
  .od-step::before {
    top: calc(-50% + 22px);
    bottom: calc(50% + 16px);
    left: 15px;
    right: auto;
    width: 2px;
    height: auto;
  }
  .od-step-label { min-width: 52px; }
  .od-step-time { margin-left: auto; }
  .od-log li { grid-template-columns: 1fr; gap: 6px; }
}

a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

.od-step.cancel::before { background: var(--line-2); }
.od-step.cancel .od-dot { background: #fff; color: var(--muted); border-color: var(--line-2); }
.od-step.cancel .od-step-label { color: var(--text-2); }
.od-hint.cancel { background: #F4F5F8; color: var(--muted); }
.od-actions { gap: 10px; }
.ticket-locked .ticket-value { filter: saturate(.45); opacity: .85; }
.ticket-locked .ticket-badge { background: var(--warn-bg); color: var(--warn); }
.ticket-lock-note { font-size: 12px; color: var(--warn); margin-top: 4px; }
.ticket-lock-note a { color: inherit; }
.note-warn { display: block; margin-top: 6px; font-size: 12px; color: var(--warn); }

/* ===== 版式修正：内容区不再强制撑满视口；移动端底部安全区，客服入口不遮挡内容 ===== */
.main-card { min-height: 0; }
.main-card.settings-mode { min-height: 0; }
.step-footer { margin-top: 0; }

@media (max-width: 860px) {
  /* 移动端客服入口收进底部导航的「帮助」，不再用悬浮按钮压在内容上 */
  .chat-fab { display: none !important; }
  .step-footer { padding-right: 0; }
  .main-card { padding-bottom: 20px; }
  .main-card.settings-mode { padding-bottom: 20px; }
  /* 底部导航约 58px 高，再加刘海屏的底部安全区 */
  #page-app .app-body-wrap { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ===== 侧边栏当前项：实心浅蓝紫圆角胶囊，图标与文字一起加深；悬停浅一档（前台与后台一致） ===== */
.sidebar .nav-item,
.adm-side .nav-item { transition: background-color .15s ease, color .15s ease; }
.sidebar .nav-item:hover,
.adm-side .nav-item:hover { background: #E7EBFB; color: #24306E; }
.sidebar .nav-item.active,
.adm-side .nav-item.active { background: #D3DAF8; color: #18225C; }
.sidebar .nav-item.active:hover,
.adm-side .nav-item.active:hover { background: #DCE2FA; color: #18225C; }
.sidebar .nav-item.active svg,
.adm-side .nav-item.active svg { opacity: 1; color: #18225C; stroke: currentColor; }

/* ===== 首单优惠弹窗 ===== */
.promo-modal { text-align: center; padding: 6px 4px 2px; }
.promo-badge {
  width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%;
  display: flex; align-items: baseline; justify-content: center; padding-top: 22px;
  background: linear-gradient(140deg, #E8EEFF, #D3DAF8); color: var(--royal-700);
  font-size: 30px; font-weight: 400; line-height: 1;
}
.promo-badge span { font-size: 15px; margin-left: 2px; }
.promo-modal h2 { margin: 0 0 8px; font-size: 22px; font-weight: 400; color: var(--navy); }
.promo-modal .lead { margin: 0 auto 20px; max-width: 360px; color: var(--text-2); font-size: 14px; line-height: 1.7; }
.promo-actions { display: flex; gap: 12px; justify-content: center; }
.promo-actions .btn { min-width: 120px; }

/* 结算页：首单优惠选项 */
.coupon-opt .opt-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.coupon-opt.is-disabled { cursor: not-allowed; opacity: .65; }
.coupon-opt .amt { white-space: nowrap; }

/* 用户导航统一 24×24 画布、20px 显示尺寸、1.8 线宽；桌面与手机复用同一组路径。 */
#sidebar .nav-item svg, #bottom-nav [data-nav] svg { width: 20px; height: 20px; flex: 0 0 20px; }
