:root {
  color-scheme: light;
  --ink: #17121f;
  --muted: #6f6879;
  --line: #e4ddea;
  --surface: #ffffff;
  --soft: #f7f3fb;
  --brand: #4d148c;
  --brand-dark: #35105f;
  --accent: #ff8a00;
  --accent-dark: #d36f00;
  --success: #147d4f;
  --danger: #b3261e;
  --shadow: 0 22px 70px rgba(37, 20, 58, 0.16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(115deg, rgba(77, 20, 140, 0.13), rgba(255, 138, 0, 0.10)),
    var(--soft);
  color: var(--ink);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--brand);
  font-size: 1.05rem;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 0.9rem;
  letter-spacing: 0;
  box-shadow: inset -10px 0 0 var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.main-nav a {
  border-radius: 8px;
  color: var(--ink);
  font-weight: 850;
  padding: 10px 12px;
  text-decoration: none;
}

.main-nav a:hover,
.nav-actions a:hover,
.ghost-button:hover {
  background: rgba(77, 20, 140, 0.08);
}

.nav-actions a,
.ghost-button,
.hero-link {
  border: 1px solid rgba(77, 20, 140, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--brand);
  cursor: pointer;
  font-weight: 850;
  padding: 10px 14px;
  text-decoration: none;
}

.hero-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 22px;
  border-color: rgba(255, 255, 255, 0.32);
  background: var(--accent);
  color: #25143a;
}

.hero-actions .hero-link,
.support-actions .hero-link {
  margin-top: 0;
}

.secondary-link {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  padding: 10px 14px;
  text-decoration: none;
}

.secondary-link.dark {
  border-color: var(--line);
  color: var(--brand);
}

.home-hero {
  background:
    linear-gradient(135deg, rgba(77, 20, 140, 0.96), rgba(37, 12, 66, 0.94)),
    var(--brand);
  color: #fff;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 28px;
  align-items: center;
  min-height: 520px;
  padding-top: 54px;
  padding-bottom: 54px;
}

.home-tracker {
  position: relative;
  z-index: 1;
}

.hero-actions,
.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.tracking-hero,
.admin-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 28px;
  align-items: end;
  padding: 34px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(77, 20, 140, 0.96), rgba(37, 12, 66, 0.94)),
    var(--brand);
  color: #fff;
  box-shadow: var(--shadow);
}

.admin-hero {
  grid-template-columns: 1fr;
  margin-bottom: 22px;
}

.tracking-hero::after,
.admin-hero::after {
  content: "";
  position: absolute;
  inset: auto -90px -130px auto;
  width: 360px;
  height: 360px;
  border: 28px solid rgba(255, 138, 0, 0.34);
  border-radius: 50%;
}

.hero-copy,
.admin-hero > div,
.tracker-panel {
  position: relative;
  z-index: 1;
}

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

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

h1 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(2.35rem, 6vw, 5.2rem);
  line-height: 0.92;
}

h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
}

.subcopy {
  max-width: 650px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.04rem;
  line-height: 1.6;
}

.admin-hero .subcopy,
.login-panel .subcopy {
  color: rgba(255, 255, 255, 0.78);
}

.tracker-panel,
.result,
.form-panel,
.shipments-panel,
.login-panel {
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 18px 50px rgba(28, 14, 42, 0.14);
}

.tracker-panel {
  padding: 24px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: -34px;
  position: relative;
  z-index: 5;
}

.action-tile {
  display: grid;
  gap: 9px;
  min-width: 0;
  min-height: 178px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(37, 20, 58, 0.13);
  color: var(--ink);
  padding: 20px;
  text-decoration: none;
}

.action-tile:hover {
  transform: translateY(-2px);
}

.tile-icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 950;
}

.action-tile small {
  color: var(--muted);
  line-height: 1.5;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 820;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 14px 15px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.16);
}

textarea {
  resize: vertical;
}

