:root {
  color: #342d32;
  background: #fbf8f3;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #342d32;
  --muted: #786f73;
  --soft: #a59b9f;
  --paper: #fffefd;
  --cream: #f7f2e9;
  --cream-deep: #eee4d8;
  --sage: #7d826a;
  --sage-dark: #5e6550;
  --sage-soft: #e9ebdf;
  --rose: #d68f98;
  --rose-dark: #b86f79;
  --rose-soft: #f8e9eb;
  --eggplant: #4b3243;
  --line: rgba(75, 50, 67, 0.13);
  --shadow: 0 22px 65px rgba(67, 48, 57, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 45%, rgba(214, 143, 152, 0.09), transparent 28rem),
    #fbf8f3;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

.sr-only {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-header {
  height: 76px;
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 254, 253, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand img {
  width: 126px;
  height: auto;
  display: block;
}

.support-link {
  position: absolute;
  right: max(24px, calc((100vw - 1120px) / 2));
  color: var(--sage-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.support-link:hover {
  color: var(--rose-dark);
}

.hero {
  min-height: 400px;
  position: relative;
  overflow: hidden;
  padding: 70px 24px 60px;
  text-align: center;
}

.hero-glow {
  width: min(960px, 92vw);
  height: 560px;
  position: absolute;
  top: -300px;
  left: 50%;
  border-radius: 50%;
  background: rgba(214, 143, 152, 0.18);
  filter: blur(36px);
  transform: translateX(-50%);
}

.decor {
  width: 6px;
  height: 6px;
  position: absolute;
  border-radius: 50%;
  background: var(--rose);
  opacity: 0.28;
}

.decor-one {
  top: 110px;
  left: 8%;
}

.decor-two {
  top: 190px;
  right: 12%;
}

.decor-three {
  top: 370px;
  left: 23%;
}

.hero-content {
  max-width: 1120px;
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--rose-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

h1 {
  max-width: none;
  margin-right: auto;
  margin-bottom: 14px;
  margin-left: auto;
  color: var(--eggplant);
  font-family: "Playfair Display", serif;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

h1 em {
  color: var(--rose-dark);
  font-style: normal;
}

.hero-copy {
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.mobile-only-break {
  display: none;
}

.tracking-form {
  max-width: 700px;
  min-height: 62px;
  display: flex;
  align-items: center;
  margin: 0 auto;
  padding: 6px 7px 6px 20px;
  border: 1px solid rgba(75, 50, 67, 0.16);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.tracking-form:focus-within {
  border-color: rgba(184, 111, 121, 0.65);
  box-shadow: 0 22px 65px rgba(67, 48, 57, 0.12), 0 0 0 4px rgba(214, 143, 152, 0.1);
}

.input-icon {
  width: 24px;
  height: 24px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--rose-dark);
}

.input-icon svg,
.tracking-form button svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tracking-form input {
  min-width: 0;
  flex: 1;
  padding: 13px 14px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.tracking-form input::placeholder {
  color: #9e9499;
}

.tracking-form button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 27px;
  border: 0;
  border-radius: 999px;
  background: var(--eggplant);
  color: white;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  transition: transform 160ms ease, background 160ms ease;
}

.tracking-form button:hover {
  background: var(--rose-dark);
  transform: translateY(-1px);
}

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

.form-help {
  margin: 11px 0 0;
  color: var(--soft);
  font-size: 12px;
}

.form-message {
  min-height: 18px;
  margin: 7px 0 0;
  color: #a24e59;
  font-size: 13px;
  font-weight: 600;
}

.intro-grid,
.results,
.state-card {
  width: min(1080px, calc(100% - 40px));
  margin-right: auto;
  margin-left: auto;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-bottom: 90px;
}

.intro-grid article {
  min-height: 190px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 254, 253, 0.82);
  box-shadow: 0 15px 42px rgba(67, 48, 57, 0.055);
}

.feature-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 21px;
  border-radius: 14px;
  background: var(--sage-soft);
  color: var(--sage-dark);
  font-family: "Playfair Display", serif;
  font-size: 14px;
  font-weight: 700;
}

.intro-grid h2 {
  margin-bottom: 8px;
  color: var(--eggplant);
  font-family: "Playfair Display", serif;
  font-size: 19px;
}

.intro-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.state-card {
  max-width: 720px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: -22px;
  margin-bottom: 75px;
  padding: 25px 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.state-card[hidden],
.results[hidden] {
  display: none;
}

.state-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--eggplant);
  font-family: "Playfair Display", serif;
  font-size: 18px;
}

.state-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.loader {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 3px solid var(--rose-soft);
  border-top-color: var(--rose-dark);
  border-radius: 50%;
  animation: spin 850ms linear infinite;
}

.state-icon {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: var(--rose-soft);
  color: var(--rose-dark);
  font-family: "Playfair Display", serif;
  font-size: 20px;
  font-weight: 700;
}

.results {
  padding: 0 0 90px;
}

.results-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.results-heading .eyebrow {
  margin-bottom: 7px;
}

.results-heading h2 {
  margin-bottom: 0;
  color: var(--eggplant);
  font-family: "Playfair Display", serif;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
}

.cache-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.secondary-button {
  padding: 11px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 700;
}

.secondary-button:hover {
  border-color: rgba(184, 111, 121, 0.45);
  color: var(--rose-dark);
}

.order-list {
  display: grid;
  gap: 20px;
}

.order-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.order-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(110deg, rgba(233, 235, 223, 0.75), rgba(248, 233, 235, 0.55));
}

.order-reference {
  margin-bottom: 3px;
  color: var(--soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.order-date {
  display: inline-flex;
  margin: 0 0 7px;
  padding: 5px 9px;
  border: 1px solid rgba(184, 111, 121, 0.25);
  border-radius: 999px;
  background: rgba(255, 254, 253, 0.8);
  color: var(--rose-dark);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.order-topbar h3 {
  margin: 0;
  color: var(--eggplant);
  font-family: "Playfair Display", serif;
  font-size: 21px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  background: white;
  color: var(--sage-dark);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 7px 20px rgba(67, 48, 57, 0.07);
}

.status-pill::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  content: "";
}

.status-pill[data-status="DELIVERED"] {
  color: #497254;
}

.status-pill[data-status="EXCEPTION"],
.status-pill[data-status="DELIVERY_ATTEMPT"] {
  color: #aa5a48;
}

.shipment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding: 28px;
}

.shipment + .shipment {
  border-top: 1px solid var(--line);
}

.shipment-main {
  min-width: 0;
}

.shipment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.carrier-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.carrier-symbol {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(184, 111, 121, 0.18);
  border-radius: 11px;
  background: var(--rose-soft);
  color: var(--rose-dark);
  font-size: 10px;
}

.tracking-code {
  color: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  text-align: right;
}

.tracking-code strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 12px;
}

.current-status {
  margin-bottom: 25px;
}

.current-status h4 {
  margin: 0 0 7px;
  color: var(--eggplant);
  font-family: "Playfair Display", serif;
  font-size: clamp(23px, 3vw, 31px);
}

.current-status p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.progress-track {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin: 31px 0 10px;
}

.progress-step {
  position: relative;
  padding-top: 19px;
  color: #aba2a6;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
}

.progress-step::before {
  width: 11px;
  height: 11px;
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: #d8d2d4;
  box-shadow: 0 0 0 1px #d8d2d4;
  content: "";
  transform: translateX(-50%);
}

.progress-step::after {
  height: 2px;
  position: absolute;
  top: 5px;
  right: 50%;
  left: -50%;
  background: #ded8da;
  content: "";
}

.progress-step:first-child::after {
  display: none;
}

.progress-step.done,
.progress-step.current {
  color: var(--sage-dark);
}

.progress-step.done::before,
.progress-step.current::before {
  background: var(--sage);
  box-shadow: 0 0 0 1px var(--sage);
}

.progress-step.done::after,
.progress-step.current::after {
  background: var(--sage);
}

.progress-step.current::before {
  box-shadow: 0 0 0 1px var(--sage), 0 0 0 6px rgba(125, 130, 106, 0.15);
}

.shipment-side {
  display: grid;
  align-content: start;
  gap: 12px;
}

.info-card {
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fcfaf6;
}

.info-card.primary {
  border-color: rgba(125, 130, 106, 0.2);
  background: var(--sage-soft);
}

.info-card span {
  display: block;
  margin-bottom: 5px;
  color: var(--soft);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.info-card strong {
  display: block;
  color: var(--eggplant);
  font-size: 13px;
  line-height: 1.45;
}

.timeline-title {
  margin: 32px 0 16px;
  color: var(--soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.event {
  position: relative;
  padding: 0 0 22px 28px;
}

.event::before {
  width: 9px;
  height: 9px;
  position: absolute;
  z-index: 2;
  top: 4px;
  left: 1px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: #c8c0c3;
  box-shadow: 0 0 0 1px #c8c0c3;
  content: "";
}

.event::after {
  width: 1px;
  position: absolute;
  top: 15px;
  bottom: 0;
  left: 5px;
  background: var(--line);
  content: "";
}

.event:first-child::before {
  background: var(--rose-dark);
  box-shadow: 0 0 0 1px var(--rose-dark), 0 0 0 5px var(--rose-soft);
}

.event:last-child::after {
  display: none;
}

.event strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 13px;
}

.event p,
.event time {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.source-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 4px 0 0;
  color: var(--soft);
  font-size: 10px;
}

.source-note::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #63a071;
  content: "";
}

.help-button {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.help-button {
  background: var(--eggplant);
  color: white;
}

.preparing-card {
  padding: 40px 28px;
  color: var(--muted);
  text-align: center;
}

.preparing-card strong {
  display: block;
  margin-bottom: 7px;
  color: var(--eggplant);
  font-family: "Playfair Display", serif;
  font-size: 21px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 25px max(24px, calc((100vw - 1080px) / 2));
  border-top: 1px solid var(--line);
  background: rgba(255, 254, 253, 0.65);
  color: var(--soft);
  font-size: 10px;
}

footer p {
  margin-bottom: 0;
}

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

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

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

  .source-note,
  .help-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .site-header {
    height: 68px;
    justify-content: flex-start;
    padding: 0 20px;
  }

  .brand img {
    width: 112px;
  }

  .support-link {
    right: 20px;
    font-size: 11px;
  }

  .hero {
    min-height: 440px;
    padding: 54px 18px 44px;
  }

  h1 {
    font-size: clamp(32px, 10.2vw, 42.5px);
    white-space: normal;
  }

  h1 em,
  .mobile-only-break {
    display: block;
  }

  .hero-copy {
    font-size: 15px;
  }

  .tracking-form {
    min-height: 58px;
    padding-left: 16px;
  }

  .tracking-form input {
    padding-right: 8px;
    padding-left: 10px;
    font-size: 15px;
  }

  .tracking-form button {
    min-width: 50px;
    min-height: 46px;
    padding: 0 15px;
  }

  .tracking-form button span {
    display: none;
  }

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

  .intro-grid article {
    min-height: auto;
  }

  .results-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .order-topbar,
  .shipment {
    padding: 21px;
  }

  .order-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .shipment-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tracking-code {
    text-align: left;
  }

  .progress-step {
    font-size: 8px;
  }

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

  .source-note,
  .help-button {
    grid-column: auto;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .support-link {
    max-width: 75px;
    line-height: 1.2;
    text-align: right;
  }

  .intro-grid,
  .results,
  .state-card {
    width: min(100% - 28px, 1080px);
  }

  .progress-step span {
    display: none;
  }

}

@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;
  }
}

.admin-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 15%, rgba(214, 143, 152, 0.18), transparent 30rem),
    #fbf8f3;
}

.admin-shell {
  min-height: calc(100vh - 76px);
  display: grid;
  padding: 48px 20px;
  place-items: center;
}

.admin-card {
  width: min(560px, 100%);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.admin-card h1 {
  margin-bottom: 14px;
  font-size: clamp(34px, 7vw, 48px);
  text-align: left;
}

.admin-copy {
  margin-bottom: 28px;
  color: var(--muted);
  line-height: 1.65;
}

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

.admin-form label {
  color: var(--eggplant);
  font-size: 12px;
  font-weight: 700;
}

.admin-form input {
  min-width: 0;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

.admin-form input:focus {
  border-color: var(--rose-dark);
  box-shadow: 0 0 0 4px rgba(214, 143, 152, 0.12);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.admin-actions button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--eggplant);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.admin-actions .secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--sage-dark);
}

.admin-actions button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.admin-message {
  min-height: 24px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.admin-message[data-kind="success"] {
  color: #497254;
}

.admin-message[data-kind="error"] {
  color: #a24e59;
}

.admin-integration {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.admin-integration h2 {
  margin: 0 0 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.45rem;
}

.admin-integration > p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 520px) {
  .admin-card {
    padding: 28px 22px;
  }

  .admin-actions {
    display: grid;
  }
}
