:root {
  color-scheme: light;
  --ink: #19233a;
  --muted: #788196;
  --faint: #a6adbc;
  --line: #e9ebf0;
  --surface: #ffffff;
  --canvas: #f7f8fa;
  --accent: #f07838;
  --accent-dark: #dd6427;
  --navy: #1d2943;
  --green: #27a87b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-size: 14px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 2;
  display: flex;
  width: 246px;
  flex-direction: column;
  padding: 27px 17px 20px;
  color: #fff;
  background: var(--navy);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 0 9px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
}

.brand-name {
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.7px;
}

.brand-name span {
  color: #ff9a61;
}

.sidebar-label {
  margin: 51px 10px 14px;
  color: #8993aa;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.15px;
  text-transform: uppercase;
}

.main-nav {
  display: grid;
  gap: 5px;
}

.nav-link {
  display: flex;
  min-height: 45px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  padding: 0 11px;
  color: #c6ccda;
  background: transparent;
  text-align: left;
  transition: background 160ms ease, color 160ms ease;
}

.nav-link:hover {
  color: #fff;
  background: #293650;
}

.nav-link.is-active {
  color: #fff;
  background: #2a3752;
  box-shadow: inset 3px 0 var(--accent);
}

.nav-icon {
  display: inline-grid;
  width: 20px;
  place-items: center;
  color: #ff9a61;
  font-size: 18px;
  font-weight: 600;
}

.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  border-top: 1px solid #34405a;
  padding: 19px 6px 0;
  color: #adb5c6;
  font-size: 11px;
}

.connection-dot,
.topbar-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #36bf8d;
  box-shadow: 0 0 0 3px rgb(54 191 141 / 13%);
}

.main-content {
  min-height: 100vh;
  margin-left: 246px;
  padding: 0 48px;
}

.topbar {
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.breadcrumb {
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb span {
  margin: 0 8px;
  color: #bdc2cd;
}

.topbar-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #69748a;
  font-size: 11px;
}

.topbar-dot {
  width: 6px;
  height: 6px;
}

.page-heading {
  position: relative;
  display: flex;
  min-height: 166px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--accent-dark);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 7px;
  font-family: inherit;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1.1px;
}

.page-description {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.heading-illustration {
  position: relative;
  width: 185px;
  height: 90px;
  margin-right: 35px;
  opacity: 0.8;
}

.illustration-line {
  position: absolute;
  top: 47px;
  left: 2px;
  width: 175px;
  border-top: 1px dashed #f4b08b;
  transform: rotate(-9deg);
}

.illustration-box {
  position: absolute;
  top: 23px;
  left: 73px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #ffd5bd;
  border-radius: 11px;
  color: var(--accent);
  background: #fff4ee;
  font-family: inherit;
  font-weight: 800;
  transform: rotate(-8deg);
}

.illustration-dot {
  position: absolute;
  top: 35px;
  right: 1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f4b08b;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 18px;
  border: 1px solid #f3d8a4;
  border-radius: 9px;
  padding: 13px 15px;
  color: #765720;
  background: #fffaf0;
}

.notice[hidden],
.view-panel[hidden] {
  display: none;
}

.notice-icon {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #d4a03e;
  font-size: 12px;
  font-weight: 700;
}

.notice strong {
  font-size: 12px;
}

.notice p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.55;
}

.notice code {
  border-radius: 4px;
  padding: 1px 4px;
  background: #f7eddb;
  font-size: 11px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 236px;
  align-items: start;
  gap: 22px;
}

.primary-column,
.side-column {
  min-width: 0;
}

.card,
.help-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 3px 12px rgb(29 41 67 / 3%);
}

.search-card {
  padding: 23px 24px;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.heading-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: var(--accent);
  background: #fff2eb;
  font-size: 21px;
}

