[v-cloak] { display: none; }

/* 背景与整体框架随浏览器宽度：占满视口 */
html {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden !important;
  /* 纵向滚动根：与 body.overflow-y:visible 配对，避免 Win/Chrome 滚轮与滚动条错位 */
  overflow-y: auto;
  max-width: 100vw;
  min-height: 100%;
  height: auto;
  /* 减轻整页过度滚动传到浏览器 UI（主要作用在滚动根上） */
  overscroll-behavior-y: contain;
}

body {
  width: 100%;
  margin: 0;
  padding: 0;
  max-width: 100vw;
  overflow-x: hidden !important;
  /* 纵向不单独成滚动容器，由 html 滚动 */
  overflow-y: visible;
  /* 防止动画导致高度变化触发滚动条 */
  min-height: 100vh;
  height: auto;
}
/* 科技风格渐变背景 - 固定到视口，避免滚动时上下分离 */
body {
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 70%),
    linear-gradient(180deg, #0f172a 0%, #1e293b 25%, #312e81 50%, #1e293b 75%, #0f172a 100%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-position: 0% 50%, 0% 0%, 0% 0%, 0% 50%;
  background-attachment: fixed, fixed, fixed, fixed;
  position: relative;
  min-height: 100vh;
  height: auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  will-change: auto;
}

/* 移除 gradientShift 动画，避免触发滚动条 */

/* 移除 backgroundPulse 动画，避免 filter 导致页面重排触发滚动条 */
/* @keyframes backgroundPulse {
  0%, 100% { filter: brightness(1) contrast(1); }
  50% { filter: brightness(1.05) contrast(1.02); }
} */

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden;
  background-image: 
    linear-gradient(rgba(99, 102, 241, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(168, 85, 247, 0.08) 2px, transparent 2px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.08) 2px, transparent 2px),
    radial-gradient(circle at 15% 25%, rgba(99, 102, 241, 0.2) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(168, 85, 247, 0.2) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
  /* 限制背景尺寸，避免超出视口 */
  background-size: 40px 40px, 40px 40px, 200px 200px, 200px 200px, min(600px, 50vw) min(600px, 50vh), min(600px, 50vw) min(600px, 50vh), min(1000px, 80vw) min(1000px, 80vh);
  pointer-events: none;
  z-index: 0;
  /* 移除 gridPulse 动画，避免触发滚动条 */
  opacity: 0.9;
}

  body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden;
  /* 使用视口单位而不是固定像素值，避免超出视口 */
  background: 
    radial-gradient(ellipse 60vw 40vh at 10% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50vw 35vh at 90% 80%, rgba(168, 85, 247, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40vw 30vh at 50% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  /* 移除动画，避免触发滚动条 */
}

/* 移除 gridPulse 动画，避免触发滚动条 */
/* @keyframes gridPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
} */

/* 移除 gridMove 动画，避免触发滚动条 */
/* @keyframes gridMove {
  0% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  100% { background-position: 40px 40px, 40px 40px, 200px 200px, 200px 200px, 100px 100px, -100px -100px, 50px 50px; }
} */

/* 移除 lightMove 动画，避免 transform 导致滚动条 */
/* @keyframes lightMove {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.8; }
  33% { transform: translate(20px, -30px) scale(1.05); opacity: 1; }
  66% { transform: translate(-20px, 30px) scale(0.95); opacity: 0.9; }
} */

/* 整体框架宽度和高度 = 浏览器视口宽度和高度 */
#app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  overflow-x: hidden !important;
}

#app::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden;
  background-image: 
    radial-gradient(2px 2px at 20% 30%, rgba(99, 102, 241, 0.6), transparent),
    radial-gradient(2px 2px at 60% 70%, rgba(168, 85, 247, 0.6), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(59, 130, 246, 0.8), transparent),
    radial-gradient(1px 1px at 80% 20%, rgba(99, 102, 241, 0.5), transparent),
    radial-gradient(2px 2px at 30% 80%, rgba(168, 85, 247, 0.5), transparent);
  background-repeat: repeat;
  background-size: 200px 200px, 300px 300px, 150px 150px, 250px 250px, 180px 180px;
  pointer-events: none;
  z-index: 0;
  /* 移除 sparkle 动画，避免触发滚动条 */
  opacity: 0.6;
}

/* 移除 sparkle 动画，避免 transform 触发滚动条 */
/* @keyframes sparkle {
  0%, 100% { opacity: 0.4; transform: translate(0, 0); }
  25% { opacity: 0.8; transform: translate(10px, -10px); }
  50% { opacity: 0.6; transform: translate(-10px, 10px); }
  75% { opacity: 0.9; transform: translate(5px, 5px); }
} */

/* .tech-card / .kpi-card 见 /css/tech-surface.css */

.order-card {
  background: var(--tech-surface-card);
  border: 1px solid var(--tech-border-card);
  border-radius: 8px;
  padding: 20px;
  box-shadow:
    var(--tech-shadow-card),
    0 0 0 1px rgba(99, 102, 241, 0.3),
    inset 0 1px 0 var(--tech-inset-highlight),
    var(--tech-glow-card);
  backdrop-filter: blur(var(--tech-blur-card));
  -webkit-backdrop-filter: blur(var(--tech-blur-card));
  transition: all 0.3s ease;
  position: relative;
  /* 裁剪高光动画；纵向滚动在 html 上，此处 hidden 不再与「整页滚轮」冲突 */
  overflow: hidden;
  cursor: pointer;
  color: var(--tech-text-body);
}

.order-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
  animation: tech-surface-shine 3s infinite;
}

.order-card:hover {
  box-shadow:
    0 12px 48px rgba(59, 130, 246, 0.4),
    0 0 0 1px rgba(59, 130, 246, 0.4);
  border-color: rgba(59, 130, 246, 0.6);
  transform: translateY(-2px);
}

