:root {
  --bg: #f4f6fb;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbe3ef;
  --card: #ffffff;
  --navy: #0b1f3f;
  --navy-soft: #13294b;
  --accent: #ff6b4a;
  --accent-dark: #e04f2f;
  --teal: #0d9488;
  --teal-soft: #ecfdf8;
  --green: #059669;
  --green-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fff7ed;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(255, 107, 74, 0.08), transparent 28%),
    radial-gradient(circle at 10% 20%, rgba(13, 148, 136, 0.08), transparent 24%),
    var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 6%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #ff8f70);
  box-shadow: 0 12px 28px rgba(255, 107, 74, 0.28);
}

.brand-copy strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-copy small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.mainnav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 600;
}

.mainnav a:not(.btn) {
  padding: 8px 0;
  position: relative;
}

.mainnav a.is-active:not(.btn)::after,
.mainnav a:not(.btn):hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
}

.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(255, 107, 74, 0.22);
}

.btn.secondary {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.small { padding: 9px 14px; font-size: 0.88rem; }

.input,
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font: inherit;
  color: var(--ink);
}

textarea { min-height: 120px; resize: vertical; }

.input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.flash {
  padding: 0 6%;
}

.flash-inner {
  max-width: 1040px;
  margin: 14px auto 0;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 700;
}

.flash-success .flash-inner {
  background: var(--green-soft);
  color: #047857;
  border: 1px solid #a7f3d0;
}

.flash-error .flash-inner {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  padding: 72px 6% 52px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 800;
}

.hero h1 {
  margin: 18px 0 16px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.05rem;
}

.searchbox {
  margin-top: 24px;
  padding: 18px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-width: 640px;
}

.searchrow {
  display: flex;
  gap: 10px;
}

.trustrow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.trustrow span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: #475569;
  font-size: 0.88rem;
  font-weight: 700;
}

.hero-visual {
  position: relative;
  min-height: 360px;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--navy), var(--navy-soft));
  box-shadow: var(--shadow);
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 107, 74, 0.25), transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(13, 148, 136, 0.22), transparent 28%);
}

.scene-card {
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
}

.scene-card strong { font-family: "Space Grotesk", sans-serif; }

.scene-card p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
}

.mini-track {
  height: 8px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.mini-fill {
  width: 72%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  animation: fillmove 2.8s ease-in-out infinite;
}

.route-line {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  font-weight: 700;
}

.route-line span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.route-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
}

.route-dot.end { background: var(--accent); }

.truck-badge {
  position: absolute;
  right: 28px;
  bottom: 28px;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.14);
  animation: bounce 2.2s infinite;
}

.section {
  padding: 54px 6%;
}

.section h2 {
  text-align: center;
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
}

.section-intro {
  max-width: 720px;
  margin: 12px auto 0;
  text-align: center;
  color: var(--muted);
}

.flow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
}

.flowstep,
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.05);
}

.flowstep {
  min-width: 190px;
  padding: 22px;
  text-align: center;
}

.flowicon {
  display: block;
  font-size: 2rem;
  margin-bottom: 10px;
}

.arrow {
  display: flex;
  align-items: center;
  font-size: 1.6rem;
  color: #94a3b8;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 24px 6% 54px;
}

.card { padding: 26px; }

.card h3 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
}

.card p { margin: 0; color: var(--muted); }

.status {
  display: inline-flex;
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.status.delivered { background: var(--green-soft); color: #047857; }
.status.intransit { background: var(--amber-soft); color: #b45309; }
.status.pending { background: #eff6ff; color: #1d4ed8; }
.status.cancelled { background: #fef2f2; color: #b91c1c; }

.notice {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.notice.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.auth,
.page-card {
  max-width: 520px;
  margin: 44px auto;
  padding: 0 18px;
}

.auth .card,
.page-card .card { padding: 28px; }

.auth h1,
.page-card h1 {
  margin: 0 0 16px;
  font-family: "Space Grotesk", sans-serif;
}

.stack > * + * { margin-top: 12px; }

.table-wrap { overflow: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.92rem;
}

.table a { color: var(--teal); font-weight: 800; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.stat {
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
}

.stat strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.6rem;
}

.stat span { color: var(--muted); font-size: 0.86rem; font-weight: 700; }

.admin-shell {
  max-width: 1180px;
  margin: 34px auto;
  padding: 0 20px 40px;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.admin-head h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

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

.grid.two label {
  display: block;
  font-weight: 700;
  color: #334155;
}

.grid.two label .input,
.grid.two label select,
.grid.two label textarea { margin-top: 6px; }

.footer {
  margin-top: 70px;
  padding: 38px 6%;
  background: var(--navy);
  color: #e2e8f0;
  font-size: 0.92rem;
}

.footergrid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 24px;
}

.footer h3,
.footer h4 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
}

.footer p { color: #cbd5e1; line-height: 1.65; }

.footer-meta {
  margin-top: 10px;
  font-size: 0.82rem;
  color: #94a3b8;
}

.footlinks {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 18px;
}

.copy {
  margin: 18px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
}

@keyframes fillmove {
  0%, 100% { width: 52%; }
  50% { width: 82%; }
}

@keyframes bounce {
  50% { transform: translateY(-8px); }
}

@keyframes ring {
  0% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.35); }
  70% { box-shadow: 0 0 0 12px rgba(217, 119, 6, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}

@media (max-width: 900px) {
  .hero,
  .tracking-panel,
  .footergrid,
  .grid,
  .stats { grid-template-columns: 1fr; }

  .details { grid-template-columns: 1fr 1fr; }
  .mainnav { display: none; }
  .menu-btn { display: block; }

  body.nav-open .mainnav {
    display: flex;
    position: absolute;
    top: 69px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 6%;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }

  .arrow { display: none; }
  .searchrow { flex-direction: column; }
}

@media (max-width: 560px) {
  .details,
  .grid.two { grid-template-columns: 1fr; }
}
