:root {
  --app-primary: #1a56db;
  --app-primary-dark: #1344b5;
  --app-bg: #f4f6fb;
  --app-surface: #ffffff;
  --app-border: #e5e7ef;
  --app-text-muted: #6b7280;
  --app-num-color: #2d3748;
  --app-num-muted: #718096;
  /* Inter 优先：英文/数字走 Inter；中文回退系统黑体 */
  --app-font: "Inter", "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --app-num-font: var(--app-font);
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  min-height: 100vh;
  font-feature-settings: "cv03", "cv04", "cv11", "liga" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page-header h1,
.page-header .h3 {
  font-weight: 600;
}

.empty-state__icon {
  opacity: 0.65;
}

/* 数字排版：等宽数字、千分位可读、深色正文 */
.app-num,
.stat-card__value,
.stat-card__sub,
.metric-sub,
.dashboard-table td.text-end,
.stock-table__num,
.stock-bom-peer-badge,
.stock-wechat-status__stock,
.stock-goods-meta__price,
.stock-page-info {
  font-family: var(--app-num-font);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "cv03", "cv04", "cv11", "liga" 0, "tnum" 1, "lnum" 1;
  letter-spacing: normal;
}

.app-num,
.stat-card__value:not(.text-success):not(.text-danger):not(.text-warning),
.stock-goods-meta__price {
  color: var(--app-num-color);
  font-weight: 500;
}

.dashboard-table td.text-end:not(.stock-order-materials-cell),
.stock-table:not(.stock-table--inventory) .stock-table__num:not(.stock-table__num--sub):not(.stock-table__num--empty):not(.stock-order-materials-cell) {
  color: var(--app-num-color);
  font-weight: 400;
}

.stat-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  height: 100%;
}

.stat-card__label {
  font-size: 0.8125rem;
  color: var(--app-num-muted);
  margin-bottom: 0.35rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-card__value {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--app-num-color);
}

.stat-card__sub {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #b8c0cc;
  font-weight: 400;
  white-space: nowrap;
}

.stat-card__sub.text-success {
  color: rgba(25, 135, 84, 0.5) !important;
}

.stat-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: nowrap;
}

.stat-row .stat-card {
  flex: 1 1 0;
  min-width: 0;
}

.stat-card--compact {
  padding: 0.75rem 0.85rem;
}

.stat-card--compact .stat-card__value {
  font-size: 1.05rem;
}

.stat-card--compact .stat-card__label {
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}

.stat-card--compact .stat-card__sub {
  font-size: 0.625rem;
  margin-top: 0.15rem;
}

@media (min-width: 768px) {
  .stat-card--compact .stat-card__value {
    font-size: 1.2rem;
  }

  .stat-card--compact .stat-card__label {
    font-size: 0.8125rem;
  }
}

.metric-sub {
  margin-top: 0.15rem;
  font-size: 0.6875rem;
  font-weight: 400;
  color: #b8c0cc;
  line-height: 1.25;
  white-space: nowrap;
}

.biz-dash-metric-sub {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--bs-secondary-color);
  line-height: 1.25;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.biz-dash-table thead th {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bs-heading-color);
  text-transform: none;
  letter-spacing: normal;
  padding: 0.875rem 1.25rem;
  background: var(--bs-tertiary-bg);
  border-bottom: 0;
  white-space: nowrap;
}

.biz-dash-table tbody td,
.biz-dash-table tfoot td {
  padding: 0.875rem 1.25rem;
  vertical-align: middle;
}

.biz-dash-table__shop-col {
  min-width: 12rem;
  max-width: 18rem;
}

.biz-dash-val {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--bs-heading-color);
}

.biz-dash-table td.text-success .biz-dash-val {
  color: var(--bs-success);
}

.biz-dash-table td.text-danger .biz-dash-val {
  color: var(--bs-danger);
}

.biz-dash-compare {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--bs-secondary-color);
  line-height: 1.25;
  white-space: nowrap;
}

.biz-dash-table tfoot .biz-dash-table__total td {
  background: rgba(var(--bs-primary-rgb), 0.04);
  border-top: 1px solid var(--bs-border-color);
}

.biz-dash-table tfoot .biz-dash-val {
  font-size: 1rem;
}

.biz-dash-shops-card .table-responsive {
  border-bottom-left-radius: var(--bs-border-radius);
  border-bottom-right-radius: var(--bs-border-radius);
}

.dashboard-table tfoot .metric-sub,
.dashboard-table tfoot .biz-dash-metric-sub {
  font-size: 0.6875rem;
}

@media (min-width: 768px) {
  .stat-card__value {
    font-size: 1.5rem;
  }
}

.dashboard-filter .card-body {
  padding: 0.5rem 0.75rem;
}

.dashboard-filter__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.dashboard-filter__main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
}

.dashboard-filter__presets {
  flex-shrink: 0;
}

.dashboard-filter__dropdown {
  flex: 1 1 auto;
  min-width: 0;
}

.dashboard-filter__send {
  flex-shrink: 0;
}

.dashboard-filter__toggle {
  width: 100%;
  max-width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-filter__menu {
  min-width: 16rem;
  padding: 0.85rem !important;
}

.dashboard-filter__menu-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--app-text-muted);
  margin-bottom: 0.65rem;
}

.form-label-sm {
  font-size: 0.75rem;
  color: var(--app-text-muted);
}

.stock-filter-card .card-body {
  padding-block: 0.75rem;
}

.stock-filter__panel {
  min-width: 0;
}

.stock-text-filter-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* input-group 行：模式选择稍窄，其余跟搜索合并 */
.stock-text-filter-row.input-group {
  flex-wrap: nowrap;
}

.stock-text-filter-row .stock-text-filter-mode {
  flex: 0 0 5.25rem;
  max-width: 5.25rem;
  width: 5.25rem;
}

.stock-text-filter-row .stock-text-filter-term {
  min-width: 0;
}

.stock-text-filter-row .stock-text-filter-remove {
  flex: 0 0 auto;
}

.stock-text-filter-row .stock-text-filter-remove:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.stock-filter__actions {
  padding-top: 0.05rem;
}

.stock-filter__refresh,
.stock-filter__export {
  white-space: nowrap;
}

/* ── 直播库存表格 ── */
/* 桌面/平板：宽表允许横向滚动，避免侧栏展开或窗口变窄时列被 card 裁切 */
.stock-inventory-card .stock-table-wrap.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.stock-table--inventory {
  --stock-sticky-top: 3.5rem;
  --stock-col-num-width: 6.75rem;
  --stock-col-order-width: 7.75rem;
  --stock-col-shelf-width: 8.5rem;
  --stock-col-sell-width: 6.75rem;
  table-layout: fixed;
  width: 100%;
  min-width: 72rem;
}

.stock-table--inventory col.stock-col-num {
  width: var(--stock-col-num-width);
}

.stock-table--inventory col.stock-col-num:nth-child(4) {
  width: var(--stock-col-order-width);
}

.stock-table--inventory col.stock-col-num--shelf {
  width: var(--stock-col-shelf-width);
}

.stock-table--inventory col.stock-col-num--sell {
  width: var(--stock-col-sell-width);
}

.stock-table--inventory col.stock-col-goods {
  width: auto;
  min-width: 14rem;
}

@media (max-width: 991.98px) {
  .stock-table--inventory {
    --stock-col-num-width: 6.25rem;
    --stock-col-order-width: 7.25rem;
    --stock-col-shelf-width: 8rem;
    min-width: 42rem;
  }

  .stock-table--inventory col.stock-col-num--sell {
    width: 0;
  }
}

@media (max-width: 575.98px) {
  .stock-table--inventory {
    --stock-col-num-width: 5.75rem;
    min-width: 0;
  }
}

/* 粘性表头：沿用 Sneat paper 底，不另起灰底色块 */
.stock-table--inventory thead th {
  position: sticky;
  top: var(--stock-sticky-top, 0);
  z-index: 5;
  background-color: var(--bs-paper-bg);
  background-clip: padding-box;
  white-space: nowrap;
}

.stock-table--inventory .stock-table__th--num {
  width: var(--stock-col-num-width);
}

.stock-table--inventory .stock-table__th--num .stock-table__th-label {
  white-space: nowrap;
  line-height: 1.25;
  text-align: right;
}

.stock-col-filter-wrap {
  display: inline-block;
  vertical-align: middle;
}

.stock-table__th-inner {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  width: 100%;
}

.stock-table__th--goods .stock-table__th-inner {
  justify-content: flex-start;
}

.stock-table__th-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
}

.stock-table__th-label {
  line-height: 1.2;
}

