@charset "UTF-8";
.io-progress[data-v-8e0b82ca] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.io-msg[data-v-8e0b82ca] {
  font-size: 14px;
  color: var(--el-text-color-primary);
  line-height: 1.5;
}
.io-meta[data-v-8e0b82ca] {
  font-size: 12px;
  color: var(--el-text-color-secondary);
  line-height: 1.5;
}
.io-errors[data-v-8e0b82ca] {
  max-height: 160px;
  overflow: auto;
  border: 1px solid var(--el-border-color-lighter);
  border-radius: 4px;
  padding: 8px 10px;
  background: var(--el-fill-color-lighter);
}
.io-errors-title[data-v-8e0b82ca] {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}
.io-error-item[data-v-8e0b82ca] {
  font-size: 12px;
  color: var(--el-color-danger);
  line-height: 1.45;
  word-break: break-all;
}
.io-error-item + .io-error-item[data-v-8e0b82ca] {
  margin-top: 4px;
}
/* el-progress default width transition (0.6s) swallows rapid updates until 100% */
.io-progress[data-v-8e0b82ca] .el-progress-bar__inner {
  transition: width 0.12s linear;
}

.silk-page {
  font-size: 13px;
  line-height: 1.5;
  color: #0f172a;
  background: #f1f5f9;
  padding: 12px 16px 16px;
  min-height: 100%;
  width: 100%;
  box-sizing: border-box;
}

.silk-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.silk-page-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  color: #64748b;
}

.silk-page-breadcrumb__item {
  flex: 0 0 auto;
  white-space: normal;
  word-break: break-all;
  overflow: visible;
  text-overflow: unset;
  max-width: none;
}

.silk-page-breadcrumb__current {
  color: #0f172a;
  font-weight: 600;
}

.silk-page-breadcrumb__sep {
  color: #cbd5e1;
  user-select: none;
  flex-shrink: 0;
}