/* 卡片视图：Tailwind 灰字映射到可读 Token */
.order-card .text-gray-400 {
  color: var(--tech-text-label) !important;
}
.order-card .text-gray-300 {
  color: var(--tech-text-body) !important;
  font-weight: 500;
}
.order-card .text-sm.text-gray-300,
.order-card .grid .text-sm {
  line-height: 1.45;
}
html.orders-readable .order-card h3,
html.orders-high-contrast .order-card h3 {
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
}

.deep-link-flash-row {
  animation: deepLinkRowFlash 2.2s ease-out 1;
}
.return-related-row td {
  background: rgba(255, 221, 0, 0.12);
}
.return-related-row:hover td {
  background: rgba(255, 221, 0, 0.2);
}
.deep-link-flash-card {
  animation: deepLinkCardFlash 2.2s ease-out 1;
}

/* 配件查找：详情弹窗命中行 */
/* 配件查找 · 工具栏入口 */
.orders-part-find-trigger {
  position: relative;
  color: #a5f3fc !important;
  border: 1px solid rgba(34, 211, 238, 0.45) !important;
  background: rgba(8, 51, 68, 0.35) !important;
}
.orders-part-find-trigger--active {
  border-color: rgba(34, 211, 238, 0.85) !important;
  background: rgba(8, 145, 178, 0.35) !important;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.25);
}
.orders-part-find-trigger-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.125rem;
  height: 1.125rem;
  margin-left: 6px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #0f172a;
  background: #fbbf24;
  border-radius: 9999px;
  vertical-align: middle;
}

/* 配件查找 · 底部悬浮面板 */
.orders-part-find-panel {
  position: fixed;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 12600;
  width: min(100vw - 2rem, 520px);
  max-height: min(70vh, 420px);
  overflow-y: auto;
  pointer-events: auto;
}
.orders-part-find-panel-inner {
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.97) 0%, rgba(30, 41, 59, 0.98) 100%);
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.8),
    0 12px 40px rgba(0, 0, 0, 0.55),
    0 0 32px rgba(34, 211, 238, 0.12);
  padding: 12px 14px 14px;
}
.orders-part-find-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.orders-part-find-panel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #e0f2fe;
}
.orders-part-find-panel-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 8px;
  background: rgba(51, 65, 85, 0.5);
  color: #e2e8f0;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.orders-part-find-panel-close:hover {
  border-color: rgba(248, 113, 113, 0.6);
  color: #fecaca;
}
.orders-part-find-panel-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.orders-part-find-collapse-btn {
  padding: 0 10px;
  min-height: 2rem;
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 8px;
  background: rgba(8, 51, 68, 0.45);
  color: #a5f3fc;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.orders-part-find-collapse-btn:hover {
  border-color: rgba(34, 211, 238, 0.75);
  background: rgba(8, 145, 178, 0.35);
}
.orders-part-find-shortcut-hint {
  margin: -4px 0 8px;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(148, 163, 184, 0.95);
}
.orders-part-find-panel-peek {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(34, 211, 238, 0.5);
  border-radius: 9999px;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.97) 0%, rgba(30, 41, 59, 0.98) 100%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  color: #e0f2fe;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.orders-part-find-panel-peek-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.orders-part-find-panel-peek-chevron {
  flex-shrink: 0;
  font-size: 1.1rem;
  color: #67e8f9;
}
.orders-part-find-panel.is-collapsed {
  width: min(100vw - 1.5rem, 280px);
  max-height: none;
  overflow: visible;
}
.orders-part-find-jump-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.orders-part-find-jump-label {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
}
.orders-part-find-jump-select {
  flex: 1 1 12rem;
  min-width: 10rem;
  min-height: 40px;
}
.orders-part-find-panel-query {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.orders-part-find-query-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.orders-part-find-query-row--fields {
  width: 100%;
}
.orders-part-find-query-row--action {
  width: 100%;
}
.orders-part-find-panel-query .orders-part-find-supplier {
  flex: 0 1 auto;
  min-width: 9rem;
  max-width: 11rem;
}
.orders-part-find-panel-query .orders-part-find-input {
  flex: 1 1 10rem;
  min-width: 8rem;
}
@media (min-width: 769px) {
  .orders-part-find-panel-query {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .orders-part-find-query-row--fields,
  .orders-part-find-query-row--action {
    width: auto;
    flex: 1 1 auto;
  }
  .orders-part-find-query-row--action {
    flex: 0 0 auto;
  }
}
.orders-part-find-panel-nav {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(34, 211, 238, 0.25);
}
.orders-part-find-modal-hint {
  margin: 0 0 6px;
  font-size: 12px;
  color: rgba(253, 230, 138, 0.9);
}
.orders-part-find-query-hint {
  margin: 0 0 4px;
  font-size: 12px;
  color: #94a3b8;
}
.orders-part-find-status {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(165, 243, 252, 0.95);
}
.orders-part-find-nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.orders-part-find-nav-actions .btn-secondary,
.orders-part-find-panel-query .btn-primary {
  min-height: 40px;
}
body.orders-part-find-panel-open #app {
  padding-bottom: 5.5rem;
}
body.orders-part-find-panel-collapsed.orders-part-find-panel-open #app {
  padding-bottom: 3.25rem;
}
/* 窄屏 / 移动端：两行查询区 + 16px 输入防 iOS 聚焦缩放 */
@media (max-width: 768px) {
  .orders-part-find-panel {
    width: calc(100vw - 0.75rem);
    max-height: min(58vh, 340px);
    bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
  }
  .orders-part-find-panel-inner {
    padding: 8px 10px 10px;
    border-radius: 10px;
  }
  .orders-part-find-panel-head {
    margin-bottom: 6px;
  }
  .orders-part-find-panel-title {
    font-size: 14px;
  }
  .orders-part-find-panel-close {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1rem;
    border-radius: 6px;
  }
  .orders-part-find-panel-query {
    flex-direction: column;
    gap: 6px;
  }
  .orders-part-find-query-row--fields {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
  }
  .orders-part-find-query-row--action {
    display: flex;
    width: 100%;
  }
  .orders-part-find-panel-query .orders-part-find-supplier {
    flex: 0 0 38%;
    min-width: 0;
    max-width: 42%;
  }
  .orders-part-find-panel-query .orders-part-find-input {
    flex: 1 1 auto;
    min-width: 0;
  }
  /* 16px 避免 Safari 聚焦输入时整页放大 */
  .orders-part-find-panel-query .form-input,
  .orders-part-find-panel-query select.form-input {
    padding: 6px 8px;
    font-size: 16px;
    line-height: 1.25;
    border-radius: 6px;
  }
  .orders-part-find-panel-query .orders-part-find-run-btn {
    width: 100%;
    min-height: 36px;
    padding: 6px 12px;
    font-size: 15px;
  }
  .orders-part-find-panel-nav {
    margin-top: 8px;
    padding-top: 8px;
  }
  .orders-part-find-modal-hint,
  .orders-part-find-query-hint {
    font-size: 12px;
    margin-bottom: 2px;
  }
  .orders-part-find-status {
    font-size: 13px;
    margin-bottom: 6px;
    line-height: 1.35;
  }
  .orders-part-find-nav-actions {
    flex-wrap: nowrap;
    gap: 6px;
  }
  .orders-part-find-nav-actions .btn-secondary {
    flex: 1 1 0;
    min-width: 0;
    min-height: 36px;
    padding: 6px 4px;
    font-size: 13px;
    white-space: nowrap;
  }
  body.orders-part-find-panel-open #app {
    padding-bottom: 4.5rem;
  }
  body.orders-part-find-panel-collapsed.orders-part-find-panel-open #app {
    padding-bottom: 2.75rem;
  }
  .orders-part-find-panel.is-collapsed {
    width: calc(100vw - 1rem);
    max-width: 260px;
  }
  .orders-part-find-panel-peek {
    padding: 6px 10px;
    font-size: 12px;
  }
  .orders-part-find-shortcut-hint {
    font-size: 10px;
    margin-bottom: 6px;
  }
  .orders-part-find-jump-select {
    min-height: 36px;
    font-size: 16px;
  }
  .orders-part-find-trigger {
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
    font-size: 14px;
  }
}
.modal-product-table-container tbody tr.part-find-hit-row td {
  background: rgba(251, 191, 36, 0.22);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.55);
}
.modal-product-table-container tbody tr.part-find-hit-row:hover td {
  background: rgba(251, 191, 36, 0.32);
}

