/* 我的订单 / 订单详情 · 对齐 App MyOrdersScreen / OrderDetailScreen */

:root {
  --my-bg: #f6f7f9;
  --my-muted: rgba(0, 0, 0, 0.5);
  --my-line: rgba(0, 0, 0, 0.05);
  --price-vip: #f73a2c;
  --brand-ink: #1c330d;
}

.orders-phone {
  background: var(--my-bg);
  background-image: none;
  min-height: 100%;
  height: min(812px, calc(100vh - 48px));
  max-height: min(812px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}

@media (max-width: 420px) {
  .orders-phone {
    min-height: 100dvh;
    max-height: none;
    height: 100dvh;
  }
}

/* ---- MyScaffold 顶栏 ---- */
.my-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin: 8px 0 0;
  flex: 0 0 auto;
}

.my-head h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.my-back {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 14px;
  background: rgba(217, 217, 217, 0.4);
  color: var(--ink);
  display: grid;
  place-items: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.my-back svg {
  display: block;
}

/* ---- Tab：SpaceBetween + 品牌绿下划线（非胶囊底） ---- */
.od-tabs {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  padding: 0 16px;
  flex: 0 0 auto;
  background: transparent;
  gap: 0;
  overflow: visible;
}

.od-tabs button {
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 8px 0;
  font: inherit;
  font-size: 14px;
  color: var(--my-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  -webkit-tap-highlight-color: transparent;
}

.od-tabs button span {
  white-space: nowrap;
}

.od-tabs button i {
  display: block;
  width: 0;
  height: 3px;
  border-radius: 2px;
  background: var(--brand);
  transition: width 0.15s ease;
}

.od-tabs button.on {
  color: var(--ink);
  font-weight: 600;
}

.od-tabs button.on i {
  width: 24px;
}

/* ---- 滚动区 ---- */
.od-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/旧 Edge */
}

.od-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* ---- 订单卡（列表） ---- */
.od-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.od-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.od-card-top .ono {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--my-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.od-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  flex-shrink: 0;
}

.od-status.is-pay {
  color: var(--price-vip);
}

.od-time {
  margin-top: 4px;
  font-size: 11px;
  color: var(--my-muted);
}

.od-hr {
  height: 1px;
  background: var(--my-line);
  margin: 10px 0;
}

.od-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.od-line + .od-line {
  margin-top: 8px;
}

.od-line img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: #f3f3f3;
  flex-shrink: 0;
}

.od-line .meta {
  flex: 1;
  min-width: 0;
}

.od-line .meta p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.od-line .meta small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--my-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.od-line .side {
  flex-shrink: 0;
  text-align: right;
}

.od-line .side .price {
  display: none;
}

.od-line .side .qty {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--my-muted);
}

.od-foot {
  display: flex;
  align-items: center;
}

.od-foot .count {
  font-size: 12px;
  color: var(--my-muted);
}

.od-foot .pay-label {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink);
}

.od-foot .pay-num {
  font-size: 16px;
  font-weight: 600;
  color: var(--price-vip);
}

.od-list-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

/* ---- 空 / 错 / loading ---- */
.od-empty,
.od-loading {
  background: #fff;
  border-radius: 14px;
  padding: 40px 16px;
  text-align: center;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.od-empty strong,
.od-loading strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--my-muted);
}

.od-empty span,
.od-loading span {
  font-size: 12px;
  color: var(--my-muted);
}

.od-error {
  background: #fff1f0;
  border-radius: 14px;
  padding: 14px;
}

.od-error p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--price-vip);
}

.od-error .hint {
  font-size: 11px;
  color: var(--my-muted);
  margin-bottom: 8px;
}

.od-error button {
  border: 0;
  border-radius: 18px;
  background: var(--brand);
  color: #000;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  cursor: pointer;
}

.od-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(137, 248, 0, 0.25);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: od-spin 0.8s linear infinite;
}

@keyframes od-spin {
  to { transform: rotate(360deg); }
}

/* ---- 详情页卡片 ---- */
.od-detail-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
}

.od-detail-status {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.od-detail-sub {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--my-muted);
}

.od-detail-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.od-act {
  border: 0;
  border-radius: 16px;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  color: var(--brand-ink);
  background: rgba(137, 248, 0, 0.35);
  -webkit-tap-highlight-color: transparent;
}

.od-act.primary {
  color: #fff;
  background: linear-gradient(90deg, #ff0028, #ff0093);
  height: 36px;
  min-width: 88px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 18px;
  justify-content: center;
}

.od-act.primary:disabled,
.od-act:disabled {
  opacity: 0.55;
  cursor: default;
}

.od-sec-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.od-detail-card .od-line img {
  width: 60px;
  height: 60px;
}

.od-row {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--ink);
}

.od-row + .od-row {
  margin-top: 8px;
}

.od-row span:last-child {
  margin-left: auto;
}

.od-pay-row {
  display: flex;
  align-items: center;
  margin-top: 8px;
}

.od-pay-row .lab {
  flex: 1;
  font-size: 14px;
  color: var(--ink);
}

.od-pay-row .num {
  font-size: 20px;
  font-weight: 600;
  color: var(--price-vip);
}

/* ---- 物流进度 ---- */
.od-logi-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.od-logi-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 10px;
  flex-shrink: 0;
}

.od-logi-dot {
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.od-logi-dot.on {
  background: var(--brand);
}

.od-logi-line {
  width: 1px;
  height: 22px;
  background: rgba(0, 0, 0, 0.1);
}

.od-logi-line.on {
  background: var(--brand);
}

.od-logi-label {
  font-size: 13px;
  color: var(--my-muted);
  padding-top: 0;
  line-height: 10px;
  transform: translateY(-1px);
}

.od-logi-label.on {
  color: var(--ink);
}

.od-logi-label.cur {
  font-weight: 600;
  color: var(--ink);
}

/* ---- 兼容：地址等页仍用旧顶栏类名 ---- */
.od-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 12px;
  background: #fff;
  flex: 0 0 auto;
}

.od-head h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.od-back {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  font-size: 28px;
  line-height: 1;
  color: #000;
  text-decoration: none;
}

.od-add {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.od-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.od-list::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.od-empty p {
  margin: 0 0 14px;
}

.od-empty-add {
  display: block;
  width: 120px;
  height: 32px;
  margin: 0 auto;
  border-radius: 16px;
  background: var(--brand);
  color: #000;
  font-size: 13px;
  font-weight: 600;
  line-height: 32px;
  text-decoration: none;
  text-align: center;
}
