:root {
  --inventory-color-primary: #409eff;
  --inventory-control-height: 32px;
  --inventory-control-radius: 4px;
  --inventory-card-radius: 14px;
  --inventory-section-radius: 10px;
  --inventory-border-color: #dcdfe6;
  --inventory-text-regular: #606266;
  --inventory-text-secondary: #909399;
  --inventory-page-loading-z: 9998;
}

/* Anchor sales registration styles live in the always-loaded foundation file.
   The route must not become blank merely because a lazy CSS preload fails. */
.anchor-sales-card .el-alert { margin-bottom: 16px; }
.anchor-sales-query { margin-bottom: 4px; }
.asr-statistics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; margin: 10px 0 16px; }
.asr-statistics article { padding: 12px 14px; border: 1px solid #e3e9f1; border-radius: 9px; background: #f8fafd; }
.asr-statistics span { display: block; margin-bottom: 6px; color: #78869a; font-size: 13px; }
.asr-statistics strong { color: #1e2e45; font-size: 20px; }
.asr-statistics small { margin-left: 4px; color: #8a96a8; }
.asr-shop { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.asr-shop .el-tooltip__trigger { min-width: 0; flex: 0 1 auto; }
.asr-shop-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asr-shop .el-tag { flex: none; }
.asr-shop-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.asr-header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.asr-import-toolbar { display: flex; justify-content: flex-start; margin: 12px 0; }
.asr-import-preview { margin-top: 12px; }
.asr-import-preview > p { margin: 0 0 12px; }
.asr-import-result-toolbar { display: flex; justify-content: flex-start; margin: 0 0 12px; }
.asr-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.asr-form-tip { margin-top: 6px; color: #8a96a8; font-size: 12px; }
.ap-head-actions { display: flex; align-items: center; gap: 10px; }
.ap-rules-drawer .el-drawer__body { padding-top: 4px; }
.ap-rules-lead { margin: 0 0 18px; padding: 14px 16px; border-left: 4px solid #2f86f6; border-radius: 6px; background: #edf5ff; color: #315273; line-height: 1.7; }
.ap-rules-drawer section { margin-bottom: 18px; }
.ap-rules-drawer section h3 { margin: 0 0 8px; font-size: 16px; }
.ap-rules-drawer section p { margin: 0; color: #53647a; line-height: 1.75; }
.ap-rules-drawer section ul { margin: 8px 0; padding-left: 22px; color: #53647a; line-height: 1.85; }
.ap-rules-drawer section.important { padding: 14px 16px; border-radius: 9px; background: #f0f6ff; }
.ap-rules-drawer .example { margin-top: 10px; padding: 11px 13px; border-radius: 7px; background: #f5f7fa; color: #5e6b7d; line-height: 1.7; }
.anchor-sales-card .el-pagination { justify-content: flex-end; margin-top: 16px; }
.ap-exception-note { margin: 4px 0 14px; padding: 10px 14px; border-radius: 7px; background: #f4f8fe; color: #6f8097; font-size: 13px; line-height: 1.65; }
.ap-time-column .cell { white-space: nowrap; }
.ap-job-note { margin: -2px 0 14px; padding: 10px 12px; border-radius: 8px; color: #66758a; background: #f5f8fc; font-size: 13px; line-height: 1.65; }
@media (max-width: 720px) {
  .asr-form-grid { grid-template-columns: 1fr; }
}

.inventory-page-loading {
  position: fixed;
  inset: 0;
  z-index: var(--inventory-page-loading-z);
  display: grid;
  place-items: center;
  background: rgba(244, 247, 251, 0.58);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.14s ease, visibility 0.14s ease;
}

.inventory-page-loading.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.inventory-page-loading__panel {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 154px;
  min-height: 56px;
  padding: 12px 18px;
  border: 1px solid rgba(220, 223, 230, 0.85);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 28px rgba(25, 56, 101, 0.14);
  color: #4f6075;
  font-size: 14px;
}

.inventory-page-loading__spinner {
  width: 22px;
  height: 22px;
  flex: none;
  border: 3px solid #d9ecff;
  border-top-color: var(--inventory-color-primary);
  border-radius: 50%;
  animation: inventory-page-loading-spin 0.75s linear infinite;
}

@keyframes inventory-page-loading-spin {
  to { transform: rotate(360deg); }
}

/* 查询型页面统一由视口级 Loading 反馈，关闭旧表格局部白色遮罩。 */
.content .el-table > .el-loading-mask,
.content .el-table__inner-wrapper > .el-loading-mask,
.content .sales-page > .el-loading-mask {
  display: none !important;
}

/* PC 通用控件规范。 */
.content .el-button:not(.is-link):not(.is-circle) {
  min-height: var(--inventory-control-height);
  border-radius: var(--inventory-control-radius);
}

.content .el-input__wrapper,
.content .el-select__wrapper {
  min-height: var(--inventory-control-height);
  border-radius: var(--inventory-control-radius);
}

.content .el-switch {
  height: var(--inventory-control-height);
}

.content .el-switch__core {
  min-width: 40px;
  width: 40px;
  height: 20px;
  border-radius: 10px;
}

.content .el-switch__core .el-switch__action {
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
}

.content .el-switch.is-checked .el-switch__core .el-switch__action {
  left: calc(100% - 17px);
}

.content .page-card,
.content > .el-card,
.content .page > .el-card {
  border-radius: var(--inventory-card-radius) !important;
}

.content .page-header h1,
.content .page-title {
  margin: 0 !important;
  color: #16213a !important;
  font-size: 22px !important;
  line-height: 1.35 !important;
}

.content .page-header p,
.content .page-subtitle {
  margin: 7px 0 0;
  color: #8190a8;
  font-size: 13px;
  line-height: 1.6;
}

.content .el-pagination {
  justify-content: flex-end !important;
  margin-top: 18px !important;
}

.content .el-table__empty-text {
  color: var(--inventory-text-secondary);
}

@media (max-width: 760px) {
  html,
  body,
  #app,
  #app * {
    -webkit-tap-highlight-color: transparent;
  }

  .inventory-page-loading__panel {
    min-width: 142px;
    min-height: 52px;
    padding: 10px 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .inventory-page-loading,
  .inventory-page-loading__spinner {
    transition: none;
  }
}
