[v-cloak] { display: none; }

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden !important;
  overflow-y: auto;
  max-width: 100vw;
  /* 防止动画导致高度变化触发滚动条 */
  height: 100%;
}

body {
  width: 100%;
  margin: 0;
  padding: 0;
  max-width: 100vw;
  overflow-x: hidden !important;
  /* 防止动画导致高度变化触发滚动条 */
  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;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  /* 防止动画导致布局重排 */
  will-change: auto;
}

.price-adjust-table {
  table-layout: fixed;
  min-width: 980px;
}

.price-adjust-card,
.price-adjust-scroll {
  overflow: visible !important;
}

.price-adjust-card {
  position: relative;
  z-index: 30;
}

.price-adjust-table th,
.price-adjust-table td,
.price-adjust-table tfoot td {
  text-align: center;
  vertical-align: middle;
}

.price-adjust-table .price-adjust-cell-input {
  text-align: center;
}

.price-adjust-history-table th,
.price-adjust-history-table td {
  text-align: center;
  vertical-align: middle;
}

.price-adjust-history-row {
  cursor: pointer;
  transition: background 0.1s ease;
}

.price-adjust-history-table tbody tr.price-adjust-history-row:hover td {
  background: rgba(99, 102, 241, 0.12);
}

/* 平价记录详情弹窗 */
.price-adjust-detail-shell {
  background: linear-gradient(180deg, #0b1220 0%, #0f172a 32%, #0f172a 100%);
}

/* 覆盖全局 .modal-content 的 max-width:600px，否则 Tailwind 加宽不生效 */
.price-adjust-detail-shell.modal-content {
  max-width: min(100%, 76rem);
  width: min(100%, 94vw);
  max-height: 92vh;
  overflow: hidden;
}

.price-adjust-detail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(34, 211, 238, 0.15);
}

.price-adjust-detail-top-main {
  min-width: 0;
  flex: 1;
}

.price-adjust-detail-title {
  margin: 0 0 0.875rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.price-adjust-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 0.75rem;
}

.price-adjust-detail-meta-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  min-width: 6rem;
}

.price-adjust-detail-meta-item.price-adjust-detail-meta-wide {
  min-width: 12rem;
  flex: 1;
  max-width: 100%;
}

.price-adjust-detail-meta-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.price-adjust-detail-meta-value {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.4;
  word-break: break-all;
}

.price-adjust-detail-note {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.15rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(100, 116, 139, 0.28);
}

.price-adjust-detail-note-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.price-adjust-detail-note-text {
  font-size: 0.875rem;
  color: #e2e8f0;
  line-height: 1.5;
  word-break: break-word;
}

.price-adjust-detail-close {
  margin-top: 0.1rem;
}

.price-adjust-detail-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid rgba(99, 102, 241, 0.12);
  background: rgba(2, 6, 23, 0.35);
}

.price-adjust-detail-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 6.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.15);
  flex: 1;
}

.price-adjust-detail-stat-label {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-bottom: 0.2rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.price-adjust-detail-stat-num {
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.price-adjust-detail-body {
  padding: 1rem 1.25rem 1.25rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* 产品列加宽、数字列压窄、均居中；产品名单独左对齐且可换行 */
.price-adjust-detail-items-table {
  table-layout: fixed;
  width: 100%;
}

.price-adjust-detail-items-table th,
.price-adjust-detail-items-table td {
  vertical-align: middle;
  padding: 0.5rem 0.45rem;
}

.price-adjust-detail-items-table th.price-adjust-detail-col-product,
.price-adjust-detail-items-table td.price-adjust-detail-col-product {
  width: 46%;
  min-width: 10rem;
  text-align: left;
  white-space: normal;
  word-break: break-word;
  padding-left: 0.65rem;
  padding-right: 0.5rem;
}

.price-adjust-detail-items-table th:not(.price-adjust-detail-col-product),
.price-adjust-detail-items-table td.price-adjust-detail-col-num {
  text-align: center;
  width: 9%;
  min-width: 3.4rem;
  max-width: 4.5rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 480px) {
  .price-adjust-detail-stat {
    min-width: 5rem;
  }

  .price-adjust-detail-items-table th:not(.price-adjust-detail-col-product),
  .price-adjust-detail-items-table td.price-adjust-detail-col-num {
    min-width: 2.8rem;
    max-width: none;
  }
}

.price-adjust-table tbody tr {
  position: relative;
}

.price-adjust-table tbody tr:focus-within {
  z-index: 120;
}

.price-adjust-table th:not(.price-adjust-name-col),
.price-adjust-table td:not(.price-adjust-name-cell) {
  width: 120px;
  white-space: nowrap;
}

.price-adjust-name-col,
.price-adjust-name-cell {
  width: 420px;
  min-width: 420px;
  overflow: visible;
}

.price-adjust-autocomplete {
  position: relative;
  width: 100%;
  z-index: 80;
}

.price-adjust-cell-input:focus {
  outline: 2px solid rgba(34, 211, 238, 0.75);
  outline-offset: -1px;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
  transition: box-shadow 0.1s ease, outline-color 0.1s ease;
}

.price-adjust-cell-display {
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.5);
  color: #f8fafc;
  cursor: cell;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 0.1s ease, background 0.1s ease, box-shadow 0.1s ease, outline 0.1s ease;
}

.price-adjust-cell-display:focus,
.price-adjust-cell-display.selected {
  outline: 2px solid rgba(34, 211, 238, 0.75);
  outline-offset: -1px;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}

.price-adjust-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 300;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 12px;
  background: #0f172a;
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(34, 211, 238, 0.18);
}

.price-adjust-suggestion {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: #0f172a;
  transition: background 0.08s ease;
}

.price-adjust-suggestion:last-child {
  border-bottom: 0;
}

.price-adjust-suggestion:hover {
  background: #164e63;
}

.price-adjust-suggestion.active {
  background: #155e75;
  outline: 1px solid rgba(34, 211, 238, 0.38);
}

.price-adjust-suggestion-name {
  color: #e0f2fe;
  font-weight: 700;
  line-height: 1.35;
}

.price-adjust-suggestion-meta {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 12px;
}

@media (max-width: 768px) {
  .price-adjust-table {
    min-width: 860px;
  }
  .price-adjust-name-col,
  .price-adjust-name-cell {
    width: 320px;
    min-width: 320px;
  }
}

/* 移除所有动画，避免触发滚动条 */
/* @keyframes gradientShift {
  0% { background-position: 0% 50%, 0% 0%, 0% 0%, 0% 50%; }
  50% { background-position: 100% 50%, 100% 100%, 50% 50%, 100% 50%; }
  100% { background-position: 0% 50%, 0% 0%, 0% 0%, 0% 50%; }
} */

/* @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;
  /* 移除所有动画，避免触发滚动条 */
  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;
  /* 移除 lightMove 动画，避免触发滚动条 */
}

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

