/* Isolated to the business overview's new read-only driver list. */
.ledger-driver-list-modal {
  position: fixed;
  inset: 0;
  z-index: 1700;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.58);
}

.ledger-driver-list-modal[hidden] { display: none; }

.ledger-driver-list-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1080px, 96vw);
  max-height: min(86vh, 760px);
  min-width: 0;
  overflow: hidden;
  border: 1px solid #c9d5d1;
  border-radius: 10px;
  background: #fff;
  color: #17201c;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
}

.ledger-driver-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border-bottom: 1px solid #d8e0dd;
  background: #f7f9f8;
}

.ledger-driver-list-header > div { min-width: 0; }
.ledger-driver-list-header strong { font-size: 18px; }
.ledger-driver-list-header p { margin: 4px 0 0; font-size: 13px; }
.ledger-driver-list-header strong,
.ledger-driver-list-header p { white-space: normal; overflow-wrap: anywhere; }
.ledger-driver-list-header > button { flex: 0 0 auto; }

.ledger-driver-list-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px;
}

.ledger-driver-list-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.ledger-driver-list-table th,
.ledger-driver-list-table td {
  height: auto;
  max-height: none;
  padding: 10px;
  border-bottom: 1px solid #d8e0dd;
  text-align: left;
  vertical-align: top;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  line-height: 1.5;
  color: #17201c;
}

.ledger-driver-list-table th {
  position: sticky;
  top: -12px;
  z-index: 1;
  background: #f7f9f8;
}

.ledger-driver-list-table th:nth-child(1) { width: 22%; }
.ledger-driver-list-table th:nth-child(2) { width: 46%; }
.ledger-driver-list-table th:nth-child(3) { width: 16%; }
.ledger-driver-list-table th:nth-child(4) { width: 16%; }
.ledger-driver-list-table .btn { white-space: normal; padding: 5px 9px; font-size: inherit; }
.ledger-driver-list-status { font-weight: 700; }
.ledger-driver-list-status-paid { color: #087436; }
.ledger-driver-list-status-partial { color: #865600; }
.ledger-driver-list-status-unpaid { color: #4b5563; }

@media (max-width: 600px) {
  .ledger-driver-list-modal { padding: 8px; }
  .ledger-driver-list-card { width: 100%; max-height: 90vh; }
  .ledger-driver-list-body { padding: 6px; }
  .ledger-driver-list-table { font-size: 13px; }
  .ledger-driver-list-table th, .ledger-driver-list-table td { padding: 7px 4px; }
  .ledger-driver-list-table th { top: -6px; }
}
