:root {
  --bg: #f4f6f5;
  --bg2: #ffffff;
  --panel: #ffffff;
  --ink: #15201c;
  --muted: #5d6f67;
  --line: rgba(21, 32, 28, 0.1);
  --fuel: #c47a00;
  --fuel-hot: #e09212;
  --fuel-dim: rgba(196, 122, 0, 0.12);
  --ok: #1f8f58;
  --warn: #c47a00;
  --bad: #c44538;
  --diesel: #2f6fd6;
  --premium: #8b4dcf;
  --regular: #c47a00;
  --disp: "Barlow Condensed", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(21, 32, 28, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--fuel); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
#app { min-height: 100vh; }

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.75rem 1.1rem;
  background: var(--fuel);
  color: #fff;
  font-weight: 600;
  transition: transform .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
.btn.ghost:hover { border-color: var(--fuel); color: var(--fuel); }
.btn.small { padding: 0.5rem 0.75rem; font-size: 0.88rem; }
.btn.danger { background: var(--bad); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.lg { padding: 0.95rem 1.35rem; font-size: 1.02rem; }
.btn.block { width: 100%; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field select, .field textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  padding: 0.75rem 0.85rem;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--fuel);
  box-shadow: 0 0 0 3px var(--fuel-dim);
}
.field textarea { min-height: 72px; resize: vertical; }
.err {
  background: rgba(196,69,56,.08);
  border: 1px solid rgba(196,69,56,.25);
  color: #9a2f25;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}
.ok-banner {
  background: rgba(31,143,88,.1);
  border: 1px solid rgba(31,143,88,.25);
  color: #146640;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
}
.warn-banner {
  background: rgba(196,122,0,.12);
  border: 1px solid rgba(196,122,0,.28);
  color: #7a4c00;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  display: grid;
  gap: 10px;
}
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ok);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.live-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(31,143,88,.5);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(31,143,88,.45); }
  70% { box-shadow: 0 0 0 8px rgba(31,143,88,0); }
  100% { box-shadow: 0 0 0 0 rgba(31,143,88,0); }
}

