/* ===========================================================
   TRACKING PLATFORM — page-specific components.
   Base styles, buttons, utility bar, header/nav and footer come
   from shared.css, which the corporate website also loads. That
   is what keeps the two looking like one product.
   =========================================================== */

/* ---------- SEARCH ---------- */
.search-hero {
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy) 55%, var(--navy-700) 100%);
  color: #fff; position: relative; overflow: hidden;
}
.search-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(45deg,
    rgba(255,255,255,.03) 0 1px, transparent 1px 44px);
}
.search-in {
  position: relative; z-index: 2; text-align: center;
  padding-block: clamp(44px, 7vw, 76px);
}
.search-in .eyebrow {
  display: inline-block; font-size: var(--fs-label); font-weight: 700;
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--red-300); margin-bottom: var(--s-3);
}
.search-in h1 { color: #fff; font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin-bottom: var(--s-3); }
.search-in > p { color: rgba(255,255,255,.78); max-width: 46ch; margin: 0 auto var(--s-6); }

/* One input, one button — the whole point of this screen. */
.search-form { display: flex; gap: var(--s-3); max-width: 560px; margin: 0 auto; }
.search-form input {
  flex: 1; min-width: 0; border: 2px solid transparent; border-radius: var(--r-pill);
  padding: 1em 1.5em; font-family: inherit; font-size: 1.06rem; color: var(--ink);
  background: #fff; transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.search-form input::placeholder { color: var(--muted); }
.search-form input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(227,30,36,.22); }
.search-form button {
  background: var(--red); color: #fff; font-weight: 700; font-size: 1rem;
  padding: 1em 2.1em; border-radius: var(--r-pill); box-shadow: var(--shadow-red);
  transition: transform var(--dur-fast), background var(--dur-fast); white-space: nowrap;
}
.search-form button:hover { background: var(--red-600); transform: translateY(-2px); }
.search-hint { margin-top: var(--s-4); font-size: var(--fs-sm); color: rgba(255,255,255,.6); }

/* ---------- RESULT ---------- */
.result { padding-block: clamp(34px, 5vw, 56px); }

.ship-card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden;
  margin-bottom: var(--s-5);
}
.ship-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-5); border-bottom: 1px solid var(--hairline); flex-wrap: wrap;
}
.ship-head .bill span {
  display: block; font-size: var(--fs-label); font-weight: 700;
  letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--muted);
}
.ship-head .bill b {
  font-family: var(--font-display); font-size: 1.75rem; color: var(--navy);
  letter-spacing: -.01em; display: block; margin-top: 2px;
}

/* Status carried by colour AND text, never colour alone. */
.pill {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: var(--fs-sm); font-weight: 700; padding: .5em 1em;
  border-radius: var(--r-pill); border: 1px solid transparent; white-space: nowrap;
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill-ok      { background: var(--ok-bg);     color: var(--ok);     border-color: #BFE6D2; }
.pill-info    { background: var(--info-bg);   color: var(--navy);   border-color: #C4D0EE; }
.pill-warn    { background: var(--warn-bg);   color: var(--warn);   border-color: #F0D9B5; }
.pill-bad     { background: var(--danger-bg); color: var(--red);    border-color: #F6C9CB; }
.pill-neutral { background: var(--surface-2); color: var(--muted);  border-color: var(--hairline); }

/* Fixed 3×2 rather than auto-fit: with six fields of uneven length, auto-fit
   leaves an orphan cell on its own row. A fixed grid always looks deliberate. */
.ship-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--hairline);
}
.ship-grid > div { background: var(--surface); padding: var(--s-4) var(--s-5); }
.ship-grid dt {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 4px;
}
.ship-grid dd { margin: 0; font-weight: 600; color: var(--ink); font-size: .98rem; }

/* ---------- PROGRESS ---------- */
.progress { padding: var(--s-5); border-top: 1px solid var(--hairline); }
.progress-track {
  position: relative; height: 6px; background: var(--surface-2);
  border-radius: 3px; margin: var(--s-6) 0 var(--s-3);
}
.progress-fill {
  position: absolute; inset: 0 auto 0 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--navy), var(--red));
  transition: width 1s var(--ease);
}
.progress-steps { display: flex; justify-content: space-between; }
.progress-steps span {
  font-size: var(--fs-xs); color: var(--muted); font-weight: 600;
  text-align: center; flex: 1;
}
.progress-steps span.done { color: var(--navy); }

/* ---------- TIMELINE ---------- */
.events-card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); overflow: hidden;
}
.events-head {
  padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--hairline);
  display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
}
.events-head h2 { font-size: 1.1rem; color: var(--navy); }
.events-meta { margin-left: auto; font-size: var(--fs-xs); color: var(--muted); }

.timeline { list-style: none; margin: 0; padding: var(--s-5) var(--s-5) var(--s-5) 0; }
.timeline li { position: relative; padding: 0 0 var(--s-5) 52px; }
.timeline li:last-child { padding-bottom: 0; }
/* the connecting rail */
.timeline li::before {
  content: ""; position: absolute; left: 25px; top: 16px; bottom: -6px; width: 2px;
  background: var(--hairline);
}
.timeline li:last-child::before { display: none; }
.timeline li .node {
  position: absolute; left: 18px; top: 4px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--surface); border: 3px solid var(--hairline);
}
/* newest event is the live one */
.timeline li:first-child .node { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 4px var(--red-50); }
.timeline .ev-desc { font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.timeline li:first-child .ev-desc { color: var(--navy); }
.timeline .ev-meta {
  font-size: var(--fs-sm); color: var(--muted);
  display: flex; gap: var(--s-4); flex-wrap: wrap;
}
.timeline .ev-meta span { display: inline-flex; align-items: center; gap: .4em; }
.timeline .ev-meta svg { width: 14px; height: 14px; opacity: .7; }

/* ---------- NOTICES / EMPTY STATES ---------- */
.notice {
  display: flex; gap: var(--s-4); align-items: flex-start;
  border-radius: var(--r-lg); padding: var(--s-5); margin-bottom: var(--s-5);
  border: 1px solid var(--hairline); background: var(--surface);
}
.notice svg { width: 26px; height: 26px; flex: none; }
.notice h2 { font-size: 1.12rem; margin-bottom: var(--s-2); }
.notice p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.notice p + p { margin-top: var(--s-2); }
.notice-warn { background: var(--warn-bg); border-color: #F0D9B5; }
.notice-warn svg { color: var(--warn); }
.notice-warn h2 { color: #7A4E0C; }
.notice-bad { background: var(--danger-bg); border-color: #F6C9CB; }
.notice-bad svg { color: var(--red); }
.notice-bad h2 { color: var(--navy); }
.notice-info { background: var(--info-bg); border-color: #C4D0EE; }
.notice-info svg { color: var(--navy); }
.notice-info h2 { color: var(--navy); }

.empty { text-align: center; padding: var(--s-8) var(--s-5); }
.empty .ico {
  width: 66px; height: 66px; margin: 0 auto var(--s-4); border-radius: 50%;
  background: var(--surface-2); color: var(--muted); display: grid; place-items: center;
}
.empty .ico svg { width: 30px; height: 30px; }
.empty h2 { color: var(--navy); margin-bottom: var(--s-2); }
.empty p { color: var(--muted); max-width: 46ch; margin: 0 auto var(--s-5); }


@media (max-width: 780px) {
  .ship-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .ship-grid { grid-template-columns: 1fr; }
  .search-form { flex-direction: column; }
  .ship-head .bill b { font-size: 1.45rem; }
  .progress-steps span { font-size: 10px; }
  .timeline { padding-right: var(--s-3); }
}
