.kd-page .kd-table-enhanced[data-sales-line-grid] {
  --sales-line-control-height: 34px;
  --sales-line-control-offset: 8px;
}

.kd-page .kd-table-enhanced[data-sales-line-grid]:has(.kd-td-qty .pc-native-input-host)
  :is(.kd-td-product, .kd-td-unit, .kd-td-qty, .kd-td-price, .kd-td-money-cell, .kd-td-warehouse, .kd-td-remark, .kd-td-cost) {
  vertical-align: top !important;
  padding-top: var(--sales-line-control-offset) !important;
  padding-bottom: var(--sales-line-control-offset) !important;
}

.kd-page .kd-table-enhanced[data-sales-line-grid] :is(.pc-native-input-host, .pc-search-select) {
  margin-block: 0;
  min-width: 0;
}

.kd-page .kd-table-enhanced[data-sales-line-grid] :is(input.kd-td-input, .kd-td-select, .pc-search-select__trigger) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: var(--sales-line-control-height);
  min-height: var(--sales-line-control-height);
  margin-block: 0;
}

.kd-page .kd-table-enhanced[data-sales-line-grid] :is(.kd-td-qty, .kd-td-price, .kd-td-money-cell) input.kd-td-input-num {
  padding-inline: 8px;
  font-family: system-ui, "Microsoft YaHei", sans-serif;
  font-size: 14px !important;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.kd-page .kd-table-enhanced[data-sales-line-grid] :is(.kd-td-qty, .kd-td-price, .kd-td-money-cell) input.kd-td-input-num:not(:disabled) {
  color: var(--color-text-primary, #18283d) !important;
  background-color: var(--color-bg-card, #fff) !important;
}

.kd-page .kd-table-enhanced[data-sales-line-grid] :is(.kd-td-qty, .kd-td-price, .kd-td-money-cell) input.kd-td-input-num:focus-visible {
  border-color: var(--color-accent, #2f80ed) !important;
}

.kd-page .kd-table-enhanced[data-sales-line-grid] .kd-td-cost > .kd-cost-value {
  color: var(--color-danger, #b42318) !important;
  font-family: system-ui, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.kd-page .kd-table-enhanced[data-sales-line-grid]:has(.kd-td-qty .pc-native-input-host) .kd-td-cost > span {
  display: inline-block;
  line-height: var(--sales-line-control-height);
}

.kd-page .kd-table-enhanced[data-sales-line-grid] .kd-td-cost > small {
  margin-top: 2px;
  color: var(--color-text-secondary, #53657a) !important;
  font-family: system-ui, "Microsoft YaHei", sans-serif;
  font-size: 11px;
  line-height: 14px;
}

.kd-page .kd-table-enhanced[data-sales-line-grid] .kd-price-source {
  margin-top: 2px !important;
}

.kd-page .kd-table .kd-th-gross-price,
.kd-page .kd-table .kd-td-gross-price {
  text-align: right !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.kd-td-gross-price > span {
  color: var(--color-text-primary, #18283d);
  font-weight: 650;
}
.kd-td-gross-price > .kd-gross-price-empty {
  color: var(--color-text-secondary, #526278);
  font-weight: 400;
}

.kd-page .kd-table .kd-td-last-cost {
  color: var(--color-text-secondary, #526278);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kd-td-last-cost .kd-last-cost-value {
  color: var(--color-danger, #b42318);
  font-weight: 700;
}

.kd-td-last-cost small {
  display: block;
  color: var(--color-text-secondary, #526278);
  font-size: 11px;
}