/* 配件查找：卡片视图当前命中单（琥珀色，持续到下一次查找/筛选清空） */
.order-card.part-find-active-card {
  border-color: rgba(251, 191, 36, 0.92) !important;
  background: linear-gradient(145deg, rgba(69, 52, 12, 0.55) 0%, rgba(15, 23, 42, 0.92) 55%) !important;
  box-shadow:
    0 0 0 3px rgba(251, 191, 36, 0.7),
    0 0 36px rgba(251, 191, 36, 0.42),
    0 10px 36px rgba(0, 0, 0, 0.45) !important;
  animation: partFindCardPulse 1.6s ease-in-out infinite;
  z-index: 2;
  position: relative;
}
.order-card.part-find-active-card::before {
  animation: none;
  opacity: 0;
}
.order-card.part-find-active-card .card-products {
  border-color: rgba(251, 191, 36, 0.45);
}
.card-product-row.part-find-hit-item {
  background: rgba(251, 191, 36, 0.24);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.62);
  padding: 4px 8px;
  margin: 0 -4px;
}
.card-product-row.part-find-hit-item .card-product-name {
  color: #fde68a;
  font-weight: 700;
}
.card-product-row.part-find-hit-item .card-product-price {
  color: #fcd34d;
}
@keyframes partFindCardPulse {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(251, 191, 36, 0.65),
      0 0 28px rgba(251, 191, 36, 0.32),
      0 10px 36px rgba(0, 0, 0, 0.45);
  }
  50% {
    box-shadow:
      0 0 0 4px rgba(251, 191, 36, 0.95),
      0 0 44px rgba(251, 191, 36, 0.55),
      0 12px 40px rgba(0, 0, 0, 0.5);
  }
}
@keyframes deepLinkRowFlash {
  0% { background: rgba(34, 211, 238, 0.36); }
  100% { background: rgba(34, 211, 238, 0.06); }
}
@keyframes deepLinkCardFlash {
  0% { box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.95), 0 0 26px rgba(34, 211, 238, 0.45); }
  100% { box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.35), 0 0 0 rgba(34, 211, 238, 0); }
}
.card-click-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 9999px;
  padding: 2px 8px;
  transition: all 0.2s ease;
}
.card-click-indicator .arrow {
  transform: translateX(0);
  transition: transform 0.2s ease;
}
.order-card:hover .card-click-indicator {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.65);
  background: rgba(59, 130, 246, 0.24);
}
.order-card:hover .card-click-indicator .arrow {
  transform: translateX(2px);
}

/* 文本截断样式 */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  background: white;
  color: #475569;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid #cbd5e1;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.form-input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 6px;
  font-size: var(--tech-fs-sm);
  transition: all 0.2s;
  background-color: var(--tech-surface-input);
  color: var(--tech-text-body);
  backdrop-filter: blur(8px);
}