.stock-col-filter-btn {
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
}

.stock-col-filter-btn:hover,
.stock-col-filter-btn:focus {
  color: var(--bs-heading-color);
}

.stock-col-filter-btn.is-active {
  color: var(--bs-primary);
}

.stock-col-filter-menu {
  min-width: 10.5rem;
}

.stock-col-filter-menu .form-select,
.stock-col-filter-menu .form-control {
  font-size: 0.8125rem;
}

.stock-table--inventory .stock-table__th .stock-sort-icon {
  vertical-align: middle;
}

.stock-table--inventory tbody td.stock-goods-td {
  max-width: 0;
  overflow: hidden;
  word-break: normal;
  overflow-wrap: normal;
}

.stock-table--inventory > tbody > tr:not(.stock-bom-row) > td:first-child {
  max-width: 0;
}

.stock-table--inventory tbody tr.stock-group-row.is-expanded {
  box-shadow: inset 3px 0 0 var(--bs-primary);
}

.stock-table--inventory tbody tr.stock-spec-row > td {
  --bs-table-bg-type: var(--bs-table-striped-bg);
}

.stock-table__num {
  width: var(--stock-col-num-width);
  font-variant-numeric: tabular-nums;
}

/* 累计可订：主色强调，不另起列底色 */
.stock-table--inventory td.stock-order-materials-cell {
  color: var(--bs-primary);
  font-weight: 500;
}

.stock-table--inventory .stock-goods-cell {
  display: block;
  width: 100%;
  min-width: 0;
}

.stock-table--inventory .stock-goods-name-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 1.25rem;
}

.stock-table--inventory .stock-goods-title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.stock-table--inventory .stock-goods-name__text {
  display: block;
  flex: 1 1 0%;
  min-width: 0;
  max-width: 100%;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-table--inventory .stock-goods-title-row .stock-goods-name__text {
  flex: 1 1 0%;
}

.stock-table--inventory .stock-bom-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.15rem;
  white-space: nowrap;
  min-height: 1.25rem;
}

.stock-table--inventory tbody tr[data-stock-entry="true"] .stock-bom-sync-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  flex: 0 0 1.125rem;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.stock-table--inventory tbody tr[data-stock-entry="true"]:hover .stock-bom-sync-btn,
.stock-table--inventory tbody tr[data-stock-entry="true"]:focus-within .stock-bom-sync-btn,
.stock-table--inventory tbody tr[data-stock-entry="true"] .stock-bom-sync-btn.is-loading {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.stock-table--inventory .stock-goods-cell .stock-goods-meta {
  margin-top: 0.12rem;
}

.stock-table--inventory .stock-goods-cell .stock-goods-meta--mobile {
  margin-top: 0.08rem;
}

.stock-table--inventory .stock-goods-title-row .stock-group-toggle,
.stock-table--inventory .stock-goods-title-row .stock-multi-icon {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

@media (max-width: 767.98px) {
  .stock-table--inventory .stock-goods-name__text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    text-overflow: unset;
    font-size: 0.75rem;
    line-height: 1.3;
  }

  .stock-table--inventory .stock-bom-actions {
    min-height: 1.125rem;
  }
}

.stock-bom-peer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border: none;
  border-radius: 999px;
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1;
  vertical-align: middle;
  cursor: pointer;
}

.stock-bom-peer-badge:hover {
  background: rgba(var(--bs-primary-rgb), 0.2);
}

.stock-bom-peer-badge.is-active {
  background: var(--bs-primary);
  color: #fff;
}

.stock-table--inventory .stock-table__th--shelf .stock-table__th-label {
  white-space: nowrap;
}

.stock-table--inventory tbody td.stock-shelf-cell {
  overflow: visible;
}

.stock-shelf-cell .stock-wechat-meta {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  line-height: 1;
  max-width: 100%;
}

.stock-shelf-cell .stock-wechat-status {
  gap: 0.32rem;
  align-items: center;
  padding: 0;
  border-radius: 0;
}

.stock-shelf-cell .stock-wechat-status__icon {
  font-size: 0.8125rem;
  opacity: 1;
}

.stock-shelf-cell .stock-wechat-status__stock {
  font-size: 0.8125rem;
  font-weight: 400;
  color: #059669;
  letter-spacing: normal;
}

.stock-shelf-cell .stock-wechat-status--empty .stock-wechat-status__icon,
.stock-shelf-cell .stock-wechat-status--syncing .stock-wechat-status__icon {
  color: #cbd5e1;
}

.stock-shelf-cell .stock-wechat-status--on .stock-wechat-status__icon,
.stock-shelf-cell .stock-wechat-status--off .stock-wechat-status__icon {
  color: #10b981;
}

.stock-shelf-cell .stock-wechat-status:hover,
.stock-shelf-cell .stock-wechat-status:focus-within,
.stock-shelf-cell .stock-wechat-status--on:hover,
.stock-shelf-cell .stock-wechat-status--on:focus-within,
.stock-shelf-cell .stock-wechat-status--off:hover,
.stock-shelf-cell .stock-wechat-status--off:focus-within {
  background: transparent;
}

.stock-table--inventory .stock-goods-meta .stock-goods-meta__price,
.stock-goods-meta .stock-goods-meta__price {
  color: var(--bs-heading-color);
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
  flex-shrink: 0;
  margin-right: 0.65rem;
}

.stock-goods-meta .stock-goods-price {
  color: inherit;
}

.stock-goods-name {
  font-weight: 500;
  line-height: 1.35;
}

.stock-table__num--sub {
  color: var(--bs-secondary-color);
  font-size: 0.8125rem;
}

.stock-table__num--empty {
  color: var(--bs-secondary-color);
  opacity: 0.55;
}

.stock-goods-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--app-text-muted);
}

.stock-goods-no-copy {
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
}

.stock-goods-no-copy:hover {
  color: var(--bs-primary);
  text-decoration: underline;
}

.stock-goods-no-copy.is-copied {
  color: #059669;
  text-decoration: none;
}

.stock-copy-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 1080;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 0.8125rem;
  line-height: 1.3;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.stock-copy-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.stock-copy-toast i {
  color: #34d399;
  font-size: 1rem;
  flex-shrink: 0;
}

.stock-status-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 1081;
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: min(92vw, 32rem);
  padding: 0.65rem 1rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.94);
  color: #fff;
  font-size: 0.8125rem;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.stock-status-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.stock-status-toast__icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.stock-status-toast__text {
  white-space: pre-wrap;
  word-break: break-word;
}

.stock-status-toast--loading .stock-status-toast__icon {
  color: #60a5fa;
  animation: stock-bom-spin 0.8s linear infinite;
}

.stock-status-toast--success .stock-status-toast__icon {
  color: #34d399;
}

.stock-status-toast--error .stock-status-toast__icon {
  color: #f87171;
}

#stock-wechat-sync-all.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

#stock-wechat-sync-all.is-loading .stock-wechat-sync-all-icon {
  animation: stock-bom-spin 0.8s linear infinite;
}

.stock-wechat-sync-btn.is-loading .stock-wechat-sync-icon {
  animation: stock-bom-spin 0.8s linear infinite;
  color: var(--app-primary);
}

.stock-wechat-status--syncing {
  color: var(--app-text-muted);
  font-style: italic;
}

.stock-wechat-status--error {
  color: #dc2626;
}

/* 筛选态按钮：胶囊，激活用主色 soft */
.stock-risk-btn.is-active,
.stock-omission-btn.is-active {
  color: var(--bs-primary);
  background-color: rgba(var(--bs-primary-rgb), 0.08);
  border-color: var(--bs-primary);
}

/* 旧版独立风险栏已移除，防止缓存页面残留 */
#stock-risk-bar,
.stock-risk-chip {
  display: none !important;
}

.stock-risk-btn__count,
.stock-omission-btn__count {
  margin-left: 0.15rem;
  font-size: 0.6875rem;
  vertical-align: middle;
}

.stock-risk-btn.is-active .stock-risk-btn__count,
.stock-omission-btn.is-active .stock-omission-btn__count {
  background-color: var(--bs-primary) !important;
  color: #fff !important;
}

.stock-wechat-status-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  min-width: 0;
}

.stock-wechat-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  white-space: nowrap;
  vertical-align: middle;
}

.stock-goods-meta .stock-wechat-sync-btn,
.stock-shelf-cell .stock-wechat-sync-btn {
  display: none;
  align-items: center;
  line-height: 1;
  margin-right: 0;
}

