/*
 * 明暗策略（全局 token，禁止逐页写 dark 特例）：
 * - 业务/壳层样式只用 --bs-* / --app-*（--app-* 绑定到 --bs-*）
 * - 暗色整页对齐 demo-1：只改 html[data-bs-theme=dark] 变量，不改各模块选择器
 * 参考：https://demos.themeselection.com/sneat-bootstrap-html-laravel-admin-template/demo-1/
 */
:root {
  --app-primary: #1a56db;
  --app-primary-dark: #1344b5;
  /* 跟随 Sneat 纸面/正文 token，切换 data-bs-theme 时全站自动变 */
  --app-bg: var(--bs-body-bg);
  --app-surface: var(--bs-paper-bg);
  --app-border: var(--bs-border-color);
  --app-text-muted: var(--bs-secondary-color);
  --app-num-color: var(--bs-heading-color);
  --app-num-muted: var(--bs-secondary-color);
  /* 数字区字体：跟随 Sneat Public Sans，中文回退系统黑体（勿用此变量盖 body） */
  --app-font: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --app-num-font: var(--app-font);
}

/*
 * Free core.css 的 dark 只改了 Bootstrap body 灰系，未改 --bs-paper-bg / menu / gray 阶，
 * 侧栏/顶栏/卡片仍白。此处用 demo-1 Pro 暗色 token 整表覆盖（加载在 core.css 之后）。
 */
[data-bs-theme="dark"] {
  color-scheme: dark;

  --bs-body-color: #b2b2c4;
  --bs-body-color-rgb: 178, 178, 196;
  --bs-body-bg: #232333;
  --bs-body-bg-rgb: 35, 35, 51;
  --bs-emphasis-color: #fff;
  --bs-emphasis-color-rgb: 255, 255, 255;
  --bs-secondary-color: #7e7f96;
  --bs-secondary-color-rgb: 126, 127, 150;
  --bs-secondary-bg: #4e4f6c;
  --bs-secondary-bg-rgb: 78, 79, 108;
  --bs-tertiary-color: rgba(178, 178, 196, 0.5);
  --bs-tertiary-color-rgb: 178, 178, 196;
  --bs-tertiary-bg: #464764;
  --bs-tertiary-bg-rgb: 70, 71, 100;

  --bs-primary-text-emphasis: #a5a7ff;
  --bs-secondary-text-emphasis: #b6bec8;
  --bs-success-text-emphasis: #aaeb87;
  --bs-info-text-emphasis: #68dbf4;
  --bs-warning-text-emphasis: #ffcd66;
  --bs-danger-text-emphasis: #ff8b77;
  --bs-light-text-emphasis: #b2b2c4;
  --bs-dark-text-emphasis: #e6e6f1;
  --bs-primary-bg-subtle: #35365f;
  --bs-secondary-bg-subtle: #393c50;
  --bs-success-bg-subtle: #36483f;
  --bs-info-bg-subtle: #25445c;
  --bs-warning-bg-subtle: #4d4036;
  --bs-danger-bg-subtle: #4d2f3a;
  --bs-light-bg-subtle: #303145;
  --bs-dark-bg-subtle: #35364f;
  --bs-primary-border-subtle: #454682;
  --bs-secondary-border-subtle: #4b4f6c;
  --bs-success-border-subtle: #466152;
  --bs-info-border-subtle: #2c5b7d;
  --bs-warning-border-subtle: #695544;
  --bs-danger-border-subtle: #693b4b;
  --bs-light-border-subtle: #3d3e5b;
  --bs-dark-border-subtle: #45466a;

  --bs-heading-color: #d5d5e2;
  --bs-link-color: #a5a7ff;
  --bs-link-hover-color: #aeb0ff;
  --bs-link-color-rgb: 165, 167, 255;
  --bs-link-hover-color-rgb: 174, 176, 255;
  --bs-code-color: #f18bba;
  --bs-highlight-color: #b2b2c4;
  --bs-highlight-bg: #664400;
  --bs-border-color: #4e4f6c;
  --bs-border-color-translucent: rgba(255, 255, 255, 0.15);
  --bs-form-valid-color: #71dd37;
  --bs-form-valid-border-color: #71dd37;
  --bs-form-invalid-color: #ff3e1d;
  --bs-form-invalid-border-color: #ff3e1d;

  --bs-gray-25: #38394c;
  --bs-gray-60: #434463;
  --bs-gray-80: #474866;
  --bs-gray-100: #4a4b69;
  --bs-gray-200: #4e4f6c;
  --bs-gray-300: #6d6e87;
  --bs-gray-400: #7e7f96;
  --bs-gray-500: #8f90a5;
  --bs-gray-600: #a1a1b5;
  --bs-gray-700: #b2b2c4;
  --bs-gray-800: #c3c4d3;
  --bs-gray-900: #d5d5e2;
  --bs-light: #494a5d;
  --bs-light-rgb: 73, 74, 93;
  --bs-dark: #6b6c9d;
  --bs-dark-rgb: 107, 108, 157;
  --bs-gray: #8f90a5;
  --bs-gray-rgb: 143, 144, 165;
  --bs-light-contrast: var(--bs-white);
  --bs-gray-contrast: var(--bs-white);
  --bs-bg-label-tint-amount: 84%;
  --bs-border-subtle-amount: 76%;

  --bs-base-color: #e6e6f1;
  --bs-base-color-rgb: 230, 230, 241;
  --bs-paper-bg: #2b2c40;
  --bs-paper-bg-rgb: 43, 44, 64;
  --bs-box-shadow: 0 0.1875rem 0.5rem 0 rgba(20, 20, 29, 0.22);
  --bs-box-shadow-xs: 0 0.0625rem 0.3175rem 0 rgba(20, 20, 29, 0.18);
  --bs-box-shadow-sm: 0 0.125rem 0.375rem 0 rgba(20, 20, 29, 0.2);
  --bs-box-shadow-lg: 0 0.25rem 0.75rem 0 rgba(20, 20, 29, 0.24);
  --bs-box-shadow-xl: 0 0.3125rem 1.375rem 0 rgba(20, 20, 29, 0.26);
  --bs-floating-component-shadow: 0 0.1875rem 0.5rem 0 rgba(20, 20, 29, 0.22);

  --bs-navbar-bg: var(--bs-paper-bg);
  --bs-navbar-box-shadow: 0 0 10px #4e4f6c;
  --bs-navbar-border-color: var(--bs-paper-bg);
  --bs-navbar-color: #d5d5e2;
  --bs-navbar-hover-color: rgba(255, 255, 255, 0.75);
  --bs-navbar-disabled-color: rgba(255, 255, 255, 0.25);
  --bs-navbar-active-color: #fff;
  --bs-navbar-brand-color: #fff;
  --bs-navbar-brand-hover-color: #fff;
  --bs-nav-border-color: #4e4f6c;

  --bs-menu-bg: #2b2c40;
  --bs-menu-bg-rgb: var(--bs-paper-bg-rgb);
  --bs-menu-color: #b2b2c4;
  --bs-menu-color-rgb: 178, 178, 196;
  --bs-menu-hover-bg: rgba(230, 230, 241, 0.06);
  --bs-menu-hover-color: #b2b2c4;
  --bs-menu-active-bg: var(--bs-primary-bg-subtle);
  --bs-menu-active-color: var(--bs-primary);
  --bs-menu-active-toggle-bg: rgba(230, 230, 241, 0.08);
  --bs-menu-sub-active-bg: var(--bs-primary-bg-subtle);
  --bs-menu-sub-active-color: var(--bs-primary);
  --bs-menu-horizontal-active-bg: var(--bs-menu-bg);
  --bs-menu-box-shadow: 0 0.125rem 0.375rem 0 rgba(20, 20, 29, 0.2);
  --bs-menu-divider-color: transparent;

  --bs-card-bg: var(--bs-paper-bg);
  --bs-dropdown-bg: var(--bs-paper-bg);
  --bs-modal-bg: var(--bs-paper-bg);
  --bs-offcanvas-bg: var(--bs-paper-bg);
  --bs-toast-bg: var(--bs-paper-bg-rgb);
  --bs-accordion-bg: var(--bs-paper-bg);
  --bs-accordion-border-color: #4e4f6c;
  --bs-list-group-bg: var(--bs-paper-bg);
  --bs-list-group-color: var(--bs-heading-color);
  --bs-popover-bg: var(--bs-paper-bg);
  --bs-popover-header-bg: var(--bs-paper-bg);
  --bs-tooltip-color: var(--bs-paper-bg);
  --bs-tooltip-bg: var(--bs-base-color);

  --bs-table-color: var(--bs-heading-color);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--bs-border-color);
  --bs-table-striped-bg: rgba(var(--bs-base-color-rgb), 0.06);
  --bs-table-striped-color: var(--bs-table-color);
  --bs-table-hover-bg: rgba(var(--bs-body-bg-rgb), 0.75);
  --bs-table-hover-color: var(--bs-table-color);
  --bs-table-active-bg: rgba(var(--bs-body-bg-rgb), 0.75);
  --bs-table-active-color: var(--bs-table-color);

  --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%);
}

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

/* 数字排版：对齐 Sneat（比例数字，不用 tabular-nums）；千分位格式仍用 N0；颜色走 --app-num-* */
.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: normal;
  font-feature-settings: normal;
  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: normal;
  font-feature-settings: normal;
}

/* Invoice/List 风格 KPI 条：大屏竖分割线，小屏去竖线改底部分割 */
@media (max-width: 991.98px) {
  .biz-dash-kpi [class*="card-widget"].border-end {
    border-inline-end: none !important;
    border-block-end: 1px solid var(--bs-border-color);
  }

  .biz-dash-kpi .col-6:nth-last-child(-n + 2) [class*="card-widget"].border-end,
  .biz-dash-kpi .col-6:last-child > .d-flex {
    border-block-end: none;
  }
}

.biz-dash-kpi h4 {
  line-height: 1.375;
  color: var(--bs-heading-color);
  font-variant-numeric: normal;
  font-feature-settings: normal;
}

.biz-dash-kpi p {
  margin: 0;
  color: var(--bs-secondary-color);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.biz-dash-kpi__compare {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  line-height: 1.375;
  color: var(--bs-secondary-color);
}

.biz-dash-table thead th {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--bs-secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 0.875rem 1.25rem;
  background: transparent;
  border-bottom-width: 1px;
  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: 400;
  line-height: 1.5;
  color: var(--bs-heading-color);
  font-variant-numeric: normal;
  font-feature-settings: normal;
}

.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.125rem;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--bs-secondary-color);
  line-height: 1.375;
  white-space: nowrap;
  font-variant-numeric: normal;
  font-feature-settings: normal;
}

.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: 0.9375rem;
  font-weight: 500;
}

.biz-dash-shops-card .card-datatable {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.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(5) {
  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-wo {
  width: 3.5rem;
}

.stock-table--inventory.is-risk-omit-filter col.stock-col-wo {
  width: 6.25rem;
}

.stock-table--inventory .stock-table__th--wo,
.stock-table--inventory td.stock-wo-cell {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
  text-align: center;
  overflow: visible;
}

.stock-table--inventory.is-risk-omit-filter td.stock-wo-cell {
  min-width: 6.25rem;
}

.stock-wo-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.stock-wo-actions .wo-trigger {
  flex-shrink: 0;
}

.stock-risk-omit-exclude-btn {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  color: var(--app-text-muted, var(--bs-secondary-color));
  text-decoration: none !important;
}

.stock-risk-omit-exclude-btn:hover,
.stock-risk-omit-exclude-btn:focus-visible {
  color: var(--bs-primary);
}

.stock-risk-omit-exclude-btn.is-excluded {
  color: var(--bs-warning);
}

.stock-risk-omit-exclude-btn .icon-base {
  font-size: 1rem;
}

.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: normal;
}

/* 累计可订：主色强调，不另起列底色 */
.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-modal .modal-dialog {
  max-width: 44rem;
}

.stock-bom-peer-table {
  --stock-peer-col-num: 5.75rem;
  table-layout: fixed;
  width: 100%;
}

.stock-bom-peer-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bs-secondary-bg-subtle);
  white-space: nowrap;
  font-weight: 500;
}

.stock-bom-peer-table thead th:first-child {
  width: auto;
}

.stock-bom-peer-table thead th.text-end {
  width: var(--stock-peer-col-num);
}

.stock-bom-peer-table td {
  vertical-align: middle;
}

.stock-bom-peer-name {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--bs-heading-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stock-bom-peer-table .stock-goods-no-copy {
  margin-top: 0.15rem;
}

.stock-bom-peer-table td.text-end {
  font-size: 0.8125rem;
}

.stock-bom-peer-table td.is-order {
  color: var(--bs-primary);
  font-weight: 500;
}

.stock-bom-peer-table td.is-empty {
  color: var(--bs-secondary-color);
  font-weight: 400;
}

.stock-bom-peer-empty {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--bs-secondary-color);
}

