.tracking-page {
  min-height: 100vh;
  background: var(--border);
  color: var(--text);
}

.tracking-container {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 50px 0 70px;
}

.tracking-hero {
  margin-bottom: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.tracking-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.tracking-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 900;
  letter-spacing: -.04em;
}

.tracking-hero p {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.tracking-status {
  min-width: 190px;
  padding: 13px 15px;
  border: 1px solid color-mix(in srgb, var(--primary) 10%, transparent);
  border-radius: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tracking-status span {
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.tracking-status strong {
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
}

.tracking-card {
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--primary) 9%, transparent);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 30px color-mix(in srgb, var(--primary) 3%, transparent);
}

.tracking-card + .tracking-card {
  margin-top: 15px;
}

.tracking-card__title {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.tracking-card__title > svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--primary);
}

.tracking-card__title h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
}

.tracking-card__title p {
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 10px;
}

.tracking-progress {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
}

.tracking-step {
  position: relative;
  min-width: 0;
  text-align: center;
}

.tracking-step::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
}

.tracking-step:first-child::before {
  left: 50%;
}

.tracking-step:last-child::before {
  right: 50%;
}

.tracking-step.is-completed::before,
.tracking-step.is-current::before {
  background: var(--primary);
}

.tracking-step__point {
  position: relative;
  z-index: 1;
  width: 29px;
  height: 29px;
  margin: 0 auto 8px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tracking-step.is-completed .tracking-step__point,
.tracking-step.is-current .tracking-step__point {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.tracking-step.is-current .tracking-step__point {
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 10%, transparent);
}

.tracking-step__point svg {
  width: 14px;
  height: 14px;
}

.tracking-step__point span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-soft);
}

.tracking-step.is-current .tracking-step__point span {
  background: #fff;
}

.tracking-step strong {
  color: var(--text);
  font-size: 9px;
  font-weight: 850;
}

.tracking-step.is-completed strong,
.tracking-step.is-current strong {
  color: var(--primary);
}

.tracking-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 15px;
  margin: 15px 0;
  align-items: start;
}

.tracking-side {
  min-width: 0;
}

.tracking-items {
  display: grid;
}

.tracking-item {
  padding: 11px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 7%, transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tracking-item > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tracking-item span {
  color: var(--text-soft);
  font-size: 8px;
  font-weight: 850;
}

.tracking-item strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
}

.tracking-item small {
  color: var(--text);
  font-size: 9px;
}

.tracking-total {
  padding-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tracking-total span {
  font-size: 12px;
  font-weight: 850;
}

.tracking-total strong {
  color: var(--primary);
  font-size: 21px;
  font-weight: 900;
}

.tracking-detail {
  display: grid;
  gap: 11px;
}

.tracking-detail > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tracking-detail span {
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.tracking-detail strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
}

.tracking-history {
  display: grid;
}

.tracking-history article {
  position: relative;
  padding: 0 0 18px 25px;
}

.tracking-history article:last-child {
  padding-bottom: 0;
}

.tracking-history article::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: -2px;
  left: 5px;
  width: 1px;
  background: var(--border);
}

.tracking-history article:last-child::before {
  display: none;
}

.tracking-history article > span {
  position: absolute;
  top: 5px;
  left: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
}

.tracking-history strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
}

.tracking-history p {
  margin: 3px 0;
  color: var(--text);
  font-size: 10px;
}

.tracking-history small {
  color: var(--text-soft);
  font-size: 9px;
}

.tracking-cancelled,
.tracking-error,
.tracking-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tracking-cancelled {
  justify-content: flex-start;
  gap: 10px;
  color: #a32d2d;
}

.tracking-cancelled > svg {
  width: 24px;
  height: 24px;
}

.tracking-cancelled > div {
  display: flex;
  flex-direction: column;
}

.tracking-cancelled strong {
  font-size: 13px;
}

.tracking-cancelled span {
  font-size: 10px;
}

.tracking-loading {
  min-height: 300px;
  gap: 9px;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.tracking-loading svg {
  width: 20px;
  height: 20px;
  animation: trackingSpin .8s linear infinite;
}

@keyframes trackingSpin {
  to {
    transform: rotate(360deg);
  }
}

.tracking-error {
  min-height: 440px;
  flex-direction: column;
  text-align: center;
}

.tracking-error > svg {
  width: 46px;
  height: 46px;
  color: var(--text-soft);
}

.tracking-error h1 {
  margin: 16px 0 6px;
  font-size: 26px;
}

.tracking-error p {
  margin: 0 0 15px;
  color: var(--text);
  font-size: 12px;
}

.tracking-error a {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 11px;
  font-weight: 850;
}

@media (max-width: 900px) {
  .tracking-grid {
    grid-template-columns: 1fr;
  }

  .tracking-progress {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tracking-step {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
  }

  .tracking-step::before {
    top: 0;
    bottom: 0;
    left: 14px !important;
    right: auto !important;
    width: 2px;
    height: auto;
  }

  .tracking-step__point {
    flex: 0 0 29px;
    margin: 0;
  }
}

@media (max-width: 620px) {
  .tracking-container {
    width: min(100% - 24px, 1220px);
    padding-top: 30px;
  }

  .tracking-hero {
    align-items: stretch;
    flex-direction: column;
  }
}