.stock-goods-meta .stock-wechat-status:hover .stock-wechat-sync-btn,
.stock-goods-meta .stock-wechat-status:focus-within .stock-wechat-sync-btn,
.stock-shelf-cell .stock-wechat-status:hover .stock-wechat-sync-btn,
.stock-shelf-cell .stock-wechat-status:focus-within .stock-wechat-sync-btn,
.stock-shelf-cell .stock-wechat-status--syncing .stock-wechat-sync-btn,
.stock-shelf-cell .stock-wechat-sync-btn.is-loading {
  display: inline-flex;
}

.stock-goods-meta .stock-wechat-status,
.stock-shelf-cell .stock-wechat-status {
  font-size: inherit;
  padding: 0;
  line-height: 1.25;
}

.stock-goods-meta__sep {
  display: none;
}

.stock-goods-meta__suffix {
  margin-left: 0.5rem;
  color: var(--app-text-muted);
}

.stock-wechat-status {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  max-width: 100%;
  padding: 0.05rem 0.15rem;
  border-radius: 999px;
  font-size: inherit;
  line-height: 1.25;
  white-space: nowrap;
  vertical-align: middle;
  cursor: default;
  transition: background-color 0.15s ease;
}

.stock-wechat-status__icon {
  font-size: 0.875rem;
  flex-shrink: 0;
  line-height: 1;
}

.stock-wechat-status__stock {
  display: inline;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  color: #047857;
}

.stock-wechat-status__label {
  display: none !important;
}

.stock-wechat-pop {
  position: fixed;
  z-index: 1090;
  min-width: 9.5rem;
  max-width: 16rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.5rem;
  background: var(--bs-paper-bg);
  border: 1px solid var(--bs-border-color);
  box-shadow: 0 0.5rem 1.25rem rgba(34, 48, 62, 0.12);
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--bs-body-color);
  pointer-events: none;
}

.stock-wechat-pop.is-hidden {
  display: none;
}

.stock-wechat-pop__title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--bs-border-color);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--bs-heading-color);
}

.stock-wechat-pop__title .bx {
  color: var(--bs-success);
  font-size: 0.9375rem;
}

.stock-wechat-pop--empty .stock-wechat-pop__title .bx {
  color: var(--bs-secondary-color);
}

.stock-wechat-pop--error .stock-wechat-pop__title .bx {
  color: var(--bs-danger);
}

.stock-wechat-pop__row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.stock-wechat-pop__row + .stock-wechat-pop__row {
  margin-top: 0.2rem;
}

.stock-wechat-pop__key {
  flex-shrink: 0;
  color: var(--bs-secondary-color);
}

.stock-wechat-pop__key::after {
  content: "：";
}

.stock-wechat-pop__val {
  color: var(--bs-heading-color);
  font-weight: 500;
  white-space: normal;
  word-break: break-word;
}

.stock-wechat-pop__val--on {
  color: var(--bs-success);
}

.stock-wechat-pop__val--empty {
  color: var(--bs-secondary-color);
}

.stock-wechat-pop__val--error {
  color: var(--bs-danger);
}

.stock-wechat-status:hover,
.stock-wechat-status:focus-within {
  background: rgba(var(--bs-primary-rgb), 0.06);
}

.stock-wechat-status:hover .stock-wechat-status__label,
.stock-wechat-status:focus-within .stock-wechat-status__label {
  display: none !important;
}

.stock-wechat-status--on .stock-wechat-status__icon,
.stock-wechat-status--off .stock-wechat-status__icon {
  color: #059669;
}

.stock-wechat-status--on:hover,
.stock-wechat-status--on:focus-within,
.stock-wechat-status--off:hover,
.stock-wechat-status--off:focus-within {
  background: rgba(5, 150, 105, 0.1);
}

.stock-wechat-status--on .stock-wechat-status__label,
.stock-wechat-status--off .stock-wechat-status__label {
  color: #047857;
}

.stock-wechat-status--empty .stock-wechat-status__icon {
  color: #cbd5e1;
}

.stock-wechat-status--empty .stock-wechat-status__label {
  color: #64748b;
}

.stock-wechat-status--syncing .stock-wechat-status__icon {
  color: #cbd5e1;
}

.stock-wechat-status--error .stock-wechat-status__icon {
  color: #dc2626;
}

.stock-wechat-status--error .stock-wechat-status__label {
  color: #dc2626;
}

.stock-wechat-status--on {
  background: transparent;
  color: var(--bs-success);
}

.stock-wechat-status--off {
  background: transparent;
  color: var(--bs-success);
}

.stock-wechat-status--empty {
  background: transparent;
  color: var(--bs-secondary-color);
}

/* 旧版「在架 N」字段已移除，防止缓存页面残留 */
.stock-wechat-stock {
  display: none !important;
}

.stock-wechat-sync-btn {
  color: var(--bs-primary);
  line-height: 1;
}

.stock-wechat-sync-btn:hover .stock-wechat-sync-icon {
  color: var(--bs-primary);
}

.stock-goods-meta--indented {
  padding-left: 2.35rem;
}

.stock-group-row {
  cursor: pointer;
  user-select: none;
}

.stock-group-toggle {
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
  margin-top: 0.2rem;
  transition: transform 0.15s ease;
}

.stock-group-row.is-expanded .stock-group-toggle {
  transform: rotate(90deg);
}

.stock-multi-icon {
  color: var(--bs-primary);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.stock-spec-row td {
  border-top: 0;
}

.stock-goods-name--spec {
  font-weight: 400;
  font-size: 0.8125rem;
  padding-left: 2.35rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

@media (max-width: 767.98px) {
  .stock-goods-name--spec {
    -webkit-line-clamp: 2;
    font-size: 0.75rem;
  }
}

.stock-page-hidden {
  display: none !important;
}

.stock-filter-hidden {
  display: none !important;
}

/* 标题旁筛选态：Sneat soft badge，点击整颗清除 */
.stock-filter-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  padding: 0.35em 0.65em;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
}

.stock-filter-hint:hover,
.stock-filter-hint:focus-visible {
  filter: brightness(0.96);
}

/* 与 btn-sm 同高的紧凑开关，避免工具栏里显得突兀 */
.stock-zero-sold-hide-switch {
  display: inline-flex;
  align-items: center;
  min-height: calc(1.625rem + 2px);
  padding-left: 2.15rem;
  margin-bottom: 0;
}

.stock-zero-sold-hide-switch .form-check-input {
  width: 2rem;
  height: 1.15rem;
  margin-top: 0;
  cursor: pointer;
}

.stock-zero-sold-hide-switch .form-check-label {
  margin-bottom: 0;
  font-size: 0.8125rem;
  line-height: 1.2;
  color: var(--bs-body-color);
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
}

.stock-toolbar-btn-label {
  margin-left: 0.25rem;
}

.stock-page-info {
  white-space: nowrap;
}

.stock-sortable {
  cursor: pointer;
  user-select: none;
}

.stock-sortable:hover {
  color: var(--bs-primary);
}

.stock-sort-icon {
  display: inline-block;
  width: 0.85rem;
  font-size: 0.65rem;
  margin-left: 0.15rem;
  opacity: 0.4;
  vertical-align: middle;
  text-align: center;
  flex-shrink: 0;
}

.stock-sortable.is-active {
  color: var(--bs-primary);
}

.stock-sortable.is-active .stock-sort-icon {
  opacity: 1;
}

.stock-bom-icon {
  color: var(--bs-secondary-color);
  font-size: 1rem;
  transition: transform 0.15s ease, color 0.15s ease;
}

.stock-bom-btn {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--bs-secondary-color);
  border: 0;
  background: transparent;
}

.stock-bom-btn:hover,
.stock-bom-btn:focus {
  color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), 0.08);
}

.stock-bom-btn.is-active {
  color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), 0.12);
}

.stock-bom-btn.is-active .stock-bom-icon {
  color: var(--bs-primary);
  transform: rotate(180deg);
}

.stock-bom-btn:hover .stock-bom-icon,
.stock-bom-btn:focus .stock-bom-icon {
  color: inherit;
}

.stock-bom-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.stock-bom-sync-icon {
  color: var(--bs-secondary-color);
  font-size: 0.85rem;
}

.stock-bom-sync-btn:hover .stock-bom-sync-icon {
  color: var(--bs-primary);
}

.stock-bom-sync-btn.is-loading .stock-bom-sync-icon {
  animation: stock-bom-spin 0.8s linear infinite;
  color: var(--bs-primary);
}

@keyframes stock-bom-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.stock-bom-row > td {
  background-color: rgba(var(--bs-base-color-rgb, 34, 48, 62), 0.02);
  border-top: 0;
  padding: 0 !important;
  vertical-align: top;
}