@media (max-width: 575.98px) {
  #stock-bom-peer-modal .modal-dialog {
    max-width: calc(100% - 1.5rem);
    margin-left: 0.75rem;
    margin-right: 0.75rem;
  }

  .stock-bom-peer-table {
    --stock-peer-col-num: 4.5rem;
    min-width: 32rem;
  }
}

.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-merged {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  max-width: 100%;
}

.stock-shelf-cell .stock-shelf-merged__status {
  gap: 0.32rem;
  align-items: center;
  padding: 0;
  border-radius: 0;
  cursor: default;
}

.stock-shelf-cell .stock-shelf-merged__value {
  font-size: inherit;
  font-weight: 500;
  color: var(--bs-primary);
  letter-spacing: normal;
}

.stock-shelf-cell .stock-wechat-status--empty .stock-shelf-merged__value,
.stock-shelf-cell .stock-wechat-status--off .stock-shelf-merged__value {
  color: var(--bs-secondary-color);
  font-weight: 400;
}

.stock-shelf-cell .stock-wechat-status--on .stock-shelf-merged__value {
  color: var(--bs-primary);
}

.stock-shelf-cell .stock-shelf-merged__status:hover,
.stock-shelf-cell .stock-shelf-merged__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-order-merged {
  display: inline-block;
  cursor: default;
}

.stock-wechat-pop--shelf .stock-wechat-pop__row + .stock-wechat-pop__title {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
}

.stock-wechat-pop--shelf .stock-wechat-pop__title .bx-book-heart {
  color: #ff2442;
}

.stock-wechat-pop--order .stock-wechat-pop__title {
  border-bottom-color: var(--bs-border-color);
}

.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:hover .stock-shelf-edit-btn,
.stock-shelf-cell .stock-wechat-status:focus-within .stock-shelf-edit-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-shelf-cell .stock-shelf-edit-btn {
  margin-left: 0.15rem;
}

@media (max-width: 767.98px) {
  .stock-shelf-cell .stock-shelf-edit-btn {
    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-shelf-rebuild-index.is-loading {
  pointer-events: none;
  opacity: 0.65;
}

/* 重建索引：透明拦截层 + 居中提示，不遮挡阅读页面内容 */
.stock-rebuild-busy {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: transparent;
  cursor: wait;
}

.stock-rebuild-busy.is-visible {
  display: flex;
}

body.stock-rebuild-busy-open {
  overflow: hidden;
}

.stock-rebuild-busy__panel {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  max-width: min(92vw, 26rem);
  padding: 1.25rem 1.35rem;
  border-radius: 0.75rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-paper-bg, var(--bs-body-bg));
  color: var(--bs-body-color);
  box-shadow: 0 0.5rem 1.75rem rgba(15, 23, 42, 0.22);
  cursor: default;
}

.stock-rebuild-busy__spinner {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.1rem;
}

.stock-rebuild-busy__title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.stock-rebuild-busy__desc {
  font-size: 0.8125rem;
  line-height: 1.5;
}

@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 inprod order"
      "shelf shelf 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-in-production-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-in-production-cell { grid-area: inprod; }
  .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-in-production-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-in-production-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-shelf-merged {
    justify-content: flex-start;
  }

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

  .stock-shelf-cell .stock-shelf-merged__value {
    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 inprod order"
      "shelf shelf 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-in-production-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-in-production-cell { grid-area: inprod; }
  .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-in-production-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;
}

/* 卡片内空态：对齐 Sneat 信息层级（非 Misc 全页） */
.app-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--bs-secondary-color);
  padding-block: 2.5rem;
  padding-inline: 1rem;
}

.app-empty-state__icon {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 2.75rem;
  line-height: 1;
  color: var(--bs-secondary-color);
  opacity: 0.72;
}

.app-empty-state__title {
  margin-bottom: 0.35rem;
}

.app-empty-state__desc {
  max-width: 22rem;
}

.app-empty-state + .btn {
  margin-top: 1rem;
}

.live-lineup-empty .app-empty-state {
  padding-bottom: 0;
}

.live-lineup-empty .app-empty-state + .text-center {
  padding-bottom: 2.5rem;
}

.live-lineup-empty .app-empty-state + .text-center .btn {
  margin-top: 1rem;
}

.dashboard-analytics-table > :not(caption) > * > * {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

/* 直播场次：手机卡片 */
.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: normal;
  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;
}

.live-dash-mix {
  min-width: 9.5rem;
  max-width: 16rem;
  white-space: normal;
}

.dashboard-analytics-mix {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  width: 14rem;
  min-width: 14rem;
  max-width: 14rem;
  white-space: nowrap;
  text-align: end;
}

.dashboard-analytics-mix__meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
  width: 100%;
}

.dashboard-analytics-mix__side {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.dashboard-analytics-mix__bar {
  width: 100%;
  flex: 0 0 auto;
}

.dashboard-analytics-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
}

@media (min-width: 992px) {
  .dashboard-analytics-kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.dashboard-analytics-kpi {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dashboard-analytics-kpi__value,
.dashboard-analytics-kpi__value.app-num {
  font-family: "Public Sans", var(--bs-font-sans-serif);
  font-variant-numeric: normal;
  font-feature-settings: normal;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--bs-heading-color);
}

.dashboard-analytics-kpi__label {
  color: var(--bs-secondary-color);
  font-size: 0.8125rem;
  line-height: 1.3;
  margin-top: 0.25rem;
}

.live-dash-mix__bar {
  display: flex;
  height: 0.375rem;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bs-secondary-bg);
  margin-top: 0.3rem;
}

.live-dash-mix__seg {
  display: block;
  height: 100%;
}

.live-dash-mix__seg--old {
  background: #8592a3;
}

.live-dash-mix__seg--new {
  background: var(--bs-success);
}

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

/* 排品归属：填写 + 下拉选择并存 */
.live-lineup-cat .btn.dropdown-toggle {
  min-width: 2.25rem;
}

.live-lineup-cat .dropdown-toggle::after {
  margin-left: 0;
}

.live-lineup-cat__menu {
  max-height: 16rem;
  overflow-y: auto;
}

.live-setup-cat {
  min-width: 8.5rem;
}

/* 排品中间分栏：取消定高，用内边距留白 */
#live-setup-root .live-setup-split {
  padding-block: 0.5rem 1.25rem;
}

@media (min-width: 992px) {
  .live-setup-split > [data-setup-pane="cat"] {
    flex: 0 0 24.69135802%;
    max-width: 24.69135802%;
    width: 24.69135802%;
    border-right: 1px solid var(--bs-border-color);
    padding-right: 1.25rem;
  }

  .live-setup-split > [data-setup-pane="lineup"] {
    flex: 0 0 75.30864198%;
    max-width: 75.30864198%;
    width: 75.30864198%;
  }
}

/* 本场分类：选中/悬停对齐侧栏 menu 的底色与文字色 */
.live-setup-cat-sortable.list-group {
  --bs-list-group-bg: transparent;
  --bs-list-group-border-radius: var(--bs-border-radius);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.live-setup-cat-sortable > .list-group-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 0.9rem;
  margin: 0 !important;
  border: 0 !important;
  border-radius: var(--bs-border-radius) !important;
  background-color: transparent;
  box-shadow: none;
  color: var(--bs-heading-color);
  cursor: pointer;
}

.live-setup-cat-sortable > .list-group-item + .list-group-item {
  border-top-width: 0 !important;
}

.live-setup-cat-sortable > .list-group-item:hover:not(.is-active),
.live-setup-cat-sortable > .list-group-item:focus-within:not(.is-active) {
  background-color: var(--bs-menu-hover-bg);
  color: var(--bs-menu-hover-color);
}

.live-setup-cat-sortable > .list-group-item.is-active {
  background-color: var(--bs-menu-active-bg);
  color: var(--bs-menu-active-color);
}

.live-setup-cat-sortable > .list-group-item.is-active:hover,
.live-setup-cat-sortable > .list-group-item.is-active:focus-within {
  background-color: var(--bs-menu-active-bg);
  color: var(--bs-menu-active-color);
}

.live-setup-cat-sortable .drag-handle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-secondary-color);
  line-height: 1;
  vertical-align: middle;
  cursor: move !important;
}

.live-setup-cat-sortable > .list-group-item:hover:not(.is-active) .drag-handle,
.live-setup-cat-sortable > .list-group-item:focus-within:not(.is-active) .drag-handle {
  color: var(--bs-menu-hover-color);
}

.live-setup-cat-sortable > .list-group-item.is-active .drag-handle {
  color: var(--bs-menu-active-color);
}

.live-setup-cat-sortable .live-setup-cat-chosen,
.live-setup-cat-sortable .live-setup-cat-drag,
.live-setup-cat-sortable .live-setup-cat-ghost,
.live-setup-cat-fallback {
  cursor: move !important;
}

body.live-setup-cat-sorting,
body.live-setup-cat-sorting * {
  cursor: move !important;
}

.live-setup-cat-item__main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  cursor: pointer;
  line-height: 1.4;
}

.live-setup-cat-item:hover:not(.is-active) .live-setup-cat-item__name,
.live-setup-cat-item:focus-within:not(.is-active) .live-setup-cat-item__name {
  color: var(--bs-menu-hover-color);
}

.live-setup-cat-item__body {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  width: 100%;
}

.live-setup-cat-item__name {
  font-weight: 400;
  color: var(--bs-heading-color);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

.live-setup-cat-item__amount {
  flex-shrink: 0;
  color: var(--bs-warning);
  font-weight: 500;
  line-height: 1.4;
}

.live-setup-cat-item.is-active .live-setup-cat-item__name {
  color: var(--bs-menu-active-color);
}

.live-setup-cat-item__ops {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.125rem;
}

.live-setup-row-hide {
  display: none !important;
}

/* 底边按「最后可见行」去掉，避免筛选隐藏后横线忽有忽无 */
#live-lineup-table tbody.table-border-bottom-0 > tr:last-child > td {
  border-block-end-width: var(--bs-border-width);
}

#live-lineup-table tbody > tr.is-last-visible > td {
  border-block-end-width: 0;
}

#live-lineup-table {
  width: 100%;
  table-layout: auto;
}

#live-lineup-table .live-lineup-col-seq {
  width: 2.55rem;
  min-width: 2.55rem;
  text-align: center;
  padding-left: 0.2rem;
  padding-right: 0.2rem;
  white-space: nowrap;
}

#live-lineup-table .live-lineup-col-cat {
  width: 1%;
  white-space: nowrap;
}

#live-lineup-table .live-lineup-col-goods {
  width: 99%;
  min-width: 0;
  max-width: 0;
  overflow: hidden;
}

#live-lineup-table .live-lineup-col-goods > div {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

#live-lineup-table .live-lineup-col-goods .fw-medium,
#live-lineup-table .live-lineup-col-goods .prod-goods-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#live-lineup-table .live-lineup-col-num {
  width: 6.3rem;
  min-width: 6.3rem;
  text-align: right;
  white-space: nowrap;
}

#live-lineup-table .live-lineup-col-target {
  width: 6.3rem;
  min-width: 6.3rem;
  text-align: center;
  white-space: nowrap;
}

#live-lineup-table .live-lineup-col-ops {
  width: 2.75rem;
  min-width: 2.75rem;
  white-space: nowrap;
}

#live-lineup-table [data-lineup-remove]:hover,
#live-lineup-table [data-lineup-remove]:focus-visible,
#live-lineup-table [data-lineup-remove]:active {
  color: var(--bs-white);
  background-color: var(--bs-secondary);
  border-color: var(--bs-secondary);
}

#live-lineup-table .live-lineup-seq {
  width: 1.95rem;
  min-width: 1.95rem;
  padding-inline: 0.2rem;
  margin: 0 auto;
  text-align: center;
  appearance: textfield;
}

#live-lineup-table .live-lineup-seq::-webkit-outer-spin-button,
#live-lineup-table .live-lineup-seq::-webkit-inner-spin-button,
#live-lineup-table .live-lineup-target::-webkit-outer-spin-button,
#live-lineup-table .live-lineup-target::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
  margin: 0;
}

#live-lineup-table .live-lineup-category {
  position: absolute;
}

.live-lineup-cat-edit {
  position: relative;
  display: inline-block;
}

button.live-lineup-cat-tag {
  border: 0;
  display: inline-block;
  max-width: none;
  white-space: nowrap;
  cursor: pointer;
}

.live-lineup-cat-edit .dropdown-menu {
  min-width: 8rem;
  max-height: 16rem;
  overflow-y: auto;
}

.live-lineup-targets {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

#live-lineup-table .live-lineup-target {
  width: 100%;
  min-width: 0;
  padding-inline: 0.35rem;
  margin-inline: auto;
  text-align: center;
  appearance: textfield;
}