.form-input::placeholder {
  color: var(--tech-text-placeholder);
}

.form-input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  background-color: var(--tech-surface-input);
  color: var(--tech-text-title);
}

.form-input:disabled {
  background-color: rgba(15, 23, 42, 0.4);
  color: var(--tech-text-muted);
  cursor: not-allowed;
  border-color: rgba(99, 102, 241, 0.2);
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-info {
  background-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  animation: slideIn 0.3s ease;
  min-width: 300px;
}

/* 自动补全下拉列表样式 */
.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(59, 130, 246, 0.5);
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.autocomplete-item {
  padding: 8px 12px;
  cursor: pointer;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  transition: background 0.2s;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background: rgba(59, 130, 246, 0.3);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-list::-webkit-scrollbar {
  width: 6px;
}

.autocomplete-list::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.5);
}

.autocomplete-list::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.4);
  border-radius: 3px;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.success {
  border-left: 4px solid #10b981;
}

.toast.error {
  border-left: 4px solid #ef4444;
}

.toast.warning {
  border-left: 4px solid #f59e0b;
}

.admin-table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  font-size: var(--tech-fs-sm);
  background: var(--tech-surface-table);
}

.admin-table th {
  background: linear-gradient(135deg, rgb(30, 58, 95) 0%, rgb(45, 35, 75) 100%);
  border: 1px solid rgba(59, 130, 246, 0.4);
  padding: 12px;
  text-align: center;
  font-weight: 600;
  color: var(--tech-text-title);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-table td {
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 12px;
  color: var(--tech-text-body);
  text-align: center;
}

.tech-card .text-gray-400 {
  color: var(--tech-text-label);
}
.tech-card .text-gray-300 {
  color: var(--tech-text-body);
}
.tech-card label.text-gray-400 {
  color: var(--tech-text-label);
}
.admin-table td.text-left {
  text-align: left;
}
/* 客户收货信息、客户要求：固定列宽（已各加 100px）、固定行高，仅显示单行，禁止自动调整行高 */
.admin-table td.cell-multiline-cap {
  vertical-align: middle;
  width: 360px;
  max-width: 360px;
  min-width: 360px;
  height: 44px;
  max-height: 44px;
  overflow: hidden;
  box-sizing: border-box;
}
.admin-table td.cell-multiline-cap.cell-requirement {
  width: 320px;
  max-width: 320px;
  min-width: 320px;
}
/* 展示时仅显示单行，超出省略号 */
.admin-table td.cell-multiline-cap > div {
  max-width: 100%;
  height: 20px;
  line-height: 20px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  box-sizing: border-box;
}
/* 编辑时也限为单行高度，不自动增高 */
.admin-table td.cell-multiline-cap > textarea {
  max-width: 100%;
  height: 32px;
  max-height: 32px;
  overflow: hidden;
  resize: none;
  display: block;
  box-sizing: border-box;
}

/* 平台订单号、客户ID：固定列宽 + 单行省略，避免长文本溢出重叠（与收货信息列同一思路） */
.admin-table td.cell-platform-order-id {
  vertical-align: middle;
  width: 150px;
  max-width: 150px;
  min-width: 150px;
  overflow: hidden;
  box-sizing: border-box;
}
.admin-table td.cell-customer-id {
  vertical-align: middle;
  width: 140px;
  max-width: 140px;
  min-width: 140px;
  overflow: hidden;
  box-sizing: border-box;
}
.admin-table td.cell-platform-order-id > div,
.admin-table td.cell-customer-id > div {
  max-width: 100%;
  height: 20px;
  line-height: 20px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  box-sizing: border-box;
}
.admin-table td.cell-platform-order-id > input,
.admin-table td.cell-customer-id > input {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-table tbody tr {
  transition: background-color 0.15s ease;
}

.admin-table tbody tr:nth-child(even) {
  background-color: var(--tech-surface-table-row-even);
}

.admin-table tbody tr:hover {
  background-color: rgba(59, 130, 246, 0.15);
}
.admin-table tr.excel-active-row td {
  background: rgba(14, 116, 144, 0.18) !important;
}
.admin-table td.excel-active-col {
  background: rgba(56, 189, 248, 0.16) !important;
}
.admin-table td.excel-active-cell {
  background: rgba(59, 130, 246, 0.28) !important;
  box-shadow: inset 0 0 0 2px rgba(56, 189, 248, 0.9);
}
.admin-table th.excel-active-col {
  background: rgba(30, 64, 175, 0.5) !important;
  color: #dbeafe;
}

.name-link {
  color: #60a5fa;
  cursor: pointer;
  font-weight: 500;
  transition: color 0.2s;
}

.name-link:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.table-container {
  /* 表头 1 行 + 数据 10 行（与 TABLE_PAGE_SIZE 一致），无内部滚动；留出与分页栏的间隙避免最后一行与底部重叠 */
  max-height: 690px;
  overflow: hidden;
  margin-bottom: 4px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.4);
}

.table-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.5);
}

.table-container::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.4);
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.6);
}

/* 下拉展开时临时取消溢出裁剪，避免快递方式/电商平台/客服/技术 选项被遮挡 */
.table-container.dropdown-open {
  overflow: visible !important;
  z-index: 20;
  position: relative;
}

/* 弹窗中的商品清单表容器，不限制高度 */
.modal-product-table-container {
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  margin-bottom: 4px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.4);
}
.tech-card.dropdown-open {
  overflow: visible;
}

/* 弹窗遮罩：铺满视口，内容区不滚动 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  animation: fadeIn 0.2s ease;
  overflow: hidden;
  overscroll-behavior: contain;
}
/* 从订单详情内再打开子弹窗时，叠在详情弹窗之上 */
.modal-overlay.modal-overlay-stacked {
  z-index: 1100;
}

