:root {
  --bg: #f3f6f5; --card: #fff; --ink: #14201b; --muted: #66756f; --line: #e3e9e6;
  --brand: #0e8a60; --brand-2: #18a974; --brand-bg: #e6f5ef;
  --warn: #b7791f; --warn-bg: #fdf3e1; --bad: #c2410c; --bad-bg: #fdece4; --info: #2563eb;
  --shadow: 0 6px 24px rgba(16, 40, 30, .08);
  --r: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
.top { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top img { width: 32px; height: 32px; }
.top b { font-size: 16px; letter-spacing: -.01em; }
.top .sub { color: var(--muted); font-size: 12px; margin-left: auto; }
.wrap { max-width: 560px; margin: 0 auto; }

/* peta */
#map { height: 46vh; min-height: 280px; max-height: 460px; background: #dde7e3; }
.leaflet-container { font: inherit; }
.truck { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; box-shadow: 0 0 0 6px rgba(14,138,96,.22), 0 6px 16px rgba(0,0,0,.25); font-size: 22px; }
.truck.pulse { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(14,138,96,.45), 0 6px 16px rgba(0,0,0,.25); } 100% { box-shadow: 0 0 0 18px rgba(14,138,96,0), 0 6px 16px rgba(0,0,0,.25); } }
.pin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.pin.o { background: #1f2937; } .pin.d { background: #e11d48; } .pin.h { width: 12px; height: 12px; border-width: 2px; background: var(--brand); }
.dest-pin { font-size: 30px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }

/* kartu */
.sheet { position: relative; margin: -28px 12px 0; z-index: 500; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.status-line { font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 4px; }
.status-sub { color: var(--muted); margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--brand-bg); color: var(--brand); margin-bottom: 10px; }
.badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.bad { background: var(--bad-bg); color: var(--bad); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 0 2px; position: relative; }
.step { text-align: center; font-size: 11.5px; color: var(--muted); position: relative; padding-top: 30px; }
.step::before { content: ''; position: absolute; top: 9px; left: -50%; right: 50%; height: 3px; background: var(--line); }
.step:first-child::before { display: none; }
.step .dot { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 21px; height: 21px; border-radius: 50%; background: #fff; border: 3px solid var(--line); display: grid; place-items: center; font-size: 11px; color: #fff; z-index: 1; }
.step.done { color: var(--ink); } .step.done .dot { background: var(--brand); border-color: var(--brand); }
.step.done::before { background: var(--brand); }
.step.now { color: var(--brand); font-weight: 700; } .step.now .dot { border-color: var(--brand); box-shadow: 0 0 0 5px var(--brand-bg); }
.step.now::before { background: var(--brand); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-weight: 600; word-break: break-word; }
.resi { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.copy { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 3px 8px; font: inherit; font-size: 12px; color: var(--brand); cursor: pointer; }
.note { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--brand-bg); color: #0b5e42; font-size: 13.5px; }
.note.warn { background: var(--warn-bg); color: #7a4f12; }

h2 { font-size: 15px; margin: 0 0 12px; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 16px 24px; }
.tl li::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: -6px; width: 2px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl li::after { content: ''; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #cfd9d4; }
.tl li:first-child::after { background: var(--brand); box-shadow: 0 0 0 4px var(--brand-bg); }
.tl li:first-child .t { font-weight: 700; }
.tl .when { color: var(--muted); font-size: 12px; margin-top: 2px; }
.more { display: block; width: 100%; border: 0; background: none; color: var(--brand); font: inherit; font-weight: 600; padding: 4px 0 0; cursor: pointer; }

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 8px 16px 28px; }
.foot a { color: var(--muted); }

/* halaman cari */
.hero { padding: 36px 20px 8px; text-align: center; }
.hero img { width: 64px; height: 64px; }
.hero h1 { font-size: 24px; margin: 14px 0 6px; letter-spacing: -.02em; }
.hero p { color: var(--muted); margin: 0; }
form .f { margin-bottom: 12px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
input { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-bg); }
.btn { width: 100%; border: 0; border-radius: 12px; padding: 13px; font: inherit; font-weight: 700; font-size: 16px; color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--brand)); cursor: pointer; }
.btn:disabled { opacity: .6; }
.err { color: var(--bad); font-size: 13.5px; min-height: 20px; margin-top: 10px; text-align: center; }
.skel { background: linear-gradient(90deg, #eef2f0 25%, #f7f9f8 50%, #eef2f0 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; height: 14px; margin: 8px 0; }
@keyframes sk { to { background-position: -200% 0; } }
.center { text-align: center; padding: 40px 20px; }

@media (prefers-reduced-motion: reduce) { .truck.pulse, .skel { animation: none; } }