#live-lineup-table .live-lineup-target::placeholder {
  text-align: center;
}

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

.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: normal;
  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: normal;
}

.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: var(--bs-body-bg);
}

.live-dash-goal-child td {
  background: var(--bs-body-bg);
}

/* 直播看板夜间模式（仅 Board 页：body.live-dash-night） */
body.live-dash-night {
  --ld-bg: #0e1218;
  --ld-surface: #171c26;
  --ld-surface-2: #1e2532;
  --ld-border: #2a3344;
  /* 正文/数字偏雾灰，避免纯白刺眼 */
  --ld-text: #a6afbd;
  --ld-muted: #7a8496;
  --ld-num: #b0b8c6;
  --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);
  /* 盖住 Sneat/Bootstrap 暗色下的近白 heading，避免 .app-num 等发白 */
  --bs-body-color: var(--ld-text);
  --bs-heading-color: var(--ld-text);
  --bs-secondary-color: var(--ld-muted);
  --app-num-color: var(--ld-num);
  --app-num-muted: var(--ld-muted);
  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 {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  background: transparent;
  border: none;
  padding: 0.15rem 0 0.35rem;
  margin-bottom: 0.65rem !important;
}

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

body.live-dash-night .live-dash-toolbar__row--meta {
  flex: 1 1 auto;
}

body.live-dash-night .live-dash-toolbar__row--actions {
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

body.live-dash-night .live-dash-toolbar__row--actions::-webkit-scrollbar {
  display: none;
}

body.live-dash-night .live-dash-toolbar__row--actions .live-dash-channel {
  flex: 0 0 auto;
}

body.live-dash-night .live-dash-toolbar__row--actions #live-dash-refresh {
  flex: 0 0 auto;
  margin-left: auto;
}

body.live-dash-night .live-dash-toolbar__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  min-width: 0;
  flex: 1 1 auto;
}

@media (min-width: 768px) {
  body.live-dash-night .live-dash-toolbar {
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
  }

  body.live-dash-night .live-dash-toolbar__row--meta {
    min-width: 0;
    flex: 1 1 auto;
  }

  body.live-dash-night .live-dash-toolbar__row--actions {
    flex: 0 0 auto;
    margin-left: auto;
    overflow: visible;
  }

  body.live-dash-night .live-dash-toolbar__row--actions #live-dash-refresh {
    margin-left: 0;
  }

  body.live-dash-night .live-dash-toolbar__meta {
    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: normal;
  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: #06120c;
  border-color: var(--ld-accent-soft);
  background: var(--ld-accent-soft);
  font-weight: 600;
}

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

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: normal;
}

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: normal;
  font-feature-settings: normal;
}

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

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: normal;
  font-feature-settings: normal;
  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: normal;
  font-feature-settings: normal;
}

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

/* 移动端：标题占满一行，销量/金额靠右下角对齐 */
@media (max-width: 767.98px) {
  body.live-dash-night .live-dash-goal__body .table-responsive {
    overflow-x: visible;
  }

  body.live-dash-night .live-dash-detail-table {
    table-layout: auto;
  }

  body.live-dash-night .live-dash-detail-table thead {
    display: none;
  }

  body.live-dash-night .live-dash-detail-table,
  body.live-dash-night .live-dash-detail-table tbody,
  body.live-dash-night .live-dash-detail-table tr {
    display: block;
    width: 100%;
  }

  body.live-dash-night .live-dash-detail-table tbody tr {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.35rem 0.65rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--ld-border, rgba(255, 255, 255, 0.08));
  }

  body.live-dash-night .live-dash-detail-table tbody td {
    border: 0 !important;
    padding: 0 !important;
    width: auto !important;
    text-align: start !important;
    vertical-align: top;
  }

  body.live-dash-night .live-dash-detail-table tbody td.live-dash-detail__product-col {
    display: block;
    flex: 1 0 100%;
    width: 100% !important;
    order: 1;
    margin-bottom: 0.15rem;
  }

  /* 更换：与数值同一行，靠左 */
  body.live-dash-night .live-dash-detail-table tbody td.live-dash-detail__action-col {
    position: static;
    order: 2;
    width: auto !important;
    margin-right: auto;
    text-align: start !important;
  }

  body.live-dash-night .live-dash-detail-table tbody td.live-dash-detail__num {
    display: inline-block;
    order: 3;
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.35;
    white-space: nowrap;
    text-align: end !important;
  }

  body.live-dash-night .live-dash-detail-table tbody td.live-dash-detail__num::before {
    content: attr(data-label);
    margin-right: 0.3rem;
    color: var(--ld-muted, #8b93a7);
    font-size: 0.75rem;
  }

  body.live-dash-night .live-dash-detail-table tbody .live-dash-detail__move {
    opacity: 0.7;
  }

  body.live-dash-night .live-dash-detail__title {
    -webkit-line-clamp: 1;
  }
}

body.live-dash-night .live-dash-detail__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
  color: #a8b2c2;
  font-weight: 500;
}

.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: #7a8496;
}

/* 明细表：紧凑「更换类别」 */
.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: var(--ld-text);
}

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: normal;
  font-feature-settings: normal;
}

body.live-dash-night .live-dash-goal__pct {
  font-size: 0.9375rem;
  font-weight: 700;
  font-variant-numeric: normal;
  font-feature-settings: normal;
  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: normal;
  font-feature-settings: normal;
}

body.live-dash-night .app-num {
  font-variant-numeric: normal;
  font-feature-settings: normal;
}

/* 金额高亮：覆盖通用 .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: 0 1 auto;
  min-width: 0;
  text-align: left;
}

.integrations-acc__meta {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--bs-secondary-color);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.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: normal;
}

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

/* 企业微信会话侧边栏（iframe 窄屏） */
.wecom-sidebar {
  max-width: 420px;
  margin: 0 auto;
  padding: 0.75rem 0.875rem 1.25rem;
}

.wecom-sidebar__head {
  margin-bottom: 0.75rem;
}

.wecom-sidebar__head[hidden] {
  display: none !important;
  margin-bottom: 0;
}

.wecom-sidebar__sub {
  font-size: 0.8125rem;
  line-height: 1.4;
}

.wecom-sidebar__alert {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.wecom-sidebar__status {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.wecom-sidebar__loading {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  padding: 0.5rem 0;
}

.wecom-sidebar__card .card-body {
  padding: 0.75rem;
}

.wecom-sidebar__stat-label {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}

.wecom-sidebar__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem 1rem;
}

.wecom-sidebar__stat {
  flex: 0 1 auto;
  min-width: 0;
}

.wecom-sidebar__stat--end {
  text-align: right;
}

.wecom-sidebar__stat--paid .wecom-sidebar__stat-value {
  color: var(--bs-primary);
}

.wecom-sidebar__stat-value {
  font-size: 1rem;
  font-weight: 600;
}

.wecom-sidebar__section {
  margin-bottom: 1rem;
}

.wecom-sidebar__section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
  text-transform: none;
  margin: 0 0 0.5rem;
}

.wecom-sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wecom-sidebar__item {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  padding: 0.5rem 0.625rem;
  background: var(--bs-body-bg);
}

.wecom-sidebar__item-title {
  font-size: 0.875rem;
  font-weight: 500;
}

.wecom-sidebar__item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.wecom-sidebar__item-order {
  min-width: 0;
}

.wecom-sidebar__item-status {
  max-width: 6.5rem;
  text-align: right;
}

.wecom-sidebar__item-actions {
  min-width: 4.5rem;
}

.wecom-sidebar__item-actions .wecom-sidebar__amount {
  line-height: 1.2;
}

.wecom-sidebar__status-badge {
  font-weight: 500;
  max-width: 100%;
}

.wecom-sidebar__status-sep {
  color: var(--bs-secondary-color);
}

.wecom-sidebar__item--action {
  padding: 0.625rem;
}

.wecom-sidebar__dev {
  border-style: dashed;
}

.wecom-sidebar__dev .form-text {
  font-size: 0.75rem;
}

.wecom-sidebar__amount {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--bs-primary);
  line-height: 1.2;
}

.wecom-sidebar__optional-line {
  margin-top: 0.125rem;
  min-width: 0;
}

.wecom-sidebar__address {
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wecom-sidebar__item--action > .d-flex > .min-w-0 {
  overflow: hidden;
}

.wecom-sidebar__item .text-truncate {
  min-width: 0;
}

.wecom-sidebar__product-line {
  color: var(--bs-body-color);
}

.wecom-sidebar__add-bind {
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

.wecom-sidebar__binding-block + .wecom-sidebar__binding-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bs-border-color);
}

.wecom-sidebar__binding-shop {
  color: var(--bs-body-color);
  font-weight: 500;
  line-height: 1.35;
}

.wecom-sidebar__binding-row--sep {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--bs-border-color);
}

.wecom-sidebar__item--clickable {
  cursor: pointer;
}

.wecom-sidebar__item--clickable:hover,
.wecom-sidebar__item--clickable:focus-visible {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 1px rgba(var(--bs-primary-rgb), 0.15);
  outline: none;
}

.wecom-sidebar__detail {
  margin-top: 0.25rem;
}

.wecom-sidebar__detail-head {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.wecom-sidebar__detail-back {
  color: var(--bs-primary);
  text-decoration: none;
}

.wecom-sidebar__detail-title {
  font-size: 0.9375rem;
  font-weight: 600;
}

.wecom-sidebar__detail-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wecom-sidebar__detail-section {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-body-bg);
  padding: 0.625rem 0.75rem;
}

.wecom-sidebar__detail-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
  margin: 0 0 0.5rem;
}

.wecom-sidebar__detail-row + .wecom-sidebar__detail-row {
  margin-top: 0.375rem;
}

.wecom-sidebar__detail-label {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}

.wecom-sidebar__detail-value {
  font-size: 0.8125rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.wecom-sidebar__detail-row + .wecom-sidebar__detail-shipment,
.wecom-sidebar__detail-shipment + .wecom-sidebar__detail-row {
  margin-top: 0.5rem;
}

.wecom-sidebar__detail-shipment {
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-sm);
  background: var(--bs-tertiary-bg);
}

.wecom-sidebar__detail-shipment-title {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
}

.wecom-sidebar__detail-shipment-tracking {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
}

.wecom-sidebar__detail-order-head + .wecom-sidebar__detail-logistics,
.wecom-sidebar__detail-order-head + .wecom-sidebar__detail-row {
  margin-top: 0.5rem;
}

.wecom-sidebar__detail-logistics-recipient + .wecom-sidebar__detail-logistics-address,
.wecom-sidebar__detail-logistics-address + .wecom-sidebar__detail-shipment {
  margin-top: 0.375rem;
}

.wecom-sidebar__detail-logistics + .wecom-sidebar__detail-row {
  margin-top: 0.5rem;
}

.wecom-sidebar__detail-order-shop {
  font-size: 0.8125rem;
  line-height: 1.35;
}

.wecom-sidebar__detail-order-time {
  font-size: 0.75rem;
  line-height: 1.35;
  white-space: nowrap;
}

.wecom-sidebar__detail-goods-list {
  display: flex;
  flex-direction: column;
}

.wecom-sidebar__detail-goods-head {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
  padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.wecom-sidebar__detail-goods-row {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--bs-border-color);
}

.wecom-sidebar__detail-goods-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.wecom-sidebar__detail-goods-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  flex-shrink: 0;
  text-align: right;
  min-width: 3.25rem;
}

.wecom-sidebar__detail-goods-table {
  font-size: 0.8125rem;
}

.wecom-sidebar__detail-goods-table th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
  white-space: nowrap;
}

.wecom-sidebar__detail-goods-name {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.wecom-sidebar__detail-goods-qty {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
}

.wecom-sidebar__detail-goods-price {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  line-height: 1.25;
  white-space: nowrap;
}

.wecom-sidebar__detail-goods {
  border-top: 1px solid var(--bs-border-color);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

.wecom-sidebar__detail-goods:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.wecom-sidebar__detail-goods-title {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
}

.wecom-sidebar__detail-log + .wecom-sidebar__detail-log,
.wecom-sidebar__detail-track + .wecom-sidebar__detail-track {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--bs-border-color);
}

.wecom-sidebar__detail-log-event {
  font-size: 0.8125rem;
}

.wecom-sidebar__detail-details {
  margin: 0;
}

.wecom-sidebar__detail-details-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  list-style: none;
  margin: 0;
  padding: 0;
  user-select: none;
}

.wecom-sidebar__detail-details-summary::-webkit-details-marker {
  display: none;
}

.wecom-sidebar__detail-details-left {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}

.wecom-sidebar__detail-details-icon {
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--bs-secondary-color);
  transition: transform 0.15s ease;
}

.wecom-sidebar__detail-details[open] .wecom-sidebar__detail-details-icon {
  transform: rotate(90deg);
}

