/* 第二阶段：订单门户 / 政策库 / 快捷操作 */

.sidebar-link {
  display: block;
  color: #c6d2e2;
  font-size: 12px;
  margin-bottom: 12px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 7px;
  text-align: center;
}
.sidebar-link:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  text-decoration: none;
}

.quick-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.quick-actions .muted { margin-left: auto; }

.advanced-panel {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfd;
  padding: 10px 12px;
  margin: 10px 0;
}
.advanced-panel > summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
}
.advanced-panel[open] > summary { margin-bottom: 10px; }

.policy-panel {
  border: 1px solid #d1e9ff;
  background: var(--blue-soft);
  border-radius: 9px;
  padding: 12px 14px;
  margin: 12px 0;
}
.policy-panel-title {
  font-weight: 700;
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 4px;
}
.policy-panel .notice { margin: 6px 0 0; }

.linkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 10px;
}
.linkbox code {
  flex: 1;
  word-break: break-all;
  background: transparent;
  padding: 0;
}
.table-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.filter-select {
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 7px 9px;
  font-family: var(--font);
  font-size: 12px;
  background: #fff;
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

/* 店铺设置 */
.qr-settings {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin: 14px 0;
}
.qr-preview {
  width: 160px;
  height: 160px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fbfcfd;
  overflow: hidden;
  flex: 0 0 160px;
}
.qr-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.qr-placeholder {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 10px;
}
.qr-upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.qr-upload .field { gap: 4px; }

/* 客户端订单页 */
.order-body { background: #f4f6f8; }
.order-topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.order-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.order-brand:hover { text-decoration: none; }
.order-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}
.order-brand-text strong { font-size: 15px; }
.order-brand-text small { color: var(--muted); font-size: 11px; }
.order-top-note { font-size: 11px; color: var(--muted); }
.order-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 18px 40px;
}
.order-footer {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}
.order-footer p { margin: 4px 0; }
.order-page-head { margin-bottom: 16px; }
.order-page-head h1 { font-size: 26px; margin-bottom: 6px; }
.order-page-head p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.order-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.order-amount-box {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}
.order-amount-box strong { font-size: 24px; color: var(--ink); }
.order-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.order-card h2 { font-size: 17px; margin-bottom: 10px; }
.order-small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 8px;
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0;
}
.service-card {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  background: #fff;
}
.service-card:has(input:checked) {
  border-color: var(--teal);
  background: var(--teal-soft);
}
.service-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.service-name { font-weight: 700; color: var(--ink); }
.service-price { font-size: 22px; font-weight: 700; color: var(--ink); }
.service-desc { font-size: 12px; color: var(--muted); line-height: 1.6; }
.timeline {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.timeline-step {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.timeline-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef1f4;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}
.timeline-step.active { color: var(--ink); font-weight: 700; }
.timeline-step.active .timeline-dot { background: var(--ink); color: #fff; }
.timeline-step.done .timeline-dot { background: var(--green-soft); color: var(--green); }
.timeline-line { flex: 1; min-width: 20px; height: 1px; background: var(--line); }
.payment-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.qr-box {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.qr-box img {
  width: 210px;
  height: 210px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.qr-box .qr-placeholder {
  width: 210px;
  min-height: 180px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 14px;
  background: #fbfcfd;
}
.payment-info { flex: 1; min-width: 0; }
.kv-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px dashed var(--line);
  padding: 7px 0;
  font-size: 13px;
}
.kv-line span { color: var(--muted); }
.payment-info p {
  font-size: 12px;
  color: #475467;
  line-height: 1.7;
  margin-top: 10px;
}
.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 10px 0;
}
.upload-title {
  font-weight: 700;
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 6px;
}
.order-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.order-info-grid > div {
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.order-info-grid span { color: var(--muted); font-size: 11px; }
.order-info-grid strong { font-size: 13px; font-weight: 600; }

@media (max-width: 760px) {
  .order-topbar { padding: 12px 14px; }
  .order-top-note { display: none; }
  .order-main { padding: 16px 12px 30px; }
  .order-detail-head { flex-direction: column; }
  .order-amount-box { text-align: left; align-items: flex-start; }
  .service-grid, .upload-grid, .order-info-grid { grid-template-columns: 1fr; }
  .payment-layout { flex-direction: column; align-items: stretch; }
  .qr-box { flex: none; }
  .qr-box img, .qr-box .qr-placeholder { width: 180px; height: 180px; min-height: 180px; }
  .qr-settings { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .timeline { padding: 10px; }
  .timeline-step span:last-child { display: none; }
}

/* 订单详情页：右下角联系客服悬浮按钮 */
.contact-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--teal);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.18);
}
.contact-fab:hover { filter: brightness(1.05); }
.contact-pop {
  position: fixed;
  right: 16px;
  bottom: 64px;
  z-index: 60;
  width: min(280px, calc(100vw - 32px));
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.14);
}
.contact-pop-title { font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.contact-pop-body { font-size: 13px; color: #475467; line-height: 1.7; white-space: pre-wrap; }