.stock-bom-panel {
  margin: 0.65rem 1.25rem 0.85rem;
  padding: 0;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background: var(--bs-paper-bg);
  overflow: hidden;
}

.stock-bom-panel > .table {
  margin-bottom: 0;
}

.stock-bom-panel > .table thead th {
  position: static;
  background: var(--bs-secondary-bg-subtle);
  white-space: nowrap;
}

.stock-bom-panel .stock-bom-item--level2 > td:nth-child(2) {
  padding-left: 1.5rem;
}

.stock-bom-empty {
  margin: 0.65rem 1.25rem 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--bs-border-color);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
  background: rgba(var(--bs-base-color-rgb, 34, 48, 62), 0.02);
}

/* Sneat：card-footer 默认无顶边框，且 body+footer 时 padding-top=0；这里只补回间距，不加分割线 */
.stock-inventory-card > .card-body + .card-footer {
  --bs-card-border-width: 0;
  border-top: 0;
  padding-block-start: 1.25rem;
  padding-block-end: 1.25rem;
}

.stock-inventory-card > .card-body.p-0 .stock-table--inventory {
  margin-bottom: 0;
}

.stock-inventory-card .stock-table--inventory.table-border-bottom-0 > tbody > tr:last-child > td,
.stock-inventory-card .stock-table--inventory > tbody.table-border-bottom-0 > tr:last-child > td {
  border-bottom-width: 0;
}

#stock-bom-sync-incremental.is-loading,
#stock-bom-sync-full.is-loading,
#stock-wechat-rebuild-index.is-loading {
  pointer-events: none;
  opacity: 0.65;
}

@media (max-width: 767.98px) {
  .stock-filter {
    flex-direction: column;
    align-items: stretch !important;
  }

  .stock-filter__actions {
    width: 100%;
  }

  .stock-text-filter-list {
    gap: 0.35rem;
  }

  .stock-text-filter-row .stock-text-filter-mode {
    flex-basis: 4.75rem;
    max-width: 4.75rem;
    width: 4.75rem;
  }

  .stock-inventory-card .card-header {
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.35rem;
  }

  .stock-inventory-card .card-header .stock-toolbar {
    width: 100%;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.3rem !important;
    padding-bottom: 0.05rem;
    scrollbar-width: none;
  }

  .stock-inventory-card .card-header .stock-toolbar::-webkit-scrollbar {
    display: none;
  }

  .stock-inventory-card .card-header .stock-toolbar > * {
    flex: 0 0 auto;
  }

  .stock-zero-sold-hide-switch {
    padding-left: 2rem;
  }

  .stock-inventory-card .card-body {
    padding: 0 0.5rem 0.5rem !important;
    background: var(--bs-body-bg);
  }

  .stock-inventory-card .card-footer {
    background: transparent !important;
    padding-block-start: 0.85rem !important;
    padding-block-end: 0.85rem !important;
    border-top: 0 !important;
  }

  .stock-inventory-card .stock-table-wrap.table-responsive {
    overflow: visible;
  }

  .stock-table--inventory {
    --stock-sticky-top: 0;
    min-width: 0;
    width: 100%;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
  }

  .stock-table--inventory colgroup {
    display: none;
  }

  .stock-table--inventory > thead {
    display: none;
  }

  .stock-table--inventory > tbody {
    display: block;
  }

  .stock-toolbar-btn-label {
    display: none;
  }

  .stock-toolbar .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.8125rem;
  }

  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
      "goods goods goods goods"
      "stock prod order shelf"
      "sell sell sell sell";
    gap: 0.3rem;
    width: 100%;
    margin: 0 0 0.4rem;
    padding: 0.55rem 0.6rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    background: var(--bs-paper-bg);
    box-sizing: border-box;
    box-shadow: 0 0.125rem 0.25rem rgba(34, 48, 62, 0.04);
  }

  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"]:hover td,
  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"].is-expanded td {
    background: transparent !important;
  }

  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    overflow: visible;
    max-width: none;
    width: auto !important;
  }

  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-goods-td {
    grid-area: goods;
  }

  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-stock-cell,
  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-producible-cell,
  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-order-materials-cell,
  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-shelf-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    padding: 0.3rem 0.35rem !important;
    border-radius: 0.375rem !important;
    background: var(--bs-secondary-bg-subtle) !important;
    min-width: 0;
  }

  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-stock-cell { grid-area: stock; }
  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-producible-cell { grid-area: prod; }
  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-order-materials-cell { grid-area: order; }
  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-shelf-cell { grid-area: shelf; }

  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-stock-cell::before { content: "库存"; }
  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-producible-cell::before { content: "可生产"; }
  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-order-materials-cell::before { content: "累计可订"; }
  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-shelf-cell::before { content: "小店"; }

  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-stock-cell::before,
  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-producible-cell::before,
  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-order-materials-cell::before,
  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-shelf-cell::before {
    font-size: 0.625rem;
    color: var(--bs-secondary-color);
    line-height: 1.2;
  }

  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-order-materials-cell {
    color: var(--bs-primary);
  }

  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.stock-sell-cell {
    grid-area: sell;
    display: block;
    padding: 0.3rem 0.4rem !important;
    border-radius: 0.375rem !important;
    background: var(--bs-secondary-bg-subtle) !important;
  }

  .stock-card-sell {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0.5rem;
    font-size: 0.6875rem;
    color: var(--bs-secondary-color);
    line-height: 1.3;
  }

  .stock-card-sell__label {
    font-weight: 600;
    color: var(--bs-secondary-color);
    margin-right: 0.1rem;
  }

  .stock-card-sell__item .app-num {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--bs-heading-color);
  }

  .stock-table--inventory tbody tr.stock-page-row[data-stock-entry="true"] > td.d-none {
    display: none !important;
  }

  .stock-table--inventory .stock-goods-cell,
  .stock-table--inventory .stock-goods-cell--group {
    display: block;
    width: 100%;
  }

  .stock-table--inventory .stock-goods-name__text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    text-overflow: unset;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--bs-heading-color);
  }

  .stock-table--inventory .stock-goods-name-row,
  .stock-table--inventory .stock-goods-title-row {
    width: 100%;
  }

  .stock-table--inventory tbody tr[data-stock-entry="true"] .stock-bom-sync-btn {
    display: none !important;
  }

  .stock-table--inventory tbody tr[data-stock-entry="true"] .stock-bom-sync-btn.is-loading {
    display: inline-flex !important;
    visibility: visible;
    opacity: 1;
  }

  .stock-goods-meta--mobile {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.1rem 0.2rem;
    margin-top: 0.15rem;
    color: var(--bs-secondary-color);
    font-size: 0.6875rem;
    line-height: 1.35;
  }

  .stock-goods-meta--mobile .app-num {
    font-size: inherit;
    font-weight: 500;
    color: var(--bs-heading-color);
  }

  .stock-goods-meta__sep {
    color: var(--bs-border-color);
  }

  .stock-shelf-cell .stock-wechat-meta {
    justify-content: flex-start;
    max-width: 100%;
  }

  .stock-shelf-cell .stock-wechat-status {
    gap: 0.2rem;
  }

  .stock-shelf-cell .stock-wechat-status__stock {
    font-size: 0.8125rem;
    font-weight: 500;
  }

  .stock-table--inventory .stock-table__num {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left !important;
  }

  .stock-table--inventory tbody tr.stock-spec-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
      "goods goods goods goods"
      "stock prod order shelf"
      "sell sell sell sell";
    gap: 0.25rem 0.3rem;
    width: calc(100% - 0.4rem);
    margin: -0.15rem 0 0.4rem 0.4rem;
    padding: 0.45rem 0.5rem;
    border: 1px dashed var(--bs-border-color);
    border-radius: 0.375rem;
    background: var(--bs-secondary-bg-subtle);
    box-sizing: border-box;
  }

  .stock-table--inventory tbody tr.stock-spec-row > td {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    width: auto !important;
  }

  .stock-table--inventory tbody tr.stock-spec-row > td.stock-goods-td { grid-area: goods; }
  .stock-table--inventory tbody tr.stock-spec-row > td.stock-stock-cell,
  .stock-table--inventory tbody tr.stock-spec-row > td.stock-producible-cell,
  .stock-table--inventory tbody tr.stock-spec-row > td.stock-order-materials-cell,
  .stock-table--inventory tbody tr.stock-spec-row > td.stock-shelf-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    padding: 0.25rem 0.3rem !important;
    border-radius: 0.375rem !important;
    background: var(--bs-paper-bg) !important;
    min-width: 0;
  }
  .stock-table--inventory tbody tr.stock-spec-row > td.stock-stock-cell { grid-area: stock; }
  .stock-table--inventory tbody tr.stock-spec-row > td.stock-producible-cell { grid-area: prod; }
  .stock-table--inventory tbody tr.stock-spec-row > td.stock-order-materials-cell { grid-area: order; }
  .stock-table--inventory tbody tr.stock-spec-row > td.stock-shelf-cell { grid-area: shelf; }
  .stock-table--inventory tbody tr.stock-spec-row > td.stock-stock-cell::before { content: "库存"; font-size: 0.625rem; color: var(--bs-secondary-color); }
  .stock-table--inventory tbody tr.stock-spec-row > td.stock-producible-cell::before { content: "可生产"; font-size: 0.625rem; color: var(--bs-secondary-color); }
  .stock-table--inventory tbody tr.stock-spec-row > td.stock-order-materials-cell::before { content: "可订"; font-size: 0.625rem; color: var(--bs-secondary-color); }
  .stock-table--inventory tbody tr.stock-spec-row > td.stock-shelf-cell::before { content: "小店"; font-size: 0.625rem; color: var(--bs-secondary-color); }
  .stock-table--inventory tbody tr.stock-spec-row > td.stock-sell-cell {
    grid-area: sell;
    display: block;
    padding: 0.25rem 0.35rem !important;
    border-radius: 0.375rem !important;
    background: var(--bs-paper-bg) !important;
  }
  .stock-table--inventory tbody tr.stock-spec-row > td.d-none {
    display: none !important;
  }

  .stock-goods-name--spec {
    -webkit-line-clamp: 2;
    font-size: 0.75rem;
    padding-left: 0;
    font-weight: 500;
  }

  .stock-table--inventory tbody tr.stock-bom-row {
    display: block;
    width: 100%;
    margin: -0.2rem 0 0.4rem;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .stock-table--inventory tbody tr.stock-bom-row > td {
    display: block;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    overflow: visible !important;
  }

  .stock-bom-panel {
    margin: 0 0 0.35rem;
    border-radius: 0.375rem;
    border: 1px dashed var(--bs-border-color);
    background: var(--bs-secondary-bg-subtle);
  }

  .stock-bom-panel > .table {
    display: block;
    width: 100%;
  }

  .stock-bom-panel > .table thead {
    display: none;
  }

  .stock-bom-panel > .table tbody {
    display: block !important;
  }

  .stock-bom-panel > .table tbody tr {
    display: block;
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--bs-border-color);
  }

  .stock-bom-panel > .table tbody tr:last-child {
    border-bottom: 0;
  }

  .stock-bom-panel > .table tbody td {
    display: block;
    width: 100% !important;
    max-width: none !important;
    padding: 0.1rem 0 !important;
    border: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    text-align: left !important;
  }

  .stock-bom-panel > .table tbody td.text-end {
    text-align: left !important;
  }

  .stock-bom-panel > .table tbody td.text-end::before {
    font-size: 0.625rem;
    color: var(--bs-secondary-color);
    margin-right: 0.25rem;
  }

  .stock-bom-panel > .table tbody td:nth-child(3)::before {
    content: "单耗 ";
  }

  .stock-bom-panel > .table tbody td:nth-child(4)::before {
    content: "库存 ";
  }

  .stock-bom-panel .stock-bom-item--level2 > td:nth-child(2) {
    padding-left: 0 !important;
  }

  .stock-bom-panel .stock-bom-item--level2 > td:nth-child(2) .fw-medium {
    padding-left: 0.75rem;
    border-left: 2px solid var(--bs-border-color);
  }

  .stock-bom-empty {
    margin: 0 0 0.35rem;
    padding: 0.65rem 0.75rem;
    font-size: 0.8125rem;
  }
}
.dashboard-table th {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--app-num-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom-width: 1px;
  padding: 0.75rem 1rem;
}