/* 当弹窗打开时，禁用 body 滚动 */
body.modal-open {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  height: 100%;
}

html.modal-open,
html.modal-open body {
  overflow: hidden !important;
  width: 100%;
  height: 100%;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 弹窗内容：挂到 body 后 position:fixed 相对视口，用 50%+translate 精确居中 */
.modal-content {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  width: min(98vw, 1680px);
  max-width: min(98vw, 1680px);
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  animation: modalSlideUp 0.3s ease;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.modal-content.order-item-save-confirm-modal {
  width: min(92vw, 380px) !important;
  max-width: min(92vw, 380px) !important;
}
/* 订单详情弹窗内输入框：确保移动端长按可选中文字并出现系统复制/粘贴菜单 */
.modal-content input[type="text"],
.modal-content textarea {
  -webkit-user-select: text;
  user-select: text;
}
/* 卡片视图：长按可选中文字，调出系统复制/粘贴菜单 */
.order-card {
  -webkit-user-select: text;
  user-select: text;
}
.order-card button {
  -webkit-user-select: none;
  user-select: none;
}
.card-assign-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.card-assign-item .label {
  font-size: var(--tech-fs-xs);
  color: var(--tech-text-label);
  margin-bottom: 4px;
  font-weight: 600;
}
.card-assign-select {
  width: 100%;
  min-width: 0;
  padding: 6px 10px;
  font-size: var(--tech-fs-xs);
  font-weight: 600;
  color: #cffafe;
  background-color: var(--tech-surface-input);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 6px;
  outline: none;
}
.card-products {
  margin-bottom: 12px;
  background: var(--tech-surface-nested);
  border: 1px solid rgba(99, 102, 241, 0.32);
  border-radius: 8px;
  padding: 10px;
}
.card-products-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.card-products-title {
  font-size: var(--tech-fs-xs);
  color: var(--tech-text-label);
  font-weight: 700;
}
.card-products-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-size: var(--tech-fs-sm);
  color: var(--tech-text-body);
  line-height: 1.45;
}
.card-product-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-product-price {
  color: #fca5a5;
  font-weight: 700;
  white-space: nowrap;
}
.btn-link-mini {
  background: transparent;
  border: none;
  color: #60a5fa;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}
.btn-link-mini:hover {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.15);
}
.card-products-empty {
  font-size: var(--tech-fs-xs);
  color: var(--tech-text-muted);
}
/* 列表（表格）视图：单元格内文字可长按选中 */
.tech-card .admin-table td {
  -webkit-user-select: text;
  user-select: text;
}
@media (max-width: 768px) {
  .card-assign-grid {
    grid-template-columns: 1fr;
  }
  .order-card .text-sm.text-gray-300,
  .order-card .grid .text-sm {
    font-size: max(var(--tech-fs-sm), 14px);
  }
  .card-product-row {
    font-size: max(var(--tech-fs-sm), 14px);
  }
  .order-card {
    cursor: default;
  }
  .order-card .card-click-indicator {
    display: none;
  }
  .card-action-row {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 0 -4px -4px -4px;
    padding: 10px 4px 4px 4px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72));
    border-top: 1px solid rgba(59, 130, 246, 0.28);
  }
  .card-action-row button {
    min-height: 36px;
    font-weight: 700;
  }
  /* 卡片「产品信息与价格」：移动端展示全部行（勿限高/勿截断列表） */
  .order-card {
    overflow-x: hidden;
    overflow-y: visible;
  }
  .order-card .card-products,
  .order-card .card-products-list {
    max-height: none !important;
    overflow: visible !important;
  }
  .order-card .card-product-name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
  }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(10px) !important;
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) !important;
  }
}

.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #f3f4f6;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pagination button {
  padding: 8px 12px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(30, 41, 59, 0.8);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  color: #e2e8f0;
  backdrop-filter: blur(8px);
}

.pagination button:hover:not(:disabled) {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(59, 130, 246, 0.5);
  color: #fff;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: rgba(226, 232, 240, 0.5);
}

.pagination button.active {
  background: rgba(59, 130, 246, 0.8);
  color: white;
  border-color: rgba(59, 130, 246, 0.6);
}
.pagination-page-select {
  min-width: 88px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  background-color: var(--tech-surface-input);
  color: var(--tech-text-title);
  cursor: pointer;
  margin: 0 4px;
}
.pagination-page-select:hover { border-color: rgba(99, 102, 241, 0.6); }
.pagination-page-select:focus { outline: none; border-color: rgba(99, 102, 241, 0.7); }

.view-toggle {
  display: flex;
  gap: 8px;
  padding: 0;
}

.view-toggle button {
  padding: 8px 14px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(30, 41, 59, 0.75);
  color: #cbd5e1;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}

.view-toggle button.active {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25);
}
.view-toggle button:not(.active):hover {
  color: #e2e8f0;
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(30, 41, 59, 0.9);
}
.segmented-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.segmented-title {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  white-space: nowrap;
}
.segmented-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(100, 116, 139, 0.35);
  background: rgba(15, 23, 42, 0.4);
}
.segmented-bar button {
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 7px 10px;
  transition: all 0.2s ease;
}
.segmented-bar button.active {
  background: rgba(37, 99, 235, 0.95);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
.segmented-bar button:not(.active):hover {
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.55);
}
.orders-action-group {
  border: 1px solid rgba(71, 85, 105, 0.35);
  background: rgba(15, 23, 42, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
}
.orders-action-group .group-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #e2e8f0 !important;
  border-color: rgba(148, 163, 184, 0.45) !important;
  background: rgba(51, 65, 85, 0.55) !important;
}