.wecom-sidebar__detail-details-title {
  margin: 0;
}

.wecom-sidebar__detail-details-count {
  flex-shrink: 0;
}

.wecom-sidebar__detail-details-body {
  margin-top: 0.5rem;
}

.wecom-sidebar__detail-copy {
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: inherit;
  cursor: copy;
  text-decoration: none;
  word-break: break-all;
}

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

.wecom-sidebar__trade-nick-copy {
  max-width: 100%;
  word-break: break-all;
  white-space: normal;
  text-align: left;
}

.wecom-sidebar__copy-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 1080;
  max-width: min(92vw, 22rem);
  max-height: 40vh;
  overflow: auto;
  padding: 0.5rem 0.75rem;
  border-radius: var(--bs-border-radius);
  background: rgba(38, 43, 67, 0.92);
  color: #fff;
  font-size: 0.8125rem;
  line-height: 1.4;
  pointer-events: none;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: center;
}

.wecom-sidebar__detail-gift {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--bs-border-color);
}

.prod-board-table td details > summary {
  cursor: pointer;
}

.prod-board-bom-l2 {
  padding-inline-start: 1.25rem;
}

.prod-board-bom-l3 {
  padding-inline-start: 2.5rem;
}

.prod-board-mat-panel {
  background: var(--bs-tertiary-bg);
}

.prod-board-kpi .fw-semibold {
  font-size: 1.125rem;
  line-height: 1.3;
}

.prod-board-tree-toggle-slot {
  display: inline-flex;
  width: 1.25rem;
  min-height: 1.5rem;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
}

.prod-board-table td:nth-child(2) > .d-flex,
.prod-board-card__head {
  min-width: 0;
  max-width: 100%;
}

.prod-board-table td:nth-child(2) > .d-flex {
  gap: 0.15rem;
}

.prod-goods {
  min-width: 0;
  flex: 1 1 0%;
  overflow: hidden;
}

.prod-goods-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prod-goods .d-flex .prod-goods-name {
  flex: 1 1 0%;
}

.prod-board-table > thead > tr > th.prod-seq,
.prod-board-table > tbody > tr > td.prod-seq {
  width: 2.15rem;
  min-width: 2.15rem;
  padding-left: 0.5rem;
  padding-right: 0.25rem;
}

.prod-board-table > thead > tr > th:nth-child(2),
.prod-board-table > tbody > tr > td:nth-child(2) {
  width: 23rem;
  max-width: 23rem;
  padding-left: 0.35rem;
}

.prod-board-table > tbody > tr > td:nth-child(2) {
  overflow: hidden;
}

.prod-board-tree-l1 {
  padding-inline-start: 0.5rem;
}

.prod-board-tree-l2 {
  padding-inline-start: 1.25rem;
}

.prod-board-tree-l3 {
  padding-inline-start: 2rem;
}

.prod-board-table tr.prod-board-row-product > * {
  background-color: var(--bs-paper-bg, var(--bs-white));
}

.prod-board-table tr.prod-board-row-l1 > *,
.prod-board-table tr.prod-board-row-l2 > *,
.prod-board-table tr.prod-board-row-l3 > * {
  background-color: color-mix(in srgb, var(--bs-emphasis-color) 3.5%, var(--bs-paper-bg, var(--bs-white)));
}

.prod-board-table tr.prod-board-row-l1 td.prod-seq,
.prod-board-table tr.prod-board-row-l2 td.prod-seq,
.prod-board-table tr.prod-board-row-l3 td.prod-seq {
  box-shadow:
    inset 3px 0 0 var(--bs-primary),
    inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg)));
}

.prod-board-table tr.prod-board-row-l1 td:nth-child(2),
.prod-board-table tr.prod-board-row-l2 td:nth-child(2),
.prod-board-table tr.prod-board-row-l3 td:nth-child(2) {
  padding-left: 1.5rem;
}

.prod-board-table tr.prod-board-row-l2 td:nth-child(2) {
  padding-left: 2.75rem;
}

.prod-board-table tr.prod-board-row-l3 td:nth-child(2) {
  padding-left: 4rem;
}

.prod-board-table.table-hover > tbody > tr.prod-board-row-product:hover > * {
  --bs-table-bg-state: color-mix(in srgb, var(--bs-emphasis-color) 4%, var(--bs-paper-bg, var(--bs-white)));
}

.prod-board-table.table-hover > tbody > tr.prod-board-row-l1:hover > *,
.prod-board-table.table-hover > tbody > tr.prod-board-row-l2:hover > *,
.prod-board-table.table-hover > tbody > tr.prod-board-row-l3:hover > * {
  --bs-table-bg-state: color-mix(in srgb, var(--bs-emphasis-color) 6%, var(--bs-paper-bg, var(--bs-white)));
}

tr.prod-board-expandable {
  cursor: pointer;
}

tr.prod-board-child {
  display: none;
}

tr.prod-board-child.is-open {
  display: table-row;
}

.prod-board-chevron {
  transition: transform 0.15s ease;
}

[aria-expanded="true"] .prod-board-chevron {
  transform: rotate(90deg);
}

.prod-board-jump-target {
  outline: 2px solid var(--bs-primary);
  outline-offset: -2px;
}

.prod-date-range .form-control {
  min-width: 14rem;
}

/* 隐藏的 from/to 不得放进 input-group，否则 :last-child 圆角会失效；这里再钉死右侧圆角 */
.app-date-range .input-group,
.prod-date-range .input-group {
  border-radius: var(--bs-border-radius);
  overflow: hidden;
}

.app-date-range .input-group > .form-control,
.prod-date-range .input-group > .form-control {
  border-top-right-radius: var(--bs-border-radius);
  border-bottom-right-radius: var(--bs-border-radius);
}

.prod-table-wrap {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.prod-board-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

.prod-board-card {
  padding: 0.875rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-paper-bg, var(--bs-white));
}

.prod-board-card.prod-board-expandable {
  cursor: pointer;
}

.prod-board-card__head {
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
}

.prod-board-card.prod-board-child {
  display: none;
}

.prod-board-card.prod-board-child.is-open {
  display: block;
}

.prod-board-card.prod-board-row-l1,
.prod-board-card.prod-board-row-l2,
.prod-board-card.prod-board-row-l3 {
  border-left: 3px solid var(--bs-primary);
  background: color-mix(in srgb, var(--bs-emphasis-color) 3.5%, var(--bs-paper-bg, var(--bs-white)));
}

.prod-board-card.prod-board-row-l1 {
  margin-left: 0.5rem;
}

.prod-board-card.prod-board-row-l2 {
  margin-left: 1rem;
}

.prod-board-card.prod-board-row-l3 {
  margin-left: 1.5rem;
}

.prod-kpi {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem 0.75rem;
  margin-top: 0.75rem;
}

.prod-kpi:has(.prod-kpi__item:first-child:last-child) {
  grid-template-columns: minmax(0, 1fr);
}

.prod-kpi:has(.prod-kpi__item:nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.prod-kpi__label {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  line-height: 1.2;
  text-align: end;
}

.prod-kpi__value {
  font-weight: 600;
  font-variant-numeric: normal;
  text-align: end;
  line-height: 1.35;
}

.prod-kpi__item--hl .prod-kpi__value {
  color: var(--bs-primary);
}

.prod-board-more {
  margin-top: 0.25rem;
}

.prod-board-more > summary {
  list-style: none;
  cursor: pointer;
  color: var(--bs-primary);
  font-size: 0.8125rem;
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
}

.prod-board-more > summary::-webkit-details-marker {
  display: none;
}

.prod-kpi--more {
  margin-top: 0.15rem;
}

.prod-plan-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

.prod-plan-card {
  margin: 0;
  box-shadow: none;
}

.prod-goods-meta {
  line-height: 1.35;
}

.prod-goods-no {
  color: var(--bs-secondary-color);
}

.prod-goods-spec {
  color: var(--bs-heading-color, var(--bs-emphasis-color, var(--bs-body-color)));
  font-weight: 600;
}

.prod-line-qty {
  width: 5.5rem;
  max-width: 100%;
  margin-left: auto;
  -moz-appearance: textfield;
  appearance: textfield;
}

.prod-line-qty::-webkit-outer-spin-button,
.prod-line-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.prod-lines-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 18rem;
  padding: 3.5rem 1.5rem;
}

.prod-lines-empty__icon {
  font-size: 3.25rem;
  line-height: 1;
  margin-bottom: 1rem;
  color: var(--bs-secondary-color);
  opacity: 0.4;
}

.prod-lines-add {
  display: flex;
  justify-content: center;
  padding: 0 1.5rem 1.5rem;
}

.prod-table-wrap:not(.d-none) ~ .prod-lines-add {
  justify-content: flex-start;
  padding-top: 1rem;
}

.prod-line-remove {
  color: var(--bs-secondary-color);
  opacity: 0.45;
}

.prod-line-remove:hover,
.prod-line-remove:focus {
  color: var(--bs-body-color);
  opacity: 1;
}

.prod-plan .prod-table--lines {
  table-layout: fixed;
  width: 100%;
}

.prod-plan .prod-table thead tr th:last-child,
.prod-plan .prod-table tbody td:last-child {
  padding-right: 1.5rem;
}

.prod-plan .prod-line-goods {
  min-width: 0;
  overflow: hidden;
}

.prod-plan .prod-table--lines th:nth-child(3),
.prod-plan .prod-table--lines td:nth-child(3),
.prod-plan .prod-table--lines th:nth-child(4),
.prod-plan .prod-table--lines td:nth-child(4) {
  width: 5.5rem;
}

.prod-plan .prod-table--lines th:nth-child(5),
.prod-plan .prod-table--lines td:nth-child(5) {
  width: 6.5rem;
}

.prod-plan .prod-table--lines th:nth-child(6),
.prod-plan .prod-table--lines td:nth-child(6) {
  width: 4.75rem;
}

.prod-seq {
  width: 1%;
  white-space: nowrap;
  font-variant-numeric: normal;
}

th.prod-seq {
  color: var(--bs-secondary-color);
}

td.prod-seq,
td.prod-seq.app-num,
td.prod-seq .app-num,
.prod-seq-val,
.prod-seq-val.app-num,
span.prod-seq,
.prod-board-card__head > .prod-seq {
  color: color-mix(in srgb, var(--bs-secondary-color) 38%, transparent);
}

th.prod-seq,
td.prod-seq {
  width: 2.75rem;
  min-width: 2.75rem;
}

.prod-board-table.table.align-middle > :not(caption) > * > td.prod-seq,
.prod-board-table.table.align-middle > :not(caption) > * > td:nth-child(2) {
  vertical-align: top;
}

.prod-seq-val {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 1.5rem;
  width: 100%;
}

.app-num.prod-stock,
.prod-kpi__value.prod-stock {
  color: var(--bs-primary);
}

.prod-board-card__head > .prod-seq {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 1.25rem;
  min-height: 1.5rem;
  width: auto;
}

@media (min-width: 576px) {
  .prod-plan .w-sm-auto {
    width: auto !important;
  }
}

@media (max-width: 991.98px) {
  .prod-board-nav {
    width: 100%;
  }

  .prod-board-nav__group {
    flex: 1 1 100%;
  }

  .prod-board-nav__group .btn {
    flex: 1 1 0;
  }

  .prod-table-wrap .prod-board-table,
  .prod-table-wrap .prod-table {
    min-width: 44rem;
  }

  .prod-board-table thead th.prod-seq,
  .prod-board-table tbody td.prod-seq {
    position: sticky;
    left: 0;
    z-index: 3;
    min-width: 2.15rem;
    background-color: var(--bs-table-bg);
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg)));
  }

  .prod-table thead th.prod-seq,
  .prod-table tbody td.prod-seq {
    position: sticky;
    left: 0;
    z-index: 3;
    min-width: 2.75rem;
    background-color: var(--bs-table-bg);
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg)));
  }

  .prod-board-table thead th:nth-child(2),
  .prod-board-table tbody td:nth-child(2) {
    position: sticky;
    left: 2.15rem;
    z-index: 2;
    min-width: 10.5rem;
    max-width: 23rem;
    width: 23rem;
    background-color: var(--bs-table-bg);
    box-shadow:
      inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg))),
      6px 0 8px -6px rgba(38, 43, 67, 0.16);
  }

  .prod-table thead th:nth-child(2),
  .prod-table tbody td:nth-child(2) {
    position: sticky;
    left: 2.75rem;
    z-index: 2;
    min-width: 10.5rem;
    background-color: var(--bs-table-bg);
    box-shadow:
      inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg))),
      6px 0 8px -6px rgba(38, 43, 67, 0.16);
  }

  .prod-board-table thead th:nth-child(2),
  .prod-table thead th:nth-child(2) {
    z-index: 3;
  }

  .prod-board-table tr.prod-board-row-l1 td.prod-seq,
  .prod-board-table tr.prod-board-row-l2 td.prod-seq,
  .prod-board-table tr.prod-board-row-l3 td.prod-seq {
    box-shadow:
      inset 3px 0 0 var(--bs-primary),
      inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg)));
  }

  .prod-board-table tr.prod-board-row-l1 td:nth-child(2),
  .prod-board-table tr.prod-board-row-l2 td:nth-child(2),
  .prod-board-table tr.prod-board-row-l3 td:nth-child(2) {
    box-shadow:
      inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg))),
      6px 0 8px -6px rgba(38, 43, 67, 0.16);
  }

  .prod-board-table tr.prod-board-row-l1 td:nth-child(2) {
    padding-left: 1.25rem;
  }

  .prod-board-table tr.prod-board-row-l2 td:nth-child(2) {
    padding-left: 1.85rem;
  }

  .prod-board-table tr.prod-board-row-l3 td:nth-child(2) {
    padding-left: 2.5rem;
  }

  tr.prod-board-expandable > td {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
}