.card-heading h2 {
  margin: 2px 0 4px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.card-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.tracking-form {
  margin-top: 26px;
}

.tracking-form label,
.form-field label {
  display: block;
  margin-bottom: 8px;
  color: #3e485d;
  font-size: 11px;
  font-weight: 600;
}

.form-field label span {
  color: var(--accent-dark);
}

.input-action {
  display: flex;
  gap: 9px;
}

input,
textarea {
  width: 100%;
  border: 1px solid #e1e4eb;
  border-radius: 7px;
  outline: 0;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input {
  min-height: 41px;
}

input::placeholder,
textarea::placeholder {
  color: #b1b7c3;
}

input:focus,
textarea:focus {
  border-color: #f2a174;
  box-shadow: 0 0 0 3px rgb(240 120 56 / 11%);
}

.input-action input {
  min-width: 100px;
}

.button {
  display: inline-flex;
  min-height: 41px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border: 0;
  border-radius: 7px;
  padding: 0 15px;
  font-size: 11px;
  font-weight: 700;
  transition: background 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.button-primary {
  color: #fff;
  background: var(--accent);
}

.button-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.field-hint {
  display: block;
  margin: 7px 0 0;
  color: #9aa2b1;
  font-size: 10px;
}

.inline-feedback {
  margin-top: 16px;
  border-radius: 7px;
  padding: 11px 13px;
  font-size: 12px;
  line-height: 1.5;
}

.inline-feedback[hidden] {
  display: none;
}

.inline-feedback.is-error {
  color: #a33a38;
  background: #fff1f0;
}

.inline-feedback.is-success {
  color: #187754;
  background: #edfaf4;
}

.help-card {
  padding: 21px 18px;
}

.help-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: #6380b8;
  background: #edf2fc;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
}

.help-card h3 {
  margin: 14px 0 7px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
}

.help-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.help-divider {
  height: 1px;
  margin: 14px 0 12px;
  background: var(--line);
}

.help-card .help-small {
  color: #9aa2b1;
  font-size: 10px;
}

.install-card {
  margin-bottom: 12px;
}

.install-icon {
  color: #fff;
  background: var(--accent);
}

.install-button {
  width: 100%;
  min-height: 38px;
  margin-top: 13px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

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

.install-instructions {
  margin-top: 12px;
  border-radius: 7px;
  padding: 10px;
  background: #f5f6f9;
}

.install-instructions p {
  margin: 0;
  color: #647087;
  font-size: 10px;
  line-height: 1.6;
}

.secure-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 13px 5px;
  color: #8a93a4;
}

.secure-note span {
  color: #65b996;
  font-size: 16px;
  line-height: 1;
}

.secure-note p {
  margin: 0;
  font-size: 10px;
  line-height: 1.45;
}

.results-area {
  margin-top: 17px;
}

.result-card {
  padding: 21px 24px;
  animation: appear 220ms ease-out;
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #f0f1f4;
  padding-bottom: 16px;
}

.result-header .eyebrow {
  margin-bottom: 5px;
  font-size: 8px;
}

.result-header h2 {
  margin: 0;
  font-family: inherit;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.result-count {
  border-radius: 20px;
  padding: 5px 9px;
  color: #6d7890;
  background: #f4f5f8;
  font-size: 10px;
  white-space: nowrap;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 19px 0 0;
  list-style: none;
}

.timeline::before {
  position: absolute;
  top: 29px;
  bottom: 17px;
  left: 6px;
  width: 1px;
  background: #e8eaf0;
  content: "";
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 13px;
  padding: 0 0 19px;
}

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

.timeline-marker {
  z-index: 1;
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  margin-top: 2px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--status-color, var(--accent));
  box-shadow: 0 0 0 1px var(--status-color, var(--accent));
}

.timeline-content {
  min-width: 0;
  flex: 1;
}

.timeline-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.timeline-status-row h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.status-detail {
  border-radius: 4px;
  padding: 3px 6px;
  color: #758096;
  background: #f4f5f8;
  font-size: 9px;
  white-space: nowrap;
}

.timeline-time {
  display: block;
  margin-top: 5px;
  color: #959dad;
  font-size: 10px;
}

.empty-history {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 42px;
  border-top: 1px solid var(--line);
  padding: 17px 0 22px;
  color: #a4aab6;
  font-size: 10px;
}

.footer span:first-child {
  color: #707b8e;
  font-weight: 700;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1500px) {
  .main-content {
    padding-right: max(48px, calc((100vw - 1350px) / 2));
    padding-left: max(48px, calc((100vw - 1350px) / 2));
  }
}

@media (max-width: 1050px) {
  .main-content {
    padding: 0 30px;
  }

  .content-grid {
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 16px;
  }

  .heading-illustration {
    margin-right: 5px;
  }
}

@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: calc(13px + env(safe-area-inset-top, 0px)) 17px 10px;
  }

  .brand {
    padding: 0;
  }

  .sidebar-label,
  .sidebar-bottom {
    display: none;
  }

  .main-nav {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 14px;
  }

  .nav-link {
    min-height: 39px;
    justify-content: center;
    gap: 7px;
    padding: 0 8px;
    font-size: 11px;
  }

  .nav-link.is-active {
    box-shadow: inset 0 -2px var(--accent);
  }

  .nav-icon {
    width: auto;
    font-size: 16px;
  }

  .main-content {
    margin-left: 0;
    padding: 0 20px calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .topbar {
    height: 49px;
  }

  .page-heading {
    min-height: 139px;
  }

  h1 {
    font-size: 24px;
  }

  .heading-illustration {
    width: 125px;
    margin-right: 0;
    transform: scale(0.8);
    transform-origin: right center;
  }

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

  .side-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 10px;
  }

  .secure-note {
    padding: 16px 8px;
  }

  .footer {
    margin-top: 27px;
  }
}

@media (max-width: 500px) {
  .main-content {
    padding: 0 14px calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .page-heading {
    min-height: 128px;
  }

  .heading-illustration {
    position: absolute;
    right: -15px;
    bottom: 5px;
    opacity: 0.4;
    transform: scale(0.65);
  }

  .page-heading > div:first-child {
    position: relative;
    z-index: 1;
  }

  .page-description {
    max-width: 260px;
    font-size: 12px;
    line-height: 1.5;
  }

  .search-card,
  .result-card {
    padding: 18px 16px;
  }

  .input-action {
    flex-direction: column;
  }

  .input-action .button {
    width: 100%;
  }

  .side-column {
    grid-template-columns: 1fr;
  }

  .secure-note {
    padding: 6px 5px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