/* 查询与导航：桌面端单行工具栏，搜索可伸长，「更多」贴右；窄宽度时出现横向滚动条而非整块折乱 */
@media (min-width: 769px) {
  .orders-filter-section .orders-action-group .orders-query-actions-toolbar {
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
  }
  .orders-filter-section .orders-action-group .orders-query-actions-toolbar > .orders-query-search-input {
    flex: 1 1 auto;
    width: auto;
    min-width: 12rem;
    max-width: none;
  }
  .orders-filter-section .orders-action-group .orders-query-actions-toolbar > .orders-more-actions-wrap {
    margin-left: auto;
  }
  .orders-filter-section .orders-action-group .orders-query-actions-toolbar > button,
  .orders-filter-section .orders-action-group .orders-query-actions-toolbar > .orders-more-actions-wrap {
    flex-shrink: 0;
  }
}

/* 让「更多」下拉浮层可突破筛选卡片，不被 tech-card 裁剪 */
.tech-card.orders-filter-section {
  overflow: visible;
  z-index: 30;
}
.tech-card.orders-filter-section::before {
  pointer-events: none;
}
/* Teleport 到 body 的「更多」下拉（fixed 定位由 orders-app.js 计算） */
.orders-more-actions-panel {
  box-sizing: border-box;
  background: rgba(11, 16, 36, 0.98);
  backdrop-filter: blur(8px);
}
.more-actions-group {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(71, 85, 105, 0.45);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.45);
  margin-bottom: 10px;
}
.more-actions-group:last-child {
  margin-bottom: 0;
}
.more-actions-group > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}
.more-actions-group > summary::-webkit-details-marker {
  display: none;
}
.more-actions-group > summary::after {
  content: "▸";
  color: #94a3b8;
  font-size: 12px;
  transition: transform 0.2s ease;
}
.more-actions-group[open] > summary::after {
  transform: rotate(90deg);
}
.more-actions-list {
  border-top: 1px solid rgba(71, 85, 105, 0.35);
  padding: 8px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.more-actions-item {
  width: auto;
  min-height: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
}
.more-actions-list .more-actions-item:not(.action-delete-all):not(.action-batch-delete):not(.action-return-audit-hot) {
  color: #e2e8f0 !important;
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
  background: rgba(51, 65, 85, 0.35) !important;
}
.more-actions-list .more-actions-item:not(.action-delete-all):not(.action-batch-delete):not(.action-return-audit-hot):hover {
  color: #f8fafc !important;
  border-color: rgba(148, 163, 184, 0.68) !important;
  background: rgba(51, 65, 85, 0.6) !important;
}
.orders-filter-section .orders-actions-buttons > button,
.orders-filter-section .orders-actions-buttons > a,
.orders-filter-section .orders-actions-buttons > details > summary {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.orders-filter-section .orders-actions-buttons > details > summary {
  color: #e2e8f0;
}
.orders-filter-section .orders-actions-buttons > details > summary::-webkit-details-marker {
  display: none;
}
.orders-filter-section .orders-actions-buttons > details[open] > summary {
  border-color: rgba(148, 163, 184, 0.55);
  background: rgba(51, 65, 85, 0.65);
}
/* 主操作行（查询与导航）里的次级按钮：统一深色，避免白底突兀 */
.orders-filter-section .orders-action-group:first-of-type .orders-actions-buttons > .btn-secondary {
  color: #e2e8f0 !important;
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
  background: rgba(51, 65, 85, 0.35) !important;
}
.orders-filter-section .orders-action-group:first-of-type .orders-actions-buttons > .btn-secondary:hover {
  color: #f8fafc !important;
  border-color: rgba(148, 163, 184, 0.68) !important;
  background: rgba(51, 65, 85, 0.6) !important;
}
.action-delete-all {
  color: #fca5a5 !important;
  border: 1px solid rgba(248, 113, 113, 0.5);
  background: rgba(127, 29, 29, 0.18);
}
.action-delete-all:hover {
  color: #fecaca !important;
  background: rgba(127, 29, 29, 0.28);
  border-color: rgba(248, 113, 113, 0.65);
}
.action-batch-delete {
  color: #e2e8f0 !important;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(51, 65, 85, 0.3);
}
.action-batch-delete:hover {
  color: #f8fafc !important;
  background: rgba(51, 65, 85, 0.5);
  border-color: rgba(148, 163, 184, 0.65);
}
.action-return-audit-hot {
  color: #fde68a !important;
  border-color: rgba(252, 211, 77, 0.55) !important;
  background: rgba(217, 119, 6, 0.22) !important;
}
.action-return-audit-hot:hover {
  color: #fef3c7 !important;
  background: rgba(217, 119, 6, 0.3) !important;
  border-color: rgba(252, 211, 77, 0.7) !important;
}
.batch-return-modal {
  width: min(92vw, 520px) !important;
  max-width: min(92vw, 520px) !important;
}
.batch-return-mode-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.6);
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}
.batch-return-mode-btn:hover {
  border-color: rgba(148, 163, 184, 0.65);
  background: rgba(51, 65, 85, 0.55);
  color: #e2e8f0;
}
.batch-return-mode-btn.active {
  border-color: rgba(245, 158, 11, 0.75);
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.9), rgba(180, 83, 9, 0.95));
  color: #fff;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.28);
}

