/* Bill summaries stay aligned; supporting facts read as compact inline pairs. */
.desktop-workspace[data-web-theme=monet] table.kp-two-row-table {
  width: 100%; min-width: 0; max-width: 100%; table-layout: fixed;
}
.desktop-workspace[data-web-theme=monet] .kp-two-row-table :is(th,td) {
  min-width: 0 !important; max-width: none; white-space: normal !important;
  overflow-wrap: anywhere; padding: 8px; vertical-align: middle;
  font-size: var(--web-type-md); line-height: 1.5;
}
.desktop-workspace[data-web-theme=monet] .kp-two-row-table th {
  line-height: 1.5; font-size: var(--web-type-sm); font-weight: 600;
}
.desktop-workspace[data-web-theme=monet] .kp-two-row-table th[data-field=waybill_no] { width: 17% !important; }
.desktop-workspace[data-web-theme=monet] .kp-two-row-table th[data-field=origin_station] { width: 13% !important; }
.desktop-workspace[data-web-theme=monet] .kp-two-row-table th[data-field=receiver] { width: 12% !important; }
.desktop-workspace[data-web-theme=monet] .kp-two-row-table th[data-field=pieces] { width: 5% !important; }
.desktop-workspace[data-web-theme=monet] .kp-two-row-table th[data-field=freight] { width: 8% !important; }
.desktop-workspace[data-web-theme=monet] .kp-two-row-table th[data-field=delivery_person] { width: 6% !important; padding-inline: 6px; }
.desktop-workspace[data-web-theme=monet] .kp-two-row-table th[data-field=sign_status] { width: 20% !important; }
.desktop-workspace[data-web-theme=monet] .kp-two-row-table th[data-field=settlement_status] { width: 9% !important; }
.desktop-workspace[data-web-theme=monet] .kp-two-row-table .web-detail-column { width: 10% !important; }
.desktop-workspace[data-web-theme=monet] .kp-two-row-table .kp-bill-main-row { height: 52px; }
.desktop-workspace[data-web-theme=monet] .kp-two-row-table .kp-bill-main-row > td { font-weight: 500; }
.desktop-workspace[data-web-theme=monet] .kp-two-row-table .kp-bill-main-row strong { font-weight: 650; }
.desktop-workspace[data-web-theme=monet] table.data-table.kp-two-row-table tbody tr.kp-bill-main-row > td,
.desktop-workspace[data-web-theme=monet] table.data-table.kp-two-row-table tr.kp-bill-detail-row > td {
  background: var(--monet-panel, #edf3f0); position: static;
}
.desktop-workspace[data-web-theme=monet] table.data-table.kp-two-row-table tbody tr.kp-bill-even > td {
  background: var(--monet-alternate, #e2ece5);
}
.desktop-workspace[data-web-theme=monet] .kp-two-row-table .kp-bill-main-row:has(+ .kp-bill-detail-row) > td {
  border-bottom: 0;
}
.desktop-workspace[data-web-theme=monet] .kp-two-row-table .kp-bill-detail-row > td {
  padding: 0 12px 8px; border-top: 0; white-space: normal;
}
.desktop-workspace[data-web-theme=monet] .kp-bill-detail-grid {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 4px 24px; margin: 0; padding: 8px 0 0;
  border-top: 1px solid var(--web-line, #cedcd6); text-align: left;
}
.desktop-workspace[data-web-theme=monet] .kp-bill-detail-item {
  display: flex; align-items: baseline; gap: 8px;
  min-width: 0; max-width: 100%; padding: 0; margin: 0; text-align: left;
  font-size: var(--web-type-sm);
}
.desktop-workspace[data-web-theme=monet] .kp-bill-detail-grid:not(.kp-bill-meta) .kp-bill-detail-item { min-width: 5em; }
.desktop-workspace[data-web-theme=monet] .kp-bill-fees .kp-bill-detail-item:nth-child(7) { min-width: 9em; }
.desktop-workspace[data-web-theme=monet] .kp-bill-detail-grid .kp-bill-detail-item[data-field=sender] { min-width: 7em; }
.desktop-workspace[data-web-theme=monet] .kp-bill-detail-item dt {
  flex: 0 0 auto; font-size: var(--web-type-sm); color: var(--monet-muted, #526c66);
  line-height: 1.5; font-weight: 400; white-space: nowrap;
}
.desktop-workspace[data-web-theme=monet] .kp-bill-detail-item dd {
  min-width: 0; margin: 0; font-size: var(--web-type-sm); font-weight: 600;
  color: var(--web-ink); font-variant-numeric: tabular-nums;
  line-height: 1.5; overflow-wrap: anywhere; white-space: normal;
}
.desktop-workspace[data-web-theme=monet] .kp-bill-detail-item[data-field=remark] { flex: 0 1 auto; }
.desktop-workspace[data-web-theme=monet] .kp-bill-meta {
  border: 0; padding-top: 4px; gap: 4px 24px;
}
.desktop-workspace[data-web-theme=monet] .kp-bill-meta dd { font-weight: 500; }
.desktop-workspace[data-web-theme=monet] .kp-two-row-table .web-cell-sub {
  display: flex; flex-wrap: wrap; gap: 0 6px; min-width: 0;
  font-size: var(--web-type-xs); font-weight: 400;
}
.desktop-workspace[data-web-theme=monet] .kp-two-row-table :is(button,select) {
  max-width: 100%; white-space: normal; overflow-wrap: anywhere;
}
.desktop-workspace[data-web-theme=monet] .kp-two-row-table .delivery-status-cell { gap: 4px; }
.desktop-workspace[data-web-theme=monet] .kp-two-row-table :is(.external-chip,.external-status,.waybill-settlement-status) {
  min-width: 0; max-width: 100%; box-sizing: border-box; white-space: normal; overflow-wrap: anywhere;
  font-size: var(--web-type-sm); font-weight: 600;
}
.desktop-workspace[data-web-theme=monet] .kp-two-row-table .row-actions {
  display: flex; justify-content: center; align-items: center;
  width: 100%; min-width: 0; max-width: 100%; flex-wrap: wrap; gap: 4px;
}
.desktop-workspace[data-web-theme=monet] .kp-two-row-table .row-actions button {
  min-width: 0; font-size: var(--web-type-sm); font-weight: 600; white-space: nowrap;
  padding-inline: 0;
}
.desktop-workspace[data-web-theme=monet] .kp-two-row-table .external-col-ticket strong { font-size: var(--web-type-md); }
.desktop-workspace[data-web-theme=monet] .kp-two-row-table .sort-head {
  white-space: normal; min-width: 0; font-size: var(--web-type-sm); font-weight: 600; gap: 2px;
}
.desktop-workspace[data-web-theme=monet] .kp-bill-detail-item .sort-head {
  width: auto; justify-content: flex-start; color: inherit; font-weight: 400;
  white-space: nowrap; padding: 0; line-height: 1.5; gap: 2px;
}
.desktop-workspace[data-web-theme=monet] .kp-two-row-table .kp-bill-date-sort {
  display: block; font-size: var(--web-type-xs); font-weight: 500; margin-top: 2px;
}
.desktop-workspace[data-web-theme=monet] .external-cargo-table.kp-two-row-table col:nth-child(1) { width: 15% !important; }
.desktop-workspace[data-web-theme=monet] .external-cargo-table.kp-two-row-table col:nth-child(2) { width: 13% !important; }
.desktop-workspace[data-web-theme=monet] .external-cargo-table.kp-two-row-table col:nth-child(3) { width: 10% !important; }
.desktop-workspace[data-web-theme=monet] .external-cargo-table.kp-two-row-table col:nth-child(4) { width: 10% !important; }
.desktop-workspace[data-web-theme=monet] .external-cargo-table.kp-two-row-table col:nth-child(5) { width: 10% !important; }
.desktop-workspace[data-web-theme=monet] .external-cargo-table.kp-two-row-table col:nth-child(6) { width: 9% !important; }
.desktop-workspace[data-web-theme=monet] .external-cargo-table.kp-two-row-table col:nth-child(7) { width: 10% !important; }
.desktop-workspace[data-web-theme=monet] .external-cargo-table.kp-two-row-table col:nth-child(8) { width: 8% !important; }
.desktop-workspace[data-web-theme=monet] .external-cargo-table.kp-two-row-table col:nth-child(9) { width: 15% !important; }
.desktop-workspace[data-web-theme=monet] .kp-two-row-table :is(.external-party-name,.external-party-phone) {
  max-width: 100%; overflow-wrap: anywhere; white-space: normal;
}
.desktop-workspace[data-web-theme=monet] .kp-two-row-table .external-party-name {
  font-size: var(--web-type-md); font-weight: 600;
}
@media (max-width: 1100px) {
  .desktop-workspace[data-web-theme=monet] table.kp-two-row-table { min-width: 720px; }
  .desktop-workspace[data-web-theme=monet] .kp-two-row-table :is(th,td) { padding-inline: 5px; }
  .desktop-workspace[data-web-theme=monet] .kp-two-row-table .web-cell-sub span { white-space: normal; }
}
@media (max-width: 600px) {
  .desktop-workspace[data-web-theme=monet] table.kp-two-row-table { min-width: 720px; }
  .desktop-workspace[data-web-theme=monet] .kp-bill-detail-wide { grid-column: auto; }
}

/* External cargo sorting stays in one named control group, outside bill rows. */
.desktop-workspace[data-web-theme=monet] .external-list-controls .external-sort-controls,
.desktop-workspace[data-web-theme=monet] .external-list-controls .external-sort-controls label {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  min-width: 0; margin: 0; font-size: var(--web-type-sm);
}
.desktop-workspace[data-web-theme=monet] .external-list-controls .external-sort-controls select {
  width: auto; min-width: 0; max-width: 100%; min-height: 36px;
  padding: 6px 28px 6px 10px; font-size: var(--web-type-sm);
  color: var(--web-ink); background-color: var(--monet-panel, #edf3f0);
  border: 1px solid var(--web-line, #cedcd6); border-radius: 6px;
}
.desktop-workspace[data-web-theme=monet] .external-list-controls > button {
  margin-left: auto;
}
.desktop-workspace[data-web-theme=monet] .external-cargo-table .external-col-ticket .web-cell-sub {
  justify-content: center;
}
