/* Wider working space, fixed actions, one scroll area per table. */
@media (min-width: 900px) {
  html .dr-dialog.dr-size-form {
    width: min(800px, calc(100vw - 48px));
  }
  html .dr-dialog.dr-size-large {
    width: min(1160px, calc(100vw - 48px));
  }
  html .dr-dialog.dr-drawer.dr-size-details {
    width: min(1040px, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
  }
}
html .dr-dialog .form-grid > * {
  min-width: 0;
}
html .dr-dialog .table-scroll {
  max-height: min(55dvh, 520px);
  overflow: auto;
  scrollbar-gutter: stable;
}
html .dr-dialog .table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-raised, #fff);
}
.sg-contacts > .btn {
  margin-block: 8px;
}
.sg-contacts:has(> div:empty) {
  padding-block: 6px;
}
.rh-scan {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 12px 18px;
  max-width: 700px;
}
.rh-scan .field {
  flex: 1;
  min-width: 0;
}

.rh-hint {
  padding-inline: 18px;
}
.rh-document .rh-signatures {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
}
.rh-document p {
  line-height: 1.9;
}
@media (max-width: 740px) {
  .sg-bulk-bar > div {
    flex-wrap: wrap;
  }
  .rh-document .rh-signatures {
    display: block;
  }
}

.rh-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-block: 10px;
}
.rh-document td.rh-contents {
  white-space: normal;
  min-width: 180px;
  max-width: 320px;
  overflow-wrap: anywhere;
}
.mf-cod {
  display: grid;
  gap: 5px;
  white-space: nowrap;
}
.mf-cod > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.mf-no-cod {
  color: var(--text-muted);
}
html :is(.design-reference,.shipments-reference) .sg-bulk-bar .dr-button.dr-button.action-red:not(:disabled) {
  color: #b91c1c;
  border-color: #eaa8a8;
  background: #fff1f2;
}
html :is(.design-reference,.shipments-reference) .sg-bulk-bar .dr-button.dr-button.action-purple:not(:disabled) {
  color: #6d28d9;
  border-color: #cbb4ef;
  background: #f5f3ff;
}
html :is(.design-reference,.shipments-reference) .sg-bulk-bar .dr-button.dr-button.action-blue:not(:disabled) {
  color: #1d4ed8;
  border-color: #b0c6ec;
  background: #eff6ff;
}
html :is(.design-reference,.shipments-reference) .sg-bulk-bar .dr-button.dr-button.action-green:not(:disabled) {
  color: #047857;
  border-color: #a0d8c0;
  background: #ecfdf5;
}
html[data-theme='dark'] :is(.design-reference,.shipments-reference) .sg-bulk-bar .dr-button.dr-button.action-red:not(:disabled) {
  color: #fca5a5;
  background: #421d25;
  border-color: #7f3545;
}
html[data-theme='dark'] :is(.design-reference,.shipments-reference) .sg-bulk-bar .dr-button.dr-button.action-purple:not(:disabled) {
  color: #d8b4fe;
  background: #30203f;
  border-color: #654888;
}
html[data-theme='dark'] :is(.design-reference,.shipments-reference) .sg-bulk-bar .dr-button.dr-button.action-blue:not(:disabled) {
  color: #93c5fd;
  background: #162e4b;
  border-color: #375d85;
}
html[data-theme='dark'] :is(.design-reference,.shipments-reference) .sg-bulk-bar .dr-button.dr-button.action-green:not(:disabled) {
  color: #6ee7b7;
  background: #15382d;
  border-color: #34765d;
}
html
  .sg-bulk-bar
  .dr-button:is(
    .action-red,
    .action-purple,
    .action-blue,
    .action-green
  ):disabled {
  color: var(--disabled-text, #87919e);
  border-color: var(--border, #d4d9df);
  background: var(--surface, #f7f8fa);
}
