.orders-page {
  min-height: 100vh;
  background: var(--color-bg);
}

.orders-content {
  padding: 0 var(--space-md) calc(var(--tab-bar-height) + 24px);
}

.orders-tabs {
  position: sticky;
  top: 56px;
  z-index: var(--z-sticky);
  display: flex;
  gap: 8px;
  margin: 0 calc(var(--space-md) * -1);
  padding: 8px var(--space-md) 10px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-overflow-scrolling: touch;
}

.orders-tab {
  flex: 0 0 auto;
  min-width: 76px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-round);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 900;
}

.orders-tab.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.10);
}

.orders-tab em {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-round);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 11px;
  font-style: normal;
}

.orders-tab.active em {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-card {
  padding: 14px;
  border-radius: 18px;
  background: var(--color-bg-white);
  box-shadow: var(--shadow-card);
}

.order-card-header,
.order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.order-card-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-divider);
}

.order-card-header span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.order-card-header strong {
  flex-shrink: 0;
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  font-weight: 900;
}

.order-status-completed {
  color: var(--color-success) !important;
}

.order-status-cancelled {
  color: var(--color-text-placeholder) !important;
}

.order-card-body {
  display: flex;
  gap: 12px;
  padding: 12px 0;
}

.order-product-image {
  width: 78px;
  height: 78px;
  flex-shrink: 0;
  border-radius: 12px;
  object-fit: cover;
  background: var(--color-bg);
}

.order-product-info {
  flex: 1;
  min-width: 0;
}

.order-product-title {
  color: var(--color-text-title);
  font-size: var(--font-size-base);
  line-height: 1.35;
  font-weight: 900;
}

.order-product-meta,
.order-product-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 7px;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  line-height: 1.35;
}

.order-product-items span {
  max-width: 100%;
  padding: 2px 7px;
  border-radius: var(--radius-round);
  background: var(--color-bg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-card-footer {
  padding-top: 12px;
  border-top: 1px solid var(--color-divider);
}

.order-total {
  flex-shrink: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.order-total strong {
  margin-left: 4px;
  color: var(--color-price);
  font-size: var(--font-size-lg);
}

.order-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.order-action-btn {
  min-width: 76px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-round);
  font-size: var(--font-size-sm);
  font-weight: 900;
}

.order-action-btn.primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.10);
}

.order-action-btn.muted {
  background: var(--color-bg);
  color: var(--color-text-secondary);
}

.orders-empty {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 18px;
  color: var(--color-text-secondary);
  text-align: center;
}

.orders-empty-icon {
  width: 70px;
  height: 70px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.orders-empty-icon svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.orders-empty strong {
  color: var(--color-text-title);
  font-size: var(--font-size-xl);
}

.orders-empty span {
  max-width: 260px;
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

.payment-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal-backdrop);
  background: rgba(16, 20, 27, 0.48);
  animation: fadeIn 0.18s ease;
}

.payment-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-modal);
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 10px 16px calc(18px + var(--safe-area-bottom));
  border-radius: 22px 22px 0 0;
  background: var(--color-bg-white);
  box-shadow: 0 -18px 46px rgba(17, 24, 39, 0.18);
  animation: slideUp 0.22s ease;
}

.payment-sheet-grip {
  width: 42px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: var(--radius-round);
  background: var(--color-border-strong);
}

.payment-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.payment-sheet-kicker {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: 800;
}

.payment-sheet-header h3 {
  margin: 3px 0 0;
  color: var(--color-text-title);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
}

.payment-sheet-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-round);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--color-bg);
  color: var(--color-text-secondary);
}

.payment-sheet-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
}

.payment-sheet-amount {
  margin: 16px 0 12px;
  padding: 14px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: end;
  background: var(--color-primary-soft);
}

.payment-sheet-amount span {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 800;
}

.payment-sheet-amount strong {
  color: var(--color-price);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.payment-sheet-amount small {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-method-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.payment-method-item {
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-bg-white);
  text-align: left;
}

.payment-method-item:active {
  background: var(--color-bg-subtle);
}

.payment-method-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.payment-method-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.payment-method-wechat .payment-method-icon {
  background: rgba(22, 163, 74, 0.1);
  color: var(--color-success);
}

.payment-method-wechat .payment-method-icon svg path:first-child,
.payment-method-wechat .payment-method-icon svg path:nth-child(2) {
  fill: currentColor;
  stroke: none;
}

.payment-method-wechat .payment-method-icon svg circle {
  fill: #fff;
  stroke: none;
}

.payment-method-alipay .payment-method-icon {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.payment-method-alipay .payment-method-icon svg path:first-child {
  fill: currentColor;
  stroke: none;
}

.payment-method-alipay .payment-method-icon svg path:not(:first-child) {
  color: #fff;
  stroke: currentColor;
}

.payment-method-douyin .payment-method-icon {
  background: var(--color-bg);
  color: var(--color-text-title);
}

.payment-method-douyin .payment-method-icon svg path:first-child {
  fill: currentColor;
  stroke: none;
}

.payment-method-douyin .payment-method-icon svg path:nth-child(2) {
  stroke: var(--color-danger);
}

.payment-method-bank .payment-method-icon {
  background: rgba(245, 158, 11, 0.12);
  color: var(--color-warning);
}

.payment-method-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.payment-method-copy strong {
  color: var(--color-text-title);
  font-size: var(--font-size-base);
  font-weight: 900;
}

.payment-method-copy em {
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-method-check {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-round);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--color-bg);
  color: var(--color-text-placeholder);
}

.payment-method-check svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.payment-sheet-tip {
  margin: 12px 0 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

body.low-performance .order-card,
body.low-performance .orders-tab.active,
body.low-performance .order-action-btn.primary,
body.low-performance .payment-sheet {
  box-shadow: none;
}

@media (max-width: 360px) {
  .order-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .order-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
