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

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

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

.hist-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hist-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);
}

.hist-search img {
  width: 16px;
  height: 16px;
}

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

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

.hist-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
  cursor: default;
}

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

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

.hist-table th,
.hist-table td {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 12px 16px;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
  line-height: 1.6;
}

.hist-table th {
  background: var(--grey-200);
  font-weight: 500;
}

.hist-table td {
  font-weight: 400;
}

.hist-row {
  cursor: pointer;
}

.hist-row:hover td,
.hist-row:focus-visible td {
  background: #f0f6ff;
}

.page.is-history-detail .page__top {
  display: none;
}

.hist-detail {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hist-crumb {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hist-crumb button {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--brand);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
}

.hist-crumb span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.hist-detail__heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hist-detail__heading h1,
.hist-detail__info h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
}

.hist-detail__trip {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--brand);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

.hist-detail__card {
  display: flex;
  flex-direction: column;
  gap: 56px;
  padding: 16px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 1px 6px rgba(29, 42, 52, 0.06);
}

.hist-detail__info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hist-detail__grid {
  display: flex;
  gap: 16px;
}

.hist-detail__stack {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.hist-detail-field__label,
.hist-detail-field__value {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

.hist-detail-field__label {
  color: var(--muted);
}

.hist-detail-field__value.is-link {
  color: var(--brand);
  font-weight: 500;
}

.hist-detail-event {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hist-detail-event img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.hist-missing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 80px 8px;
  border-radius: 8px;
  background: #f0f1f5;
  text-align: center;
}

.hist-missing img {
  width: 24px;
  height: 24px;
}

.hist-missing__title,
.hist-missing__copy {
  margin: 0;
  max-width: 508px;
}

.hist-missing__title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.hist-missing__copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

.hist-sort {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

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

.hist-table .col-ts {
  width: 223px;
}

.hist-table .col-event {
  width: auto;
}

.hist-table .col-video {
  width: 130px;
}

.hist-table .col-fleet {
  width: 180px;
}

.hist-table .col-driver {
  width: 240px;
}

.hist-table .col-vehicle {
  width: 240px;
}

.hist-table .col-more {
  width: 56px;
  text-align: center;
}

.hist-table tbody tr.is-selected td {
  background: #f0f6ff;
}

.hist-event {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.hist-event--stacked {
  gap: 8px;
  min-height: 52px;
  justify-content: center;
}

.hist-event__main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hist-event__main img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.hist-event__label {
  font-weight: 400;
}

.hist-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 2px 8px;
  border: 1px solid #b0b9c4;
  border-radius: 4px;
  background: #f0f1f5;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
}

.hist-video {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 98px;
}

.hist-video img {
  width: 98px;
  height: 52px;
  object-fit: cover;
  border: 1px solid var(--hairline);
  border-radius: 4px;
}

.hist-video-empty {
  display: inline-block;
  width: 98px;
  text-align: center;
}

.hist-driver {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.hist-driver__email {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.hist-vehicle {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

.hist-vehicle__meta {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

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

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

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

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

.hist-page__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: default;
}

.hist-page__btn:disabled {
  opacity: 0.35;
}

.hist-page__btn img {
  width: 24px;
  height: 24px;
}
