:root {
  --brand-navy: #1a365d;
  --brand-blue: #2c5282;
  --brand-gold: #d69e2e;
  --brand-gold-soft: #ecc94b;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e2e8f0;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #ca8a04;
  --info: #2563eb;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.section { padding: 5rem 0; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-body { padding: 1.5rem; }
.grid { display: grid; gap: 1.5rem; }
.text-center { text-align: center; }
.text-sm { font-size: .92rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 2rem; }
.font-bold { font-weight: 800; }
.font-semibold { font-weight: 700; }
.mb-2 { margin-bottom: .5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.py-12 { padding: 3rem 0; }
.py-16 { padding: 4rem 0; }
.bg-white { background: #fff; }
.bg-soft { background: linear-gradient(180deg, #fff, #f8fafc); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.w-full { width: 100%; }
.hidden-mobile { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  border-radius: 14px;
  border: 1px solid transparent;
  padding: .9rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand-navy); color: #fff; }
.btn-primary:hover { background: var(--brand-blue); }
.btn-accent { background: var(--brand-gold); color: var(--brand-navy); }
.btn-accent:hover { background: var(--brand-gold-soft); }
.btn-outline { border-color: rgba(255,255,255,.35); color: #fff; background: rgba(255,255,255,.08); }
.btn-outline-dark { border-color: var(--line); color: var(--brand-navy); background: #fff; }
.btn-secondary { background: #eef2f7; color: var(--brand-navy); }
.btn-block { width: 100%; }
.btn-sm { padding: .65rem .9rem; border-radius: 12px; font-size: .92rem; }
.btn-lg { padding: 1rem 1.4rem; }

.navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226,232,240,.85);
}
.navbar-container {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-weight: 800;
  color: var(--brand-navy);
  letter-spacing: .03em;
}
.brand-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-navy);
  color: var(--brand-gold);
  box-shadow: 0 12px 24px rgba(26,54,93,.18);
}
.navbar-nav { list-style: none; display: none; align-items: center; gap: 1.2rem; padding: 0; margin: 0; }
.navbar-nav a { color: var(--muted); font-weight: 600; }
.navbar-nav a:hover, .navbar-nav a.active { color: var(--brand-navy); }
.navbar-toggle { background: transparent; border: 0; font-size: 1.1rem; color: var(--brand-navy); }
.mobile-menu { display:none; padding: 0 0 1rem; }
.mobile-menu.open { display:block; }
.mobile-menu a { display:block; padding:.8rem 0; color: var(--muted); font-weight:600; border-top:1px solid var(--line); }

.hero {
  background:
    linear-gradient(135deg, rgba(26,54,93,.96), rgba(44,82,130,.93)),
    url('../images/hero-delivery.jpg') center/cover no-repeat;
  color: #fff;
  padding: 6rem 0 4rem;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2rem; align-items: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .45rem .8rem;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.95);
  font-weight: 700;
  font-size: .88rem;
}
.hero-title {
  font-size: clamp(2.7rem, 6vw, 4.8rem);
  line-height: 1.02;
  margin: 1rem 0;
  font-weight: 800;
}
.hero-title span { color: var(--brand-gold); }
.hero-subtitle { color: rgba(255,255,255,.82); max-width: 42rem; font-size: 1.06rem; }
.hero-actions { display:flex; flex-wrap:wrap; gap:1rem; margin-top:1.8rem; }
.hero-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 24px;
  padding: 1.25rem;
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
}
.hero-card img { border-radius: 18px; height: 340px; width: 100%; object-fit: cover; }
.hero-search {
  margin-top: 1.7rem;
  background: #fff;
  border-radius: 22px;
  padding: .7rem;
  display: flex;
  gap: .75rem;
  box-shadow: 0 20px 50px rgba(0,0,0,.16);
}
.hero-search input, .form-input, .form-select, .form-textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: .95rem 1rem;
  font: inherit;
  color: var(--text);
}
.hero-search input { border: 0; box-shadow: none; }
.hero-search input:focus, .form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: #9db6d9;
  box-shadow: 0 0 0 4px rgba(44,82,130,.12);
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-group { margin-bottom: 1rem; }
.form-label { display:block; margin-bottom:.4rem; font-weight:700; color: var(--brand-navy); }

.stats-grid, .services-grid, .feature-grid, .contact-grid, .admin-stats { display:grid; gap:1.25rem; }
.stats-grid { grid-template-columns: repeat(4, 1fr); }
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.35rem;
  box-shadow: var(--shadow);
}
.stat-value { font-size: 2rem; color: var(--brand-navy); font-weight: 800; }
.stat-label { color: var(--muted); font-size: .95rem; }
.icon-tile {
  width: 56px; height: 56px; border-radius: 16px; display:inline-flex; align-items:center; justify-content:center;
  background: rgba(26,54,93,.08); color: var(--brand-navy); font-size: 1.35rem;
}
.services-grid { grid-template-columns: repeat(4, 1fr); }
.service-card { position: relative; overflow: hidden; }
.service-card::after { content:''; position:absolute; inset:auto 0 0 0; height:4px; background: linear-gradient(90deg, var(--brand-navy), var(--brand-gold)); }
.feature-grid { grid-template-columns: repeat(2, 1fr); }
.feature-list { display:grid; gap: .85rem; }
.feature-item { display:flex; align-items:flex-start; gap: .8rem; }
.feature-item i { color: var(--brand-gold); margin-top: .2rem; }