/* @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; }
} */

/* @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;
  max-width: 100%;
  overflow-x: hidden;
}

#app::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  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); }
} */

/* 顶部导航栏样式已在nav标签中内联定义 */

/* .tech-card / .stat-card 表面见 /css/tech-surface.css */

.stat-card {
  border-radius: 12px;
  border-left: 4px solid;
}
.stat-card > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.stat-card.primary { border-left-color: rgba(59, 130, 246, 0.6); }
.stat-card.success { border-left-color: rgba(16, 185, 129, 0.6); }
.stat-card.warning { border-left-color: rgba(245, 158, 11, 0.6); }
.stat-card.danger { border-left-color: rgba(239, 68, 68, 0.6); }

/* 专业表格样式 */
.inventory-table-wrapper {
  /* 批量删除多选列 50px 时，整段左侧冻结区右移，避免与多选列重叠 */
  --pi-sticky-pad: 0px;
  /* 首行表头高：JS 测量后会写成 px 覆盖，消除双行表头缝 */
  --pi-inv-thead1-h: 2.8rem;
  background: var(--tech-surface-card);
  border-radius: 12px;
  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：会形成包含块，与 overflow:hidden 常导致内部表头 position:sticky 失效 */
  overflow: visible;
  position: relative;
  border: 1px solid var(--tech-border-card);
}

.table-container {
  /* 滚动与层叠的参照；隔离 stacking，便于 thead 整段压在 tbody 之上 */
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 400px);
  position: relative;
  z-index: 0;
  isolation: isolate;
}

/* 桌面库存大表：max-height 在壳上，内部仅表格区横纵滚动；底部分页横满整卡、不随表宽左右拖走 */
.pi-inv-desktop-table-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - 400px);
}

.pi-inv-desktop-table-shell > .table-container {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

.pi-inv-pagination-bar {
  flex-shrink: 0;
  width: 100%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(11, 18, 32, 0.98) 100%);
  box-shadow: 0 -1px 0 rgba(6, 182, 212, 0.2);
  position: relative;
  z-index: 3;
}

/* 确保表格可以横向滚动 */
.inventory-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  min-width: max-content;
  /* 与 Excel 类似：数字等宽，列对齐更整齐 */
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  /* 第二行 th 的 top：由 JS 在 .inventory-table-wrapper 上设 --pi-inv-thead1-h（量首行 tr 高）；未量到前用 2.8rem 兜底 */
}

/* tbody 在 DOM 中位于 thead 之后，会整层画在表头「上面」；压低 tbody，保证双行 th 的纵向 sticky 不被盖住 */
.inventory-table tbody {
  position: relative;
  z-index: 0;
}

/* 整块 thead 叠在 tbody 上方（不依赖 th 的 z 去跨 thead/tbody 边界） */
.inventory-table thead {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e293b 100%) !important;
  background-color: #1e293b !important;
  color: #e2e8f0;
  position: relative;
  z-index: 10;
  border-bottom: 2px solid rgba(99, 102, 241, 0.4);
}

/* 表头所有单元格背景完全不透明 - 与背景匹配 */
.inventory-table thead th {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e293b 100%) !important;
  background-color: #1e293b !important;
  background-image: none !important;
  opacity: 1 !important;
}

/* 确保序号列的背景不受 thead 影响；z-index 由下方「表头角」规则统一为 50 */
.inventory-table thead th.fixed-column.fixed-column-1 {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e293b 100%) !important;
  background-color: #1e293b !important;
  background-image: none !important;
  opacity: 1 !important;
}

/* 额外确保：序号列背景完全不透明 - 与背景匹配 */
th.fixed-column.fixed-column-1 {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e293b 100%) !important;
  background-color: #1e293b !important;
  background-image: none !important;
  opacity: 1 !important;
}

.inventory-table th {
  padding: 12px 8px;
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  border-right: 1px solid rgba(59, 130, 246, 0.3);
}

.inventory-table th:last-child {
  border-right: none;
}

/* 固定列样式 - 排除序号列（z-index 由各 .fixed-column-N 提供，右列压左列，横滚时盖住日期区） */
.fixed-column:not(.fixed-column-1) {
  position: -webkit-sticky;
  position: sticky;
  background: rgba(30, 41, 59, 0.9);
}

/* 序号列特殊样式 - 完全不透明，与背景匹配 */
.fixed-column.fixed-column-1 {
  position: -webkit-sticky;
  position: sticky;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e293b 100%) !important;
  background-color: #1e293b !important;
  background-image: none !important;
  opacity: 1 !important;
}

/* 每列 left = 与表头 width 累计一致；var(--pi-sticky-pad) 在批量多选时右移全段冻结区 */
.fixed-column-1 {
  left: calc(0px + var(--pi-sticky-pad, 0px));
  z-index: 6;
  width: 50px;
  min-width: 50px;
  max-width: 50px;
}

.fixed-column-2 {
  left: calc(50px + var(--pi-sticky-pad, 0px));
  z-index: 7;
  width: 110px;
  min-width: 110px;
  max-width: 110px;
}

.fixed-column-3 {
  left: calc(160px + var(--pi-sticky-pad, 0px));
  z-index: 8;
  width: 350px;
  min-width: 350px;
  max-width: 350px;
}

.fixed-column-4 {
  left: calc(510px + var(--pi-sticky-pad, 0px));
  z-index: 9;
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

/* 预警 80+110+90 = 280px，与表头子列 width 一致 */
.fixed-column-5 {
  left: calc(610px + var(--pi-sticky-pad, 0px));
  z-index: 10;
  width: 80px;
  min-width: 80px;
  max-width: 80px;
}

.fixed-column-6 {
  left: calc(690px + var(--pi-sticky-pad, 0px));
  z-index: 11;
  width: 110px;
  min-width: 110px;
  max-width: 110px;
}

.fixed-column-7 {
  left: calc(800px + var(--pi-sticky-pad, 0px));
  z-index: 12;
  width: 90px;
  min-width: 90px;
  max-width: 90px;
}

.warning-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.warning-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.warning-pill {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.warning-pill-main {
  color: #cffafe;
  background: rgba(6, 182, 212, 0.16);
  border-color: rgba(6, 182, 212, 0.45);
}

.warning-pill-sub {
  color: #fecdd3;
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.45);
}

/* 纯CSS开关（不依赖 Tailwind） */
.pi-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 24px;
  cursor: pointer;
  user-select: none;
}

.pi-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.pi-switch-track {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.25);
  transition: all 0.15s ease;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
}

.pi-switch-thumb {
  position: absolute;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e2e8f0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  transition: all 0.15s ease;
}

.pi-switch input:focus-visible + .pi-switch-track {
  outline: none;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25);
  border-color: rgba(34, 211, 238, 0.5);
}

.pi-switch input:checked + .pi-switch-track {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.7), rgba(59, 130, 246, 0.7));
  border-color: rgba(34, 211, 238, 0.45);
}

