/* loads page/module styles. Moved from styles.css for easier maintenance. */
body[data-theme="dark"] th,
body[data-theme="dark"] .loads-filter-row th,
body[data-theme="dark"] .table-wrap table th:last-child,
body[data-theme="dark"] .table-wrap table td:last-child {
  background: var(--panel-2);
  color: var(--muted);
}

body.loads-mode {
  background: var(--bg);
}

body.loads-mode .sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
}

body.loads-mode .brand strong {
  color: var(--header-text);
}

body.loads-mode .brand span {
  color: var(--header-muted);
  letter-spacing: 0;
}

body.loads-mode .nav-item {
  border-radius: 11px;
  color: var(--sidebar-text);
}

body.loads-mode .nav-item:hover {
  background: #f4f7fb;
  color: var(--ink);
}

body.loads-mode .nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

body.loads-mode .nav-item small {
  color: var(--sidebar-muted);
}

body.loads-mode .pagebar {
  min-height: 70px;
  display: grid;
  grid-template-columns: max-content minmax(320px, 1fr) max-content;
  align-items: center;
  padding: 12px 28px;
  column-gap: 22px;
}

body.loads-mode .pagebar > div:first-child {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

body.loads-mode .pagebar p {
  display: none;
}

body.loads-mode .pagebar h1 {
  font-size: 24px;
  line-height: 1;
}

body.loads-mode .top-actions {
  justify-self: end;
  white-space: nowrap;
}

body.loads-mode .primary {
  min-width: 128px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), #0784a8);
  font-weight: 700;
}

.load-create-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.load-create-caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
}

.load-create-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 45;
  width: 350px;
  border: 1px solid #d6dce2;
  border-radius: 14px;
  background: #fff;
  color: #1f2933;
  box-shadow: 0 18px 42px rgba(16, 32, 51, .18);
  padding: 8px 0;
}

.load-create-menu.open {
  display: block;
}

.load-create-menu button {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 12px;
  border: 0;
  background: #fff;
  color: #1f2933;
  padding: 10px 18px 10px 16px;
  text-align: left;
}

.load-create-menu button:hover {
  background: #f6f8ff;
}

.load-create-menu b,
.load-create-menu small {
  display: block;
}

.load-create-menu b {
  font-size: 15px;
}

.load-create-menu small {
  margin-top: 3px;
  color: #4f6070;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}

.load-create-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 23px;
  font-weight: 800;
}

.load-create-icon.text {
  font-family: Georgia, serif;
}

.load-pdf-import {
  display: grid;
  gap: 14px;
  padding: 22px 20px 10px;
}

.load-pdf-import-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #2d333c;
  font-size: 13px;
}

.load-pdf-import-head span {
  min-width: 120px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #50b7ed;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
}

.load-pdf-drop {
  position: relative;
  min-height: 160px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid #cfd6dd;
  border-radius: 3px;
  background: #fff;
  text-align: center;
  padding: 24px;
  cursor: pointer;
}

.load-pdf-drop:hover {
  border-color: #54a7e8;
  background: #fbfdff;
}

.load-pdf-drop span {
  color: #68778a;
}

.load-pdf-drop span b {
  color: #1882e4;
}

.load-pdf-drop small {
  max-width: 460px;
  color: #7c8aa0;
  font-size: 12px;
}

.load-pdf-drop small.error-text {
  color: #b91c1c;
  font-weight: 700;
}

.load-pdf-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.load-pdf-upload-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f0f3f7;
}

.load-pdf-upload-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #54657b;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.loads-mode .board {
  height: 100%;
  padding: 0;
  background: var(--bg);
}

.loads-grid-shell {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

body.loads-mode .loads-grid-shell {
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  padding: 12px 28px 28px;
}

.loads-scope {
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  min-height: 24px;
  padding: 0 8px;
}

.loads-scope::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-right: 1px solid var(--muted);
  border-bottom: 1px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
}

.loads-period-field {
  display: inline-flex;
  align-items: center;
  min-width: 118px;
  padding: 0;
}

.loads-period-field::after {
  display: none;
}

.loads-period-field .native-searchable-select {
  width: 118px;
}

.loads-period-field .native-searchable-input {
  min-height: 28px;
  padding: 4px 24px 4px 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 600;
}

.loads-period-field .native-searchable-toggle {
  width: 24px;
  border: 0;
  background: transparent;
}

.loads-period-field .native-searchable-menu {
  width: 150px;
  max-height: 490px;
  text-align: left;
}

.loads-pagebar-meter {
  min-width: 360px;
  max-width: none;
  justify-self: stretch;
  color: var(--text);
  font-size: 12px;
  align-self: center;
}

.load-expanded-row td {
  height: auto;
  padding: 0;
  border-top: 1px solid #45b978;
  border-bottom: 1px solid #45b978;
  background: var(--panel);
}

.loads-table td[colspan]:last-child {
  position: static;
  right: auto;
  z-index: auto;
}

.load-expanded-editor {
  padding: 12px 24px 14px;
  background: #ffffff;
  box-shadow: none;
}

.load-expanded-title {
  margin: 0 0 8px;
  color: #00965f;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
}

.load-expanded-grid {
  display: grid;
  grid-template-columns:
    minmax(180px, .75fr)
    minmax(210px, .9fr)
    minmax(210px, .9fr)
    minmax(230px, 1fr)
    minmax(220px, .95fr)
    minmax(280px, 1.35fr);
  gap: 16px;
  align-items: start;
}

.load-expanded-grid section {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.load-expanded-grid h3 {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 18px;
  margin: 0 0 5px;
  color: #00965f;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
}

.load-expanded-editor .quick-load-heading-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

.load-expanded-editor .quick-load-field {
  margin-bottom: 5px;
  color: #516174;
  font-size: 11px;
  line-height: 1.15;
  text-align: left;
  text-transform: uppercase;
}

.load-expanded-editor .quick-load-field > span:first-child:not(.input-affix) {
  margin-bottom: 2px;
  color: #516174 !important;
  font-size: 11px !important;
  line-height: 1.15;
}

.load-expanded-editor .quick-load-field input,
.load-expanded-editor .quick-load-field select,
.load-expanded-editor .quick-load-field .input-affix {
  min-height: 27px !important;
  height: 27px !important;
  border-radius: 3px !important;
  font-size: 12px;
  font-weight: 400 !important;
}

.load-expanded-editor .quick-load-field .input-affix input {
  min-height: 25px !important;
  height: 25px !important;
}

.load-expanded-editor .quick-load-split {
  gap: 6px;
}

.load-expanded-editor .danger-link {
  display: inline-flex;
  margin-top: 84px;
  color: #ef4444;
  font-size: 12px;
  text-decoration: underline;
}

.load-expanded-editor .quick-load-attachment {
  min-height: 86px;
  align-content: start;
  justify-items: stretch;
  gap: 5px;
  padding: 5px;
  border: 1px dashed #cfd8e3;
  border-radius: 0;
  background: #fbfbfb;
}

.load-expanded-editor .quick-load-attachment input {
  height: 0;
  min-height: 0 !important;
  padding: 0;
  opacity: 0;
}

.load-expanded-editor .quick-load-attachment em {
  margin-top: auto;
  color: #8a94a6;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  text-transform: none;
}

.load-expanded-doc-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 2px 4px;
  border: 1px solid #cfd8e3;
  background: #ffffff;
}

.load-expanded-doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 20px;
  padding: 0 6px 0 3px;
  border: 0;
  background: transparent;
  color: #00895f;
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
}

.load-expanded-doc-chip span {
  width: 8px;
  height: 10px;
  display: inline-block;
  border-radius: 1px;
  background: #22c55e;
}

.load-expanded-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
}

.load-expanded-actions .primary {
  min-width: 66px;
  height: 28px;
  border-radius: 4px;
}

.loads-table-wrap {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: visible;
  background: var(--panel);
}

.loads-table-panel {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

body.loads-mode .loads-table-panel {
  min-height: 0;
  height: calc(100vh - 162px);
  flex: 1 1 auto;
}

.loads-table-panel .table-pager {
  flex: 1 1 auto;
  align-items: flex-end;
  margin-top: 0;
  padding: 16px 4px 0;
}

body.loads-mode .loads-table-wrap {
  flex: 0 0 auto;
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.loads-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  font-weight: 400;
}

.loads-table th,
.loads-table td {
  height: 34px;
  padding: 5px 7px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loads-table th:first-child,
.loads-table td:first-child {
  width: 34px;
  text-align: center;
}

.loads-table th:nth-child(2),
.loads-table td:nth-child(2) { width: 96px; }

.loads-table th:nth-child(3),
.loads-table td:nth-child(3) { width: 116px; }

.loads-table th:nth-child(4),
.loads-table td:nth-child(4) { width: 105px; }

.loads-table th:nth-child(5),
.loads-table td:nth-child(5) { width: 118px; }

.loads-table th:nth-child(6),
.loads-table td:nth-child(6) { width: 98px; }

.loads-table th:nth-child(7),
.loads-table td:nth-child(7),
.loads-table th:nth-child(8),
.loads-table td:nth-child(8) { width: 126px; }

.loads-table th:nth-child(9),
.loads-table td:nth-child(9) { width: 96px; }

.loads-table th:nth-child(10),
.loads-table td:nth-child(10) { width: 122px; }

.loads-table th:nth-child(11),
.loads-table td:nth-child(11) { width: 84px; }

.loads-table th:nth-child(12),
.loads-table td:nth-child(12) { width: 98px; }

.loads-table th:nth-child(13),
.loads-table td:nth-child(13) { width: 230px; }

.loads-table th:nth-child(14),
.loads-table td:nth-child(14) { width: 118px; }

.loads-table th:nth-child(15),
.loads-table td:nth-child(15) { width: 106px; }

.load-docs-cell {
  white-space: nowrap;
}

.load-docs-summary {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: auto;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.load-doc-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: underline;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.load-doc-link.missing {
  color: #b91c1c;
}

.load-doc-separator {
  color: var(--muted);
  font-size: 10px;
}

.load-doc-file-mark {
  width: 7px;
  height: 9px;
  display: inline-block;
  border-radius: 1px;
  background: #16a34a;
  box-shadow: inset -2px 2px 0 rgba(255,255,255,.45);
}

.load-select-box {
  width: 16px;
  height: 16px;
  min-height: 0;
  accent-color: var(--accent);
}

.loads-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.loads-table th:last-child,
.loads-table td:last-child {
  position: static;
  right: auto;
  z-index: auto;
  background: inherit;
  overflow: visible;
}

.loads-table th:last-child {
  background: var(--panel);
  z-index: 4;
}

.loads-filter-row th {
  top: 34px;
  z-index: 3;
  background: var(--panel);
  padding-top: 0;
  font-weight: 400;
}

.loads-filter-row input,
.loads-filter-row select {
  width: 100%;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: var(--text);
  padding: 0 8px;
  outline: 0;
  font-weight: 400;
  font-size: 12px;
}

.load-note-preview {
  display: -webkit-box;
  max-height: 48px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.loads-active-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0 8px;
  font-weight: 700;
  text-decoration: underline;
}

.loads-pager > span {
  margin-right: 4px;
}

.loads-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent-soft) 70%, var(--panel));
}

