.technician-history-page {
  display: grid;
  width: 100%;
  max-width: none;
  min-width: 0;
  gap: 20px;
  padding:
    24px
    28px;
  background: #ffffff;
}

.technician-history-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.technician-history-header span {
  color:
    var(--accent-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.technician-history-header h1 {
  margin:
    7px
    0
    4px;
  font-size:
    clamp(
      27px,
      4vw,
      38px
    );
  line-height: 1.1;
}

.technician-history-header p {
  margin: 0;
  color:
    var(--text-muted);
}

.technician-history-metrics {
  display: grid;
  grid-template-columns:
    repeat(
      4,
      minmax(
        0,
        1fr
      )
    );
  gap: 12px;
}

.technician-history-metrics article {
  display: grid;
  min-height: 105px;
  align-content: space-between;
  padding: 18px;
  border:
    1px solid
    var(--border-strong);
  border-radius: 13px;
  background: #ffffff;
}

.technician-history-metrics span {
  color:
    var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.technician-history-metrics strong {
  font-size: 29px;
}

.technician-history-filters {
  display: grid;
  grid-template-columns:
    minmax(
      240px,
      1fr
    )
    180px
    165px
    165px
    auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  border:
    1px solid
    var(--border-strong);
  border-radius: 13px;
  background:
    var(--accent-softer);
}

.technician-history-filters label {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.technician-history-filters label > span {
  color:
    var(--text-muted);
  font-size: 10px;
  font-weight: 800;
}

.technician-history-filters input,
.technician-history-filters select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding:
    0
    12px;
  border:
    1px solid
    var(--border-strong);
  border-radius: 9px;
  background: #ffffff;
}

.technician-history-filters button,
.technician-history-empty button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding:
    0
    17px;
  border:
    1px solid
    var(--accent-dark);
  border-radius: 9px;
  background:
    var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.technician-history-filters button svg {
  width: 17px;
  height: 17px;
}

.technician-history-result-count {
  color:
    var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.technician-history-list {
  display: grid;
  gap: 14px;
}

.technician-history-card {
  overflow: hidden;
  border:
    1px solid
    var(--border-strong);
  border-radius: 14px;
  background: #ffffff;
}

.technician-history-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  border-bottom:
    1px solid
    var(--border);
}

.technician-history-card__code {
  color:
    var(--accent-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
}

.technician-history-card h2 {
  margin:
    6px
    0
    3px;
  font-size: 20px;
}

.technician-history-card p {
  margin: 0;
  color:
    var(--text-muted);
  font-size: 13px;
}

.technician-history-state {
  flex: 0 0 auto;
  padding:
    7px
    11px;
  border:
    1px solid
    var(--border-strong);
  border-radius: 999px;
  background:
    var(--accent-softer);
  font-size: 10px;
  font-weight: 800;
}

.technician-history-card__information {
  display: grid;
  grid-template-columns:
    repeat(
      4,
      minmax(
        0,
        1fr
      )
    );
}

.technician-history-card__information > div {
  display: grid;
  min-width: 0;
  grid-template-columns:
    22px
    minmax(
      0,
      1fr
    );
  column-gap: 9px;
  row-gap: 3px;
  padding: 17px;
  border-right:
    1px solid
    var(--border);
}

.technician-history-card__information > div:last-child {
  border-right: 0;
}

.technician-history-card__information svg {
  grid-row:
    1
    /
    3;
  width: 18px;
  height: 18px;
  color:
    var(--accent-dark);
}

.technician-history-card__information span {
  color:
    var(--text-muted);
  font-size: 10px;
}

.technician-history-card__information strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.technician-history-card > footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 18px;
  border-top:
    1px solid
    var(--border);
  background: #ffffff;
}

.technician-history-primary-button,
.technician-history-secondary-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding:
    0
    14px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

.technician-history-primary-button {
  border:
    1px solid
    var(--accent-dark);
  background:
    var(--accent);
  color: #ffffff;
}

.technician-history-secondary-button {
  border:
    1px solid
    var(--border-strong);
  background: #ffffff;
  color:
    var(--text);
}

.technician-history-primary-button svg,
.technician-history-secondary-button svg {
  width: 17px;
  height: 17px;
}

.technician-history-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 13px;
}

.technician-history-pagination button {
  min-height: 38px;
  padding:
    0
    14px;
  border:
    1px solid
    var(--border-strong);
  border-radius: 8px;
  background: #ffffff;
  font-weight: 700;
}

.technician-history-pagination button:disabled {
  opacity: .45;
}

.technician-history-pagination span {
  color:
    var(--text-muted);
  font-size: 12px;
}

.technician-history-empty,
.technician-history-loading {
  display: grid;
  min-height: 320px;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 28px;
  border:
    1px solid
    var(--border-strong);
  border-radius: 14px;
  background: #ffffff;
  text-align: center;
}

.technician-history-empty > svg {
  width: 34px;
  height: 34px;
  color:
    var(--accent-dark);
}

.technician-history-empty h2,
.technician-history-empty p {
  margin: 0;
}

.technician-history-empty p {
  color:
    var(--text-muted);
}

.technician-history-spinner {
  width: 18px;
  height: 18px;
  border:
    2px solid
    rgba(
      255,
      255,
      255,
      .45
    );
  border-top-color:
    currentColor;
  border-radius: 50%;
  animation:
    technician-history-spin
    650ms
    linear
    infinite;
}

.technician-history-loading
.technician-history-spinner {
  width: 30px;
  height: 30px;
  color:
    var(--accent-dark);
}

@keyframes technician-history-spin {
  to {
    transform:
      rotate(
        360deg
      );
  }
}

@media (max-width: 1080px) {
  .technician-history-filters {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      );
  }

  .technician-history-filters button {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .technician-history-page {
    padding:
      16px
      12px;
  }

  .technician-history-metrics {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      );
  }

  .technician-history-filters {
    grid-template-columns:
      1fr;
  }

  .technician-history-card__information {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      );
  }

  .technician-history-card__information > div {
    border-bottom:
      1px solid
      var(--border);
  }

  .technician-history-card__information > div:nth-child(2) {
    border-right: 0;
  }

  .technician-history-card__information > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 520px) {
  .technician-history-metrics {
    grid-template-columns:
      1fr;
  }

  .technician-history-card > header {
    flex-direction: column;
  }

  .technician-history-card__information {
    grid-template-columns:
      1fr;
  }

  .technician-history-card__information > div {
    border-right: 0;
    border-bottom:
      1px solid
      var(--border);
  }

  .technician-history-card__information > div:nth-last-child(-n + 2) {
    border-bottom:
      1px solid
      var(--border);
  }

  .technician-history-card__information > div:last-child {
    border-bottom: 0;
  }

  .technician-history-card > footer {
    flex-direction: column;
  }

  .technician-history-primary-button,
  .technician-history-secondary-button {
    width: 100%;
  }

  .technician-history-pagination {
    display: grid;
    grid-template-columns:
      1fr;
    text-align: center;
  }

  .technician-history-pagination button {
    width: 100%;
  }
}