.silk-page-header__process-flow {
  color: var(--silk-color-primary, #2768ff);
  font-size: 13px;
  white-space: normal;
  flex: 0 1 auto;
  margin-left: auto;
  text-align: right;
  line-height: 1.4;
}

.silk-page-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.silk-page .silk-card,
.silk-page .table-wrap,
.silk-page .placeholder-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.silk-page:not(.legacy-list-page) .filter-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.silk-page.legacy-list-page .filter-panel {
  background: linear-gradient(180deg, #e8f1fb 0%, #d6e6f6 100%);
  border: 1px solid #9bb6d4;
  border-radius: 4px;
  margin-bottom: 4px;
  padding: 5px 8px;
}

.silk-page:not(.legacy-list-page) .table-wrap {
  overflow: auto;
}

.silk-page.legacy-list-page .table-wrap:has(.el-table) {
  overflow: hidden;
}

.silk-page.legacy-list-page .el-dialog .table-wrap:has(.el-table),
.silk-page.legacy-list-page .el-overlay .table-wrap:has(.el-table) {
  overflow: auto;
}

.silk-page .placeholder-card {
  padding: 24px;
  text-align: center;
}

.silk-page .link-action {
  color: var(--silk-color-primary, #2768ff);
}
.silk-page .link-action:hover {
  color: var(--silk-color-primary-light, #4d84ff);
}

.silk-page.legacy-list-page {
  font-size: 13px;
  background: #f1f5f9;
  padding: 12px 16px 16px;
  min-height: 0;
}

.silk-page.legacy-list-page .page-meta-bar {
  display: none;
}

/* Legacy list page style (aligned with sell bill list) */
.legacy-list-page {
  font-size: 12px;
  background: #e8e8e8;
  padding: 4px;
  min-height: auto;
  width: 100%;
  box-sizing: border-box;
}

.legacy-list-page.bill-list-page {
  min-height: auto;
  align-self: flex-start;
}

.legacy-list-page .page-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  padding: 4px 8px;
  background: #f5f8fc;
  border: 1px solid #b8cfe0;
  width: 100%;
  box-sizing: border-box;
}

.legacy-list-page .page-meta-bar .bc-icon {
  width: 14px;
  height: 14px;
  background: #e67e22;
  flex-shrink: 0;
}

.legacy-list-page .page-meta-bar .breadcrumb {
  color: #333;
  flex: 1;
}

.legacy-list-page .page-meta-bar > .legacy-btn {
  margin-left: auto;
}

.legacy-list-page .page-meta-bar .process-flow {
  color: #0066cc;
  white-space: nowrap;
  margin-left: auto;
}

.legacy-list-page .filter-panel {
  background: linear-gradient(180deg, #dceaf8 0%, #c8ddf0 100%);
  border: 1px solid #7a9ec0;
  padding: 5px 8px;
  margin-bottom: 4px;
  width: 100%;
  box-sizing: border-box;
}

.legacy-list-page .filter-form .el-form-item {
  margin-bottom: 4px;
  margin-right: 8px;
}

.legacy-list-page .filter-form .el-form-item__label {
  font-size: 12px;
  padding-right: 4px;
  color: #333;
}

.legacy-list-page .filter-form .el-input__wrapper,
.legacy-list-page .filter-form .el-select__wrapper {
  font-size: 12px;
}

.legacy-list-page .filter-grid {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(150px, 1.15fr) minmax(180px, 1.35fr) minmax(180px, 1.35fr) 182px minmax(88px, 0.75fr) auto;
  grid-template-rows: 28px 28px 28px;
  gap: 4px 8px;
  width: 100%;
  align-items: center;
}

/* 待入库/待出库查询区：四列全宽网格 */
.legacy-list-page .storeroom-query-grid {
  display: grid;
  gap: 4px 10px;
  width: 100%;
  align-items: center;
  box-sizing: border-box;
}

.legacy-list-page .storeroom-query-grid .field-pair {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.legacy-list-page .storeroom-query-grid .field-pair label {
  flex: 0 0 auto;
  min-width: 56px;
  text-align: right;
  color: #333;
  font-size: 12px;
  white-space: nowrap;
}

.legacy-list-page .storeroom-query-grid .field-pair .el-input,
.legacy-list-page .storeroom-query-grid .field-pair .el-select,
.legacy-list-page .storeroom-query-grid .field-pair .el-date-editor {
  flex: 1;
  min-width: 0;
  width: 100% !important;
}

.legacy-list-page .storeroom-query-grid .field-pair.misc {
  justify-content: flex-start;
  padding-left: 4px;
}

.legacy-list-page .storeroom-query-grid .field-pair.row-actions {
  justify-content: flex-end;
}

/* Align catalog/BillListPage filters with finance payments filter-grid */
.legacy-list-page .filter-grid-dynamic {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(100px, 0.9fr) minmax(180px, 1.2fr) minmax(100px, 0.9fr) auto;
  grid-template-rows: auto;
  grid-auto-rows: 28px;
  gap: 4px 8px;
  width: 100%;
  align-items: center;
}

/* Filter toolbar: legacy-btn matches finance el-button size="small" */
.legacy-list-page .filter-panel .legacy-btn,
.legacy-list-page .filter-panel button.legacy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 24px;
  min-height: 24px;
  padding: 0 11px;
  margin: 0;
  font-size: 12px;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid #dcdfe6;
  background: #ffffff;
  color: #606266;
  cursor: pointer;
  font-family: inherit;
}

.legacy-list-page .filter-panel .legacy-btn:hover,
.legacy-list-page .filter-panel button.legacy-btn:hover {
  color: var(--el-color-primary, #409eff);
  border-color: #c6e2ff;
  background: #ecf5ff;
}

.legacy-list-page .filter-panel .legacy-btn-primary,
.legacy-list-page .filter-panel button.legacy-btn-primary {
  background: var(--el-color-primary, #409eff);
  border-color: var(--el-color-primary, #409eff);
  color: #ffffff;
}

.legacy-list-page .filter-panel .legacy-btn-primary:hover,
.legacy-list-page .filter-panel button.legacy-btn-primary:hover {
  background: var(--el-color-primary-light-3, #79bbff);
  border-color: var(--el-color-primary-light-3, #79bbff);
  color: #ffffff;
}

.legacy-list-page .filter-panel .legacy-btn-add,
.legacy-list-page .filter-panel button.legacy-btn-add {
  background: var(--el-color-success, #67c23a);
  border-color: var(--el-color-success, #67c23a);
  color: #ffffff;
}

.legacy-list-page .filter-panel .legacy-btn-add:hover,
.legacy-list-page .filter-panel button.legacy-btn-add:hover {
  background: var(--el-color-success-light-3, #95d475);
  border-color: var(--el-color-success-light-3, #95d475);
  color: #ffffff;
}

/* human-grid filters inside filter-panel: drop cream table look, match finance density */
.legacy-list-page .filter-panel .human-grid-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px 4px;
  background: transparent;
  table-layout: fixed;
}

.legacy-list-page .filter-panel .human-grid-table td {
  border: none !important;
  background: transparent !important;
  padding: 0 2px !important;
  vertical-align: middle;
  font-size: 12px;
}

.legacy-list-page .filter-panel .human-grid-table td.lbl {
  width: 64px;
  text-align: right;
  color: #333;
  white-space: nowrap;
  padding-right: 4px !important;
}

.legacy-list-page .filter-panel .human-grid-table .legacy-native-input,
.legacy-list-page .filter-panel .human-grid-table select.legacy-native-input {
  height: 24px;
  font-size: 12px;
  border: 1px solid #dcdfe6;
  border-radius: 3px;
  background: #fff;
  padding: 0 8px;
  width: 100%;
  box-sizing: border-box;
}

.legacy-list-page .filter-grid-dynamic .field-pair.misc {
  grid-column: span 2;
}

.legacy-list-page .filter-grid-dynamic .row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
  min-height: 28px;
}

.legacy-list-page .filter-grid-dynamic .filter-toolbar-row {
  grid-column: 7;
  justify-content: flex-end;
  padding-top: 0;
  grid-row: auto;
  min-height: 28px;
  height: auto;
  flex-wrap: nowrap;
}

.legacy-list-page .filter-grid-dynamic.filter-grid-compact {
  gap: 3px 6px;
}

.legacy-list-page.bill-list-page.compact-filter-panel .filter-panel {
  padding: 4px 6px;
  margin-bottom: 2px;
}

.legacy-list-page .filter-grid-dynamic .field-pair.span-2 {
  grid-column: span 2;
}

.legacy-list-page .filter-grid-dynamic .field-pair.field-employee {
  max-width: 148px;
}

.legacy-list-page .filter-grid-dynamic .field-pair.field-employee .employee-select-narrow,
.legacy-list-page .filter-grid-dynamic .field-pair.field-employee .el-select {
  width: 100%;
  max-width: 108px;
}

.legacy-list-page .filter-grid-dynamic .field-pair.name-pair {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.legacy-list-page .filter-grid-dynamic .field-pair.name-pair .el-input {
  flex: 1 1 auto;
  min-width: 0;
}

.legacy-list-page .filter-grid-dynamic .field-pair.name-pair .suffix-checkbox,
.legacy-list-page .filter-grid-dynamic .field-pair.name-pair .el-checkbox {
  flex-shrink: 0;
  margin-right: 0;
  white-space: nowrap;
}

.legacy-list-page .filter-grid-dynamic .field-pair.name-pair .el-checkbox__label {
  font-size: 12px;
  padding-left: 4px;
}

.legacy-list-page .filter-grid-dynamic .field-pair.field-date-range {
  max-width: 360px;
}

.legacy-list-page .field-pair .separate-date-range,
.legacy-list-page .filter-grid .field-pair .separate-date-range {
  width: 100%;
  min-width: 0;
}

.legacy-list-page .field-pair .separate-date-range :deep(.el-date-editor),
.legacy-list-page .filter-grid .field-pair .separate-date-range :deep(.el-date-editor) {
  width: auto !important;
  flex: 1 1 0;
  min-width: 96px;
}

.legacy-list-page .field-pair.field-date-range .separate-date-range.sdr-compact :deep(.el-date-editor),
.legacy-list-page .filter-grid .field-pair.field-date-range .separate-date-range.sdr-compact :deep(.el-date-editor) {
  flex: 0 1 132px;
  min-width: 124px;
  max-width: 140px;
  width: 132px !important;
}

.legacy-list-page .filter-grid-dynamic.filter-grid-single-row {
  grid-template-columns: minmax(118px, 1.05fr) minmax(118px, 1.05fr) minmax(108px, 0.95fr) minmax(98px, 0.85fr) minmax(108px, 0.95fr) minmax(88px, 0.75fr) auto;
  grid-template-rows: 28px;
  gap: 2px 6px;
}

.legacy-list-page .filter-grid-dynamic.filter-grid-single-row .filter-toolbar-row {
  grid-column: auto;
  justify-content: flex-end;
  padding-top: 0;
  flex-wrap: nowrap;
}

.legacy-list-page.bill-list-page.compact-filter-row .filter-panel {
  padding: 4px 6px;
  margin-bottom: 2px;
}

.legacy-list-page.bill-list-page.compact-filter-row .page-meta-bar {
  margin-bottom: 2px;
}

.legacy-list-page .field-pair {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: visible;
}

.legacy-list-page .field-pair label {
  flex: 0 0 auto;
  color: #333;
  font-size: 12px;
  white-space: nowrap;
  text-align: right;
}

.legacy-list-page .field-pair .el-input,
.legacy-list-page .field-pair .el-select,
.legacy-list-page .field-pair .el-date-editor {
  flex: 1;
  min-width: 0;
  width: 100% !important;
}

.legacy-list-page .field-pair .el-range-input {
  font-size: 12px;
}

.legacy-list-page .field-pair .el-range-separator {
  padding: 0 2px;
}

.legacy-list-page .field-pair.span-2 {
  grid-column: span 2;
}

.legacy-list-page .field-pair.misc {
  gap: 10px;
  padding-left: 2px;
  overflow: visible;
}

.legacy-list-page .field-pair.misc .el-checkbox {
  margin-right: 0;
  flex-shrink: 0;
}

.legacy-list-page .field-pair.misc .el-checkbox__label {
  font-size: 12px;
  padding-left: 4px;
}

.legacy-list-page .status-group {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: visible;
}

.legacy-list-page .status-group .status-label {
  flex: 0 0 22px;
  width: 22px;
  min-width: 22px;
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  line-height: 28px;
  color: #333;
}

.legacy-list-page .status-group .el-checkbox {
  margin-right: 6px;
  height: 28px;
  flex-shrink: 0;
}

.legacy-list-page .status-group .el-checkbox__label {
  font-size: 12px;
  padding-left: 4px;
}

.legacy-list-page .row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  white-space: nowrap;
}

.legacy-list-page .table-wrap {
  background: #fff;
  border: 1px solid #999;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: auto;
  max-height: calc(100vh - 180px);
}

.legacy-list-page.bill-list-page .table-wrap {
  max-height: none;
}

.legacy-list-page.bill-list-page .legacy-grid-table {
  table-layout: auto;
  min-width: max-content;
}

.legacy-list-page.bill-list-page.sticky-action-column .table-wrap {
  overflow: auto;
}

.legacy-list-page.bill-list-page.sticky-action-column .legacy-grid-table th.actions-col,
.legacy-list-page.bill-list-page.sticky-action-column .legacy-grid-table td.actions-col {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -4px 0 6px -2px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
  min-width: 120px;
}

.legacy-list-page.bill-list-page.sticky-action-column .legacy-grid-table th.actions-col {
  z-index: 3;
  background: #ece9d8;
}

.legacy-list-page.bill-list-page.sticky-action-column .legacy-grid-table tbody tr:nth-child(even) td.actions-col {
  background: #f7f7f7;
}

.legacy-list-page.crm-company-list,
.legacy-list-page.crm-partners-list {
  align-self: stretch;
  width: 100%;
}
.legacy-list-page.crm-company-list .filter-grid.crm-filter-grid,
.legacy-list-page.crm-partners-list .filter-grid.crm-filter-grid {
  grid-template-columns: minmax(190px, 1.15fr) minmax(160px, 1.1fr) minmax(160px, 1.1fr) minmax(140px, 1fr) minmax(180px, 1.15fr) minmax(140px, 1fr);
  grid-template-rows: repeat(2, minmax(28px, auto));
  gap: 6px 10px;
}
.legacy-list-page.crm-company-list .filter-grid.crm-filter-grid .span-2,
.legacy-list-page.crm-partners-list .filter-grid.crm-filter-grid .span-2 {
  grid-column: span 2;
}
.legacy-list-page.crm-company-list .filter-grid.crm-filter-grid .span-3,
.legacy-list-page.crm-partners-list .filter-grid.crm-filter-grid .span-3 {
  grid-column: span 3;
}
.legacy-list-page.crm-company-list .field-pair.name-pair,
.legacy-list-page.crm-company-list .field-pair.product-pair,
.legacy-list-page.crm-partners-list .field-pair.name-pair,
.legacy-list-page.crm-partners-list .field-pair.product-pair {
  gap: 6px;
}
.legacy-list-page.crm-company-list .field-pair.name-pair .el-checkbox,
.legacy-list-page.crm-company-list .field-pair.product-pair .el-checkbox,
.legacy-list-page.crm-partners-list .field-pair.name-pair .el-checkbox,
.legacy-list-page.crm-partners-list .field-pair.product-pair .el-checkbox {
  flex-shrink: 0;
  margin-right: 0;
}
.legacy-list-page.crm-company-list .field-pair.name-pair .el-checkbox__label,
.legacy-list-page.crm-company-list .field-pair.product-pair .el-checkbox__label,
.legacy-list-page.crm-partners-list .field-pair.name-pair .el-checkbox__label,
.legacy-list-page.crm-partners-list .field-pair.product-pair .el-checkbox__label {
  font-size: 12px;
  padding-left: 4px;
}
.legacy-list-page.crm-company-list .field-pair.category-group,
.legacy-list-page.crm-partners-list .field-pair.category-group {
  gap: 6px;
}
.legacy-list-page.crm-company-list .field-pair.category-group label,
.legacy-list-page.crm-partners-list .field-pair.category-group label {
  flex: 0 0 auto;
}
.legacy-list-page.crm-company-list .field-pair.category-group .el-select,
.legacy-list-page.crm-partners-list .field-pair.category-group .el-select {
  flex: 1;
  min-width: 0;
}
.legacy-list-page.crm-company-list .field-pair.sort-group,
.legacy-list-page.crm-partners-list .field-pair.sort-group {
  gap: 6px;
  overflow: visible;
}
.legacy-list-page.crm-company-list .field-pair.sort-group label,
.legacy-list-page.crm-partners-list .field-pair.sort-group label {
  flex: 0 0 auto;
}
.legacy-list-page.crm-company-list .field-pair.sort-group .el-radio-group,
.legacy-list-page.crm-partners-list .field-pair.sort-group .el-radio-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.legacy-list-page.crm-company-list .field-pair.sort-group .el-radio,
.legacy-list-page.crm-partners-list .field-pair.sort-group .el-radio {
  margin-right: 0;
  height: 28px;
}
.legacy-list-page.crm-company-list .field-pair.sort-group .el-radio__label,
.legacy-list-page.crm-partners-list .field-pair.sort-group .el-radio__label {
  font-size: 12px;
  padding-left: 4px;
}
.legacy-list-page.crm-company-list .row-actions,
.legacy-list-page.crm-partners-list .row-actions {
  justify-content: flex-end;
  gap: 4px;
  padding: 0 4px 0 8px;
  box-sizing: border-box;
  min-width: 0;
  overflow: visible;
  flex-wrap: nowrap;
}
.legacy-list-page.crm-company-list .row-actions.toolbar-top,
.legacy-list-page.crm-partners-list .row-actions.toolbar-top {
  justify-content: flex-end;
}
.legacy-list-page.crm-company-list .row-actions.toolbar-bottom,
.legacy-list-page.crm-partners-list .row-actions.toolbar-bottom {
  justify-content: flex-end;
  padding-right: 0;
}

.legacy-list-page.crm-company-list .table-wrap,
.legacy-list-page.crm-partners-list .table-wrap,
.legacy-list-page.crm-auth-companies-list .table-wrap,
.legacy-list-page.crm-distribute-set .table-wrap {
  /* Let el-table own horizontal scroll so header/body stay aligned. */
  overflow: visible;
  max-height: none;
}

.legacy-list-page.crm-company-list .crm-company-table,
.legacy-list-page.crm-partners-list .crm-company-table {
  width: 100% !important;
  min-width: 1080px;
}

.legacy-list-page.crm-auth-companies-list .auth-table,
.legacy-list-page.crm-distribute-set .auth-table {
  min-width: 960px;
}

.legacy-list-page.crm-company-list .row-indicator-col .cell,
.legacy-list-page.crm-partners-list .row-indicator-col .cell {
  color: #666;
  font-size: 11px;
  padding: 0;
}

.legacy-list-page .legacy-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.legacy-list-page .legacy-grid-table th {
  background: #ece9d8;
  border: 1px solid #999;
  padding: 4px 6px;
  font-weight: normal;
  text-align: center;
  white-space: nowrap;
}

.legacy-list-page .legacy-grid-table td {
  border: 1px solid #ccc;
  padding: 3px 6px;
  line-height: 18px;
}

.legacy-list-page .legacy-grid-table tbody tr:nth-child(even) td {
  background: #f7f7f7;
}

.legacy-list-page .legacy-grid-table .center {
  text-align: center;
}

.legacy-list-page .legacy-grid-table .empty-row {
  text-align: center;
  color: #999;
  padding: 8px;
  line-height: 20px;
}

.legacy-list-page .legacy-grid-table.compact-table {
  font-size: 11px;
  table-layout: fixed;
}

.legacy-list-page .legacy-grid-table.compact-table th {
  padding: 3px 4px;
}

.legacy-list-page .legacy-grid-table.compact-table td {
  padding: 2px 4px;
  line-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legacy-list-page .legacy-grid-table.compact-table .money-cell {
  font-size: 11px;
}

.legacy-list-page .link-action {
  color: #0066cc;
  text-decoration: none;
  cursor: pointer;
}

.legacy-list-page .link-action:hover {
  text-decoration: underline;
}

.legacy-list-page .link-action + .link-action {
  margin-left: 8px;
}

.legacy-list-page .link-action.danger {
  color: #c00;
}

.legacy-list-page .link-disabled {
  color: #bbb;
  cursor: not-allowed;
  text-decoration: none;
}

.legacy-list-page .legacy-table .el-table__header th {
  background: #e8dcc8;
  color: #333;
  font-size: 12px;
  padding: 4px 0;
}

.legacy-list-page .legacy-table .el-table__body td {
  font-size: 12px;
  padding: 3px 0;
}

.legacy-list-page .compact-table .cell {
  padding-left: 2px;
  padding-right: 2px;
  line-height: 18px;
}

.legacy-list-page .compact-table .el-button.is-link {
  padding: 0 1px;
  font-size: 11px;
  height: auto;
}

.legacy-list-page .money-cell {
  color: #0066cc;
  font-weight: 500;
}

.legacy-list-page .link-cell {
  color: #0066cc;
  cursor: pointer;
  margin-right: 4px;
}

.legacy-list-page .link-cell.danger {
  color: #c00;
}

.legacy-list-page .link-cell:hover {
  text-decoration: underline;
}

.crm-owner-tooltip {
  white-space: pre-line;
  max-width: 320px;
  line-height: 1.5;
}

/* legacy 风格覆盖 Element Plus 控件 */
.legacy-list-page .el-input__wrapper,
.legacy-list-page .el-select__wrapper {
  border-radius: 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
  min-height: 22px;
  padding: 0 4px;
}

.legacy-list-page .el-input__inner {
  font-size: 12px;
  height: 20px;
  line-height: 20px;
}

.legacy-list-page .el-checkbox__label {
  font-size: 12px;
}

.legacy-list-page .el-pagination {
  --el-pagination-font-size: 12px;
}

.legacy-list-page .grant-split {
  display: flex;
  gap: 0;
  min-height: 480px;
  border: 1px solid #87b8d9;
  background: #fff;
  margin: 4px;
  overflow: visible;
}

.legacy-list-page .grant-tree-side {
  width: 200px;
  border-right: 1px solid #87b8d9;
  flex-shrink: 0;
}

.legacy-list-page .grant-main-side {
  flex: 1;
  padding: 8px;
  overflow: auto;
}

.legacy-list-page .grant-panel-head {
  padding: 4px 8px;
  background: #f5f8fc;
  border-bottom: 1px solid #b8cfe0;
  font-weight: 600;
  font-size: 12px;
}

.legacy-list-page .grant-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}

.legacy-list-page .grant-toolbar-actions {
  display: flex;
  gap: 8px;
}

.legacy-list-page .grant-hint-bar {
  margin: 0 0 8px;
  padding: 6px 8px;
  font-size: 12px;
  color: #666;
  background: #f7fbff;
  border: 1px solid #d8e8f4;
}

.legacy-list-page .perm-grant-tree {
  font-size: 12px;
  border: 1px solid #d8e4ef;
  padding: 6px 4px;
  background: #fff;
}

.legacy-list-page .perm-grant-tree-wrap {
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.legacy-list-page .perm-grant-tree-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 8px 12px;
  border: 1px solid #c5d5e5;
  border-bottom: none;
  background: linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
}

.legacy-list-page .perm-grant-tree-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.legacy-list-page .perm-tree-search {
  width: 260px;
}

.legacy-list-page .perm-tree-search .el-input__wrapper {
  border-radius: 3px;
}

.legacy-list-page .perm-node-code {
  margin-left: 6px;
  font-size: 11px;
  color: #8899aa;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.legacy-list-page .perm-grant-tree .perm-node-name mark.search-hit,
.legacy-list-page .perm-grant-tree mark.search-hit {
  padding: 0;
  color: #c0392b;
  background: #ffe8e0;
  font-weight: 700;
}

.legacy-list-page .perm-select-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  background: linear-gradient(180deg, #4a90d9 0%, #357abd 100%);
  border: 1px solid #2d6ba3;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 40, 80, 0.18);
}

.legacy-list-page .perm-select-all-btn:hover {
  background: linear-gradient(180deg, #5a9de6 0%, #4086ca 100%);
}

.legacy-list-page .perm-select-all-btn:active {
  background: #2f6fad;
  box-shadow: inset 0 1px 2px rgba(0, 40, 80, 0.25);
}

.legacy-list-page .perm-select-all-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: linear-gradient(#fff, #fff) center/8px 2px no-repeat, linear-gradient(#fff, #fff) center/2px 8px no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 2px;
  opacity: 0.95;
}

.legacy-list-page .perm-select-hint {
  flex: 1;
  min-width: 180px;
  font-size: 11px;
  color: #667788;
  line-height: 1.4;
}

.legacy-list-page .perm-grant-tree .el-tree-node.perm-tree-menu > .el-tree-node__content .el-checkbox,
.legacy-list-page .perm-grant-tree .el-tree-node.perm-tree-page > .el-tree-node__content .el-checkbox {
  margin-right: 2px;
}

.legacy-list-page .perm-grant-tree .el-tree-node.perm-tree-inherited > .el-tree-node__content {
  color: #777;
}

.legacy-list-page .perm-grant-tree .el-tree-node.perm-tree-inherited > .el-tree-node__content .el-checkbox__input {
  cursor: not-allowed;
}

.legacy-list-page .perm-grant-tree .el-tree-node.perm-tree-button > .el-tree-node__content {
  color: #2d5a87;
}

.legacy-list-page .perm-grant-tree .el-tree-node.perm-tree-button > .el-tree-node__content .perm-node-name::before {
  content: "[按钮] ";
  color: #8899aa;
  font-size: 11px;
}

.legacy-list-page .perm-button-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 4px;
  border: 1px solid #7aa3cc;
  border-radius: 2px;
  background: linear-gradient(180deg, #eef5fb 0%, #dceaf5 100%);
  vertical-align: -2px;
}

.legacy-list-page .perm-grant-tree .el-tree-node__content {
  height: auto;
  min-height: 24px;
  line-height: 24px;
  align-items: flex-start;
  padding-top: 2px;
  padding-bottom: 2px;
}

.legacy-list-page .perm-node-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  max-width: calc(100% - 24px);
}

.legacy-list-page .perm-node-row.is-folder .perm-node-name {
  font-weight: 600;
}

.legacy-list-page .perm-folder-icon {
  display: inline-block;
  width: 14px;
  height: 12px;
  margin-right: 2px;
  background: linear-gradient(#ffe98a, #f5c842);
  border: 1px solid #c9a020;
  vertical-align: middle;
  flex-shrink: 0;
}

.legacy-list-page .perm-node-name {
  margin-right: 6px;
}

.legacy-list-page .perm-meta {
  color: #888;
  font-size: 11px;
}

.legacy-list-page .perm-meta-role {
  color: #999;
}

.legacy-list-page .perm-grant-tree .el-tree-node.is-disabled > .el-tree-node__content {
  color: #666;
}

.legacy-list-page .org-tree-empty {
  padding: 12px 8px;
  color: #999;
  font-size: 12px;
}

.legacy-list-page .legacy-side-menu {
  border: none;
  font-size: 12px;
}

.legacy-list-page .legacy-side-menu .el-menu-item {
  height: 28px;
  line-height: 28px;
  font-size: 12px;
}

.legacy-list-page .switch-tabs-legacy {
  display: flex;
  min-height: 420px;
  border: 1px solid #87b8d9;
  background: #fff;
  margin: 4px;
}

.legacy-list-page .switch-tabs-nav {
  width: 140px;
  border-right: 1px solid #b8cfe0;
  background: #f5f8fc;
  flex-shrink: 0;
}

.legacy-list-page .switch-tab-item {
  display: block;
  padding: 6px 8px;
  font-size: 12px;
  color: #333;
  cursor: pointer;
  border-bottom: 1px solid #e0e8f0;
  text-decoration: none;
}

.legacy-list-page .switch-tab-item.active {
  background: #fff;
  color: #0066cc;
  font-weight: 600;
}

.legacy-list-page .switch-tabs-body {
  flex: 1;
  padding: 12px;
  font-size: 12px;
}

.legacy-list-page .switch-tabs-body h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
}

.legacy-list-page .switch-tabs-body label {
  display: block;
  margin: 4px 0;
  line-height: 22px;
}

.legacy-list-page .pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px;
  font-size: 12px;
  color: #666;
}

.legacy-list-page .pagination-bar .money-sum-info {
  flex: 1;
  min-width: 0;
  color: #333;
  line-height: 1.4;
  word-break: break-word;
}

.legacy-list-page .pagination-bar .pagination-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.legacy-list-page .page-tabs {
  margin-bottom: 4px;
}

.legacy-list-page .page-tabs .el-tabs__header {
  margin-bottom: 0;
  background: #f5f8fc;
  border: 1px solid #b8cfe0;
  padding: 0 8px;
}

.legacy-list-page .page-tabs .el-tabs__item {
  font-size: 12px;
  height: 32px;
  line-height: 32px;
}

.legacy-list-page .placeholder-card {
  background: #fff;
  border: 1px solid #999;
  padding: 48px 0;
  text-align: center;
}

.legacy-list-page .filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.legacy-list-page .form-card,
.legacy-list-page .panel-card {
  background: #fff;
  border: 1px solid #999;
  padding: 12px;
  margin-bottom: 4px;
}

/* ── 人事组织 legacy 表单（与 Human_Department 截图一致） ── */
.legacy-list-page .legacy-btn {
  min-width: 72px;
}

.legacy-list-page .legacy-btn:disabled {
  cursor: not-allowed;
}

.legacy-list-page .legacy-native-input,
.legacy-list-page .legacy-native-select,
.legacy-list-page .legacy-native-textarea {
  border: 1px solid #7f9db9;
  font-size: 12px;
  font-family: SimSun, "宋体", "Microsoft YaHei", sans-serif;
  padding: 1px 3px;
  box-sizing: border-box;
  width: 100%;
  background: #fff;
}

.legacy-list-page .legacy-native-input {
  height: 20px;
}

.legacy-list-page .legacy-native-input.highlight {
  background: #e8f2fe;
}

.legacy-list-page .legacy-native-textarea {
  resize: vertical;
  min-height: 64px;
}

.legacy-list-page .human-form-box {
  border: 1px solid #87b8d9;
  margin-bottom: 6px;
  background: #fff;
}

.legacy-list-page .emp-role-box .emp-role-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 4px 0 2px;
}

.legacy-list-page .emp-role-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.legacy-list-page .emp-role-type {
  color: #778899;
  font-size: 11px;
}

.legacy-list-page .emp-role-hint,
.legacy-list-page .muted-hint {
  margin: 6px 0 0;
  color: #8899aa;
  font-size: 11px;
  line-height: 1.45;
}

.legacy-list-page .human-grid-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.legacy-list-page .human-grid-table td {
  border: 1px solid #b8cfe0;
  padding: 2px 4px;
  vertical-align: middle;
}

.legacy-list-page .human-grid-table .lbl {
  width: 72px;
  background: #eef4fa;
  text-align: right;
  white-space: nowrap;
  color: #333;
}

.legacy-list-page .human-grid-table .lbl.req {
  color: #c00;
}

.legacy-list-page .human-grid-table .val {
  background: #fff;
}

.legacy-list-page .human-grid-table .link-action {
  color: #0066cc;
  cursor: pointer;
  margin-right: 8px;
  text-decoration: none;
}

.legacy-list-page .human-grid-table .link-action:hover {
  text-decoration: underline;
}

.legacy-list-page .human-grid-table .hint {
  color: #888;
  font-size: 11px;
  margin-left: 4px;
}

.legacy-list-page .human-grid-table .readonly-val {
  color: #333;
}

.legacy-list-page .file-cell {
  vertical-align: top;
}

.legacy-list-page .file-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 12px;
}

.legacy-list-page .file-row input[type=file] {
  font-size: 11px;
  max-width: 90px;
}

.legacy-list-page .org-split {
  display: flex;
  gap: 0;
  min-height: 520px;
  border: 1px solid #87b8d9;
  background: #fff;
  overflow: visible;
}

.legacy-list-page .org-tree-side {
  width: 168px;
  flex-shrink: 0;
  border-right: 1px solid #87b8d9;
  font-size: 12px;
}

.legacy-list-page .org-tree-head {
  padding: 4px 6px;
  border-bottom: 1px solid #b8cfe0;
  background: #f5f8fc;
  line-height: 1.4;
}

.legacy-list-page .org-tree-head .add-dept {
  color: #0066cc;
  cursor: pointer;
  text-decoration: none;
}

.legacy-list-page .org-tree-head .add-dept:hover {
  text-decoration: underline;
}

.legacy-list-page .org-tree-body {
  padding: 4px 2px;
  overflow: auto;
  max-height: calc(100vh - 200px);
}

.legacy-list-page .org-tree-empty {
  padding: 8px;
  color: #999;
  font-size: 12px;
}

.legacy-org-tree {
  font-size: 12px;
  line-height: 18px;
}

.legacy-org-tree .org-tree-row {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 1px 4px 1px 0;
  cursor: default;
  user-select: none;
}

.legacy-org-tree .org-tree-row.is-employee {
  cursor: pointer;
  color: #0066cc;
}

.legacy-org-tree .org-tree-row.is-department,
.legacy-org-tree .org-tree-row.is-root {
  cursor: pointer;
  color: #333;
}

.legacy-org-tree .org-tree-row:hover {
  background: #eef4fa;
}

.legacy-org-tree .org-tree-row.active {
  color: #c00;
  font-weight: bold;
}

.legacy-org-tree .org-tree-toggle {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  cursor: pointer;
  border: 1px solid #808080;
  background: #fff;
  position: relative;
  box-sizing: border-box;
}

.legacy-org-tree .org-tree-toggle::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 4px;
  height: 1px;
  background: #000;
}

.legacy-org-tree .org-tree-toggle:not(.expanded)::after {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 4px;
  width: 1px;
  background: #000;
}

.legacy-org-tree .org-tree-toggle.placeholder {
  visibility: hidden;
  border: none;
  background: transparent;
}

.legacy-org-tree .org-tree-toggle.placeholder::before,
.legacy-org-tree .org-tree-toggle.placeholder::after {
  display: none;
}

.legacy-org-tree .node-icon.folder-icon {
  width: 16px;
  height: 14px;
  background: #f4d03f;
  border: 1px solid #c9a000;
  flex-shrink: 0;
}

.legacy-org-tree .node-icon.person-icon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  flex-shrink: 0;
  background: #6eb5ff;
}

.legacy-org-tree .node-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legacy-list-page .org-tree-folder {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 4px;
  cursor: default;
}

.legacy-list-page .org-tree-folder .folder-icon {
  width: 16px;
  height: 14px;
  background: #f4d03f;
  border: 1px solid #c9a000;
  flex-shrink: 0;
}

.legacy-list-page .org-emp-item {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 1px 4px 1px 18px;
  cursor: pointer;
  color: #0066cc;
  line-height: 18px;
}

.legacy-list-page .org-emp-item:hover {
  background: #eef4fa;
}

.legacy-list-page .org-emp-item.active {
  color: #c00;
  font-weight: bold;
}

.legacy-list-page .org-emp-item .person-icon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  flex-shrink: 0;
}

.legacy-list-page .org-emp-item .person-icon.male {
  background: #6eb5ff;
}

.legacy-list-page .org-emp-item .person-icon.female {
  background: #ffb6c1;
}

.legacy-list-page .org-detail-side {
  flex: 1;
  padding: 6px;
  overflow: auto;
}

.legacy-list-page .human-action-bar {
  text-align: center;
  padding: 8px 0 4px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 添加新员工弹窗内表格 */
.legacy-window .add-emp-table,
.legacy-window-dialog .add-emp-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 6px;
  font-size: 12px;
}

.legacy-window .add-emp-table td,
.legacy-window-dialog .add-emp-table td {
  border: 1px solid #b8cfe0;
  padding: 2px 4px;
  vertical-align: middle;
}

.legacy-window .add-emp-table .lbl,
.legacy-window-dialog .add-emp-table .lbl {
  background: #f2f2f2;
  text-align: right;
  white-space: nowrap;
}

.legacy-window .add-emp-table .lbl.req,
.legacy-window-dialog .add-emp-table .lbl.req {
  color: #c00;
}

.legacy-window .add-emp-table .schedule-hd,
.legacy-window-dialog .add-emp-table .schedule-hd {
  background: #f2f2f2;
  text-align: center;
  font-weight: normal;
}

.legacy-window .add-emp-table .schedule-cell,
.legacy-window-dialog .add-emp-table .schedule-cell {
  text-align: center;
  background: #fff;
}

.legacy-window .add-emp-box,
.legacy-window-dialog .add-emp-box {
  border: 1px solid #d1e7f7;
  margin-bottom: 6px;
  padding: 0;
}

.legacy-window .add-emp-box.login-box,
.legacy-window-dialog .add-emp-box.login-box {
  background: #fff;
}

.legacy-window .add-emp-box .legacy-native-input,
.legacy-window-dialog .add-emp-box .legacy-native-input {
  border: 1px solid #7f9db9;
  font-size: 12px;
  height: 20px;
  padding: 1px 3px;
  width: 100%;
  box-sizing: border-box;
  font-family: SimSun, "宋体", "Microsoft YaHei", sans-serif;
}

.legacy-window .add-emp-box .legacy-native-input.hl,
.legacy-window-dialog .add-emp-box .legacy-native-input.hl {
  background: #e8f2fe;
}

.legacy-window .add-emp-box select.legacy-native-select,
.legacy-window-dialog .add-emp-box select.legacy-native-select {
  border: 1px solid #7f9db9;
  font-size: 12px;
  height: 20px;
  font-family: SimSun, "宋体", "Microsoft YaHei", sans-serif;
}

.legacy-window .legacy-btn,
.legacy-window-dialog .legacy-btn {
  min-width: 72px;
}

.legacy-list-page.crm-partners-list .partners-body {
  display: flex;
  gap: 0;
  align-items: flex-start;
}
.legacy-list-page.crm-partners-list .category-sidebar {
  flex: 0 0 148px;
  background: #f3f6fa;
  border: 1px solid #b8cfe0;
  margin-right: 4px;
  padding: 4px 0;
}
.legacy-list-page.crm-partners-list .category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 6px 10px;
  font-size: 12px;
  color: #333;
  cursor: pointer;
  text-align: left;
}
.legacy-list-page.crm-partners-list .category-item:hover,
.legacy-list-page.crm-partners-list .category-item.active {
  background: #dceaf8;
  color: #003399;
}
.legacy-list-page.crm-partners-list .cat-count {
  color: #666;
  font-size: 11px;
}
.legacy-list-page.crm-partners-list .partners-main {
  flex: 1;
  min-width: 0;
}
.legacy-list-page.crm-partners-list .row-actions.toolbar-top,
.legacy-list-page.crm-partners-list .row-actions.toolbar-bottom {
  justify-content: flex-end;
  gap: 4px;
}

.legacy-list-page.crm-auth-companies-list .auth-main,
.legacy-list-page.crm-distribute-set .auth-main {
  flex: 1;
  min-width: 0;
}
.legacy-list-page.crm-auth-companies-list .filter-grid.crm-auth-filter-grid,
.legacy-list-page.crm-distribute-set .filter-grid.crm-auth-filter-grid {
  grid-template-columns: minmax(88px, 0.78fr) minmax(88px, 0.78fr) minmax(88px, 0.78fr) minmax(104px, 0.88fr) minmax(88px, 0.72fr) minmax(88px, 0.72fr) auto;
  grid-template-rows: 28px;
  gap: 3px 6px;
  align-items: center;
}
.legacy-list-page.crm-auth-companies-list .filter-grid.crm-auth-filter-grid .field-pair label,
.legacy-list-page.crm-distribute-set .filter-grid.crm-auth-filter-grid .field-pair label {
  flex: 0 0 52px;
}
.legacy-list-page.crm-auth-companies-list .filter-grid.crm-auth-filter-grid .row-actions.toolbar-bottom,
.legacy-list-page.crm-distribute-set .filter-grid.crm-auth-filter-grid .row-actions.toolbar-bottom {
  grid-column: auto;
  justify-content: flex-end;
  flex-wrap: nowrap;
  min-height: 28px;
  overflow: visible;
  padding-top: 0;
  gap: 4px;
}
.legacy-list-page.crm-auth-companies-list .field-pair.select-pair label,
.legacy-list-page.crm-distribute-set .field-pair.select-pair label {
  display: none;
}
.legacy-list-page.crm-auth-companies-list .field-pair.select-pair .el-select,
.legacy-list-page.crm-distribute-set .field-pair.select-pair .el-select {
  width: 100%;
}
.legacy-list-page.crm-auth-companies-list .auth-table .auth-highlight,
.legacy-list-page.crm-distribute-set .auth-table .auth-highlight {
  color: #c00;
}
.legacy-list-page.crm-auth-companies-list .auth-table .belong-tag,
.legacy-list-page.crm-distribute-set .auth-table .belong-tag {
  margin-left: 6px;
  color: #666;
  font-size: 11px;
}
.legacy-list-page.crm-auth-companies-list .expand-row,
.legacy-list-page.crm-distribute-set .expand-row {
  display: flex;
  gap: 16px;
  padding: 4px 12px;
  font-size: 12px;
  color: #555;
}

.legacy-list-page.crm-distribute-set .filter-grid.crm-auth-filter-grid {
  grid-template-columns: minmax(92px, 0.88fr) minmax(104px, 0.98fr) minmax(108px, 0.9fr) minmax(88px, 0.75fr) minmax(112px, 0.85fr) auto;
}

/* 资源重分配：覆盖全局 filter-grid 三行布局 */
.legacy-list-page.crm-reallocate-resources .auth-main {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
}
.legacy-list-page.crm-reallocate-resources .filter-panel {
  padding: 6px 8px;
}
.legacy-list-page.crm-reallocate-resources .filter-grid.reallocate-filter-grid {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(150px, 1.1fr) minmax(140px, 1fr) minmax(110px, 0.85fr) minmax(120px, 0.9fr) auto;
  grid-template-rows: 28px 28px;
  gap: 6px 10px;
  align-items: center;
}
.legacy-list-page.crm-reallocate-resources .filter-grid.reallocate-filter-grid .field-pair {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.legacy-list-page.crm-reallocate-resources .filter-grid.reallocate-filter-grid .field-pair label {
  flex: 0 0 auto;
  min-width: 56px;
  text-align: right;
  white-space: nowrap;
}
.legacy-list-page.crm-reallocate-resources .filter-grid.reallocate-filter-grid .field-pair.span-2 {
  grid-column: 1/span 5;
}
.legacy-list-page.crm-reallocate-resources .filter-grid.reallocate-filter-grid .row-actions {
  grid-column: 6;
  grid-row: 1;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 28px;
}
.legacy-list-page.crm-reallocate-resources .hint-bar {
  margin: 6px 0 8px;
  padding: 6px 8px;
  background: #f7f9fc;
  border: 1px solid #e5eaf2;
  font-size: 12px;
  color: #445;
  line-height: 1.45;
}
.legacy-list-page.crm-reallocate-resources .table-wrap {
  max-height: none;
}
.legacy-list-page.crm-reallocate-resources .dirty-hint {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: #666;
}

/* 贸易方式：单行筛选，避免继承客户列表 3 行 filter-grid */
.legacy-list-page.crm-trade-method-page .filter-panel {
  padding: 6px 8px;
}
.legacy-list-page.crm-trade-method-page .filter-grid.trade-filter-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(120px, 0.9fr) minmax(140px, 1fr) minmax(140px, auto) auto;
  grid-template-rows: 28px;
  gap: 6px 10px;
  align-items: center;
}
.legacy-list-page.crm-trade-method-page .filter-grid.trade-filter-grid .field-pair {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.legacy-list-page.crm-trade-method-page .filter-grid.trade-filter-grid .field-pair label {
  flex: 0 0 auto;
  min-width: 56px;
  text-align: right;
  white-space: nowrap;
}
.legacy-list-page.crm-trade-method-page .filter-grid.trade-filter-grid .field-pair.misc {
  justify-content: flex-start;
}
.legacy-list-page.crm-trade-method-page .filter-grid.trade-filter-grid .row-actions {
  justify-content: flex-end;
  min-height: 28px;
}
.legacy-list-page.crm-trade-method-page .hint-bar {
  margin: 6px 0 8px;
  padding: 6px 8px;
  background: #f7f9fc;
  border: 1px solid #e5eaf2;
  font-size: 12px;
  color: #445;
  line-height: 1.45;
}
.legacy-list-page.crm-trade-method-page .table-wrap {
  max-height: none;
  background: #fff;
  border: 1px solid #999;
}
.legacy-list-page.crm-trade-method-page .pager-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  padding: 0 4px 4px;
}

/* Legacy 弹窗内 human-grid-table（与列表页查询区一致） */
.legacy-window-body .human-grid-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}
.legacy-window-body .human-grid-table td {
  border: 1px solid #b8cfe0;
  padding: 3px 5px;
  vertical-align: middle;
  line-height: 1.45;
}
.legacy-window-body .human-grid-table .lbl {
  width: 72px;
  background: #eef4fa;
  text-align: right;
  white-space: nowrap;
  color: #333;
}
.legacy-window-body .human-grid-table .val {
  background: #fff;
  color: #333;
}

.legacy-window-dialog.storeroom-inventory-detail-dialog .legacy-window-body,
.legacy-window-dialog.storeroom-inventory-detail-dialog .el-dialog__body {
  padding: 4px;
}

/* ---- Dialog / LegacyWindow footer buttons aligned with finance el-dialog ---- */
.legacy-window-footer .legacy-btn,
.el-dialog__footer .legacy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  min-height: 32px;
  padding: 0 15px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid #dcdfe6;
  background: #ffffff;
  color: #606266;
  cursor: pointer;
  font-family: inherit;
}

.legacy-window-footer .legacy-btn-primary,
.el-dialog__footer .legacy-btn-primary {
  background: var(--el-color-primary, #409eff);
  border-color: var(--el-color-primary, #409eff);
  color: #ffffff;
}

.legacy-window-footer .legacy-btn-add,
.el-dialog__footer .legacy-btn-add {
  background: var(--el-color-success, #67c23a);
  border-color: var(--el-color-success, #67c23a);
  color: #ffffff;
}

.el-dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.el-dialog__footer .el-button {
  margin: 0;
}

/* Shared list chrome aligned with finance 查凭证 (accounting-vouchers). */
.vlist-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.vlist-toolbar-left,
.vlist-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.vlist-toolbar-left {
  gap: 12px;
}

.vl-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: none;
  background: transparent;
  color: #4e5969;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 4px;
  font-family: inherit;
  min-width: 0;
  line-height: 1.2;
}

.vl-tool-btn:hover,
.vl-tool-btn.active {
  color: var(--el-color-primary, #2768ff);
  background: #edf4ff;
}

/* Keep 查询 / 重置 compact — avoid wide primary pill next to 过滤 */
.vlist-toolbar .el-button.el-button--small {
  min-width: 0;
  padding: 4px 10px;
}

.vlist-toolbar-left > .el-button.el-button--small {
  padding: 4px 8px;
}

.vlist-filter {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px 12px;
  background: #f7f8fa;
  border-radius: 4px;
  flex-wrap: wrap;
}

.vlist-filter .vl-filter-fields {
  flex: 1;
  min-width: 0;
}

.vlist-filter .vl-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.vlist-table-wrap {
  border: 1px solid #dce3ec;
  border-radius: 2px;
  overflow: auto;
  background: #fff;
}

.vlist-table-wrap:has(> .el-table) {
  overflow: hidden;
}

/* Qingxin: remap legacy list pages to 查凭证 visual language */
[data-ui-style=qingxin] .legacy-list-page {
  background: #ffffff !important;
  padding: 12px 16px 16px !important;
  font-size: 13px;
  color: #1d2129;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

[data-ui-style=qingxin] .legacy-list-page > .silk-page-header,
[data-ui-style=qingxin] .legacy-list-page > .vlist-toolbar,
[data-ui-style=qingxin] .legacy-list-page > .vlist-chrome,
[data-ui-style=qingxin] .legacy-list-page > .filter-panel,
[data-ui-style=qingxin] .legacy-list-page > .vlist-filter {
  flex-shrink: 0;
}

[data-ui-style=qingxin] .legacy-list-page .filter-panel,
[data-ui-style=qingxin] .legacy-list-page .vlist-filter-panel {
  background: #f7f8fa !important;
  border: none !important;
  border-radius: 4px;
  padding: 10px 12px !important;
  margin-bottom: 10px !important;
}

[data-ui-style=qingxin] .legacy-list-page .filter-grid,
[data-ui-style=qingxin] .legacy-list-page .filter-grid-dynamic {
  gap: 8px 12px;
  grid-auto-rows: minmax(32px, auto);
}

[data-ui-style=qingxin] .legacy-list-page .field-pair label,
[data-ui-style=qingxin] .legacy-list-page .vl-flabel {
  color: #4e5969;
  font-size: 13px;
  min-width: auto;
}

[data-ui-style=qingxin] .legacy-list-page .table-wrap {
  border: 1px solid #dce3ec !important;
  border-radius: 2px;
  background: #fff;
  padding: 0;
  max-height: none;
  overflow: auto;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

[data-ui-style=qingxin] .legacy-list-page .table-wrap:has(> .el-table) {
  overflow: hidden;
}

[data-ui-style=qingxin] .legacy-list-page .vlist-toolbar {
  margin-bottom: 8px;
}

[data-ui-style=qingxin] .legacy-list-page .pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 0 2px;
}

[data-ui-style=qingxin] .legacy-list-page .page-info {
  color: #86909c;
  font-size: 13px;
}

[data-ui-style=qingxin] .legacy-list-page .link-action,
[data-ui-style=qingxin] .legacy-list-page .vno-link {
  color: #2768ff !important;
  font-weight: 500;
  text-decoration: none;
}

[data-ui-style=qingxin] .legacy-list-page .link-action:hover,
[data-ui-style=qingxin] .legacy-list-page .vno-link:hover {
  text-decoration: underline;
}

[data-ui-style=qingxin] .legacy-list-page .link-action.danger {
  color: #f53f3f !important;
}

[data-ui-style=qingxin] .legacy-list-page .money-cell {
  color: #1d2129;
  font-variant-numeric: tabular-nums;
}

/* Hide heavy legacy page-meta chrome density; keep SilkPageHeader as-is */
[data-ui-style=qingxin] .legacy-list-page .page-meta-bar {
  background: transparent;
  border: none;
  padding: 0 0 8px;
  margin-bottom: 4px;
}

[data-ui-style=qingxin] .legacy-list-page .filter-panel .legacy-btn,
[data-ui-style=qingxin] .legacy-list-page .filter-panel button.legacy-btn {
  height: 32px;
  min-height: 32px;
  padding: 0 15px;
  font-size: 13px;
  border-radius: 4px;
}

[data-ui-style=qingxin] .legacy-list-page .filter-panel .legacy-btn-primary,
[data-ui-style=qingxin] .legacy-list-page .filter-panel button.legacy-btn-primary {
  background: var(--el-color-primary, #2768ff) !important;
  border-color: var(--el-color-primary, #2768ff) !important;
  color: #fff !important;
}

[data-ui-style=qingxin] .legacy-list-page .filter-panel .legacy-btn-add,
[data-ui-style=qingxin] .legacy-list-page .filter-panel button.legacy-btn-add {
  background: var(--el-color-primary, #2768ff) !important;
  border-color: var(--el-color-primary, #2768ff) !important;
  color: #fff !important;
}

/* BillListPage HTML table already themed; tighten to vlist cell padding */
[data-ui-style=qingxin] .legacy-list-page.bill-list-page .legacy-grid-table th,
[data-ui-style=qingxin] .legacy-list-page.bill-list-page .legacy-grid-table td {
  padding: 9px 10px;
}

[data-ui-style=qingxin] .legacy-list-page .vlist-filter .filter-grid-dynamic {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  width: 100%;
}

[data-ui-style=qingxin] .legacy-list-page .vlist-filter .filter-grid-dynamic .field-pair {
  flex: 0 1 auto;
  min-width: 160px;
  max-width: 280px;
}

[data-ui-style=qingxin] .legacy-list-page .vlist-filter .filter-grid-dynamic .field-pair.span-2 {
  min-width: 260px;
  max-width: 360px;
}

[data-ui-style=qingxin] .legacy-list-page .vlist-filter .filter-grid-dynamic .field-pair.misc {
  min-width: auto;
}

/* Action buttons moved into vlist toolbar (CRM legacy-btn etc.) */
.vlist-toolbar-right .legacy-btn,
.vlist-toolbar-right button.legacy-btn {
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
}

.vlist-toolbar-right .legacy-btn-add,
.vlist-toolbar-right button.legacy-btn-add {
  background: var(--el-color-primary, #2768ff);
  border-color: var(--el-color-primary, #2768ff);
  color: #fff;
}

.vlist-chrome {
  flex-shrink: 0;
  margin-bottom: 8px;
}

.vlist-chrome .filter-panel.vlist-filter-panel {
  margin-bottom: 0 !important;
}

/* Compact storeroom in/out filters — auto rows, fields not stretched full-bleed */
[data-ui-style=qingxin] .storeroom-in-bill-list .filter-grid,
[data-ui-style=qingxin] .storeroom-out-bill-list .filter-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 220px));
  grid-template-rows: auto;
  gap: 6px 12px;
  align-items: center;
}

[data-ui-style=qingxin] .storeroom-in-bill-list .filter-grid .field-pair.span-2,
[data-ui-style=qingxin] .storeroom-out-bill-list .filter-grid .field-pair.span-2 {
  grid-column: span 2;
  max-width: 360px;
}

[data-ui-style=qingxin] .storeroom-in-bill-list .filter-grid .field-pair.misc,
[data-ui-style=qingxin] .storeroom-out-bill-list .filter-grid .field-pair.misc {
  grid-column: 1/-1;
  max-width: none;
}

[data-ui-style=qingxin] .legacy-list-page .vlist-filter-panel {
  padding: 6px 10px !important;
}

:root {
  --silk-header-height: 56px;
  --silk-safe-top: env(safe-area-inset-top, 0px);
  --silk-sidebar-width: 220px;
  --silk-content-padding: 20px;
  --silk-bg-page: #f0f2f5;
  --silk-bg-main: #e8e8e8;
  --silk-header-bg: linear-gradient(135deg, #1e4d7b 0%, #2d6a9f 45%, #3a7ab5 100%);
  --silk-header-text: #ffffff;
  --silk-sidebar-bg: #ffffff;
  --silk-nav-bg: transparent;
  --silk-brand-size: 15px;
}

[data-ui-style=fresh] {
  --silk-header-height: 44px;
  --silk-header-bg: linear-gradient(180deg, #7eb8e8 0%, #5a9fd4 100%);
  --silk-bg-page: #ececec;
  --silk-brand-size: 13px;
}

[data-ui-style=friendly] {
  --silk-header-height: 52px;
  --silk-header-bg: linear-gradient(135deg, #1e4d7b 0%, #2d6a9f 45%, #3a7ab5 100%);
  --silk-bg-page: #eef2f7;
}

[data-ui-style=professional] {
  --silk-header-height: 52px;
  --silk-header-bg: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
  --silk-bg-page: #dde3ea;
}

[data-ui-style=classic] {
  --silk-header-height: 42px;
  --silk-sidebar-width: 210px;
  --silk-header-bg: linear-gradient(180deg, #4a7eb8 0%, #356699 100%);
  --silk-sidebar-bg: linear-gradient(180deg, #eef3f9 0%, #e2eaf4 100%);
  --silk-bg-page: #d4dce8;
}

[data-ui-style=modern] {
  --silk-header-height: 48px;
  --silk-sidebar-width: 200px;
  --silk-header-bg: #ffffff;
  --silk-header-text: #333333;
  --silk-sidebar-bg: #ffffff;
  --silk-bg-page: #f0f2f5;
}

/* 清新风格：布局同现代 OA，内容区对齐财务页（13px / 4px / Arco 蓝） */
[data-ui-style=qingxin] {
  --silk-header-height: 48px;
  --silk-sidebar-width: 200px;
  --silk-header-bg: #ffffff;
  --silk-header-text: #1d2129;
  --silk-sidebar-bg: #ffffff;
  --silk-bg-page: #f0f4f8;
  --silk-bg-main: #ffffff;
}

/* legacy dual-header tokens removed; product uses qingxin / :root only */
@media (max-width: 768px) {
  :root,
  [data-ui-style] {
    --silk-header-height: 48px;
    --silk-sidebar-width: 0px;
    --silk-content-padding: 8px;
    --silk-safe-top: max(20px, env(safe-area-inset-top, 0px));
  }
}
@media (max-width: 640px) {
  :root,
  [data-ui-style] {
    --silk-content-padding: 4px;
  }
}
[data-ui-style=qingxin] {
  --el-color-primary: #2768ff;
  --el-color-primary-light-3: #4d84ff;
  --el-color-primary-light-5: #7aa3ff;
  --el-color-primary-light-7: #a7c2ff;
  --el-color-primary-light-9: #edf4ff;
  --el-color-primary-dark-2: #1f54d2;
  --el-font-size-base: 13px;
  --el-border-radius-base: 4px;
  --el-border-radius-small: 4px;
  --el-border-radius-round: 16px;
  --el-bg-color: #ffffff;
  --el-bg-color-page: #f0f4f8;
  --el-text-color-primary: #1d2129;
  --el-text-color-regular: #4e5969;
  --el-text-color-secondary: #86909c;
  --el-text-color-placeholder: #c9cdd4;
  --el-border-color: #e5e6eb;
  --el-border-color-light: #eef1f6;
  --el-border-color-lighter: #f2f3f5;
  --el-border-color-extra-light: #f7f8fa;
  --el-color-success: #00b42a;
  --el-color-danger: #f53f3f;
  --el-color-warning: #ff7d00;
  --el-menu-item-height: 36px;
  --el-menu-sub-item-height: 36px;
  font-size: 13px;
  color: #1d2129;
}

[data-ui-style=qingxin] .modern-layout {
  background: #f0f4f8;
}

[data-ui-style=qingxin] .modern-layout .tab-item.active {
  color: var(--el-color-primary);
  background: var(--el-color-primary-light-9);
  border-bottom-color: var(--el-color-primary);
}

[data-ui-style=qingxin] .modern-layout .side-menu .el-menu-item.is-active {
  background: var(--el-color-primary-light-9);
  border-left-color: var(--el-color-primary);
  color: var(--el-color-primary);
}

[data-ui-style=qingxin] .modern-layout .modern-main {
  background: #f7f8fa;
}

[data-ui-style=qingxin] .modern-layout .user-avatar {
  background: var(--el-color-primary);
}

[data-ui-style=qingxin] .mobile-tab-btn.active {
  border-color: var(--el-color-primary);
  color: var(--el-color-primary);
  background: var(--el-color-primary-light-9);
}

[data-ui-style=qingxin] .el-button {
  border-radius: 4px;
  font-weight: 400;
  font-size: 13px;
}

[data-ui-style=qingxin] .el-button--small {
  --el-button-size: 28px;
  height: 28px;
  padding: 4px 10px;
  font-size: 13px;
  min-width: 0;
}

[data-ui-style=qingxin] .el-button--default {
  --el-button-text-color: #4e5969;
  --el-button-border-color: #d0d3d9;
  --el-button-bg-color: #fff;
  --el-button-hover-text-color: var(--el-color-primary);
  --el-button-hover-border-color: var(--el-color-primary);
  --el-button-hover-bg-color: var(--el-color-primary-light-9);
}

[data-ui-style=qingxin] .el-input__wrapper,
[data-ui-style=qingxin] .el-textarea__inner,
[data-ui-style=qingxin] .el-select__wrapper {
  border-radius: 4px;
  font-size: 13px;
}

[data-ui-style=qingxin] .el-input {
  --el-input-height: 32px;
  font-size: 13px;
}

[data-ui-style=qingxin] .el-input--small {
  --el-input-height: 28px;
}

[data-ui-style=qingxin] .el-select .el-select__wrapper {
  min-height: 32px;
  font-size: 13px;
}

[data-ui-style=qingxin] .el-select--small .el-select__wrapper {
  min-height: 28px;
}

[data-ui-style=qingxin] .el-table {
  --el-table-border-color: #e6ebf2;
  --el-table-header-bg-color: #eef3f9;
  --el-table-header-text-color: #4e5969;
  --el-table-text-color: #1d2129;
  --el-table-row-hover-bg-color: #f5f9ff;
  border-radius: 2px;
  overflow: hidden;
  font-size: 13px;
}

[data-ui-style=qingxin] .el-table th.el-table__cell {
  font-weight: 600;
  font-size: 13px;
}

[data-ui-style=qingxin] .el-table td.el-table__cell {
  font-size: 13px;
}

[data-ui-style=qingxin] .el-dialog,
[data-ui-style=qingxin] .el-message-box {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #e5e6eb;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  background: #ffffff;
}

[data-ui-style=qingxin] .el-dialog {
  margin: 0 auto !important;
}

/*
 * align-center: EP sets overlay to display:flex (default align-items:stretch).
 * EP relies on margin:auto to avoid stretching the dialog to full viewport height.
 * The rule above used margin:0 auto !important and broke that — restore it here.
 */
[data-ui-style=qingxin] .el-dialog.is-align-center {
  margin: auto !important;
  align-self: center;
  display: flex;
  flex-direction: column;
  height: fit-content;
  max-height: calc(100vh - 48px);
}

[data-ui-style=qingxin] .el-dialog.is-align-center .el-dialog__header,
[data-ui-style=qingxin] .el-dialog.is-align-center .el-dialog__footer {
  flex-shrink: 0;
}

[data-ui-style=qingxin] .el-dialog.is-align-center .el-dialog__body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - 200px);
  overflow: auto;
}

[data-ui-style=qingxin] .el-dialog__header,
[data-ui-style=qingxin] .el-message-box__header,
[data-ui-style=qingxin] .el-drawer__header {
  padding: 14px 16px !important;
  margin: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  background: #ffffff !important;
  border-bottom: 1px solid #e5e6eb !important;
}

[data-ui-style=qingxin] .el-dialog__title,
[data-ui-style=qingxin] .el-message-box__title,
[data-ui-style=qingxin] .el-drawer__title,
[data-ui-style=qingxin] .el-drawer__header {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #1d2129 !important;
  line-height: 1.4 !important;
}

[data-ui-style=qingxin] .el-dialog__headerbtn,
[data-ui-style=qingxin] .el-message-box__headerbtn {
  top: 14px !important;
  right: 12px !important;
  width: 28px;
  height: 28px;
}

[data-ui-style=qingxin] .el-dialog__headerbtn .el-dialog__close,
[data-ui-style=qingxin] .el-message-box__headerbtn .el-message-box__close,
[data-ui-style=qingxin] .el-drawer__close-btn {
  color: #86909c !important;
  font-size: 16px;
}

[data-ui-style=qingxin] .el-dialog__headerbtn:hover .el-dialog__close,
[data-ui-style=qingxin] .el-message-box__headerbtn:hover .el-message-box__close,
[data-ui-style=qingxin] .el-drawer__close-btn:hover {
  color: #1d2129 !important;
}

[data-ui-style=qingxin] .el-dialog__body,
[data-ui-style=qingxin] .el-message-box__content {
  padding: 14px 16px;
  font-size: 13px;
  color: #1d2129;
  background: #ffffff !important;
}

[data-ui-style=qingxin] .el-dialog__body {
  max-height: calc(100vh - 160px);
  overflow: auto;
}

[data-ui-style=qingxin] .el-drawer__body {
  font-size: 13px;
  color: #1d2129;
  background: #ffffff !important;
}

[data-ui-style=qingxin] .el-dialog__footer,
[data-ui-style=qingxin] .el-message-box__btns,
[data-ui-style=qingxin] .el-drawer__footer {
  padding: 10px 16px 16px !important;
  border-top: 1px solid #e5e6eb !important;
  background: #ffffff !important;
}

/* Nested LegacyWindow footer lives inside .el-dialog__footer — do not stack padding/border. */
[data-ui-style=qingxin] .legacy-window-dialog .legacy-window-footer {
  padding: 0 !important;
  border-top: none !important;
  background: transparent !important;
}

[data-ui-style=qingxin] .el-overlay-message-box {
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-ui-style=qingxin] .el-message-box {
  padding-bottom: 0;
  width: min(420px, 100vw - 32px);
  max-width: calc(100vw - 32px);
  flex: 0 0 auto;
  box-sizing: border-box;
}

[data-ui-style=qingxin] .el-message-box__message {
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

[data-ui-style=qingxin] .el-message-box__content {
  color: #4e5969;
  padding: 12px 16px !important;
}

[data-ui-style=qingxin] .el-message-box__container {
  align-items: flex-start;
}

[data-ui-style=qingxin] .el-message-box__btns {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 10px !important;
}

[data-ui-style=qingxin] .el-message-box__btns .el-button {
  margin: 0 !important;
}

[data-ui-style=qingxin] .el-drawer {
  border-left: 1px solid #e5e6eb;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
  background: #ffffff;
}

/* Detail popups converted from right drawer — keep same chrome, centered */
[data-ui-style=qingxin] .silk-detail-dialog.el-dialog,
[data-ui-style=qingxin] .el-dialog.silk-detail-dialog {
  max-width: calc(100vw - 32px);
}

[data-ui-style=qingxin] .silk-detail-dialog .el-dialog__body {
  max-height: calc(100vh - 140px);
}

/* Kill leftover WinXP / cream shell paints inside dialog chrome */
[data-ui-style=qingxin] .legacy-window-dialog .legacy-window-body,
[data-ui-style=qingxin] .legacy-window-dialog.storeroom-inventory-detail-dialog .legacy-window-body,
[data-ui-style=qingxin] .legacy-window-dialog.storeroom-inventory-detail-dialog .el-dialog__body,
[data-ui-style=qingxin] .legacy-window-dialog.storeroom-inventory-detail-dialog .el-dialog__footer,
[data-ui-style=qingxin] .legacy-window-dialog.storeroom-inventory-detail-dialog .legacy-window-footer,
[data-ui-style=qingxin] .crm-linkman-add-dialog .el-dialog__body,
[data-ui-style=qingxin] .crm-company-create-dialog .el-dialog__body,
[data-ui-style=qingxin] .crm-modify-history-dialog .el-dialog__body,
[data-ui-style=qingxin] .crm-linkman-add-dialog .el-dialog__footer,
[data-ui-style=qingxin] .crm-company-create-dialog .el-dialog__footer,
[data-ui-style=qingxin] .crm-modify-history-dialog .el-dialog__footer {
  background: #ffffff !important;
  border-top-color: #e5e6eb !important;
}

[data-ui-style=qingxin] .el-card {
  border-radius: 4px;
  border-color: #e5e6eb;
  box-shadow: none;
}

[data-ui-style=qingxin] .content-card {
  border-radius: 4px;
  border: 1px solid #e5e6eb;
  box-shadow: none;
  padding: 12px 16px;
}

[data-ui-style=qingxin] .el-pagination {
  font-size: 13px;
  --el-pagination-button-height: 28px;
  --el-pagination-button-width: 28px;
}

[data-ui-style=qingxin] .el-form-item__label {
  font-size: 13px;
  color: #4e5969;
}

[data-ui-style=qingxin] .el-dropdown-menu {
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

[data-ui-style=qingxin] .el-dropdown-menu__item {
  font-size: 13px;
}

[data-ui-style=qingxin] .el-tabs__item {
  font-size: 13px;
}

[data-ui-style=qingxin] a {
  color: var(--el-color-primary);
}

[data-ui-style=qingxin] a:hover {
  color: var(--el-color-primary-dark-2);
}

[data-ui-style=qingxin] .legacy-list-page {
  font-size: 13px;
  background: #f1f5f9;
  color: #1d2129;
}

[data-ui-style=qingxin] .legacy-list-page .page-meta-bar {
  gap: 8px 12px;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

[data-ui-style=qingxin] .legacy-list-page .page-meta-bar .bc-icon {
  display: none;
}

[data-ui-style=qingxin] .legacy-list-page .page-meta-bar .breadcrumb {
  color: #64748b;
  font-size: 14px;
}

[data-ui-style=qingxin] .legacy-list-page .page-meta-bar .process-flow {
  color: var(--el-color-primary);
  font-size: 13px;
}

[data-ui-style=qingxin] .legacy-list-page .legacy-btn {
  border: 1px solid #d0d3d9;
  background: #fff;
  padding: 4px 12px;
  font-size: 13px;
  min-width: 64px;
  font-family: inherit;
  color: #4e5969;
  height: 32px;
  line-height: 1.2;
  border-radius: 8px;
}

[data-ui-style=qingxin] .legacy-list-page .legacy-btn:hover {
  border-color: var(--el-color-primary);
  color: var(--el-color-primary);
  background: var(--el-color-primary-light-9);
}

[data-ui-style=qingxin] .legacy-list-page .legacy-btn-primary {
  border-color: var(--el-color-primary);
  background: var(--el-color-primary);
  color: #fff;
}

[data-ui-style=qingxin] .legacy-list-page .legacy-btn-primary:hover {
  background: var(--el-color-primary-dark-2);
  border-color: var(--el-color-primary-dark-2);
  color: #fff;
}

[data-ui-style=qingxin] .legacy-list-page .legacy-btn-add {
  border-color: #00b42a;
  color: #00b42a;
}

[data-ui-style=qingxin] .legacy-list-page .legacy-btn-danger {
  border-color: #f53f3f;
  color: #f53f3f;
}

[data-ui-style=qingxin] .legacy-list-page .legacy-native-input,
[data-ui-style=qingxin] .legacy-list-page .legacy-native-select {
  border: 1px solid #d0d3d9;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  height: 28px;
  padding: 2px 8px;
  color: #1d2129;
  background: #fff;
}

[data-ui-style=qingxin] .legacy-list-page .legacy-grid-table {
  font-size: 13px;
  border: 1px solid #dce3ec;
  border-radius: 2px;
  overflow: hidden;
}

[data-ui-style=qingxin] .legacy-list-page .legacy-grid-table th {
  background: #eef3f9 !important;
  border: 1px solid #d5deea;
  color: #4e5969;
  font-weight: 600;
  padding: 8px 10px;
}

[data-ui-style=qingxin] .legacy-list-page .legacy-grid-table td {
  border: 1px solid #e6ebf2;
  padding: 8px 10px;
  line-height: 1.4;
  color: #1d2129;
}

[data-ui-style=qingxin] .legacy-list-page .legacy-grid-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

[data-ui-style=qingxin] .legacy-list-page .legacy-grid-table tbody tr:hover td {
  background: #f5f9ff;
}

[data-ui-style=qingxin] .legacy-list-page .legacy-table {
  --el-table-header-bg-color: #eef3f9;
  font-size: 13px;
}

[data-ui-style=qingxin] .legacy-list-page .legacy-table .el-table__header th,
[data-ui-style=qingxin] .legacy-list-page .legacy-table .el-table__header th.el-table__cell,
[data-ui-style=qingxin] .el-table .el-table__header th.el-table__cell {
  background: #eef3f9 !important;
  background-color: #eef3f9 !important;
  color: #4e5969;
}

[data-ui-style=qingxin] .legacy-list-page.bill-list-page.sticky-action-column .legacy-grid-table th.actions-col {
  background: #eef3f9 !important;
}

[data-ui-style=qingxin] .legacy-list-page .el-input__wrapper,
[data-ui-style=qingxin] .legacy-list-page .el-select__wrapper {
  border-radius: 4px;
  box-shadow: 0 0 0 1px #d0d3d9 inset;
}

[data-ui-style=qingxin] .legacy-list-page .el-input__inner {
  font-size: 13px;
  height: 26px;
  line-height: 26px;
}

[data-ui-style=qingxin] .cell-label,
[data-ui-style=qingxin] .info-table .cell-label,
[data-ui-style=qingxin] .ship-table .cell-label,
[data-ui-style=qingxin] .payment-info-table .cell-label,
[data-ui-style=qingxin] .summary-row .label,
[data-ui-style=qingxin] .pay-label {
  background: #eef3f9 !important;
  color: #4e5969;
}

[data-ui-style=qingxin] .summary-grid,
[data-ui-style=qingxin] .summary-row {
  background: #fafbfc !important;
  background-color: #fafbfc !important;
  border-color: #d5deea;
}

[data-ui-style=qingxin] .tab-btn {
  background: #eef3f9 !important;
  border-color: #d5deea;
  color: #4e5969;
}

[data-ui-style=qingxin] .info-table td,
[data-ui-style=qingxin] .ship-table td,
[data-ui-style=qingxin] .payment-info-table td {
  border-color: #d5deea;
}

[data-ui-style=qingxin] .info-table .cell-value,
[data-ui-style=qingxin] .ship-table .cell-value,
[data-ui-style=qingxin] .payment-info-table .cell-value,
[data-ui-style=qingxin] .info-table td:not(.cell-label),
[data-ui-style=qingxin] .ship-table td:not(.cell-label),
[data-ui-style=qingxin] .payment-info-table td:not(.cell-label),
[data-ui-style=qingxin] .summary-row .value,
[data-ui-style=qingxin] .summary-row .contract-cell {
  background: #fafbfc !important;
  background-color: #fafbfc !important;
}

[data-ui-style=qingxin] .item-table .el-table__header th,
[data-ui-style=qingxin] .item-table .el-table__header th.el-table__cell,
[data-ui-style=qingxin] .legacy-table .el-table__header th,
[data-ui-style=qingxin] .legacy-table .el-table__header th.el-table__cell,
[data-ui-style=qingxin] .mapping-table th,
[data-ui-style=qingxin] .line-table th,
[data-ui-style=qingxin] .part-time-table th,
[data-ui-style=qingxin] .picker-table .el-table__header th,
[data-ui-style=qingxin] .picker-table .el-table__header th.el-table__cell,
[data-ui-style=qingxin] table th {
  background: #eef3f9 !important;
  background-color: #eef3f9 !important;
  color: #4e5969;
}

[data-ui-style=qingxin] .items-wrap {
  border-color: #d5deea;
}

/* footer chrome already unified with .el-dialog__footer above */
[data-ui-style=qingxin] .list-title,
[data-ui-style=qingxin] .lbl,
[data-ui-style=qingxin] .lf-label,
[data-ui-style=qingxin] .lg-label,
[data-ui-style=qingxin] .lookup-btn,
[data-ui-style=qingxin] .grid-icon-btn,
[data-ui-style=qingxin] .meta-label {
  background: #eef3f9 !important;
  background-color: #eef3f9 !important;
}

[data-ui-style=qingxin] .legacy-btn,
[data-ui-style=qingxin] .legacy-window-dialog .legacy-btn {
  background: #fff !important;
  border-color: #d0d3d9;
  color: #4e5969;
}

[data-ui-style=qingxin] .legacy-btn:hover,
[data-ui-style=qingxin] .legacy-window-dialog .legacy-btn:hover {
  background: var(--el-color-primary-light-9) !important;
  border-color: var(--el-color-primary);
  color: var(--el-color-primary);
}

/* Primary/danger must win over the white-bg sweep above (otherwise white text on white). */
[data-ui-style=qingxin] .legacy-btn.legacy-btn-primary,
[data-ui-style=qingxin] .legacy-list-page .legacy-btn.legacy-btn-primary,
[data-ui-style=qingxin] .legacy-window-dialog .legacy-btn.legacy-btn-primary {
  background: var(--el-color-primary) !important;
  border-color: var(--el-color-primary) !important;
  color: #fff !important;
}

[data-ui-style=qingxin] .legacy-btn.legacy-btn-primary:hover,
[data-ui-style=qingxin] .legacy-list-page .legacy-btn.legacy-btn-primary:hover,
[data-ui-style=qingxin] .legacy-window-dialog .legacy-btn.legacy-btn-primary:hover {
  background: var(--el-color-primary-dark-2) !important;
  border-color: var(--el-color-primary-dark-2) !important;
  color: #fff !important;
}

[data-ui-style=qingxin] .legacy-btn.legacy-btn-primary:disabled,
[data-ui-style=qingxin] .legacy-list-page .legacy-btn.legacy-btn-primary:disabled {
  background: #a0c0ff !important;
  border-color: #a0c0ff !important;
  color: #fff !important;
  opacity: 0.85;
}

[data-ui-style=qingxin] .legacy-btn.legacy-btn-danger,
[data-ui-style=qingxin] .legacy-list-page .legacy-btn.legacy-btn-danger,
[data-ui-style=qingxin] .legacy-window-dialog .legacy-btn.legacy-btn-danger {
  background: #fff !important;
  border-color: #f53f3f !important;
  color: #f53f3f !important;
}

[data-ui-style=qingxin] .legacy-btn.legacy-btn-add,
[data-ui-style=qingxin] .legacy-list-page .legacy-btn.legacy-btn-add {
  background: #fff !important;
  border-color: #00b42a !important;
  color: #00b42a !important;
}

[data-ui-style=qingxin] .legacy-list-page .perm-select-all-btn {
  background: var(--el-color-primary) !important;
  border-color: var(--el-color-primary-dark-2) !important;
  color: #fff !important;
}

[data-ui-style=qingxin] .legacy-list-page .perm-select-all-btn:hover {
  background: var(--el-color-primary-dark-2) !important;
  color: #fff !important;
}

/* Keep H-bar on the visible viewport (pages + popups). Do not chain wheel to the page behind a popup. */
.el-overlay {
  overscroll-behavior: contain;
}

.el-overlay .el-dialog__body,
.el-overlay .el-drawer__body {
  overscroll-behavior: contain;
  overflow: auto;
  min-width: 0;
}

[data-ui-style=qingxin] .el-overlay .el-dialog__body,
[data-ui-style=qingxin] .el-overlay .el-drawer__body {
  overflow: auto !important;
}

body.el-popup-parent--hidden .modern-main,
body.el-popup-parent--hidden .main-content,
body.el-popup-parent--hidden .classic-main,
body.el-popup-parent--hidden .hist-main {
  overflow: hidden !important;
}

.el-overlay .el-dialog .el-tabs,
.el-overlay .el-drawer .el-tabs {
  min-width: 0;
}

/* Native HTML tables: the wrap is the dual-axis scroller. */
.table-wrap:not(:has(.el-table)),
.vlist-table-wrap:not(:has(.el-table)),
.items-wrap:not(:has(.el-table)),
.log-table-wrap:not(:has(.el-table)),
.table-scroll:not(:has(.el-table)),
.dj-table-wrap:not(:has(.el-table)) {
  max-height: min(56vh, 100vh - 220px);
  overflow: auto;
  overscroll-behavior: contain;
}

/*
 * el-table on pages: EP hides native bars and grows the wrap to every row.
 * Cap wrappers that are not already height-limited by the max-height prop.
 */
.el-table .el-table__body-wrapper {
  min-height: 0;
}

.el-table .el-table__body-wrapper .el-scrollbar__wrap:not([style*=max-height]) {
  max-height: min(56vh, 100vh - 220px) !important;
  overflow: auto !important;
}

.el-table .el-table__body-wrapper .el-scrollbar:not(:has([style*=max-height])) {
  max-height: min(56vh, 100vh - 220px);
}

.el-table .el-table__body-wrapper .el-scrollbar__wrap--hidden-default {
  scrollbar-width: thin !important;
}

.el-table .el-table__body-wrapper .el-scrollbar__wrap--hidden-default::-webkit-scrollbar {
  display: block !important;
  width: 8px;
  height: 8px;
}

.el-table .el-table__body-wrapper .el-scrollbar__bar {
  display: none !important;
}

.el-table .el-table__header-wrapper .el-scrollbar__wrap,
.el-table .el-table__footer-wrapper .el-scrollbar__wrap {
  overflow: hidden !important;
  scrollbar-width: none !important;
}

.el-table .el-table__header-wrapper .el-scrollbar__wrap::-webkit-scrollbar,
.el-table .el-table__footer-wrapper .el-scrollbar__wrap::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.el-table .el-table__header-wrapper .el-scrollbar__bar,
.el-table .el-table__footer-wrapper .el-scrollbar__bar {
  display: none !important;
}

/*
 * Popup detail lists: a fixed-height box with both scrollbars on the visible
 * edge (same idea as 原始凭证). Do not grow with every row — that parks the
 * H-bar under the last row. Do not set max-height:none / height:100% here.
 */
.el-overlay .el-dialog .table-wrap:not(:has(.el-table)),
.el-overlay .el-dialog .items-wrap:not(:has(.el-table)),
.el-overlay .el-dialog .vlist-table-wrap:not(:has(.el-table)),
.el-overlay .el-dialog .table-scroll:not(:has(.el-table)),
.el-overlay .el-dialog .dj-table-wrap:not(:has(.el-table)),
.el-overlay .el-drawer .table-wrap:not(:has(.el-table)),
.el-overlay .el-drawer .items-wrap:not(:has(.el-table)),
.el-overlay .el-drawer .vlist-table-wrap:not(:has(.el-table)),
.el-overlay .el-drawer .table-scroll:not(:has(.el-table)),
.el-overlay .el-drawer .dj-table-wrap:not(:has(.el-table)) {
  max-height: min(46vh, 100vh - 280px);
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.el-overlay .el-dialog .el-table .el-table__body-wrapper .el-scrollbar:not(:has([style*=max-height])),
.el-overlay .el-drawer .el-table .el-table__body-wrapper .el-scrollbar:not(:has([style*=max-height])) {
  max-height: min(46vh, 100vh - 280px);
}

.el-overlay .el-dialog .el-table .el-table__body-wrapper .el-scrollbar__wrap:not([style*=max-height]),
.el-overlay .el-drawer .el-table .el-table__body-wrapper .el-scrollbar__wrap:not([style*=max-height]) {
  max-height: min(46vh, 100vh - 280px) !important;
  height: auto !important;
  overflow: auto !important;
}

.el-overlay .legacy-window-dialog .el-table .el-table__body-wrapper .el-scrollbar:not(:has([style*=max-height])),
.el-overlay .in-bill-operate-dialog .el-table .el-table__body-wrapper .el-scrollbar:not(:has([style*=max-height])),
.el-overlay .el-dialog:has(.item-table) .el-table .el-table__body-wrapper .el-scrollbar:not(:has([style*=max-height])),
.el-overlay .el-dialog:has(.table-wrap .el-table) .el-table .el-table__body-wrapper .el-scrollbar:not(:has([style*=max-height])),
.el-overlay .el-dialog:has(.items-wrap .el-table) .el-table .el-table__body-wrapper .el-scrollbar:not(:has([style*=max-height])) {
  height: min(46vh, 100vh - 280px);
  max-height: min(46vh, 100vh - 280px);
}

.el-overlay .legacy-window-dialog .el-table .el-table__body-wrapper .el-scrollbar__wrap:not([style*=max-height]),
.el-overlay .in-bill-operate-dialog .el-table .el-table__body-wrapper .el-scrollbar__wrap:not([style*=max-height]),
.el-overlay .el-dialog:has(.item-table) .el-table .el-table__body-wrapper .el-scrollbar__wrap:not([style*=max-height]),
.el-overlay .el-dialog:has(.table-wrap .el-table) .el-table .el-table__body-wrapper .el-scrollbar__wrap:not([style*=max-height]),
.el-overlay .el-dialog:has(.items-wrap .el-table) .el-table .el-table__body-wrapper .el-scrollbar__wrap:not([style*=max-height]) {
  height: min(46vh, 100vh - 280px) !important;
  max-height: min(46vh, 100vh - 280px) !important;
  overflow: auto !important;
}

.modern-layout:has(.catalog-list-page),
.modern-layout:has(.vlist-table-wrap),
.modern-layout:has(.source-docs-page),
.modern-layout:has(.accounting-vouchers-page) {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.modern-body {
  min-width: 0;
}

.modern-layout:has(.catalog-list-page) .modern-body,
.modern-layout:has(.vlist-table-wrap) .modern-body,
.modern-layout:has(.source-docs-page) .modern-body,
.modern-layout:has(.accounting-vouchers-page) .modern-body {
  min-height: 0;
  overflow: hidden;
}

.modern-main:has(.legacy-list-page),
.modern-main:has(.vlist-table-wrap),
.modern-main:has(.catalog-list-page),
.modern-main:has(.source-docs-page),
.main-content:has(.legacy-list-page),
.main-content:has(.vlist-table-wrap),
.classic-main:has(.legacy-list-page),
.classic-main:has(.vlist-table-wrap),
.hist-main:has(.legacy-list-page),
.hist-main:has(.vlist-table-wrap) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.modern-main:has(.legacy-list-page) > *,
.modern-main:has(.vlist-table-wrap) > *,
.main-content:has(.legacy-list-page) > *,
.main-content:has(.vlist-table-wrap) > *,
.classic-main:has(.legacy-list-page) > *,
.classic-main:has(.vlist-table-wrap) > *,
.hist-main:has(.legacy-list-page) > *,
.hist-main:has(.vlist-table-wrap) > * {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modern-main:has(.personal-settings-page) > .personal-settings-page,
.main-content:has(.personal-settings-page) > .personal-settings-page,
.classic-main:has(.personal-settings-page) > .personal-settings-page,
.hist-main:has(.personal-settings-page) > .personal-settings-page {
  overflow: visible;
}

.catalog-list-page,
.modern-main > .silk-page.legacy-list-page:has(.table-wrap),
.modern-main > .silk-page.legacy-list-page:has(.vlist-table-wrap),
.accounting-vouchers-page {
  height: calc(100vh - var(--silk-header-height, 48px) - var(--silk-safe-top, 0px));
  max-height: calc(100vh - var(--silk-header-height, 48px) - var(--silk-safe-top, 0px));
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.catalog-list-page {
  flex: 1 1 auto;
  min-width: 0;
}

.catalog-list-page > .legacy-list-page,
.catalog-list-page > .silk-page {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0 !important;
  height: auto !important;
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.legacy-list-page:has(.vlist-table-wrap),
.legacy-list-page:has(.table-wrap),
.accounting-vouchers-page {
  min-width: 0;
  min-height: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

[data-ui-style=qingxin] .legacy-list-page:has(.table-wrap),
[data-ui-style=qingxin] .legacy-list-page:has(.vlist-table-wrap) {
  min-height: 0 !important;
}

.legacy-list-page > .silk-page-header,
.legacy-list-page > .vlist-chrome,
.legacy-list-page > .vlist-toolbar,
.legacy-list-page > .page-tabs,
.legacy-list-page > .filter-panel,
.legacy-list-page > .vlist-pager,
.legacy-list-page > .pagination-bar,
.legacy-list-page > .list-summary-bar,
.accounting-vouchers-page > .vlist-toolbar,
.accounting-vouchers-page > .pagination-bar {
  flex-shrink: 0;
}

.legacy-list-page .table-wrap,
.legacy-list-page .vlist-table-wrap,
.accounting-vouchers-page .vlist-table-wrap {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  overflow: auto;
  overscroll-behavior: contain;
}

/* el-table list: wrap does not scroll; table body is the only scroller */
.legacy-list-page .table-wrap:has(.el-table),
.legacy-list-page .vlist-table-wrap:has(.el-table),
.accounting-vouchers-page .vlist-table-wrap:has(.el-table) {
  overflow: hidden !important;
  max-height: none;
  display: flex;
  flex-direction: column;
}

/*
 * height:100% on the table filled the wrap and clipped pagination/合计
 * that sit in the same wrap. Grow the table in leftover space only.
 */
.legacy-list-page .table-wrap > .el-table,
.legacy-list-page .vlist-table-wrap > .el-table,
.legacy-list-page .table-wrap > .inventory-table-host,
.legacy-list-page .vlist-table-wrap > .inventory-table-host,
.accounting-vouchers-page .vlist-table-wrap > .el-table {
  flex: 1 1 0;
  min-height: 0;
  height: 0 !important;
}

.legacy-list-page .inventory-table-host {
  display: flex;
  flex-direction: column;
}

.legacy-list-page .inventory-table-host > .el-table {
  flex: 1 1 0;
  min-height: 0;
  height: 100% !important;
}

.legacy-list-page .table-wrap > .pagination-bar,
.legacy-list-page .vlist-table-wrap > .pagination-bar,
.legacy-list-page .table-wrap > .vlist-pager,
.legacy-list-page .vlist-table-wrap > .vlist-pager,
.legacy-list-page .table-wrap > .list-summary-bar,
.legacy-list-page .vlist-table-wrap > .list-summary-bar {
  flex: 0 0 auto;
}

.legacy-list-page .table-wrap .el-table .el-table__inner-wrapper,
.legacy-list-page .vlist-table-wrap .el-table .el-table__inner-wrapper,
.accounting-vouchers-page .vlist-table-wrap .el-table .el-table__inner-wrapper {
  height: 100%;
}

.legacy-list-page .table-wrap .el-table .el-table__body-wrapper .el-scrollbar,
.legacy-list-page .table-wrap .el-table .el-table__body-wrapper .el-scrollbar__wrap,
.legacy-list-page .vlist-table-wrap .el-table .el-table__body-wrapper .el-scrollbar,
.legacy-list-page .vlist-table-wrap .el-table .el-table__body-wrapper .el-scrollbar__wrap,
.accounting-vouchers-page .vlist-table-wrap .el-table .el-table__body-wrapper .el-scrollbar,
.accounting-vouchers-page .vlist-table-wrap .el-table .el-table__body-wrapper .el-scrollbar__wrap {
  max-height: none !important;
  height: 100% !important;
}

/*
 * Native bars on body-only (header has none) shrink the body by ~8px and
 * desync header vs cells at the far right. Use EP overlay bars instead.
 */
.legacy-list-page .table-wrap > .el-table .el-scrollbar__wrap--hidden-default,
.legacy-list-page .vlist-table-wrap > .el-table .el-scrollbar__wrap--hidden-default,
.accounting-vouchers-page .vlist-table-wrap > .el-table .el-scrollbar__wrap--hidden-default {
  scrollbar-width: none !important;
}

.legacy-list-page .table-wrap > .el-table .el-scrollbar__wrap--hidden-default::-webkit-scrollbar,
.legacy-list-page .vlist-table-wrap > .el-table .el-scrollbar__wrap--hidden-default::-webkit-scrollbar,
.accounting-vouchers-page .vlist-table-wrap > .el-table .el-scrollbar__wrap--hidden-default::-webkit-scrollbar {
  display: none !important;
}

.legacy-list-page .table-wrap > .el-table .el-table__body-wrapper .el-scrollbar__bar,
.legacy-list-page .vlist-table-wrap > .el-table .el-table__body-wrapper .el-scrollbar__bar,
.accounting-vouchers-page .vlist-table-wrap > .el-table .el-table__body-wrapper .el-scrollbar__bar {
  display: block !important;
}

/*
 * List-page height:0 is for the page table only. Dialogs stay in the page
 * (el-dialog append-to-body defaults false), so the same .table-wrap > .el-table
 * rule would collapse inbound/alloc tables to 0px.
 */
.legacy-list-page .el-dialog .table-wrap:has(.el-table),
.legacy-list-page .el-overlay .table-wrap:has(.el-table),
.legacy-list-page .el-drawer .table-wrap:has(.el-table) {
  display: block !important;
  flex: none !important;
  height: auto !important;
  overflow: auto !important;
}

.legacy-list-page .el-dialog .table-wrap > .el-table,
.legacy-list-page .el-overlay .table-wrap > .el-table,
.legacy-list-page .el-drawer .table-wrap > .el-table {
  flex: none !important;
  height: auto !important;
  min-height: 0 !important;
}

.legacy-list-page .el-dialog .table-wrap .el-table .el-table__inner-wrapper,
.legacy-list-page .el-overlay .table-wrap .el-table .el-table__inner-wrapper,
.legacy-list-page .el-drawer .table-wrap .el-table .el-table__inner-wrapper {
  height: auto !important;
}

.legacy-list-page .el-dialog .table-wrap .el-table .el-table__body-wrapper .el-scrollbar,
.legacy-list-page .el-dialog .table-wrap .el-table .el-table__body-wrapper .el-scrollbar__wrap,
.legacy-list-page .el-overlay .table-wrap .el-table .el-table__body-wrapper .el-scrollbar,
.legacy-list-page .el-overlay .table-wrap .el-table .el-table__body-wrapper .el-scrollbar__wrap,
.legacy-list-page .el-drawer .table-wrap .el-table .el-table__body-wrapper .el-scrollbar,
.legacy-list-page .el-drawer .table-wrap .el-table .el-table__body-wrapper .el-scrollbar__wrap {
  height: auto !important;
}

.legacy-list-page .pagination-bar,
.legacy-list-page .list-summary-bar,
.legacy-list-page .vlist-pager,
.accounting-vouchers-page .pagination-bar {
  flex-shrink: 0;
}

.legacy-list-page .legacy-grid-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

/*
 * Phone browsers cannot scroll nested overflow:hidden + overflow:auto chains
 * (the desktop "H-bar stays in view" layout). Unlock the page and let the
 * document scroll vertically; tables keep overflow-x for horizontal pans.
 */
@media (max-width: 768px) {
  html,
  body {
    height: auto !important;
    min-height: 100% !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  #app {
    height: auto !important;
    min-height: 100% !important;
    overflow: visible !important;
  }
  .modern-layout,
  .modern-layout:has(.catalog-list-page),
  .modern-layout:has(.vlist-table-wrap),
  .modern-layout:has(.source-docs-page),
  .modern-layout:has(.accounting-vouchers-page) {
    height: auto !important;
    max-height: none !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }
  .modern-body,
  .modern-layout:has(.catalog-list-page) .modern-body,
  .modern-layout:has(.vlist-table-wrap) .modern-body,
  .modern-layout:has(.source-docs-page) .modern-body,
  .modern-layout:has(.accounting-vouchers-page) .modern-body {
    min-height: 0 !important;
    overflow: visible !important;
  }
  .modern-main,
  .main-content,
  .classic-main,
  .hist-main,
  .modern-main:has(.legacy-list-page),
  .modern-main:has(.vlist-table-wrap),
  .modern-main:has(.catalog-list-page),
  .modern-main:has(.source-docs-page),
  .main-content:has(.legacy-list-page),
  .main-content:has(.vlist-table-wrap),
  .classic-main:has(.legacy-list-page),
  .classic-main:has(.vlist-table-wrap),
  .hist-main:has(.legacy-list-page),
  .hist-main:has(.vlist-table-wrap) {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .modern-main:has(.legacy-list-page) > *,
  .modern-main:has(.vlist-table-wrap) > *,
  .main-content:has(.legacy-list-page) > *,
  .main-content:has(.vlist-table-wrap) > *,
  .classic-main:has(.legacy-list-page) > *,
  .hist-main:has(.legacy-list-page) > * {
    display: block !important;
    flex: none !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  .catalog-list-page,
  .modern-main > .silk-page.legacy-list-page:has(.table-wrap),
  .modern-main > .silk-page.legacy-list-page:has(.vlist-table-wrap),
  .accounting-vouchers-page,
  .catalog-list-page > .legacy-list-page,
  .catalog-list-page > .silk-page,
  .legacy-list-page:has(.vlist-table-wrap),
  .legacy-list-page:has(.table-wrap) {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    display: block !important;
  }
  .table-wrap:not(:has(.el-table)),
  .vlist-table-wrap:not(:has(.el-table)),
  .items-wrap:not(:has(.el-table)),
  .log-table-wrap:not(:has(.el-table)),
  .table-scroll:not(:has(.el-table)),
  .dj-table-wrap:not(:has(.el-table)),
  .legacy-list-page .table-wrap,
  .legacy-list-page .vlist-table-wrap,
  .accounting-vouchers-page .vlist-table-wrap,
  .legacy-list-page .table-wrap:has(.el-table),
  .legacy-list-page .vlist-table-wrap:has(.el-table),
  .accounting-vouchers-page .vlist-table-wrap:has(.el-table) {
    display: block !important;
    flex: none !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: auto;
    touch-action: pan-x pan-y;
  }
  .legacy-list-page .table-wrap > .el-table,
  .legacy-list-page .vlist-table-wrap > .el-table,
  .legacy-list-page .table-wrap > .inventory-table-host,
  .legacy-list-page .vlist-table-wrap > .inventory-table-host,
  .legacy-list-page .inventory-table-host,
  .legacy-list-page .inventory-table-host > .el-table,
  .accounting-vouchers-page .vlist-table-wrap > .el-table {
    display: block !important;
    flex: none !important;
    height: auto !important;
    min-height: 0 !important;
  }
  .el-table .el-table__body-wrapper .el-scrollbar__wrap,
  .el-table .el-table__body-wrapper .el-scrollbar,
  .legacy-list-page .table-wrap .el-table .el-table__body-wrapper .el-scrollbar,
  .legacy-list-page .table-wrap .el-table .el-table__body-wrapper .el-scrollbar__wrap,
  .legacy-list-page .vlist-table-wrap .el-table .el-table__body-wrapper .el-scrollbar,
  .legacy-list-page .vlist-table-wrap .el-table .el-table__body-wrapper .el-scrollbar__wrap,
  .accounting-vouchers-page .vlist-table-wrap .el-table .el-table__body-wrapper .el-scrollbar,
  .accounting-vouchers-page .vlist-table-wrap .el-table .el-table__body-wrapper .el-scrollbar__wrap {
    max-height: none !important;
    height: auto !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
  }
  .el-table .el-table__inner-wrapper,
  .legacy-list-page .table-wrap .el-table .el-table__inner-wrapper,
  .legacy-list-page .vlist-table-wrap .el-table .el-table__inner-wrapper,
  .accounting-vouchers-page .vlist-table-wrap .el-table .el-table__inner-wrapper {
    height: auto !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
  }
}
/* WeChat web-view: same unlock (no 768px media query). */
html.is-wechat-webview .legacy-list-page .table-wrap:has(.el-table),
html.is-wechat-webview .legacy-list-page .vlist-table-wrap:has(.el-table),
html.is-wechat-webview .accounting-vouchers-page .vlist-table-wrap:has(.el-table) {
  display: block !important;
  flex: none !important;
  overflow: visible !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  height: auto !important;
}

html.is-wechat-webview .legacy-list-page .table-wrap > .el-table,
html.is-wechat-webview .legacy-list-page .vlist-table-wrap > .el-table,
html.is-wechat-webview .legacy-list-page .table-wrap > .inventory-table-host,
html.is-wechat-webview .legacy-list-page .vlist-table-wrap > .inventory-table-host,
html.is-wechat-webview .legacy-list-page .inventory-table-host,
html.is-wechat-webview .legacy-list-page .inventory-table-host > .el-table,
html.is-wechat-webview .accounting-vouchers-page .vlist-table-wrap > .el-table {
  flex: none !important;
  height: auto !important;
}

html.is-wechat-webview .legacy-list-page .table-wrap .el-table .el-table__inner-wrapper,
html.is-wechat-webview .legacy-list-page .vlist-table-wrap .el-table .el-table__inner-wrapper,
html.is-wechat-webview .legacy-list-page .table-wrap .el-table .el-table__body-wrapper .el-scrollbar,
html.is-wechat-webview .legacy-list-page .table-wrap .el-table .el-table__body-wrapper .el-scrollbar__wrap,
html.is-wechat-webview .legacy-list-page .vlist-table-wrap .el-table .el-table__body-wrapper .el-scrollbar,
html.is-wechat-webview .legacy-list-page .vlist-table-wrap .el-table .el-table__body-wrapper .el-scrollbar__wrap {
  height: auto !important;
  max-height: none !important;
  overflow-y: visible !important;
}

/* ---- Layout shell: mobile nav button ---- */
.layout-mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  cursor: pointer;
  flex-shrink: 0;
}
.layout-mobile-menu-btn .el-icon {
  font-size: 20px;
}
.layout-mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

[data-ui-style=modern] .layout-mobile-menu-btn,
[data-ui-style=qingxin] .layout-mobile-menu-btn,
[data-ui-style=silk] .layout-mobile-menu-btn,
[data-ui-style=qingxin] .layout-mobile-menu-btn,
[data-ui-style=modern] .layout-mobile-menu-btn {
  background: rgba(0, 0, 0, 0.06);
  color: #333;
}

@media (max-width: 768px) {
  .layout-mobile-menu-btn {
    display: inline-flex;
  }
  .layout-desktop-only {
    display: none !important;
  }
  .layout-mobile-only {
    display: block !important;
  }
}
@media (min-width: 768px) {
  .layout-mobile-only {
    display: none !important;
  }
}
/* ---- Header tools compact ---- */
@media (max-width: 768px) {
  .header-filiale-select {
    width: 108px !important;
  }
  .header-utility-tools .global-search-input {
    width: 120px !important;
  }
  .header-utility-tools .new-tab-btn {
    display: none;
  }
}
@media (max-width: 640px) {
  .header-filiale-select {
    width: 92px !important;
  }
  .header-utility-tools .global-search-input {
    width: 88px !important;
  }
}
/* ---- Legacy list pages ---- */
@media (max-width: 768px) {
  .legacy-list-page {
    padding: 2px;
  }
  .legacy-list-page .page-meta-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .legacy-list-page .page-meta-bar .process-flow,
  .legacy-list-page .page-meta-bar > .legacy-btn {
    margin-left: 0;
    white-space: normal;
  }
  .legacy-list-page .filter-grid,
  .legacy-list-page .filter-grid-dynamic {
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto !important;
    grid-auto-rows: minmax(28px, auto);
  }
  .legacy-list-page .filter-grid-dynamic .field-pair.span-2,
  .legacy-list-page .filter-grid .field-pair.span-2 {
    grid-column: 1/-1;
  }
  .legacy-list-page .filter-grid-dynamic .row-actions,
  .legacy-list-page .filter-grid-dynamic .filter-toolbar-row {
    grid-column: 1/-1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .legacy-list-page .table-wrap,
  .legacy-list-page .table-section {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .legacy-list-page.crm-company-list .crm-company-table,
  .legacy-list-page.crm-partners-list .crm-company-table {
    min-width: 0;
  }
  .legacy-list-page .footer-bar,
  .legacy-list-page .human-action-bar {
    flex-wrap: wrap;
    gap: 6px;
  }
  .legacy-list-page .footer-bar .legacy-btn,
  .legacy-list-page .human-action-bar .legacy-btn {
    flex: 1 1 auto;
    min-width: calc(50% - 4px);
  }
}
@media (max-width: 640px) {
  .legacy-list-page .filter-grid,
  .legacy-list-page .filter-grid-dynamic {
    grid-template-columns: 1fr !important;
  }
  .legacy-list-page.crm-company-list .legacy-table {
    min-width: 720px;
  }
}
/* ---- Bill / form grids (global class on page root) ---- */
@media (max-width: 768px) {
  .sell-bill-form .legacy-grid,
  .buy-bill-form .legacy-grid,
  .legacy-form-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .buy-bill-form .form-section,
  .sell-bill-form .form-section {
    overflow-x: auto;
  }
  .buy-bill-form .legacy-form-table,
  .sell-bill-form .legacy-form-table {
    min-width: 860px;
  }
  .sell-bill-form .legacy-grid .lg-cell.full,
  .buy-bill-form .legacy-grid .lg-cell.full,
  .legacy-form-grid .lg-cell.full {
    grid-column: 1/-1;
  }
  .sell-bill-form .legacy-grid .lg-cell.span-2,
  .buy-bill-form .legacy-grid .lg-cell.span-2 {
    grid-column: 1/-1;
  }
}
@media (max-width: 640px) {
  .sell-bill-form .legacy-grid,
  .buy-bill-form .legacy-grid,
  .legacy-form-grid {
    grid-template-columns: 1fr !important;
  }
  .buy-bill-form .header-form .el-col {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
@media (max-width: 768px) {
  .buy-bill-form .header-form .el-col {
    flex: 0 0 50%;
    max-width: 50%;
  }
}
/* ---- Element Plus dialogs / drawers ---- */
@media (max-width: 768px) {
  .el-dialog {
    --el-dialog-width: calc(100vw - 16px) !important;
    margin: 8px auto !important;
  }
  /* detail drawers converted to centered dialogs; keep mobile nav drawer usable */
  .el-drawer {
    max-width: 100vw;
  }
}
/* ---- Page containers ---- */
@media (max-width: 768px) {
  .page-container {
    padding: 2px;
  }
  .content-card {
    padding: 12px;
    border-radius: 8px;
  }
}
/* ---- Mobile complex form hint ---- */
.mobile-form-hint {
  display: none;
  margin: 4px 0;
  padding: 8px 10px;
  font-size: 12px;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 6px;
}

@media (max-width: 768px) {
  .mobile-form-hint {
    display: block;
  }
}
/* ---- Parameters tree page ---- */
@media (max-width: 768px) {
  .parameters-page .param-layout {
    flex-direction: column !important;
  }
  .parameters-page .param-tree {
    width: 100% !important;
    max-height: 180px;
    overflow-y: auto;
    border-right: none !important;
    border-bottom: 1px solid #ccc;
  }
}
/* ---- CRM partners sidebar ---- */
@media (max-width: 768px) {
  .crm-partners-list .partners-body {
    flex-direction: column !important;
  }
  .crm-partners-list .category-sidebar {
    width: 100% !important;
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-right: none !important;
    border-bottom: 1px solid #b8cfe0;
    padding-bottom: 4px;
  }
  .crm-partners-list .category-item {
    flex: 1 1 calc(50% - 4px);
    min-width: 120px;
  }
}
/* ---- Dashboard ---- */
@media (max-width: 768px) {
  .legacy-list-page.desktop .desktop-layout {
    flex-direction: column !important;
  }
  .legacy-list-page.desktop .desktop-sidebar,
  .legacy-list-page.desktop .desktop-main,
  .legacy-list-page.desktop .desktop-right {
    width: 100% !important;
    max-width: 100% !important;
  }
  .legacy-list-page.desktop .chart-box {
    height: 220px !important;
  }
}
/* Mobile rules for overlays only (el-dialog / el-drawer). Does not change page layouts. */
@media (max-width: 768px) {
  .el-overlay .el-dialog {
    --el-dialog-width: calc(100vw - 16px) !important;
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    margin: 8px auto !important;
    max-height: calc(100vh - 16px) !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .el-overlay .el-dialog__header {
    flex-shrink: 0;
  }
  .el-overlay .el-dialog__body {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    max-height: none !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .el-overlay .el-dialog__footer {
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 8px;
  }
  .el-overlay .legacy-window-footer,
  .el-overlay .footer-actions,
  .el-overlay .dialog-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
  }
  .el-overlay .el-drawer:not(.layout-mobile-nav-drawer) {
    width: 100% !important;
    max-width: 100vw !important;
  }
  .el-overlay .el-drawer__body {
    min-width: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .el-overlay .el-message-box {
    width: calc(100vw - 24px) !important;
    max-width: 420px;
  }
  /* 6-column legacy kv tables -> label | value */
  .el-overlay .info-table,
  .el-overlay .ship-table,
  .el-overlay .human-grid-table.detail-form,
  .el-overlay table.human-grid-table {
    display: block;
    width: 100%;
    table-layout: auto !important;
  }
  .el-overlay .info-table colgroup,
  .el-overlay .ship-table colgroup,
  .el-overlay .human-grid-table.detail-form colgroup,
  .el-overlay table.human-grid-table colgroup {
    display: none;
  }
  .el-overlay .info-table tbody,
  .el-overlay .info-table thead,
  .el-overlay .ship-table tbody,
  .el-overlay .ship-table thead,
  .el-overlay .human-grid-table.detail-form tbody,
  .el-overlay .human-grid-table.detail-form thead,
  .el-overlay table.human-grid-table tbody,
  .el-overlay table.human-grid-table thead {
    display: block;
  }
  .el-overlay .info-table tr,
  .el-overlay .ship-table tr,
  .el-overlay .human-grid-table.detail-form tr,
  .el-overlay table.human-grid-table tr {
    display: grid;
    grid-template-columns: 7.2em minmax(0, 1fr);
  }
  .el-overlay .info-table td,
  .el-overlay .info-table th,
  .el-overlay .ship-table td,
  .el-overlay .ship-table th,
  .el-overlay .human-grid-table.detail-form td,
  .el-overlay .human-grid-table.detail-form th,
  .el-overlay table.human-grid-table td,
  .el-overlay table.human-grid-table th {
    display: block;
    width: auto !important;
    min-width: 0;
    box-sizing: border-box;
    white-space: normal;
  }
  .el-overlay .info-table td[colspan="5"],
  .el-overlay .info-table td[colspan="6"],
  .el-overlay .ship-table td[colspan="5"],
  .el-overlay .ship-table td[colspan="6"],
  .el-overlay .human-grid-table.detail-form td[colspan="5"],
  .el-overlay .human-grid-table.detail-form td[colspan="6"],
  .el-overlay table.human-grid-table td[colspan="5"],
  .el-overlay table.human-grid-table td[colspan="6"] {
    grid-column: 1/-1;
  }
  .el-overlay .info-table .cell-label,
  .el-overlay .info-table .lbl,
  .el-overlay .info-table td.lbl,
  .el-overlay .ship-table .cell-label,
  .el-overlay .ship-table .lbl,
  .el-overlay .ship-table td.lbl,
  .el-overlay .human-grid-table.detail-form .cell-label,
  .el-overlay .human-grid-table.detail-form .lbl,
  .el-overlay .human-grid-table.detail-form td.lbl,
  .el-overlay table.human-grid-table .cell-label,
  .el-overlay table.human-grid-table .lbl,
  .el-overlay table.human-grid-table td.lbl {
    white-space: normal !important;
    text-align: left;
    width: auto !important;
  }
  .el-overlay .legacy-grid {
    grid-template-columns: 1fr !important;
  }
  .el-overlay .legacy-grid .lg-cell,
  .el-overlay .legacy-grid .lg-cell.col-3,
  .el-overlay .legacy-grid .lg-cell.col-4,
  .el-overlay .legacy-grid .lg-cell.col-8,
  .el-overlay .legacy-grid .lg-cell.col-12 {
    grid-column: 1/-1;
    width: 100%;
  }
  .el-overlay .el-form .el-col {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
  .el-overlay .el-descriptions__table,
  .el-overlay .el-descriptions__table tbody,
  .el-overlay .el-descriptions__table tr {
    display: block;
    width: 100%;
  }
  .el-overlay .el-descriptions__cell {
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  .el-overlay .el-descriptions__label {
    flex: 0 0 7.2em;
  }
  .el-overlay .el-descriptions__content {
    flex: 1;
    min-width: 0;
  }
  .el-overlay .el-table,
  .el-overlay .items-wrap,
  .el-overlay .log-table-wrap,
  .el-overlay .table-wrap {
    min-width: 0;
    max-width: 100%;
  }
  .el-overlay .el-table__inner-wrapper,
  .el-overlay .items-wrap,
  .el-overlay .log-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .el-overlay .detail-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .el-overlay .detail-toolbar .breadcrumb-text,
  .el-overlay .detail-toolbar .process-flow {
    min-width: 0;
    white-space: normal;
    word-break: break-all;
  }
}
/* List pages only: stack filters, unstick right-fixed table columns. */
@media (max-width: 768px) {
  .legacy-list-page .filter-panel {
    overflow: visible !important;
  }
  .legacy-list-page .sell-filter-grid,
  .legacy-list-page .buy-filter-grid,
  .legacy-list-page .co-filter-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: none !important;
    grid-auto-rows: minmax(32px, auto);
  }
  .legacy-list-page .co-filter-grid > * {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
  .legacy-list-page .sell-filter-grid .field-pair.misc,
  .legacy-list-page .buy-filter-grid .field-pair.misc {
    grid-column: 1/-1 !important;
    grid-row: auto !important;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-items: stretch;
    padding-left: 0;
  }
  .legacy-list-page .buy-filter-grid .model-field {
    grid-column: 1/-1 !important;
  }
  .legacy-list-page .status-group {
    flex-wrap: wrap;
    white-space: normal;
    grid-column: 1/-1;
    row-gap: 4px;
  }
  .legacy-list-page .field-pair.flow {
    flex-wrap: wrap;
  }
  .legacy-list-page .field-pair.flow .el-select {
    flex: 1 1 120px;
    min-width: 0;
  }
  .legacy-list-page .filter-grid-dynamic .filter-toolbar-row {
    grid-column: 1/-1 !important;
    flex-wrap: wrap;
  }
  /* Right-fixed columns eat the viewport; let them scroll with the table. */
  .el-table .el-table-fixed-column--right {
    position: static !important;
    right: auto !important;
    left: auto !important;
    z-index: auto !important;
    box-shadow: none !important;
  }
  .el-table .el-table-fixed-column--right.is-first-column::before,
  .el-table .el-table-fixed-column--right.is-last-column::before {
    display: none !important;
  }
  .el-table__fixed-right,
  .el-table__fixed-right-patch {
    display: none !important;
  }
  .legacy-list-page .table-wrap,
  .legacy-list-page .table-section {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .legacy-list-page .pagination-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .legacy-list-page .pagination-bar .money-sum-info {
    flex: none;
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow-x: auto;
    word-break: keep-all;
  }
  .legacy-list-page .pagination-bar .pagination-right {
    flex-shrink: 1;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body,
#app {
  height: 100%;
  font-family: var(--silk-font-family, -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, sans-serif);
  font-size: 14px;
  color: #111827;
  background-color: #f0f2f5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #4f6ef7;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: #3b57d8;
}

.page-container {
  padding: 4px;
}

.content-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #f3f4f6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 20px;
  transition: box-shadow 0.2s ease;
}
.content-card:hover {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

::-webkit-scrollbar-track {
  background: transparent;
}

.el-message {
  z-index: 5000 !important;
}

.el-overlay.is-message-box {
  z-index: 4000 !important;
}

.legacy-window-popper.el-popper {
  z-index: 3100 !important;
}

.auto-quote-import-popper.el-popper {
  z-index: 3200 !important;
}:root {
  --el-color-primary: #4f6ef7;
  --el-color-primary-light-3: #6b85f9;
  --el-color-primary-light-5: #9aaafc;
  --el-color-primary-light-7: #c7d2fe;
  --el-color-primary-light-9: #eef2ff;
  --el-color-primary-dark-2: #3b57d8;
  --el-font-size-base: 14px;
  --el-border-radius-base: 8px;
  --el-border-radius-small: 6px;
  --el-bg-color: #ffffff;
  --el-bg-color-page: #f0f2f5;
  --el-text-color-primary: #111827;
  --el-text-color-regular: #374151;
  --el-text-color-secondary: #6b7280;
  --el-text-color-placeholder: #9ca3af;
  --el-border-color: #e5e7eb;
  --el-border-color-light: #f3f4f6;
  --el-menu-item-height: 44px;
  --el-menu-sub-item-height: 40px;
}

.el-card {
  border: 1px solid var(--el-border-color-light);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.el-card .el-card__header {
  border-bottom: 1px solid var(--el-border-color-light);
  font-weight: 600;
  color: var(--el-text-color-primary);
}

.el-table {
  --el-table-border-color: var(--el-border-color-light);
  --el-table-header-bg-color: #f9fafb;
  border-radius: 8px;
  overflow: hidden;
}

.el-button {
  border-radius: 8px;
  font-weight: 500;
}

button.legacy-btn,
.legacy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 32px;
  min-height: 32px;
  padding: 8px 15px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid var(--el-border-color, #dcdfe6);
  background: #ffffff;
  color: var(--el-text-color-regular, #606266);
  cursor: pointer;
  font-family: inherit;
  outline: none;
  white-space: nowrap;
}

button.legacy-btn:hover,
.legacy-btn:hover {
  color: var(--el-color-primary, #409eff);
  border-color: var(--el-color-primary-light-7, #c6e2ff);
  background: var(--el-color-primary-light-9, #ecf5ff);
}

button.legacy-btn:disabled,
.legacy-btn:disabled {
  color: var(--el-text-color-placeholder, #a8abb2);
  background: var(--el-fill-color-blank, #fff);
  border-color: var(--el-border-color-lighter, #ebeef5);
  cursor: not-allowed;
}

button.legacy-btn-primary,
.legacy-btn.legacy-btn-primary {
  background: var(--el-color-primary, #409eff);
  border-color: var(--el-color-primary, #409eff);
  color: #fff;
}

button.legacy-btn-primary:hover,
.legacy-btn.legacy-btn-primary:hover {
  background: var(--el-color-primary-light-3, #79bbff);
  border-color: var(--el-color-primary-light-3, #79bbff);
  color: #fff;
}

button.legacy-btn-primary:disabled,
.legacy-btn.legacy-btn-primary:disabled {
  background: var(--el-color-primary-light-5, #a0cfff);
  border-color: var(--el-color-primary-light-5, #a0cfff);
  color: #fff;
  cursor: not-allowed;
}

button.legacy-btn-add,
.legacy-btn.legacy-btn-add {
  background: var(--el-color-success, #67c23a);
  border-color: var(--el-color-success, #67c23a);
  color: #fff;
}

button.legacy-btn-add:hover,
.legacy-btn.legacy-btn-add:hover {
  background: var(--el-color-success-light-3, #95d475);
  border-color: var(--el-color-success-light-3, #95d475);
  color: #fff;
}

button.legacy-btn-danger,
.legacy-btn.legacy-btn-danger {
  background: #fff;
  border-color: var(--el-color-danger, #f56c6c);
  color: var(--el-color-danger, #f56c6c);
}

button.legacy-btn-danger:hover,
.legacy-btn.legacy-btn-danger:hover {
  background: var(--el-color-danger-light-9, #fef0f0);
  border-color: var(--el-color-danger, #f56c6c);
  color: var(--el-color-danger, #f56c6c);
}

.el-input__wrapper {
  border-radius: 8px;
}

.el-dropdown-menu {
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}html {
  --silk-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --silk-font-weight: 400;
}

html,
body,
#app {
  font-family: var(--silk-font-family);
}

/* Zoom scales every px font (and layout) together. JS also sets html.style.zoom. */
html[data-font-size=large] {
  zoom: 1.15;
}

html[data-font-size=xlarge] {
  zoom: 1.3;
}

html[data-font-bold="1"] body,
html[data-font-bold="1"] #app,
html[data-font-bold="1"] .el-button,
html[data-font-bold="1"] .el-input,
html[data-font-bold="1"] .el-input__inner,
html[data-font-bold="1"] .el-textarea__inner,
html[data-font-bold="1"] .el-select__wrapper,
html[data-font-bold="1"] .el-table,
html[data-font-bold="1"] .el-table td.el-table__cell,
html[data-font-bold="1"] .el-menu-item,
html[data-font-bold="1"] .el-sub-menu__title,
html[data-font-bold="1"] .el-form-item__label,
html[data-font-bold="1"] .el-checkbox__label,
html[data-font-bold="1"] .el-radio__label,
html[data-font-bold="1"] .el-tabs__item,
html[data-font-bold="1"] .el-pagination,
html[data-font-bold="1"] .el-dropdown-menu__item,
html[data-font-bold="1"] .el-tag,
html[data-font-bold="1"] .el-link {
  font-weight: 600;
}

html[data-font-bold="1"][data-ui-style=qingxin] .el-button {
  font-weight: 600;
}

.el-overlay,
.el-popper,
.el-dropdown-menu,
.el-message,
.el-notification,
.el-loading-mask,
.vxe-table {
  font-family: var(--silk-font-family);
}
/* 小程序 / App web-view 全屏铺到刘海下，env() 有时为 0，至少留出状态栏高度 */
html.is-wechat-webview {
  --silk-safe-top: max(44px, env(safe-area-inset-top, 0px));
}

html.is-wechat-webview .modern-header,
html.is-wechat-webview .top-header,
html.is-wechat-webview .hist-toolbar,
html.is-wechat-webview .classic-header {
  padding-top: var(--silk-safe-top);
  height: calc(var(--silk-header-height, 48px) + var(--silk-safe-top));
  box-sizing: border-box;
}

html.is-wechat-webview .login-page {
  padding-top: var(--silk-safe-top);
  box-sizing: border-box;
}

/* 微信小程序 web-view：100vh/flex 会收成 0，CSS 动画常停在 opacity:0 */
html.is-wechat-webview,
html.is-wechat-webview body,
html.is-wechat-webview #app {
  height: auto !important;
  min-height: 100% !important;
  overflow: auto !important;
}

html.is-wechat-webview .modern-layout {
  height: auto !important;
  min-height: 100vh !important;
}

html.is-wechat-webview .modern-body,
html.is-wechat-webview .modern-main,
html.is-wechat-webview .main-content,
html.is-wechat-webview .classic-main,
html.is-wechat-webview .hist-main,
html.is-wechat-webview .catalog-list-page,
html.is-wechat-webview .legacy-list-page,
html.is-wechat-webview .accounting-vouchers-page {
  min-height: 60vh !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

html.is-wechat-webview .modern-main > *,
html.is-wechat-webview .main-content > *,
html.is-wechat-webview .classic-main > *,
html.is-wechat-webview .hist-main > * {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

html.is-wechat-webview .card-enter,
html.is-wechat-webview .fade-enter-from,
html.is-wechat-webview .fade-leave-to,
html.is-wechat-webview .fade-enter-active,
html.is-wechat-webview .fade-leave-active {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
  transform: none !important;
}