/* ========== 移动端：汉堡菜单、安全区、Toast、表格、减弱动效 ========== */
@media (max-width: 768px) {
  .max-w-\[2120px\].mx-auto.px-4 {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }
  nav h1 { white-space: nowrap; }
  .toast {
    left: 10px; right: 10px; top: auto;
    bottom: max(1rem, env(safe-area-inset-bottom));
    max-width: calc(100vw - 20px);
    min-height: 44px;
    display: flex; align-items: center; justify-content: center;
  }
  /* 成交系统筛选区：移动端紧凑布局 */
  .orders-filter-section {
    padding: 1rem !important;
  }
  .orders-filter-row {
    gap: 0.75rem;
  }
  /* 上行：开始/结束日期各占半宽；下行：快递/客服/技术三等分 */
  .orders-filter-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 0.5rem;
    row-gap: 0.65rem;
  }
  .orders-filter-grid > div {
    min-width: 0;
  }
  .orders-filter-grid > div:nth-child(1) {
    grid-column: 1 / span 3;
  }
  .orders-filter-grid > div:nth-child(2) {
    grid-column: 4 / span 3;
  }
  .orders-filter-grid > div:nth-child(3) {
    grid-column: 1 / span 2;
  }
  .orders-filter-grid > div:nth-child(4) {
    grid-column: 3 / span 2;
  }
  .orders-filter-grid > div:nth-child(5) {
    grid-column: 5 / span 2;
  }
  .orders-filter-section .orders-filter-grid label {
    font-size: 12px;
    margin-bottom: 2px;
  }
  .orders-filter-section .orders-filter-grid .form-input,
  .orders-filter-section .orders-filter-grid select.form-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 8px 6px;
    font-size: 13px;
  }
  .orders-filter-section .orders-filter-grid select.form-input {
    padding-right: 26px;
    font-size: 12px;
  }
  .orders-filter-section .orders-filter-grid input[type="date"].form-input {
    padding: 8px 2px 8px 6px;
    font-size: 12px;
    color-scheme: dark;
  }
  .orders-filter-section .orders-filter-grid input[type="date"].form-input::-webkit-date-and-time-value {
    text-align: left;
    min-width: 0;
    max-width: calc(100% - 1.25rem);
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .orders-filter-section .orders-filter-grid input[type="date"].form-input::-webkit-calendar-picker-indicator {
    margin: 0;
    padding: 0;
    opacity: 0.85;
  }
  .orders-filter-section .view-toggle {
    display: none;
  }
  /* 搜索 + 操作按钮：移动端分行、网格排布 */
  .orders-actions-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .orders-actions-row input.form-input {
    width: 100%;
    min-width: 0;
    order: -1;
  }
  .orders-actions-row .btn-primary,
  .orders-actions-row button {
    min-height: 44px;
    flex: 1;
    min-width: 0;
  }
  .orders-actions-row > input.form-input {
    margin-bottom: 0;
  }
  /* 查询与导航：移动端固定 2×5 网格（左：搜索/上一天/清筛/加急发/更多；右：刷新/下一天/模式/延期发/空） */
  .orders-filter-section .orders-action-group .orders-query-actions-toolbar.orders-actions-buttons {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    align-items: stretch;
    flex-wrap: unset !important;
  }
  .orders-filter-section .orders-action-group .orders-query-actions-toolbar.orders-actions-buttons > * {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .orders-filter-section .orders-action-group .orders-query-actions-toolbar.orders-actions-buttons > .orders-query-search-input {
    width: 100%;
    min-width: 0 !important;
  }
  .orders-filter-section .orders-action-group .orders-query-actions-toolbar.orders-actions-buttons > button {
    justify-self: stretch;
    width: 100%;
    max-width: 100%;
    padding-left: 8px;
    padding-right: 8px;
  }
  .orders-filter-section .orders-action-group .orders-query-actions-toolbar.orders-actions-buttons > button.orders-query-mode-toggle {
    white-space: normal;
    line-height: 1.25;
    min-height: 44px;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .orders-filter-section .orders-action-group .orders-query-actions-toolbar.orders-actions-buttons > .orders-more-actions-wrap {
    margin-left: 0;
    justify-self: stretch;
  }
  .orders-filter-section .orders-action-group .orders-query-actions-toolbar.orders-actions-buttons > .orders-more-actions-wrap > .btn-secondary {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  /* 订单详情弹窗：详情区与商品清单区表格支持左右滑动 */
  .modal-content .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* 订单详情弹窗内表格：单元格文字单行显示，横向滑动查看 */
  .modal-content .table-container th,
  .modal-content .table-container td,
  .modal-content .modal-product-table-container th,
  .modal-content .modal-product-table-container td {
    white-space: nowrap;
  }
  /* 订单详情弹窗：下拉不遮挡文字，增加行高与内边距 */
  .modal-content .table-container th,
  .modal-content .table-container td,
  .modal-content .modal-product-table-container th,
  .modal-content .modal-product-table-container td {
    min-height: 44px;
    padding: 8px 6px;
    vertical-align: middle;
  }
  .modal-content .table-container select,
  .modal-content .modal-product-table-container select {
    min-height: 36px;
    padding: 6px 8px;
  }
  /* 订单详情上半部分：单独放宽，避免在手机端被压缩成难读布局 */
  .modal-content .order-detail-summary-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-content .order-detail-summary-table {
    width: max-content !important;
    min-width: 1280px;
    table-layout: auto !important;
  }
  .modal-content .order-detail-summary-table th,
  .modal-content .order-detail-summary-table td {
    min-width: 128px;
    white-space: nowrap;
    font-size: 13px;
    padding: 8px 6px;
  }
  /* 订单详情-商品清单顶部汇总表：移动端优先横向滑动，不再强行压缩 */
  .modal-content .order-fee-summary-table {
    width: max-content !important;
    min-width: 1280px;
    table-layout: auto !important;
  }
  .modal-content .order-fee-summary-table th,
  .modal-content .order-fee-summary-table td {
    min-width: 128px;
    white-space: nowrap;
    font-size: 13px;
    padding: 8px 6px;
  }
  /* 订单详情-商品清单：加宽「产品型号」列，提高表格 min-width，横向滑动可看全型号 */
  .modal-content .modal-product-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-content .modal-product-table-container table {
    width: max-content !important;
    min-width: 760px;
    table-layout: auto !important;
  }
  .modal-content .modal-product-table-container thead th:nth-child(2),
  .modal-content .modal-product-table-container tbody td:nth-child(2) {
    min-width: 250px;
    width: auto;
    max-width: none;
  }
  /* 覆盖模板内 colgroup 的内联百分比宽度，确保型号列宽度调整真实生效 */
  .modal-content .modal-product-table-container table colgroup col:nth-child(2) {
    width: 250px !important;
  }
  /* 型号输入框与单元格同宽拉长，避免焦点态仍像在窄格里「看不全」 */
  .modal-content .modal-product-table-container tbody td:nth-child(2) input[type="text"] {
    min-width: 250px !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
  }
  /* 移动端双指放大后可左右滑动；纵向与桌面一致：仅 html 纵向滚动 */
  html {
    overflow-x: auto !important;
    overflow-y: auto !important;
  }
  body {
    overflow-x: auto !important;
    overflow-y: visible !important;
  }
  #app {
    overflow-x: auto !important;
    overflow-y: visible !important;
  }
}
@media (max-width: 480px) {
  .table-container table { min-width: 520px; }
  .table-container th, .table-container td {
    font-size: 11px; padding: 4px 3px;
  }
  /* 弹窗内商品清单仍用较可读字号（型号列宽度由 .modal-content .modal-product-table-container 规则保证） */
  .modal-content .modal-product-table-container th,
  .modal-content .modal-product-table-container td {
    font-size: 12px;
    padding: 6px 5px;
  }
  .modal-content .order-fee-summary-table {
    min-width: 1200px;
  }
  .modal-content .order-fee-summary-table th,
  .modal-content .order-fee-summary-table td {
    font-size: 12px;
    padding: 6px 5px;
  }
  .modal-content .order-detail-summary-table {
    min-width: 1200px;
  }
  .modal-content .order-detail-summary-table th,
  .modal-content .order-detail-summary-table td {
    font-size: 12px;
    padding: 6px 5px;
  }
}
/* 订单详情弹窗内数字输入：隐藏原生上下加减按钮 */
.modal-content input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.modal-content input[type="number"]::-webkit-outer-spin-button,
.modal-content input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.modal-product-table-container .autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 2px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.45);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(59, 130, 246, 0.1);
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.85) rgba(15, 23, 42, 0.35);
}
.modal-product-table-container .autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  font-size: 14px;
  line-height: 1.3;
  color: #cbd5e1;
  transition: background-color 0.08s linear, color 0.08s linear;
}
.modal-product-table-container .autocomplete-item:hover,
.modal-product-table-container .autocomplete-item.selected {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.24) 0%, rgba(147, 51, 234, 0.2) 100%);
  color: #e2e8f0;
}
.modal-product-table-container .autocomplete-list::-webkit-scrollbar {
  width: 10px;
}
.modal-product-table-container .autocomplete-list::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.35);
}
.modal-product-table-container .autocomplete-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.88) 0%, rgba(99, 102, 241, 0.88) 100%);
  border-radius: 6px;
  border: 2px solid rgba(15, 23, 42, 0.35);
}
.modal-product-table-container .autocomplete-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(59, 130, 246, 1) 0%, rgba(99, 102, 241, 1) 100%);
}
.modal-product-table-container input[type="text"],
.modal-product-table-container input[type="number"],
.modal-product-table-container select {
  text-align: center;
}
@media (min-width: 769px) { .nav-drawer-overlay, .nav-drawer-panel { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* 打印优化 */
@media print {
  .no-print,
  .orders-tabs,
  .order-actions,
  .modal-overlay,
  .modal-content {
    display: none !important;
  }
  body {
    background: white !important;
    margin: 0;
    padding: 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #app {
    background: white !important;
  }
  .orders-table th,
  .orders-table td {
    border: 1px solid #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .orders-table th {
    background-color: #f0f0f0 !important;
    color: #000 !important;
  }
  .orders-table {
    background-color: white !important;
  }
  .tech-card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    background: white !important;
    backdrop-filter: none !important;
  }
  body::before,
  body::after,
  #app::before {
    display: none !important;
  }
}

