/* ============ 下单 / 支付页专用样式 ============ */

/* 步骤条 */
.steps-bar {
  display: flex; justify-content: center; gap: 40px;
  list-style: none; margin-bottom: 36px; flex-wrap: wrap;
}
.steps-bar li {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-light);
}
.steps-bar li span {
  display: inline-block; width: 24px; height: 24px; line-height: 24px;
  border-radius: 50%; background: var(--bg-alt); color: var(--text-light);
  text-align: center; font-size: 13px; font-weight: 600;
}
.steps-bar li.active { color: var(--primary); font-weight: 600; }
.steps-bar li.active span { background: var(--primary); color: #fff; }
.steps-bar li.done { color: #16a34a; }
.steps-bar li.done span { background: #16a34a; color: #fff; }

/* 布局 */
.order-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: start; }
.block-title { font-size: 18px; margin-bottom: 16px; color: var(--primary-dark); }
.loading-tip { color: var(--text-light); font-size: 14px; padding: 24px 0; text-align: center; }

/* 套餐卡片 */
.product-list { display: grid; gap: 14px; }
.product-card {
  display: flex; gap: 14px; align-items: flex-start; cursor: pointer;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; transition: border-color .2s, box-shadow .2s;
}
.product-card:hover { border-color: #bfdbfe; box-shadow: 0 6px 18px rgba(15,23,42,.06); }
.product-card.checked { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.product-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-dot {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #cbd5e1; margin-top: 4px; position: relative;
}
.product-card.checked .radio-dot { border-color: var(--primary); }
.product-card.checked .radio-dot::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary);
}
.product-body h3 { font-size: 16.5px; margin-bottom: 6px; }
.product-body p { font-size: 13.5px; color: var(--text-light); margin-bottom: 10px; }
.product-price { font-size: 17px; font-weight: 700; color: #ea580c; }

/* 订单摘要 */
.order-side { position: sticky; top: 88px; }
.order-summary {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px;
}
.summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; font-size: 14px; color: var(--text-light);
}
.summary-row strong { color: var(--text); font-size: 14px; max-width: 60%; text-align: right; }
.summary-total {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px dashed var(--border); margin-top: 10px; padding-top: 14px; font-size: 14px;
}
.summary-total strong { font-size: 26px; color: #ea580c; }

/* 数量 */
.qty-box { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.qty-box button {
  width: 30px; height: 30px; border: none; background: #f8fafc;
  cursor: pointer; font-size: 16px; color: var(--text);
}
.qty-box button:hover { background: #e2e8f0; }
.qty-box input {
  width: 46px; height: 30px; border: none; text-align: center;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  font-size: 14px;
}

/* 表单字段 */
.field { display: block; margin-bottom: 14px; font-size: 13.5px; color: var(--text-light); }
.field span { display: block; margin-bottom: 5px; }
.field i { color: #dc2626; font-style: normal; }
.field input, .field textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: inherit; background: #f8fafc; color: var(--text);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); background: #fff; }

.pay-method-tip { font-size: 13px; color: var(--text-light); margin: 12px 0; text-align: center; }
.alipay-text { color: #1677ff; }
.order-note { font-size: 12px; color: var(--text-light); margin-top: 12px; line-height: 1.6; }

/* 收银台 */
.pay-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.pay-card { max-width: 620px; margin: 0 auto; }
.pay-detail { display: grid; gap: 2px; margin-bottom: 20px; }
.pay-detail > div {
  display: grid; grid-template-columns: 120px 1fr; gap: 12px;
  padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 14px;
}
.pay-detail dt { color: var(--text-light); }
.pay-detail dd { color: var(--text); word-break: break-all; }
.pay-detail .amount { color: #ea580c; font-weight: 700; }
.status-tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: #fef3c7; color: #b45309; font-size: 12.5px;
}
.pay-amount {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 16px 0 22px; border-top: 1px solid var(--border); margin-top: 6px;
}
.pay-amount span { font-size: 14px; color: var(--text-light); }
.pay-amount strong { font-size: 30px; color: #ea580c; }

/* 结果页 */
.result-box { text-align: center; max-width: 640px; margin: 0 auto; }
.result-icon {
  width: 68px; height: 68px; line-height: 68px; border-radius: 50%;
  margin: 8px auto 16px; font-size: 34px; color: #fff;
}
.result-icon.success { background: #16a34a; }
.result-icon.pending { background: #f59e0b; }
.result-title { font-size: 24px; }
.result-desc { color: var(--text-light); font-size: 14px; margin: 8px 0 24px; }
.result-box .pay-detail { text-align: left; margin-bottom: 24px; }
.result-box .btn { margin: 0 6px; }
.empty-box { text-align: center; }
.empty-box h2 { font-size: 20px; margin-bottom: 8px; }
.empty-box p { color: var(--text-light); font-size: 14px; }

/* ============ 我的订单 ============ */
.my-orders-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.my-orders-tip { font-size: 13.5px; color: var(--text-light); min-height: 20px; }
.btn-clear { font-size: 13.5px; color: #dc2626; }
.btn-clear:hover { color: #b91c1c; }

.order-list { list-style: none; display: grid; gap: 14px; }
.order-row {
  display: flex; align-items: stretch; justify-content: space-between; gap: 18px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; transition: border-color .2s, box-shadow .2s;
}
.order-row:hover { border-color: #bfdbfe; box-shadow: 0 6px 18px rgba(15,23,42,.06); }
.order-row.is-paid { border-left: 4px solid #16a34a; }
.order-row.is-pending { border-left: 4px solid #f59e0b; }
.order-row.is-closed { border-left: 4px solid #94a3b8; opacity: .9; }

.order-row-main { flex: 1 1 auto; min-width: 0; }
.order-row-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 10px;
}
.order-subject { font-size: 16.5px; color: var(--text); font-weight: 600; }

.order-row-meta {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px;
  font-size: 13.5px; color: var(--text-light);
}
.order-row-meta i { color: #94a3b8; font-style: normal; margin-right: 6px; }
.order-row-meta .amount { color: #ea580c; font-weight: 700; font-size: 15px; }

.order-row-actions {
  display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between;
  gap: 10px; min-width: 110px;
}
.order-row-actions .btn { width: 100%; padding: 9px 14px; }
.btn-link {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--text-light); font-size: 12.5px;
}
.btn-link:hover { color: #dc2626; }
.del-btn { padding: 0 !important; }

.status-tag.is-paid { background: #dcfce7; color: #15803d; }
.status-tag.is-pending { background: #fef3c7; color: #b45309; }
.status-tag.is-closed { background: #e2e8f0; color: #475569; }

.empty-tip {
  background: #fff; border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 60px 20px; text-align: center; color: var(--text-light); list-style: none;
}
.empty-icon { font-size: 56px; margin-bottom: 12px; }
.empty-tip p { font-size: 15px; margin: 4px 0; }
.empty-sub { font-size: 13px; color: #94a3b8; }

.my-orders-footnote {
  margin-top: 24px; padding: 14px 16px;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 8px;
  font-size: 12.5px; color: var(--text-light); line-height: 1.7;
}

@media (max-width: 900px) {
  .order-layout { grid-template-columns: 1fr; }
  .order-side { position: static; }
  .steps-bar { gap: 20px; }
  .order-row { flex-direction: column; }
  .order-row-actions { flex-direction: row; align-items: center; min-width: 0; }
  .order-row-actions .btn { width: auto; }
  .order-row-meta { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .pay-detail > div { grid-template-columns: 92px 1fr; }
  .pay-box { padding: 20px; }
  .order-row { padding: 16px; }
}