/* landing */
.site-nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 40px);
}
.site-nav .brand, .topbar .brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  font-family: var(--disp);
  font-weight: 800;
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: 0.05em;
  line-height: 1;
}
.brand-mark span { color: var(--fuel); }
.brand-sub {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.45rem 0.7rem;
}
.nav-burger {
  display: none;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
}
@media (max-width: 720px) {
  .nav-burger { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    right: 16px;
    left: 16px;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open .nav-links { display: flex; }
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(244,246,245,.2) 0%, rgba(244,246,245,.55) 42%, rgba(244,246,245,.96) 100%),
    linear-gradient(90deg, rgba(244,246,245,.75) 0%, rgba(244,246,245,.2) 55%, rgba(244,246,245,.55) 100%),
    url("https://images.unsplash.com/photo-1486262715619-67b85e0b08d3?auto=format&fit=crop&w=2400&q=80")
      center / cover no-repeat;
  transform: scale(1.03);
  animation: heroDrift 22s ease-in-out infinite alternate;
}
@keyframes heroDrift {
  from { transform: scale(1.03) translate3d(0,0,0); }
  to { transform: scale(1.07) translate3d(-1%, -1%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-media, .live-dot::before { animation: none; }
}
.hero-copy {
  position: relative;
  z-index: 2;
  padding: clamp(96px, 16vh, 140px) clamp(16px, 4vw, 40px) clamp(36px, 7vh, 64px);
  max-width: 920px;
}
.hero-brand {
  font-family: var(--disp);
  font-weight: 800;
  font-size: clamp(3.8rem, 13vw, 7.5rem);
  line-height: 0.88;
  letter-spacing: 0.02em;
  margin: 0 0 16px;
  color: var(--ink);
}
.hero-brand span { color: var(--fuel); }
.hero-line {
  font-size: clamp(1.1rem, 2.3vw, 1.4rem);
  max-width: 32ch;
  line-height: 1.35;
  margin: 0 0 24px;
  color: var(--muted);
  font-weight: 500;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }

.land-section {
  padding: clamp(48px, 9vh, 84px) clamp(16px, 4vw, 40px);
  max-width: 1100px;
  margin: 0 auto;
}
.land-section .kicker {
  color: var(--fuel);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 10px;
}
.land-section h2 {
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 0.02em;
  margin: 0 0 12px;
  line-height: 1;
}
.land-section .support {
  color: var(--muted);
  max-width: 48ch;
  line-height: 1.5;
  margin: 0 0 24px;
  font-size: 1.02rem;
}
.service-list { border-top: 1px solid var(--line); }
.service-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.service-num {
  font-family: var(--disp);
  font-size: 1.5rem;
  color: var(--fuel);
}
.service-row h3 { margin: 0 0 6px; font-size: 1.12rem; }
.service-row p { margin: 0; color: var(--muted); line-height: 1.5; }
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 760px) {
  .how-steps { grid-template-columns: 1fr; }
}
.how-step h3 {
  font-family: var(--disp);
  font-size: 1.7rem;
  margin: 0 0 8px;
}
.how-step h3 span { color: var(--fuel); margin-right: 8px; }
.how-step p { margin: 0; color: var(--muted); line-height: 1.5; }
.land-cta {
  margin: 0 clamp(16px, 4vw, 40px) clamp(48px, 9vh, 84px);
  padding: clamp(28px, 5vw, 48px);
  border-radius: 18px;
  background: linear-gradient(135deg, #fff7e8, #ffffff);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  justify-items: start;
}
.land-cta h2 {
  font-family: var(--disp);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0;
  line-height: 1;
}
.land-cta p { margin: 0; color: var(--muted); max-width: 42ch; }
.site-foot {
  padding: 24px clamp(16px, 4vw, 40px) 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff;
}
.site-foot strong { color: var(--ink); }

/* modals */
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(21,32,28,.45);
  display: grid;
  place-items: end center;
  padding: 0;
  z-index: 40;
}
@media (min-width: 640px) {
  .modal-back { place-items: center; padding: 18px; }
}
.modal {
  width: min(480px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
  padding: 20px;
  max-height: 92vh;
  overflow: auto;
  box-shadow: var(--shadow);
}
@media (min-width: 640px) {
  .modal { border-radius: 16px; }
}
.modal h3 {
  font-family: var(--disp);
  font-size: 1.6rem;
  margin: 0 0 6px;
}
.modal .lede {
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.4;
  font-size: 0.95rem;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.demos {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.demos p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.demo-row { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-row .btn { flex: 1; min-width: 120px; }

/* app shell */
.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 14px 72px;
  min-height: 100vh;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.who {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  flex-wrap: wrap;
}
.who strong { color: var(--ink); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.panel h2 {
  font-family: var(--disp);
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.panel-head h2 { margin: 0; }

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.stat .n {
  font-family: var(--disp);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--fuel);
}
.stat .l {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.vehicle {
  background: #fafbfa;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.vehicle-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.vehicle h3 { margin: 0; font-size: 1.05rem; }
.plate {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--disp);
  letter-spacing: 0.12em;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.95rem;
}
.meta {
  margin-top: 10px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}
.meta strong { color: var(--ink); font-weight: 500; }
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
@media (min-width: 520px) {
  .actions {
    display: flex;
    flex-wrap: wrap;
  }
}
.actions .btn { width: 100%; }
@media (min-width: 520px) {
  .actions .btn { width: auto; }
}

.gauge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--gcolor) calc(var(--pct) * 1%), rgba(21,32,28,.08) 0);
  position: relative;
  flex-shrink: 0;
}
.gauge::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #fafbfa;
}
.gauge span {
  position: relative;
  z-index: 1;
  font-family: var(--disp);
  font-size: 1.05rem;
  font-weight: 700;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  background: var(--fuel-dim);
  color: var(--fuel);
}
.chip.diesel { background: rgba(47,111,214,.12); color: #1f56b0; }
.chip.premium { background: rgba(139,77,207,.12); color: #6a2fa8; }
.chip.regular { background: var(--fuel-dim); color: var(--fuel); }
.chip.pending { background: rgba(196,122,0,.14); color: #8a5600; }
.chip.accepted { background: rgba(47,111,214,.12); color: #1f56b0; }
.chip.en_route { background: rgba(31,143,88,.12); color: #146640; }
.chip.delivered { background: rgba(31,143,88,.18); color: #146640; }
.chip.cancelled { background: rgba(196,69,56,.12); color: #9a2f25; }
.chip.needspin { background: rgba(196,69,56,.12); color: #9a2f25; }

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.tab {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  font-size: 0.88rem;
}
.tab.on {
  background: var(--fuel-dim);
  border-color: rgba(196,122,0,.35);
  color: var(--fuel);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 520px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}
.slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.slider-row input[type=range] { flex: 1; accent-color: var(--fuel); }
.slider-row .val {
  font-family: var(--disp);
  font-size: 1.2rem;
  min-width: 3ch;
  text-align: right;
  color: var(--fuel);
}

.empty {
  color: var(--muted);
  padding: 16px 4px;
  font-size: 0.95rem;
}

/* mobile-first order cards (admin + user) */
.order-cards { display: grid; gap: 12px; }
.order-card {
  background: #fafbfa;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 10px;
}
.order-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.order-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}
.order-card .sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 2px;
}
.order-card .row {
  display: grid;
  gap: 4px;
  font-size: 0.92rem;
}
.order-card .row span { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.order-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  background: #fff;
  color: var(--ink);
}
.order-card .card-actions {
  display: grid;
  gap: 8px;
}
@media (min-width: 480px) {
  .order-card .card-actions {
    grid-template-columns: 1fr 1fr;
  }
}
.map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-decoration: none;
  color: var(--fuel);
  word-break: break-word;
}
.pin-meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  color: var(--muted);
}

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 640px;
}
.table th, .table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
@media (max-width: 860px) {
  .desktop-only { display: none !important; }
}
@media (min-width: 861px) {
  .mobile-only { display: none !important; }
}
