:root {
  --bg: #f6f9fc;
  --card: #ffffff;
  --text: #172033;
  --muted: #657085;
  --line: #d9e3f0;
  --primary: #1769e0;
  --primary-dark: #0f54bb;
  --primary-soft: #eaf2ff;
  --success: #12805c;
  --error-bg: #fff0f0;
  --error-text: #b42318;
  --shadow: 0 24px 70px rgba(23, 32, 51, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(23, 105, 224, 0.08), transparent 320px),
    var(--bg);
}

button,
input {
  font: inherit;
}

.page-shell {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 18px;
}

.tracking-card {
  width: min(920px, 100%);
  background: var(--card);
  border: 1px solid rgba(217, 227, 240, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 34px;
}

.card-header {
  text-align: center;
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.1;
}

.description {
  max-width: 520px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.tracking-form {
  margin: 0 auto;
  max-width: 680px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(23, 105, 224, 0.12);
}

button {
  min-width: 120px;
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  padding: 0 22px;
  color: #fff;
  background: var(--primary);
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

button:hover {
  background: var(--primary-dark);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.status-message,
.error-message {
  max-width: 680px;
  margin: 16px auto 0;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.94rem;
}

.status-message {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.error-message {
  color: var(--error-text);
  background: var(--error-bg);
  border: 1px solid rgba(180, 35, 24, 0.2);
}

.result-panel {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.summary-item {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: #fbfdff;
}

.summary-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.summary-value {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.summary-value.status {
  color: var(--success);
}

.timeline-section {
  margin-top: 30px;
}

.timeline-section h2 {
  margin: 0 0 18px;
  font-size: 1.25rem;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 26px;
  padding-bottom: 24px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 185px;
  top: 22px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-marker {
  position: absolute;
  left: 177px;
  top: 5px;
  width: 18px;
  height: 18px;
  border: 4px solid var(--primary);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 5px var(--primary-soft);
}

.timeline-date {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.timeline-content {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff;
}

.timeline-location {
  margin: 0 0 6px;
  color: var(--text);
  font-weight: 700;
}

.timeline-status {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 720px) {
  .page-shell {
    align-items: flex-start;
    padding: 20px 14px;
  }

  .tracking-card {
    padding: 24px 18px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-left: 30px;
  }

  .timeline-item::before {
    left: 8px;
    top: 22px;
  }

  .timeline-marker {
    left: 0;
    top: 4px;
  }

  .timeline-date {
    font-size: 0.88rem;
  }
}