.loads-table tbody tr.load-row-pending,
.loads-table tbody tr.load-row-ready,
.loads-table tbody tr.load-row-invoiced {
  background: #fff2cc;
}

.loads-table tbody tr.load-row-paid,
.loads-table tbody tr.load-row-funded {
  background: #cff4dc;
}

.loads-table tbody tr.load-row-canceled {
  background: #ffe1dc;
}

.loads-table tbody tr.load-row-delivered {
  background: #fff1d6;
}

.loads-table tbody tr.load-row-bol-received {
  background: transparent;
}

.loads-table tbody tr.load-row-highlight {
  background: #ffe9c6;
}

.loads-table tbody tr.load-row-selected {
  background: var(--accent-soft);
  box-shadow: inset 4px 0 0 var(--accent);
}

.loads-table tbody tr.load-row-selected:not(.load-row-highlight):not(.load-row-delivered):not(.load-row-bol-received) > td,
.loads-table tbody tr.load-row-selected:not(.load-row-highlight):not(.load-row-delivered):not(.load-row-bol-received):hover > td,
.loads-table tbody tr.load-row-selected:not(.load-row-highlight):not(.load-row-delivered):not(.load-row-bol-received) > td.load-actions {
  background: var(--accent-soft) !important;
}

.loads-table tbody tr.load-row-highlight.load-row-selected {
  background: #fff0d6;
  box-shadow: inset 4px 0 0 var(--accent);
}

.loads-table tbody tr.load-row-delivered.load-row-selected {
  background: #ffe9bf;
  box-shadow: inset 4px 0 0 var(--accent);
}

.loads-table tbody tr.load-row-bol-received.load-row-selected {
  background: var(--accent-soft);
  box-shadow: inset 4px 0 0 var(--accent);
}

body[data-theme="dark"] .loads-table tbody tr.load-row-pending,
body[data-theme="dark"] .loads-table tbody tr.load-row-ready,
body[data-theme="dark"] .loads-table tbody tr.load-row-invoiced,
body[data-theme="dark-auto"] .loads-table tbody tr.load-row-pending,
body[data-theme="dark-auto"] .loads-table tbody tr.load-row-ready,
body[data-theme="dark-auto"] .loads-table tbody tr.load-row-invoiced {
  background: color-mix(in srgb, #f2c15d 20%, var(--panel));
}

body[data-theme="dark"] .loads-table tbody tr.load-row-paid,
body[data-theme="dark"] .loads-table tbody tr.load-row-funded,
body[data-theme="dark-auto"] .loads-table tbody tr.load-row-paid,
body[data-theme="dark-auto"] .loads-table tbody tr.load-row-funded {
  background: color-mix(in srgb, var(--accent) 24%, var(--panel));
}

body[data-theme="dark"] .loads-table tbody tr.load-row-canceled,
body[data-theme="dark-auto"] .loads-table tbody tr.load-row-canceled {
  background: color-mix(in srgb, var(--danger) 20%, var(--panel));
}

body[data-theme="dark"] .loads-table tbody tr.load-row-delivered,
body[data-theme="dark-auto"] .loads-table tbody tr.load-row-delivered {
  background: color-mix(in srgb, var(--accent) 20%, var(--panel));
}

body[data-theme="dark"] .loads-table tbody tr.load-row-bol-received,
body[data-theme="dark-auto"] .loads-table tbody tr.load-row-bol-received {
  background: transparent;
}

body[data-theme="dark"] .loads-table tbody tr.load-row-highlight,
body[data-theme="dark-auto"] .loads-table tbody tr.load-row-highlight {
  background: color-mix(in srgb, var(--amber) 24%, var(--panel));
}

body[data-theme="dark"] .loads-table tbody tr.load-row-selected,
body[data-theme="dark-auto"] .loads-table tbody tr.load-row-selected,
body[data-theme="dark"] .loads-table tbody tr.load-row-highlight.load-row-selected,
body[data-theme="dark-auto"] .loads-table tbody tr.load-row-highlight.load-row-selected {
  background: color-mix(in srgb, var(--accent) 26%, var(--panel));
}

body[data-theme="dark"] .loads-table tbody tr.load-row-delivered.load-row-selected,
body[data-theme="dark-auto"] .loads-table tbody tr.load-row-delivered.load-row-selected {
  background: color-mix(in srgb, var(--accent) 32%, var(--panel));
}

body[data-theme="dark"] .loads-table tbody tr.load-row-bol-received.load-row-selected,
body[data-theme="dark-auto"] .loads-table tbody tr.load-row-bol-received.load-row-selected {
  background: color-mix(in srgb, var(--accent) 26%, var(--panel));
  box-shadow: inset 4px 0 0 var(--accent);
}

.load-selection-preview {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  padding: 16px 18px 10px;
}

.load-selection-preview .load-route-strip {
  padding-top: 0;
}

.load-selection-preview .load-summary-grid {
  border-bottom: 0;
  padding-bottom: 4px;
}

.load-sort-head {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.load-sort-head.active.asc .sort-mark::after,
.load-sort-head.active.desc .sort-mark::before {
  opacity: .35;
}

.load-id-link,
.broker-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--accent);
  text-decoration: underline;
  font-weight: 400;
  font: inherit;
}

.load-status {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
}

.load-status.new {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: var(--panel);
}

.load-status.draft {
  border: 1px solid #202733;
  color: #fff;
  background: #202733;
}

.load-status.dispatched {
  border: 1px solid #f3a22d;
  color: #f39a1b;
  background: var(--panel);
}

body[data-theme="dark"] .load-status.new,
body[data-theme="dark"] .load-status.dispatched,
body[data-theme="dark-auto"] .load-status.new,
body[data-theme="dark-auto"] .load-status.dispatched {
  background: var(--panel);
}

.load-status.delivered {
  border: 1px solid var(--accent);
  color: #fff;
  background: var(--accent);
}

.load-status.canceled {
  border: 1px solid #ff4b40;
  color: #fff;
  background: #ff4b40;
}

.draft-loads-panel {
  flex: 0 0 auto;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  box-shadow: 0 4px 14px rgba(16, 32, 51, .08);
  overflow: hidden;
}

.draft-loads-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

.draft-loads-head strong {
  font-size: 15px;
}

.draft-loads-head span {
  color: var(--muted);
  font-size: 12px;
}

.draft-loads-wrap {
  width: 100%;
  overflow-x: auto;
}

.draft-loads-table {
  width: 100%;
  min-width: 1420px;
  border-collapse: collapse;
  table-layout: auto;
}

.draft-loads-table th,
.draft-loads-table td {
  height: 42px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.draft-loads-table th {
  color: var(--muted);
  background: var(--panel);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.draft-loads-table tbody tr:last-child td {
  border-bottom: 0;
}

.draft-loads-table tbody tr:hover {
  background: var(--accent-soft);
}

.draft-loads-table .notes-cell {
  width: 280px;
  max-width: 280px;
}

.draft-loads-table .load-action-cluster {
  justify-content: flex-end;
}

.draft-loads-table td.load-actions:has(.draft-action-menu[open]) {
  position: relative;
  z-index: 180;
  overflow: visible !important;
}

.draft-loads-table .draft-action-menu > div {
  width: 124px !important;
  min-width: 124px !important;
  max-width: 124px !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 5px !important;
  overflow: visible !important;
}

.draft-loads-table .draft-action-menu > div button {
  display: flex !important;
  width: 100% !important;
  min-height: 34px !important;
  align-items: center !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: var(--text) !important;
}

.draft-loads-table .draft-action-menu > div button.danger {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: var(--red) !important;
}

.load-status.draft {
  border: 1px solid #26313d;
  background: #26313d;
  color: #fff;
}

.load-review {
  position: relative;
  z-index: 0;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(480px, 1fr) minmax(560px, 1fr);
  overflow: hidden;
}

.load-review-document {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr);
  background: #e7ebef;
  border-right: 1px solid #cbd5df;
  overflow: hidden;
}

.load-review-toolbar {
  height: 56px;
  min-height: 56px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  border-bottom: 1px solid #d4dce5;
}

.load-review-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.load-review-toolbar select,
.load-review-toolbar button {
  height: 36px;
  border-radius: 2px;
}

.review-dock-button {
  min-width: 72px;
  padding-inline: 10px;
}

.load-review.pdf-undocked {
  grid-template-columns: minmax(0, 1fr);
}

.load-review.pdf-undocked .load-review-details {
  grid-column: 1;
}

.review-pdf-text-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  line-height: 1;
  transform-origin: 0 0;
  user-select: text;
  cursor: text;
}

.review-pdf-page-shell {
  position: relative;
  display: block;
  width: fit-content;
  margin: 0 auto 18px;
}

.review-pdf-page-shell .review-pdf-page {
  display: block;
}

.review-pdf-text-layer span {
  position: absolute;
  color: transparent;
  white-space: pre;
  transform-origin: 0 0;
  user-select: text;
}

.review-pdf-text-layer ::selection {
  background: rgba(44, 126, 214, .28);
}

.load-review-paper {
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 30px 48px;
}