.dashboard-table td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
}

.dashboard-table td.text-end:not(.stock-order-materials-cell) {
  color: var(--app-num-color);
  font-size: 0.875rem;
  font-weight: 400;
}

.dashboard-table .shop-name {
  font-weight: 500;
  max-width: 220px;
}

@media (min-width: 768px) {
  .dashboard-table .shop-name {
    max-width: 360px;
  }
}

.dashboard-table tfoot td {
  border-top: 2px solid var(--app-border);
}

.dashboard-table__copy-col {
  width: 2.5rem;
}

.permission-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

.permission-check {
  margin-bottom: 0;
}

.permission-checklist--stacked {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.permission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.permission-tags .badge {
  font-weight: 500;
}

.access-table thead th {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bs-heading-color);
  text-transform: none;
  letter-spacing: normal;
  padding: 0.875rem 1.25rem;
  background: var(--bs-tertiary-bg);
  border-bottom: 0;
  white-space: nowrap;
}

.access-table tbody td,
.access-table tfoot td {
  padding: 0.875rem 1.25rem;
  vertical-align: middle;
}

.access-table__user-col {
  min-width: 8rem;
}

.access-table__action-col {
  width: 6rem;
}

.access-perm-text {
  font-size: 0.8125rem;
  color: var(--bs-body-color);
  line-height: 1.45;
  max-width: 28rem;
  white-space: normal;
}

.access-control-card .table-responsive {
  border-bottom-left-radius: var(--bs-border-radius);
  border-bottom-right-radius: var(--bs-border-radius);
}

.access-edit-section__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--bs-heading-color);
  margin-bottom: 0.85rem;
}

.access-edit-section__form {
  max-width: 40rem;
}

.permission-list--grid .permission-list__item--grid {
  padding: 0;
  border-bottom: 0;
  margin: 0;
}

.permission-list__item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--bs-border-color);
}

.permission-list__item:last-child {
  border-bottom: 0;
}

.access-user-avatar {
  font-size: 2rem;
  color: var(--app-primary);
  line-height: 1;
}

.access-table td {
  vertical-align: top;
}

.account-settings {
  max-width: 480px;
}

/* 直播看板 */
.live-dash-session-table__time {
  font-size: 0.75rem;
  line-height: 1.35;
  margin-top: 0.15rem;
}

.live-dash-session-table th,
.live-dash-session-table td {
  vertical-align: middle;
}

/* 直播场次：手机卡片 */
.live-dash-session-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.live-dash-session-card {
  border: 1px solid var(--app-border);
  border-radius: 0.5rem;
  background: var(--app-surface);
  padding: 0.75rem 0.85rem;
}

.live-dash-session-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.live-dash-session-card__theme {
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--app-num-color);
  word-break: break-word;
}

.live-dash-session-card__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem 0.5rem;
  padding: 0.55rem 0.5rem;
  margin-bottom: 0.65rem;
  border-radius: 0.375rem;
  background: var(--app-bg);
}

.live-dash-session-card__stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.live-dash-session-card__stat-label {
  font-size: 0.6875rem;
  color: var(--app-text-muted);
  line-height: 1.2;
}

.live-dash-session-card__stat-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--app-num-color);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.live-dash-session-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.live-dash-session-card__actions .btn {
  flex: 1 1 auto;
  min-width: calc(50% - 0.2rem);
}

.live-dash-session-card__actions form {
  display: contents;
}

@media (max-width: 767.98px) {
  .dashboard-filter .card-body {
    align-items: stretch;
  }

  .dashboard-filter #session-form-open {
    width: 100%;
    margin-left: 0 !important;
  }
}

.live-dash-form .form-label-sm {
  font-size: 0.8125rem;
  color: var(--app-text-muted);
}

/* 本场目标设定：单卡表格 + Modal */
.live-dash-goals-table__keywords {
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--bs-secondary-color);
  font-size: 0.8125rem;
}

.live-dash-goals-table__row--child td {
  background-color: var(--bs-tertiary-bg, rgba(67, 89, 113, 0.04));
}

.live-dash-goals-card .badge.app-num {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.live-dash-yen {
  font-size: 0.72em;
  font-weight: 500;
  margin-right: 0.04em;
  opacity: 0.85;
}

.live-dash-datetime {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 0.5rem;
}

.live-dash-datetime input[type="text"] {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.live-dash-goal {
  border: 1px solid var(--app-border);
  border-radius: 0.5rem;
  background: var(--app-surface);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.live-dash-goal--child {
  margin: 0.35rem 0 0.35rem 0.75rem;
  border-style: dashed;
}

.live-dash-goal__summary {
  list-style: none;
  cursor: pointer;
  padding: 0.65rem 0.75rem;
  display: grid;
  gap: 0.35rem;
  position: relative;
}

.live-dash-goal__summary::-webkit-details-marker {
  display: none;
}

.live-dash-goal__toggle {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 1.125rem;
  color: var(--bs-secondary-color);
  transition: transform 0.2s ease, color 0.2s ease;
  pointer-events: none;
}

.live-dash-goal[open] > .live-dash-goal__summary .live-dash-goal__toggle {
  transform: rotate(180deg);
}

.live-dash-goal__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding-right: 1.25rem;
}

#live-dash-refresh {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  min-width: 5.75rem;
}

#live-dash-refresh.live-dash-refresh--busy,
#live-dash-refresh:disabled {
  opacity: 1;
  cursor: wait;
}