.pi-switch input:checked + .pi-switch-track .pi-switch-thumb {
  left: 23px;
  background: #ffffff;
}

.pi-switch.pi-switch-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 固定列里居中显示开关 */
.inventory-table tbody td.fixed-column-5 {
  text-align: center;
  vertical-align: middle;
}

.warning-input {
  width: 100%;
  text-align: center;
  padding: 4px 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.2;
  height: 30px;
  transition: all 0.15s ease;
  flex: 1 1 auto;
}

.warning-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.warning-input-main {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(6, 182, 212, 0.08);
  color: #d5f5ff;
  font-weight: 600;
}

.warning-input-sub {
  border-color: rgba(251, 113, 133, 0.45);
  background: rgba(239, 68, 68, 0.08);
  color: #ffe4e6;
}

.warning-input-max {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(59, 130, 246, 0.08);
  color: #dbeafe;
  font-weight: 600;
}

.warning-input-disabled {
  border-color: rgba(75, 85, 99, 0.5) !important;
  background: rgba(55, 65, 81, 0.45) !important;
  color: #9ca3af !important;
}

.warning-readonly-main {
  display: block;
  text-align: center;
  font-weight: 600;
  color: #cffafe;
}

.warning-readonly-sub {
  display: block;
  margin-top: 2px;
  text-align: center;
  font-size: 11px;
  color: #fecdd3;
}

.fixed-column-8 {
  left: calc(890px + var(--pi-sticky-pad, 0px));
  z-index: 13;
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

.fixed-column-9 {
  left: calc(990px + var(--pi-sticky-pad, 0px));
  z-index: 14;
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

.fixed-column-10 {
  left: calc(1090px + var(--pi-sticky-pad, 0px));
  z-index: 15;
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

.fixed-column-11 {
  left: calc(1190px + var(--pi-sticky-pad, 0px));
  z-index: 16;
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

.fixed-column-12 {
  left: calc(1290px + var(--pi-sticky-pad, 0px));
  z-index: 17;
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

.fixed-column-13 {
  left: calc(1390px + var(--pi-sticky-pad, 0px));
  z-index: 18;
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

.fixed-column-14 {
  left: calc(1490px + var(--pi-sticky-pad, 0px));
  z-index: 19;
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

/* 实时库存为冻结区最右一列，与日期可滚动区之间留阴影分隔 */
.fixed-column-15 {
  left: calc(1590px + var(--pi-sticky-pad, 0px));
  z-index: 20;
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  box-shadow: 4px 0 8px rgba(0, 0, 0, 0.18);
}

/* 表头 colspan：与首行 th colspan width 一致 */
.fixed-colspan-5-7 {
  left: calc(610px + var(--pi-sticky-pad, 0px));
  z-index: 13;
  width: 280px;
  min-width: 280px;
  max-width: 280px;
}

.fixed-colspan-8-9 {
  left: calc(890px + var(--pi-sticky-pad, 0px));
  z-index: 13;
  width: 200px;
  min-width: 200px;
  max-width: 200px;
}

.fixed-colspan-10-11 {
  left: calc(1090px + var(--pi-sticky-pad, 0px));
  z-index: 13;
  width: 200px;
  min-width: 200px;
  max-width: 200px;
}

.fixed-colspan-12-13 {
  left: calc(1290px + var(--pi-sticky-pad, 0px));
  z-index: 13;
  width: 200px;
  min-width: 200px;
  max-width: 200px;
}

.fixed-colspan-14-15 {
  left: calc(1490px + var(--pi-sticky-pad, 0px));
  z-index: 13;
  width: 200px;
  min-width: 200px;
  max-width: 200px;
  box-shadow: 4px 0 8px rgba(0, 0, 0, 0.2);
}

/* 展开态大分组表头：可点击收拢（与窄条上的「▶ 展开」对应） */
.inventory-table thead th.pi-inv-cg-head {
  cursor: pointer;
  user-select: none;
}
.inventory-table thead th.pi-inv-cg-head:hover,
.inventory-table thead th.pi-inv-cg-head:focus-visible {
  color: #22d3ee;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.35);
}

/* 库存表四组折叠时的窄条（表头 rowspan=2 / 表体占位；left/width 由内联覆盖） */
.pi-inv-cg-strip {
  position: -webkit-sticky;
  position: sticky;
  padding: 2px 1px;
  text-align: center;
  vertical-align: middle;
  font-size: 10px;
  line-height: 1.15;
  user-select: none;
  background: rgba(30, 41, 59, 0.9) !important;
  overflow: hidden;
}
.pi-inv-cg-strip-btn {
  all: unset;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.5rem;
  cursor: pointer;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
}
.pi-inv-cg-strip-btn:hover,
.pi-inv-cg-strip-btn:focus-visible {
  color: #22d3ee;
  outline: none;
}
.pi-inv-cg-chev {
  font-size: 9px;
  opacity: 0.9;
}
.inventory-table tbody td.pi-inv-cg-strip--w {
  z-index: 12;
}
.inventory-table tbody td.pi-inv-cg-strip--i {
  z-index: 14;
}
.inventory-table tbody td.pi-inv-cg-strip--m {
  z-index: 16;
}
.inventory-table tbody td.pi-inv-cg-strip--o {
  z-index: 18;
}
.new-row td.pi-inv-cg-strip--nrf {
  background: rgba(234, 179, 8, 0.22) !important;
}
.new-row:hover td.pi-inv-cg-strip--nrf {
  background: rgba(234, 179, 8, 0.3) !important;
}

/* 表头固定列：通用基类 */
.inventory-table thead .fixed-column {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e293b 100%) !important;
  background-color: #1e293b !important;
  background-image: none !important;
  opacity: 1 !important;
  z-index: 44;
}

/* 新增行固定列 */
.new-row .fixed-column {
  background: rgba(234, 179, 8, 0.3);
}

.new-row:hover .fixed-column {
  background: rgba(234, 179, 8, 0.4);
}

/* 斑马纹行的固定列背景 */
.inventory-table tbody tr:nth-child(even) .fixed-column {
  background: rgba(30, 41, 59, 0.7);
}

.inventory-table tbody tr:nth-child(even):hover .fixed-column {
  background: rgba(30, 41, 59, 0.8);
}

.inventory-table tbody tr:hover .fixed-column {
  background: rgba(30, 41, 59, 0.85);
}

/* 确保固定列在滚动时保持背景 */
.inventory-table tbody tr .fixed-column {
  background: rgba(30, 41, 59, 0.9);
}

/* 表头第一行：纵向贴顶，含「预警/期初/…」大分组、序号等 rowspan=2 格 */
.inventory-table thead tr:first-child th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e293b 100%) !important;
  background-color: #1e293b !important;
  background-image: none !important;
  opacity: 1 !important;
  z-index: 42;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.25);
}

/* 表头第二行：子列贴第一行下沿；top 与首行视觉高度一致（错位可调 --pi-inv-thead1-h） */
.inventory-table thead tr:nth-child(2) th,
.inventory-table thead tr:last-child th {
  position: -webkit-sticky;
  position: sticky;
  top: var(--pi-inv-thead1-h, 2.8rem);
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e293b 100%) !important;
  background-color: #1e293b !important;
  background-image: none !important;
  opacity: 1 !important;
  z-index: 41;
  box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.2);
}

/* 表头第一行的固定列 - 与左侧冻结、纵向冻结叠加 */
.inventory-table thead tr:first-child .fixed-column {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e293b 100%) !important;
  background-color: #1e293b !important;
  background-image: none !important;
  opacity: 1 !important;
  z-index: 45;
}