@media (max-width: 767.98px) {
  .prod-plan-nav .nav-link {
    width: 100%;
    justify-content: center;
  }

  .prod-table-wrap .prod-table {
    min-width: 32rem;
  }
}

@media (max-width: 575.98px) {
  .prod-date-range .form-control {
    min-width: 0;
  }

  .prod-plan .card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .prod-plan .card-header .btn {
    width: 100%;
  }

  .prod-lines-add .btn {
    width: 100%;
  }

  .prod-plan-actions {
    flex-direction: column;
    align-items: stretch !important;
  }

  .prod-plan-actions .btn,
  .prod-plan-actions form,
  .prod-plan-actions > div {
    width: 100%;
  }

  .prod-plan-actions .btn {
    justify-content: center;
  }

  .prod-plan-actions > div {
    flex-direction: column;
  }

  .prod-line-qty {
    max-width: none;
    width: 100%;
  }
}

/* 内部 APP 壳：三入口 + 平板看板，不进完整后台 */
body.app-shell,
html.app-shell {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

html.app-shell .app-shell-desktop-only,
body.app-shell .app-shell-desktop-only {
  display: none !important;
}

html.is-capacitor .app-shell-exit-web,
body.is-capacitor .app-shell-exit-web {
  display: none !important;
}

.app-shell-home {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2rem;
}

.app-shell-home__bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.app-shell-home__title {
  font-size: 1.35rem;
  font-weight: 600;
}

.app-shell-home__card:hover {
  border-color: var(--bs-primary);
}

.app-shell-home-link {
  display: inline-flex;
  align-items: center;
  color: var(--bs-body-color);
  text-decoration: none;
}

body.app-shell.live-dash-night {
  overscroll-behavior: none;
}

@media (min-width: 768px) {
  html.app-shell .prod-board-cards.d-lg-none {
    display: none !important;
  }

  html.app-shell .prod-table-wrap.d-none.d-lg-block {
    display: block !important;
  }
}

/* 发货查询 */
.wecom-sidebar.wecom-ship-lookup,
.wecom-ship-lookup--app {
  max-width: 640px;
  padding: 1rem 1rem 1.5rem;
}

.wecom-ship-lookup--pc {
  max-width: none;
  padding: 0;
}

.wecom-ship-lookup--pc .wecom-lookup-search {
  max-width: 36rem;
}

.wecom-ship-lookup--pc .wecom-lookup-search .wecom-lookup-search__input.form-control,
.wecom-ship-lookup--pc .wecom-lookup-search .wecom-lookup-search__btn.btn {
  height: calc(1.5em + 0.75rem + 2px);
  min-height: calc(1.5em + 0.75rem + 2px);
}

.wecom-ship-lookup--pc .wecom-ship-lookup__detail-page {
  display: none !important;
}

.wecom-ship-table {
  width: 100%;
}

.wecom-ship-table thead th {
  white-space: nowrap;
  font-weight: 500;
  background: var(--bs-secondary-bg-subtle);
}

.wecom-ship-table td {
  vertical-align: middle;
}

.wecom-ship-table__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.wecom-ship-table__addr {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 992px) {
  #wecom-ship-detail-modal .wecom-sidebar__detail-row {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: 0.35rem 0.75rem;
    align-items: start;
  }

  #wecom-ship-detail-modal .wecom-sidebar__detail-row + .wecom-sidebar__detail-row {
    margin-top: 0.5rem;
  }
}

.wecom-lookup-search {
  width: 100%;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  overflow: hidden;
  background: var(--bs-body-bg);
  box-shadow: none;
}

.wecom-lookup-search .wecom-lookup-search__input.form-control {
  height: 2.75rem;
  min-height: 2.75rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  padding: 0.5rem 0.875rem;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.wecom-lookup-search .wecom-lookup-search__input.form-control::placeholder {
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
  opacity: 1;
}

.wecom-lookup-search .wecom-lookup-search__input.form-control:focus {
  box-shadow: none;
  border-color: transparent;
  z-index: 1;
}

.wecom-lookup-search:focus-within {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.16);
}

.wecom-lookup-search .wecom-lookup-search__btn.btn {
  height: 2.75rem;
  min-height: 2.75rem;
  min-width: 4.5rem;
  padding: 0 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.wecom-lookup-search .wecom-lookup-search__btn .bx {
  font-size: 1.125rem;
  line-height: 1;
}

.wecom-lookup-search__btn-text {
  font-weight: 600;
}

@media (max-width: 419.98px) {
  .wecom-lookup-search .wecom-lookup-search__btn.btn {
    min-width: 3.5rem;
    padding: 0 0.75rem;
  }

  .wecom-lookup-search__btn-text {
    display: none;
  }
}

/* 首页：进行中场次提醒条（区别于模块入口卡片） */
.home-live-bars {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.home-live-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.125rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--bs-info-border-subtle);
  border-radius: var(--bs-border-radius);
  background: var(--bs-info-bg-subtle);
  color: var(--bs-info-text-emphasis);
  text-decoration: none;
  font-size: 0.8125rem;
  line-height: 1.3;
}

.home-live-bar:hover,
.home-live-bar:focus-visible {
  color: var(--bs-info-text-emphasis);
  background: var(--bs-info-border-subtle);
}

.home-live-bar__mark {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: rgba(var(--bs-info-rgb), 0.18);
  color: var(--bs-info-text-emphasis);
}

.home-live-bar__title {
  flex-shrink: 1;
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-live-bar__meta {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.72;
}

.home-live-bar__go {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
  opacity: 0.85;
  font-size: 0.75rem;
  white-space: nowrap;
}

.wo-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.prod-related-wrap {
  display: inline;
}

.prod-need-by {
  margin-inline-start: 0.4rem;
  font-size: 0.75rem;
  white-space: nowrap;
  color: var(--bs-secondary-color);
}

.prod-related-link {
  margin-inline-start: 0.4rem;
  font-size: 0.75rem;
  white-space: nowrap;
  color: var(--bs-secondary-color);
  text-decoration: none;
}

.prod-related-link:hover,
.prod-related-link:focus-visible {
  color: var(--bs-body-color);
  text-decoration: underline;
}

.wo-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bs-secondary-color);
  line-height: 1;
  cursor: pointer;
}

.wo-trigger__main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.2rem 0.4rem;
}

.wo-trigger .icon-base {
  font-size: 1.125rem;
}

.wo-trigger.is-empty {
  background: transparent;
}

.wo-trigger.is-empty .wo-trigger__main {
  padding: 0.2rem;
  background: transparent;
}

.wo-trigger.is-empty:hover,
.wo-trigger.is-empty:focus-visible {
  color: var(--bs-primary);
  background: transparent;
}

.wo-trigger.is-empty .wo-trigger__count,
.wo-trigger.is-empty .wo-trigger__unread {
  display: none;
}

.wo-trigger:not(.is-empty) {
  color: var(--bs-secondary-color);
}

.wo-trigger__unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  min-width: 1.15rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  background: #fff3e0;
  color: #ff9f43;
}

.wo-trigger__unread.is-mention {
  background: rgba(var(--bs-danger-rgb), 0.18);
  color: var(--bs-danger);
}

.prod-board-table td.prod-board-actions {
  width: 1%;
  vertical-align: middle;
}

.prod-board.is-refreshing > .card {
  opacity: 0.55;
  pointer-events: none;
}

.prod-board-loading {
  display: none;
  position: fixed;
  z-index: 1100;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--bs-paper-bg, var(--bs-body-bg));
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  box-shadow: var(--bs-box-shadow-lg);
}

.prod-board.is-refreshing .prod-board-loading {
  display: flex;
}

/* 顶栏 z-index 1075，内容区无法压过；挂到 body 后仍需高于壳层 */
.prod-board-toast-host {
  top: 4.5rem;
  z-index: 1102;
}

.wo-modal-list {
  min-height: 3.5rem;
}

.voice-input-wrap {
  position: relative;
}

.voice-input-wrap > textarea {
  padding-right: 2.25rem;
}

.voice-input-btn {
  position: absolute;
  right: 0.15rem;
  bottom: 0.15rem;
  z-index: 2;
  padding: 0.25rem 0.4rem;
  line-height: 1;
  color: var(--bs-secondary-color);
}

.voice-input-btn:hover,
.voice-input-btn:focus-visible {
  color: var(--bs-primary);
}

.voice-input-btn.is-recording {
  color: var(--bs-danger);
}

.voice-input-btn.is-busy {
  pointer-events: none;
  opacity: 0.75;
}

.voice-input-btn:disabled {
  opacity: 0.45;
}

.voice-input-wrap--hold > textarea {
  padding-right: 0.9rem;
}

.voice-hold-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin-top: 0.5rem;
  min-height: 3.25rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  font-size: 1.0625rem;
  line-height: 1.2;
  user-select: none;
  -webkit-user-select: none;
}

.voice-hold-btn:hover,
.voice-hold-btn:focus-visible {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.voice-hold-btn.is-recording {
  border-color: var(--bs-danger);
  color: var(--bs-danger);
  background: color-mix(in srgb, var(--bs-danger) 10%, var(--bs-secondary-bg));
}

.voice-hold-btn.is-busy,
.voice-hold-btn:disabled {
  opacity: 0.65;
  pointer-events: none;
}

.wo-modal-list .wo-comment + .wo-comment {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--bs-border-color);
}

#wo-modal .modal-dialog {
  max-width: 32rem;
}

#wo-modal .modal-content {
  max-height: min(36rem, calc(100dvh - 2rem));
  overflow: hidden;
}

#wo-modal .modal-title {
  padding-right: 1.75rem;
  overflow-wrap: anywhere;
}

#wo-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

@media (max-width: 575.98px) {
  #wo-modal .modal-dialog {
    max-width: none;
    margin-inline: 0.75rem;
    margin-block: max(0.75rem, env(safe-area-inset-top, 0px)) max(0.75rem, env(safe-area-inset-bottom, 0px));
  }

  #wo-modal .modal-content {
    max-height: calc(100dvh - 1.5rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }

  #wo-modal .modal-title {
    font-size: 1rem;
    line-height: 1.35;
  }

  #wo-modal .modal-footer {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  }
}

.wo-page .wo-thread {
  cursor: pointer;
  padding: 1rem 1.25rem;
}

.wo-page .wo-thread:focus-visible {
  outline: 2px solid rgba(var(--bs-primary-rgb), 0.35);
  outline-offset: -2px;
}

.wo-thread-head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.wo-thread-title {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  color: var(--bs-heading-color);
  line-height: 1.4;
}

.wo-thread-meta {
  margin-top: 0.25rem;
  color: var(--bs-secondary-color);
  font-size: 0.8125rem;
}

.wo-thread-source {
  color: inherit;
  text-decoration: none;
}

.wo-thread-source:hover {
  color: var(--bs-primary);
}

.wo-thread-chevron {
  font-size: 1.25rem;
  color: var(--bs-secondary-color);
  margin-top: 0.1rem;
  pointer-events: none;
}

.wo-thread-previews {
  margin-top: 0.75rem;
  padding: 0.75rem 0.875rem;
  background-color: var(--bs-paper-bg, var(--bs-body-bg));
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}

.wo-comment {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
}

.wo-comment + .wo-comment {
  margin-top: 0.625rem;
}

.wo-thread-previews .wo-comment + .wo-comment {
  padding-top: 0.625rem;
  border-top: 1px solid var(--bs-border-color);
}

.wo-comment-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
}

.wo-comment-name {
  color: var(--bs-heading-color);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  min-width: 0;
}