body.live-dash-night #live-dash-refresh.live-dash-refresh--busy,
body.live-dash-night #live-dash-refresh:disabled {
  opacity: 1 !important;
  background: var(--ld-accent);
  border-color: var(--ld-accent);
  color: #06120c;
  box-shadow: 0 0 0 1px rgba(110, 212, 168, 0.35);
}

body.live-dash-night #live-dash-refresh .spinner-border {
  width: 0.85rem;
  height: 0.85rem;
  border-width: 0.15em;
  color: #06120c;
  border-right-color: transparent;
}

body.live-dash-night #live-dash-refresh .live-dash-refresh__label {
  font-weight: 600;
}

.live-dash-goal__name {
  font-weight: 600;
  font-size: 0.9375rem;
}

.live-dash-goal__metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.live-dash-goal__pct {
  color: var(--app-primary);
  font-weight: 600;
}

.live-dash-goal__bar,
.live-dash-progress .progress {
  height: 0.375rem;
  background: #eef1f7;
}

.live-dash-goal__bar .progress-bar,
.live-dash-progress .progress-bar,
.live-dash-overview__bar .progress-bar {
  background: var(--app-primary);
  box-shadow: none !important;
}

.live-dash-goal__body {
  border-top: 1px solid var(--app-border);
  padding: 0.5rem 0.75rem 0.65rem;
  background: #fafbfe;
}

.live-dash-goal-child td {
  background: #fafbfe;
}

/* 直播看板夜间模式（仅 Board 页：body.live-dash-night） */
body.live-dash-night {
  --ld-bg: #0e1218;
  --ld-surface: #171c26;
  --ld-surface-2: #1e2532;
  --ld-border: #2a3344;
  --ld-text: #e8edf5;
  --ld-muted: #8b95a8;
  --ld-num: #f5f7fb;
  --ld-amount: #6ed4a8;
  --ld-accent: #3dba8b;
  --ld-accent-soft: #2a9d6f;
  --ld-warn: #d4a15c;
  --ld-done: #5fd4a0;
  --ld-live: #3dba8b;
  --ld-bar-track: #222936;
  --ld-bar-warn: rgba(180, 140, 80, 0.45);
  --ld-bar-good: rgba(55, 130, 100, 0.5);
  --ld-bar-done: rgba(70, 150, 115, 0.55);
  background: var(--ld-bg);
  color: var(--ld-text);
}

body.live-dash-night.app-body--chrome-hidden .live-dash-shell {
  max-width: 1280px;
}

body.live-dash-night .live-dash-toolbar {
  background: transparent;
  border: none;
  padding: 0.15rem 0 0.35rem;
  margin-bottom: 0.65rem !important;
}

body.live-dash-night .live-dash-toolbar__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  min-width: 0;
  max-width: min(100%, 28rem);
}

body.live-dash-night .live-dash-toolbar__title {
  color: var(--ld-text);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
}

