.inbound-unit-alert {
  --inbound-ink: #ecf4ff;
  --inbound-edge: #4d657c;
  color: var(--inbound-ink);
  background: #122437;
  border-radius: 7px;
  margin: 4px 10px;
  flex: 0 1 auto;
  min-height: 0;
  min-width: 0;
  max-height: min(26vh, 210px);
  overflow: auto;
}
.inbound-unit-alert[hidden] { display: none !important; }
.inbound-unit-alert > p { margin: 8px; }
.inbound-list { min-width: 0; }
.inbound-unit-alert article {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(115px, auto) minmax(155px, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  color: inherit;
  background: #142b40;
  border-inline-start: 3px solid #ef666f;
  border-bottom: 1px solid #2c4359;
  padding: 7px 10px;
  font-size: 12px;
}
.inbound-person { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.inbound-person > span { color: #b9cce1; font-size: 11px; }
.inbound-person-status { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.inbound-warning { color: #ffabb0; font-size: 11px; font-weight: 700; }
.inbound-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.inbound-unit-alert button, .inbound-results-dialog button,
.inbound-unit-dialog button {
  background: #244564;
  color: #f0f6ff;
  border: 1px solid #597b9d;
  border-radius: 5px;
  min-height: 27px;
  padding: 3px 8px;
  font: 600 11px/1.3 system-ui, sans-serif;
  white-space: nowrap;
}
.inbound-unit-alert button[data-transfer], .inbound-unit-dialog button[type=submit] {
  color: #43151b;
  background: #ffb7bd;
  border-color: #ff8b95;
}
.inbound-unit-alert .inbound-all { margin: 5px 8px; }
.inbound-status {
  display: inline-block;
  vertical-align: middle;
  border-radius: 5px;
  border: 1px solid #5a718b;
  padding: 2px 5px;
  color: #e2ebf6;
  background: #263b50;
  font: 700 10px/1.35 system-ui, sans-serif;
}
.inbound-green { background: #153e34; color: #9ee6c7; border-color: #51836e; }
.inbound-red { background: #472631; color: #ffc0c5; border-color: #a16070; }
.inbound-amber { background: #4a3924; color: #ffd58d; border-color: #937249; }
.inbound-rest { background: #233d59; color: #bfdef8; border-color: #587b9d; }
.inbound-scheduled { background: #19364b; color: #b6dffb; border-color: #416d87; }
.inbound-unit-dialog, .inbound-results-dialog {
  color: #eef6ff;
  background: #0f263a;
  border: 1px solid #587795;
  border-radius: 10px;
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 28px);
  margin: auto;
}
.inbound-unit-dialog { width: 500px; padding: 18px; overflow: auto; }
.inbound-unit-dialog::backdrop, .inbound-results-dialog::backdrop { background: #061526a6; }
.inbound-unit-dialog label { display: grid; gap: 5px; margin-block: 10px; }
.inbound-unit-dialog [role=alert] { color: #ffb7bd; }
.inbound-results-dialog { width: 960px; padding: 0; overflow: hidden; }
.inbound-results-dialog[open] { display: flex; flex-direction: column; }
.inbound-results-head {
  position: static;
  flex: none;
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #19354d;
  border-bottom: 1px solid #587795;
  padding: 10px 14px;
}
.inbound-results-head h2 { margin: 0; color: inherit; font-size: 16px; }
.inbound-results-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  min-height: 0;
  padding: 10px 14px 16px;
  font: 13px/1.45 system-ui, sans-serif;
}
.inbound-result-person { padding-block: 8px; border-bottom: 1px solid #466077; }
.inbound-result-person .inbound-person { font-size: 14px; }
.inbound-result-person .inbound-warning { margin: 4px 0 8px; }
.inbound-results-scroll details { margin-block: 9px; }
.inbound-results-scroll summary { cursor: pointer; font-weight: 700; color: #d5eaff; }
.inbound-results-scroll h3 { margin: 9px 0 4px; font-size: 13px; color: inherit; }
.inbound-table { margin-top: 6px; }
.inbound-table table { width: 100%; min-width: 550px; border-collapse: collapse; color: inherit; }
.inbound-table th, .inbound-table td {
  position: static;
  padding: 6px 8px;
  text-align: left;
  color: inherit;
  background: #112a40;
  border: 0;
  border-bottom: 1px solid #38536d;
  white-space: normal;
}
.inbound-table th { background: #1b3a55; font-weight: 700; }
#mapInboundAnchor + .inbound-unit-alert { margin: 2px 6px; max-height: min(32vh, 180px); }
#mapInboundAnchor + .inbound-unit-alert article { grid-template-columns: 1fr auto; }
#mapInboundAnchor + .inbound-unit-alert .inbound-warning { grid-column: 1 / -1; }
@media (max-width: 800px) {
  .inbound-unit-alert article { grid-template-columns: 1fr auto; }
  .inbound-unit-alert .inbound-warning { grid-column: 1 / -1; }
}

/* Keep both native tables and their existing scroll containers. */
tr.inbound-native-row {
  --inbound-ring: #e32f42;
  outline: 2px solid var(--inbound-ring);
  outline-offset: -2px;
}
tr.inbound-native-row > td {
  border-top: 2px solid var(--inbound-ring) !important;
  border-bottom: 2px solid var(--inbound-ring) !important;
}
tr.inbound-native-row > td:first-child { border-left: 3px solid var(--inbound-ring) !important; }
tr.inbound-native-row > td:last-child { border-right: 3px solid var(--inbound-ring) !important; }
.inbound-native-notice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 6px;
  color: #b51e35;
  font: 700 10px/1.25 system-ui,sans-serif;
  margin-top: 3px;
}
.inbound-native-notice button {
  color: #8e1223;
  border: 1px solid #f16b77;
  border-radius: 4px;
  background: #ffe7e9;
  padding: 2px 5px;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}
#rows tr.inbound-native-row > td:first-child { padding-right: 8px; }
#rows .inbound-native-notice { color: #ffa3ae; }

[data-native-batch][hidden] { display: none !important; }
.inbound-batch-dialog { width: 640px; }
.inbound-batch-dialog h2 { font-size: 19px; margin: 0 0 8px; }
.inbound-batch-dialog p { font-size: 13px; }
.inbound-batch-fields { border: 0; padding: 0; margin: 0; }
.inbound-batch-list {
  max-height: 34vh;
  overflow: auto;
  border: 1px solid #496783;
  border-radius: 6px;
}
.inbound-batch-dialog label.inbound-batch-person {
  display: flex;
  align-items: start;
  padding: 7px 10px;
  margin: 0;
  gap: 9px;
  border-bottom: 1px solid #38536d;
  font-size: 12px;
}
.inbound-batch-person small { display: block; color: #c4d8eb; font-size: 11px; }
.inbound-batch-person [data-batch-error]:not(:empty) { color: #ffd0d4; margin-top: 3px; }
.inbound-batch-actions { display: flex; justify-content: end; gap: 6px; }
