/* 订单相关页面 */
:root {
  --primary: #ea580c;
  --primary-dark: #c2410c;
  --primary-bg: #fff7ed;
  --primary-soft: #ffedd5;
  --text: #1e293b;
  --text-muted: #64748b;
  --bg: #fffbf5;
  --white: #fff;
  --border: #fed7aa;
  --radius: 14px;
  --page-max: 520px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: #fb923c; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #fb923c;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.page {
  max-width: var(--page-max);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

@media (min-width: 769px) {
  html, body { background: #e8ecf1; }
  .page {
    box-shadow: 0 12px 48px rgba(15, 23, 42, 0.1);
    min-height: calc(100vh - 40px);
    margin: 20px auto;
  }
}

.header {
  background: linear-gradient(165deg, #fb923c 0%, #f97316 40%, #ea580c 100%);
  color: #fff;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 24px;
  text-align: center;
  flex-shrink: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 12px;
}

.header h1 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.header p { font-size: 13px; opacity: 0.92; }

.body-wrap { padding: 20px 16px 32px; flex: 1; }

.toolbar-top {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.btn-outline {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(234, 88, 12, 0.06);
}

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-group label .req { color: var(--primary); }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: var(--white);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
}
.form-group textarea { min-height: 110px; resize: vertical; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #fee2e2; color: #dc2626; }

.btn-primary {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  font-family: inherit;
}

/* 提交成功 */
.success-card {
  text-align: center;
  padding: 36px 20px 28px;
}

.success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--primary-bg);
  border: 3px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--primary);
}

.success-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.success-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.65;
}

.order-no-box {
  background: var(--primary-bg);
  border: 2px dashed var(--primary);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.order-no-label { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.order-no-value {
  font-size: 32px;
  font-weight: 900;
  color: var(--primary-dark);
  letter-spacing: 0.12em;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
}

.success-actions { display: flex; flex-direction: column; gap: 10px; }

.pay-notice {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 2px solid #fb923c;
  border-radius: 12px;
  padding: 16px 14px;
  margin-bottom: 18px;
  text-align: center;
}

.pay-notice-title {
  font-size: 17px;
  font-weight: 900;
  color: #c2410c;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pay-notice-text {
  font-size: 13px;
  color: #9a3412;
  line-height: 1.6;
}

.btn-pay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #0958d9, #1677ff);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  font-family: inherit;
  box-shadow: 0 6px 20px rgba(22, 119, 255, 0.35);
}

.btn-kefu-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-link-muted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
}

/* 客服弹窗（订单页） */
.kefu-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.kefu-modal.active { opacity: 1; visibility: visible; }
.kefu-modal-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.16);
  transform: translateY(16px) scale(0.96);
  transition: transform 0.25s;
}
.kefu-modal.active .kefu-modal-box { transform: translateY(0) scale(1); }
.kefu-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  font-size: 16px;
  cursor: pointer;
}
.kefu-modal-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; color: var(--text); }
.kefu-modal-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 18px; line-height: 1.6; }
.kefu-modal .qrcode-frame {
  width: 200px;
  height: 200px;
  margin: 0 auto 14px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.kefu-modal .qrcode-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kefu-modal-tip { font-size: 13px; color: var(--text-muted); }
.kefu-modal-tip i { color: #07c160; margin-right: 4px; }

/* 订单查询 */
.query-form .form-group input {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
}

.status-steps { list-style: none; margin: 0; padding: 0; }
.status-step {
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
  position: relative;
}
.status-step:last-child { padding-bottom: 0; }
.status-step::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.status-step:last-child::before { display: none; }
.status-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: #f1f5f9;
  color: var(--text-muted);
  border: 2px solid #e2e8f0;
}
.status-step.done .status-dot {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.status-step.current .status-dot {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary);
}
.status-step-body h4 { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.status-step-body p { font-size: 13px; color: var(--text-muted); }

.reply-list { margin-top: 8px; }
.reply-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
}
.reply-item:last-child { margin-bottom: 0; }
.reply-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.reply-content { font-size: 14px; white-space: pre-wrap; line-height: 1.65; }
.reply-imgs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.reply-imgs a {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.reply-imgs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