.load-review-paper .review-pdf-pages {
  width: max-content;
  min-width: 100%;
}

.load-review-paper .review-pdf-page,
.load-review-paper .review-pdf-page-shell {
  max-width: none;
}

.load-review-paper iframe {
  width: 100%;
  height: 100%;
  min-height: 920px;
  border: 0;
  background: #fff;
}

.load-review-embedded {
  min-height: 980px;
  max-width: 100%;
  margin: 0 auto;
  background: transparent;
}

.load-review-embedded iframe {
  width: 100%;
  min-height: 980px;
  border: 0;
  display: block;
  background: #fff;
}

.load-review-embedded img {
  width: 100%;
  display: block;
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 32, 51, .14);
}

.load-review-loading {
  min-height: 980px;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: #34495e;
  padding: 30px;
}

.load-review-loading strong {
  font-size: 18px;
}

.load-review-loading span {
  color: #647482;
}

.load-review-loading.error span {
  color: #c24135;
}

.load-review-details {
  position: relative;
  z-index: 0;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 32px 92px;
  background: #fff;
}

.load-review-details h3 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 600;
  color: #102033;
}

.load-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 96px;
}

.load-lumper-action {
  border: 0;
  background: transparent;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  padding: 0;
  text-decoration: none;
  cursor: pointer;
}

.load-lumper-action span {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.load-actions {
  position: relative;
  justify-content: flex-end;
  min-width: 112px;
  overflow: visible;
}

.loads-table td.load-actions {
  overflow: visible;
}

.loads-table tbody tr:has(.load-action-menu[open]) td.load-actions {
  overflow: visible;
  position: relative;
  z-index: 25;
}

.load-action-cluster {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}

.load-lumper-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.load-lumper-link:hover {
  color: color-mix(in srgb, var(--accent) 78%, white);
  text-decoration: none;
}

.loads-table tbody tr:has(.load-action-menu[open]) {
  position: relative;
  z-index: 20;
}

.load-action-menu {
  position: relative;
  display: inline-flex;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  overflow: visible;
}

.load-action-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  min-height: 26px;
  padding: 0;
  border: 0;
  outline: none;
  white-space: nowrap;
  text-decoration: none !important;
  box-shadow: none;
  border-bottom: 0;
}

.load-action-menu summary::after {
  margin-left: 0;
  text-decoration: none;
}

.load-actions,
.load-action-cluster,
.load-action-menu,
.load-action-menu summary {
  border-bottom: 0 !important;
}

.load-action-menu[open] summary::after {
  transform: rotate(180deg);
}

.load-action-menu > div {
  right: 0;
  left: auto;
  top: calc(100% + 4px);
  z-index: 160;
  min-width: 150px;
  max-width: min(240px, calc(100vw - 16px));
  border-color: color-mix(in srgb, var(--line) 86%, var(--accent));
  box-shadow: 0 18px 34px rgba(0, 0, 0, .28);
}

.load-action-menu > div button {
  min-height: 34px;
  white-space: nowrap;
}

.report-filter-band .load-inline-combobox {
  width: 100%;
}

.report-filter-band .load-inline-combobox-control {
  height: var(--field-h);
}

.report-filter-band .load-inline-input {
  min-height: 0;
  height: 100%;
}

.report-filter-band .load-inline-combobox-menu {
  z-index: 30;
}

.load-route-strip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 2px 0 10px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.load-route-strip .route-card[draggable="true"] {
  position: relative;
  cursor: default;
  transition: box-shadow 140ms ease, transform 140ms ease, opacity 140ms ease;
}

.route-drag-handle {
  position: absolute;
  top: 7px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #758194;
  border: 1px solid #d7dee8;
  border-radius: 5px;
  background: #f8fafc;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.route-drag-handle:active { cursor: grabbing; }
.route-card-dragging { opacity: .48; transform: scale(.98); }
.route-pin.stop { background: #7b8797; }

.route-drop-before::before,
.route-drop-after::after {
  content: "";
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(5, 150, 105, .12);
}

.route-drop-before::before { left: -7px; }
.route-drop-after::after { right: -7px; }

.stop-order-change-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  margin: 0 0 8px;
  padding: 9px 12px;
  color: #654d00;
  border: 1px solid #f0d47c;
  border-radius: 5px;
  background: #fff3c4;
}

.stop-order-warning {
  color: #8a4b12;
  font-size: 12px;
}

.stop-order-actions {
  display: inline-flex;
  gap: 12px;
  margin-left: auto;
}

.stop-order-actions button {
  border: 0;
  background: transparent;
  color: #086bc1;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 720px) {
  .stop-order-change-bar { align-items: flex-start; flex-wrap: wrap; }
  .stop-order-actions { width: 100%; margin-left: 0; }
  .route-drag-handle { width: 30px; height: 30px; }
}

.load-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 7px 0 9px;
}

#drawerBody .load-quick-actions .grid-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: #1685ed !important;
  font-size: 14px;
  font-weight: 400 !important;
  line-height: 1.4;
  text-decoration: none;
}
#drawerBody .load-quick-actions .grid-link span { text-decoration: underline; }
#drawerBody .load-quick-actions .grid-link svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: #78bd32;
}
#drawerBody .load-quick-actions .grid-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.load-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 28px;
  padding: 10px 0 48px;
  border-bottom: 1px solid var(--line);
}

.load-summary-panel h3 {
  margin: 0 0 14px;
  font-size: 20px;
}

.load-summary-panel p {
  margin: 9px 0;
  color: var(--text);
}

.load-summary-panel p[data-load-inline-field] {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}

.load-summary-panel p[data-load-inline-field] > b {
  flex: 0 0 auto;
}

.load-summary-panel p[data-load-inline-field] > [data-load-inline-value] {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.load-summary-panel p[data-load-inline-field] > .icon-action {
  flex: 0 0 auto;
  margin-left: 2px;
}

.load-summary-panel p[data-load-inline-field] > [data-load-inline-value]:has(.load-inline-editor) {
  flex: 1 1 auto;
  overflow: visible;
  white-space: normal;
}

.load-summary-link {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--accent);
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
}

.load-summary-link:hover,
.load-summary-link:focus-visible {
  color: var(--accent-dark);
}

.load-summary-panel .distance-recalc-warning {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--warning) 55%, transparent);
  border-radius: 4px;
  color: var(--warning);
  background: color-mix(in srgb, var(--warning) 12%, transparent);
  font-weight: 700;
}

.load-summary-panel .icon-action {
  width: 18px;
  height: 18px;
  margin-left: 5px;
  border: 0;
  color: var(--accent);
  transform: translateY(-1px);
}

.load-summary-panel .icon-action svg {
  width: 14px;
  height: 14px;
}

.load-summary-panel h3 .icon-action {
  margin-left: 6px;
}

body .drawer [data-load-tab-panel="billing"] .billing-title-row h3 .icon-action.edit {
  display: inline-grid;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin-left: 5px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: var(--accent) !important;
  box-shadow: none !important;
  vertical-align: middle;
}

body .drawer [data-load-tab-panel="billing"] .billing-title-row h3 .icon-action.edit:hover,
body .drawer [data-load-tab-panel="billing"] .billing-title-row h3 .icon-action.edit:focus-visible {
  border: 0 !important;
  background: transparent !important;
  color: var(--accent-strong) !important;
}

body .drawer [data-load-tab-panel="billing"] .billing-title-row h3 .icon-action.edit svg {
  width: 15px;
  height: 15px;
}

.load-inline-editor {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  flex-wrap: wrap;
  vertical-align: middle;
}

.load-inline-input {
  min-width: 92px;
  max-width: min(190px, 100%);
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  padding: 0 8px;
  font: inherit;
}

.load-inline-editor select.load-inline-input {
  min-width: 130px;
}

.load-inline-combobox {
  position: relative;
  display: inline-block;
  min-width: 202px;
}

.load-inline-combobox-control {
  display: flex;
  width: 100%;
  height: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
}

.load-inline-combobox-control .load-inline-input {
  min-width: 0;
  max-width: none;
  height: 26px;
  flex: 1 1 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.load-inline-combobox-toggle {
  position: relative;
  width: 30px;
  flex: 0 0 30px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.load-inline-combobox-toggle::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--text);
}

.load-inline-combobox-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 3px);
  left: 0;
  display: none;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.load-inline-combobox.open .load-inline-combobox-menu {
  display: flex;
  flex-direction: column;
}

.load-inline-combobox-menu button {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
}

.load-inline-combobox-menu button[hidden] {
  display: none;
}

.load-inline-combobox-empty {
  display: block;
  min-height: 34px;
  padding: 8px 10px;
  color: var(--muted);
  font: inherit;
}

.load-inline-combobox-empty[hidden] {
  display: none;
}

.load-inline-combobox-menu button:hover,
.load-inline-combobox-menu button.selected {
  background: var(--panel-2);
}

.field > .load-inline-combobox {
  display: block;
  width: 100%;
  min-width: 0;
}

.field > .load-inline-combobox .load-inline-combobox-control {
  height: 38px;
}

.field > .load-inline-combobox .load-inline-input {
  width: 100%;
  height: 36px;
}

.field > .load-inline-combobox .load-inline-combobox-toggle::after {
  top: 15px;
}

.load-inline-affix {
  min-width: 108px;
  max-width: min(210px, 100%);
  height: 28px;
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
}