.wo-comment-time {
  margin-left: auto;
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.wo-comment-text {
  margin-top: 0.125rem;
  word-break: break-word;
}

.wo-thread-previews .wo-comment-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.wo-comment-action {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}

.wo-compose-box {
  display: block;
}

.wo-compose-box form {
  width: 100%;
}

.wo-empty-icon {
  font-size: 2rem;
}

.wo-at {
  color: var(--bs-primary);
  font-weight: 600;
}

.wo-compose {
  position: relative;
}

.wo-at-menu.dropdown-menu {
  z-index: 1090;
  min-width: 11rem;
  max-width: 16rem;
  max-height: 16rem;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  box-shadow: var(--bs-box-shadow-lg);
}

.wo-at-menu.dropdown-menu:not(.d-none) {
  display: block;
}

.wo-at-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wo-at-menu .dropdown-item-text {
  white-space: normal;
}

.wo-at-chips:empty {
  display: none;
}

.wo-nav-entry {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0.25rem;
  overflow: visible;
}

.layout-navbar .wo-nav-entry.active {
  color: var(--bs-primary);
}

.wo-nav-badge {
  position: absolute;
  top: 2px;
  inset-inline-end: 0;
  transform: translate(40%, -30%);
  font-size: 0.625rem;
  line-height: 1.1;
  padding: 0.15em 0.4em;
  min-width: 1.15rem;
}

.layout-navbar .wo-nav-dropdown {
  width: 22rem;
  max-width: min(22rem, calc(100vw - 1.5rem));
}

.layout-navbar .wo-nav-dropdown .dropdown-notifications-list {
  max-block-size: 22rem;
  overflow-y: auto;
}

.layout-navbar .wo-nav-dropdown .badge-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--bs-primary);
}

.style-switcher-toggle .style-switcher-icon {
  display: inline-block;
}

html[data-bs-theme="dark"] .style-switcher-icon--to-dark {
  display: none !important;
}

html[data-bs-theme="dark"] .style-switcher-icon--to-light {
  display: inline-block !important;
}

html[data-bs-theme="light"] .style-switcher-icon--to-light,
html:not([data-bs-theme="dark"]) .style-switcher-icon--to-light {
  display: none !important;
}

.nav-pills .nav-link .badge {
  vertical-align: text-top;
}

/* 克隆产品 */
.prod-create-steps.breadcrumb {
  margin-bottom: 0;
  flex-wrap: wrap;
  gap: 0.25rem 0;
  background: transparent;
  padding: 0;
}

.prod-create-steps .breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
}

.prod-create-steps .breadcrumb-item + .breadcrumb-item::before {
  content: "";
  width: 1rem;
  height: 1px;
  margin-right: 0.5rem;
  background: var(--bs-border-color);
  float: none;
  padding: 0;
}

.prod-create-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
  background: rgba(var(--bs-secondary-rgb), 0.12);
}

.prod-create-steps .breadcrumb-item.active {
  color: var(--bs-primary);
  font-weight: 600;
}

.prod-create-steps .breadcrumb-item.active .prod-create-step-num {
  color: #fff;
  background: var(--bs-primary);
}

.prod-create-steps .breadcrumb-item.prod-create-step--done {
  color: var(--bs-body-color);
}

.prod-create-steps .breadcrumb-item.prod-create-step--done .prod-create-step-num {
  color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), 0.12);
}

.prod-create-hero .card-body {
  background: transparent;
}

.prod-create-panel > .card-header {
  background: transparent;
  padding-top: 1.25rem;
  padding-bottom: 1.125rem;
}

/* Sneat 默认把 header 后的 card-body 顶距清零，克隆流程各块会贴在一起 */
.prod-create-panel > .card-header + .card-body {
  padding-block-start: 1.5rem;
}

.prod-create-panel > .card-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-inline: 1.5rem;
  padding-bottom: 1.5rem;
}

.prod-create-panel .card-title {
  font-size: 1.0625rem;
  font-weight: 600;
}

.prod-create-panel .card-subtitle {
  font-size: 0.8125rem;
}

.prod-create-search__group {
  max-width: 40rem;
}

.prod-create-search__group .form-control {
  min-height: 2.5rem;
}

.prod-create-section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
  letter-spacing: 0.02em;
}

.prod-create-target {
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(var(--bs-primary-rgb), 0.22);
  border-radius: 0.625rem;
  background:
    linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.08), rgba(var(--bs-primary-rgb), 0.02) 42%, transparent 70%),
    var(--bs-card-bg, #fff);
  box-shadow: 0 0.25rem 0.75rem rgba(67, 89, 113, 0.06);
}

.prod-create-target__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.prod-create-target__eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bs-primary);
  margin-bottom: 0.35rem;
}

.prod-create-target__name {
  font-weight: 700;
  line-height: 1.35;
  color: var(--bs-heading-color, var(--bs-body-color));
  word-break: break-word;
}

.prod-create-target__hint {
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
}

.prod-create-target__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.prod-create-target__stat {
  min-width: 0;
  padding: 0.75rem 0.875rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(var(--bs-primary-rgb), 0.1);
}

.prod-create-target__stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.25rem;
}

.prod-create-target__stat-value {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: normal;
  word-break: break-all;
}

@media (max-width: 991.98px) {
  .prod-create-target__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .prod-create-target {
    padding: 1rem;
  }

  .prod-create-target__stats {
    grid-template-columns: 1fr;
  }
}

.prod-create-picked {
  display: none;
}

.prod-create-table-wrap {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  overflow: hidden;
}

.prod-create-table {
  margin-bottom: 0;
}

.prod-create-table thead th {
  background: rgba(var(--bs-secondary-rgb), 0.04);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
  border-bottom-width: 1px;
  white-space: nowrap;
}

.prod-create-table tbody td {
  vertical-align: middle;
}

.prod-create-empty {
  text-align: center;
  color: var(--bs-secondary-color);
  padding: 2.75rem 1rem !important;
}

.prod-create-empty .icon-base {
  display: inline-block;
  font-size: 1.75rem;
  opacity: 0.55;
}

.prod-create-confirm-block {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--bs-card-bg, #fff);
}

.prod-create-confirm-block__head {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--bs-border-color);
  background: rgba(var(--bs-secondary-rgb), 0.04);
}

.prod-create-confirm-block .table {
  margin-bottom: 0;
}

.prod-create-bom-list {
  list-style: none;
  padding: 0.75rem 1rem 1rem;
  margin: 0;
}

.prod-create-bom-item {
  padding: 0.625rem 0.75rem;
  margin-left: calc(var(--indent, 0) * 0.85rem);
  margin-bottom: 0.5rem;
  border-radius: 0.375rem;
  background: rgba(var(--bs-primary-rgb), 0.03);
  border: 1px solid rgba(var(--bs-primary-rgb), 0.1);
}

.prod-create-bom-item:last-child {
  margin-bottom: 0;
}

.prod-create-bom-item__parent {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
}

.prod-create-bom-item__parts {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.prod-create-bom-part {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--bs-body-color);
}

.prod-create-tree {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prod-create-node {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background: var(--bs-paper-bg, var(--bs-body-bg));
  padding: 1.125rem 1.25rem;
}

.prod-create-node--root {
  background: var(--bs-card-bg, #fff);
  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.04);
  padding: 1.25rem 1.375rem;
}

.prod-create-node--warn {
  border-color: var(--bs-warning);
  box-shadow: 0 0 0 1px rgba(var(--bs-warning-rgb), 0.2);
}

.prod-create-node--create {
  border-color: rgba(var(--bs-primary-rgb), 0.35);
}

.prod-create-node__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.prod-create-node__meta {
  min-width: 0;
  flex: 1 1 14rem;
}

.prod-create-node__title {
  font-weight: 600;
  font-size: 0.9875rem;
  line-height: 1.35;
  color: var(--bs-heading-color, var(--bs-body-color));
}

.prod-create-node__sub {
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
  font-variant-numeric: normal;
}

.prod-create-node__compare {
  margin-top: 0.35rem;
  display: inline-block;
  max-width: 100%;
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  background: rgba(var(--bs-secondary-rgb), 0.08);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prod-create-node__ops {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 0.625rem;
  flex: 0 1 auto;
}

.prod-create-skip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 2rem;
  background: rgba(var(--bs-secondary-rgb), 0.08);
}

.prod-create-skip .form-check-input {
  margin-left: 0;
  margin-top: 0;
  float: none;
  width: 2rem;
  height: 1.1rem;
  cursor: pointer;
}

.prod-create-skip .form-check-label {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  white-space: nowrap;
  cursor: pointer;
  padding-left: 0;
}

.prod-create-actions .btn {
  min-width: 3rem;
}

.prod-create-remove {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 0.375rem;
  color: var(--bs-secondary-color);
  background: transparent;
  opacity: 0.55;
  transition: color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}

.prod-create-remove .icon-base {
  font-size: 1.125rem;
  line-height: 1;
}

.prod-create-remove:hover,
.prod-create-remove:focus-visible {
  color: var(--bs-danger);
  background: rgba(var(--bs-danger-rgb), 0.08);
  opacity: 1;
}

.prod-create-remove:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.15rem rgba(var(--bs-danger-rgb), 0.25);
}

.prod-create-qty {
  width: auto;
  max-width: 11.5rem;
}

.prod-create-qty .form-control {
  min-width: 4.25rem;
  font-variant-numeric: normal;
}

.prod-create-node__hint {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
}

.prod-create-class-tree {
  max-height: min(60vh, 28rem);
  overflow: auto;
}

.prod-create-class-field .form-control[readonly] {
  background-color: var(--bs-body-bg);
  cursor: pointer;
}

.prod-create-draft {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--bs-border-color);
}

.prod-create-draft .form-label {
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
}

.prod-create-bom-summary {
  background: var(--bs-card-bg, #fff);
}

.prod-create-bom-summary__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.prod-create-bom-summary__main {
  flex: 1 1 12rem;
  min-width: 0;
}

.prod-create-bom-summary__name {
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--bs-heading-color, var(--bs-body-color));
}

.prod-create-bom-summary__meta {
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
  font-variant-numeric: normal;
}

.prod-create-bom-summary__class {
  flex: 0 1 18rem;
  min-width: 12rem;
  max-width: 22rem;
}

.prod-create-bom-summary__class .form-label {
  color: var(--bs-secondary-color);
}

