:root {
  --blue: #1769e0;
  --blue-dark: #0f4fa8;
  --green: #087a56;
  --amber: #a45f00;
  --red: #b3261e;
  --ink: #172033;
  --muted: #667085;
  --line: #d7dde8;
  --panel: #ffffff;
  --bg: #f5f7fb;
  --soft: #eef4ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner {
  max-width: 1120px;
  height: 60px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  color: var(--blue);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: 0;
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.nav a {
  padding: 7px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.nav a:hover,
.nav a.active {
  background: var(--soft);
  color: var(--blue);
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero-main {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(23, 105, 224, 0.78), rgba(15, 79, 168, 0.82)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='420' viewBox='0 0 900 420'%3E%3Crect width='900' height='420' fill='%23dbeafe'/%3E%3Cg fill='none' stroke='%2393b7ef' stroke-width='2' opacity='.75'%3E%3Cpath d='M0 88h900M0 178h900M0 268h900M0 358h900M90 0v420M210 0v420M330 0v420M450 0v420M570 0v420M690 0v420M810 0v420'/%3E%3C/g%3E%3Cg fill='%23ffffff' opacity='.42'%3E%3Cpath d='M128 252l205-76 280 42 119-58 25 23-108 83-320-18-178 63z'/%3E%3Cpath d='M265 122l70-31 191 61-68 25z'/%3E%3C/g%3E%3C/svg%3E") center / cover;
  padding: 28px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 40px;
  line-height: 1.08;
  font-weight: 760;
  letter-spacing: 0;
}

.hero p {
  max-width: 560px;
  margin: 0;
  color: rgba(255,255,255,.88);
  font-size: 15px;
}

.search-panel,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search-panel {
  padding: 20px;
}

.panel {
  overflow: hidden;
}

.panel-head {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.subtle {
  color: var(--muted);
  font-size: 13px;
}

.track-form {
  display: grid;
  gap: 12px;
}

.track-label {
  color: var(--muted);
  font-weight: 650;
  font-size: 13px;
}

.track-row {
  display: flex;
  gap: 8px;
}

.track-input {
  min-width: 0;
  flex: 1;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
  text-transform: uppercase;
}

.button {
  height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0 16px;
  cursor: pointer;
}

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

.flight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.flight-row {
  display: grid;
  grid-template-columns: 82px 1fr 110px;
  gap: 14px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  transition: background .1s;
}

.flight-row:last-child { border-bottom: 0; }
.flight-row:hover { background: #f8fbff; }

.flight-no {
  font-weight: 780;
  color: var(--ink);
}

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

.airport {
  font-weight: 760;
  font-size: 18px;
}

.route-line {
  height: 2px;
  flex: 1;
  min-width: 28px;
  background: var(--line);
  position: relative;
}

.route-line::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--line);
  border-right: 2px solid var(--line);
  transform: rotate(45deg);
}

.status {
  justify-self: end;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 760;
  background: #eef4ff;
  color: var(--blue);
}

.status--on-time { background: #e7f7ef; color: var(--green); }
.status--boarding { background: #fff4df; color: var(--amber); }
.status--delayed { background: #fdebea; color: var(--red); }
.status--in-air { background: #eef4ff; color: var(--blue); }

.detail-header {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 18px;
}

.breadcrumb {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}

.breadcrumb a { color: var(--blue); }

.detail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.detail-top h1 {
  margin: 0 0 4px;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0;
}

.airline {
  color: var(--muted);
  font-size: 15px;
}

.timeline {
  display: grid;
  grid-template-columns: 1fr minmax(140px, 280px) 1fr;
  gap: 20px;
  align-items: center;
}

.stop {
  display: grid;
  gap: 4px;
}

.stop--end { text-align: right; }

.time {
  font-size: 30px;
  line-height: 1;
  font-weight: 760;
}

.city {
  color: var(--muted);
  font-size: 13px;
}

.timeline-track {
  position: relative;
  height: 38px;
  display: flex;
  align-items: center;
}

.timeline-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
}

.plane-dot {
  position: relative;
  margin: 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 6px rgba(23,105,224,.12);
}

.plane-dot::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 15px;
  width: 18px;
  height: 4px;
  background: #fff;
  border-radius: 6px;
}

.plane-dot::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 8px;
  width: 4px;
  height: 18px;
  background: #fff;
  border-radius: 6px;
}

.progress-panel {
  margin-bottom: 18px;
}

.progress-body {
  padding: 18px;
}

.progress-meta,
.progress-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.progress-meta {
  color: var(--ink);
  font-size: 16px;
  font-weight: 780;
  margin-bottom: 12px;
}

.progress-caption {
  color: var(--muted);
  font-size: 13px;
  margin-top: 12px;
}

.flight-progress {
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
  margin: 0 14px;
}

.flight-progress::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
}

.flight-progress-fill {
  position: absolute;
  left: 0;
  height: 8px;
  border-radius: 999px;
  background: var(--blue);
}

.flight-position {
  position: absolute;
  top: 50%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--blue);
  box-shadow: 0 2px 8px rgba(23,105,224,.22);
  transform: translate(-50%, -50%);
}

.position-plane {
  position: absolute;
  left: 7px;
  top: 14px;
  width: 17px;
  height: 4px;
  background: var(--blue);
  border-radius: 999px;
}

.position-plane::before,
.position-plane::after {
  content: "";
  position: absolute;
  background: var(--blue);
  border-radius: 999px;
}

.position-plane::before {
  left: 7px;
  top: -7px;
  width: 4px;
  height: 18px;
}

.position-plane::after {
  right: -4px;
  top: -2px;
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.stat {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.stat:last-child { border-right: 0; }

.stat-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 3px;
}

.stat-value {
  font-weight: 740;
  font-size: 15px;
}

.empty {
  padding: 22px;
}

@media (max-width: 760px) {
  .topbar-inner { height: auto; min-height: 60px; flex-wrap: wrap; padding: 12px 16px; }
  .nav { margin-left: 0; width: 100%; }
  .page { padding: 20px 16px 40px; }
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .flight-grid { grid-template-columns: 1fr; }
  .flight-row { grid-template-columns: 72px 1fr; }
  .flight-row .status { grid-column: 2; justify-self: start; }
  .timeline { grid-template-columns: 1fr; }
  .stop--end { text-align: left; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2n) { border-right: 0; }
}