.load-inline-affix .load-inline-input {
  min-width: 0;
  max-width: none;
  height: 100%;
  flex: 1 1 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.load-inline-affix-mark {
  min-width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 700;
}

.load-inline-affix-prefix .load-inline-affix-mark {
  border-right: 1px solid var(--line);
}

.load-inline-affix-suffix .load-inline-affix-mark {
  border-left: 1px solid var(--line);
}

.equipment-inline-inputs .load-inline-input {
  width: 100%;
  min-width: 0;
}

.load-note-priority {
  text-align: center;
  vertical-align: top;
}

.load-note-important {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.load-note-range {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

.load-note-range-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
}

.load-tabs {
  clear: both;
}

.load-document-menu,
.billing-recalculate-menu {
  position: relative;
}

.load-document-menu summary,
.billing-recalculate-menu summary {
  list-style: none;
  cursor: pointer;
}

.load-document-menu summary::-webkit-details-marker,
.billing-recalculate-menu summary::-webkit-details-marker {
  display: none;
}

.load-document-menu summary::after,
.billing-recalculate-menu summary::after {
  content: "▾";
  margin-left: 7px;
}

.load-document-menu > div,
.billing-recalculate-menu > div {
  position: absolute;
  z-index: 90;
  top: calc(100% + 3px);
  right: 0;
  min-width: 150px;
  padding: 4px 0;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.load-document-menu > div button,
.billing-recalculate-menu > div button {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.load-document-menu > div button:hover,
.billing-recalculate-menu > div button:hover {
  background: var(--panel-2);
}

.billing-payable-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.billing-payable-heading h3 {
  margin: 0;
}

.load-billing-settlement-link {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.load-documents-overview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.load-documents-overview > div:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.load-documents-overview strong {
  color: var(--text);
  font-weight: 700;
}

.load-documents-overview span {
  color: var(--muted);
  font-size: 12px;
}

.load-document-preview-cell {
  width: 54px;
}

.load-document-preview-cell .load-doc-preview,
.load-documents-overview .load-doc-preview {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.load-document-file {
  min-width: 150px;
}

.load-document-file strong,
.load-document-file small {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.load-document-file strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.load-document-file small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.load-doc-drop-zone {
  position: relative;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}

.load-doc-drop-zone.dragging {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
}

.load-doc-drop-zone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.load-doc-drop-zone b {
  color: var(--accent);
}

.load-open-detention {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0 9px;
  border-bottom: 1px solid var(--line);
}

.load-open-detention .important-note-marker {
  transform: scale(.75);
  transform-origin: center;
}

.account-parent-field .load-inline-combobox {
  display: block;
  width: 100%;
  min-width: 0;
}

.account-parent-field .load-inline-combobox-control {
  height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: stretch;
  overflow: hidden;
  border-radius: 6px;
}

.account-parent-field .load-inline-combobox-control .load-inline-input {
  width: 100%;
  height: 36px;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.account-parent-field .load-inline-combobox-control .load-inline-toggle {
  width: 34px;
  min-width: 34px;
  height: 36px;
  border-left: 1px solid var(--line);
  border-radius: 0;
}

.account-parent-field .load-inline-combobox-menu {
  z-index: 3000;
  width: 100%;
  min-width: 100%;
  max-height: 210px;
}

body.reports-mode .report-filter-band .load-inline-combobox-control {
  border-radius: 3px;
  border-color: #cfd6dc;
  background: #fff;
}

body.reports-mode .report-filter-band .load-inline-combobox-toggle {
  background: #fff;
  border-left-color: #cfd6dc;
}

:where(.modal, .drawer, .board, .pagebar, .settings-shell) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
:where(.modal, .drawer, .board, .pagebar, .settings-shell) select,
:where(.modal, .drawer, .board, .pagebar, .settings-shell) textarea,
.native-searchable-input,
.load-inline-input,
.load-inline-combobox-control,
.input-affix {
  min-height: 42px;
  border: 1px solid var(--input-border);
  border-left: 4px solid color-mix(in srgb, var(--accent) 48%, var(--input-border));
  border-radius: var(--input-radius);
  background: var(--input-bg);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 1px 2px rgba(21,39,70,.04);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

:where(.modal, .drawer, .board, .pagebar, .settings-shell) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
:where(.modal, .drawer, .board, .pagebar, .settings-shell) select,
:where(.modal, .drawer, .board, .pagebar, .settings-shell) textarea,
.native-searchable-input,
.load-inline-input {
  padding: 9px 12px;
}

:where(.modal, .drawer, .board, .pagebar, .settings-shell) input::placeholder,
:where(.modal, .drawer, .board, .pagebar, .settings-shell) textarea::placeholder,
.native-searchable-input::placeholder,
.load-inline-input::placeholder {
  color: var(--input-placeholder);
}

:where(.modal, .drawer, .board, .pagebar, .settings-shell) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
:where(.modal, .drawer, .board, .pagebar, .settings-shell) select:hover,
:where(.modal, .drawer, .board, .pagebar, .settings-shell) textarea:hover,
.native-searchable-input:hover,
.load-inline-input:hover,
.load-inline-combobox-control:hover,
.input-affix:hover {
  border-color: var(--input-border-strong);
  background: var(--input-bg-hover);
}

:where(.modal, .drawer, .board, .pagebar, .settings-shell) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
:where(.modal, .drawer, .board, .pagebar, .settings-shell) select:focus,
:where(.modal, .drawer, .board, .pagebar, .settings-shell) textarea:focus,
.native-searchable-input:focus,
.load-inline-input:focus,
.load-inline-combobox:focus-within .load-inline-combobox-control,
.input-affix:focus-within {
  outline: 0;
  border-color: color-mix(in srgb, var(--input-focus) 62%, var(--input-border));
  border-left-color: var(--input-focus);
  background: var(--input-bg-hover);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--input-focus) 16%, transparent), 0 10px 22px rgba(21,39,70,.08);
}

.native-searchable-menu,
.load-inline-combobox-menu,
.load-create-menu {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 20px 46px rgba(11, 19, 36, .18);
  overflow: hidden;
}

.native-searchable-menu button,
.load-inline-combobox-menu button {
  min-height: 36px;
  border-radius: 0;
  padding: 8px 12px;
}

.native-searchable-menu button:hover,
.native-searchable-menu button.selected,
.load-inline-combobox-menu button:hover,
.load-inline-combobox-menu button.selected {
  background: var(--accent-soft);
  color: var(--accent);
}

.field small,
.miles-field small,
.load-pdf-drop small {
  color: var(--muted);
  font-weight: 600;
}

.loads-filter-row th {
  background: #f8fafd;
}

.loads-filter-row input,
.loads-filter-row select {
  min-height: 38px;
  font-size: 13px;
}

.primary,
.secondary,
.danger,
.ghost,
.kpi,
.table-wrap,
.modal form,
.drawer article,
.load-create-menu,
.native-searchable-menu,
.load-inline-combobox-menu,
.user-menu-panel {
  box-shadow: none !important;
}

.native-searchable-toggle,
.load-inline-combobox-toggle {
  min-height: 30px;
  width: 30px;
  border-left: 1px solid var(--input-border);
  background: #fff;
}

.native-searchable-menu,
.load-inline-combobox-menu {
  z-index: 5000 !important;
  border-radius: 8px !important;
  max-height: 280px;
  overflow-y: auto !important;
}

.native-searchable-menu button,
.load-inline-combobox-menu button {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 13px;
}

body.loads-mode .board {
  overflow: visible;
}

body.loads-mode .pagebar {
  min-height: 52px;
  padding: 8px 28px;
  z-index: 300;
}

body.loads-mode .pagebar h1 {
  font-size: 22px;
}

.loads-period-field {
  min-width: 108px;
}

.loads-period-field .native-searchable-select {
  width: 108px;
}

.loads-period-field .native-searchable-input {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 28px 4px 8px !important;
}

.loads-period-field .native-searchable-menu {
  width: 148px;
  top: calc(100% + 4px);
}

.loads-pagebar-meter {
  min-width: 300px;
}

.loads-filter-row input,
.loads-filter-row select {
  min-height: 30px !important;
  height: 30px !important;
}

.nav-item.active,
body.loads-mode .nav-item.active {
  background: rgba(66, 184, 131, .16);
  color: #ffffff;
  box-shadow: inset 3px 0 0 var(--vue-green);
}

.pagebar,
body.loads-mode .pagebar {
  min-height: 54px;
  padding: 8px 28px;
  border-bottom: 1px solid var(--vue-line);
  background: #ffffff;
  backdrop-filter: none;
}

.pagebar h1,
body.loads-mode .pagebar h1 {
  color: var(--vue-ink);
  font-size: 22px;
  font-weight: 700;
}

.primary,
body.loads-mode .primary {
  border-color: var(--vue-green);
  background: var(--vue-green);
  color: #ffffff;
}

.primary:hover,
.primary:focus-visible,
body.loads-mode .primary:hover,
body.loads-mode .primary:focus-visible {
  background: var(--vue-green-dark);
  border-color: var(--vue-green-dark);
}

.native-searchable-menu,
.load-inline-combobox-menu,
.load-create-menu {
  z-index: 7000 !important;
  border: 1px solid var(--vue-line);
  border-radius: 8px !important;
  background: #ffffff;
  box-shadow: none !important;
}

.native-searchable-menu button:hover,
.native-searchable-menu button.selected,
.load-inline-combobox-menu button:hover,
.load-inline-combobox-menu button.selected {
  background: #ecfdf5;
  color: var(--vue-green-dark);
}

.loads-pagebar-meter {
  min-width: 280px;
}

body.reports-mode .report-filter-band select,
body.reports-mode .report-filter-band input,
body.reports-mode .report-filter-band .native-searchable-input,
body.reports-mode .report-filter-band .load-inline-combobox-control {
  border-radius: 6px;
  border-color: var(--vue-line-strong);
}

.brand-mark,
.chip.new,
.chip.available,
.chip.draft,
.chip.low,
.chip.delivered,
.chip.paid,
.chip.approved,
.chip.active,
.chip.hired,
.chip.complete,
.chip.resolved,
.load-status.new,
.load-status.delivered,
.load-status.paid {
  color: var(--accent) !important;
  background: var(--accent-soft) !important;
}

:where(.modal, .drawer, .board, .settings-shell, .load-review-shell) input[type="checkbox"],
:where(.modal, .drawer, .board, .settings-shell, .load-review-shell) input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-content: center;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #8fa0b4 !important;
  background: #ffffff !important;
  box-shadow: none !important;
  cursor: pointer;
}

:where(.modal, .drawer, .board, .settings-shell, .load-review-shell) input[type="checkbox"] {
  border-radius: 3px !important;
}

:where(.modal, .drawer, .board, .settings-shell, .load-review-shell) input[type="radio"] {
  border-radius: 50% !important;
}

:where(.modal, .drawer, .board, .settings-shell, .load-review-shell) input[type="checkbox"]::before {
  content: "";
  width: 8px;
  height: 8px;
  transform: scale(0);
  transition: transform .08s ease;
  background: #ffffff;
  clip-path: polygon(14% 48%, 0 62%, 38% 100%, 100% 18%, 84% 4%, 36% 66%);
}

:where(.modal, .drawer, .board, .settings-shell, .load-review-shell) input[type="radio"]::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform .08s ease;
  background: var(--accent);
}

:where(.modal, .drawer, .board, .settings-shell, .load-review-shell) input[type="checkbox"]:checked {
  border-color: var(--accent) !important;
  background: var(--accent) !important;
}

:where(.modal, .drawer, .board, .settings-shell, .load-review-shell) input[type="checkbox"]:checked::before,
:where(.modal, .drawer, .board, .settings-shell, .load-review-shell) input[type="radio"]:checked::before {
  transform: scale(1);
}

:where(.modal, .drawer, .board, .settings-shell, .load-review-shell) input[type="radio"]:checked {
  border-color: var(--accent) !important;
}

/* Clean separated combobox menus */
.native-searchable-menu,
.load-inline-combobox-menu {
  padding: 0 !important;
  overflow: auto !important;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line-strong)) !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .12) !important;
  scrollbar-width: thin;
  scrollbar-color: #9aa7b5 #eef2f6;
}

.native-searchable-menu::-webkit-scrollbar,
.load-inline-combobox-menu::-webkit-scrollbar {
  width: 10px;
}

.native-searchable-menu::-webkit-scrollbar-track,
.load-inline-combobox-menu::-webkit-scrollbar-track {
  background: #eef2f6;
}

.native-searchable-menu::-webkit-scrollbar-thumb,
.load-inline-combobox-menu::-webkit-scrollbar-thumb {
  background: #9aa7b5;
  border: 2px solid #eef2f6;
  border-radius: 999px;
}

.native-searchable-menu button,
.load-inline-combobox-menu button {
  min-height: 25px !important;
  width: 100% !important;
  padding: 4px 10px !important;
  border: 0 !important;
  border-bottom: 1px solid #edf1f5 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  color: #263241 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
  text-align: left !important;
}

.native-searchable-menu button:last-of-type,
.load-inline-combobox-menu button:last-of-type {
  border-bottom: 0 !important;
}

.native-searchable-menu button:hover,
.native-searchable-menu button:focus,
.load-inline-combobox-menu button:hover,
.load-inline-combobox-menu button:focus {
  background: color-mix(in srgb, var(--accent) 9%, #ffffff) !important;
  color: #111827 !important;
  outline: none !important;
}

.native-searchable-menu button.selected,
.load-inline-combobox-menu button.selected {
  background: var(--accent) !important;
  color: #ffffff !important;
}

.native-searchable-menu button.selected:hover,
.native-searchable-menu button.selected:focus,
.load-inline-combobox-menu button.selected:hover,
.load-inline-combobox-menu button.selected:focus {
  background: color-mix(in srgb, var(--accent) 88%, #000) !important;
  color: #ffffff !important;
}

.native-searchable-toggle,
.load-inline-combobox-toggle {
  z-index: 3 !important;
  display: grid !important;
  place-items: center !important;
  width: 30px !important;
  min-width: 30px !important;
  height: auto !important;
  min-height: 0 !important;
  border: 0 !important;
  border-left: 0 !important;
  border-radius: 0 4px 4px 0 !important;
  background: transparent !important;
  color: #5d6b7c !important;
  cursor: pointer !important;
}

.load-inline-combobox-toggle {
  position: relative !important;
  flex: 0 0 30px !important;
}

.native-searchable-toggle:hover,
.load-inline-combobox-toggle:hover,
.native-searchable-select.open .native-searchable-toggle,
.load-inline-combobox.open .load-inline-combobox-toggle {
  color: var(--accent) !important;
  background: color-mix(in srgb, var(--accent) 8%, transparent) !important;
}

.native-searchable-toggle::before,
.load-inline-combobox-toggle::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.native-searchable-toggle::after,
.load-inline-combobox-toggle::after {
  content: none !important;
}

.native-searchable-select.open .native-searchable-toggle::before,
.load-inline-combobox.open .load-inline-combobox-toggle::before {
  transform: translateY(2px) rotate(225deg);
}

.native-searchable-toggle:focus-visible,
.load-inline-combobox-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 22%, transparent) !important;
  outline-offset: -2px;
}

.load-inline-combobox-control {
  position: relative;
}

/* Loads grid: native filter controls like the production reference */
body.loads-mode .loads-table-wrap {
  position: relative !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  border-radius: 4px !important;
  border-color: #dfe5eb !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body.loads-mode .loads-table {
  font-size: 14px !important;
  table-layout: fixed !important;
}

body.loads-mode .loads-table th {
  height: 31px !important;
  padding: 4px 8px !important;
  background: #ffffff !important;
  color: #111827 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
}

body.loads-mode .loads-filter-row th {
  top: 31px !important;
  z-index: 30 !important;
  height: 39px !important;
  padding: 4px 7px 6px !important;
  background: #ffffff !important;
  overflow: visible !important;
}

body.loads-mode .loads-filter-row input:not([type="checkbox"]),
body.loads-mode .loads-filter-row select {
  width: 100% !important;
  height: 27px !important;
  min-height: 27px !important;
  padding: 0 8px !important;
  border: 1px solid #cfd5dc !important;
  border-radius: 3px !important;
  background: #ffffff !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 27px !important;
  outline: 0 !important;
  box-shadow: none !important;
}

body.loads-mode .loads-filter-row select {
  padding-right: 22px !important;
  appearance: auto !important;
  -webkit-appearance: menulist !important;
}

body.loads-mode .loads-filter-row input[type="date"] {
  padding-right: 4px !important;
  color-scheme: light !important;
}

body.loads-mode .loads-filter-row input:not([type="checkbox"]):focus,
body.loads-mode .loads-filter-row select:focus {
  border-color: #8fd4e3 !important;
  outline: 1px solid #8fd4e3 !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
}

body.loads-mode .loads-filter-row .load-select-box {
  width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
}

/* Loads grid searchable filters: typeable, compact, single-border */
body.loads-mode .loads-filter-row .native-searchable-select {
  position: relative !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 27px !important;
  display: block !important;
  overflow: visible !important;
  z-index: 40 !important;
}

body.loads-mode .loads-filter-row .native-searchable-select.open {
  z-index: 7000 !important;
}

body.loads-mode .loads-filter-row .native-searchable-input {
  width: 100% !important;
  height: 27px !important;
  min-height: 27px !important;
  padding: 0 24px 0 8px !important;
  border: 1px solid #cfd5dc !important;
  border-left: 1px solid #cfd5dc !important;
  border-radius: 3px !important;
  outline: 0 !important;
  background: #ffffff !important;
  color: #111827 !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 27px !important;
}

body.loads-mode .loads-filter-row .native-searchable-input:hover,
body.loads-mode .loads-filter-row .native-searchable-input:focus {
  border-color: #8fd4e3 !important;
  outline: 1px solid #8fd4e3 !important;
  outline-offset: 0 !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body.loads-mode .loads-filter-row .native-searchable-toggle {
  top: 1px !important;
  right: 1px !important;
  bottom: 1px !important;
  width: 23px !important;
  min-width: 23px !important;
  min-height: 0 !important;
  border: 0 !important;
  border-left: 0 !important;
  border-radius: 0 2px 2px 0 !important;
  background: #ffffff !important;
  color: #7b8794 !important;
  box-shadow: none !important;
}

body.loads-mode .loads-filter-row .native-searchable-toggle::after {
  width: 7px !important;
  height: 7px !important;
  border-right-width: 1.5px !important;
  border-bottom-width: 1.5px !important;
}

body.loads-mode .loads-filter-row .native-searchable-menu {
  z-index: 7001 !important;
  top: calc(100% + 3px) !important;
  left: 0 !important;
  right: auto !important;
  width: max(100%, 150px) !important;
  max-height: 235px !important;
  overflow-y: auto !important;
  border: 1px solid #cfd5dc !important;
  border-radius: 3px !important;
  background: #ffffff !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .12) !important;
}

body.loads-mode .loads-filter-row .native-searchable-menu button {
  min-height: 26px !important;
  padding: 5px 9px !important;
  border: 0 !important;
  border-bottom: 1px solid #eef1f4 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  color: #1f2937 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
}

body.loads-mode .loads-filter-row .native-searchable-menu button:last-child {
  border-bottom: 0 !important;
}

body.loads-mode .loads-filter-row .native-searchable-menu button:hover,
body.loads-mode .loads-filter-row .native-searchable-menu button.selected {
  background: #e9f7f2 !important;
  color: #047857 !important;
}

body.loads-mode .loads-filter-row .native-searchable-empty {
  padding: 7px 9px !important;
  font-size: 12px !important;
}

/* Loads final compact fit */
body.loads-mode .board {
  padding-left: 14px !important;
  padding-right: 14px !important;
}

body.loads-mode .pagebar {
  padding-left: 14px !important;
  padding-right: 14px !important;
}

body.loads-mode .loads-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
}

body.loads-mode .loads-table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

body.loads-mode .loads-table th,
body.loads-mode .loads-table td {
  height: 33px !important;
  padding-left: 6px !important;
  padding-right: 6px !important;
}

body.loads-mode .loads-table th:nth-child(1),
body.loads-mode .loads-table td:nth-child(1) { width: 30px !important; }

body.loads-mode .loads-table th:nth-child(2),
body.loads-mode .loads-table td:nth-child(2) { width: 76px !important; }

body.loads-mode .loads-table th:nth-child(3),
body.loads-mode .loads-table td:nth-child(3) { width: 102px !important; }

body.loads-mode .loads-table th:nth-child(4),
body.loads-mode .loads-table td:nth-child(4) { width: 100px !important; }

body.loads-mode .loads-table th:nth-child(5),
body.loads-mode .loads-table td:nth-child(5) { width: 102px !important; }

body.loads-mode .loads-table th:nth-child(6),
body.loads-mode .loads-table td:nth-child(6) { width: 78px !important; }

body.loads-mode .loads-table th:nth-child(7),
body.loads-mode .loads-table td:nth-child(7),
body.loads-mode .loads-table th:nth-child(8),
body.loads-mode .loads-table td:nth-child(8) { width: 104px !important; }

body.loads-mode .loads-table th:nth-child(9),
body.loads-mode .loads-table td:nth-child(9) { width: 74px !important; }

body.loads-mode .loads-table th:nth-child(10),
body.loads-mode .loads-table td:nth-child(10) { width: 104px !important; }

body.loads-mode .loads-table th:nth-child(11),
body.loads-mode .loads-table td:nth-child(11) { width: 76px !important; }

body.loads-mode .loads-table th:nth-child(12),
body.loads-mode .loads-table td:nth-child(12) { width: 84px !important; }

body.loads-mode .loads-table th:nth-child(13),
body.loads-mode .loads-table td:nth-child(13) { width: 132px !important; }

body.loads-mode .loads-table th:nth-child(14),
body.loads-mode .loads-table td:nth-child(14) { width: 164px !important; }

body.loads-mode .loads-table th:nth-child(15),
body.loads-mode .loads-table td:nth-child(15) { width: 76px !important; }

body.loads-mode .loads-filter-row {
  position: relative !important;
  z-index: 8000 !important;
}

body.loads-mode .loads-filter-row th {
  z-index: 8000 !important;
  overflow: visible !important;
}

body.loads-mode .loads-filter-row th:has(.native-searchable-select.open) {
  z-index: 9000 !important;
}

body.loads-mode .loads-filter-row .native-searchable-select.open,
body.loads-mode .loads-filter-row .native-searchable-select.open .native-searchable-menu {
  z-index: 9001 !important;
}

body.loads-mode .loads-filter-row .native-searchable-menu {
  max-height: 210px !important;
}

body.loads-mode .loads-table tbody td {
  position: relative;
  z-index: 1;
}

/* Loads grid final scroll guard */
body.loads-mode .loads-table-panel,
body.loads-mode .loads-table-wrap {
  overflow-y: hidden !important;
}

body.loads-mode .loads-table-wrap {
  max-height: none !important;
}

body.loads-mode .loads-filter-row .native-searchable-menu {
  position: fixed !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 30000 !important;
}

/* Loads grid: fit to panel edges without horizontal scrollbar */
body.loads-mode .loads-grid-shell,
body.loads-mode .loads-table-panel,
body.loads-mode .loads-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

body.loads-mode .loads-table-wrap {
  overflow-x: hidden !important;
  overflow-y: hidden !important;
}

body.loads-mode .loads-table {
  table-layout: fixed !important;
  width: 100% !important;
  min-width: 0 !important;
}

body.loads-mode .loads-table th,
body.loads-mode .loads-table td {
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body.loads-mode .loads-table th:nth-child(13),
body.loads-mode .loads-table td:nth-child(13) { width: 128px !important; }

body.loads-mode .loads-table th:nth-child(14),
body.loads-mode .loads-table td:nth-child(14) { width: 150px !important; }

body.loads-mode .loads-table th:nth-child(15),
body.loads-mode .loads-table td:nth-child(15) { width: 72px !important; }

body.loads-mode .loads-table td.load-actions,
body.loads-mode .load-actions,
body.loads-mode .load-action-cluster {
  min-width: 0 !important;
  max-width: 100% !important;
  gap: 4px !important;
  overflow: hidden !important;
}

body.loads-mode .load-lumper-link {
  max-width: 48px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Loads grid: keep the Docs and action columns readable while staying inside the panel */
body.loads-mode .loads-table th:nth-child(14),
body.loads-mode .loads-table td:nth-child(14) { width: 150px !important; }

body.loads-mode .loads-table th:nth-child(15),
body.loads-mode .loads-table td:nth-child(15) { width: 90px !important; }

/* Loads: keep the New Load menu out of the grid area while it is open */
body.loads-mode .pagebar {
  position: relative !important;
  z-index: 12000 !important;
}

/* Keep the Loads heading and period visible while the totals/search area flexes. */
body.loads-mode .pagebar {
  grid-template-columns: minmax(205px, max-content) minmax(280px, 1fr) max-content !important;
  overflow: visible !important;
  column-gap: 14px !important;
}

body.loads-mode .pagebar > div:first-child {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 205px !important;
  visibility: visible !important;
}

body.loads-mode .pagebar h1,
body.loads-mode .loads-period-field {
  display: inline-flex !important;
  flex: 0 0 auto !important;
}

body.loads-mode .loads-pagebar-meter {
  width: 100% !important;
  min-width: 280px !important;
}

body.loads-mode .money-labels {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center;
  width: 100%;
  text-align: left;
}

body.loads-mode .money-labels span:first-child { text-align: left; }
body.loads-mode .money-labels span:last-child { text-align: right; }

body.loads-mode .loads-filtered-by {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 18px 4px;
  border-bottom: 1px solid #e4e9ef;
  background: #fff;
}

body.loads-mode .loads-filtered-by span {
  border-radius: 3px;
  background: #e7f2ff;
  color: #0874d1;
  font-weight: 500;
}

@media (max-width: 1100px) {
  body.loads-mode .pagebar {
    grid-template-columns: minmax(190px, max-content) minmax(220px, 1fr) max-content !important;
  }
  body.loads-mode .loads-pagebar-meter { min-width: 220px !important; }
}

body.loads-mode .load-create-menu {
  z-index: 12001 !important;
}

body.loads-mode .loads-table td.load-actions,
body.loads-mode .load-actions,
body.loads-mode .load-action-cluster {
  overflow: visible !important;
  white-space: nowrap !important;
}

body.loads-mode .load-lumper-link {
  display: inline-block !important;
  max-width: 72px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  vertical-align: middle !important;
}

/* Loads grid: use the available panel width more tightly */
body.loads-mode .board,
body.loads-mode .pagebar {
  padding-left: 6px !important;
  padding-right: 6px !important;
}

/* Keep the Loads header actions aligned with the right edge of the table. */
body.loads-mode .pagebar {
  padding-right: 26px !important;
}

body.loads-mode .pagebar .search input {
  width: 220px !important;
}

body.loads-mode .pagebar .top-actions,
body.loads-mode .pagebar .search,
body.loads-mode .pagebar #primaryAction {
  align-self: center;
}

body.loads-mode .pagebar #primaryAction {
  height: var(--field-h);
  min-height: var(--field-h);
}

body.loads-mode .loads-grid-shell,
body.loads-mode .loads-table-panel,
body.loads-mode .loads-table-wrap {
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
}

/* Loads grid: attachment labels are compact, so the table can keep its normal panel shape */
body.loads-mode .loads-grid-shell,
body.loads-mode .loads-table-panel,
body.loads-mode .loads-table-wrap {
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Loads: New Load dropdown should overlay like a menu, not move the grid */
body.loads-mode .workspace:has(.load-create-menu.open) .board {
  margin-top: 0 !important;
}

body.loads-mode .top-actions {
  position: relative !important;
  z-index: 14000 !important;
}

body.loads-mode .load-create-menu {
  top: calc(100% + 8px) !important;
  right: 0 !important;
  width: 288px !important;
  z-index: 14001 !important;
  border-radius: 3px !important;
  padding: 0 !important;
  overflow: visible !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .18) !important;
}

body.loads-mode .load-create-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: var(--panel);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}

body.loads-mode .load-create-menu button {
  min-height: 58px !important;
  grid-template-columns: 32px 1fr !important;
  gap: 10px !important;
  padding: 10px 12px !important;
}

body.loads-mode .load-create-icon {
  width: 32px !important;
  height: 32px !important;
  border-radius: 3px !important;
  font-size: 18px !important;
}

.modal .load-inline-combobox .load-inline-combobox-control {
  height: var(--field-h) !important;
  min-height: var(--field-h) !important;
  padding: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 6px !important;
  background: var(--panel) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.modal .load-inline-combobox .load-inline-input {
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 34px 0 10px !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-weight: 600 !important;
}

.modal .load-inline-combobox .load-inline-combobox-toggle {
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 31px !important;
  min-width: 31px !important;
  border: 0 !important;
  border-left: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: var(--panel) !important;
  box-shadow: none !important;
}

.modal .load-inline-combobox:focus-within .load-inline-combobox-control {
  border-color: var(--brand) !important;
  outline: 1px solid var(--brand) !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
}

body.reports-mode .report-filter-band select,
body.reports-mode .report-filter-band input:not([type="checkbox"]):not([type="radio"]),
body.reports-mode .report-filter-band .load-inline-combobox-control,
body.reports-mode .report-filter-band .native-searchable-input {
  min-height: 34px !important;
  height: 34px !important;
  border-left-width: 1px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

body.reports-mode .report-filter-band .load-inline-combobox-toggle {
  width: 30px !important;
  min-width: 30px !important;
}

/* Loads filter dropdowns: keep the original-style simple select menu. */
body.loads-mode .loads-filter-row .native-searchable-select {
  height: 25px !important;
}

body.loads-mode .loads-filter-row .native-searchable-input {
  height: 25px !important;
  min-height: 25px !important;
  padding: 0 24px 0 7px !important;
  border: 1px solid #c9cfd6 !important;
  border-radius: 2px !important;
  background: #ffffff !important;
  color: #111827 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 23px !important;
  box-shadow: none !important;
}

body.loads-mode .loads-filter-row .native-searchable-input::placeholder {
  color: #9aa7b5 !important;
  opacity: 1 !important;
}

body.loads-mode .loads-filter-row .native-searchable-input:hover,
body.loads-mode .loads-filter-row .native-searchable-input:focus {
  border-color: #5bc0de !important;
  outline: 1px solid #5bc0de !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
}

body.loads-mode .loads-filter-row .native-searchable-toggle {
  top: 1px !important;
  right: 1px !important;
  bottom: 1px !important;
  width: 21px !important;
  min-width: 21px !important;
  border: 0 !important;
  border-radius: 0 2px 2px 0 !important;
  background: #ffffff !important;
  color: #6f7d8c !important;
}

body.loads-mode .loads-filter-row .native-searchable-toggle:hover,
body.loads-mode .loads-filter-row .native-searchable-select.open .native-searchable-toggle {
  background: #ffffff !important;
  color: #111827 !important;
}

body.loads-mode .loads-filter-row .native-searchable-toggle::before {
  width: 7px !important;
  height: 7px !important;
  border-right-width: 2px !important;
  border-bottom-width: 2px !important;
}

body.loads-mode .loads-filter-row .native-searchable-menu {
  position: fixed !important;
  min-width: 92px !important;
  max-height: 184px !important;
  padding: 0 !important;
  overflow-y: auto !important;
  border: 1px solid #c9cfd6 !important;
  border-radius: 2px !important;
  background: #ffffff !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .22) !important;
}

body.loads-mode .loads-filter-row .native-searchable-menu button {
  min-height: 24px !important;
  padding: 4px 9px !important;
  border: 0 !important;
  border-bottom: 1px solid #e7eaee !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  color: #374151 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 16px !important;
  text-align: left !important;
}

body.loads-mode .loads-filter-row .native-searchable-menu button:last-of-type {
  border-bottom: 0 !important;
}

body.loads-mode .loads-filter-row .native-searchable-menu button:hover,
body.loads-mode .loads-filter-row .native-searchable-menu button:focus {
  background: #f1f5f9 !important;
  color: #111827 !important;
  outline: 0 !important;
}

body.loads-mode .loads-filter-row .native-searchable-menu button.selected {
  background: #1e88e5 !important;
  color: #ffffff !important;
}

body.loads-mode .loads-filter-row .native-searchable-empty {
  min-height: 24px !important;
  padding: 5px 9px !important;
  color: #667085 !important;
  font-size: 12px !important;
  line-height: 16px !important;
}


/* Responsive rules moved from styles.css. */
@media (max-width: 1380px) {
  .quick-load-create,
  .load-expanded-grid {
    grid-template-columns: repeat(3, minmax(210px, 1fr));
  }

}


/* Responsive rules moved from styles.css. */
@media (max-width: 920px) {
  .quick-load-create,
  .load-expanded-grid {
    grid-template-columns: 1fr;
  }

  .quick-load-create {
    padding: 16px 18px;
  }

}


/* Responsive rules moved from styles.css. */
@media (max-width: 1280px) {

  .quick-load-create {
    grid-template-columns:
      minmax(145px, .6fr)
      minmax(180px, .85fr)
      minmax(180px, .85fr)
      minmax(210px, 1fr)
      minmax(190px, .9fr)
      minmax(180px, .72fr);
    padding-inline: 20px;
  }

}

/* Final containment rules: imported text must never resize the Loads workspace. */
body.loads-mode .workspace,
body.loads-mode .board,
body.loads-mode .draft-loads-panel,
body.loads-mode .draft-loads-wrap,
body.loads-mode .loads-grid-shell,
body.loads-mode .loads-table-panel,
body.loads-mode .loads-table-wrap {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

body.loads-mode .draft-loads-panel {
  overflow: hidden !important;
}

body .drawer .load-notes-table .row-actions {
  position: relative !important;
  width: 62px;
  padding-right: 0;
  vertical-align: middle !important;
}

body .drawer .load-notes-table .load-note-action-buttons {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

body .drawer .load-notes-table .icon-action {
  width: 20px;
  min-width: 20px !important;
  height: 20px;
  min-height: 20px !important;
  margin-left: 5px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  vertical-align: middle !important;
}

body .drawer .load-notes-table .icon-action svg { width: 16px; height: 16px; }
body .drawer .load-notes-table .icon-action.edit { color: var(--accent); }
body .drawer .load-notes-table .icon-action.delete svg { display: none; }
body .drawer .load-notes-table .icon-action.delete::before {
  content: "\00d7";
  color: #e00000;
  font-size: 27px;
  font-weight: 700;
  line-height: 20px;
  transform: translateY(-1px);
}

/* Load services use the same clean, frameless edit treatment as summary fields. */
body .drawer [data-load-tab-panel="services"] td.row-actions {
  vertical-align: middle !important;
}

body .drawer [data-load-tab-panel="services"] td.row-actions .icon-action {
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body .drawer [data-load-tab-panel="services"] td.row-actions .icon-action:hover,
body .drawer [data-load-tab-panel="services"] td.row-actions .icon-action:focus-visible {
  border: 0 !important;
  background: transparent !important;
}

/* Reverted: keep the application's existing tabs, buttons, footer and responsive layout.
body .drawer .load-tabs {
  border: 1px solid #bfc6cd;
}

body .drawer .tabs-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

body .drawer .tabs-row button {
  justify-content: center;
  min-height: 36px;
  border-top: 0;
  border-color: #cdd3d9;
  background: #fff;
  color: #34495e;
  font-weight: 500;
}

body .drawer .tabs-row button.active {
  border-top: 0;
  background: #fff;
  color: #172231;
  font-weight: 600;
}

body .drawer .driver-tab-body { padding: 10px 8px 14px; }

body .drawer .tab-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

body .drawer .tab-actions .primary {
  min-height: 34px;
  border-radius: 3px;
  background: #49b975;
  border-color: #49b975;
  font-weight: 500;
}

body .drawer > article > footer {
  min-height: 54px !important;
  padding: 8px !important;
  background: #eef2f4 !important;
}

body .drawer > article > footer .secondary {
  min-width: 76px;
  min-height: 34px;
  border: 0;
  border-radius: 2px;
  background: #172231 !important;
  color: #fff;
}

@media (max-width: 900px) {
  body .drawer #drawerBody { padding-inline: 16px !important; }
  body .drawer .load-summary-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}
*/

body.loads-mode .draft-loads-wrap {
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

body.loads-mode .draft-loads-table {
  width: 100% !important;
  min-width: 1180px !important;
  table-layout: fixed !important;
}

body.loads-mode .draft-loads-table th,
body.loads-mode .draft-loads-table td {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.loads-mode .draft-loads-table th:nth-child(1),
body.loads-mode .draft-loads-table td:nth-child(1) { width: 92px !important; }
body.loads-mode .draft-loads-table th:nth-child(2),
body.loads-mode .draft-loads-table td:nth-child(2) { width: 82px !important; }
body.loads-mode .draft-loads-table th:nth-child(3),
body.loads-mode .draft-loads-table td:nth-child(3) { width: 160px !important; }
body.loads-mode .draft-loads-table th:nth-child(4),
body.loads-mode .draft-loads-table td:nth-child(4) { width: 170px !important; }
body.loads-mode .draft-loads-table th:nth-child(5),
body.loads-mode .draft-loads-table td:nth-child(5) { width: 130px !important; }
body.loads-mode .draft-loads-table th:nth-child(6),
body.loads-mode .draft-loads-table td:nth-child(6),
body.loads-mode .draft-loads-table th:nth-child(7),
body.loads-mode .draft-loads-table td:nth-child(7) { width: 145px !important; }
body.loads-mode .draft-loads-table th:nth-child(8),
body.loads-mode .draft-loads-table td:nth-child(8) { width: 90px !important; }
body.loads-mode .draft-loads-table th:nth-child(9),
body.loads-mode .draft-loads-table td:nth-child(9) { width: 86px !important; }
body.loads-mode .draft-loads-table th:nth-child(10),
body.loads-mode .draft-loads-table td:nth-child(10) { width: 210px !important; }
body.loads-mode .draft-loads-table th:nth-child(11),
body.loads-mode .draft-loads-table td:nth-child(11) { width: 118px !important; }
body.loads-mode .draft-loads-table th:nth-child(12),
body.loads-mode .draft-loads-table td:nth-child(12) { width: 112px !important; }

body.loads-mode .draft-po-cell > span,
body.loads-mode .draft-loads-table .load-note-preview {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.loads-mode .loads-table th:nth-child(13),
body.loads-mode .loads-table td:nth-child(13) { width: 230px !important; }

body.loads-mode .loads-table th:nth-child(14),
body.loads-mode .loads-table td:nth-child(14) { width: 118px !important; }

body.loads-mode .loads-table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important;
}

body.loads-mode .loads-filter-row :is(input, select, .native-searchable-select, .native-searchable-input) {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

body.loads-mode .loads-table tbody tr.load-row-delivered,
body.loads-mode .loads-table tbody tr.load-row-delivered > td {
  background: #fff1d6 !important;
}

body.loads-mode .loads-table tbody tr.load-row-bol-received,
body.loads-mode .loads-table tbody tr.load-row-bol-received > td {
  background: inherit !important;
}

body.loads-mode .loads-table tbody tr.load-row-delivered.load-row-selected,
body.loads-mode .loads-table tbody tr.load-row-delivered.load-row-selected > td {
  background: #ffe9bf !important;
}

body.loads-mode .loads-table tbody tr.load-row-bol-received.load-row-selected,
body.loads-mode .loads-table tbody tr.load-row-bol-received.load-row-selected > td {
  background: var(--accent-soft) !important;
}

body.loads-mode .loads-table tbody tr.load-row-delivered.load-row-selected,
body.loads-mode .loads-table tbody tr.load-row-bol-received.load-row-selected {
  box-shadow: inset 4px 0 0 var(--accent) !important;
}

body.loads-mode .loads-table-panel {
  overflow: hidden !important;
}

body.loads-mode .loads-table-wrap {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
}

body.loads-mode .loads-table-panel > .loads-pager {
  flex: 0 0 auto !important;
  min-height: 44px !important;
  margin-top: 8px !important;
  padding: 6px 4px 0 !important;
  align-items: center !important;
  background: var(--bg) !important;
  position: relative !important;
  z-index: 2 !important;
}

body.loads-mode .loads-table .load-status.delivered {
  min-height: 18px !important;
  padding: 2px 5px !important;
  border: 1px solid #16a34a !important;
  border-radius: 3px !important;
  background: #16a34a !important;
  color: #ffffff !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

body.loads-mode .loads-table td:nth-child(12) {
  color: var(--text) !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  line-height: 1.25 !important;
}

.spreadsheet-import-preview .import-map-field {
  display: grid;
  gap: 4px;
  min-width: 210px;
  margin: 3px 0;
  color: var(--text);
  font-size: 11px;
}

.spreadsheet-import-preview .import-map-field select {
  width: 100%;
  min-height: 32px;
  padding: 5px 28px 5px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--panel);
  color: var(--text);
}

.spreadsheet-import-preview .import-warning { color: #b45309; }
.spreadsheet-import-preview .import-ready { color: var(--green); font-weight: 600; }

.spreadsheet-import-preview .table-scroll {
  min-width: 100%;
  overflow: visible;
}

.spreadsheet-import-preview table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

.spreadsheet-import-preview thead th {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-strong, var(--border));
  background: var(--panel-2, #f4f7fa);
  color: var(--muted);
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
}

.spreadsheet-import-preview tbody td {
  background-clip: padding-box;
}

#modalForm:has([data-spreadsheet-load-upload]) {
  width: min(520px, calc(100vw - 32px));
}

#modalForm:has([data-spreadsheet-load-upload]) #modalBody {
  padding: 22px;
}

#modalForm:has([data-spreadsheet-load-upload]) footer {
  justify-content: flex-end;
  background: var(--panel);
}

#modalForm:has([data-spreadsheet-load-upload]) footer .secondary[hidden] {
  display: none !important;
}

.spreadsheet-load-import {
  display: grid;
  gap: 20px;
}

.spreadsheet-import-help {
  display: grid;
  gap: 14px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.spreadsheet-import-help p { margin: 0; }

.spreadsheet-import-help .link-button {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1677e8;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
}

.spreadsheet-import-help .link-button:hover { text-decoration: underline; }

.spreadsheet-file-drop {
  min-height: 164px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  padding: 24px;
  border: 1px solid var(--line-strong, var(--line));
  border-radius: 5px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease;
}

.spreadsheet-file-drop:hover,
.spreadsheet-file-drop.dragging {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 4%, var(--panel));
}

.spreadsheet-file-drop.has-file {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
}

.spreadsheet-file-drop > span strong { color: #1677e8; }
.spreadsheet-file-drop small { color: var(--muted); }
.spreadsheet-file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.spreadsheet-upload-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--panel-2);
  color: #4f6680;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--panel-2) 58%, transparent);
}

.spreadsheet-upload-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#modalForm:has([data-spreadsheet-load-upload]) footer .primary:disabled {
  border-color: #a7e2c3 !important;
  background: #a7e2c3 !important;
  color: #fff !important;
}

/* Keep the draft Actions popover compact and above the regular Loads grid. */
body.loads-mode .draft-loads-table td.load-actions:has(.draft-action-menu[open]) {
  position: relative !important;
  z-index: 180 !important;
  overflow: visible !important;
}

body.loads-mode .draft-loads-table .draft-action-menu > div {
  width: 124px !important;
  min-width: 124px !important;
  max-width: 124px !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 5px !important;
  overflow: visible !important;
}

body.loads-mode .draft-loads-table .draft-action-menu > div button,
body.loads-mode .draft-loads-table .draft-action-menu > div button.danger {
  display: flex !important;
  width: 100% !important;
  min-height: 34px !important;
  align-items: center !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body.loads-mode .draft-loads-table .draft-action-menu > div button {
  color: var(--text) !important;
}

body.loads-mode .draft-loads-table .draft-action-menu > div button.danger {
  color: var(--red) !important;
}

/* Classic load billing layout: flat tabs and compact accounting sections. */
body .drawer .load-tabs {
  border: 1px solid var(--line);
  background: var(--panel);
}

body .drawer .load-tabs > .tabs-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  border: 0;
  border-bottom: 1px solid var(--line);
}

body .drawer .load-tabs > .tabs-row button {
  justify-content: center;
  min-height: 37px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  color: #34495e;
  font-size: 13px;
  font-weight: 500;
}

body .drawer .load-tabs > .tabs-row button:last-child {
  border-right: 0;
}

body .drawer .load-tabs > .tabs-row button.active {
  margin-bottom: -1px;
  border: 1px solid #aeb7c0;
  border-bottom-color: var(--panel);
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
}

body .drawer [data-load-tab-panel="billing"] {
  padding: 10px 6px 8px;
}

body .drawer [data-load-tab-panel="billing"] .billing-section {
  margin: 0;
  padding: 4px 0 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body .drawer [data-load-tab-panel="billing"] .billing-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

body .drawer [data-load-tab-panel="billing"] .billing-title-row {
  min-height: 64px;
  align-items: flex-end;
  margin: 0;
  padding: 0 0 7px;
}

body .drawer [data-load-tab-panel="billing"] .billing-title-row.compact {
  min-height: 58px;
  align-items: center;
  margin: 0;
  padding-top: 10px;
}

body .drawer [data-load-tab-panel="billing"] .billing-section h3 {
  color: var(--text);
  font-size: 21px;
  line-height: 1.15;
}

body .drawer [data-load-tab-panel="billing"] .invoice-section .billing-title-row > div:first-child {
  display: grid;
  gap: 2px;
}

body .drawer [data-load-tab-panel="billing"] .billing-section p {
  margin: 1px 0;
  color: var(--text);
  font-size: 13px;
}

body .drawer [data-load-tab-panel="billing"] .billing-links {
  gap: 14px;
  margin-top: 5px;
}

body .drawer [data-load-tab-panel="billing"] .billing-links .grid-link {
  padding: 0;
  color: #0878dc;
  font-size: 13px;
  text-decoration: underline;
}

body .drawer [data-load-tab-panel="billing"] .billing-actions {
  gap: 8px;
}

body .drawer [data-load-tab-panel="billing"] :is(.billing-actions, .billing-title-row.compact) .primary {
  min-height: 33px;
  padding: 7px 14px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
}

body .drawer [data-load-tab-panel="billing"] .table-wrap {
  overflow: visible;
  border: 0;
  border-radius: 0;
}

body .drawer [data-load-tab-panel="billing"] table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

body .drawer [data-load-tab-panel="billing"] th,
body .drawer [data-load-tab-panel="billing"] td {
  height: 31px;
  padding: 5px 7px;
  border-right: 0;
  border-left: 0;
  font-size: 12px;
}

body .drawer [data-load-tab-panel="billing"] th {
  background: transparent;
  color: var(--text);
  font-weight: 500;
}

body .drawer [data-load-tab-panel="billing"] th:first-child,
body .drawer [data-load-tab-panel="billing"] td:first-child {
  width: 74px;
}

body .drawer [data-load-tab-panel="billing"] th:nth-last-child(2),
body .drawer [data-load-tab-panel="billing"] td:nth-last-child(2) {
  width: 120px;
}

body .drawer [data-load-tab-panel="billing"] th:last-child,
body .drawer [data-load-tab-panel="billing"] td:last-child {
  width: 58px;
}

body .drawer [data-load-tab-panel="billing"] .billing-total-row td {
  height: 32px;
  background: #ffedb0;
  color: #172331;
  font-weight: 500;
}

body .drawer [data-load-tab-panel="billing"] .load-billing-settlement-link {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 760px) {
  body .drawer [data-load-tab-panel="billing"] .billing-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  body .drawer [data-load-tab-panel="billing"] .billing-actions {
    justify-content: flex-end;
  }
}

/* Edit Load - wide desktop modal with 600px total height. */
body .drawer {
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
}

body .drawer > article {
  width: min(1400px, calc(100vw - 48px)) !important;
  max-width: 1400px !important;
  height: 1200px !important;
  max-height: calc(100dvh - 48px) !important;
  border-radius: 6px !important;
  overflow: hidden !important;
}

body .drawer #drawerBody {
  padding: 12px 28px 20px;
  overflow-y: auto !important;
}

body .drawer [data-load-tab-panel="billing"] th:last-child,
body .drawer [data-load-tab-panel="billing"] td:last-child {
  width: 82px;
  min-width: 82px;
}

body .drawer [data-load-tab-panel="billing"] td.row-actions {
  overflow: visible;
  white-space: nowrap;
  text-align: right;
}

body .drawer [data-load-tab-panel="billing"] td.row-actions .icon-action {
  display: inline-grid;
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  margin: 0 1px;
  vertical-align: middle;
}

body .drawer [data-load-tab-panel="billing"] tr.billing-total-row > td {
  background: #ffebb0 !important;
  color: #172331 !important;
  border-top: 1px solid #e7cf82 !important;
  border-bottom: 1px solid #e7cf82 !important;
  font-weight: 500 !important;
}

body .drawer [data-load-tab-panel="billing"] tr.billing-total-row > td:first-child {
  padding-left: 22px;
}

body:is([data-theme="dark"], [data-theme="dark-auto"]) .drawer [data-load-tab-panel="billing"] tr.billing-total-row > td {
  background: #544923 !important;
  color: #fff7d6 !important;
  border-color: #75652c !important;
}

/* Match the compact production Additional Payee override dialog. */
#modalForm.vt-modal--additional-payee-override {
  width: min(500px, calc(100vw - 32px)) !important;
  max-width: 500px !important;
  height: auto !important;
  max-height: calc(100dvh - 32px) !important;
  border-radius: 4px !important;
}

#modalForm.vt-modal--additional-payee-override > header {
  min-height: 72px !important;
  padding: 16px 20px !important;
}

#modalForm.vt-modal--additional-payee-override > header h2 {
  font-size: 22px !important;
}

#modalForm.vt-modal--additional-payee-override #modalBody {
  padding: 18px 20px 24px !important;
  overflow: visible !important;
}

#modalForm.vt-modal--additional-payee-override .additional-payee-override-form {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 15px !important;
}

#modalForm.vt-modal--additional-payee-override .additional-payee-override-form > * {
  grid-column: 1 / -1 !important;
}

#modalForm.vt-modal--additional-payee-override .radio-row {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 18px !important;
}

#modalForm.vt-modal--additional-payee-override .radio-row label {
  width: auto !important;
}

#modalForm.vt-modal--additional-payee-override > footer {
  min-height: 66px !important;
  padding: 10px 20px 14px !important;
  justify-content: flex-end !important;
}

#modalForm.vt-modal--additional-payee-override > footer button {
  min-width: 76px !important;
}

@media (max-width: 900px) {
  body .drawer {
    padding: 0 !important;
  }

  body .drawer > article {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
  }

  body .drawer #drawerBody {
    padding: 10px 12px 18px;
  }
}