/* ========== 移动端/窄屏省电：关装饰层、扫光动画、backdrop-filter（减轻 GPU 发热） ========== */
/* 与 mobile-perf.js 的 coarse 断点一致（≤900px）；保留 Token 纯色底，视觉仍为科技风 */
@media (max-width: 900px) {
  body::before,
  body::after,
  #app::before {
    display: none !important;
  }

  .orders-top-nav,
  .nav-notif-dropdown-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .tech-card::before,
  .kpi-card::before,
  .stat-card::before,
  .order-card::before,
  .tech-card.orders-filter-section::before {
    display: none !important;
    animation: none !important;
    content: none !important;
  }

  .tech-card,
  .kpi-card,
  .stat-card,
  .order-card,
  .form-input,
  .modal-content,
  .toast,
  .autocomplete-list,
  .pagination button,
  .view-toggle button,
  .orders-more-actions-panel,
  .orders-part-find-panel-inner,
  .orders-action-group,
  .tech-card.orders-filter-section {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .tech-card:hover,
  .kpi-card:hover,
  .stat-card:hover,
  .order-card:hover {
    transform: none;
  }

  .order-card.part-find-active-card {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tech-card::before,
  .kpi-card::before,
  .stat-card::before,
  .order-card::before {
    display: none !important;
    animation: none !important;
  }
  .tech-card,
  .kpi-card,
  .order-card,
  .form-input,
  .modal-content {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* 自定义右键菜单样式见 /grid-context-menu.css（.order-modal-grid-context-menu 层级在同文件） */