button,
.primary,
.created-code a {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #25143a;
  cursor: pointer;
  font-weight: 950;
  padding: 13px 17px;
  text-decoration: none;
}

button:hover,
.primary:hover,
.created-code a:hover {
  background: var(--accent-dark);
  color: #fff;
}

.message {
  margin-top: 14px;
  color: var(--success);
  font-weight: 850;
}

.message.error {
  color: var(--danger);
}

.service-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 18px 0 0;
}

.service-strip div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(37, 20, 58, 0.08);
}

.service-strip strong {
  color: var(--brand);
  font-size: 1.3rem;
}

.service-strip span {
  color: var(--muted);
  font-weight: 700;
}

.content-band {
  margin-top: 34px;
  background: #fff;
  border-block: 1px solid var(--line);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 28px;
  align-items: start;
  padding-top: 54px;
  padding-bottom: 54px;
}

.split-section h2,
.info-section h2,
.support-section h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
}

.split-section p,
.support-section p {
  color: var(--muted);
  line-height: 1.65;
}

.support-section a {
  color: var(--brand);
  font-weight: 900;
}

.feature-grid,
.service-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.feature-grid article,
.service-cards article,
.coverage-panel,
.support-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(37, 20, 58, 0.08);
}

.feature-grid article {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.feature-grid span {
  color: var(--muted);
  line-height: 1.5;
}

.info-section {
  padding-top: 54px;
  padding-bottom: 54px;
}

.coverage-panel {
  margin-top: 20px;
  padding: 22px;
}

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

.location-grid article {
  display: grid;
  gap: 8px;
  min-width: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(77, 20, 140, 0.08), rgba(255, 138, 0, 0.10));
  padding: 16px;
}

.location-grid span {
  color: var(--muted);
  line-height: 1.45;
}

.coverage-form {
  display: grid;
  gap: 10px;
}

.service-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 54px;
  padding-bottom: 54px;
}

.service-cards article {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 22px;
}

.service-cards h3 {
  margin: 0;
  font-size: 1.35rem;
}

.service-cards p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.service-cards a {
  color: var(--brand);
  font-weight: 900;
}

.support-section {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
  margin-bottom: 48px;
  padding: 28px;
}

.site-footer {
  background: #1c1128;
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, minmax(0, 0.7fr));
  gap: 24px;
  padding-top: 42px;
  padding-bottom: 42px;
}

.footer-grid div {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-grid a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.footer-grid p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.footer-brand {
  color: #fff;
}

.result {
  margin-top: 22px;
  overflow: hidden;
}

.result-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(77, 20, 140, 0.08), rgba(255, 138, 0, 0.09));
}

.current-location {
  display: inline-block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.code-pill {
  align-self: flex-start;
  max-width: 100%;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 950;
  overflow-wrap: anywhere;
  padding: 12px 14px;
}

.shipment-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-bottom: 1px solid var(--line);
}

.shipment-grid div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.shipment-grid div:last-child {
  border-right: 0;
}

.shipment-grid span,
.shipment-item span,
.shipment-item small,
.timeline span,
.timeline time,
.section-title span {
  color: var(--muted);
  font-size: 0.88rem;
}

.shipment-grid strong {
  overflow-wrap: anywhere;
}

.progress-panel {
  padding: 24px 26px 8px;
  border-bottom: 1px solid var(--line);
}

.progress-title {
  margin-bottom: 16px;
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.progress-steps li {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 92px;
  min-width: 0;
  align-content: center;
  padding: 16px 18px 16px 24px;
  background: #f1ebf7;
  color: var(--muted);
}

.progress-steps li::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  right: -24px;
  width: 48px;
  height: 100%;
  background: inherit;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 100%, 50% 50%, 0 0);
}

.progress-steps li:last-child::after {
  display: none;
}

.progress-steps li.complete {
  background: var(--brand);
  color: #fff;
}

.progress-steps li.active {
  background: var(--accent);
  color: #25143a;
}

.progress-steps li.pending {
  background: #f1ebf7;
}