body.live-dash-night .live-dash-toolbar__hosts,
body.live-dash-night .live-dash-toolbar__time {
  font-size: 0.875rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body.live-dash-night .live-dash-toolbar .badge {
  font-size: 0.6875rem;
  padding: 0.2em 0.45em;
}

body.live-dash-night .live-dash-channel .btn {
  color: var(--ld-muted);
  border-color: var(--ld-border);
  background: transparent;
  min-width: 2.75rem;
}

body.live-dash-night .live-dash-channel .btn:hover {
  color: var(--ld-text);
  border-color: #4b5568;
  background: rgba(255, 255, 255, 0.04);
}

body.live-dash-night .live-dash-channel .btn.active {
  color: #fff;
  border-color: var(--app-primary);
  background: var(--app-primary);
}

body.live-dash-night .live-dash-muted,
body.live-dash-night .text-body-secondary {
  color: var(--ld-muted) !important;
}

body.live-dash-night .live-dash-panel,
body.live-dash-night .live-dash-night .stat-card,
body.live-dash-night .stat-row .stat-card {
  background: var(--ld-surface);
  border: 1px solid var(--ld-border) !important;
  box-shadow: none !important;
  color: var(--ld-text);
}

body.live-dash-night .btn-outline-secondary {
  color: var(--ld-text);
  border-color: var(--ld-border);
  background: transparent;
}

body.live-dash-night .btn-outline-secondary:hover {
  color: var(--ld-text);
  border-color: #3d4a63;
  background: var(--ld-surface-2);
}

body.live-dash-night .btn-primary {
  background: var(--ld-accent-soft);
  border-color: var(--ld-accent-soft);
  color: #06120c;
  font-weight: 600;
}

body.live-dash-night .btn-primary:hover,
body.live-dash-night .btn-primary:focus {
  background: var(--ld-accent);
  border-color: var(--ld-accent);
  color: #06120c;
}

body.live-dash-night .form-check-input {
  background-color: var(--ld-surface-2);
  border-color: var(--ld-border);
}

body.live-dash-night .form-check-input:checked {
  background-color: var(--ld-accent-soft);
  border-color: var(--ld-accent-soft);
}

body.live-dash-night .alert-warning {
  background: #2a2418;
  border-color: #5a4a2e;
  color: #e8d5a8;
}

body.live-dash-night .live-dash-badge--live {
  background: rgba(61, 186, 139, 0.18);
  color: var(--ld-live);
  border: 1px solid rgba(61, 186, 139, 0.35);
  font-weight: 600;
}

body.live-dash-night .live-dash-badge--idle {
  background: rgba(139, 149, 168, 0.12);
  color: var(--ld-muted);
  border: 1px solid var(--ld-border);
}

body.live-dash-night .live-dash-badge--soft {
  background: rgba(139, 149, 168, 0.14);
  color: var(--ld-muted);
  border: 1px solid var(--ld-border);
  font-weight: 500;
}

body.live-dash-night .live-dash-overview-panel {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem 0.55rem;
  background: #121822;
  border: 1px solid #364157;
  border-left: 3px solid rgba(61, 186, 139, 0.55);
  border-radius: 0.5rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

body.live-dash-night .live-dash-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem 0.75rem;
  align-items: stretch;
}

body.live-dash-night .live-dash-overview__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

body.live-dash-night .live-dash-overview__title {
  color: var(--ld-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

body.live-dash-night .live-dash-overview__metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  font-variant-numeric: tabular-nums;
}

body.live-dash-night .live-dash-overview__achieved {
  color: var(--ld-amount);
  font-size: clamp(1.5rem, 3.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

body.live-dash-night .live-dash-overview__metrics .live-dash-muted {
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

body.live-dash-night .live-dash-overview__bar {
  background: var(--ld-bar-track);
  height: 0.25rem;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.2rem;
}

body.live-dash-night .live-dash-overview__bar .progress-bar {
  border-radius: 999px;
  box-shadow: none !important;
}

body.live-dash-night .live-dash-overview__meta {
  color: var(--ld-muted);
  font-size: 0.6875rem;
  margin-top: 0.15rem;
  opacity: 0.85;
}

body.live-dash-night .live-dash-overview__cells {
  display: grid;
  grid-template-columns: repeat(3, minmax(4.5rem, 1fr));
  gap: 0.45rem;
  min-width: 15rem;
}

body.live-dash-night .live-dash-overview__cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(42, 51, 68, 0.9);
  border-radius: 0.375rem;
  padding: 0.45rem 0.6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 5rem;
}

body.live-dash-night .live-dash-overview__label {
  color: var(--ld-muted);
  font-size: 0.6875rem;
  margin-bottom: 0.15rem;
}

body.live-dash-night .live-dash-overview__value {
  color: var(--ld-amount);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: -0.01em;
}

body.live-dash-night .live-dash-overview__cell.live-dash-stat--pct.live-dash-tone--warn .live-dash-overview__value {
  color: #c4a878;
}

body.live-dash-night .live-dash-overview__cell.live-dash-stat--pct.live-dash-tone--good .live-dash-overview__value,
body.live-dash-night .live-dash-overview__cell.live-dash-stat--pct.live-dash-tone--done .live-dash-overview__value {
  color: #8fb9a6;
}

body.live-dash-night .live-dash-section {
  margin-top: 0.15rem;
}

body.live-dash-night .live-dash-section__title {
  color: var(--ld-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  margin: 0 0 0.75rem 0.1rem;
}

@media (max-width: 575.98px) {
  body.live-dash-night .live-dash-overview {
    grid-template-columns: 1fr;
  }

  body.live-dash-night .live-dash-overview__cells {
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.live-dash-night .live-dash-overview__value {
    font-size: 1.1rem;
  }
}

body.live-dash-night .live-dash-goal {
  background: var(--ld-surface);
  border-color: var(--ld-border);
  margin-bottom: 0.75rem;
}

body.live-dash-night .live-dash-goal--child {
  background: var(--ld-surface-2);
  border-color: #323c50;
  margin: 0.55rem 0 0.55rem 0.65rem;
}

body.live-dash-night .live-dash-goal__summary {
  padding: 0.95rem 1.05rem 0.9rem;
  gap: 0.55rem;
}

body.live-dash-night .live-dash-goal--child > .live-dash-goal__summary {
  padding: 0.8rem 0.95rem 0.75rem;
}

body.live-dash-night .live-dash-goal__summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

body.live-dash-night .live-dash-goal__toggle {
  color: var(--ld-muted);
  top: 1.05rem;
  right: 1rem;
}

body.live-dash-night .live-dash-goal__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title thumbs"
    "metrics metrics";
  align-items: center;
  column-gap: 0.65rem;
  row-gap: 0.5rem;
  padding-right: 1.5rem;
}

body.live-dash-night .live-dash-goal__title {
  grid-area: title;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

body.live-dash-night .live-dash-goal__metrics {
  grid-area: metrics;
}

body.live-dash-night .live-dash-goal__thumbs {
  grid-area: thumbs;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  justify-self: end;
}

@media (min-width: 768px) {
  body.live-dash-night .live-dash-goal__head {
    column-gap: 0.65rem;
  }
}

/* img 不能用伪元素，暗色遮罩加在 wrap::after */
body.live-dash-night .live-dash-goal__thumb-wrap {
  position: relative;
  display: inline-block;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  border-radius: 0.25rem;
  overflow: hidden;
  background: #252d3c;
  border: 1px solid rgba(58, 69, 92, 0.7);
  box-shadow: 0 0 0 1px rgba(14, 18, 24, 0.7);
}

body.live-dash-night .live-dash-goal__thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  border-radius: 0;
}

body.live-dash-night .live-dash-goal__thumb-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 18, 0.22);
  pointer-events: none;
}

body.live-dash-night .live-dash-goal__index {
  flex-shrink: 0;
  min-width: 1.25rem;
  color: #6b7385;
  font-size: 0.8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum", "lnum", "cv03", "cv04", "cv11", "liga" 0;
}

body.live-dash-night .live-dash-goal:not(.live-dash-goal--child) > .live-dash-goal__summary .live-dash-goal__index {
  font-size: 0.875rem;
  color: #7a8498;
}

body.live-dash-night .live-dash-goal__thumb-wrap + .live-dash-goal__thumb-wrap {
  margin-left: -0.35rem;
}

body.live-dash-night .live-dash-goal__name {
  color: #9aa3b5;
  font-size: 0.9375rem;
  font-weight: 500;
}

body.live-dash-night .live-dash-goal:not(.live-dash-goal--child) > .live-dash-goal__summary .live-dash-goal__name {
  font-size: 1rem;
  color: #a8b0c0;
  font-weight: 500;
}

body.live-dash-night .live-dash-detail-table {
  table-layout: fixed;
  width: 100%;
}

.live-dash-detail__product {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

body.live-dash-night .live-dash-detail__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
  color: var(--ld-text);
}

.live-dash-detail__spec,
body.live-dash-night .live-dash-detail__spec {
  display: block;
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--app-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.live-dash-night .live-dash-detail__spec {
  color: #8b93a7;
}

/* 明细表：紧凑「更换类别」 */
.live-dash-detail__action-col,
body.live-dash-night .live-dash-detail__action-col {
  width: 1.75rem;
  padding-left: 0.15rem !important;
  padding-right: 0.15rem !important;
  vertical-align: middle;
}

.live-dash-detail__move,
body.live-dash-night .live-dash-detail__move {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  line-height: 1;
  color: var(--app-text-muted, #6b7280);
  opacity: 0.45;
  text-decoration: none;
  border: 0;
  vertical-align: middle;
}

.live-dash-detail-table tbody tr:hover .live-dash-detail__move,
.live-dash-detail__move:focus-visible,
.live-dash-detail__move:hover {
  opacity: 1;
  color: var(--app-primary, #1a56db);
}

body.live-dash-night .live-dash-detail__move {
  color: var(--ld-muted, #8b93a7);
}

body.live-dash-night .live-dash-detail-table tbody tr:hover .live-dash-detail__move,
body.live-dash-night .live-dash-detail__move:focus-visible,
body.live-dash-night .live-dash-detail__move:hover {
  color: #7eb6ff;
}

body.live-dash-night .live-dash-assign-modal {
  background: #1a1f2b;
  color: var(--ld-text, #e8eaef);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.live-dash-night .live-dash-assign-modal .modal-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.live-dash-night .live-dash-assign-list {
  max-height: min(50vh, 20rem);
  overflow: auto;
}

body.live-dash-night .live-dash-assign-item {
  background: transparent;
  color: var(--ld-text, #e8eaef);
  border-color: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.15rem;
  font-size: 0.875rem;
}

body.live-dash-night .live-dash-assign-item--child {
  padding-left: 0.85rem;
  font-size: 0.8125rem;
}

body.live-dash-night .live-dash-assign-item:hover,
body.live-dash-night .live-dash-assign-item:focus {
  background: rgba(126, 182, 255, 0.12);
  color: #fff;
}

body.live-dash-night .live-dash-assign-list.is-busy {
  pointer-events: none;
  opacity: 0.6;
}

/* 移动端：类别标题最多两行 */
@media (max-width: 575.98px) {
  body.live-dash-night .live-dash-goal__title {
    width: 100%;
  }

  body.live-dash-night .live-dash-goal__name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
  }
}

body.live-dash-night .live-dash-yen {
  font-size: 0.7em;
  font-weight: 600;
  margin-right: 0.06em;
  opacity: 0.9;
}

body.live-dash-night .live-dash-goal__metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.45rem 0.9rem;
  width: 100%;
  text-align: left;
}

body.live-dash-night .live-dash-goal__amounts {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
}

body.live-dash-night .live-dash-goal__metrics .live-dash-goal__pct {
  margin-left: auto;
  flex-shrink: 0;
  text-align: right;
}

body.live-dash-night .live-dash-goal__achieved,
body.live-dash-night .live-dash-goal__metrics .app-num {
  color: var(--ld-amount);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

body.live-dash-night .live-dash-goal__pct {
  font-size: 0.9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  min-width: 3.25rem;
}

body.live-dash-night .live-dash-goal__pct.live-dash-tone--warn {
  color: #a8946e;
}

body.live-dash-night .live-dash-goal__pct.live-dash-tone--good,
body.live-dash-night .live-dash-goal__pct.live-dash-tone--done {
  color: #7a9e8d;
}

body.live-dash-night .live-dash-goal__bar,
body.live-dash-night .live-dash-progress .progress {
  background: var(--ld-bar-track);
  height: 0.25rem;
  border-radius: 999px;
  overflow: hidden;
}

body.live-dash-night .live-dash-goal__bar .progress-bar,
body.live-dash-night .live-dash-progress .progress-bar,
body.live-dash-night .live-dash-overview__bar .progress-bar {
  border-radius: 999px;
  box-shadow: none !important;
  --bs-progress-bar-shadow-color: transparent;
}

body.live-dash-night .progress-bar.live-dash-tone--warn {
  background: var(--ld-bar-warn);
}

body.live-dash-night .progress-bar.live-dash-tone--good {
  background: var(--ld-bar-good);
}

body.live-dash-night .progress-bar.live-dash-tone--done {
  background: var(--ld-bar-done);
}

body.live-dash-night .live-dash-goal__body {
  background: #121722;
  border-top-color: var(--ld-border);
  padding: 0.8rem 1.05rem 0.95rem;
}

body.live-dash-night .live-dash-detail-table td {
  vertical-align: top;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

body.live-dash-night .dashboard-table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ld-text);
  --bs-table-border-color: var(--ld-border);
  color: var(--ld-text);
}

body.live-dash-night .dashboard-table thead th {
  color: var(--ld-muted);
  background: transparent;
  border-bottom-color: var(--ld-border);
  font-weight: 500;
}

body.live-dash-night .dashboard-table tbody td {
  border-color: var(--ld-border);
  color: var(--ld-text);
}

body.live-dash-night .dashboard-table td.text-end:not(.stock-order-materials-cell),
body.live-dash-night .dashboard-table .app-num {
  color: var(--ld-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

body.live-dash-night .app-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

/* 金额高亮：覆盖通用 .app-num，汇总与分类一致 */
body.live-dash-night .live-dash-overview__achieved,
body.live-dash-night .live-dash-overview__achieved.app-num,
body.live-dash-night .live-dash-goal__achieved,
body.live-dash-night .live-dash-goal__achieved.app-num,
body.live-dash-night .live-dash-goal__metrics .app-num {
  color: var(--ld-amount);
}

body.live-dash-night .live-dash-goal-child td {
  background: transparent;
}

@media (min-width: 768px) {
  body.live-dash-night .live-dash-overview__achieved {
    font-size: 1.75rem;
  }

  body.live-dash-night .live-dash-overview__value {
    font-size: 1.4rem;
  }

  body.live-dash-night .live-dash-goal__thumb-wrap {
    width: 1.5rem;
    height: 1.5rem;
  }

  body.live-dash-night .live-dash-goal__achieved,
  body.live-dash-night .live-dash-goal__metrics .app-num {
    font-size: 1.35rem;
  }
}


/* —— 接口配置：折叠头布局（样式交给 Sneat accordion） —— */
.integrations-acc__btn {
  gap: 0.75rem;
}

.integrations-acc__btn::after {
  margin-left: 0.5rem;
}

.integrations-acc__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  border-radius: 0.375rem;
  background: rgba(var(--bs-primary-rgb), 0.08);
  color: var(--bs-primary);
}

.integrations-acc__title {
  font-weight: 600;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.integrations-acc__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  margin-left: auto;
}

.shop-channel-fields {
  background: rgba(var(--bs-primary-rgb), 0.04);
}

.shop-channel-override summary {
  user-select: none;
}

.aftersale-toolbar-wrap {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.aftersale-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.aftersale-status-group {
  flex: 0 0 auto;
}

.aftersale-shop,
.aftersale-type {
  width: auto;
  min-width: 9rem;
  max-width: 14rem;
}

.aftersale-search {
  flex: 1 1 12rem;
  min-width: 10rem;
  max-width: 22rem;
}

.aftersale-table-wrap {
  overflow-x: auto;
}

.aftersale-table {
  min-width: 52rem;
}

.aftersale-table td {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.aftersale-ticket-col {
  min-width: 12rem;
  max-width: 16rem;
}

.aftersale-remark-col {
  min-width: 9rem;
  max-width: 14rem;
}

.aftersale-product-cell {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  min-width: 0;
}

.aftersale-product {
  max-width: 16rem;
}

.aftersale-copy-target {
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: inherit;
  cursor: copy;
  text-decoration: none;
  vertical-align: baseline;
}

.aftersale-copy-target:hover,
.aftersale-copy-target:focus-visible {
  color: var(--bs-primary);
  text-decoration: underline dotted;
  outline: none;
}

.aftersale-copy-target.fw-medium {
  font-weight: 600;
}

.aftersale-thumb {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: cover;
  border-radius: var(--bs-border-radius);
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  flex-shrink: 0;
}

.aftersale-thumb--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-secondary-color);
  font-size: 1.125rem;
}

.aftersale-remark-cell {
  max-width: 11rem;
}

.aftersale-table .app-num,
.aftersale-card-shell .app-num {
  font-variant-numeric: tabular-nums;
}

.aftersale-remark-item + .aftersale-remark-item {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--bs-border-color);
}

.aftersale-logistics {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--bs-border-color);
}

.aftersale-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.15rem 1.25rem;
}

.aftersale-cards .aftersale-card {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  padding: 1.15rem 1.25rem 1.35rem;
  background: var(--bs-body-bg);
}

.aftersale-card__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.aftersale-card__product {
  margin-bottom: 0.85rem;
}

.aftersale-card__meta {
  font-size: 0.875rem;
  margin-bottom: 0.85rem;
  line-height: 1.6;
}

.aftersale-card__meta > div + div {
  margin-top: 0.5rem;
}

.aftersale-card__actions {
  display: flex;
  gap: 0.65rem;
  padding-top: 0.15rem;
}

@media (max-width: 991.98px) {
  .aftersale-card-shell {
    border: 0;
    box-shadow: none !important;
    background: transparent;
  }

  .aftersale-card-shell > .card-header,
  .aftersale-card-shell > .aftersale-toolbar-wrap {
    padding-left: 0;
    padding-right: 0;
  }

  .aftersale-card-shell > .aftersale-toolbar-wrap {
    background: transparent;
    border-bottom: 0 !important;
  }

  .aftersale-toolbar {
    align-items: stretch;
  }

  .aftersale-status-group,
  .aftersale-shop,
  .aftersale-type,
  .aftersale-search {
    width: 100%;
    max-width: none;
  }

  .aftersale-status-group .btn {
    flex: 1 1 auto;
  }

  .aftersale-product {
    max-width: none;
  }
}

/* 表单校验：无错误时不占位 */
.validation-summary-valid[data-valmsg-summary="true"] {
  display: none;
}

/* Sneat 侧栏：app-brand 作为折叠钮定位参照 */
.menu .app-brand {
  position: relative;
}

@media (max-width: 1199.98px) {
  /* 移动端仅保留顶栏 ☰；不显示 « / »，侧栏内也不显示关闭钮 */
  .app-menu-toggle-wrap .app-menu-toggle-icon {
    display: none !important;
  }

  .layout-menu .app-brand .layout-menu-toggle {
    display: none !important;
  }
}

@media (min-width: 1200px) {
  /* 桌面端不用 Sneat 侧栏边缘圆形钮，改由顶栏 « / » 控制 */
  .layout-menu .app-brand .layout-menu-toggle {
    display: none !important;
  }

  /* 顶栏展开/收起按钮 */
  .app-menu-toggle-wrap .app-menu-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-inline-size: 2.25rem;
    min-block-size: 2.25rem;
    border-radius: var(--bs-border-radius);
    color: var(--bs-body-color);
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  .app-menu-toggle-wrap .app-menu-toggle-btn:hover,
  .app-menu-toggle-wrap .app-menu-toggle-btn:focus-visible {
    background-color: rgba(var(--bs-primary-rgb), 0.08);
    color: var(--bs-primary);
  }

  .app-menu-toggle-wrap .app-menu-toggle-icon {
    line-height: 1;
  }

  html.app-menu-is-collapsed .layout-navbar .app-menu-toggle-wrap .app-menu-toggle-btn {
    color: var(--bs-primary);
  }

  /* 收起态：裁切菜单头 Sneat 为分组留的透明延伸区，避免 hover 误判到内容区 */
  html.layout-menu-collapsed:not(.layout-menu-hover) #layout-menu.layout-menu.menu-vertical {
    inline-size: var(--bs-menu-collapsed-width);
    max-inline-size: var(--bs-menu-collapsed-width);
    overflow: hidden;
  }

  html.layout-menu-collapsed:not(.layout-menu-hover) #layout-menu .menu-header,
  html.layout-menu-collapsed:not(.layout-menu-hover) #layout-menu .menu-block {
    pointer-events: none;
  }

  html.layout-menu-collapsed.layout-menu-hover #layout-menu.layout-menu.menu-vertical {
    overflow: visible;
    z-index: 1101;
  }

  /* 收起后悬停：临时展开显示菜单名（Sneat layout-menu-hover） */
  html.layout-menu-collapsed.layout-menu-hover .layout-menu.menu-vertical,
  html.layout-menu-collapsed.layout-menu-hover .layout-menu .menu-vertical {
    inline-size: var(--bs-menu-width);
    box-shadow: 0 0.25rem 1rem rgba(34, 48, 62, 0.12);
  }

  html.layout-menu-collapsed.layout-menu-hover .layout-menu .menu-inner > .menu-item div:not(.menu-block),
  html.layout-menu-collapsed.layout-menu-hover .layout-menu .menu-inner > .menu-header .menu-header-text {
    opacity: 1;
  }
}
.layout-content-navbar .stock-table--inventory {
  --stock-sticky-top: 0;
}

.layout-navbar .avatar-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  height: 2.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
}
