:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --ink: #1f2733;
    --muted: #8a96a6;
    --line: #e9eef5;
    --indigo: #6366f1;
    --indigo-d: #4f46e5;
    --orange: #f97316;
    --blue: #2f9bf0;
    --green: #16a34a;
    --red: #dc2f2a;
    --shadow: 0 1px 2px rgba(16,24,40,.04), 0 2px 6px rgba(16,24,40,.05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
}
.wrap { max-width: 940px; margin: 0 auto; padding: 22px 18px 64px; }

/* top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px 22px; }
.brand { font-size: 18px; font-weight: 800; letter-spacing: -.2px; }
.link { color: var(--indigo); text-decoration: none; font-weight: 600; font-size: 14px; }
.link:hover { text-decoration: underline; }

/* page heading */
.page-head { margin: 2px 2px 20px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.4px; margin: 0; }
.page-head .booking-id { color: var(--muted); font-size: 14px; white-space: nowrap; }
.page-head .booking-id strong { color: var(--ink); }

/* section labels */
.section { margin-bottom: 22px; }
.section-head {
    text-transform: uppercase; font-size: 12px; font-weight: 700;
    letter-spacing: .7px; color: var(--muted); margin: 0 4px 10px;
}

/* cards */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: var(--shadow);
}

/* stat row */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 26px; }
.stat {
    background: var(--card); border: 1px solid var(--line); border-radius: 16px;
    box-shadow: var(--shadow); padding: 20px; text-align: center;
}
.stat-title { text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: .7px; color: var(--muted); }
.stat-num { font-size: 34px; font-weight: 800; line-height: 1.1; margin: 8px 0 6px; }
.stat-sub { font-size: 12px; color: var(--muted); }
.c-orange { color: var(--orange); }
.c-blue   { color: var(--blue); }
.c-green  { color: var(--green); }
.c-paid   { color: var(--green); }
.c-unpaid { color: var(--red); }
.c-unset  { color: var(--muted); }

/* fields */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 24px; }
.field { margin-bottom: 16px; }
label, .field-cap { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: #3a4656; }
.field-cap { text-transform: uppercase; font-size: 11px; letter-spacing: .5px; color: var(--muted); font-weight: 700; }
input, select {
    display: block; width: 100%;
    padding: 11px 13px; font-size: 15px;
    border: 1px solid var(--line); border-radius: 10px;
    background: #fff; color: var(--ink); font-family: inherit;
}
input:focus, select:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
input.ro { background: #f6f8fb; color: #5b6675; border-style: dashed; }
input[type=checkbox] { width: auto; margin: 0; width: 18px; height: 18px; accent-color: var(--indigo); }
.check-line { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin-top: 8px; cursor: pointer; }
.check-line span { font-size: 15px; }
@media (max-width: 560px) {
    .grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr; }
}

/* countdown */
.countdown { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--indigo); }
.stat-sub .countdown { margin-top: 0; font-size: 12px; }
.countdown.muted { color: var(--muted); font-weight: 400; }
.countdown.warn { color: #b4690e; }
.countdown.passed { color: var(--muted); }

/* map + live tracking */
.map-wrap { margin-top: 8px; }
.map { width: 100%; height: 320px; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; display: block; z-index: 0; }
.track-status { margin-top: 8px; padding: 10px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; border: 1px solid; }
.track-idle { background: #f2f5f9; color: #5b6675; border-color: #e1e7ef; }
.track-live { background: #eef0fe; color: var(--indigo-d); border-color: #cdd2fb; }
.track-status strong { color: inherit; }
.track-fresh { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; opacity: .75; }
.dot-parked { background: #9aa5b4; }
.pin-wrap svg { filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.dot { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,.35); }
.dot-pickup { background: var(--indigo); }
.dot-vehicle { background: var(--red); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse {
    0%   { box-shadow: 0 0 0 2px #fff, 0 0 0 0 rgba(220,47,42,.55); }
    70%  { box-shadow: 0 0 0 2px #fff, 0 0 0 12px rgba(220,47,42,0); }
    100% { box-shadow: 0 0 0 2px #fff, 0 0 0 0 rgba(220,47,42,0); }
}

/* payment callout */
.pay {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    margin-top: 16px;
    padding: 16px 18px; border-radius: 12px; border: 1px solid;
}
.pay-info { display: flex; flex-direction: column; gap: 3px; }
.pay-label { font-size: 19px; font-weight: 800; }
.pay-note { font-size: 13px; color: var(--muted); }
.pay-paid   { background: #e9f9f0; border-color: #b6e6c8; }
.pay-paid   .pay-label { color: var(--green); }
.pay-unpaid { background: #fdeceb; border-color: #f4c4c1; }
.pay-unpaid .pay-label { color: var(--red); }
.pay-unset  { background: #f2f5f9; border-color: #e1e7ef; }
.pay-unset  .pay-label { color: var(--muted); }
.pay-btn {
    border: 0; cursor: pointer; white-space: nowrap;
    background: linear-gradient(var(--indigo), var(--indigo-d)); color: #fff;
    font-size: 15px; font-weight: 700; padding: 12px 22px; border-radius: 10px;
}
.pay-btn:hover { filter: brightness(1.06); }

/* actions / buttons */
.actions { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.actions .btn-cancel {
    appearance: none; cursor: pointer;
    background: #f9d2cf; color: #a31c17; border: 1px solid #e49a95;
    font-size: 15px; font-weight: 700; padding: 13px 22px; border-radius: 10px;
}
.actions .btn-cancel:hover { background: #f3b9b4; border-color: #d77f79; filter: none; }
button[type=submit] {
    appearance: none; border: 0; cursor: pointer;
    background: linear-gradient(var(--indigo), var(--indigo-d)); color: #fff;
    font-size: 15px; font-weight: 700; padding: 13px 26px; border-radius: 10px;
}
button[type=submit]:hover { filter: brightness(1.06); }

/* login */
.card.login { max-width: 420px; margin: 7vh auto 0; padding: 30px; }
.card.login h1 { font-size: 22px; margin: 0 0 6px; }
.card.login .muted { color: var(--muted); margin: 0 0 18px; }
.card.login label { font-weight: 600; margin-bottom: 14px; }
.card.login button { width: 100%; margin-top: 4px; appearance: none; border: 0; cursor: pointer; background: linear-gradient(var(--indigo), var(--indigo-d)); color: #fff; font-size: 15px; font-weight: 700; padding: 13px; border-radius: 10px; }
.card.login button:hover { filter: brightness(1.06); }

/* alerts */
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; }
.alert.ok { background: #e9f9f0; color: #14672f; border: 1px solid #b6e6c8; }
.alert.error { background: #fdeceb; color: #97211c; border: 1px solid #f4c4c1; }

.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 30px; }