.tracker-shell {
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.2rem;
}
.tracker-search { display:flex; gap:.8rem; flex-wrap:wrap; }
.alert {
  border-radius: 14px;
  padding: 1rem 1.1rem;
  border: 1px solid transparent;
}
.alert-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.status-chip {
  display:inline-flex; align-items:center; justify-content:center; padding:.5rem .85rem; border-radius:999px; font-weight:700; font-size:.86rem;
}
.status-pending { background:#fef3c7; color:#92400e; }
.status-picked_up, .status-in_transit { background:#dbeafe; color:#1d4ed8; }
.status-out_for_delivery { background:#ffedd5; color:#c2410c; }
.status-delivered { background:#dcfce7; color:#166534; }
.status-cancelled, .status-on_hold { background:#e5e7eb; color:#374151; }
.detail-grid { display:grid; grid-template-columns: repeat(4,1fr); gap:1rem; }
.detail-card { background:#f8fafc; border:1px solid var(--line); border-radius:16px; padding:1rem; }
.detail-card small { display:block; color:var(--muted); margin-bottom:.25rem; }

.timeline { position:relative; margin-top: 1.2rem; }
.timeline::before { content:''; position:absolute; left:14px; top:0; bottom:0; width:2px; background:#dbe4ef; }
.timeline-item { position:relative; padding-left: 3rem; padding-bottom: 1.25rem; }
.timeline-dot {
  position:absolute; left:0; top:4px; width:30px; height:30px; border-radius:50%;
  background: #fff; border: 3px solid #bdd0e8; box-shadow: 0 0 0 6px rgba(26,54,93,.04);
}
.timeline-item.is-active .timeline-dot, .timeline-item.completed .timeline-dot { border-color: var(--brand-gold); }
.timeline-content { background:#fff; border:1px solid var(--line); border-radius:16px; padding:1rem; }
.timeline-title { margin:.1rem 0; font-size:1rem; font-weight:800; color:var(--brand-navy); }
.timeline-date, .timeline-location, .timeline-notes { margin:0; color:var(--muted); font-size:.93rem; }

.footer {
  background: var(--brand-navy);
  color: rgba(255,255,255,.88);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}
.footer-grid { display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 1.5rem; }
.footer h3, .footer h4 { color:#fff; margin-top:0; }
.footer a { color: rgba(255,255,255,.72); }
.footer a:hover { color:#fff; }
.footer-bottom { border-top:1px solid rgba(255,255,255,.12); margin-top:2rem; padding-top:1rem; text-align:center; font-size:.92rem; color:rgba(255,255,255,.58); }

.login-page, .admin-wrap { min-height: calc(100vh - 76px); display:grid; place-items:center; padding: 2rem 0; }
.login-shell { width:min(1080px, calc(100% - 2rem)); display:grid; grid-template-columns: 1fr 430px; gap: 1.5rem; align-items: stretch; }
.login-showcase {
  background: linear-gradient(135deg, rgba(26,54,93,.96), rgba(44,82,130,.92)), url('../images/map-graphic.jpg') center/cover no-repeat;
  color:#fff; border-radius:28px; padding:2rem; box-shadow: var(--shadow);
}
.login-box { background:#fff; border-radius:28px; padding:2rem; border:1px solid var(--line); box-shadow: var(--shadow); }
.login-pill { display:inline-flex; padding:.45rem .7rem; border-radius:999px; background:#eff6ff; color:var(--brand-blue); font-weight:700; font-size:.86rem; }

.admin-layout { display:grid; grid-template-columns: 290px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, var(--brand-navy), #14263e);
  color:#fff; padding:1.25rem; position:sticky; top:0; height:100vh;
}
.sidebar .brand-row { display:flex; align-items:center; gap:.8rem; margin-bottom:1.7rem; }
.sidebar-nav { display:grid; gap:.55rem; }
.sidebar-nav a {
  color: rgba(255,255,255,.78); padding: .9rem 1rem; border-radius: 14px; font-weight: 700; display:flex; align-items:center; gap:.8rem;
}
.sidebar-nav a:hover, .sidebar-nav a.active { background: rgba(255,255,255,.1); color:#fff; }
.admin-main { padding: 1.5rem; }
.panel { background:#fff; border:1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.panel-header { padding: 1.2rem 1.3rem; border-bottom:1px solid var(--line); }
.panel-body { padding: 1.3rem; }
.table-wrap { overflow:auto; }
.table { width:100%; border-collapse:collapse; }
.table th, .table td { padding: .95rem 1rem; border-bottom:1px solid var(--line); text-align:left; }
.table th { color: var(--muted); font-size:.82rem; text-transform: uppercase; letter-spacing: .04em; }
.table tr:hover td { background:#fbfdff; }
.badge { display:inline-flex; align-items:center; padding:.42rem .7rem; border-radius:999px; font-weight:700; font-size:.82rem; }
.flash-messages { display:grid; gap:.8rem; margin-bottom:1rem; }
.flash-message { border-radius: 14px; padding:.95rem 1rem; }
.flash-success { background:#ecfdf5; color:#166534; border:1px solid #bbf7d0; }
.flash-error { background:#fef2f2; color:#991b1b; border:1px solid #fecaca; }
.flash-warning { background:#fffbeb; color:#92400e; border:1px solid #fde68a; }

@media (max-width: 1100px) {
  .hero-grid, .login-shell, .admin-layout, .footer-grid, .stats-grid, .services-grid, .feature-grid, .detail-grid { grid-template-columns: 1fr 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { height:auto; position:relative; }
}
@media (max-width: 768px) {
  .navbar-nav { display:none !important; }
  .hero { padding-top: 4.5rem; }
  .hero-grid, .login-shell, .footer-grid, .stats-grid, .services-grid, .feature-grid, .detail-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-search, .tracker-search { flex-direction: column; }
  .hero-title { font-size: 2.6rem; }
}
@media (min-width: 769px) {
  .navbar-nav { display:flex; }
  .navbar-toggle, .mobile-menu { display:none !important; }
  .hidden-mobile { display:block; }
}
