/* Keep every driver-app dataset in one horizontal row per record. */
.transport-table-wrap,
.receiving-table-wrap,
.vehicle-app-table-wrap,
.driver-ledger-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  /* Keep horizontal swipes inside the table, but let vertical swipes scroll the page. */
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y pinch-zoom;
}

.driver-ledger-table-wrap {
  max-height: 460px;
  overflow-y: auto;
}

.transport-table,
.receiving-table,
.vehicle-app-table,
.driver-ledger-table {
  width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  font-size: 10px;
}

.transport-table { min-width: 1680px; }
.receiving-table { min-width: 1480px; }
.vehicle-app-table { min-width: 1380px; }
.driver-trip-table { min-width: 1760px; }
.driver-maintenance-table { min-width: 1220px; }

.transport-table th,
.transport-table td,
.receiving-table th,
.receiving-table td,
.vehicle-app-table th,
.vehicle-app-table td,
.driver-ledger-table th,
.driver-ledger-table td {
  min-width: max-content;
  padding: 10px 11px;
  border-right: 1px solid #edf1ef;
  border-bottom: 1px solid #e2e9e5;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}

.transport-table th,
.receiving-table th,
.vehicle-app-table th,
.driver-ledger-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #edf4ef;
  color: #315348;
  font-weight: 900;
}

.transport-table th:first-child,
.transport-table td:first-child,
.receiving-table th:first-child,
.receiving-table td:first-child,
.vehicle-app-table th:first-child,
.vehicle-app-table td:first-child,
.driver-ledger-table th:first-child,
.driver-ledger-table td:first-child {
  position: sticky;
  z-index: 1;
  left: 0;
  background: #fff;
  box-shadow: 1px 0 0 #dce6e1;
}

.transport-table th:first-child,
.receiving-table th:first-child,
.vehicle-app-table th:first-child,
.driver-ledger-table th:first-child {
  z-index: 3;
  background: #e7f1eb;
}

.transport-table tbody tr:nth-child(even) td,
.receiving-table tbody tr:nth-child(even) td,
.vehicle-app-table tbody tr:nth-child(even) td,
.driver-ledger-table tbody tr:nth-child(even) td {
  background: #fbfdfc;
}

.transport-table tbody tr:nth-child(even) td:first-child,
.receiving-table tbody tr:nth-child(even) td:first-child,
.vehicle-app-table tbody tr:nth-child(even) td:first-child,
.driver-ledger-table tbody tr:nth-child(even) td:first-child {
  background: #f6faf7;
}

.transport-address-cell,
.driver-farm-work-description,
.receiving-address,
.receiving-memo,
.vehicle-app-text,
.driver-ledger-text {
  min-width: 150px;
  max-width: none !important;
  text-align: left !important;
  white-space: nowrap !important;
}

.driver-ledger-key {
  color: var(--deep);
  font-weight: 900;
}

.driver-ledger-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.driver-ledger-actions button {
  height: 30px;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: #fff;
  padding: 0 9px;
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
}

.driver-ledger-actions .danger {
  border-color: #d7aaa3;
  color: #a34135;
}

@media (max-width: 700px) {
  .transport-table-wrap,
  .receiving-table-wrap,
  .vehicle-app-table-wrap,
  .driver-ledger-table-wrap {
    scrollbar-width: thin;
    scrollbar-color: #79a895 #edf3ef;
  }

  .driver-ledger-table-wrap {
    max-height: 390px;
  }

  .transport-table th,
  .transport-table td,
  .receiving-table th,
  .receiving-table td,
  .vehicle-app-table th,
  .vehicle-app-table td,
  .driver-ledger-table th,
  .driver-ledger-table td {
    padding: 9px 10px;
    font-size: 9px;
  }
}