.prod-create-children {
  margin-top: 1.25rem;
  padding: 1rem 0 0.125rem 1.125rem;
  border-left: 3px solid rgba(var(--bs-primary-rgb), 0.22);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prod-create-children--level1 {
  margin-top: 0;
  padding: 0;
  border-left: none;
  gap: 0.75rem;
}

.prod-create-children--level1 > .prod-create-node,
.prod-create-node--level1 {
  background: var(--bs-card-bg, #fff);
  box-shadow: none;
}

.prod-create-children--nested {
  margin-top: 0.875rem;
  padding: 0.75rem 0 0.125rem 0.875rem;
  border-left: 2px solid rgba(var(--bs-primary-rgb), 0.2);
  gap: 0.75rem;
}

.prod-create-children--nested > .prod-create-node {
  background: rgba(var(--bs-primary-rgb), 0.02);
}

.prod-create-children__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: -0.15rem;
}

.prod-create-children > .prod-create-node {
  background: rgba(var(--bs-primary-rgb), 0.02);
}

.prod-create-children--level1 > .prod-create-node {
  background: var(--bs-card-bg, #fff);
}

@media (max-width: 767.98px) {
  .prod-create-node__ops {
    justify-content: flex-start;
    width: 100%;
  }

  .prod-create-qty {
    max-width: 100%;
    flex: 1 1 auto;
  }
}

/* 货品档案选择器（排单计划等）— 紧凑字号，对齐 Sneat card/modal */
.ga-picker {
  font-size: 0.8125rem;
}

.ga-picker .modal-title {
  font-size: 1rem;
}

.ga-picker .form-label,
.ga-picker .card-header,
.ga-picker .form-control,
.ga-picker .input-group-text,
.ga-picker .btn-sm,
.ga-picker .badge {
  font-size: 0.8125rem;
}

.ga-picker .form-control,
.ga-picker .input-group-text {
  min-height: calc(1.5em + 0.65rem + 2px);
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}

.ga-picker-panel .card-header {
  font-size: 0.75rem;
  background: transparent;
  flex: 0 0 auto;
  min-height: 0;
  line-height: 1.25;
}

.ga-picker-body {
  --ga-picker-pane-h: min(52vh, 26rem);
}

@media (min-width: 992px) {
  .ga-picker-col-tree {
    flex: 0 0 calc(100% * 8 / 36);
    width: calc(100% * 8 / 36);
    max-width: calc(100% * 8 / 36);
  }

  .ga-picker-col-list {
    flex: 1 1 0;
    width: auto;
    max-width: none;
  }
}

.ga-picker-body > [class*="col-"] {
  min-height: 0;
}

.ga-picker-panel {
  height: var(--ga-picker-pane-h);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ga-picker-panel .card-footer {
  flex: 0 0 auto;
  min-height: 0;
}

.ga-picker-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.ga-picker-tree .list-group-item {
  border-left: 0;
  border-right: 0;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  font-size: 0.8125rem;
  cursor: pointer;
  min-width: 0;
}

.ga-picker-tree .list-group-item.active {
  background-color: rgba(var(--bs-primary-rgb), 0.08);
  color: var(--bs-primary);
  border-color: var(--bs-border-color);
  font-weight: 600;
}

.ga-picker-tree-spacer {
  display: inline-block;
  width: 1.35rem;
  flex: 0 0 1.35rem;
}

.ga-picker-tree-toggle {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 1.35rem;
}

.ga-picker-table > :not(caption) > * > * {
  padding: 0.4rem 0.65rem;
  font-size: 0.8125rem;
}

.ga-picker-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0;
}

.ga-picker-table thead tr th {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
  padding-top: 0.4rem;
  padding-bottom: 0.5rem;
  line-height: 1.375rem;
  height: 2.3375rem;
  box-sizing: border-box;
  vertical-align: middle;
  text-transform: none;
  letter-spacing: 0;
  background-color: var(--bs-tertiary-bg);
  background-clip: padding-box;
  border-bottom: 1px solid var(--bs-border-color);
  box-shadow: 0 1px 0 var(--bs-border-color);
}

.ga-picker-row,
.ga-picker-spec-row {
  cursor: pointer;
}

.ga-picker-row.table-active,
.ga-picker-spec-row.table-active {
  --bs-table-bg-state: rgba(var(--bs-primary-rgb), 0.1);
}

.ga-picker:not(.ga-picker--multi) [data-ga-col="check"],
.ga-picker:not(.ga-picker--stock) [data-ga-col="stock"],
.ga-picker:not(.ga-picker--stock) [data-ga-col="orderable"] {
  display: none;
}

.ga-picker-table [data-ga-col="check"],
.ga-picker-table .ga-picker-check {
  width: 2rem;
  min-width: 2rem;
  max-width: 2rem;
  padding-left: 0.65rem;
  padding-right: 0.1rem;
}

.ga-picker-table .ga-picker-seq {
  width: 1.65rem;
  min-width: 1.65rem;
  max-width: 1.65rem;
  padding-left: 0.1rem;
  padding-right: 0.35rem;
}

.ga-picker-check-val,
.ga-picker-seq-val {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.375rem;
  line-height: 1.375rem;
}

.ga-picker-seq-val {
  justify-content: flex-end;
}

.ga-picker-check-val input {
  margin: 0;
  vertical-align: middle;
}

.ga-picker-panel--list .ga-picker-scroll {
  padding-right: 0;
  overflow-x: auto;
  overflow-y: auto;
}

[data-ga-picker-goods-pane] .ga-picker-table {
  table-layout: fixed;
  width: 100%;
}

.ga-picker--stock [data-ga-picker-goods-pane] .ga-picker-table th:nth-last-child(-n + 4),
.ga-picker--stock [data-ga-picker-goods-pane] .ga-picker-table td:nth-last-child(-n + 4) {
  width: 5.75rem;
  min-width: 5.75rem;
  max-width: 5.75rem;
  box-sizing: border-box;
  white-space: nowrap;
  text-align: right;
}

.ga-picker--stock [data-ga-picker-goods-pane] .ga-picker-table th:last-child,
.ga-picker--stock [data-ga-picker-goods-pane] .ga-picker-table td:last-child {
  width: 6.5rem;
  min-width: 6.5rem;
  max-width: 6.5rem;
}

.ga-picker-col-eq {
  width: 5.75rem;
  min-width: 5.75rem;
  max-width: 5.75rem;
  box-sizing: border-box;
  white-space: nowrap;
  text-align: right;
}

.ga-picker-goods {
  min-width: 0;
  width: auto;
}

.ga-picker-goods-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  min-height: 1.375rem;
}

.ga-picker-goods-name {
  flex: 1 1 0%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.375rem;
}

.ga-picker-goods-no {
  margin-top: 0.1rem;
  font-family: var(--bs-font-monospace);
  font-size: 0.8125rem;
  line-height: 1.25;
  color: var(--bs-secondary-color);
}

.ga-picker-pending {
  display: flex;
  align-items: center;
  min-width: 0;
}

.ga-picker-clear-selected {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  line-height: 1;
  color: inherit;
  opacity: 0.7;
}

.ga-picker-clear-selected:hover,
.ga-picker-clear-selected:focus-visible {
  opacity: 1;
}

.ga-picker-clear-selected .bx {
  font-size: 1rem;
}

#ga-picker-modal {
  z-index: 1095;
}

.ga-picker-open .modal-backdrop:last-of-type {
  z-index: 1090;
}

.ga-picker .pagination {
  --bs-pagination-padding-y: 0.2rem;
  --bs-pagination-padding-x: 0.5rem;
  --bs-pagination-font-size: 0.75rem;
}

/* 库存查询页：布局/字号对齐货品选择器；分类与列表定高内部滚动 */
.goods-archive {
  --ga-text: 0.8125rem;
  font-size: var(--ga-text);
  --ga-archive-pane-h: max(22rem, calc(100dvh - 14.5rem));
}

.goods-archive .card-title {
  font-size: 1rem;
}

.goods-archive .form-control,
.goods-archive .input-group-text,
.goods-archive .btn-sm,
.goods-archive .badge {
  font-size: var(--ga-text);
}

.goods-archive .form-control,
.goods-archive .input-group-text {
  min-height: calc(1.5em + 0.65rem + 2px);
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}

.goods-archive-toolbar {
  flex: 0 0 auto;
}

.goods-archive-body {
  --ga-archive-pane-h: max(22rem, calc(100dvh - 14.5rem));
}

@media (min-width: 992px) {
  .goods-archive-col-tree {
    flex: 0 0 calc(100% * 8 / 36);
    width: calc(100% * 8 / 36);
    max-width: calc(100% * 8 / 36);
  }

  .goods-archive-col-list {
    flex: 1 1 0;
    width: auto;
    max-width: none;
  }
}

.goods-archive-body > [class*="col-"] {
  min-height: 0;
}

.goods-archive-panel {
  height: var(--ga-archive-pane-h);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.goods-archive-panel .card-footer {
  flex: 0 0 auto;
  min-height: 0;
}

.goods-archive-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.goods-archive-panel--list {
  position: relative;
}

/* ListPanel 外包一层 data-ga-list-root，须继续当 flex 列，否则 scroll 区无法定高 → 右侧滚动条消失 */
.goods-archive-panel--list > [data-ga-list-root] {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.goods-archive-panel--list .goods-archive-scroll {
  /* 有滚动条时再占位，避免无滚动条时右侧空白 */
  overflow-x: auto;
  overflow-y: auto;
}

.goods-archive-panel--list.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.goods-archive-tree .list-group-item {
  border-left: 0;
  border-right: 0;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  font-size: var(--ga-text);
  min-width: 0;
}

.goods-archive-tree .list-group-item.active {
  background-color: rgba(var(--bs-primary-rgb), 0.08);
  color: var(--bs-primary);
  border-color: var(--bs-border-color);
  font-weight: 600;
}

.goods-archive-tree-toggle-spacer {
  display: inline-block;
  width: 1.35rem;
  flex: 0 0 1.35rem;
}

.goods-archive-tree-toggle {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 1.35rem;
}

.goods-archive-table {
  width: 100%;
  table-layout: fixed;
  /* collapse + sticky 易在表头上方留 1px 缝，滚动时正文会漏出 */
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0;
}

.goods-archive-table > :not(caption) > * > * {
  padding: 0.4rem 0.65rem;
  font-size: var(--ga-text);
}

.goods-archive-col-eq {
  width: 4.75rem;
  min-width: 4.75rem;
  max-width: 4.75rem;
  box-sizing: border-box;
  white-space: nowrap;
}

/* 末列多出的右侧 padding，用列宽补回，保持与等宽列内容区一致
   （须压过 .goods-archive-table > … > * 的 padding 简写） */
.goods-archive-table > :not(caption) > * > *.goods-archive-col-eq--tail {
  width: 5.35rem;
  min-width: 5.35rem;
  max-width: 5.35rem;
  padding-right: 1.25rem;
}

.goods-archive-table thead tr th {
  font-weight: 600;
  color: var(--bs-secondary-color);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
  padding-top: 0.4rem;
  padding-bottom: 0.5rem;
  line-height: 1.375rem;
  height: 2.3375rem;
  box-sizing: border-box;
  vertical-align: middle;
  text-transform: none;
  letter-spacing: 0;
  /* 不透明底，避免滚动时正文透过/漏到表头上方 */
  background-color: var(--bs-tertiary-bg);
  background-clip: padding-box;
  border-bottom: 1px solid var(--bs-border-color);
  box-shadow: 0 1px 0 var(--bs-border-color);
}

.goods-archive-table .goods-archive-seq {
  width: 2rem;
  min-width: 2rem;
  max-width: 2rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.goods-archive-seq-val {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 1.375rem;
  line-height: 1.375rem;
}

.goods-archive-goods {
  min-width: 0;
}

.goods-archive-goods--bom,
.goods-archive-goods--specs {
  cursor: pointer;
}

.goods-archive-goods--bom:hover .goods-archive-goods-name,
.goods-archive-goods--specs:hover .goods-archive-goods-name {
  color: var(--bs-primary);
}

.goods-archive-goods--bom:hover .goods-archive-bom-btn,
.goods-archive-goods--specs:hover .goods-archive-expand {
  color: var(--bs-primary);
}

.goods-archive-goods-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  min-height: 1.375rem;
}

.goods-archive-goods-name {
  flex: 1 1 0%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--ga-text);
  line-height: 1.375rem;
  font-weight: 500;
}

.goods-archive-goods-meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.1rem;
  min-width: 0;
}

.goods-archive-goods-price {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  box-sizing: border-box;
  text-align: left;
  font-size: var(--ga-text);
  line-height: 1.25;
  white-space: nowrap;
}

.goods-archive-goods-no {
  display: inline-block;
  flex: 0 0 auto;
  width: fit-content;
  max-width: 100%;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  font-family: var(--bs-font-monospace);
  font-size: var(--ga-text);
  line-height: 1.25;
  color: var(--bs-secondary-color);
  white-space: nowrap;
}

.goods-archive-table .goods-archive-goods-no {
  text-align: inherit;
}

.goods-archive-multi-badge {
  flex: 0 0 auto;
  font-weight: 500;
}

.goods-archive-bom-btn {
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 1.5rem;
  color: var(--bs-secondary-color);
}

.goods-archive-bom-btn.is-active,
.goods-archive-bom-btn:hover,
.goods-archive-expand.is-active,
.goods-archive-expand:hover {
  color: var(--bs-primary);
}

.goods-archive-bom-panel {
  margin: 0.35rem 0.75rem 0.6rem;
  font-size: var(--ga-text);
}

.goods-archive-bom-panel > .table,
.goods-archive-bom-panel > .table > :not(caption) > * > *,
.goods-archive-bom-panel .fw-medium {
  font-size: var(--ga-text);
}

.goods-archive-bom-item--level2 > td:first-child .badge,
.goods-archive-bom-item--level3 > td:first-child .badge {
  opacity: 0.92;
}

.goods-archive-bom-panel > .table > :not(caption) > * > *:first-child {
  white-space: nowrap;
}

.goods-archive-bom-row > td {
  background: rgba(var(--bs-primary-rgb), 0.03);
  padding-top: 0.35rem !important;
  padding-bottom: 0.5rem !important;
}

.goods-archive-spec-row > td {
  font-size: var(--ga-text);
}

.goods-archive-goods--spec {
  padding-left: 1.25rem !important;
}

.goods-archive-goods--spec .goods-archive-goods-name {
  font-weight: 400;
}

.goods-archive .pagination {
  --bs-pagination-padding-y: 0.2rem;
  --bs-pagination-padding-x: 0.5rem;
  --bs-pagination-font-size: 0.75rem;
}

#NewLine_GoodsNameDisplay[readonly],
#prod-create-source-name[readonly] {
  cursor: pointer;
  background-color: var(--bs-body-bg);
}

/* —— 临时应用 · 原料仓清理（仓库现场：大字号、大触控） —— */
.mc-page {
  max-width: 44rem;
  margin-inline: auto;
  padding-bottom: 1.25rem;
  font-size: 1.125rem;
  line-height: 1.5;
}

.mc-page #mc-local-create {
  scroll-margin-top: 5.5rem;
}

.mc-page .form-label {
  font-size: 1.0625rem;
  font-weight: 600;
}

.mc-page .form-text {
  font-size: 0.95rem;
}

.mc-page .small,
.mc-page small {
  font-size: 1rem;
}

.mc-page .h6 {
  font-size: 1.125rem;
  font-weight: 600;
}

.mc-page .badge {
  font-size: 0.875rem;
  padding: 0.4em 0.75em;
}

