/* Loca Shuttle & Stay — design tokens + shared primitives (passenger + driver) */
:root {
  --teal: #12D0C8; --sky: #12A8E8; --accent: #0F7FD1; --deep: #0A63D6; --ink: #0B1A2A;
  --warn: #f5a524; --danger: #e5484d; --ok: #0a9a93;
  --bg: #f4f7fa; --card: #fff; --inset: #eef2f6; --line: #e3e9ef; --line-soft: #eef2f6;
  --text: #0B1A2A; --text-2: #33435a; --muted: #5b6b7c; --muted-2: #8b98a8; --placeholder: #b3bec9;
  --tint: #e9f4fd; --tint-ok: #e0faf8; --tint-ok-2: #f0fbfa; --ok-line: #8fe3de; --ok-text: #0a7d77;
  --grad: linear-gradient(45deg, #12D0C8, #12A8E8 55%, #0A63D6);
  --grad-cta: linear-gradient(45deg, #0F7FD1, #0A63D6);
  --r-card: 18px; --r-tile: 14px; --r-pill: 99px;
  --shadow: 0 1px 4px rgba(11,26,42,.06); --shadow-lg: 0 2px 10px rgba(11,26,42,.07);
  --font: 'Manrope', 'Noto Sans Lao', system-ui, -apple-system, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 13px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
input, textarea { outline: none; }
a { color: var(--accent); text-decoration: none; }
[hidden] { display: none !important; }
svg { display: block; }
.ico { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.sm { width: 16px; height: 16px; } .ico.xs { width: 13px; height: 13px; stroke-width: 2.4; } .ico.lg { width: 21px; height: 21px; }
.car { fill: currentColor; flex: none; }

/* layout */
.screen { display: flex; flex-direction: column; height: 100%; min-height: 100dvh; }
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pad { padding: 18px 20px; }
.hero { background: var(--grad); color: #fff; padding: calc(18px + var(--safe-t)) 20px 22px; border-radius: 0 0 26px 26px; }
.hero h1 { font: 800 21px/1.15 var(--font); margin: 0; }
.hero .sub { font: 500 12.5px var(--font); opacity: .92; margin-top: 3px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font: 700 14px var(--font); color: #fff; flex: none; }
.topbar { background: var(--card); border-bottom: 1px solid var(--line); padding: calc(12px + var(--safe-t)) 20px 12px; display: flex; align-items: center; gap: 11px; }
.topbar .title { font: 800 15.5px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .meta { font: 500 11.5px var(--font); color: var(--muted); margin-top: 1px; }
.iconbtn { width: 32px; height: 32px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; color: var(--ink); flex: none; }
.iconbtn.lg { width: 40px; height: 40px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* type */
.h2 { font: 700 15px var(--font); margin: 22px 0 12px; }
.h3 { font: 700 14px var(--font); margin: 18px 0 10px; }
.label { font: 600 10.5px var(--font); color: var(--muted-2); letter-spacing: .06em; text-transform: uppercase; }
.muted { color: var(--muted); font-weight: 500; }
.small { font-size: 11.5px; }
.price { color: var(--accent); font-weight: 800; }
.strong { font-weight: 700; }

/* cards */
.card { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); }
.card.p { padding: 15px 16px; }
.card.sel { border: 1.5px solid var(--accent); }
.card.outline { border: 1.5px solid transparent; }
.tile { background: var(--bg); border-radius: 12px; padding: 11px 13px; }
.fact { flex: 1; background: var(--card); border-radius: var(--r-tile); padding: 11px 8px; text-align: center; box-shadow: var(--shadow); }
.fact b { display: block; font: 800 13.5px var(--font); } .fact span { font: 500 10.5px var(--font); color: var(--muted); }
.fact.inset { background: var(--bg); box-shadow: none; }
.tag { padding: 5px 10px; border-radius: 8px; background: var(--bg); color: var(--text-2); font: 600 10.5px var(--font); white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 7px; background: var(--tint); border-radius: var(--r-pill); padding: 6px 12px 6px 10px; font: 700 12px var(--font); color: var(--deep); }
.pill .muted { font-weight: 500; font-size: 11.5px; }
.check { width: 20px; height: 20px; border-radius: 50%; background: var(--tint-ok); color: var(--ok); display: flex; align-items: center; justify-content: center; flex: none; }
.bullet { display: flex; align-items: flex-start; gap: 10px; font: 500 12.5px var(--font); color: var(--text-2); }
.divider { height: 1px; background: var(--line-soft); }

/* chips */
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { padding: 8px 14px; border-radius: var(--r-pill); white-space: nowrap; font: 700 12px var(--font); border: 1.5px solid transparent; background: var(--bg); color: var(--text-2); flex: none; min-height: 34px; }
.chip.on { border-color: var(--accent); background: var(--tint); color: var(--deep); }
.chip.dark.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.sq { border-radius: 11px; }
.chip.warn { color: var(--warn); }

/* buttons */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 14px 18px; border-radius: var(--r-pill);
  font: 800 14px var(--font); color: #fff; background: var(--grad-cta); text-align: center; }
.btn.grad { background: var(--grad); }
.btn.sm { min-height: 36px; padding: 9px 15px; font-size: 12px; width: auto; background: var(--deep); }
.btn.ghost { background: var(--bg); color: var(--text-2); }
.btn.soft { background: var(--tint); color: var(--deep); }
.btn.light { background: #fff; color: var(--ink); }
.btn.outline { background: transparent; border: 1.5px solid rgba(255,255,255,.28); color: rgba(255,255,255,.75); width: auto; padding: 14px 20px; }
.btn.danger { background: #fdecec; color: var(--danger); }
.btn:disabled, .btn.off { background: var(--line); color: var(--muted-2); cursor: default; }
.btn:active:not(:disabled) { filter: brightness(.95); }
.bottombar { background: var(--card); border-top: 1px solid var(--line); padding: 13px 20px calc(12px + var(--safe-b)); }
.bottombar .hint { font: 500 10.5px var(--font); color: var(--muted-2); text-align: center; margin-top: 8px; }

/* form */
.field { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 12px; padding: 11px 13px; font: 600 12.5px var(--font); color: var(--text-2); border: 1.5px solid transparent; }
.field:focus-within { border-color: var(--accent); background: #fff; }
.field input, .field textarea, .field select { flex: 1; min-width: 0; border: 0; background: transparent; font: 600 12.5px var(--font); color: var(--text); padding: 0; }
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); font-weight: 500; }
.field textarea { resize: none; min-height: 44px; }
.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button { width: 32px; height: 32px; border-radius: 50%; background: var(--tint); color: var(--deep); font: 800 16px var(--font); display: flex; align-items: center; justify-content: center; }
.stepper button:disabled { opacity: .35; }

/* tab bar */
.tabbar { display: flex; justify-content: space-around; padding: 9px 8px calc(4px + var(--safe-b)); background: var(--card); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink); opacity: .45; font: 700 10px var(--font); min-width: 64px; min-height: 44px; }
.tab.on { color: var(--accent); opacity: 1; }
.tab .ico { width: 21px; height: 21px; }

/* sheet */
.sheet-bg { position: fixed; inset: 0; background: rgba(11,26,42,.45); z-index: 40; display: flex; align-items: flex-end; animation: fade .18s; }
.sheet { background: var(--card); border-radius: 22px 22px 0 0; width: 100%; max-height: 82dvh; display: flex; flex-direction: column; animation: up .22s cubic-bezier(.2,.8,.2,1); padding-bottom: var(--safe-b); }
.sheet .grab { width: 38px; height: 4px; border-radius: 99px; background: var(--line); margin: 10px auto 4px; }
.sheet .head { padding: 10px 20px 12px; display: flex; align-items: center; justify-content: space-between; }
.sheet .head b { font: 800 16px var(--font); }
.sheet .body { overflow-y: auto; padding: 0 20px 18px; }
.sheet .foot { padding: 12px 20px 14px; border-top: 1px solid var(--line-soft); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* status */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font: 700 11px var(--font); background: var(--inset); color: var(--text-2); }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.requested, .status.confirmed { background: #fff6e5; color: #b26f00; }
.status.assigned { background: var(--tint); color: var(--deep); }
.status.in_progress { background: var(--tint-ok); color: var(--ok-text); }
.status.completed { background: var(--inset); color: var(--muted); }
.status.cancelled { background: #fdecec; color: var(--danger); }
.notice { display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; padding: 12px 13px; font: 600 11.5px/1.45 var(--font); }
.notice.warn { background: #fff6e5; color: #8a5300; border: 1px solid #ffe2b0; }
.notice.info { background: var(--tint); color: var(--deep); }
.notice.err { background: #fdecec; color: var(--danger); }

/* misc */
.lock { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 32px; text-align: center; z-index: 50; }
.lock .box { max-width: 320px; }
.lock .big { width: 72px; height: 72px; border-radius: 22px; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.lock h2 { font: 800 19px var(--font); margin: 0 0 8px; } .lock p { color: var(--muted); font-weight: 500; margin: 0; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); font-weight: 500; }
.empty .big { width: 56px; height: 56px; border-radius: 18px; background: var(--inset); color: var(--muted-2); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.skeleton { background: linear-gradient(90deg, var(--inset), #f8fafc, var(--inset)); background-size: 200% 100%; animation: sh 1.2s infinite; border-radius: 12px; }
@keyframes sh { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 99px; font: 700 12px var(--font); z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: 90vw; animation: up .2s; }
.toast.err { background: var(--danger); }
.timeline .st { display: flex; gap: 12px; align-items: flex-start; }
.timeline .rail { display: flex; flex-direction: column; align-items: center; padding-top: 3px; }
.timeline .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted-2); }
.timeline .st:first-child .dot { background: var(--teal); } .timeline .st:last-child .dot { background: var(--deep); }
.timeline .line { width: 1.5px; height: 30px; background: var(--line); } .timeline .st:last-child .line { display: none; }
.timeline .txt { flex: 1; min-width: 0; padding-bottom: 12px; } .timeline .st:last-child .txt { padding-bottom: 0; }
.timeline .txt b { display: block; font: 700 13px var(--font); } .timeline .txt span { font: 500 11.5px var(--font); color: var(--muted); }
@media (min-width: 560px) { body { background: #e9eef3; } .screen { max-width: 480px; margin: 0 auto; background: var(--bg); box-shadow: 0 0 0 1px var(--line); } .sheet { max-width: 480px; margin: 0 auto; } }
