.main {
  overflow: auto;
}

.page.is-screen .page__scope {
  display: none;
}

.page-body {
  margin-top: 16px;
}

.drivers-card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
}

.drivers-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 12px;
  gap: 16px;
}

.drivers-toolbar__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.drivers-count {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.table-header-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.table-header-filters__label {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 2px 8px;
  border-radius: 8px;
  background: #f0f6ff;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
}

.filter-chip__clear {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.filter-chip__clear img {
  width: 16px;
  height: 16px;
}

.drivers-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.drivers-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
  height: 48px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input);
}

.drivers-search img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.drivers-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  line-height: 1.6;
}

.drivers-search input::placeholder {
  color: var(--muted);
}

.drivers-rule {
  width: 1px;
  height: 48px;
  background: var(--hairline);
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  height: 48px;
  padding: 16px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.btn-primary {
  border: 1px solid var(--border);
  background: var(--brand);
  color: var(--white);
}

.btn-secondary {
  border: 1px solid var(--brand);
  background: var(--white);
  color: var(--brand);
}

.btn-ghost {
  border: none;
  background: transparent;
  color: var(--brand);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: default;
}

.drivers-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.drivers-table th,
.drivers-table td {
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: middle;
}

.drivers-table th {
  height: 48px;
  padding: 12px 16px;
  background: var(--grey-200);
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}

.drivers-table th + th,
.drivers-table td + td {
  border-left: 1px solid var(--hairline);
}

.drivers-table td {
  height: 81px;
  padding: 16px;
  background: var(--white);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
}

.drivers-table td,
.vehicles-table td,
.orders-table td,
.devices-table td,
.hist-table td,
.vr-table td,
.scores-table td {
  font-weight: 400;
}

.drivers-table tbody tr:hover td,
.vehicles-table:not(.devices-table) tbody tr:hover td,
.orders-table tbody tr:hover td,
.hist-table tbody tr:hover td,
.vr-table tbody tr:hover td,
.scores-table tbody tr:hover td {
  background: var(--brand-100);
}

.drivers-table .col-check {
  width: 40px;
  padding: 16px 12px;
}

.drivers-table .col-check .ui-checkbox__input {
  display: block;
  margin: 0 auto;
}

.drivers-table .col-name,
.drivers-table .col-email,
.drivers-table .col-phone,
.drivers-table .col-vehicle,
.drivers-table .col-status {
  width: calc((100% - 56px) / 5);
}

.drivers-table .col-more {
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  padding: 16px;
  text-align: center;
}

.drivers-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 8px 16px;
  white-space: nowrap;
}

.drivers-add img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
}

.th-sort img {
  width: 16px;
  height: 16px;
}

.drivers-table tbody tr[data-open-driver] {
  cursor: pointer;
}

.drivers-table tbody tr[data-open-driver]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.cell-name {
  font-size: 14px;
  line-height: 1.6;
}

.cell-name__email {
  color: var(--muted);
}

.cell-vehicle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cell-vehicle img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
}

.cell-vehicle__meta {
  min-width: 0;
}

.cell-vehicle__name {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
}

.cell-vehicle__sub {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.link-assign {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--brand);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.badge--accepted {
  background: #f0fff7;
  border: 1px solid #008035;
  color: #008035;
}

.badge--sent {
  background: #fffdf0;
  border: 1px solid #bf8e0f;
  color: #bf8e0f;
}

.badge--danger {
  background: #cc0300;
  border: 1px solid #a30200;
  color: #fff;
}

.badge--expired {
  background: #f0f1f5;
  border: 1px solid #b0b9c4;
  color: var(--muted);
}

.more-btn {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
}

.more-btn img {
  width: 15px;
  height: 3px;
}

.drivers-empty {
  margin: 0;
  padding: 48px 16px;
  color: var(--muted);
  text-align: center;
}

.drivers-page {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 48px;
  padding: 24px 20px;
}

.drivers-page__range {
  font-size: 14px;
  line-height: 1.4;
}

.drivers-page__btns {
  display: flex;
  gap: 15px;
}

.page-btn {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
}

.page-btn:disabled {
  cursor: default;
  opacity: 0.45;
}

.page-btn img {
  width: 24px;
  height: 24px;
}

.row-menu {
  position: fixed;
  z-index: 20;
  min-width: 180px;
  padding: 8px 0;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  box-shadow: 0 1px 12px rgba(29, 42, 52, 0.06);
}

.row-menu button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 14px;
}

.row-menu button:hover {
  background: var(--brand-100);
}

.row-menu button.is-danger {
  color: #cc0300;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 17, 20, 0.45);
}

.modal {
  width: min(822px, 100%);
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: 0 1px 12px rgba(29, 42, 52, 0.06);
}

.modal--sm {
  width: min(420px, 100%);
}