/* 表头第二行的固定列 */
.inventory-table thead tr:nth-child(2) .fixed-column,
.inventory-table thead tr:last-child .fixed-column {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e293b 100%) !important;
  background-color: #1e293b !important;
  background-image: none !important;
  opacity: 1 !important;
  z-index: 44;
}

/* 序号列（表头角落在横纵都冻结时最上层） */
.inventory-table thead th.fixed-column.fixed-column-1,
.inventory-table thead tr:first-child th.fixed-column.fixed-column-1,
.inventory-table thead tr:nth-child(2) th.fixed-column.fixed-column-1,
.inventory-table thead tr:last-child th.fixed-column.fixed-column-1,
table.inventory-table thead tr th.fixed-column.fixed-column-1,
.inventory-table thead .fixed-column.fixed-column-1 {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e293b 100%) !important;
  background-color: #1e293b !important;
  background-image: none !important;
  opacity: 1 !important;
  z-index: 50 !important;
}

/* 确保所有非实时库存的表头单元格都不透明 - 与背景匹配 */
.inventory-table thead th:not(.current-stock-cell) {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e293b 100%) !important;
  background-color: #1e293b !important;
  background-image: none !important;
  opacity: 1 !important;
}

/* 确保固定列有正确的边框 */
.inventory-table tbody .fixed-column {
  border-right: 1px solid rgba(59, 130, 246, 0.2);
}

.inventory-table thead .fixed-column {
  border-right: 1px solid rgba(59, 130, 246, 0.3);
}

/* 序号…本期出库（至 fixed-column-13）— 表体固定列背景 */
.inventory-table tbody td.fixed-column-1,
.inventory-table tbody td.fixed-column-2,
.inventory-table tbody td.fixed-column-3,
.inventory-table tbody td.fixed-column-4,
.inventory-table tbody td.fixed-column-5,
.inventory-table tbody td.fixed-column-6,
.inventory-table tbody td.fixed-column-7,
.inventory-table tbody td.fixed-column-8,
.inventory-table tbody td.fixed-column-9,
.inventory-table tbody td.fixed-column-10,
.inventory-table tbody td.fixed-column-11,
.inventory-table tbody td.fixed-column-12,
.inventory-table tbody td.fixed-column-13 {
  background-color: #1e293b !important;
  background-image: none !important;
  opacity: 1 !important;
}
.inventory-table tbody td.fixed-column-14.current-stock-cell,
.inventory-table tbody td.fixed-column-15.current-stock-cell {
  background-color: #252563 !important;
  background-image: none !important;
  opacity: 1 !important;
}

.inventory-table tbody tr {
  transition: background 0.2s;
}

.inventory-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.15);
}

.inventory-table tbody tr:nth-child(even) {
  background: rgba(30, 41, 59, 0.3);
}

.inventory-table tbody tr:nth-child(even):hover {
  background: rgba(59, 130, 246, 0.2);
}

.inventory-table td {
  padding: 10px 8px;
  text-align: center;
  border-right: 1px solid rgba(59, 130, 246, 0.2);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  font-weight: 500;
  color: #cbd5e1;
}

.inventory-table td:last-child {
  border-right: none;
}

/* 库存报表：已选中、未进入编辑的「显示层」 */
.inventory-table div.editable-cell.pi-inv-cell--sel {
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.1) !important;
  border-radius: 4px;
}
.inventory-table div.editable-cell.pi-inv-cell--sel:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.85);
}

/* 产品管理表：淘宝/京东/备注「选中未编辑」 */
.tech-table .pi-pl-cell--sel {
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.08) !important;
  border-radius: 4px;
}
.tech-table .pi-pl-cell--sel:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.85);
}

/* 库存报表「新增行」：选中未编辑 */
.inventory-table .pi-nrf-cell--sel {
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.1) !important;
  border-radius: 4px;
}
.inventory-table .pi-nrf-cell--sel:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.85);
}

/* 可编辑单元格 */
.editable-cell {
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  border-radius: 4px;
  padding: 4px 8px;
  margin: -4px -8px;
}

.editable-cell:hover {
  background: rgba(59, 130, 246, 0.2) !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

.editable-cell input {
  width: 100%;
  border: 2px solid rgba(59, 130, 246, 0.5);
  background: rgba(15, 23, 42, 0.7);
  text-align: center;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  outline: none;
  font-size: 13px;
  color: #e2e8f0;
}

.editable-cell input:focus {
  border-color: rgba(59, 130, 246, 0.8);
  background: rgba(15, 23, 42, 0.9);
}

/* 库存成本价、期初库存数量输入框 — 与整体风格一致 */
.inventory-table td.fixed-column-4 input,
.inventory-table td.fixed-column-5 input {
  width: 100%;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border-radius: 6px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  background: rgba(15, 23, 42, 0.9);
  color: #e0e7ff;
  outline: none;
}
.inventory-table td.fixed-column-4 input:focus,
.inventory-table td.fixed-column-5 input:focus {
  border-color: rgba(99, 102, 241, 0.7);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* 库存表内 type=number：去掉步进器（不显示右侧上下调整），与 Excel 一样直接键入 */
.inventory-table input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.inventory-table input[type="number"]::-webkit-outer-spin-button,
.inventory-table input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 期初/日明细/新行/成本等：扁平单元格输入，不圆角大药丸 */
.inventory-table input.pi-excel-cell-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 1px;
  background: rgba(12, 19, 33, 0.96);
  color: #f1f5f9;
  padding: 3px 5px;
}
.inventory-table input.pi-excel-cell-input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.5);
  background: rgba(15, 23, 42, 0.98);
}
.inventory-table tr.new-row input.pi-excel-cell-input {
  text-align: center;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 1px;
  padding: 4px 6px;
}
.inventory-table tr.new-row input.pi-excel-cell-input:focus {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.45);
}