.step-marker {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.84);
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 950;
}

.progress-steps li.pending .step-marker {
  background: #fff;
  color: var(--muted);
}

.progress-steps strong {
  position: relative;
  z-index: 3;
  font-size: 0.93rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 8px 26px 26px;
}

.timeline li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  padding: 18px 0 0;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border: 3px solid var(--brand);
  border-radius: 50%;
  background: var(--accent);
}

.timeline p {
  margin: 6px 0;
  color: var(--ink);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
  gap: 20px;
}

.form-panel,
.shipments-panel {
  padding: 22px;
}

.form-panel {
  display: grid;
  gap: 16px;
}

.section-title {
  display: grid;
  gap: 5px;
}

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

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

.order-hero {
  margin-bottom: 22px;
}

.order-form {
  max-width: 980px;
  margin: 0 auto;
}

.account-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.customer-dashboard {
  grid-column: 1 / -1;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.customer-orders {
  display: grid;
  gap: 12px;
}

.customer-order-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.customer-order-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.customer-order-card strong,
.customer-order-card span,
.customer-order-card small {
  overflow-wrap: anywhere;
}

.customer-order-card span,
.customer-order-card small {
  color: var(--muted);
}

.customer-identity {
  display: inline-flex;
  width: fit-content;
  margin-top: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 850;
  padding: 10px 12px;
}

.form-actions,
.shipment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary {
  width: fit-content;
}

.created-code {
  display: grid;
  gap: 9px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(77, 20, 140, 0.08), rgba(255, 138, 0, 0.12));
  padding: 15px;
}

.created-code strong {
  color: var(--brand);
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}

.created-code a {
  width: fit-content;
  font-size: 0.92rem;
}

.panel-head,
.shipment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head {
  margin-bottom: 16px;
}

.panel-head h2 {
  font-size: 1.2rem;
}

.shipment-list {
  display: grid;
  gap: 10px;
}

.shipment-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.shipment-item > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.shipment-item strong,
.shipment-item span,
.shipment-item small {
  overflow-wrap: anywhere;
}

.shipment-item button,
.panel-head button,
.ghost-button {
  padding: 9px 12px;
}

.empty {
  color: var(--muted);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(77, 20, 140, 0.96), rgba(37, 12, 66, 0.94)),
    var(--brand);
}

.login-panel {
  display: grid;
  gap: 22px;
  width: min(460px, 100%);
  padding: 28px;
  background: rgba(255, 255, 255, 0.98);
}

.login-panel h1 {
  color: var(--brand);
  font-size: clamp(2rem, 8vw, 3.2rem);
}

.login-panel .subcopy {
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 14px;
}

@media (max-width: 900px) {
  .header-shell,
  .hero-grid,
  .tracking-hero,
  .admin-layout,
  .account-layout,
  .shipment-grid,
  .progress-steps,
  .quick-actions,
  .split-section,
  .feature-grid,
  .service-cards,
  .location-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .main-nav {
    justify-content: start;
    flex-wrap: wrap;
  }

  .quick-actions {
    margin-top: 18px;
  }

  .progress-steps li::after {
    display: none;
  }

  .shipment-grid div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .shipment-grid div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 22px, 1180px);
    padding-top: 14px;
  }

  .topbar,
  .result-header,
  .panel-head,
  .customer-order-card,
  .support-section {
    align-items: stretch;
    flex-direction: column;
  }

  .tracking-hero,
  .admin-hero {
    padding: 22px;
  }

  .search-row,
  .two-col,
  .three-col,
  .service-strip {
    grid-template-columns: 1fr;
  }

  .primary,
  .search-row button,
  .nav-actions,
  .nav-actions a,
  .ghost-button,
  .hero-link,
  .form-actions button,
  .dashboard-actions a,
  .dashboard-actions button,
  .customer-order-card a,
  .shipment-actions,
  .shipment-actions button {
    width: 100%;
  }
}
