.driver-list,
.status-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.driver-card,
.status-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
}

.vehicle-board {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
}

.vehicle-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.vehicle-search {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-buttons);
  padding: 9px 12px;
  color: var(--field-ink);
  background: var(--field-bg);
}

.vehicle-board-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.vehicle-workspace {
  display: grid;
  grid-template-columns: minmax(300px, var(--vehicle-list-width, 420px)) 1px minmax(420px, 1fr);
  gap: 0;
  align-items: stretch;
  flex: 1;
  width: 100%;
  height: auto;
  min-height: 520px;
}

.driver-workspace,
.customer-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(420px, 1fr);
  gap: 12px;
  align-items: stretch;
  flex: 1;
  width: 100%;
  min-height: 520px;
}

.vehicle-workspace-resizer {
  position: relative;
  z-index: 2;
  width: 1px;
  min-height: 100%;
  background: var(--line);
  cursor: col-resize;
  touch-action: none;
}

.vehicle-workspace-resizer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -10px;
  width: 21px;
}

.vehicle-workspace-resizer:hover,
.vehicle-workspace-resizer:focus-visible,
.vehicle-workspace.is-resizing .vehicle-workspace-resizer {
  background: var(--ink);
  outline: 0;
}

body.is-resizing-vehicle-workspace {
  cursor: col-resize;
  user-select: none;
}

.dialog-actions .primary {
  color: #fff;
}

.vehicle-list {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-top: 12px;
}

.vehicle-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.driver-card .vehicle-card-facts {
  grid-template-columns: 1fr;
}

.driver-card .vehicle-card-title,
.driver-profile-title,
.customer-card .vehicle-card-title {
  grid-template-columns: 32px minmax(0, 1fr);
}

.customer-card .vehicle-card-head,
.customer-card .vehicle-card-title {
  align-items: center;
}

.customer-card .customer-avatar {
  align-self: center;
}

.customer-avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 50%;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
}

.customer-avatar.is-large {
  width: 40px;
  height: 40px;
}

.customer-profile-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-profile-form summary,
.customer-profile-form label:last-child {
  grid-column: 1 / -1;
}

.customer-profile-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.customer-unpaid-amount {
  color: #dc2626;
  font-size: 16px;
  font-weight: 800;
}

.customer-profile-form .cell-input,
.customer-profile-form .cell-select {
  min-height: 38px;
  border: 1px solid var(--field-border);
  padding: 9px 10px;
  color: var(--field-ink);
  background: var(--field-bg);
}

.customer-inspector .vehicle-inspector-head .row-delete {
  width: auto;
  min-height: 36px;
  padding: 8px 14px;
}

.driver-avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--soft-surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.driver-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.driver-avatar.is-large {
  width: 72px;
  height: 72px;
  font-size: 22px;
}

.driver-avatar-preview {
  display: inline-grid;
  place-items: center;
}

.driver-avatar-editor {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.driver-avatar-editor .secondary-action {
  margin-top: 8px;
  min-height: 34px;
}

.driver-card .vehicle-card-title strong,
.driver-profile-title h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-unpaid-amount {
  display: block;
  color: inherit;
}

.driver-unpaid-amount.is-positive {
  color: #dc2626;
}

.driver-salary-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: end;
  flex-wrap: wrap;
}

.driver-salary-actions select,
.driver-salary-actions input {
  min-height: 32px;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-buttons);
  padding: 6px 8px;
  color: var(--field-ink);
  background: var(--field-bg);
}

.vehicle-event.is-salary[data-status="unpaid"] {
  border-color: color-mix(in srgb, #dc2626 45%, var(--line));
}

.vehicle-event.is-salary[data-status="unpaid"] .vehicle-event-badge {
  color: #991b1b;
  border-color: rgba(220, 38, 38, .35);
  background: rgba(254, 226, 226, .75);
}