/* 实时库存高亮 - 表头中完全不透明，使用与背景匹配但略有区别的颜色 */
.inventory-table thead .current-stock-cell {
  background: linear-gradient(135deg, #312e81 0%, #1e293b 50%, #312e81 100%) !important; /* 深紫色，与背景匹配但略有区别 */
  background-color: #312e81 !important;
  background-image: none !important;
  opacity: 1 !important;
  font-weight: 700;
  color: #e2e8f0 !important; /* 浅色文字以确保可读性 */
}

/* 表体中的实时库存单元格：与背景协调的浅色突出 */
.inventory-table tbody .current-stock-cell {
  background: rgba(99, 102, 241, 0.14) !important;
  font-weight: 700;
  color: #e0e7ff;
}
/* 日出库已手动调整：与系统靛蓝/紫风格一致且明显突出（覆盖奇偶行背景） */
.inventory-table tbody td.manual-out-cell {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.45) 0%, rgba(168, 85, 247, 0.35) 100%) !important;
  border-left: 2px solid rgba(168, 85, 247, 0.7) !important;
  border-right: 1px solid rgba(129, 94, 241, 0.5) !important;
  border-top: 1px solid rgba(129, 94, 241, 0.4) !important;
  border-bottom: 1px solid rgba(129, 94, 241, 0.4) !important;
  color: #e0e7ff !important;
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.25);
}

.current-stock-cell input {
  background: rgba(99, 102, 241, 0.2) !important;
  color: #e0e7ff;
  font-weight: 700;
}

/* 合计行 */
.add-row-btn {
  background: rgba(30, 41, 59, 0.8);
}

.new-row {
  background: rgba(234, 179, 8, 0.2) !important;
}

.new-row:hover {
  background: rgba(234, 179, 8, 0.3) !important;
}

.new-row input {
  border: 2px solid rgba(59, 130, 246, 0.5);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
}

.new-row input {
  background: rgba(15, 23, 42, 0.7);
}

.new-row input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background: rgba(15, 23, 42, 0.9);
}

/* 按钮样式 */
.btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: #6b7280;
  color: white;
}

.btn-secondary:hover {
  background: #4b5563;
}

.btn-success {
  background: #10b981;
  color: white;
}

.btn-success:hover {
  background: #059669;
}

/* 输入框样式 */
.form-input {
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  transition: all 0.2s;
  width: 100%;
  background-color: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
  backdrop-filter: blur(8px);
}

.form-input::placeholder {
  color: rgba(226, 232, 240, 0.5);
}

.form-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background-color: rgba(15, 23, 42, 0.8);
}

/* Toast通知 */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 300px;
}

.toast.success {
  background: rgba(16, 185, 129, 0.9);
  color: white;
  border: 1px solid rgba(16, 185, 129, 0.5);
  backdrop-filter: blur(8px);
}

.toast.error {
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: 1px solid rgba(239, 68, 68, 0.5);
  backdrop-filter: blur(8px);
}

.toast.warning {
  background: rgba(245, 158, 11, 0.9);
  color: white;
  border: 1px solid rgba(245, 158, 11, 0.5);
  backdrop-filter: blur(8px);
}

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

/* 加载动画 */
.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 3px solid rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  border-top-color: #60a5fa;
  animation: spin 0.8s linear infinite;
}

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

/* 模态框 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* 滚动条样式（与上文 .table-container 合并：仅补充 webkit 滚动条，不覆盖 isolation） */
.table-container {
  overflow-x: auto;
  max-height: calc(100vh - 400px);
  overflow-y: auto;
}

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

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

.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);
}

/* 标签样式 */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

/* 数字格式化 */
.number-positive {
  color: #34d399;
  color: #10b981;
  font-weight: 600;
}

.number-negative {
  color: #f87171;
  color: #ef4444;
  font-weight: 600;
}

/* 标签页样式 */
.tab-button {
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #cbd5e1;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s ease;
  cursor: pointer;
}
.tab-button.active {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.6);
  color: #e0e7ff;
  border-bottom-color: transparent;
}
.tab-button:hover:not(.active) {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(99, 102, 241, 0.5);
}
/* 产品/分类管理表格和按钮 */
.tech-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.tech-table th { background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(168, 85, 247, 0.3) 100%); border: 1px solid rgba(99, 102, 241, 0.4); padding: 12px; text-align: center; font-weight: 600; }
.tech-table td { border: 1px solid rgba(99, 102, 241, 0.2); padding: 12px; background: rgba(15, 23, 42, 0.4); }
.tech-table tbody tr:hover { background: rgba(99, 102, 241, 0.2); }
/* 产品管理：实时库存>0 时整行略偏靛紫，与表头/按钮同色系 */
.tech-table tbody tr.product-row-has-stock td {
  background: rgba(99, 102, 241, 0.14) !important;
}
.tech-table tbody tr.product-row-has-stock:hover td {
  background: rgba(129, 140, 248, 0.22) !important;
}
.mobile-product-card.mobile-product-card-has-stock {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(129, 140, 248, 0.45);
}
.mobile-product-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
}
.mobile-product-card {
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.5);
  padding: 10px;
}
.mobile-product-title {
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}
.mobile-product-grid {
  display: grid;
  grid-template-columns: 86px 1fr;
  row-gap: 5px;
  column-gap: 8px;
  font-size: 12px;
  margin-bottom: 10px;
}
.mobile-product-grid .label {
  color: #94a3b8;
}
.mobile-product-grid .value {
  color: #e2e8f0;
  word-break: break-all;
}
.mobile-product-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.mobile-inventory-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
}
.mobile-inventory-card {
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.5);
  padding: 10px;
  /* 降低长列表布局/绘制连锁，减轻中低端机滚动压力 */
  contain: layout style;
}
.mobile-inventory-title {
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}
.mobile-inventory-grid {
  display: grid;
  grid-template-columns: 92px 1fr;
  row-gap: 5px;
  column-gap: 8px;
  font-size: 12px;
}
.mobile-inventory-grid .label {
  color: #94a3b8;
}
.mobile-inventory-grid .value {
  color: #e2e8f0;
  word-break: break-all;
}
.mobile-outstock-grid {
  display: grid;
  grid-template-columns: 88px 1fr;
  row-gap: 5px;
  column-gap: 8px;
  font-size: 12px;
  margin-top: 6px;
}
.mobile-outstock-grid .label {
  color: #94a3b8;
}
.mobile-outstock-grid .value {
  color: #e2e8f0;
  word-break: break-all;
}
.mobile-category-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
}
.mobile-category-card {
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.5);
  padding: 10px;
}
.mobile-category-name {
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}
.mobile-category-meta {
  display: grid;
  grid-template-columns: 86px 1fr;
  row-gap: 5px;
  column-gap: 8px;
  font-size: 12px;
  margin-bottom: 10px;
}
.mobile-category-meta .label {
  color: #94a3b8;
}
.mobile-category-meta .value {
  color: #e2e8f0;
}
.tech-button { background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(168, 85, 247, 0.9) 100%); border: 1px solid rgba(255, 255, 255, 0.2); color: white; font-weight: 600; cursor: pointer; transition: all 0.3s ease; }
.tech-button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5); }
.tech-button-secondary { background: rgba(30, 41, 59, 0.8); border: 1px solid rgba(99, 102, 241, 0.4); color: #cbd5e1; }
.tech-button-secondary:hover { background: rgba(30, 41, 59, 0.95); border-color: rgba(99, 102, 241, 0.6); }
.tech-button-danger { background: linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(220, 38, 38, 0.9) 100%); border: 1px solid rgba(255, 255, 255, 0.2); }
.tech-input { background-color: rgba(15, 23, 42, 0.7); border: 1px solid rgba(99, 102, 241, 0.4); color: #e0e7ff; padding: 8px 12px; border-radius: 6px; transition: all 0.2s ease; }
.tech-input:focus { outline: none; border-color: rgba(99, 102, 241, 0.7); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); }
/* 分页下拉与按钮：与系统风格一致 */
.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: rgba(15, 23, 42, 0.85);
  color: #e0e7ff;
  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); box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2); }