.mc-page .form-control,
.mc-page .form-select,
.mc-page .input-group-text,
.mc-page .btn:not(.btn-link):not(.mc-photo-remove):not(.mc-voice-remove):not(.mc-lightbox-close):not(.mc-btn-undocumented) {
  min-height: 3rem;
  font-size: 1.0625rem;
}

.mc-page .form-control,
.mc-page .form-select {
  padding: 0.55rem 0.9rem;
}

.mc-page .btn:not(.btn-link):not(.mc-photo-remove):not(.mc-voice-remove):not(.mc-lightbox-close):not(.mc-btn-undocumented) {
  padding: 0.5rem 1rem;
}

.mc-page .form-check-input[type="checkbox"] {
  width: 2.85rem;
  height: 1.5rem;
}

.mc-page .pagination .page-link {
  min-width: 2.6rem;
  min-height: 2.6rem;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mc-page .app-empty-state__title {
  font-size: 1.25rem;
}

.mc-page .app-empty-state__desc {
  font-size: 1rem;
}

.mc-page--edit {
  padding-bottom: 5.5rem;
}

.mc-page--comment {
  padding-bottom: 5.5rem;
}

.mc-btn-block {
  width: 100%;
  min-height: 3rem;
  font-size: 1.0625rem;
}

.mc-page .btn.mc-btn-undocumented {
  min-height: 2.15rem;
  font-size: 0.9375rem;
  font-weight: 400;
  padding: 0.2rem 0.85rem;
}

.mc-search-empty .card-body {
  min-height: 16rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mc-nav-links {
  display: flex;
  gap: 0.15rem;
  align-items: center;
}

.mc-nav-links .btn-link {
  font-size: 0.8125rem;
  text-decoration: none;
  white-space: nowrap;
}

.mc-photo-actions {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.mc-btn-camera-main {
  flex: 1 1 auto;
  min-height: 3rem;
}

.mc-btn-album-sm {
  flex: 0 0 3rem;
  width: 3rem;
  min-width: 3rem;
  padding-left: 0;
  padding-right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mc-stock-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.mc-stock-qty {
  flex: 1 1 auto;
  min-width: 0;
}

.mc-stock-acc {
  flex: 0 0 auto;
}

.mc-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mc-item-card {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mc-item-card:active,
.mc-item-card:hover {
  border-color: var(--bs-primary);
}

.mc-item-main {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.mc-item-cover {
  position: relative;
  flex: 0 0 5.25rem;
  width: 5.25rem;
  height: 5.25rem;
}

.mc-item-cover--stack {
  width: 5.9rem;
  height: 5.9rem;
  flex-basis: 5.9rem;
}

.mc-item-cover-img,
.mc-item-cover-empty {
  position: relative;
  z-index: 3;
  display: block;
  width: 5.25rem;
  height: 5.25rem;
  border-radius: var(--bs-border-radius);
  border: 1px solid var(--bs-border-color);
  background: var(--bs-secondary-bg);
}

.mc-item-cover-img {
  object-fit: cover;
}

.mc-item-cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-secondary-color);
  font-size: 1.65rem;
}

.mc-item-cover--stack .mc-item-cover-img {
  box-shadow:
    0.28rem 0.28rem 0 -1px var(--bs-paper-bg, var(--bs-body-bg)),
    0.28rem 0.28rem 0 0 var(--bs-border-color),
    0.52rem 0.52rem 0 -1px var(--bs-paper-bg, var(--bs-body-bg)),
    0.52rem 0.52rem 0 0 var(--bs-border-color);
}

.mc-item-cover-count {
  position: absolute;
  right: 0.2rem;
  bottom: 0.2rem;
  z-index: 4;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: rgba(var(--bs-black-rgb), 0.62);
  color: var(--bs-white);
  font-size: 0.75rem;
  line-height: 1.35rem;
  text-align: center;
}

.mc-item-body {
  min-width: 0;
}

.mc-item-card .card-body {
  padding: 1.15rem 1.15rem;
}

.mc-item-card .fw-medium {
  font-size: 1.1875rem;
}

.mc-item-card .app-num {
  font-size: 1.125rem;
}

.mc-item-suggestion {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
  line-height: 1.45;
}

.mc-item-suggestion-label {
  font-size: 1rem;
  color: var(--bs-secondary-color);
  margin-right: 0.35rem;
}

.mc-item-suggestion-text {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--bs-body-color);
}

.mc-lightbox-img {
  max-width: 100%;
  max-height: min(85vh, 42rem);
  object-fit: contain;
  border-radius: var(--bs-border-radius);
  background: var(--bs-body-bg);
}

.mc-lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mc-toolbar-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.mc-toolbar .mc-search-row {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.mc-toolbar .mc-btn-new {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.mc-search-group .form-control {
  min-height: 3rem;
}

.mc-page .mc-search-submit {
  flex: 0 0 3rem;
  width: 3rem;
  min-width: 3rem;
  padding-left: 0;
  padding-right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mc-acc-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.mc-acc-btn {
  min-height: 3rem;
  width: 100%;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.0625rem;
  padding: 0.45rem 0.5rem;
}

.mc-photo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
}

.mc-attach-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

.mc-attach-slot {
  width: 6.25rem;
  height: 6.25rem;
  padding: 0;
  border: 1px dashed var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: transparent;
  color: var(--bs-secondary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  line-height: 1;
  flex-shrink: 0;
}

.mc-attach-album {
  align-self: center;
  min-height: 0 !important;
  padding: 0.15rem 0 !important;
}

.mc-attach-slot:hover,
.mc-attach-slot:focus-visible {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

@media (pointer: fine) {
  .mc-attach-album {
    display: none;
  }
}

.mc-photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mc-photo-thumb {
  position: relative;
  display: block;
  width: 6.25rem;
  height: 6.25rem;
  flex-shrink: 0;
  border-radius: var(--bs-border-radius);
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
}

.mc-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mc-photo-remove {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  line-height: 1;
  font-size: 1.125rem;
  border-radius: 50%;
}

.mc-acc-switch {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding-top: 0.15rem;
}

.mc-acc-switch .form-check-input {
  width: 2.85rem;
  height: 1.5rem;
  margin-left: 0;
  cursor: pointer;
}

.mc-acc-label {
  font-size: 1.0625rem;
  font-weight: 500;
}

.mc-pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.mc-wx-composer {
  position: relative;
}

.mc-wx-parts {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.6rem;
}

.mc-wx-part {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.mc-wx-text-bubble {
  max-width: calc(100% - 3rem);
  padding: 0.55rem 0.75rem;
  border-radius: 0.35rem 0.85rem 0.85rem 0.85rem;
  background: color-mix(in srgb, var(--bs-success) 18%, var(--bs-body-bg));
  border: 1px solid color-mix(in srgb, var(--bs-success) 28%, var(--bs-border-color));
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.9375rem;
}

.mc-wx-voice-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  max-width: calc(100% - 3rem);
  min-width: 0;
}

.mc-wx-parts--history .mc-wx-voice-wrap {
  max-width: 100%;
}

.mc-wx-voice-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  min-width: 4.75rem;
  min-height: 2.5rem;
  height: 2.5rem;
  padding: 0 0.85rem;
  border: 0;
  border-radius: 0.25rem 0.8rem 0.8rem 0.8rem;
  background: #95ec69;
  color: #111;
  text-align: left;
  cursor: pointer;
}

.mc-wx-voice-bubble.is-playing {
  filter: brightness(0.96);
}

.mc-wx-voice-bubble__waves {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.15rem;
  height: 0.95rem;
}

.mc-wx-voice-bubble__waves i {
  display: block;
  width: 0.18rem;
  border-radius: 1px;
  background: currentColor;
  opacity: 0.8;
}

.mc-wx-voice-bubble__waves i:nth-child(1) { height: 0.35rem; }
.mc-wx-voice-bubble__waves i:nth-child(2) { height: 0.7rem; }
.mc-wx-voice-bubble__waves i:nth-child(3) { height: 0.5rem; }

.mc-wx-voice-bubble.is-playing .mc-wx-voice-bubble__waves i {
  animation: mc-wx-wave 0.9s ease-in-out infinite;
}

.mc-wx-voice-bubble.is-playing .mc-wx-voice-bubble__waves i:nth-child(2) {
  animation-delay: 0.15s;
}

.mc-wx-voice-bubble.is-playing .mc-wx-voice-bubble__waves i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes mc-wx-wave {
  0%, 100% { transform: scaleY(0.7); }
  50% { transform: scaleY(1.25); }
}

.mc-wx-voice-bubble__dur {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: normal;
}

.mc-wx-voice-text {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 0.4rem;
  background: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  font-size: 0.9375rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.mc-wx-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
}

.mc-wx-toggle {
  flex: 0 0 2.75rem;
  width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mc-wx-input-pane {
  flex: 1 1 auto;
  min-width: 0;
}

.mc-wx-composer.is-text-mode .mc-wx-input-pane--voice,
.mc-wx-composer.is-voice-mode .mc-wx-input-pane--text {
  display: none;
}

.mc-wx-input-pane--text {
  display: flex;
  gap: 0.35rem;
  align-items: flex-end;
}

.mc-wx-draft {
  flex: 1 1 auto;
  min-height: 2.75rem;
  resize: none;
}

.mc-wx-send {
  flex: 0 0 auto;
  min-height: 2.75rem;
}

.mc-wx-hold {
  width: 100%;
  min-height: 2.75rem;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.mc-wx-hold.is-recording {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.mc-wx-hold.is-cancel {
  border-color: var(--bs-danger);
  color: var(--bs-danger);
}

.mc-wx-overlay {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, #000 45%, transparent);
  pointer-events: none;
}

.mc-wx-overlay__panel {
  min-width: 10rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--bs-border-radius-lg);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  text-align: center;
  box-shadow: var(--bs-box-shadow);
}

.mc-wx-overlay.is-cancel .mc-wx-overlay__panel {
  color: var(--bs-danger);
}

.mc-wx-overlay__waves {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.25rem;
  height: 1.5rem;
  margin-bottom: 0.65rem;
}

.mc-wx-overlay__waves i {
  width: 0.28rem;
  background: currentColor;
  border-radius: 2px;
  animation: mc-wx-wave 0.9s ease-in-out infinite;
}

.mc-wx-overlay__waves i:nth-child(1) { height: 0.55rem; }
.mc-wx-overlay__waves i:nth-child(2) { height: 1.2rem; animation-delay: 0.12s; }
.mc-wx-overlay__waves i:nth-child(3) { height: 0.75rem; animation-delay: 0.24s; }

.mc-sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin: 0 -1.25rem -1.25rem;
  padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--bs-paper-bg, var(--bs-body-bg)) 92%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--bs-border-color);
}

.mc-sticky-actions .mc-btn-back {
  flex: 0 0 auto;
  min-width: 3.5rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mc-sticky-actions .mc-btn-save {
  flex: 1 1 auto;
  min-height: 2.75rem;
}

.mc-voice-textarea {
  min-height: 5rem;
}

.mc-voice-compact {
  min-height: 3.35rem;
}

.mc-audio-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.mc-audio-list:empty {
  display: none;
}

.mc-delete-form {
  margin: 0;
}

.mc-page .mc-delete-form .btn {
  min-height: 2.25rem;
  color: var(--bs-secondary-color);
}

.mc-audio-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.mc-voice-remove {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--bs-secondary-color);
  line-height: 1;
}

.mc-voice-remove i {
  font-size: 1.35rem;
}

.mc-voice-remove:hover,
.mc-voice-remove:focus-visible {
  color: var(--bs-body-color);
}

.mc-wx-part-remove.mc-voice-remove {
  margin-top: 0.1rem;
}

.mc-audio-player {
  width: 100%;
  max-width: 100%;
  height: 2.25rem;
}

.mc-page .voice-input-btn {
  min-width: 3.25rem;
  min-height: 3.25rem;
  padding: 0.55rem;
  font-size: 1.65rem;
}

.mc-page .voice-input-wrap:not(.voice-input-wrap--hold) > textarea {
  padding-right: 3.6rem;
  min-height: 5rem;
}

.mc-page .voice-input-wrap--hold > textarea {
  min-height: 5rem;
}

.mc-page .voice-input-wrap--hold > textarea.mc-voice-compact {
  min-height: 3.35rem;
}

.mc-page .voice-hold-btn {
  min-height: 3.75rem;
  font-size: 1.125rem;
}

.mc-page .mc-wx-voice-bubble {
  min-height: 2.5rem;
  height: 2.5rem;
  font-size: 0.9375rem;
}

@media (min-width: 768px) {
  .mc-page {
    max-width: 48rem;
  }

  .mc-sticky-actions {
    position: static;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    backdrop-filter: none;
  }

  .mc-sticky-actions .mc-btn-save {
    width: auto;
    min-width: 10rem;
    flex: 0 1 auto;
  }
}
