:root {
  --orange: #ff6a1a;
  --orange-deep: #e2570d;
  --navy: #0d1526;
  --ink: #1c2434;
  --muted: #667085;
  --line: #e7eaf0;
  --paper: #f6f4f0;
  --white: #ffffff;
  --ok: #0f9f6e;
  --warn: #d97706;
  --blue: #2563eb;
  --shadow: 0 18px 50px rgba(13, 21, 38, 0.08);
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

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

.topbar {
  background: var(--navy);
  color: #d7dde8;
  font-size: 13px;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 36px;
  gap: 12px;
}
.topbar a { color: #fff; }
.topbar span { opacity: .85; }

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  font-size: 20px;
}
.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff8a3d, var(--orange-deep));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(255,106,26,.28);
}
.nav { display: flex; gap: 22px; margin-left: 8px; flex: 1; }
.nav a { color: #344054; font-weight: 600; font-size: 15px; }
.nav a.active, .nav a:hover { color: var(--orange); }
.nav-auth { display: none; }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  transition: .2s ease;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover { background: #f2f4f7; }
.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255,106,26,.25);
}
.btn-primary:hover { background: var(--orange-deep); }
.btn-dark {
  background: var(--navy);
  color: #fff;
}
.btn-dark:hover { filter: brightness(1.1); }
.btn-outline {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-block { width: 100%; height: 48px; border-radius: 12px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.hero {
  position: relative;
  min-height: 560px;
  color: #fff;
  overflow: hidden;
  background: #0d1526;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8,12,22,.78) 0%, rgba(8,12,22,.45) 48%, rgba(8,12,22,.18) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: 88px 0 72px;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  margin-bottom: 18px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: .02em;
}
.hero p.lead {
  margin: 0 0 28px;
  max-width: 540px;
  color: #e8edf5;
  font-size: 17px;
}
.track-box {
  background: #fff;
  color: var(--ink);
  border-radius: 18px;
  padding: 10px;
  display: flex;
  gap: 8px;
  max-width: 640px;
  box-shadow: var(--shadow);
}
.track-box input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 14px 16px;
  font-size: 16px;
  background: transparent;
}
.track-hint {
  margin-top: 12px;
  color: #d5dbe6;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.track-hint b { color: #fff; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: -38px;
  position: relative;
  z-index: 2;
}
.stat {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 28px; color: var(--orange); }
.stat span { color: var(--muted); font-size: 14px; }

.section { padding: 72px 0; }
.section h2 {
  margin: 0 0 8px;
  font-size: 32px;
  letter-spacing: .02em;
}
.sub { color: var(--muted); margin: 0 0 28px; }
.grid-3, .grid-4 { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid #eeeae4;
}
.card img { height: 180px; width: 100%; object-fit: cover; }
.card-body { padding: 18px 18px 20px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }

.features {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
  align-items: stretch;
}
.feature-copy {
  background: var(--navy);
  color: #fff;
  border-radius: 22px;
  padding: 42px;
  min-height: 360px;
}
.feature-copy h2 { color: #fff; }
.feature-copy p { color: #c9d2e0; }
.checklist { list-style: none; padding: 0; margin: 22px 0 0; }
.checklist li {
  padding: 10px 0 10px 28px;
  position: relative;
  color: #e8edf5;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 16px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255,106,26,.18);
}
.feature-photo {
  border-radius: 22px;
  overflow: hidden;
  min-height: 360px;
}
.feature-photo img { width: 100%; height: 100%; object-fit: cover; }

.promise {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.promise-item {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  border: 1px solid var(--line);
}
.promise-item strong { display: block; margin-bottom: 4px; }
.promise-item span { color: var(--muted); font-size: 13px; }

.auth-page {
  min-height: calc(100vh - 180px);
  display: grid;
  place-items: center;
  padding: 48px 16px;
  background:
    linear-gradient(180deg, rgba(13,21,38,.55), rgba(13,21,38,.55)),
    url("/images/freight.jpg") center/cover no-repeat;
}
.auth-card {
  width: min(460px, 100%);
  background: #fff;
  border-radius: 22px;
  padding: 32px 28px 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
}
.auth-card h1 { margin: 0 0 6px; font-size: 26px; }
.auth-card .sub { margin-bottom: 22px; }
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f2f4f7;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
}
.tabs button {
  border: 0;
  background: transparent;
  height: 40px;
  border-radius: 10px;
  font-weight: 700;
  color: var(--muted);
}
.tabs button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(16,24,40,.08);
}
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  outline: none;
  background: #fff;
}
.field textarea { height: 90px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255,106,26,.12);
}
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-row .btn { flex: 0 0 132px; border-radius: 12px; height: 46px; }
.form-error {
  display: none;
  background: #fff1f0;
  color: #c43131;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}
.form-error.show { display: block; }
.switch-auth { text-align: center; margin-top: 16px; color: var(--muted); font-size: 14px; }
.switch-auth a { color: var(--orange); font-weight: 700; }

.sms-toast {
  position: fixed;
  top: 88px;
  right: 18px;
  width: min(320px, calc(100% - 24px));
  background: rgba(18,18,20,.94);
  color: #fff;
  border-radius: 18px;
  padding: 14px 16px;
  display: none;
  z-index: 80;
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
}
.sms-toast.show { display: block; animation: slidein .35s ease; }
.sms-toast small { color: #b8bcc8; }
.sms-toast b { color: #ffd7bf; letter-spacing: .12em; font-size: 18px; }
@keyframes slidein {
  from { transform: translateY(-12px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.track-result { padding: 48px 0 80px; }
.waybill {
  background: #fff;
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.waybill-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 18px;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.badge.in_transit, .badge.picked { background: #fff4e8; color: #c2410c; }
.badge.delivering { background: #eef4ff; color: #1d4ed8; }
.badge.delivered { background: #e9f8f1; color: #047857; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  position: relative;
  padding: 0 0 22px 22px;
  border-left: 2px solid #efe7de;
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -6px; top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #d0d5dd;
}
.timeline li:first-child::before { background: var(--orange); }
.timeline time { display: block; color: var(--muted); font-size: 12px; }

.account-hero {
  background: var(--navy);
  color: #fff;
  padding: 36px 0;
}
.account-hero h1 { margin: 0 0 6px; }
.muted { color: var(--muted); }
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}
.table th, .table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.table th { background: #fafafa; color: var(--muted); font-weight: 700; }
.empty {
  background: #fff;
  border-radius: 16px;
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}

.footer {
  background: #0b1220;
  color: #b8c0ce;
  padding: 48px 0 24px;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}
.footer h4 { color: #fff; margin: 0 0 12px; }
.footer a, .footer span { display: block; margin: 6px 0; color: #b8c0ce; }
.footer a:hover { color: #fff; }
.copy {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 16px;
  font-size: 13px;
  line-height: 1.7;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.info-table th, .info-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 14px;
}
.info-table th {
  width: 140px;
  background: #fafafa;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}
.license {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.license img {
  width: 100%;
  border-radius: 10px;
}

.menu-btn { display: none; }

@media (max-width: 900px) {
  .topbar .hide-m { display: none; }
  .menu-btn { display: inline-flex; }
  .header .wrap { height: 64px; position: relative; }
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 8px 16px 16px;
    border-bottom: 1px solid var(--line);
    gap: 4px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 4px; }
  .nav-auth { display: block; }
  .header-actions .btn:not(.menu-btn) { display: none; }
  .stats, .grid-3, .grid-4, .promise, .footer-grid, .features {
    grid-template-columns: 1fr;
  }
  .hero { min-height: 480px; }
  .track-box { flex-direction: column; }
  .waybill-head { flex-direction: column; }
  .table { display: block; overflow-x: auto; }
  .auth-card { padding: 24px 18px; }
  .info-table th { width: 96px; white-space: normal; }
}