/* 库存管理 · 添加商品：可搜索产品（替代全量下拉） */
.add-inv-product-modal__hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0 0 1rem 0;
  line-height: 1.45;
}
.add-inv-product-ac {
  position: relative;
  z-index: 2;
}
.add-inv-product-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 4px;
}
@media (max-width: 520px) {
  .add-inv-product-filters {
    grid-template-columns: 1fr;
  }
}
.add-inv-product-ac__dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 4px;
  z-index: 100;
  border: 1px solid rgba(99, 102, 241, 0.45);
  border-radius: 8px;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  max-height: 300px;
}
.add-inv-product-ac__scroll {
  overflow-y: auto;
  max-height: 210px;
}
.add-inv-product-ac__loading,
.add-inv-product-ac__empty {
  padding: 14px 12px;
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
}
.add-inv-product-ac__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid rgba(99, 102, 241, 0.2);
  background: rgba(15, 23, 42, 0.65);
}
.add-inv-product-ac__stat {
  font-size: 0.7rem;
  color: #94a3b8;
}
.add-inv-product-ac__more-btn {
  flex-shrink: 0;
}
.add-inv-product-ac__item {
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid rgba(99, 102, 241, 0.12);
}
.add-inv-product-ac__item:last-child {
  border-bottom: none;
}
.add-inv-product-ac__item:hover,
.add-inv-product-ac__item--active {
  background: rgba(99, 102, 241, 0.22);
}
.add-inv-product-ac__name {
  color: #e2e8f0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
}
.add-inv-product-ac__meta {
  color: #94a3b8;
  font-size: 0.7rem;
  margin-top: 2px;
}
.add-inv-product-ac__ok {
  color: #67e8f9;
}
/* 产品分类下拉框：与界面风格一致 */
.inventory-category-select {
  width: 100%;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  background: rgba(15, 23, 42, 0.85);
  color: #e0e7ff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.inventory-category-select:hover {
  border-color: rgba(99, 102, 241, 0.6);
}
.inventory-category-select:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.7);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
.inventory-category-select option {
  background: #1e293b;
  color: #e0e7ff;
  padding: 8px;
}