.modal--invite {
  width: min(822px, calc(100vw - 32px));
}

.modal__head,
.modal__foot {
  display: flex;
  align-items: center;
  padding: 16px;
}

.modal__head {
  justify-content: space-between;
  gap: 16px;
}

.modal__title {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
}

.modal__close {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
}

.modal__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

.modal__hint {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.modal__error {
  margin: 0;
  color: #cc0300;
  font-size: 14px;
}

.modal__foot {
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--hairline);
}

.modal__foot--end {
  justify-content: flex-end;
}

.modal__foot-right {
  display: flex;
  gap: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 48px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input);
}

.field span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.5;
}

.field select,
.field input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  line-height: 1.6;
}

.invite-fleet-wrap {
  padding-bottom: 8px;
  width: 100%;
}

.invite-fleet {
  position: relative;
  display: block;
  width: 100%;
}

.invite-fleet select {
  width: 100%;
  height: 48px;
  padding: 12px 36px 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input);
  appearance: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.invite-fleet select:invalid,
.invite-fleet select option[value=""] {
  color: var(--muted);
}

.invite-fleet__chevron {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 16px;
  height: 16px;
  pointer-events: none;
  transform: translateY(-50%);
}

.invite-driver {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.invite-address-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding-left: 24px;
}

.invite-address-input {
  width: 100%;
  height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input);
  outline: none;
  font-size: 14px;
  line-height: 1.6;
}

.invite-address-input::placeholder {
  color: var(--muted);
}

.invite-address-helper {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
}

.invite-row {
  display: grid;
  grid-template-columns: 16px repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  width: 100%;
}

.invite-driver--multi .invite-row {
  grid-template-columns: 16px repeat(4, minmax(0, 1fr)) 24px;
}

.invite-row__n {
  width: 16px;
  color: var(--muted);
  font-size: 16px;
}

.invite-row input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input);
  outline: none;
  font-size: 14px;
}

.invite-row input::placeholder {
  color: var(--muted);
}

.invite-row__remove {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  flex-shrink: 0;
}

.invite-add-driver {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  margin-left: 24px;
  padding: 0 0 8px;
  border: none;
  background: transparent;
  color: var(--brand);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.modal--assign {
  width: min(820px, calc(100vw - 32px));
  overflow: hidden;
}

.modal__head--assign {
  padding: 20px;
}

.assign-panel {
  margin: 0 20px 20px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
}

.assign-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border-bottom: 1px solid var(--hairline);
}

.assign-toolbar__count {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.assign-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(298px, 100%);
  height: 48px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input);
}

.assign-search img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.assign-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  line-height: 1.6;
}

.assign-search input::placeholder {
  color: var(--muted);
}

.assign-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.assign-table th,
.assign-table td {
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: middle;
}

.assign-table th {
  height: 48px;
  padding: 12px 16px;
  background: var(--grey-200);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}

.assign-table th + th,
.assign-table td + td {
  border-left: 1px solid var(--hairline);
}

.assign-table td {
  padding: 8px 12px;
  background: var(--white);
  font-size: 14px;
  line-height: 1.6;
}

.assign-table tbody tr:hover td {
  background: var(--brand-100);
}

.assign-col-vehicle {
  width: 250px;
}

.assign-col-fleet,
.assign-col-driver {
  width: auto;
  max-width: 0;
  overflow: hidden;
}

.assign-col-action {
  width: 140px;
}

.assign-col-fleet {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assign-table .driver-cell {
  max-width: 100%;
}

.assign-table .driver-cell > span:last-child {
  display: block;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.assign-table .driver-cell__name,
.assign-table .driver-cell__email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assign-col-vehicle .cell-vehicle {
  gap: 8px;
}

.assign-table .cell-vehicle__name {
  font-weight: 500;
}

.assign-col-vehicle .cell-vehicle img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: contain;
}

.assign-driver-name {
  font-weight: 500;
  line-height: 1.6;
}

.assign-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  height: 40px;
  padding: 0 32px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--white);
  color: var(--brand);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.assign-table tbody tr:hover .assign-select {
  border-color: var(--border);
  background: var(--brand);
  color: var(--white);
}

.assign-empty {
  padding: 24px 16px !important;
  color: var(--muted);
  text-align: center;
}

.assign-page {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  padding: 12px 20px;
}

.assign-page__range {
  font-size: 14px;
  line-height: 1.4;
}

.assign-page__btns {
  display: flex;
  gap: 15px;
}

.assign-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}

.assign-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--white);
  text-align: left;
}

.assign-option.is-selected,
.assign-option:hover {
  border-color: var(--brand);
  background: var(--brand-100);
}

.assign-option img {
  width: 60px;
  height: 40px;
  object-fit: contain;
}