/* 响应式 */
/* A. 移动端表格阅读密度（仅表格内容） */
@media (max-width: 768px) {
  .inventory-table {
    font-size: 11px;
  }
  
  .inventory-table th,
  .inventory-table td {
    padding: 6px 4px;
  }
}
@media (max-width: 768px) {
  .max-w-\[99\%\].mx-auto.p-6 {
    padding: 12px;
  }

  .mobile-tab-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .mobile-tab-grid .tab-button {
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 10px 8px;
    font-size: 13px;
  }

  .mobile-stats-row {
    gap: 10px;
  }
  .mobile-stats-row .stat-card {
    min-width: 0 !important;
    width: 100%;
  }

  .mobile-products-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .mobile-products-head h2 {
    font-size: 1.15rem;
  }

  .mobile-toolbar {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .mobile-toolbar > * {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }
  .mobile-toolbar > .tech-input,
  .mobile-toolbar > select {
    flex-basis: 100%;
  }
  .mobile-toolbar button,
  .mobile-toolbar .tech-button {
    min-height: 44px;
    width: 100%;
  }

  .mobile-filter-row {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .mobile-filter-row > * {
    flex: 1 1 100%;
    min-width: 0 !important;
  }
  .mobile-filter-row button {
    min-height: 44px;
  }
  .mobile-filter-row .tech-button {
    flex: 1 1 calc(50% - 8px);
  }

  .mobile-product-actions .tech-button {
    min-height: 38px;
    padding: 8px 10px;
  }
}
/* 无库存表打印：仅打印该区域 */
@media print {
  body * { visibility: hidden; }
  .out-of-stock-print-area, .out-of-stock-print-area * { visibility: visible; }
  .out-of-stock-print-area { position: absolute; left: 0; top: 0; width: 100%; }
}
.out-of-stock-nowrap { white-space: nowrap; }
.out-of-stock-model { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ========== 移动端：汉堡菜单、安全区、减弱动效 ========== */
/* B. 移动端导航布局适配（标题与汉堡共存） */
@media (max-width: 768px) {
  .max-w-\[99\%\].mx-auto.p-6 { padding-bottom: max(0.75rem, env(safe-area-inset-bottom)); }
  nav h1 { white-space: nowrap; }
  /* 导航行：左侧可收缩，保证右侧汉堡按钮始终可见 */
  nav .flex.justify-between.items-center { flex-wrap: nowrap; }
  nav .flex.justify-between.items-center > div:first-child { min-width: 0; flex: 1 1 auto; }
  nav .flex.justify-between.items-center .hamburger-btn { flex-shrink: 0; }
}
/* C. 移动端导航可见性策略（隐藏报表周期） */
@media (max-width: 768px) {
  .hamburger-btn { visibility: visible !important; opacity: 1 !important; pointer-events: auto !important; }
  /* 窄屏隐藏导航栏内报表周期，只保留标题+汉堡，确保汉堡始终可见 */
  .nav-report-period { display: none !important; }
}
/* D. 平板特例（769-1024）：延续移动端导航行为 */
@media (max-width: 1024px) {
  .hamburger-btn { display: flex !important; visibility: visible !important; opacity: 1 !important; pointer-events: auto !important; }
  .nav-links-desktop { display: none !important; }
}

/* 平板抽屉区间（769–1024）：顶栏铃铛单独露出（nav-notification-bell 在 ≥769 默认隐藏 .nav-mobile-actions） */
@media (max-width: 1024px) and (min-width: 769px) {
  .nav-mobile-actions {
    display: flex !important;
    align-items: center;
  }

  .nav-links-desktop .nav-bell-desktop-only {
    display: none !important;
  }
}
/* E. 桌面区间报表周期显示修正（与平板特例并存） */
@media (min-width: 769px) {
  .nav-report-period { display: flex !important; }
}
/* F. 桌面最终边界：1025+ 禁用抽屉 */
@media (min-width: 1025px) { .nav-drawer-overlay, .nav-drawer-panel { display: none !important; } }

/* ========== 库存管理 Tab：统一前景、表单与辅助色（避免黑字/工具类未命中） ========== */
.inventory-tab-panel {
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
}
/* 与深色底对比：灰阶工具类显脏或近黑时强制为 slate 系 */
.inventory-tab-panel .text-gray-400 { color: #94a3b8 !important; }
.inventory-tab-panel .text-gray-300 { color: #cbd5e1 !important; }
.inventory-tab-panel .text-gray-500 { color: #94a3b8 !important; }
.inventory-tab-panel .text-gray-600 { color: #94a3b8 !important; }
.inventory-tab-panel .tech-input::placeholder {
  color: #64748b;
  opacity: 1;
}
.inventory-tab-panel input[type="date"].tech-input,
.inventory-tab-panel input[type="month"].tech-input {
  color: #e2e8f0;
  color-scheme: dark;
}
.inventory-tab-panel select.tech-input option,
.inventory-tab-panel select.pagination-page-select option {
  background-color: #1e293b;
  color: #e2e8f0;
}
.inventory-tab-panel input[type="checkbox"] {
  accent-color: #22d3ee;
}
/* 无库存表等：左对齐粗体列避免继承为默认黑 */
.inventory-tab-panel .out-of-stock-model,
.inventory-tab-panel .tech-table td.text-left.font-bold {
  color: #f1f5f9;
}
/* 强调色标题不依赖 Tailwind 是否生成 */
.inventory-tab-panel h4.text-cyan-300 {
  color: #67e8f9;
}

/* ========== 入库工作台（采购入库 / WMS 风格信息架构） ========== */
/* 整区统一前景色与正文字体，避免未命中工具类时继承为默认黑字 */
.inbound-workbench {
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
}
/* 采购 Excel 选择器：仅由「采购导入」按钮触发 */
.inbound-purchase-file-input {
  display: none;
}
.inbound-workbench .stat-card {
  align-items: flex-start;
  text-align: left;
  justify-content: flex-start;
  padding: 1rem 1.1rem;
}
/* KPI 数字色：不依赖 Tailwind，保证与深色科技风一致 */
.inbound-kpi-value--cyan { color: #22d3ee; }
.inbound-kpi-value--cyan2 { color: #67e8f9; }
.inbound-kpi-value--emerald { color: #34d399; }
.inbound-kpi-value--amber { color: #fcd34d; }
.inbound-kpi-value--rose { color: #fda4af; }
.inbound-hint-em { font-weight: 600; }
.inbound-hint-em--amber { color: #fde68a; }
.inbound-hint-em--cyan { color: #a5f3fc; }
.inbound-wb-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.inbound-wb-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 0.35rem 0;
  line-height: 1.25;
}
.inbound-wb-title-accent { color: #67e8f9; }
.inbound-wb-title-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(8, 47, 73, 0.45);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}
.inbound-wb-sub {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(148, 163, 184, 0.95);
  max-width: 48rem;
  line-height: 1.5;
}
.inbound-wb-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* 水平流程条 */
.inbound-stepper {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.25rem;
  margin: 0 0 1.25rem 0;
  padding: 0.6rem 0.75rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.55));
  border: 1px solid rgba(99, 102, 241, 0.25);
}
.inbound-step {
  flex: 1 1 140px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.45rem 0.5rem 0.45rem 0.55rem;
  border-radius: 0.5rem;
  color: #94a3b8;
  position: relative;
  opacity: 0.7;
}
.inbound-step--active {
  background: rgba(6, 78, 59, 0.35);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #d1fae5;
  opacity: 1;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.12);
}
.inbound-step--done { opacity: 0.95; }
.inbound-step-index {
  display: inline-flex;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  align-items: center;
  justify-content: center;
  background: rgba(51, 65, 85, 0.9);
  color: #e2e8f0;
  margin-bottom: 0.15rem;
}
.inbound-step--active .inbound-step-index {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}
.inbound-step--done .inbound-step-index {
  background: rgba(59, 130, 246, 0.4);
  color: #bfdbfe;
}
.inbound-step-label { font-size: 0.8rem; font-weight: 700; color: #e2e8f0; }
.inbound-step:not(.inbound-step--active) .inbound-step-label { color: #cbd5e1; }
.inbound-step-hint { font-size: 0.7rem; color: #94a3b8; }

.inbound-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.inbound-kpi { min-height: 4.5rem; }
.inbound-kpi-label {
  display: block;
  font-size: 0.75rem;
  color: #cbd5e1;
  margin-bottom: 0.35rem;
  font-weight: 500;
}
.inbound-kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
@media (max-width: 1200px) {
  .inbound-kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .inbound-kpi-row { grid-template-columns: 1fr 1fr; }
  .inbound-stepper { flex-direction: column; }
  .inbound-step { flex: none; }
}

.inbound-hint-box {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.6rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-left: 3px solid rgba(245, 158, 11, 0.55);
}
.inbound-hint-title {
  margin: 0 0 0.4rem 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fde68a;
  letter-spacing: 0.02em;
}
.inbound-hint-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #cbd5e1;
  font-size: 0.8rem;
  line-height: 1.55;
}
.inbound-hint-list li { margin-bottom: 0.25rem; }
.inbound-hint-list li:last-child { margin-bottom: 0; }

.inbound-list-card { border: 1px solid rgba(99, 102, 241, 0.35); }
.inbound-list-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(34, 211, 238, 0.12);
  background: rgba(15, 23, 42, 0.5);
}
.inbound-list-title { margin: 0; font-size: 1.05rem; font-weight: 800; color: #f1f5f9; }
.inbound-list-desc { margin: 0.3rem 0 0; font-size: 0.8rem; color: #94a3b8; line-height: 1.45; }
.inbound-list-loading,
.inbound-empty {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}
.inbound-pulse { color: #22d3ee; animation: inbound-pulse 1.1s ease-in-out infinite; }
@keyframes inbound-pulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}
.inbound-empty-title { color: #e2e8f0; font-weight: 700; font-size: 1rem; margin: 0 0 0.4rem; }
.inbound-empty-text {
  margin: 0;
  max-width: 26rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.inbound-th-id { min-width: 4.2rem; }
.inbound-th-notes { min-width: 7rem; max-width: 12rem; }
.inbound-th-actions { min-width: 11rem; text-align: right !important; }
.inbound-td-mono { font-variant-numeric: tabular-nums; font-weight: 600; color: #e2e8f0; }
.inbound-td-supplier { color: #e2e8f0; font-size: 0.875rem; }
.inbound-td-summary { color: #cbd5e1; font-size: 0.875rem; line-height: 1.45; }
.inbound-td-amount { color: #a5f3fc; font-weight: 600; }
.inbound-td-sep { padding: 0 0.2rem; color: #64748b; }
.inbound-td-notes {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #cbd5e1;
  font-size: 0.8rem;
}
.inbound-td-time { min-width: 6.5rem; }
.inbound-td-time-user { color: #e2e8f0; font-size: 0.875rem; }
.inbound-td-time-date { color: #94a3b8; font-size: 0.8rem; margin-top: 0.2rem; }
.inbound-td-actions { text-align: right; vertical-align: top; }
.inbound-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.inbound-readonly { font-size: 0.7rem; color: #64748b; align-self: center; }

.inbound-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(30, 27, 75, 0.5);
  color: #c4b5fd;
  letter-spacing: 0.02em;
}
.inbound-pill--draft {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(66, 32, 6, 0.45);
  color: #fde68a;
}
.inbound-pill--muted { color: #a8a29e; }

/* 明细弹窗：与平价详情一致，明文字色，避免模态内继承黑字 */
.inbound-detail-overlay { z-index: 1200; }
.inbound-detail-shell.modal-content {
  background: linear-gradient(180deg, #0b1220 0%, #0f172a 32%, #0f172a 100%);
  color: #e2e8f0;
  max-width: min(100%, 56rem) !important;
  width: min(100%, 94vw) !important;
  overflow: hidden;
}
.inbound-detail-id { color: #67e8f9; }
.inbound-detail-empty {
  margin: 0;
  text-align: center;
  color: #94a3b8;
  padding: 1.75rem 1rem;
  font-size: 0.9rem;
}
.inbound-detail-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(34, 211, 238, 0.12);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.6));
}
.inbound-detail-top-main { flex: 1 1 16rem; min-width: 0; }
.inbound-detail-title { margin: 0; font-size: 1.1rem; font-weight: 800; color: #f1f5f9; }
.inbound-detail-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; margin-top: 0.45rem; }
.inbound-detail-meta-item { display: flex; flex-direction: column; gap: 0.1rem; }
.inbound-detail-meta-label { font-size: 0.7rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.04em; }
.inbound-detail-meta-value { font-size: 0.85rem; color: #e2e8f0; }
.inbound-detail-meta-wide { min-width: 8rem; }
.inbound-detail-note-inline {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.45;
  padding: 0.4rem 0.6rem;
  border-radius: 0.4rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(99, 102, 241, 0.2);
}
.inbound-detail-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
}
.inbound-detail-loading {
  padding: 3rem 1rem;
  text-align: center;
  color: #22d3ee;
  font-size: 0.95rem;
}
.inbound-detail-body { flex: 1; overflow: auto; padding: 0.75rem 1rem 1rem; }
.inbound-detail-items-table th { white-space: nowrap; color: #e0e7ff; }
.inbound-detail-items-table td { color: #cbd5e1; }
.inbound-dt-right { text-align: right; font-variant-numeric: tabular-nums; color: #e2e8f0; }
.inbound-dt-mono { font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', Consolas, monospace; }
.inbound-dt-model {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f1f5f9;
}
.inbound-dt-brand { color: #cbd5e1; }
.inbound-dt-pid { font-size: 0.75rem; color: #94a3b8; }
.inbound-detail-items-table .inbound-dt-pid { color: #94a3b8; }
.inbound-sn-cell {
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: #cbd5e1;
}
@media (max-width: 768px) {
  .inbound-wb-header { flex-direction: column; }
  .inbound-wb-toolbar { width: 100%; }
  .inbound-wb-toolbar .tech-button { min-height: 44px; }
}

/* 库存桌面表：Teleport 到 body 的自定义单元格菜单，高于表头 sticky */
.pi-inv-grid-context-menu {
  --grid-context-menu-z: 12000;
}

/* SN 台账抽屉 / 补录层：z-[70] 等任意 Tailwind 类未编入公用 styles.css 时无效，主区又有 relative z-10，会叠在库存冻结列之下 */
.sn-ledger-drawer-z {
  z-index: 12500;
}
.sn-ledger-backfill-z {
  z-index: 12600;
}

/* SN 台账：遮罩与内容区偏实色，避免透过背后库存表发灰、难辨认 */
.sn-ledger-drawer-backdrop,
.sn-ledger-backfill-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.92);
}
.sn-ledger-drawer-panel {
  background-color: #0f172a;
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.55);
}
.sn-ledger-backfill-panel {
  position: relative;
  max-width: 28rem;
  width: 100%;
  padding: 1.25rem;
  border-radius: 0.75rem;
  background-color: #0f172a;
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

/* SN 台账抽屉内：库存与 SN 不一致提示（避免半透明 Tailwind 未命中 / 对比不足） */
.sn-ledger-mismatch-banner {
  font-size: 0.8125rem;
  line-height: 1.5;
  padding: 0.625rem 0.75rem;
  border-radius: 0.375rem;
  color: #fffbeb;
  background-color: #451a03;
  border: 1px solid #d97706;
  box-shadow: inset 0 1px 0 rgba(255, 251, 235, 0.08);
}

.sn-ledger-no-registry-hint {
  font-size: 0.8125rem;
  line-height: 1.5;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  color: #e0f2fe;
  background-color: #0c4a6e;
  border: 1px solid #38bdf8;
}

/* 库存表「SN 台账」列：无台账时为可点的「—」，避免误以为坏掉 */
.sn-ledger-col-btn {
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.35rem;
  border-radius: 0.25rem;
  border: 1px solid transparent;
  background: transparent;
}
.sn-ledger-col-btn--has {
  color: #22d3ee;
}
.sn-ledger-col-btn--has:hover {
  color: #a5f3fc;
}
.sn-ledger-col-btn--empty {
  color: #94a3b8;
  border-color: rgba(71, 85, 105, 0.75);
  min-width: 1.5rem;
}
.sn-ledger-col-btn--empty:hover {
  color: #e2e8f0;
  border-color: rgba(34, 211, 238, 0.45);
}

/* ========== products-inventory.html：替代易漏编译的 Tailwind 任意值（min-h-[…]、max-w-[…]、z-[…] 等）========== */
.pi-page-max-w {
  max-width: 99%;
}
.pi-excel-cell-minh {
  min-height: 1.5rem;
}
.pi-inv-stock-subhint {
  font-size: 10px;
  line-height: 1.2;
  color: rgba(165, 243, 252, 0.88);
}
.pi-inv-addmode-select-max {
  max-width: 20rem;
}
.pi-outofstock-keyword-min {
  min-width: 140px;
}
.pi-sn-keyword-minw {
  min-width: 8rem;
}
.pi-sn-note-td {
  max-width: 10rem;
}
.pi-batch-replace-btn-minw {
  min-width: 120px;
}
.pi-inbound-detail-shell-size {
  width: min(100%, 56rem);
  max-height: min(90vh, 720px);
}
